Unreviewed, rolling out r76893.
[WebKit.git] / Source / JavaScriptCore / ChangeLog
1 2011-01-28  Sheriff Bot  <webkit.review.bot@gmail.com>
2
3         Unreviewed, rolling out r76893.
4         http://trac.webkit.org/changeset/76893
5         https://bugs.webkit.org/show_bug.cgi?id=53287
6
7         It made some tests crash on GTK and Qt debug bots (Requested
8         by Ossy on #webkit).
9
10         * runtime/WeakGCMap.h:
11
12 2011-01-27  Adam Barth  <abarth@webkit.org>
13
14         Reviewed by Eric Seidel.
15
16         Add WTFString method to compare equality with Vector<UChar>
17         https://bugs.webkit.org/show_bug.cgi?id=53266
18
19         I'm planning to use this method in the new XSS filter implementation,
20         but it seems generally useful.
21
22         * wtf/text/StringImpl.h:
23         (WTF::equalIgnoringNullity):
24         * wtf/text/WTFString.h:
25         (WTF::equalIgnoringNullity):
26
27 2011-01-27  Michael Saboff  <msaboff@apple.com>
28
29         Potentially Unsafe HashSet of RuntimeObject* in RootObject definition
30         https://bugs.webkit.org/show_bug.cgi?id=53271
31
32         Added new isValid() methods to check if a contained object in
33         a WeakGCMap is valid when using an unchecked iterator.
34
35         * runtime/WeakGCMap.h:
36         (JSC::WeakGCMap::isValid):
37
38 2011-01-26  Sam Weinig  <sam@webkit.org>
39
40         Reviewed by Maciej Stachowiak.
41
42         Add events to represent the start/end of a gesture scroll
43         https://bugs.webkit.org/show_bug.cgi?id=53215
44
45         * wtf/Platform.h: Add ENABLE for gesture events. 
46
47 2011-01-26  Yael Aharon  <yael.aharon@nokia.com>
48
49         Reviewed by Laszlo Gombos.
50
51         [Qt][Symbian] Fix --minimal build
52         https://bugs.webkit.org/show_bug.cgi?id=52839
53
54         Move definition of USE_SYSTEM_MALLOC out of pri file.
55         Put it in platform.h instead.
56
57         * wtf/Platform.h:
58         * wtf/TCSystemAlloc.cpp:
59         * wtf/wtf.pri:
60
61 2011-01-26  Patrick Gansterer  <paroga@webkit.org>
62
63         Reviewed by Andreas Kling.
64
65         [WINCE] Add JIT support to build system
66         https://bugs.webkit.org/show_bug.cgi?id=53079
67
68         * CMakeListsWinCE.txt:
69
70 2011-01-25  Adam Roben  <aroben@apple.com>
71
72         Windows Production build fix
73
74         Reviewed by Steve Falkenburg.
75
76         * JavaScriptCore.vcproj/JavaScriptCore.make: Set BUILDSTYLE to Release_PGO at the very start
77         of the file so that ConfigurationBuildDir takes that into account. Also set it the right way
78         (by redefining the macro) rather than the wrong way (by modifying the environment variable).
79
80 2011-01-25  Steve Falkenburg  <sfalken@apple.com>
81
82         Rubber-stamped by Adam Roben.
83
84         Windows production build fix.
85         Use correct environment variable escaping
86
87         * JavaScriptCore.vcproj/JavaScriptCore.make:
88         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
89
90 2011-01-25  Oliver Hunt  <oliver@apple.com>
91
92         Reviewed by Gavin Barraclough.
93
94         JSON.stringify processing time exponentially grows with size of object
95         https://bugs.webkit.org/show_bug.cgi?id=51922
96
97         Remove last use of reserveCapacity from JSON stringification, as it results
98         in appalling append behaviour when there are a large number of property names
99         and nothing else.
100
101         * runtime/JSONObject.cpp:
102         (JSC::Stringifier::appendQuotedString):
103
104 2011-01-25  Antti Koivisto  <antti@apple.com>
105
106         Not reviewed.
107         
108         Try to fix windows build.
109
110         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
111
112 2011-01-25  Antti Koivisto  <antti@apple.com>
113
114         Reviewed by Oliver Hunt.
115
116         REGRESSION: Leak in JSParser::Scope::copyCapturedVariablesToVector()
117         https://bugs.webkit.org/show_bug.cgi?id=53061
118          
119         Cache did not know about the subclass so failed to fully delete the items. 
120         Got rid of the subclass and moved the classes to separate files.
121
122         * CMakeLists.txt:
123         * GNUmakefile.am:
124         * JavaScriptCore.exp:
125         * JavaScriptCore.gypi:
126         * JavaScriptCore.pro:
127         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
128         * JavaScriptCore.xcodeproj/project.pbxproj:
129         * parser/JSParser.cpp:
130         (JSC::JSParser::Scope::saveFunctionInfo):
131         (JSC::JSParser::Scope::restoreFunctionInfo):
132         (JSC::JSParser::findCachedFunctionInfo):
133         (JSC::JSParser::parseFunctionInfo):
134         * parser/SourceProvider.h:
135         * parser/SourceProviderCache.cpp: Added.
136         (JSC::SourceProviderCache::~SourceProviderCache):
137         (JSC::SourceProviderCache::byteSize):
138         * parser/SourceProviderCache.h: Added.
139         (JSC::SourceProviderCache::SourceProviderCache):
140         (JSC::SourceProviderCache::add):
141         (JSC::SourceProviderCache::get):
142         * parser/SourceProviderCacheItem.h: Added.
143         (JSC::SourceProviderCacheItem::SourceProviderCacheItem):
144         (JSC::SourceProviderCacheItem::approximateByteSize):
145         (JSC::SourceProviderCacheItem::closeBraceToken):
146
147 2011-01-25  Marcilio Mendonca  <mamendonca@rim.com>
148
149         Reviewed by Darin Adler.
150
151         Bug 53087: Refactoring: replaced a hanging "else" with a "return"
152         statement
153         https://bugs.webkit.org/show_bug.cgi?id=53087.
154
155         Refactoring work: Replaced a hanging "else" within an #if PLATFORM(M
156         with a "return" so that the code is more readable and less error pro
157         (e.g., "else" doesn't use braces so adding extra lines to the else
158         block won't have any effect; even worse, code still compiles
159         successfully.
160
161         * wtf/Assertions.cpp:
162
163 2011-01-24  Chris Marrin  <cmarrin@apple.com>
164
165         Reviewed by Eric Seidel.
166
167         Change ENABLE_3D_CANVAS to ENABLE_WEBGL
168         https://bugs.webkit.org/show_bug.cgi?id=53041
169
170         * Configurations/FeatureDefines.xcconfig:
171
172 2011-01-25  Adam Roben  <aroben@apple.com>
173
174         Windows Production build fix
175
176         * JavaScriptCore.vcproj/JavaScriptCore.make: Added a missing "set".
177
178 2011-01-25  Patrick Gansterer  <paroga@webkit.org>
179
180         Reviewed by Eric Seidel.
181
182         Add missing defines for COMPILER(RVCT) && CPU(ARM_THUMB2)
183         https://bugs.webkit.org/show_bug.cgi?id=52949
184
185         * jit/JITStubs.cpp:
186
187 2011-01-24  Adam Roben  <aroben@apple.com>
188
189         Windows Production build fix
190
191         * JavaScriptCore.vcproj/JavaScriptCore.make: Update for move of JavaScriptCore into Source.
192
193 2011-01-24  Peter Varga  <pvarga@webkit.org>
194
195         Reviewed by Oliver Hunt.
196
197         Optimize regex patterns which contain empty alternatives
198         https://bugs.webkit.org/show_bug.cgi?id=51395
199
200         Eliminate the empty alternatives from the regex pattern and convert it to do
201         the matching in an easier way.
202
203         * yarr/YarrPattern.cpp:
204         (JSC::Yarr::YarrPatternConstructor::atomParenthesesEnd):
205
206 2011-01-24  Andras Becsi  <abecsi@webkit.org>
207
208         Reviewed by Csaba Osztrogonác.
209
210         [Qt] Move project files into Source
211         https://bugs.webkit.org/show_bug.cgi?id=52891
212
213         * JavaScriptCore.pri:
214         * JavaScriptCore.pro:
215         * jsc.pro:
216
217 2011-01-23  Mark Rowe  <mrowe@apple.com>
218
219         Follow-up to r76477.
220
221         Fix the scripts that detect problematic code such as static initializers
222         and destructors, weak vtables, inappropriate files in the framework wrappers,
223         and public headers including private headers. These had all been broken
224         since the projects were moved in to the Source directory as the paths to the
225         scripts were not updated at that time.
226
227         * JavaScriptCore.xcodeproj/project.pbxproj:
228
229 2011-01-23  Patrick Gansterer  <paroga@webkit.org>
230
231         Reviewed by Darin Adler.
232
233         Use WTF::StringHasher in WebCore
234         https://bugs.webkit.org/show_bug.cgi?id=52934
235
236         Add an additional function to calculate the hash
237         of data with a runtimedependent size.
238
239         * wtf/StringHasher.h:
240         (WTF::StringHasher::createBlobHash):
241
242 2011-01-23  Patrick Gansterer  <paroga@webkit.org>
243
244         Reviewed by David Kilzer.
245
246         Fix comment in String::ascii()
247         https://bugs.webkit.org/show_bug.cgi?id=52980
248
249         * wtf/text/WTFString.cpp:
250         (WTF::String::ascii):
251
252 2011-01-23  Patrick Gansterer  <paroga@webkit.org>
253
254         Reviewed by David Kilzer.
255
256         Add String::containsOnlyLatin1()
257         https://bugs.webkit.org/show_bug.cgi?id=52979
258
259         * wtf/text/WTFString.h:
260         (WTF::String::containsOnlyLatin1):
261         (WTF::charactersAreAllLatin1):
262
263 2011-01-23  Patrick Gansterer  <paroga@webkit.org>
264
265         Reviewed by Oliver Hunt.
266
267         Remove obsolete JSVALUE32 code
268         https://bugs.webkit.org/show_bug.cgi?id=52948
269
270         r70111 removed support for JSVALUE32.
271         ARM, MIPS and X86 support JSVALUE32_64 only.
272
273         * jit/JITStubs.cpp:
274
275 2011-01-22  Geoffrey Garen  <ggaren@apple.com>
276
277         Reviewed by Dan Bernstein.
278
279         ASSERT running run-webkit-tests --threaded.
280         https://bugs.webkit.org/show_bug.cgi?id=52971
281         
282         SunSpider and v8 report no change.
283
284         * runtime/ConservativeSet.cpp:
285         (JSC::ConservativeSet::grow):
286         (JSC::ConservativeSet::add):
287         * runtime/ConservativeSet.h: Tweaked the inline capacity to 128, and
288         the growth policy to 2X, to make SunSpider and v8 happy.
289         (JSC::ConservativeSet::ConservativeSet):
290         (JSC::ConservativeSet::~ConservativeSet):
291         (JSC::ConservativeSet::mark): Use OSAllocator directly, instead of malloc.
292         Malloc is forbidden during a multi-threaded mark phase because it can
293         cause deadlock.
294
295 2011-01-22  Geoffrey Garen  <ggaren@apple.com>
296
297         Reviewed by Geoffrey Garen.
298
299         Rubber-stamped by Maciej Stachowiak.
300
301         A few of Maciej's review suggestions for my last patch.
302         https://bugs.webkit.org/show_bug.cgi?id=52946        
303
304         SunSpider reports no change.
305
306         * Android.mk:
307         * CMakeLists.txt:
308         * GNUmakefile.am:
309         * JavaScriptCore.gypi:
310         * JavaScriptCore.pro:
311         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
312         * JavaScriptCore.xcodeproj/project.pbxproj: Updated build systems.
313
314         * runtime/ConservativeSet.cpp: Added.
315         (JSC::isPointerAligned):
316         (JSC::ConservativeSet::add):
317         * runtime/ConservativeSet.h: Added.
318         (JSC::ConservativeSet::ConservativeSet):
319         (JSC::ConservativeSet::mark): Split ConservativeSet out into its own
320         file, and moved the conservative check into ConservativeSet::add, making
321         ConservativeSet's responsibility clearer.
322
323         * runtime/Heap.cpp:
324         (JSC::Heap::markRoots):
325         * runtime/MachineStackMarker.cpp:
326         (JSC::MachineStackMarker::markCurrentThreadConservativelyInternal):
327         (JSC::MachineStackMarker::markOtherThreadConservatively):
328         * runtime/MachineStackMarker.h:
329         * runtime/MarkStack.h: Updated for changes above.
330
331 2011-01-22  Patrick Gansterer  <paroga@webkit.org>
332
333         Unreviewed WinCE build fix for r76430.
334
335         * runtime/MachineStackMarker.cpp:
336         (JSC::swapIfBackwards):
337
338 2011-01-21  Geoffrey Garen  <ggaren@apple.com>
339
340         Reviewed by Beth Dakin.
341
342         Reorganized MarkedSpace, making many of its functions private.
343
344         * runtime/JSCell.h:
345         (JSC::JSCell::Heap::heap):
346         * runtime/MarkedSpace.h:
347         (JSC::MarkedSpace::globalData):
348         (JSC::MarkedSpace::heap):
349
350 2011-01-21  Geoffrey Garen  <ggaren@apple.com>
351
352         Try to fix build: moved helper function out of #ifdef.
353
354         * runtime/MachineStackMarker.cpp:
355         (JSC::swapIfBackwards):
356
357 2011-01-21  Geoffrey Garen  <ggaren@apple.com>
358
359         Rubber-stamped by Maciej Stachowiak.
360
361         A few of Maciej's review suggestions for my last patch.
362         https://bugs.webkit.org/show_bug.cgi?id=52946        
363
364         SunSpider reports no change.
365
366         * runtime/MachineStackMarker.cpp:
367         (JSC::swapIfBackwards): Added a helper function for handling platforms
368         where the stack can grow in any direction.
369
370         (JSC::MachineStackMarker::markCurrentThreadConservativelyInternal):
371         (JSC::MachineStackMarker::markOtherThreadConservatively): Use the helper
372         function.
373
374         (JSC::isPointerAligned): Use "!" instead of "==0" because a robot told me to.
375
376         (JSC::MachineStackMarker::markConservatively): Changed to use a more
377         standard looping idiom, and to use the helper function above.
378
379         * runtime/MarkedSpace.h:
380         (JSC::MarkedSpace::isCellAligned): Use "!" instead of "==0" because a robot told me to.
381
382 2011-01-21  Geoffrey Garen  <ggaren@apple.com>
383
384         Reviewed by Maciej Stachowiak.
385
386         Cleaned up some conservative marking code.
387         https://bugs.webkit.org/show_bug.cgi?id=52946
388         
389         SunSpider reports no change.
390
391         * interpreter/RegisterFile.h: No need for a special marking function,
392         since we already expose a start() and end().
393
394         * runtime/Heap.cpp:
395         (JSC::Heap::registerFile):
396         (JSC::Heap::markRoots):
397         * runtime/Heap.h:
398         (JSC::Heap::contains): Migrated markConservatively() to the machine stack
399         marker class. Now, Heap just provides a contains() function, which the
400         machine stack marker uses for checking whether a pointer points into the heap.
401
402         * runtime/MachineStackMarker.cpp:
403         (JSC::MachineStackMarker::markCurrentThreadConservativelyInternal):
404         (JSC::MachineStackMarker::markOtherThreadConservatively):
405         (JSC::isPointerAligned):
406         (JSC::MachineStackMarker::markConservatively):
407         * runtime/MachineStackMarker.h: Move the conservative marking code here.
408
409         * runtime/MarkStack.h:
410         (JSC::ConservativeSet::add):
411         (JSC::ConservativeSet::mark): Changed to using a vector instead of hash
412         set. Vector seems to be a bit faster, and it generates smaller code.
413
414         * runtime/MarkedSpace.cpp:
415         (JSC::MarkedSpace::containsSlowCase):
416         * runtime/MarkedSpace.h:
417         (JSC::MarkedSpace::isCellAligned):
418         (JSC::MarkedSpace::isPossibleCell):
419         (JSC::MarkedSpace::contains): Kept the code for determining whether a
420         pointer pointed into marked space, and moved the code for marking
421         a set of conservative pointers into the machine stack marker.
422
423         * wtf/HashSet.h:
424         (WTF::::add): Added two missing inlines that I noticed while testing
425         vector vs hash set.
426
427 2011-01-21  Mark Rowe  <mrowe@apple.com>
428
429         Reviewed by Sam Weinig.
430
431         Work around a Clang bug <rdar://problem/8876150> that leads to it incorrectly emitting an access
432         control warning when a client tries to use operator bool exposed above via "using PageBlock::operator bool".
433
434         * wtf/PageAllocation.h:
435         (WTF::PageAllocation::operator bool):
436         * wtf/PageReservation.h:
437         (WTF::PageReservation::operator bool):
438
439 2011-01-21  Michael Saboff  <msaboff@apple.com>
440
441         Reviewed by Oliver Hunt.
442
443         [RegexFuzz] Hang with forward assertion
444         https://bugs.webkit.org/show_bug.cgi?id=52825
445         <rdar://problem/8894332>
446
447         The backtrackTo label from the first term in a list of terms is
448         being overwritten by processing of subsequent terms.  Changed
449         copyBacktrackToLabel() to check for an existing bcaktrackTo label
450         before copying and renamed it to propagateBacktrackToLabel() since
451         it no longer copies.
452
453         * yarr/YarrJIT.cpp:
454         (JSC::Yarr::YarrGenerator::BacktrackDestination::propagateBacktrackToLabel):
455         (JSC::Yarr::YarrGenerator::generateParenthesesSingle):
456
457 2011-01-21  Geoffrey Garen  <ggaren@apple.com>
458
459         Reviewed by Sam Weinig.
460
461         Moved the mark stack from global data to the heap, since it pertains
462         to the heap, and not the virtual machine as a whole.
463         https://bugs.webkit.org/show_bug.cgi?id=52930
464         
465         SunSpider reports no change.
466
467         * runtime/Heap.cpp:
468         (JSC::Heap::Heap):
469         (JSC::Heap::markRoots):
470         * runtime/Heap.h:
471         * runtime/JSGlobalData.cpp:
472         (JSC::JSGlobalData::JSGlobalData):
473         * runtime/JSGlobalData.h:
474
475 2011-01-21  Peter Gal  <galpeter@inf.u-szeged.hu>
476
477         Reviewed by Darin Adler.
478
479         REGRESSION(r76177): All JavaScriptCore tests fail on ARM
480         https://bugs.webkit.org/show_bug.cgi?id=52814
481
482         Get the approximateByteSize value before releasing the OwnPtr.
483
484         * parser/JSParser.cpp:
485         (JSC::JSParser::parseFunctionInfo):
486
487 2011-01-21  Xan Lopez  <xlopez@igalia.com>
488
489         Reviewed by Martin Robinson.
490
491         Remove unnecessary <stdio.h> include
492         https://bugs.webkit.org/show_bug.cgi?id=52884
493
494         * jit/JIT.cpp: remove unnecessary include.
495
496 2011-01-20  Ryosuke Niwa  <rniwa@webkit.org>
497
498         Reviewed by Maciej Stachowiak.
499
500         Added OwnPtrCommon.h because OwnArrayPtr::set calls deleteOwnedPtr.
501
502         * wtf/OwnArrayPtr.h:
503
504 2011-01-20  Patrick Gansterer  <paroga@webkit.org>
505
506         Reviewed by Oliver Hunt.
507
508         [WINCE] Remove obsolete JSVALUE32 code
509         https://bugs.webkit.org/show_bug.cgi?id=52450
510
511         Remove the "offset hack" in create_jit_stubs, since we
512         only support JSVALUE32_64 in the meantime.
513
514         * create_jit_stubs: Removed offset argument
515         * jit/JITStubs.cpp:
516
517 2011-01-20  Geoffrey Garen  <ggaren@apple.com>
518
519         Reviewed by Oliver Hunt.
520
521         When marking conservatively, guard against reviving dead objects.
522         https://bugs.webkit.org/show_bug.cgi?id=52840
523         
524         SunSpider and v8 say no change.
525
526         * interpreter/RegisterFile.h:
527         (JSC::RegisterFile::markCallFrames): Updated to use the ConservativeSet API.
528
529         * runtime/Heap.cpp:
530         (JSC::Heap::recordExtraCost): No need to guard against conservative
531         marking reviving dead objects anymore, since the conservative marking
532         mechanism guards against this now.
533
534         (JSC::Heap::markConservatively):
535         (JSC::Heap::markProtectedObjects):
536         (JSC::Heap::markTempSortVectors): Don't drain the mark stack inside a
537         marking function. We want to establish a separation of concerns between
538         visiting roots and draining the mark stack.
539
540         (JSC::Heap::markRoots): Gather the set of conservative references before
541         clearning mark bits, because conservative marking now uses the mark bits
542         to determine if a reference is valid, and avoid reviving dead objects.
543
544         (JSC::Heap::collectAllGarbage): No need to guard against conservative
545         marking reviving dead objects anymore, since the conservative marking
546         mechanism guards against this now.
547
548         * runtime/Heap.h: Updated to use the ConservativeSet API.
549
550         * runtime/MachineStackMarker.cpp:
551         (JSC::MachineStackMarker::markCurrentThreadConservativelyInternal):
552         (JSC::MachineStackMarker::markCurrentThreadConservatively):
553         (JSC::MachineStackMarker::markOtherThreadConservatively):
554         (JSC::MachineStackMarker::markMachineStackConservatively):
555         * runtime/MachineStackMarker.h: Ditto.
556
557         * runtime/MarkStack.h:
558         (JSC::ConservativeSet::add):
559         (JSC::ConservativeSet::mark): Added ConservativeSet, for gathering the
560         set of conservative references. This is different from MarkStack, since
561         we don't mark the set until it is completely gathered.
562
563         * runtime/MarkedSpace.cpp:
564         (JSC::MarkedSpace::freeBlock):
565         (JSC::MarkedSpace::resizeBlocks):
566         (JSC::MarkedSpace::markConservatively):
567         * runtime/MarkedSpace.h: When marking conservatively, guard against
568         reviving dead objects.
569
570 2011-01-20  Siddharth Mathur  <siddharth.mathur@nokia.com>
571
572         Reviewed by Geoffrey Garen.
573
574         [Symbian] Fix StackBounds::initialize()
575         https://bugs.webkit.org/show_bug.cgi?id=52842
576
577         * wtf/StackBounds.cpp:
578         (WTF::StackBounds::initialize): Use TThreadStackInfo.iLimit for stack limit
579
580 2011-01-20  Michael Saboff  <msaboff@apple.com>
581
582         Reviewed by Oliver Hunt.
583
584         <rdar://problem/8890203> [RegexFuzz] Crash in generated code (52773)
585         https://bugs.webkit.org/show_bug.cgi?id=52773
586
587         Fixed case where an existing DataLabelPtr is overwritten.  The
588         replacing DataLabelPtr is now resolved immediately in
589         linkDataLabelToBacktrackIfExists().  Cleanup - eliminated bool
590         return value for the routine as it was never used.
591
592         * yarr/YarrJIT.cpp:
593         (JSC::Yarr::YarrGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists):
594
595 2011-01-20  Andras Becsi  <abecsi@webkit.org>
596
597         Reviewed by Csaba Osztrogonác.
598
599         [Qt][WK2] WebKit2 enabled build fails to link
600
601         Work around undefined reference linking issues until the buildsystem gets redesigned.
602         These issues first occured in minimal builds (see BUG 50519).
603
604         * JavaScriptCore.pri: link as whole-archive for WebKit2 builds
605
606 2011-01-20  Zoltan Horvath  <zoltan@webkit.org>
607
608         Reviewed by Csaba Osztrogonác.
609
610         Refactoring of the custom allocation framework
611         https://bugs.webkit.org/show_bug.cgi?id=49897
612
613         Inheriting from FastAllocBase can result in objects getting larger (bug #33896, #46589).
614         The modification replaces Noncopyable and FastAllocBase classes and these inherits with their
615         equivalent macro implementation at the necessary places.
616
617         * wtf/FastAllocBase.h: Turn FastAllocBase's implementation into a macro.
618
619 2011-01-20  Mark Rowe  <mrowe@apple.com>
620
621         Reviewed by Maciej Stachowiak.
622
623         Follow-up to r75766 / <rdar://problem/5469576>.
624
625         We were failing to initialize the key, causing all sorts of unexpected behavior.
626
627         * wtf/FastMalloc.cpp:
628         (WTF::setThreadHeap):
629         (WTF::TCMalloc_ThreadCache::GetThreadHeap):
630         (WTF::TCMalloc_ThreadCache::InitTSD): Ensure that the key is initialized.
631
632 2011-01-18  Geoffrey Garen  <ggaren@apple.com>
633
634         Reviewed by Darin Adler.
635
636         Rolled back in r76078, with crash fixed.
637         https://bugs.webkit.org/show_bug.cgi?id=52668
638         
639         * runtime/JSGlobalObject.cpp:
640         (JSC::JSGlobalObject::markChildren): Account for the fact that the global
641         object moves its variables into and out of the register file. While out
642         of the register file, the symbol table's size is not an accurate count
643         for the size of the register array, since the BytecodeGenerator might
644         be compiling, adding items to the symbol table.
645         
646 2011-01-18  Darin Adler  <darin@apple.com>
647
648         Reviewed by Geoffrey Garen.
649
650         Stack overflow when converting an Error object to string
651         https://bugs.webkit.org/show_bug.cgi?id=46410
652
653         * Android.mk: Added StringRecursionChecker.cpp and
654         StringRecursionChecker.h.
655         * CMakeLists.txt: Ditto.
656         * GNUmakefile.am: Ditto.
657         * JavaScriptCore.gypi: Ditto.
658         * JavaScriptCore.pro: Ditto.
659         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto.
660         * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
661
662         * runtime/ArrayPrototype.cpp:
663         (JSC::arrayProtoFuncToString): Use StringRecursionChecker instead
664         of the older hand-written code to do the same thing.
665         (JSC::arrayProtoFuncToLocaleString): Ditto.
666         (JSC::arrayProtoFuncJoin): Ditto.
667
668         * runtime/ErrorPrototype.cpp:
669         (JSC::errorProtoFuncToString): Use StringRecursionChecker.
670
671         * runtime/JSGlobalData.h: Renamed arrayVisitedElements to
672         stringRecursionCheckVisitedObjects.
673
674         * runtime/RegExpPrototype.cpp:
675         (JSC::regExpProtoFuncToString): Use StringRecursionChecker.
676
677         * runtime/StringRecursionChecker.cpp: Added.
678         * runtime/StringRecursionChecker.h: Added.
679
680 2011-01-19  Oliver Hunt  <oliver@apple.com>
681
682         Reviewed by Gavin Barraclough.
683
684         Remove non-spec support for callable RegExp
685         https://bugs.webkit.org/show_bug.cgi?id=28285
686
687         Remove support for callable regexps.  If it breaks sites we can
688         just roll this out.
689
690         * runtime/RegExpObject.cpp:
691         * runtime/RegExpObject.h:
692         * tests/mozilla/expected.html: update results.
693
694 2011-01-19  Antti Koivisto  <antti@apple.com>
695
696         Reviewed by Oliver Hunt.
697
698         Cache function offsets to speed up javascript parsing
699         https://bugs.webkit.org/show_bug.cgi?id=52622
700         
701         Use cache to save function offsets and some other info.
702         This avoids quite a bit of work when reparsing the source.
703
704         * parser/ASTBuilder.h:
705         * parser/JSParser.cpp:
706         (JSC::JSParser::CachedFunctionInfo::CachedFunctionInfo):
707         (JSC::JSParser::CachedFunctionInfo::approximateByteSize):
708         (JSC::JSParser::CachedFunctionInfo::closeBraceToken):
709         (JSC::JSParser::Scope::copyCapturedVariablesToVector):
710         (JSC::JSParser::Scope::saveFunctionInfo):
711         (JSC::JSParser::Scope::restoreFunctionInfo):
712         (JSC::JSParser::findCachedFunctionInfo):
713         (JSC::JSParser::JSParser):
714         (JSC::JSParser::parseProgram):
715         (JSC::JSParser::parseFunctionInfo):
716         * parser/Lexer.h:
717         (JSC::Lexer::setOffset):
718         (JSC::Lexer::setLineNumber):
719         (JSC::Lexer::sourceProvider):
720         * parser/SourceProvider.h:
721         (JSC::SourceProviderCache::SourceProviderCache):
722         (JSC::SourceProviderCache::~SourceProviderCache):
723         (JSC::SourceProviderCache::byteSize):
724         (JSC::SourceProviderCache::add):
725         (JSC::SourceProviderCache::get):
726         (JSC::SourceProvider::SourceProvider):
727         (JSC::SourceProvider::~SourceProvider):
728         (JSC::SourceProvider::cache):
729         (JSC::SourceProvider::notifyCacheSizeChanged):
730         (JSC::SourceProvider::cacheSizeChanged):
731         * parser/SyntaxChecker.h:
732
733 2011-01-19  Mark Rowe  <mrowe@apple.com>
734
735         Reviewed by Darin Adler.
736
737         Follow-up to r75766 / <rdar://problem/5469576>.
738
739         * DerivedSources.make: Evaluate the SDKROOT variable correctly.
740
741 2011-01-19  Oliver Hunt  <oliver@apple.com>
742
743         Reviewed by Gavin Barraclough.
744
745         [jsfunfuzz] Defining a function called __proto__ inside an eval triggers an assertion
746         https://bugs.webkit.org/show_bug.cgi?id=52672
747
748         Rather than coming up with a somewhat convoluted mechanism to ensure that
749         developers can override the global objects prototype with a function named
750         __proto__ and expect it to work, we just disallow it at the syntax level.
751
752         * parser/JSParser.cpp:
753         (JSC::JSParser::parseFunctionInfo):
754
755 2011-01-19  Michael Saboff  <msaboff@apple.com>
756
757         Reviewed by Darin Adler.
758
759         <rdar://problem/8882994> Regression: Simple nested backtrack hangs
760         https://bugs.webkit.org/show_bug.cgi?id=52675
761
762         The changeset (r76076) for https://bugs.webkit.org/show_bug.cgi?id=52540
763         broke simple backtracking in some cases.  Reworked that change to 
764         link both jumps and labels.
765
766         * yarr/YarrJIT.cpp:
767         (JSC::Yarr::YarrGenerator::BacktrackDestination::hasBacktrackToLabel):
768         (JSC::Yarr::YarrGenerator::TermGenerationState::propagateBacktrackingFrom):
769         (JSC::Yarr::YarrGenerator::generateParenthesesSingle):
770
771 2011-01-19  Pavel Podivilov  <podivilov@chromium.org>
772
773         Reviewed by Yury Semikhatsky.
774
775         Web Inspector: [JSC] scripts have incorrect starting line (always 1).
776         https://bugs.webkit.org/show_bug.cgi?id=52721
777
778         * debugger/Debugger.cpp:
779         (JSC::Debugger::recompileAllJSFunctions):
780         * debugger/Debugger.h:
781         * parser/Parser.h:
782         (JSC::Parser::parse):
783         * parser/SourceCode.h:
784         (JSC::SourceCode::SourceCode):
785         * parser/SourceProvider.h:
786         (JSC::SourceProvider::startPosition):
787
788 2011-01-19  Csaba Osztrogonác  <ossy@webkit.org>
789
790         Reviewed by Laszlo Gombos and Tor Arne Vestbø.
791
792         [Qt] Remove unnecessary "../Source" from paths
793         after moving source files into Source is finished.
794
795         * JavaScriptCore.pri:
796
797 2011-01-19  Benjamin Kalman  <kalman@chromium.org>
798
799         Reviewed by Darin Adler.
800
801         Don't return void from void function String::split
802         https://bugs.webkit.org/show_bug.cgi?id=52684
803
804         * wtf/text/WTFString.cpp:
805         (WTF::String::split):
806
807 2011-01-18  Kenneth Russell  <kbr@google.com>
808
809         Unreviewed, rolling out r76078.
810         http://trac.webkit.org/changeset/76078
811         https://bugs.webkit.org/show_bug.cgi?id=52668
812
813         Caused crashes of fast/canvas/webgl/constants.html,
814         fast/canvas/webgl/gl-enum-tests.html, and possibly other layout
815         test crashes in Release mode. WebGL crashes were observed with
816         "run-webkit-tests fast/canvas/webgl". It was necessary to run
817         multiple tests to provoke the crash.
818
819         * interpreter/RegisterFile.h:
820         (JSC::RegisterFile::markGlobals):
821         * runtime/JSActivation.cpp:
822         (JSC::JSActivation::markChildren):
823         * runtime/JSGlobalObject.cpp:
824         (JSC::JSGlobalObject::markChildren):
825
826 2011-01-18  Oliver Hunt  <oliver@apple.com>
827
828         Reviewed by Gavin Barraclough.
829
830         [jsfunfuzz] Assertion asking activation for arguments when arguments is overridden
831         https://bugs.webkit.org/show_bug.cgi?id=52690
832
833         Clean up code to retrieve arguments from activation and function objects.
834         Remove the incorrect assertion from JSActivation's argumentsGetter.
835
836         * interpreter/Interpreter.cpp:
837         (JSC::Interpreter::retrieveArguments):
838         * runtime/JSActivation.cpp:
839         (JSC::JSActivation::argumentsGetter):
840
841 2011-01-18  Geoffrey Garen  <ggaren@apple.com>
842
843         Reviewed by Darin Adler.
844
845         Removed RegisterFile::markGlobals because it was obtuse, and it
846         unnecessarily relied on conservative marking.
847         https://bugs.webkit.org/show_bug.cgi?id=52668
848
849         * interpreter/RegisterFile.h: Removed markGlobals.
850
851         * runtime/JSActivation.cpp:
852         (JSC::JSActivation::markChildren): Added a comment explaning why some
853         JSActivations don't always mark their registers arrays.
854
855         * runtime/JSGlobalObject.cpp:
856         (JSC::JSGlobalObject::markChildren): Instead of calling markGlobals, mark
857         the registers array directly.
858
859 2011-01-18  Michael Saboff  <msaboff@apple.com>
860
861         Reviewed by Oliver Hunt.
862
863         <rdar://problem/8875432> Regression: Some text-only e-mails cause hang beneath RegExp::match (52540)
864         https://bugs.webkit.org/show_bug.cgi?id=52540
865         https://bugs.webkit.org/show_bug.cgi?id=52662
866
867         Directly use backtrack label with parentheses nested under a
868         non-capturing parentheses.  Also linked current parentheses
869         tail code object for possible parens nested within a non-capturing
870         parentheses.
871
872         * yarr/YarrJIT.cpp:
873         (JSC::Yarr::YarrGenerator::BacktrackDestination::linkBacktrackToLabel):
874         (JSC::Yarr::YarrGenerator::generateParenthesesSingle):
875
876 2011-01-18  Daniel Bates  <dbates@rim.com>
877
878         Reviewed by Gavin Barraclough.
879
880         Only use moving memory model assumption in ExecutableAllocator::intializePageSize() for Symbian OS
881         https://bugs.webkit.org/show_bug.cgi?id=52517
882
883         Patch by David Tapuska
884
885         Currently, we compile code with respect to the Symbian-specific moving memory model
886         assumption for all ARMv5 or lower architectures. Instead, we should only compile
887         such code when building for Symbian OS on those architectures because this model
888         is Symbian-specific.
889
890         * jit/ExecutableAllocator.cpp:
891         (JSC::ExecutableAllocator::intializePageSize):
892
893 2011-01-18  Dimitry Andric  <dim@freebsd.org>
894
895         Reviewed by Andreas Kling.
896
897         Fix linking JavaScriptCore on FreeBSD/amd64
898         https://bugs.webkit.org/show_bug.cgi?id=52591
899
900         Linking of JavaScriptCore on FreeBSD/amd64 fails, for the same reason as
901         in bug 28422: cti_vm_throw needs a "@plt" suffix, otherwise the linker
902         complains about the relocation type.
903
904         * jit/JITStubs.cpp: use @plt suffix on x86_64 platforms, for both Linux
905         and FreeBSD.
906
907 2011-01-18  Oliver Hunt  <oliver@apple.com>
908
909         Reviewed by Antti Koivisto.
910
911         [jsfunfuzz] Assertion in codegen for array of NaN constants
912         https://bugs.webkit.org/show_bug.cgi?id=52643
913
914         Don't cache NaN literals in the code generator, as NaN doesn't compare
915         as equal to itself it causes problems when rehashing the number cache.
916
917         * bytecompiler/BytecodeGenerator.cpp:
918         (JSC::BytecodeGenerator::emitLoad):
919
920 2011-01-17  Jarred Nicholls  <jarred@sencha.com>
921
922         Reviewed by Csaba Osztrogonác.
923
924         REGRESSION(r75709): Return value of fscanf() shouldn't be ignored.
925         https://bugs.webkit.org/show_bug.cgi?id=52585
926         
927         gcc 4.4.4+ has warn_unused_value attribute on fscanf, so we should check
928         the return value to get around the gcc warning
929
930         * jit/ExecutableAllocatorFixedVMPool.cpp:
931         (JSC::maybeModifyVMPoolSize):
932
933 2011-01-17  Michael Saboff  <msaboff@apple.com>
934
935         Reviewed by Oliver Hunt.
936
937         [regexfuzz] Crash running regex with lookahead
938         https://bugs.webkit.org/show_bug.cgi?id=52548
939
940         Eliminated agressive chaining of backtracks.  This code was overwriting
941         already valid backtrack information.
942
943         * yarr/YarrJIT.cpp:
944         (JSC::Yarr::YarrGenerator::ParenthesesTail::processBacktracks):
945
946 2011-01-17  Tony Gentilcore  <tonyg@chromium.org>
947
948         Reviewed by Alexey Proskuryakov.
949
950         Fix some headers with missing or misspelled #ifndef guards
951         https://bugs.webkit.org/show_bug.cgi?id=52545
952
953         * wtf/RefPtrHashMap.h:
954
955 2011-01-17  Dan Bernstein  <mitz@apple.com>
956
957         Rubber-stamped by Mark Rowe.
958
959         Update xcodeproj svn:ignore to include xcuserdata.
960
961         * JavaScriptCore.xcodeproj: Modified property svn:ignore.
962
963 2011-01-16  Adam Barth  <abarth@webkit.org>
964
965         Rubber-stamped by Eric Seidel.
966
967         Move WebKit into Source
968         https://bugs.webkit.org/show_bug.cgi?id=52530
969
970         * JavaScriptCore.gyp/JavaScriptCore.gyp:
971
972 2011-01-16  Oliver Hunt  <oliver@apple.com>
973
974         Reviewed by Sam Weinig.
975
976         [jsfunfuzz] Parser doesn't correctly validate for-loop syntax
977         https://bugs.webkit.org/show_bug.cgi?id=52516
978
979         Ensure that we always check for a semicolon after encountering
980         multiple declarations in the initialiser portion of a for-loop.
981
982         * parser/JSParser.cpp:
983         (JSC::JSParser::parseForStatement):
984
985 2011-01-16  Oliver Hunt  <oliver@apple.com>
986
987         Reviewed by Geoffrey Garen.
988
989         Strict mode restrictions on arguments and eval usage aren't complete
990         https://bugs.webkit.org/show_bug.cgi?id=52528
991
992         Fix a few bugs in strict mode where we incorrect allow mutation of
993         arguments and eval in the parser.
994
995         Alas the "optimisation" used by the syntax checker for validating
996         binary and unary expressions was too aggressive: we do actually need
997         a stack for operations and operands although it needn't be as complete
998         as that used for the full AST builder.
999
1000         Also disallow assignment to arguments in all cases as allowing arguments
1001         to be assignable is always an error in strict mode, regardless of context.
1002
1003         * parser/ASTBuilder.h:
1004         (JSC::ASTBuilder::BinaryExprContext::BinaryExprContext):
1005         (JSC::ASTBuilder::UnaryExprContext::UnaryExprContext):
1006         * parser/JSParser.cpp:
1007         (JSC::JSParser::parseAssignmentExpression):
1008         (JSC::JSParser::parseBinaryExpression):
1009         (JSC::JSParser::parseUnaryExpression):
1010         * parser/SyntaxChecker.h:
1011         (JSC::SyntaxChecker::BinaryExprContext::BinaryExprContext):
1012         (JSC::SyntaxChecker::BinaryExprContext::~BinaryExprContext):
1013         (JSC::SyntaxChecker::UnaryExprContext::UnaryExprContext):
1014         (JSC::SyntaxChecker::UnaryExprContext::~UnaryExprContext):
1015         (JSC::SyntaxChecker::appendBinaryExpressionInfo):
1016         (JSC::SyntaxChecker::operatorStackPop):
1017
1018 2011-01-15  Geoffrey Garen  <ggaren@apple.com>
1019
1020         Reviewed by Oliver Hunt.
1021
1022         Rolled back in r75886.
1023         https://bugs.webkit.org/show_bug.cgi?id=52527
1024         
1025         r75886 broke the GTK Linux bot because Linux was -- quite surprisingly --
1026         set up to use the constants for embedded devices.
1027
1028         * jit/ExecutableAllocatorFixedVMPool.cpp:
1029         (JSC::maybeModifyVMPoolSize): Separated Linux constants from embedded
1030         constants.
1031
1032 2011-01-15  Sheriff Bot  <webkit.review.bot@gmail.com>
1033
1034         Unreviewed, rolling out r75886.
1035         http://trac.webkit.org/changeset/75886
1036         https://bugs.webkit.org/show_bug.cgi?id=52526
1037
1038         "Broke GTK+ 64bit" (Requested by xan_ on #webkit).
1039
1040         * jit/ExecutableAllocatorFixedVMPool.cpp:
1041
1042 2011-01-15  Geoffrey Garen  <ggaren@apple.com>
1043
1044         Reviewed by Sam Weinig.
1045
1046         <rdar://problem/8870429> Shrink the executable pool on embedded devices
1047
1048         * jit/ExecutableAllocatorFixedVMPool.cpp: Dropped the pool size from 32MB
1049         to 16MB.
1050
1051 2011-01-15  Oliver Hunt  <oliver@apple.com>
1052
1053         Reviewed by Maciej Stachowiak.
1054
1055         Incorrect behavior changing attributes of an accessor
1056         https://bugs.webkit.org/show_bug.cgi?id=52515
1057
1058         defineProperty doesn't correctly handle changing attributes of an accessor
1059         property.  This is because we don't pass the full descriptor to the 
1060         putDescriptor helper function, which means we have insufficient information
1061         to do the right thing. Once that's passed the correct behavior is relatively
1062         simple to implement.
1063
1064         * runtime/JSObject.cpp:
1065         (JSC::putDescriptor):
1066         (JSC::JSObject::defineOwnProperty):
1067
1068 2011-01-14  Oliver Hunt  <oliver@apple.com>
1069
1070         Reviewed by Maciej Stachowiak.
1071
1072         [jsfunfuzz] Incorrect handling of consecutive duplicate labels
1073         https://bugs.webkit.org/show_bug.cgi?id=52505
1074
1075         Compare StringImpl*'s instead of Identifier*'s when looking for duplicate
1076         labels.
1077
1078         * parser/JSParser.cpp:
1079         (JSC::JSParser::parseExpressionOrLabelStatement):
1080
1081 2011-01-14  Simon Fraser  <simon.fraser@apple.com>
1082
1083         No review.
1084         
1085         Initialize m_operationInProgress after r75855.
1086
1087         * runtime/Heap.cpp:
1088         (JSC::Heap::Heap):
1089
1090 2011-01-14  Geoffrey Garen  <ggaren@apple.com>
1091
1092         Reverted accidentally committed code from my last checkin.
1093
1094         * runtime/Heap.cpp:
1095         (JSC::Heap::markRoots):
1096
1097 2011-01-14  Geoffrey Garen  <ggaren@apple.com>
1098
1099         Reviewed by Sam Weinig.
1100         
1101         Try to fix the GTK bot.
1102
1103         * runtime/Heap.cpp:
1104         (JSC::Heap::Heap):
1105         (JSC::Heap::markRoots): Kids, remember to initialize your data members.
1106         Knowing is half the battle.
1107
1108 2011-01-14  Oliver Hunt  <oliver@apple.com>
1109
1110         Reviewed by Stephanie Lewis.
1111
1112         [jsfunfuzz] We should be clearing the lexers temporary character buffers when switching to strict mode
1113         https://bugs.webkit.org/show_bug.cgi?id=52501
1114
1115         Clear the temporary character buffers used for reading escaped characters and
1116         numbers.
1117
1118         * parser/Lexer.h:
1119         (JSC::Lexer::setOffset):
1120
1121 2011-01-14  Geoffrey Garen  <ggaren@apple.com>
1122
1123         Try to fix non-Dtrace builds: #include Tracing.h instead of TracingDtrace.h.
1124
1125         * runtime/Heap.cpp:
1126
1127 2011-01-13  Geoffrey Garen  <ggaren@apple.com>
1128
1129         Reviewed by Oliver Hunt.
1130
1131         Split out a MarkedSpace strategy object from Heap.
1132         https://bugs.webkit.org/show_bug.cgi?id=52421
1133         
1134         SunSpider reports no change.
1135
1136         * Android.mk:
1137         * CMakeLists.txt:
1138         * GNUmakefile.am:
1139         * JavaScriptCore.gypi:
1140         * JavaScriptCore.pro:
1141         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1142         * JavaScriptCore.xcodeproj/project.pbxproj: Updated our 7 build systems. Which is cool.
1143
1144         * runtime/Heap.cpp:
1145         (JSC::Heap::Heap):
1146         (JSC::Heap::destroy):
1147         (JSC::Heap::recordExtraCost):
1148         (JSC::Heap::allocate):
1149         (JSC::Heap::markConservatively):
1150         (JSC::Heap::markRoots):
1151         (JSC::Heap::objectCount):
1152         (JSC::Heap::statistics):
1153         (JSC::Heap::size):
1154         (JSC::Heap::isBusy):
1155         (JSC::Heap::collectAllGarbage):
1156         (JSC::Heap::primaryHeapBegin):
1157         (JSC::Heap::primaryHeapEnd):
1158         * runtime/Heap.h:
1159         (JSC::Heap::globalData):
1160         (JSC::Heap::markedSpace):
1161         (JSC::Heap::isCellMarked):
1162         (JSC::Heap::checkMarkCell):
1163         (JSC::Heap::markCell): Moved all code pertaining to managing chunks of
1164         collector memory out of this class. Heap now just delegates to MarkedSpace.
1165
1166         * runtime/JSCell.h:
1167         (JSC::JSCell::Heap::heap): Updated for MarkedSpace delegation.
1168
1169         * runtime/JSValue.h: Moved the ValueStringPair typedef to help with #includes.
1170
1171         * runtime/MarkedSpace.cpp: Copied from runtime/Heap.cpp.
1172         (JSC::MarkedSpace::MarkedSpace):
1173         (JSC::MarkedSpace::destroy):
1174         (JSC::MarkedSpace::allocateBlock):
1175         (JSC::MarkedSpace::freeBlock):
1176         (JSC::MarkedSpace::allocate):
1177         (JSC::MarkedSpace::resizeBlocks):
1178         (JSC::MarkedSpace::growBlocks):
1179         (JSC::MarkedSpace::shrinkBlocks):
1180         (JSC::MarkedSpace::markConservatively):
1181         (JSC::MarkedSpace::clearMarkBits):
1182         (JSC::MarkedSpace::markedCells):
1183         (JSC::MarkedSpace::sweep):
1184         (JSC::MarkedSpace::objectCount):
1185         (JSC::MarkedSpace::addToStatistics):
1186         (JSC::MarkedSpace::statistics):
1187         (JSC::MarkedSpace::size):
1188         (JSC::MarkedSpace::reset):
1189         (JSC::MarkedSpace::primaryHeapBegin):
1190         (JSC::MarkedSpace::primaryHeapEnd):
1191         * runtime/MarkedSpace.h: Copied from runtime/Heap.h.
1192         (JSC::MarkedSpace::globalData):
1193         (JSC::MarkedSpace::didShrink):
1194         (JSC::MarkedSpace::cellBlock):
1195         (JSC::MarkedSpace::cellOffset):
1196         (JSC::MarkedSpace::isCellMarked):
1197         (JSC::MarkedSpace::checkMarkCell):
1198         (JSC::MarkedSpace::markCell): Moved all code pertaining to managing chunks of
1199         collector memory into this class.
1200
1201         * runtime/MemoryStatistics.cpp:
1202         (JSC::heapStatistics):
1203         * runtime/MemoryStatistics.h: Updated for MarkedSpace delegation.
1204
1205 2011-01-14  Oliver Hunt  <oliver@apple.com>
1206
1207         Reviewed by Gavin Barraclough.
1208
1209         [jsfunfuzz] parser doesn't enforce continue restrictions correctly.
1210         https://bugs.webkit.org/show_bug.cgi?id=52493
1211
1212         This patch reworks handling of break, continue and label statements
1213         to correctly handle all the valid and invalid cases.  Previously certain
1214         errors would be missed by the parser in strict mode, but the bytecode 
1215         generator needed to handle those cases for non-strict code so nothing
1216         failed, it simply became non-standard behaviour.
1217
1218         Now that we treat break and continue errors as early faults in non-strict
1219         mode as well that safety net has been removed so the parser bugs result in
1220         crashes at codegen time.
1221
1222         * parser/JSParser.cpp:
1223         (JSC::JSParser::ScopeLabelInfo::ScopeLabelInfo):
1224         (JSC::JSParser::next):
1225         (JSC::JSParser::nextTokenIsColon):
1226         (JSC::JSParser::continueIsValid):
1227             Continue is only valid in loops so we can't use breakIsValid()
1228         (JSC::JSParser::pushLabel):
1229             We now track whether the label is for a loop (and is therefore a
1230             valid target for continue.
1231         (JSC::JSParser::popLabel):
1232         (JSC::JSParser::getLabel):
1233             Replace hasLabel with getLabel so that we can validate the target
1234             when parsing continue statements.
1235         (JSC::JSParser::Scope::continueIsValid):
1236         (JSC::JSParser::Scope::pushLabel):
1237         (JSC::JSParser::Scope::getLabel):
1238         (JSC::JSParser::JSParser):
1239         (JSC::JSParser::parseBreakStatement):
1240         (JSC::JSParser::parseContinueStatement):
1241         (JSC::LabelInfo::LabelInfo):
1242         (JSC::JSParser::parseExpressionOrLabelStatement):
1243             Consecutive labels now get handled iteratively so that we can determine
1244             whether they're valid targets for continue.
1245         * parser/Lexer.cpp:
1246         (JSC::Lexer::nextTokenIsColon):
1247         * parser/Lexer.h:
1248         (JSC::Lexer::setOffset):
1249
1250 2011-01-14  Patrick Gansterer  <paroga@webkit.org>
1251
1252         Reviewed by Adam Roben.
1253
1254         Use the Windows thread pool instead of an extra thread for FastMalloc scavenging
1255         https://bugs.webkit.org/show_bug.cgi?id=45186
1256
1257         * wtf/FastMalloc.cpp:
1258         (WTF::TCMalloc_PageHeap::scheduleScavenger): Added missing this pointer to CreateTimerQueueTimer().
1259
1260 2011-01-14  Patrick Gansterer  <paroga@webkit.org>
1261
1262         Reviewed by Adam Roben.
1263
1264         Use the Windows thread pool instead of an extra thread for FastMalloc scavenging
1265         https://bugs.webkit.org/show_bug.cgi?id=45186
1266
1267         r75819 accidentally changed the initial state of the scavenge timer.
1268
1269         * wtf/FastMalloc.cpp:
1270         (WTF::TCMalloc_PageHeap::initializeScavenger): Changed initial state of m_scavengingSuspended to true.
1271
1272 2011-01-14  Patrick Gansterer  <paroga@webkit.org>
1273
1274         Unreviewed Windows Release build fix.
1275
1276         * wtf/FastMalloc.cpp:
1277         (WTF::TCMalloc_PageHeap::scavengerTimerFired):
1278
1279 2011-01-14  Patrick Gansterer  <paroga@webkit.org>
1280
1281         Unreviewed Windows Release build fix.
1282
1283         * wtf/FastMalloc.cpp:
1284         (WTF::TCMalloc_PageHeap::scavengerTimerFired):
1285
1286 2011-01-14  Patrick Gansterer  <paroga@webkit.org>
1287
1288         Reviewed by Adam Roben.
1289
1290         Use the Windows thread pool instead of an extra thread for FastMalloc scavenging
1291         https://bugs.webkit.org/show_bug.cgi?id=45186
1292
1293         Use CreateTimerQueueTimer() to start periodicScavenge() and stop it with DeleteTimerQueueTimer().
1294
1295         * wtf/FastMalloc.cpp:
1296         (WTF::TCMalloc_PageHeap::initializeScavenger):
1297         (WTF::TCMalloc_PageHeap::isScavengerSuspended):
1298         (WTF::TCMalloc_PageHeap::scheduleScavenger):
1299         (WTF::TCMalloc_PageHeap::rescheduleScavenger):
1300         (WTF::TCMalloc_PageHeap::suspendScavenger):
1301         (WTF::scavengerTimerFired):
1302         (WTF::TCMalloc_PageHeap::periodicScavenge):
1303         (WTF::TCMalloc_PageHeap::signalScavenger):
1304
1305 2011-01-14  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1306
1307         Reviewed by Kenneth Rohde Christiansen.
1308
1309         Align import/export directives
1310         https://bugs.webkit.org/show_bug.cgi?id=52208
1311
1312         * API/JSBase.h: Align import/export directives with
1313         WebKit2/Shared/API/c/WKBase.h
1314
1315 2011-01-14  Michael Saboff  <msaboff@apple.com>
1316
1317         Reviewed by Oliver Hunt.
1318
1319         Incorrect backtracking for nested alternatives
1320         https://bugs.webkit.org/show_bug.cgi?id=52387
1321
1322         In the process of propigating a datalabel it wasn't getting connected
1323         to a destination when the destination was an indirect jump.  Added
1324         code to recognize a direct backtrack destination that was an indirect
1325         jump and added mechanism to associate DataLabelPtrs with indirect
1326         jump entries.
1327         Removed dead method
1328         BacktrackDestination::linkDataLabelToHereIfExists()
1329
1330         * yarr/YarrJIT.cpp:
1331         (JSC::Yarr::YarrGenerator::IndirectJumpEntry::IndirectJumpEntry):
1332         (JSC::Yarr::YarrGenerator::IndirectJumpEntry::addDataLabel):
1333         (JSC::Yarr::YarrGenerator::GenerationState::addIndirectJumpEntry):
1334         (JSC::Yarr::YarrGenerator::GenerationState::emitIndirectJumpTable):
1335         Changes to link indirect jumps with DataLabelPtr's.
1336         (JSC::Yarr::YarrGenerator::BacktrackDestination::clearSubDataLabelPtr):
1337         (JSC::Yarr::YarrGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists): 
1338         Updated to handle immediate linking of indirect jumps to
1339         DataLabelPtr.
1340         (JSC::Yarr::YarrGenerator::generateParenthesesDisjunction): Changed to
1341         reflect updated linkDataLabelToBacktrackIfExists().
1342
1343 2011-01-14  Pavel Podivilov  <podivilov@chromium.org>
1344
1345         Reviewed by Yury Semikhatsky.
1346
1347         Web Inspector: provide script column offset to frontend.
1348         https://bugs.webkit.org/show_bug.cgi?id=52377
1349
1350         * parser/SourceCode.h:
1351         (JSC::SourceCode::SourceCode):
1352         (JSC::SourceCode::firstColumn):
1353
1354 2011-01-13  Darin Adler  <darin@apple.com>
1355
1356         Reviewed by Geoff Garen.
1357
1358         <rdar://problem/5469576> Use __PTK_FRAMEWORK_JAVASCRIPTCORE_KEY0 if available.
1359
1360         * DerivedSources.make: Create a header file, HeaderDetection.h, that tells
1361         us whether pthread_machdep.h is available.
1362         * wtf/FastMalloc.cpp: If __PTK_FRAMEWORK_JAVASCRIPTCORE_KEY0 is available, then
1363         don't do the pthread_getspecific_function_pointer trick.
1364         (WTF::setThreadHeap): Ditto, but set thread-specific data.
1365         (WTF::TCMalloc_ThreadCache::GetThreadHeap): Ditto, but get rather than set.
1366
1367 2011-01-13  Xan Lopez  <xlopez@igalia.com>
1368
1369         Reviewed by Gavin Barraclough.
1370
1371         JIT requires VM overcommit (particularly on x86-64), Linux does not by default support this without swap?
1372         https://bugs.webkit.org/show_bug.cgi?id=42756
1373
1374         The FixedVMPool Allocator does not work well on systems where
1375         allocating very large amounts of memory upfront is not reasonable,
1376         like Linux without overcommit enabled. As a workaround, on Linux,
1377         default to the values used in embedded environments (in the MB
1378         range), and only jump to the GB range if we detect at runtime that
1379         overcommit is enabled. Should fix crashes on Linux/x86_64 with
1380         less than 3 or 4GB of RAM.
1381
1382         * jit/ExecutableAllocatorFixedVMPool.cpp:
1383         (JSC::FixedVMPoolAllocator::free): use new variables for VM pool
1384         size and coalesce limit.
1385         (JSC::ExecutableAllocator::isValid): swap the variables from
1386         embedded to generic values at runtime, on linux, if overcommit is
1387         enabled.
1388         (JSC::ExecutableAllocator::underMemoryPressure): use new variables
1389         for VM pool size and coalesce limit.
1390
1391 2011-01-12  Xan Lopez  <xlopez@igalia.com>
1392
1393         Reviewed by Martin Robinson.
1394
1395         Add new Yarr.h header to the list file.
1396
1397         * GNUmakefile.am: ditto.
1398
1399 2011-01-12  Martin Robinson  <mrobinson@igalia.com>
1400
1401         Missing Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h in WebKitGtk tarball
1402         https://bugs.webkit.org/show_bug.cgi?id=52299
1403
1404         * GNUmakefile.am: Fix the GTK+ build on ARMv7 by including missing source
1405         files in the source list.
1406
1407 2011-01-12  Peter Varga  <pvarga@webkit.org>
1408
1409         Reviewed by Gavin Barraclough.
1410
1411         Add Yarr.h to YARR
1412         https://bugs.webkit.org/show_bug.cgi?id=51021
1413
1414         Move other common constants and functions from YARR's different files
1415         to Yarr.h.
1416         Use Yarr.h header instead of including other YARR headers where it
1417         is possible.
1418
1419         * JavaScriptCore.gypi:
1420         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1421         * JavaScriptCore.xcodeproj/project.pbxproj:
1422         * runtime/RegExp.cpp:
1423         * yarr/Yarr.h: Added.
1424         * yarr/YarrInterpreter.cpp:
1425         * yarr/YarrInterpreter.h:
1426         * yarr/YarrJIT.cpp:
1427         (JSC::Yarr::jitCompile):
1428         (JSC::Yarr::execute):
1429         * yarr/YarrJIT.h:
1430         * yarr/YarrParser.h:
1431         * yarr/YarrPattern.cpp:
1432         (JSC::Yarr::YarrPattern::compile):
1433         (JSC::Yarr::YarrPattern::YarrPattern):
1434         * yarr/YarrPattern.h:
1435
1436 2011-01-12  Sheriff Bot  <webkit.review.bot@gmail.com>
1437
1438         Unreviewed, rolling out r75595.
1439         http://trac.webkit.org/changeset/75595
1440         https://bugs.webkit.org/show_bug.cgi?id=52286
1441
1442         It broke fast/regex/pcre-test-1.html (Requested by Ossy on
1443         #webkit).
1444
1445         * JavaScriptCore.gypi:
1446         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1447         * JavaScriptCore.xcodeproj/project.pbxproj:
1448         * runtime/RegExp.cpp:
1449         * yarr/Yarr.h: Removed.
1450         * yarr/YarrInterpreter.cpp:
1451         * yarr/YarrInterpreter.h:
1452         * yarr/YarrJIT.cpp:
1453         (JSC::Yarr::jitCompile):
1454         * yarr/YarrJIT.h:
1455         (JSC::Yarr::execute):
1456         * yarr/YarrParser.h:
1457         * yarr/YarrPattern.cpp:
1458         (JSC::Yarr::compile):
1459         (JSC::Yarr::YarrPattern::YarrPattern):
1460         * yarr/YarrPattern.h:
1461
1462 2011-01-12  Peter Varga  <pvarga@webkit.org>
1463
1464         Reviewed by Gavin Barraclough.
1465
1466         Add Yarr.h to YARR
1467         https://bugs.webkit.org/show_bug.cgi?id=51021
1468
1469         Move other common constants and functions from YARR's different files
1470         to Yarr.h.
1471         Use Yarr.h header instead of including other YARR headers where it
1472         is possible.
1473
1474         * JavaScriptCore.gypi:
1475         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1476         * JavaScriptCore.xcodeproj/project.pbxproj:
1477         * runtime/RegExp.cpp:
1478         * yarr/Yarr.h: Added.
1479         * yarr/YarrInterpreter.cpp:
1480         * yarr/YarrInterpreter.h:
1481         * yarr/YarrJIT.cpp:
1482         (JSC::Yarr::jitCompile):
1483         (JSC::Yarr::execute):
1484         * yarr/YarrJIT.h:
1485         * yarr/YarrParser.h:
1486         * yarr/YarrPattern.cpp:
1487         (JSC::Yarr::YarrPattern::compile):
1488         (JSC::Yarr::YarrPattern::YarrPattern):
1489         * yarr/YarrPattern.h:
1490
1491 2011-01-11  Michael Saboff  <msaboff@apple.com>
1492
1493         Reviewed by Geoffrey Garen.
1494
1495         Missing call to popTempSortVector() for exception case in JSArray::sort.
1496         https://bugs.webkit.org/show_bug.cgi?id=50718
1497
1498         Fix to patch of 50718 that added pushTempSortVector() and 
1499         popTempSortVector() to JSArray::sort() to mark elements during sort.
1500         Need to add popTempSortVector() for the return case if toString()
1501         had an exception.
1502
1503         * runtime/JSArray.cpp:
1504         (JSC::JSArray::sort): Added popTempSortVector()
1505
1506 2011-01-11  Xan Lopez  <xlopez@igalia.com>
1507
1508         Reviewed by Darin Adler.
1509
1510         Microoptimization in ~JSString
1511         https://bugs.webkit.org/show_bug.cgi?id=52222
1512
1513         The case where m_fibers is 0 seems to be the most common one
1514         (almost 1/2 of the time, followed at some distance by m_fibers = 1
1515         in 1/4 of the cases in a typical SunSpider execution). We can save
1516         one comparison in this common case by doing a bit of refactoring
1517         in the JSString destructor; overall a 0.3% progression, but only
1518         the string tests show improvement.
1519
1520         * runtime/JSString.h:
1521         (JSC::RopeBuilder::~JSString):
1522
1523 2011-01-10  Michael Saboff  <msaboff@apple.com>
1524
1525         Reviewed by Geoffrey Garen.
1526
1527         ASSERTION Failure in JSC::binaryChop
1528         https://bugs.webkit.org/show_bug.cgi?id=25614
1529
1530         Changed JITStubs::cti_register_file_check() to use the current stack's
1531         return PC to find the bytecode for handling the exception in the prior
1532         frame.  Also added the appropriate arrity check routine call to the
1533         JIT to bytecode vector (m_callReturnIndexVector) in the CodeBlock.
1534
1535         * jit/JIT.cpp:
1536         (JSC::JIT::privateCompile): Changed the arrity check call location
1537         so that it gets added to the m_calls list so that it's included in
1538         CodeBlock::m_callReturnIndexVector.
1539         * jit/JITStubs.cpp:
1540         (JSC::DEFINE_STUB_FUNCTION): Use the current call frame's return PC.
1541
1542 2011-01-10  Daniel Bates  <dbates@rim.com>
1543
1544         Reviewed by Martin Robinson.
1545
1546         Remove extraneous COMPILER(GCC) condition when checking GCC_VERSION_AT_LEAST()
1547         https://bugs.webkit.org/show_bug.cgi?id=52178
1548
1549         It is sufficient to test GCC_VERSION_AT_LEAST() instead of both COMPILER(GCC) and
1550         GCC_VERSION_AT_LEAST(). Notice GCC_VERSION_AT_LEAST() is defined to be 0 when we
1551         are not compiling with GCC.
1552
1553         Fixes style issues at the callsites (i.e. replace comma with comma-space in
1554         macro function argument list). Also, makes a spelling correction in a comment.
1555
1556         * jit/ExecutableAllocator.h:
1557         (JSC::ExecutableAllocator::cacheFlush):
1558         * wtf/Platform.h:
1559
1560 2011-01-10  Geoffrey Garen  <ggaren@apple.com>
1561
1562         Build fix: removed some uses of nextNumber that I missed last time.
1563
1564         * runtime/Heap.cpp:
1565         (JSC::Heap::reset):
1566         (JSC::Heap::collectAllGarbage):
1567
1568 2011-01-10  Daniel Bates  <dbates@rim.com>
1569
1570         Reviewed by Darin Adler.
1571
1572         Use __builtin_expect when compiling using RVCT in GNU mode
1573         https://bugs.webkit.org/show_bug.cgi?id=51866
1574
1575         We should only use __builtin_expect if we are compiling with GCC or RVCT 3 or higher in GNU mode
1576         as pointed out by Siddharth Mathur per <http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0202h/Cjabddedbde.html>.
1577
1578         * wtf/AlwaysInline.h:
1579         * wtf/Platform.h: Removed define WTF_COMPILER_RVCT4_OR_GREATER. Instead added macro
1580         function RVCT_VERSION_AT_LEAST so that we can test for an arbitrary minimum RVCT
1581         version.
1582
1583 2011-01-10  Geoffrey Garen  <ggaren@apple.com>
1584
1585         Reviewed by Oliver Hunt.
1586
1587         Moved Collector.* => Heap.*, since the file contains a class named "Heap".
1588
1589         * API/JSCallbackObject.cpp:
1590         * Android.mk:
1591         * CMakeLists.txt:
1592         * GNUmakefile.am:
1593         * JavaScriptCore.gypi:
1594         * JavaScriptCore.pro:
1595         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1596         * JavaScriptCore.xcodeproj/project.pbxproj:
1597         * interpreter/Interpreter.cpp:
1598         * interpreter/RegisterFile.h:
1599         * jit/JITStubs.cpp:
1600         * runtime/Collector.cpp: Removed.
1601         * runtime/Collector.h: Removed.
1602         * runtime/CollectorHeapIterator.h:
1603         * runtime/GCActivityCallbackCF.cpp:
1604         * runtime/Heap.cpp: Copied from JavaScriptCore/runtime/Collector.cpp.
1605         * runtime/Heap.h: Copied from JavaScriptCore/runtime/Collector.h.
1606         * runtime/InitializeThreading.cpp:
1607         * runtime/JSCell.h:
1608         * runtime/JSGlobalData.cpp:
1609         * runtime/JSGlobalData.h:
1610         * runtime/JSLock.cpp:
1611         * runtime/JSNumberCell.h:
1612         * runtime/MachineStackMarker.cpp:
1613         * runtime/MemoryStatistics.h:
1614         * runtime/Protect.h:
1615         * runtime/UString.cpp:
1616         * runtime/WeakGCMap.h:
1617         * runtime/WeakGCPtr.h:
1618
1619 2011-01-10  Xan Lopez  <xlopez@igalia.com>
1620
1621         Reviewed by Gavin Barraclough.
1622
1623         Remove unused isString() case in JSString::toPrimitiveString()
1624         https://bugs.webkit.org/show_bug.cgi?id=52167
1625
1626         We never call toPrimitiveString() with strings, so remove the
1627         check and add an ASSERT ensuring this never happens. 0.7% overall
1628         progression in sunspider, since one of the call sites is very hot.
1629
1630         * runtime/JSString.h:
1631         (JSC::JSValue::toPrimitiveString):
1632
1633 2011-01-10  Peter Varga  <pvarga@inf.u-szeged.hu>
1634
1635         Reviewed by Gavin Barraclough.
1636
1637         Rename the existing YARR files and classes
1638         https://bugs.webkit.org/show_bug.cgi?id=51872
1639
1640         Replace the "Regex" prefix with "Yarr" in the name of YARR files and classes.
1641
1642         * Android.mk:
1643         * CMakeLists.txt:
1644         * GNUmakefile.am:
1645         * JavaScriptCore.gypi:
1646         * JavaScriptCore.pro:
1647         * JavaScriptCore.xcodeproj/project.pbxproj:
1648         * runtime/RegExp.cpp:
1649         (JSC::RegExp::compile):
1650         (JSC::RegExp::match):
1651         (JSC::RegExp::printTraceData):
1652         * yarr/YarrInterpreter.cpp: Renamed from Source/JavaScriptCore/yarr/RegexInterpreter.cpp.
1653         (JSC::Yarr::Interpreter::appendParenthesesDisjunctionContext):
1654         (JSC::Yarr::Interpreter::popParenthesesDisjunctionContext):
1655         (JSC::Yarr::Interpreter::DisjunctionContext::DisjunctionContext):
1656         (JSC::Yarr::Interpreter::DisjunctionContext::operator new):
1657         (JSC::Yarr::Interpreter::allocDisjunctionContext):
1658         (JSC::Yarr::Interpreter::freeDisjunctionContext):
1659         (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::ParenthesesDisjunctionContext):
1660         (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::operator new):
1661         (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::restoreOutput):
1662         (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::getDisjunctionContext):
1663         (JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext):
1664         (JSC::Yarr::Interpreter::freeParenthesesDisjunctionContext):
1665         (JSC::Yarr::Interpreter::InputStream::InputStream):
1666         (JSC::Yarr::Interpreter::InputStream::next):
1667         (JSC::Yarr::Interpreter::InputStream::rewind):
1668         (JSC::Yarr::Interpreter::InputStream::read):
1669         (JSC::Yarr::Interpreter::InputStream::readPair):
1670         (JSC::Yarr::Interpreter::InputStream::readChecked):
1671         (JSC::Yarr::Interpreter::InputStream::reread):
1672         (JSC::Yarr::Interpreter::InputStream::prev):
1673         (JSC::Yarr::Interpreter::InputStream::getPos):
1674         (JSC::Yarr::Interpreter::InputStream::setPos):
1675         (JSC::Yarr::Interpreter::InputStream::atStart):
1676         (JSC::Yarr::Interpreter::InputStream::atEnd):
1677         (JSC::Yarr::Interpreter::InputStream::checkInput):
1678         (JSC::Yarr::Interpreter::InputStream::uncheckInput):
1679         (JSC::Yarr::Interpreter::InputStream::isNotAvailableInput):
1680         (JSC::Yarr::Interpreter::testCharacterClass):
1681         (JSC::Yarr::Interpreter::checkCharacter):
1682         (JSC::Yarr::Interpreter::checkCasedCharacter):
1683         (JSC::Yarr::Interpreter::checkCharacterClass):
1684         (JSC::Yarr::Interpreter::tryConsumeBackReference):
1685         (JSC::Yarr::Interpreter::matchAssertionBOL):
1686         (JSC::Yarr::Interpreter::matchAssertionEOL):
1687         (JSC::Yarr::Interpreter::matchAssertionWordBoundary):
1688         (JSC::Yarr::Interpreter::backtrackPatternCharacter):
1689         (JSC::Yarr::Interpreter::backtrackPatternCasedCharacter):
1690         (JSC::Yarr::Interpreter::matchCharacterClass):
1691         (JSC::Yarr::Interpreter::backtrackCharacterClass):
1692         (JSC::Yarr::Interpreter::matchBackReference):
1693         (JSC::Yarr::Interpreter::backtrackBackReference):
1694         (JSC::Yarr::Interpreter::recordParenthesesMatch):
1695         (JSC::Yarr::Interpreter::resetMatches):
1696         (JSC::Yarr::Interpreter::parenthesesDoBacktrack):
1697         (JSC::Yarr::Interpreter::matchParenthesesOnceBegin):
1698         (JSC::Yarr::Interpreter::matchParenthesesOnceEnd):
1699         (JSC::Yarr::Interpreter::backtrackParenthesesOnceBegin):
1700         (JSC::Yarr::Interpreter::backtrackParenthesesOnceEnd):
1701         (JSC::Yarr::Interpreter::matchParenthesesTerminalBegin):
1702         (JSC::Yarr::Interpreter::matchParenthesesTerminalEnd):
1703         (JSC::Yarr::Interpreter::backtrackParenthesesTerminalBegin):
1704         (JSC::Yarr::Interpreter::backtrackParenthesesTerminalEnd):
1705         (JSC::Yarr::Interpreter::matchParentheticalAssertionBegin):
1706         (JSC::Yarr::Interpreter::matchParentheticalAssertionEnd):
1707         (JSC::Yarr::Interpreter::backtrackParentheticalAssertionBegin):
1708         (JSC::Yarr::Interpreter::backtrackParentheticalAssertionEnd):
1709         (JSC::Yarr::Interpreter::matchParentheses):
1710         (JSC::Yarr::Interpreter::backtrackParentheses):
1711         (JSC::Yarr::Interpreter::lookupForBeginChars):
1712         (JSC::Yarr::Interpreter::matchDisjunction):
1713         (JSC::Yarr::Interpreter::matchNonZeroDisjunction):
1714         (JSC::Yarr::Interpreter::interpret):
1715         (JSC::Yarr::Interpreter::Interpreter):
1716         (JSC::Yarr::ByteCompiler::ParenthesesStackEntry::ParenthesesStackEntry):
1717         (JSC::Yarr::ByteCompiler::ByteCompiler):
1718         (JSC::Yarr::ByteCompiler::compile):
1719         (JSC::Yarr::ByteCompiler::checkInput):
1720         (JSC::Yarr::ByteCompiler::assertionBOL):
1721         (JSC::Yarr::ByteCompiler::assertionEOL):
1722         (JSC::Yarr::ByteCompiler::assertionWordBoundary):
1723         (JSC::Yarr::ByteCompiler::atomPatternCharacter):
1724         (JSC::Yarr::ByteCompiler::atomCharacterClass):
1725         (JSC::Yarr::ByteCompiler::atomBackReference):
1726         (JSC::Yarr::ByteCompiler::atomParenthesesOnceBegin):
1727         (JSC::Yarr::ByteCompiler::atomParenthesesTerminalBegin):
1728         (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin):
1729         (JSC::Yarr::ByteCompiler::atomParentheticalAssertionBegin):
1730         (JSC::Yarr::ByteCompiler::atomParentheticalAssertionEnd):
1731         (JSC::Yarr::ByteCompiler::popParenthesesStack):
1732         (JSC::Yarr::ByteCompiler::dumpDisjunction):
1733         (JSC::Yarr::ByteCompiler::closeAlternative):
1734         (JSC::Yarr::ByteCompiler::closeBodyAlternative):
1735         (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd):
1736         (JSC::Yarr::ByteCompiler::atomParenthesesOnceEnd):
1737         (JSC::Yarr::ByteCompiler::atomParenthesesTerminalEnd):
1738         (JSC::Yarr::ByteCompiler::regexBegin):
1739         (JSC::Yarr::ByteCompiler::regexEnd):
1740         (JSC::Yarr::ByteCompiler::alternativeBodyDisjunction):
1741         (JSC::Yarr::ByteCompiler::alternativeDisjunction):
1742         (JSC::Yarr::ByteCompiler::emitDisjunction):
1743         (JSC::Yarr::byteCompile):
1744         (JSC::Yarr::interpret):
1745         * yarr/YarrInterpreter.h: Renamed from Source/JavaScriptCore/yarr/RegexInterpreter.h.
1746         (JSC::Yarr::ByteTerm::ByteTerm):
1747         (JSC::Yarr::ByteTerm::BOL):
1748         (JSC::Yarr::ByteTerm::CheckInput):
1749         (JSC::Yarr::ByteTerm::EOL):
1750         (JSC::Yarr::ByteTerm::WordBoundary):
1751         (JSC::Yarr::ByteTerm::BackReference):
1752         (JSC::Yarr::ByteTerm::BodyAlternativeBegin):
1753         (JSC::Yarr::ByteTerm::BodyAlternativeDisjunction):
1754         (JSC::Yarr::ByteTerm::BodyAlternativeEnd):
1755         (JSC::Yarr::ByteTerm::AlternativeBegin):
1756         (JSC::Yarr::ByteTerm::AlternativeDisjunction):
1757         (JSC::Yarr::ByteTerm::AlternativeEnd):
1758         (JSC::Yarr::ByteTerm::SubpatternBegin):
1759         (JSC::Yarr::ByteTerm::SubpatternEnd):
1760         (JSC::Yarr::ByteTerm::invert):
1761         (JSC::Yarr::ByteTerm::capture):
1762         (JSC::Yarr::ByteDisjunction::ByteDisjunction):
1763         (JSC::Yarr::BytecodePattern::BytecodePattern):
1764         (JSC::Yarr::BytecodePattern::~BytecodePattern):
1765         * yarr/YarrJIT.cpp: Renamed from Source/JavaScriptCore/yarr/RegexJIT.cpp.
1766         (JSC::Yarr::YarrGenerator::optimizeAlternative):
1767         (JSC::Yarr::YarrGenerator::matchCharacterClassRange):
1768         (JSC::Yarr::YarrGenerator::matchCharacterClass):
1769         (JSC::Yarr::YarrGenerator::jumpIfNoAvailableInput):
1770         (JSC::Yarr::YarrGenerator::jumpIfAvailableInput):
1771         (JSC::Yarr::YarrGenerator::checkInput):
1772         (JSC::Yarr::YarrGenerator::atEndOfInput):
1773         (JSC::Yarr::YarrGenerator::notAtEndOfInput):
1774         (JSC::Yarr::YarrGenerator::jumpIfCharEquals):
1775         (JSC::Yarr::YarrGenerator::jumpIfCharNotEquals):
1776         (JSC::Yarr::YarrGenerator::readCharacter):
1777         (JSC::Yarr::YarrGenerator::storeToFrame):
1778         (JSC::Yarr::YarrGenerator::storeToFrameWithPatch):
1779         (JSC::Yarr::YarrGenerator::loadFromFrame):
1780         (JSC::Yarr::YarrGenerator::loadFromFrameAndJump):
1781         (JSC::Yarr::YarrGenerator::IndirectJumpEntry::IndirectJumpEntry):
1782         (JSC::Yarr::YarrGenerator::IndirectJumpEntry::addJump):
1783         (JSC::Yarr::YarrGenerator::AlternativeBacktrackRecord::AlternativeBacktrackRecord):
1784         (JSC::Yarr::YarrGenerator::GenerationState::GenerationState):
1785         (JSC::Yarr::YarrGenerator::GenerationState::addIndirectJumpEntry):
1786         (JSC::Yarr::YarrGenerator::GenerationState::emitIndirectJumpTable):
1787         (JSC::Yarr::YarrGenerator::GenerationState::incrementParenNestingLevel):
1788         (JSC::Yarr::YarrGenerator::GenerationState::decrementParenNestingLevel):
1789         (JSC::Yarr::YarrGenerator::GenerationState::addParenthesesTail):
1790         (JSC::Yarr::YarrGenerator::GenerationState::emitParenthesesTail):
1791         (JSC::Yarr::YarrGenerator::GenerationState::addJumpToNextInteration):
1792         (JSC::Yarr::YarrGenerator::GenerationState::addJumpsToNextInteration):
1793         (JSC::Yarr::YarrGenerator::GenerationState::addDataLabelToNextIteration):
1794         (JSC::Yarr::YarrGenerator::GenerationState::linkToNextIteration):
1795         (JSC::Yarr::YarrGenerator::BacktrackDestination::BacktrackDestination):
1796         (JSC::Yarr::YarrGenerator::BacktrackDestination::clear):
1797         (JSC::Yarr::YarrGenerator::BacktrackDestination::clearDataLabel):
1798         (JSC::Yarr::YarrGenerator::BacktrackDestination::hasDestination):
1799         (JSC::Yarr::YarrGenerator::BacktrackDestination::isStackOffset):
1800         (JSC::Yarr::YarrGenerator::BacktrackDestination::isLabel):
1801         (JSC::Yarr::YarrGenerator::BacktrackDestination::isJumpList):
1802         (JSC::Yarr::YarrGenerator::BacktrackDestination::hasDataLabel):
1803         (JSC::Yarr::YarrGenerator::BacktrackDestination::copyTarget):
1804         (JSC::Yarr::YarrGenerator::BacktrackDestination::copyTo):
1805         (JSC::Yarr::YarrGenerator::BacktrackDestination::addBacktrackJump):
1806         (JSC::Yarr::YarrGenerator::BacktrackDestination::setStackOffset):
1807         (JSC::Yarr::YarrGenerator::BacktrackDestination::setLabel):
1808         (JSC::Yarr::YarrGenerator::BacktrackDestination::setNextBacktrackLabel):
1809         (JSC::Yarr::YarrGenerator::BacktrackDestination::copyBacktrackToLabel):
1810         (JSC::Yarr::YarrGenerator::BacktrackDestination::setBacktrackToLabel):
1811         (JSC::Yarr::YarrGenerator::BacktrackDestination::setBacktrackJumpList):
1812         (JSC::Yarr::YarrGenerator::BacktrackDestination::setBacktrackSourceLabel):
1813         (JSC::Yarr::YarrGenerator::BacktrackDestination::setDataLabel):
1814         (JSC::Yarr::YarrGenerator::BacktrackDestination::setSubDataLabelPtr):
1815         (JSC::Yarr::YarrGenerator::BacktrackDestination::linkToNextBacktrack):
1816         (JSC::Yarr::YarrGenerator::BacktrackDestination::getStackOffset):
1817         (JSC::Yarr::YarrGenerator::BacktrackDestination::getLabel):
1818         (JSC::Yarr::YarrGenerator::BacktrackDestination::getBacktrackJumps):
1819         (JSC::Yarr::YarrGenerator::BacktrackDestination::getDataLabel):
1820         (JSC::Yarr::YarrGenerator::BacktrackDestination::jumpToBacktrack):
1821         (JSC::Yarr::YarrGenerator::BacktrackDestination::linkDataLabelToHereIfExists):
1822         (JSC::Yarr::YarrGenerator::BacktrackDestination::plantJumpToBacktrackIfExists):
1823         (JSC::Yarr::YarrGenerator::BacktrackDestination::linkAlternativeBacktracks):
1824         (JSC::Yarr::YarrGenerator::BacktrackDestination::linkAlternativeBacktracksTo):
1825         (JSC::Yarr::YarrGenerator::TermGenerationState::TermGenerationState):
1826         (JSC::Yarr::YarrGenerator::TermGenerationState::resetAlternative):
1827         (JSC::Yarr::YarrGenerator::TermGenerationState::alternativeValid):
1828         (JSC::Yarr::YarrGenerator::TermGenerationState::nextAlternative):
1829         (JSC::Yarr::YarrGenerator::TermGenerationState::alternative):
1830         (JSC::Yarr::YarrGenerator::TermGenerationState::isLastAlternative):
1831         (JSC::Yarr::YarrGenerator::TermGenerationState::resetTerm):
1832         (JSC::Yarr::YarrGenerator::TermGenerationState::termValid):
1833         (JSC::Yarr::YarrGenerator::TermGenerationState::nextTerm):
1834         (JSC::Yarr::YarrGenerator::TermGenerationState::term):
1835         (JSC::Yarr::YarrGenerator::TermGenerationState::isLastTerm):
1836         (JSC::Yarr::YarrGenerator::TermGenerationState::getSubParenNum):
1837         (JSC::Yarr::YarrGenerator::TermGenerationState::isMainDisjunction):
1838         (JSC::Yarr::YarrGenerator::TermGenerationState::setParenthesesTail):
1839         (JSC::Yarr::YarrGenerator::TermGenerationState::getParenthesesTail):
1840         (JSC::Yarr::YarrGenerator::TermGenerationState::lookaheadTerm):
1841         (JSC::Yarr::YarrGenerator::TermGenerationState::isSinglePatternCharacterLookaheadTerm):
1842         (JSC::Yarr::YarrGenerator::TermGenerationState::inputOffset):
1843         (JSC::Yarr::YarrGenerator::TermGenerationState::clearBacktrack):
1844         (JSC::Yarr::YarrGenerator::TermGenerationState::jumpToBacktrack):
1845         (JSC::Yarr::YarrGenerator::TermGenerationState::plantJumpToBacktrackIfExists):
1846         (JSC::Yarr::YarrGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists):
1847         (JSC::Yarr::YarrGenerator::TermGenerationState::addBacktrackJump):
1848         (JSC::Yarr::YarrGenerator::TermGenerationState::setBacktrackDataLabel):
1849         (JSC::Yarr::YarrGenerator::TermGenerationState::setBackTrackStackOffset):
1850         (JSC::Yarr::YarrGenerator::TermGenerationState::setBacktrackLabel):
1851         (JSC::Yarr::YarrGenerator::TermGenerationState::linkAlternativeBacktracks):
1852         (JSC::Yarr::YarrGenerator::TermGenerationState::linkAlternativeBacktracksTo):
1853         (JSC::Yarr::YarrGenerator::TermGenerationState::setBacktrackLink):
1854         (JSC::Yarr::YarrGenerator::TermGenerationState::chainBacktracks):
1855         (JSC::Yarr::YarrGenerator::TermGenerationState::chainBacktrackJumps):
1856         (JSC::Yarr::YarrGenerator::TermGenerationState::getBacktrackDestination):
1857         (JSC::Yarr::YarrGenerator::TermGenerationState::propagateBacktrackingFrom):
1858         (JSC::Yarr::YarrGenerator::ParenthesesTail::ParenthesesTail):
1859         (JSC::Yarr::YarrGenerator::ParenthesesTail::processBacktracks):
1860         (JSC::Yarr::YarrGenerator::ParenthesesTail::setNextIteration):
1861         (JSC::Yarr::YarrGenerator::ParenthesesTail::addAfterParenJump):
1862         (JSC::Yarr::YarrGenerator::ParenthesesTail::generateCode):
1863         (JSC::Yarr::YarrGenerator::generateAssertionBOL):
1864         (JSC::Yarr::YarrGenerator::generateAssertionEOL):
1865         (JSC::Yarr::YarrGenerator::matchAssertionWordchar):
1866         (JSC::Yarr::YarrGenerator::generateAssertionWordBoundary):
1867         (JSC::Yarr::YarrGenerator::generatePatternCharacterSingle):
1868         (JSC::Yarr::YarrGenerator::generatePatternCharacterPair):
1869         (JSC::Yarr::YarrGenerator::generatePatternCharacterFixed):
1870         (JSC::Yarr::YarrGenerator::generatePatternCharacterGreedy):
1871         (JSC::Yarr::YarrGenerator::generatePatternCharacterNonGreedy):
1872         (JSC::Yarr::YarrGenerator::generateCharacterClassSingle):
1873         (JSC::Yarr::YarrGenerator::generateCharacterClassFixed):
1874         (JSC::Yarr::YarrGenerator::generateCharacterClassGreedy):
1875         (JSC::Yarr::YarrGenerator::generateCharacterClassNonGreedy):
1876         (JSC::Yarr::YarrGenerator::generateParenthesesDisjunction):
1877         (JSC::Yarr::YarrGenerator::generateParenthesesSingle):
1878         (JSC::Yarr::YarrGenerator::generateParenthesesGreedyNoBacktrack):
1879         (JSC::Yarr::YarrGenerator::generateParentheticalAssertion):
1880         (JSC::Yarr::YarrGenerator::generateTerm):
1881         (JSC::Yarr::YarrGenerator::generateDisjunction):
1882         (JSC::Yarr::YarrGenerator::generateEnter):
1883         (JSC::Yarr::YarrGenerator::generateReturn):
1884         (JSC::Yarr::YarrGenerator::YarrGenerator):
1885         (JSC::Yarr::YarrGenerator::generate):
1886         (JSC::Yarr::YarrGenerator::compile):
1887         (JSC::Yarr::jitCompile):
1888         * yarr/YarrJIT.h: Renamed from Source/JavaScriptCore/yarr/RegexJIT.h.
1889         (JSC::Yarr::YarrCodeBlock::YarrCodeBlock):
1890         (JSC::Yarr::YarrCodeBlock::~YarrCodeBlock):
1891         (JSC::Yarr::YarrCodeBlock::setFallBack):
1892         (JSC::Yarr::YarrCodeBlock::isFallBack):
1893         (JSC::Yarr::YarrCodeBlock::set):
1894         (JSC::Yarr::YarrCodeBlock::execute):
1895         (JSC::Yarr::YarrCodeBlock::getAddr):
1896         (JSC::Yarr::execute):
1897         * yarr/YarrParser.h: Renamed from Source/JavaScriptCore/yarr/RegexParser.h.
1898         (JSC::Yarr::Parser::CharacterClassParserDelegate::CharacterClassParserDelegate):
1899         (JSC::Yarr::Parser::CharacterClassParserDelegate::begin):
1900         (JSC::Yarr::Parser::CharacterClassParserDelegate::atomPatternCharacter):
1901         (JSC::Yarr::Parser::CharacterClassParserDelegate::atomBuiltInCharacterClass):
1902         (JSC::Yarr::Parser::CharacterClassParserDelegate::end):
1903         (JSC::Yarr::Parser::CharacterClassParserDelegate::assertionWordBoundary):
1904         (JSC::Yarr::Parser::CharacterClassParserDelegate::atomBackReference):
1905         (JSC::Yarr::Parser::Parser):
1906         (JSC::Yarr::Parser::parseEscape):
1907         (JSC::Yarr::Parser::parseAtomEscape):
1908         (JSC::Yarr::Parser::parseCharacterClassEscape):
1909         (JSC::Yarr::Parser::parseCharacterClass):
1910         (JSC::Yarr::Parser::parseParenthesesBegin):
1911         (JSC::Yarr::Parser::parseParenthesesEnd):
1912         (JSC::Yarr::Parser::parseQuantifier):
1913         (JSC::Yarr::Parser::parseTokens):
1914         (JSC::Yarr::Parser::parse):
1915         (JSC::Yarr::Parser::saveState):
1916         (JSC::Yarr::Parser::restoreState):
1917         (JSC::Yarr::Parser::atEndOfPattern):
1918         (JSC::Yarr::Parser::peek):
1919         (JSC::Yarr::Parser::peekIsDigit):
1920         (JSC::Yarr::Parser::peekDigit):
1921         (JSC::Yarr::Parser::consume):
1922         (JSC::Yarr::Parser::consumeDigit):
1923         (JSC::Yarr::Parser::consumeNumber):
1924         (JSC::Yarr::Parser::consumeOctal):
1925         (JSC::Yarr::Parser::tryConsume):
1926         (JSC::Yarr::Parser::tryConsumeHex):
1927         (JSC::Yarr::parse):
1928         * yarr/YarrPattern.cpp: Renamed from Source/JavaScriptCore/yarr/RegexPattern.cpp.
1929         (JSC::Yarr::CharacterClassConstructor::CharacterClassConstructor):
1930         (JSC::Yarr::CharacterClassConstructor::reset):
1931         (JSC::Yarr::CharacterClassConstructor::append):
1932         (JSC::Yarr::CharacterClassConstructor::putChar):
1933         (JSC::Yarr::CharacterClassConstructor::isUnicodeUpper):
1934         (JSC::Yarr::CharacterClassConstructor::isUnicodeLower):
1935         (JSC::Yarr::CharacterClassConstructor::putRange):
1936         (JSC::Yarr::CharacterClassConstructor::charClass):
1937         (JSC::Yarr::CharacterClassConstructor::addSorted):
1938         (JSC::Yarr::CharacterClassConstructor::addSortedRange):
1939         (JSC::Yarr::BeginCharHelper::BeginCharHelper):
1940         (JSC::Yarr::BeginCharHelper::addBeginChar):
1941         (JSC::Yarr::BeginCharHelper::merge):
1942         (JSC::Yarr::BeginCharHelper::addCharacter):
1943         (JSC::Yarr::BeginCharHelper::linkHotTerms):
1944         (JSC::Yarr::YarrPatternConstructor::YarrPatternConstructor):
1945         (JSC::Yarr::YarrPatternConstructor::~YarrPatternConstructor):
1946         (JSC::Yarr::YarrPatternConstructor::reset):
1947         (JSC::Yarr::YarrPatternConstructor::assertionBOL):
1948         (JSC::Yarr::YarrPatternConstructor::assertionEOL):
1949         (JSC::Yarr::YarrPatternConstructor::assertionWordBoundary):
1950         (JSC::Yarr::YarrPatternConstructor::atomPatternCharacter):
1951         (JSC::Yarr::YarrPatternConstructor::atomBuiltInCharacterClass):
1952         (JSC::Yarr::YarrPatternConstructor::atomCharacterClassBegin):
1953         (JSC::Yarr::YarrPatternConstructor::atomCharacterClassAtom):
1954         (JSC::Yarr::YarrPatternConstructor::atomCharacterClassRange):
1955         (JSC::Yarr::YarrPatternConstructor::atomCharacterClassBuiltIn):
1956         (JSC::Yarr::YarrPatternConstructor::atomCharacterClassEnd):
1957         (JSC::Yarr::YarrPatternConstructor::atomParenthesesSubpatternBegin):
1958         (JSC::Yarr::YarrPatternConstructor::atomParentheticalAssertionBegin):
1959         (JSC::Yarr::YarrPatternConstructor::atomParenthesesEnd):
1960         (JSC::Yarr::YarrPatternConstructor::atomBackReference):
1961         (JSC::Yarr::YarrPatternConstructor::copyDisjunction):
1962         (JSC::Yarr::YarrPatternConstructor::copyTerm):
1963         (JSC::Yarr::YarrPatternConstructor::quantifyAtom):
1964         (JSC::Yarr::YarrPatternConstructor::disjunction):
1965         (JSC::Yarr::YarrPatternConstructor::regexBegin):
1966         (JSC::Yarr::YarrPatternConstructor::regexEnd):
1967         (JSC::Yarr::YarrPatternConstructor::regexError):
1968         (JSC::Yarr::YarrPatternConstructor::setupAlternativeOffsets):
1969         (JSC::Yarr::YarrPatternConstructor::setupDisjunctionOffsets):
1970         (JSC::Yarr::YarrPatternConstructor::setupOffsets):
1971         (JSC::Yarr::YarrPatternConstructor::checkForTerminalParentheses):
1972         (JSC::Yarr::YarrPatternConstructor::optimizeBOL):
1973         (JSC::Yarr::YarrPatternConstructor::addBeginTerm):
1974         (JSC::Yarr::YarrPatternConstructor::setupDisjunctionBeginTerms):
1975         (JSC::Yarr::YarrPatternConstructor::setupAlternativeBeginTerms):
1976         (JSC::Yarr::YarrPatternConstructor::setupBeginChars):
1977         (JSC::Yarr::compile):
1978         (JSC::Yarr::YarrPattern::YarrPattern):
1979         * yarr/YarrPattern.h: Renamed from Source/JavaScriptCore/yarr/RegexPattern.h.
1980         (JSC::Yarr::CharacterRange::CharacterRange):
1981         (JSC::Yarr::CharacterClassTable::create):
1982         (JSC::Yarr::CharacterClassTable::CharacterClassTable):
1983         (JSC::Yarr::CharacterClass::CharacterClass):
1984         (JSC::Yarr::PatternTerm::PatternTerm):
1985         (JSC::Yarr::PatternTerm::ForwardReference):
1986         (JSC::Yarr::PatternTerm::BOL):
1987         (JSC::Yarr::PatternTerm::EOL):
1988         (JSC::Yarr::PatternTerm::WordBoundary):
1989         (JSC::Yarr::PatternTerm::invert):
1990         (JSC::Yarr::PatternTerm::capture):
1991         (JSC::Yarr::PatternTerm::quantify):
1992         (JSC::Yarr::PatternAlternative::PatternAlternative):
1993         (JSC::Yarr::PatternAlternative::lastTerm):
1994         (JSC::Yarr::PatternAlternative::removeLastTerm):
1995         (JSC::Yarr::PatternAlternative::setOnceThrough):
1996         (JSC::Yarr::PatternAlternative::onceThrough):
1997         (JSC::Yarr::PatternDisjunction::PatternDisjunction):
1998         (JSC::Yarr::PatternDisjunction::~PatternDisjunction):
1999         (JSC::Yarr::PatternDisjunction::addNewAlternative):
2000         (JSC::Yarr::TermChain::TermChain):
2001         (JSC::Yarr::BeginChar::BeginChar):
2002         (JSC::Yarr::YarrPattern::~YarrPattern):
2003         (JSC::Yarr::YarrPattern::reset):
2004         (JSC::Yarr::YarrPattern::containsIllegalBackReference):
2005         (JSC::Yarr::YarrPattern::newlineCharacterClass):
2006         (JSC::Yarr::YarrPattern::digitsCharacterClass):
2007         (JSC::Yarr::YarrPattern::spacesCharacterClass):
2008         (JSC::Yarr::YarrPattern::wordcharCharacterClass):
2009         (JSC::Yarr::YarrPattern::nondigitsCharacterClass):
2010         (JSC::Yarr::YarrPattern::nonspacesCharacterClass):
2011         (JSC::Yarr::YarrPattern::nonwordcharCharacterClass):
2012
2013 2011-01-10  Gavin Barraclough  <barraclough@apple.com>
2014
2015         Windows build fix.
2016
2017         * parser/SyntaxChecker.h:
2018
2019 2011-01-10  Dave Tapuska  <dtapuska@rim.com>
2020
2021         Reviewed by Gavin Barraclough.
2022
2023         Add CTI ASM versions for RVCT ARM THUMB2 mode.
2024
2025         https://bugs.webkit.org/show_bug.cgi?id=52154
2026
2027         * jit/JITStubs.cpp:
2028         (JSC::ctiTrampoline):
2029         (JSC::ctiVMThrowTrampoline):
2030         (JSC::ctiOpThrowNotCaught):
2031
2032 2011-01-10  Gavin Barraclough  <barraclough@apple.com>
2033
2034         Qt build fix.
2035
2036         * JavaScriptCore.pro:
2037
2038 2011-01-10  Gavin Barraclough  <barraclough@apple.com>
2039
2040         Reviewed by Oliver Hunt.
2041
2042         Bug 52079 - Syntax errors should be early errors.
2043
2044         From chapter 16 the spec:
2045             An implementation must report most errors at the time the relevant ECMAScript language construct is
2046             evaluated. An early error is an error that can be detected and reported prior to the evaluation of
2047             any construct in the Program containing the error. An implementation must report early errors in a
2048             Program prior to the first evaluation of that Program. Early errors in eval code are reported at
2049             the time eval is called but prior to evaluation of any construct within the eval code. All errors
2050             that are not early errors are runtime errors.
2051
2052             An implementation must treat any instance of the following kinds of errors as an early error:
2053                 * Any syntax error."
2054
2055         * JavaScriptCore.xcodeproj/project.pbxproj:
2056             Added new files.
2057         * bytecode/CodeBlock.cpp:
2058             Removed op_throw_syntax_error.
2059         * bytecode/Opcode.h:
2060             Removed op_throw_syntax_error.
2061         * bytecompiler/BytecodeGenerator.cpp:
2062         (JSC::BytecodeGenerator::generate):
2063             If m_expressionTooDeep then throw a runtime error.
2064         (JSC::BytecodeGenerator::BytecodeGenerator):
2065             Initialize m_expressionTooDeep.
2066         (JSC::BytecodeGenerator::emitThrowExpressionTooDeepException):
2067             Sets m_expressionTooDeep.
2068         * bytecompiler/BytecodeGenerator.h:
2069             Added m_expressionTooDeep, removed emitThrowSyntaxError.
2070         * bytecompiler/NodesCodegen.cpp:
2071         (JSC::RegExpNode::emitBytecode):
2072         (JSC::ContinueNode::emitBytecode):
2073         (JSC::BreakNode::emitBytecode):
2074         (JSC::ReturnNode::emitBytecode):
2075         (JSC::LabelNode::emitBytecode):
2076             Conditions that threw syntax error are now handled during parsing;
2077             during bytecompilation these are now just ASSERTs.
2078         * interpreter/Interpreter.cpp:
2079         (JSC::Interpreter::privateExecute):
2080         * jit/JIT.cpp:
2081         (JSC::JIT::privateCompileMainPass):
2082         * jit/JIT.h:
2083         * jit/JITOpcodes.cpp:
2084         * jit/JITOpcodes32_64.cpp:
2085         * jit/JITStubs.cpp:
2086         * jit/JITStubs.h:
2087             Removed op_throw_syntax_error.
2088         * parser/ASTBuilder.h:
2089         (JSC::ASTBuilder::createRegExp):
2090             Renamed; added syntax check.
2091         * parser/JSParser.cpp:
2092         (JSC::JSParser::breakIsValid):
2093         (JSC::JSParser::hasLabel):
2094         (JSC::JSParser::Scope::Scope):
2095         (JSC::JSParser::Scope::setIsFunction):
2096         (JSC::JSParser::Scope::isFunctionBoundary):
2097         (JSC::JSParser::ScopeRef::hasContainingScope):
2098         (JSC::JSParser::ScopeRef::containingScope):
2099         (JSC::JSParser::AutoPopScopeRef::AutoPopScopeRef):
2100         (JSC::JSParser::AutoPopScopeRef::~AutoPopScopeRef):
2101         (JSC::JSParser::AutoPopScopeRef::setPopped):
2102         (JSC::JSParser::popScopeInternal):
2103         (JSC::JSParser::popScope):
2104         (JSC::jsParse):
2105         (JSC::JSParser::JSParser):
2106         (JSC::JSParser::parseProgram):
2107         (JSC::JSParser::parseBreakStatement):
2108         (JSC::JSParser::parseContinueStatement):
2109         (JSC::JSParser::parseReturnStatement):
2110         (JSC::JSParser::parseTryStatement):
2111         (JSC::JSParser::parseFunctionInfo):
2112         (JSC::JSParser::parseExpressionOrLabelStatement):
2113         (JSC::JSParser::parsePrimaryExpression):
2114         * parser/JSParser.h:
2115         * parser/Nodes.h:
2116         * parser/Parser.cpp:
2117         (JSC::Parser::parse):
2118         * parser/SyntaxChecker.h:
2119         (JSC::SyntaxChecker::createRegExp):
2120             Renamed; added syntax check.
2121         * runtime/ExceptionHelpers.cpp:
2122         (JSC::createOutOfMemoryError):
2123         (JSC::throwOutOfMemoryError):
2124         * runtime/ExceptionHelpers.h:
2125             Broke out createOutOfMemoryError.
2126         * runtime/Executable.cpp:
2127         (JSC::EvalExecutable::compileInternal):
2128         (JSC::ProgramExecutable::compileInternal):
2129         (JSC::FunctionExecutable::compileForCallInternal):
2130         (JSC::FunctionExecutable::compileForConstructInternal):
2131             Add check for exception after bytecode generation.
2132         * runtime/RegExpConstructor.cpp:
2133         (JSC::constructRegExp):
2134         * runtime/RegExpPrototype.cpp:
2135         (JSC::regExpProtoFuncCompile):
2136             RegExp error prefixes not included in error string.
2137         * yarr/RegexParser.h:
2138         (JSC::Yarr::Parser::parse):
2139             Removed regexBegin/regexEnd/regexError.
2140         * yarr/RegexPattern.cpp:
2141         (JSC::Yarr::RegexPatternConstructor::regexBegin):
2142             Removed regexEnd/regexError.
2143         (JSC::Yarr::compileRegex):
2144             Add call to regexBegin (no longer called from the parser).
2145         * yarr/YarrSyntaxChecker.cpp: Added.
2146         (JSC::Yarr::SyntaxChecker::assertionBOL):
2147         (JSC::Yarr::SyntaxChecker::assertionEOL):
2148         (JSC::Yarr::SyntaxChecker::assertionWordBoundary):
2149         (JSC::Yarr::SyntaxChecker::atomPatternCharacter):
2150         (JSC::Yarr::SyntaxChecker::atomBuiltInCharacterClass):
2151         (JSC::Yarr::SyntaxChecker::atomCharacterClassBegin):
2152         (JSC::Yarr::SyntaxChecker::atomCharacterClassAtom):
2153         (JSC::Yarr::SyntaxChecker::atomCharacterClassRange):
2154         (JSC::Yarr::SyntaxChecker::atomCharacterClassBuiltIn):
2155         (JSC::Yarr::SyntaxChecker::atomCharacterClassEnd):
2156         (JSC::Yarr::SyntaxChecker::atomParenthesesSubpatternBegin):
2157         (JSC::Yarr::SyntaxChecker::atomParentheticalAssertionBegin):
2158         (JSC::Yarr::SyntaxChecker::atomParenthesesEnd):
2159         (JSC::Yarr::SyntaxChecker::atomBackReference):
2160         (JSC::Yarr::SyntaxChecker::quantifyAtom):
2161         (JSC::Yarr::SyntaxChecker::disjunction):
2162         (JSC::Yarr::checkSyntax):
2163         * yarr/YarrSyntaxChecker.h: Added.
2164             Check RegExp syntax.
2165
2166 2011-01-10  Adam Roben  <aroben@apple.com>
2167
2168         Roll out r75289
2169
2170         It was causing assertion failures. See <http://webkit.org/b/52156>.
2171
2172         * wtf/StackBounds.cpp:
2173         (WTF::StackBounds::initialize):
2174
2175 2011-01-08  Patrick Gansterer  <paroga@webkit.org>
2176
2177         Reviewed by Darin Adler.
2178
2179         Unify string table adding in AtomicString
2180         https://bugs.webkit.org/show_bug.cgi?id=51927
2181
2182         Move code for adding a string into a separate function.
2183         This removes multiple occurrence of the same logic.
2184
2185         * wtf/text/AtomicString.cpp:
2186         (WTF::addToStringTable): Added.
2187         (WTF::AtomicString::add): Use addToStringTable().
2188         (WTF::AtomicString::fromUTF8): Ditto.
2189
2190 2011-01-07  Geoffrey Garen  <ggaren@apple.com>
2191
2192         Reviewed by Gavin Barraclough.
2193
2194         Split machine stack marking functions into their own class (MachineStackMarker)
2195         https://bugs.webkit.org/show_bug.cgi?id=52088
2196
2197         * API/APIShims.h:
2198         (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock): Moved registerThread()
2199         call behind an #ifdef because we shouldn't be registering threads at all
2200         if we don't support usage on multiple threads.
2201
2202         * Android.mk:
2203         * CMakeLists.txt:
2204         * GNUmakefile.am:
2205         * JavaScriptCore.gypi:
2206         * JavaScriptCore.pro:
2207         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2208         * JavaScriptCore.xcodeproj/project.pbxproj: Updated projects.
2209
2210         * runtime/Collector.cpp:
2211         (JSC::Heap::Heap):
2212         (JSC::Heap::destroy):
2213         (JSC::Heap::markRoots):
2214         * runtime/Collector.h:
2215         (JSC::Heap::machineStackMarker): Moved code to machineStackMarker.
2216
2217         * runtime/JSGlobalData.h:
2218         (JSC::JSGlobalData::makeUsableFromMultipleThreads): Removed an unnecessary
2219         level of indirection, to make Heap less of a God class.
2220
2221         * runtime/MachineStackMarker.h: Copied from Source/JavaScriptCore/runtime/Collector.h.
2222         * runtime/MachineStackMarker.cpp: Copied from Source/JavaScriptCore/runtime/Collector.cpp.
2223         (JSC::MachineStackMarker::MachineStackMarker):
2224         (JSC::MachineStackMarker::~MachineStackMarker):
2225         (JSC::MachineStackMarker::makeUsableFromMultipleThreads):
2226         (JSC::MachineStackMarker::registerThread):
2227         (JSC::MachineStackMarker::unregisterThread):
2228         (JSC::MachineStackMarker::markCurrentThreadConservativelyInternal):
2229         (JSC::MachineStackMarker::markCurrentThreadConservatively):
2230         (JSC::MachineStackMarker::markOtherThreadConservatively):
2231         (JSC::MachineStackMarker::markMachineStackConservatively): Moved code from Heap.
2232
2233 2011-01-07  Gavin Barraclough  <barraclough@apple.com>
2234
2235         Reviewed by Geoff Garen.
2236
2237         Bug 26276 - Need a mechanism to determine stack extent on WINDOWS, SOLARIS, OPENBSD, SYMBIAN, HAIKU, WINCE platforms
2238
2239         Fix for win32.  The base of the stack is stored in the "deallocation stack" field of the
2240         Thread Information Block - see: http://en.wikipedia.org/wiki/Win32_Thread_Information_Block
2241         for more information!
2242
2243         * wtf/StackBounds.cpp:
2244         (WTF::StackBounds::initialize):
2245
2246 2011-01-07  Adam Roben  <aroben@apple.com>
2247
2248         Update react-to-vsprops-changes.py after r74855
2249
2250         * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
2251
2252 2011-01-07  Carlos Garcia Campos  <cgarcia@igalia.com>
2253
2254         Reviewed by Martin Robinson.
2255
2256         [GTK] Port scrollbar painting to GtkStyleContext
2257         https://bugs.webkit.org/show_bug.cgi?id=52051
2258
2259         * wtf/gobject/GTypedefs.h: Add GtkStyleContext forward
2260         declaration.
2261
2262 2011-01-07  Daniel Bates  <dbates@rim.com>
2263
2264         Reviewed by Martin Robinson.
2265
2266         Enable PCRE computed gotos when compiling with RCVT 4.0 or greater in GNU mode
2267         https://bugs.webkit.org/show_bug.cgi?id=52034
2268
2269         Derived from a patch by Eli Fidler.
2270
2271         RVCT 4 or greater in GNU mode supports the computed goto GNU language extension
2272         as per <http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0348c/ch03s07s12.html>.
2273
2274         * pcre/pcre_exec.cpp: Modified to check for feature, HAVE(COMPUTED_GOTO), instead
2275         of hardcoding the GCC compiler.
2276         * wtf/Platform.h: Define WTF_COMPILER_RVCT4_OR_GREATER if __ARMCC_VERSION >= 400000.
2277
2278 2011-01-06  Gavin Barraclough  <barraclough@apple.com>
2279
2280         Reviewed by Geoff Garen.
2281
2282         Bug 52035 - Unregistering DOMWrapperWorlds is unsafe
2283
2284         The method DOMWrapperWorld::unregisterWorld() effectively calls the DOMWrapperWorld's
2285         destructor early, in order to release wrappers once we know we no longer intend to use them.
2286         Whilst it is okay to have a method to throw away wrappers (assuming we know we're willing to
2287         lose any state stored on them) it is not okay to deregister the world from the JSGlobalData.
2288         A sequence of events that triggers the bug would look like this:
2289
2290         (1) Create a DOMWrapperWorld.
2291         (2) Register a timer in the world.
2292         (3) Call unregisterWorld() on the world.
2293         (4) Timer goes off, code is executed in the world, creates a Node not attached to a Document.
2294         (5) We attempt to lookup a wrapper map for the world on the JSGlobalData, but because we've
2295             called forgetWorld() none exists.
2296         (6) Attempt to add a wrapper to a NULL map.
2297
2298         Fix the problem by not removing the JSGlobalData's wrapper map until the world really goes away.
2299
2300         * runtime/WeakGCMap.h:
2301         (JSC::WeakGCMap::clear):
2302
2303 2011-01-06  Gavin Barraclough  <barraclough@apple.com>
2304
2305         Reviewed by Darin Adler.
2306
2307         Bug 52021 - zeroDouble broken on ARMv7
2308
2309         The bug here is that zeroDouble was working incorrectly,
2310         leading to op_loop_if_true failing - specifically in the
2311         case where the value being checked is 0.0 encoded as a
2312         double (rather than an integer immediate).
2313
2314         Additionally this patch removes a redundant duplicate compare
2315         in some (many) case.
2316
2317         * assembler/ARMv7Assembler.h:
2318         (JSC::ARMv7Assembler::vcmp_F64):
2319         (JSC::ARMv7Assembler::vcmpz_F64):
2320         * assembler/MacroAssemblerARM.h:
2321         (JSC::MacroAssemblerARM::branchDoubleNonZero):
2322         (JSC::MacroAssemblerARM::branchDoubleZeroOrNaN):
2323         * assembler/MacroAssemblerARMv7.h:
2324         (JSC::MacroAssemblerARMv7::branchDouble):
2325         (JSC::MacroAssemblerARMv7::branchDoubleNonZero):
2326         (JSC::MacroAssemblerARMv7::branchDoubleZeroOrNaN):
2327         (JSC::MacroAssemblerARMv7::compare32):
2328         * assembler/MacroAssemblerMIPS.h:
2329         (JSC::MacroAssemblerMIPS::branchDoubleNonZero):
2330         (JSC::MacroAssemblerMIPS::branchDoubleZeroOrNaN):
2331         * assembler/MacroAssemblerX86Common.h:
2332         (JSC::MacroAssemblerX86Common::branchDoubleNonZero):
2333         (JSC::MacroAssemblerX86Common::branchDoubleZeroOrNaN):
2334         * jit/JITOpcodes32_64.cpp:
2335         (JSC::JIT::emit_op_jfalse):
2336         (JSC::JIT::emit_op_jtrue):
2337
2338 2011-01-06  Michael Saboff  <msaboff@apple.com>
2339
2340         Reviewed by Gavin Barraclough.
2341
2342         Added debug code to compare the results of JIT regexp with 
2343         interpreted regexp and displays discrepencies.  This debug code is
2344         controlled by the ENABLE_YARR_JIT_DEBUG macro in wtf/Platform.h and
2345         is only valid if ENABLE_YARR_JIT is enabled.
2346
2347         Fixed a discovered problem in RegExp::printTraceData, changing
2348         m_pattern to the getter pattern().
2349         Also deleted an extraneous semicolon.
2350
2351         Enhancement: Add Regexp Debug Compare between JIT and Interpreter
2352         https://bugs.webkit.org/show_bug.cgi?id=51834
2353
2354         * runtime/RegExp.cpp:
2355         (JSC::RegExp::compile):
2356         (JSC::RegExp::match):
2357         (JSC::RegExp::printTraceData):
2358         * wtf/Platform.h:
2359
2360 2011-01-06  Patrick Gansterer  <paroga@webkit.org>
2361
2362         Reviewed by Eric Seidel.
2363
2364         [WINCE] Remove JSC::g_stackBase
2365         https://bugs.webkit.org/show_bug.cgi?id=51779
2366
2367         * wtf/StackBounds.cpp:
2368
2369 2011-01-06  Joone Hur  <joone.hur@collabora.co.uk>
2370
2371         Reviewed by Eric Seidel.
2372
2373         WML Parser should treat line/column number in a consistent way
2374         https://bugs.webkit.org/show_bug.cgi?id=51601
2375
2376         Add the equality operators to TextPosition class.
2377
2378         * wtf/text/TextPosition.h:
2379         (WTF::TextPosition::operator==): Added.
2380         (WTF::TextPosition::operator!=): Added.
2381         (WTF::TextPosition::belowRangePosition): Use belowBase() instead of base().
2382         (WTF::ZeroBasedNumber::operator==): Added.
2383         (WTF::ZeroBasedNumber::operator!=): Added.
2384         (WTF::OneBasedNumber::operator==): Added.
2385         (WTF::OneBasedNumber::operator!=): Added.
2386
2387 2011-01-06  Patrick Gansterer  <paroga@webkit.org>
2388
2389         Reviewed by Gavin Barraclough.
2390
2391         [WINCE] Determine stack extent
2392         https://bugs.webkit.org/show_bug.cgi?id=26276
2393
2394         Scan the stack for writeable pages and use the limits.
2395
2396         * wtf/StackBounds.cpp:
2397         (WTF::detectGrowingDownward):
2398         (WTF::isPageWritable):
2399         (WTF::getLowerStackBound):
2400         (WTF::getUpperStackBound):
2401         (WTF::StackBounds::initialize):
2402
2403 2011-01-05  Steve Falkenburg  <sfalken@apple.com>
2404
2405         Windows build fix.
2406
2407         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: Revert change to additional library search path needed to find ICU.
2408
2409 2011-01-05  Steve Falkenburg  <sfalken@apple.com>
2410
2411         Reviewed by Darin Adler.
2412
2413         Debug and Release builds on Windows clobber each other
2414         https://bugs.webkit.org/show_bug.cgi?id=49185
2415         
2416         Changes the structure of WebKitBuild build products directory so we
2417         completely separate each build configuration into independent directories.
2418         
2419         Although we previously had per-configuration directories for obj, this change adds
2420         per-configuration directories for bin, lib, obj, and include. Each configuration's
2421         build products are stored within a directory inside of WebKitBuild.
2422         
2423         Most use of $(WebKitOutputDir) in the build files has been replaced by $(ConfigurationBuildDir),
2424         defined in common.vsprops to be $(WebKitOutputDir)\$(ConfigurationName).
2425         
2426         For PGO, $(ConfigurationBuildDir) points to the same directory (Release_PGO) to allow
2427         for proper operation of the instrumentation/optimization scripts.
2428
2429         * JavaScriptCore.vcproj/JavaScriptCore.make:
2430         * JavaScriptCore.vcproj/JavaScriptCore.sln:
2431         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2432         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
2433         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
2434         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
2435         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedCommon.vsprops:
2436         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePGOOptimize.vsprops: Added.
2437         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd:
2438         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd:
2439         * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh:
2440         * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
2441         * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln:
2442         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2443         * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
2444         * JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd:
2445         * JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd:
2446         * JavaScriptCore.vcproj/jsc/jsc.vcproj:
2447         * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
2448         * JavaScriptCore.vcproj/jsc/jscPostBuild.cmd:
2449         * JavaScriptCore.vcproj/jsc/jscPreBuild.cmd:
2450         * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
2451         * JavaScriptCore.vcproj/testapi/testapiPostBuild.cmd:
2452         * JavaScriptCore.vcproj/testapi/testapiPreBuild.cmd:
2453
2454 2011-01-05  Brent Fulgham  <bfulgham@webkit.org>
2455
2456         Unreviewed build fix.
2457
2458         * wtf/Encoder.h: Add <stdint.h> include for systems that
2459         do not natively know about uint8_t, etc.
2460
2461 2011-01-05  Patrick Gansterer  <paroga@webkit.org>
2462
2463         Reviewed by Andreas Kling.
2464
2465         [CMake] Fix the usage of SOURCE_GROUP
2466         https://bugs.webkit.org/show_bug.cgi?id=51739
2467
2468         * CMakeLists.txt:
2469
2470 2011-01-05  Andras Becsi  <abecsi@webkit.org>
2471
2472         Reviewed by Csaba Osztrogonác.
2473
2474         [Qt][V8] Fix the build after recent changes.
2475
2476         * pcre/pcre.pri: Correct the path after Source was introduced.
2477
2478 2011-01-04  Steve Falkenburg  <sfalken@apple.com>
2479
2480         Build fix. Update path to FindSafari after source code reorganization.
2481
2482         * JavaScriptCore.vcproj/JavaScriptCore.sln:
2483
2484 2011-01-04  Daniel Bates  <dbates@rim.com>
2485
2486         Fix the Android build after changeset 74975 <http://trac.webkit.org/changeset/74975>
2487         (https://bugs.webkit.org/show_bug.cgi?id=51855).
2488
2489         * wtf/ThreadingPthreads.cpp: Add include of PassOwnPtr.h.
2490         (WTF::runThreadWithRegistration): Use -> instead of . to dereference pointer.
2491
2492 2011-01-04  Martin Robinson  <mrobinson@igalia.com>
2493
2494         Try to fix the EFL build.
2495
2496         * wtf/CMakeLists.txt: Remove PlatformRefPtr from the CMake source list.
2497
2498 2011-01-04  James Robinson  <jamesr@chromium.org>
2499
2500         Reviewed by Darin Adler.
2501
2502         StackBounds initialization in WTFThreadData should be guarded by #if USE(JSC)
2503         https://bugs.webkit.org/show_bug.cgi?id=51881
2504
2505         The StackBounds class is only used by JavaScriptCore.
2506
2507         * wtf/WTFThreadData.cpp:
2508         (WTF::WTFThreadData::WTFThreadData):
2509         * wtf/WTFThreadData.h:
2510         (WTF::WTFThreadData::resetCurrentIdentifierTable):
2511
2512 2011-01-03  Martin Robinson  <mrobinson@igalia.com>
2513
2514         Reviewed by Darin Adler.
2515
2516         Remove the last non-GObject usage of PlatformRefPtr and move the code to GRefPtr
2517         https://bugs.webkit.org/show_bug.cgi?id=51846
2518
2519         * GNUmakefile.am: Remove PlatformRefPtr.h from the sources list.
2520         * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
2521         * jit/ExecutableAllocator.h: Change references to PlatformRefPtr to RefPtr.
2522         (JSC::ExecutableAllocator::cacheFlush): Ditto.
2523         * wtf/PlatformRefPtr.h: Removed.
2524         * wtf/RandomNumber.cpp: Change references to PlatformRefPtr to RefPtr.
2525         (WTF::randomNumber): Ditto.
2526         * wtf/brew/RefPtrBrew.h: Ditto.
2527         (WTF::refIfNotNull): Added.
2528         (WTF::derefIfNotNull): Added.
2529         * wtf/brew/ShellBrew.h: Change references to PlatformRefPtr to RefPtr.
2530         (WTF::createRefPtrInstance): Modified to return a RefPtr.
2531         * wtf/gobject/GRefPtr.cpp: 
2532         (WTF::refGPtr): Moved from PlatformRefPtr here.
2533         (WTF::derefGPtr): Ditto.
2534         * wtf/gobject/GRefPtr.h: Ditto.
2535         (WTF::GRefPtr::GRefPtr): Ditto.
2536         (WTF::GRefPtr::~GRefPtr): Ditto.
2537         (WTF::GRefPtr::clear): Ditto.
2538         (WTF::GRefPtr::isHashTableDeletedValue): Ditto.
2539         (WTF::GRefPtr::get): Ditto.
2540         (WTF::GRefPtr::operator*): Ditto.
2541         (WTF::GRefPtr::operator->): Ditto.
2542         (WTF::GRefPtr::operator!): Ditto.
2543         (WTF::GRefPtr::operator UnspecifiedBoolType): Ditto.
2544         (WTF::GRefPtr::hashTableDeletedValue): Ditto.
2545         (WTF::::operator): Ditto.
2546         (WTF::::swap): Ditto.
2547         (WTF::swap): Ditto.
2548         (WTF::operator==): Ditto.
2549         (WTF::operator!=): Ditto.
2550         (WTF::static_pointer_cast): Ditto.
2551         (WTF::const_pointer_cast): Ditto.
2552         (WTF::getPtr): Ditto.
2553         (WTF::adoptGRef): Ditto.
2554         (WTF::refGPtr): Ditto.
2555         (WTF::derefGPtr): Ditto.
2556
2557 2011-01-04  Daniel Bates  <dbates@rim.com>
2558
2559         Reviewed by Adam Roben.
2560
2561         LEAK: Deallocate instance of ThreadFunctionInvocation if thread creation fails
2562         https://bugs.webkit.org/show_bug.cgi?id=51860
2563
2564         * wtf/ThreadingWin.cpp:
2565         (WTF::createThreadInternal):
2566
2567 2011-01-04  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
2568
2569         Reviewed by Ariya Hidayat.
2570
2571         [Qt][Symbian] Make sure that WebKit headers are included before platform headers on Symbian
2572         https://bugs.webkit.org/show_bug.cgi?id=31273
2573
2574         On Symbian PREPEND_INCLUDEPATH is the best way to make sure that WebKit headers
2575         are included before platform headers. On all other platforms continue to use
2576         INCLUDEPATH (as before). This is a continuation of r65877.
2577
2578         No new tests as there is no new functionality.
2579
2580         * JavaScriptCore.pri:
2581
2582 2011-01-04  Darin Adler  <darin@apple.com>
2583
2584         Try to fix Windows build.
2585
2586         * wtf/ThreadingWin.cpp: Added include of PassOwnPtr.h. Fixed paragraphing
2587         of conditional includes.
2588         (WTF::wtfThreadEntryPoint): Use -> instead of . to dereference pointer.
2589         (WTF::createThreadInternal): Tweaked #if to not need separate macro.
2590
2591 2011-01-04  Daniel Bates  <dbates@rim.com>
2592
2593         Reviewed by Adam Roben.
2594
2595         Extract ThreadFunctionInvocation into separate file and share between Apple Windows and Android
2596         https://bugs.webkit.org/show_bug.cgi?id=51855
2597
2598         Both the Apple Windows and Android ports implement a similar adapter structure,
2599         called ThreadFunctionInvocation and ThreadData respectively, as part of
2600         their thread creation process. Instead, we should share such an adapter
2601         structure and remove duplicate code.
2602
2603         * JavaScriptCore.gypi: Added header wtf/ThreadFunctionInvocation.h.
2604         * wtf/ThreadFunctionInvocation.h: Added.
2605         (WTF::ThreadFunctionInvocation::ThreadFunctionInvocation):
2606         * wtf/ThreadingPthreads.cpp: Removed Android-specific structure ThreadData; Instead, use ThreadFunctionInvocation.
2607         (WTF::runThreadWithRegistration):
2608         (WTF::createThreadInternal): 
2609         * wtf/ThreadingWin.cpp: Moved structure ThreadFunctionInvocation to its own file so that
2610         it can be shared with the Android implementation of createThreadInternal().
2611         (WTF::wtfThreadEntryPoint): Use OwnPtr to hold passed instance of ThreadFunctionInvocation.
2612
2613 2011-01-04  Daniel Bates  <dbates@rim.com>
2614
2615         Reviewed by Darin Adler.
2616
2617         Use __builtin_expect when compiling using RVCT in GNU mode
2618         https://bugs.webkit.org/show_bug.cgi?id=51866
2619
2620         Derived from a patch by Dave Tapuska.
2621
2622         * wtf/AlwaysInline.h:
2623
2624 2011-01-03  Darin Adler  <darin@apple.com>
2625
2626         Reviewed by Brady Eidson.
2627
2628         * wtf/Forward.h: Added Decoder and Encoder.
2629
2630 2011-01-03  Brady Eidson  <beidson@apple.com>
2631
2632         Reviewed by Darin Adler.
2633
2634         Add Encode/Decode machinery Darin and I plan to work with for back/forward stuff in WebKit2.
2635
2636         Starting out with a pure virtual interface to be implemented in WK2, but we might change that later.
2637
2638         * GNUmakefile.am:
2639         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2640         * JavaScriptCore.xcodeproj/project.pbxproj:
2641         * wtf/CMakeLists.txt:
2642
2643         * wtf/Decoder.h: Added.
2644         * wtf/Encoder.h: Added.
2645
2646 2011-01-03  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
2647
2648         Unreviewed build fix.
2649
2650         [Qt] Add NullPtr.cpp introduced in r71155 to the Qt build system.
2651
2652         This fix is required for builds where HAVE(NULLPTR) is false
2653         (e.g. some MSVC and Symbian builds).
2654
2655         * wtf/wtf.pri:
2656
2657 2011-01-02  Dan Bernstein  <mitz@apple.com>
2658
2659         Rubber-stamped by Simon Fraser.
2660
2661         <rdar://problem/8812159> Update copyright strings
2662
2663         * Info.plist:
2664
2665 2011-01-02  Csaba Osztrogonác  <ossy@webkit.org>
2666
2667         Fix GTK+ build after r74855.
2668
2669         Reviewed by Xan Lopez.
2670
2671         * GNUmakefile.am: Fix include pathes.
2672
2673 2011-01-02  Adam Barth  <abarth@webkit.org>
2674
2675         One more .. missing in the Qt build.
2676
2677         * jsc.pro:
2678
2679 2011-01-02  Xan Lopez  <xlopez@igalia.com>
2680
2681         Fix GTK+ build.
2682
2683         * GNUmakefile.am: add -I$(srcdir)/Source to the JSC cppflags so
2684         that anyone can include its headers without adding the prefix
2685         'Source/'.
2686
2687 2011-01-02  Carl Lobo  <carllobo@gmail.com>
2688
2689         Reviewed by Adam Barth.
2690
2691         Fix Windows Build for non-production where VSPropsRedirectionDir is not defined.
2692         https://bugs.webkit.org/show_bug.cgi?id=51797
2693
2694         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2695         * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh:
2696         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2697         * JavaScriptCore.vcproj/jsc/jsc.vcproj:
2698         * JavaScriptCore.vcproj/testapi/testapi.vcproj:
2699
2700 2011-01-01  Adam Barth  <abarth@webkit.org>
2701
2702         Fix relative include paths in an attempt to fix the Qt build.
2703
2704         * JavaScriptCore.pri:
2705         * JavaScriptCore.pro:
2706
2707 2011-01-01  Adam Barth  <abarth@webkit.org>
2708
2709         Another speculative build fix for GTK.
2710
2711         * GNUmakefile.am:
2712
2713 2011-01-01  Adam Barth  <abarth@webkit.org>
2714
2715         Speculative build fix for GTK.  Update the paths in GNUmakefile to
2716         include "Source".
2717
2718         * GNUmakefile.am:
2719
2720 2011-01-01  Adam Barth  <abarth@webkit.org>
2721
2722         Update relative paths in JavaScriptCore.gyp to account for the extra
2723         level of directories.
2724
2725         * JavaScriptCore.gyp/JavaScriptCore.gyp:
2726
2727 2010-12-31  Patrick Gansterer  <paroga@webkit.org>
2728
2729         Reviewed by Darin Adler.
2730
2731         Add a fast case for ASCII strings in HashAndUTF8CharactersTranslator::equal
2732         https://bugs.webkit.org/show_bug.cgi?id=50517
2733
2734         This change shows about 2% performance win on the xml-parser benchmark.
2735
2736         * wtf/text/AtomicString.cpp:
2737         (WTF::HashAndUTF8CharactersTranslator::equal):
2738
2739 2010-12-30  Patrick Gansterer  <paroga@webkit.org>
2740
2741         Reviewed by Ariya Hidayat.
2742
2743         [CMake] Add WTF_HEADERS
2744         https://bugs.webkit.org/show_bug.cgi?id=51741
2745
2746         Add the WTF headers to show them in Visual Studio.
2747
2748         * wtf/CMakeLists.txt:
2749         * wtf/CMakeListsWinCE.txt:
2750
2751 2010-12-30  Konstantin Tokarev  <annulen@yandex.ru>
2752
2753         Reviewed by David Kilzer.
2754
2755         [Qt] Don't build wtf/TCSystemAlloc.cpp if --system-malloc option is
2756         used
2757         https://bugs.webkit.org/show_bug.cgi?id=51672
2758
2759         * wtf/wtf.pri: Replaced USE_SYSTEM_MALLOC with USE_SYSTEM_MALLOC=1
2760
2761 2010-12-30  Patrick Gansterer  <paroga@webkit.org>
2762
2763         Reviewed by Darin Adler.
2764
2765         Use OS(WINDOWS) instead of COMPILER(MSVC) in FastMalloc.cpp
2766         https://bugs.webkit.org/show_bug.cgi?id=51743
2767
2768         Most of the ifdefs belong to windows and not to the MSVC compiler.
2769
2770         * wtf/FastMalloc.cpp:
2771
2772 2010-12-29  Gavin Barraclough  <barraclough@apple.com>
2773
2774         Reviewed by Sam Weinig.
2775
2776         Bug 51724 - In strict mode string literals should allow \0, but disallow \8 and \9.
2777
2778         * parser/Lexer.cpp:
2779         (JSC::Lexer::parseString):
2780
2781 2010-12-29  Helder Correia  <helder@sencha.com>
2782
2783         Reviewed by Eric Seidel.
2784
2785         <VT> and <FF> are not valid JSON whitespace characters
2786         https://bugs.webkit.org/show_bug.cgi?id=51671
2787
2788         Vertical Tab and Form Feed are not allowed white spaces by the JSON
2789         RFC 4627: http://www.ietf.org/rfc/rfc4627.txt (2. JSON Grammar).
2790
2791         Tests: ietestcenter/Javascript/15.12.1.1-0-2.html
2792                ietestcenter/Javascript/15.12.1.1-0-3.html
2793
2794         * runtime/LiteralParser.cpp:
2795         (JSC::isJSONWhiteSpace):
2796         (JSC::LiteralParser::Lexer::lex):
2797
2798 2010-12-28  Helder Correia  <helder@sencha.com>
2799
2800         Reviewed by Eric Seidel.
2801
2802         JSON.stringify must exist as a function taking 3 parameters
2803         https://bugs.webkit.org/show_bug.cgi?id=51667
2804
2805         The reported function length is 1 instead.
2806
2807         Test: ietestcenter/Javascript/15.12.3-0-2.html
2808
2809         * runtime/JSONObject.cpp:
2810
2811 2010-12-28  Helder Correia  <helder@sencha.com>
2812
2813         Reviewed by Sam Weinig.
2814
2815         JSON.parse must exist as a function taking 2 parameters
2816         https://bugs.webkit.org/show_bug.cgi?id=51666
2817
2818         Support for revivers was introduced in bug 26591, but the function
2819         length has since remained unchanged.
2820
2821         Test: ietestcenter/Javascript/15.12.2-0-2.html
2822
2823         * runtime/JSONObject.cpp:
2824
2825 2010-12-27  Jake Helfert  <jake@jakeonthenet.com>
2826
2827         Reviewed and reworked by Darin Adler.
2828
2829         Building WebKit with Visual Studio 2010 fails due
2830         to ambiguous assignment operator errors.
2831         https://bugs.webkit.org/show_bug.cgi?id=51116
2832
2833         * wtf/NullPtr.h: Added a HAVE(NULLPTR) definition for use with
2834         Platform.h HAVE macro, and included the Visual Studio 2010 compiler
2835         as one of the ones that has nullptr.
2836         * wtf/NullPtr.cpp: Updated condition to match.
2837         
2838         * wtf/PassOwnArrayPtr.h: Don't include the operator=(nullptr_t)
2839         overload if we are compiling in loose mode and the compiler has
2840         nullptr, because assignment of 0 will otherwise encounter
2841         ambiguitity with this overload and the overload for loose mode
2842         that takes a raw pointer. The conditional can be removed when we
2843         get rid of loose mode.
2844         * wtf/PassOwnPtr.h: Ditto.
2845
2846         * wtf/PassRefPtr.h: Don't include the operator=(nullptr_t) overload
2847         if the compiler has nullptr, because assignment of 0 would be
2848         ambiguous with the overload that takes a raw pointer. The conditional
2849         can be removed if we ever decide we no longer need to support
2850         assigning 0, but might need a way to catch that usage on older compilers.
2851         * wtf/RefPtr.h: Ditto.
2852         * wtf/RetainPtr.h: Ditto
2853
2854         * JavaScriptCore.xcodeproj/project.pbxproj: Added NullPtr.cpp,
2855         accidentally omitted when the file was first added.
2856
2857 2010-12-26  Xan Lopez  <xlopez@igalia.com>
2858
2859         Reviewed by Eric Seidel.
2860
2861         [GTK] Add standalone target for JSC
2862         https://bugs.webkit.org/show_bug.cgi?id=51607
2863
2864         * GNUmakefile.am: add convenience target to only build jsc and its
2865         dependencies.
2866
2867 2010-12-24  Patrick Gansterer  <paroga@webkit.org>
2868
2869         Reviewed by Eric Seidel.
2870
2871         [WINCE] Add CPU(MIPS) detection
2872         https://bugs.webkit.org/show_bug.cgi?id=51342
2873
2874         WinCE usually defines MIPS and _MIPS_.
2875
2876         * wtf/Platform.h:
2877
2878 2010-12-23  Gavin Barraclough  <barraclough@apple.com>
2879
2880         Reviewed by Sam Weinig.
2881
2882         Rename RegexCompiler.cpp to RegexPattern.cpp.
2883         Implicitly call compileRegex from RegexPattern's constructor.
2884
2885         * Android.mk:
2886         * CMakeLists.txt:
2887         * GNUmakefile.am:
2888         * JavaScriptCore.gypi:
2889         * JavaScriptCore.pro:
2890         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2891         * JavaScriptCore.xcodeproj/project.pbxproj:
2892         * runtime/RegExp.cpp:
2893         (JSC::RegExp::compile):
2894         * yarr/RegexCompiler.cpp: Removed.
2895         * yarr/RegexCompiler.h: Removed.
2896         * yarr/RegexInterpreter.cpp:
2897         * yarr/RegexJIT.cpp:
2898         * yarr/RegexPattern.cpp: Copied from JavaScriptCore/yarr/RegexCompiler.cpp.
2899         (JSC::Yarr::compileRegex):
2900         (JSC::Yarr::RegexPattern::RegexPattern):
2901         * yarr/RegexPattern.h:
2902
2903 2010-12-23  Patrick Gansterer  <paroga@webkit.org>
2904
2905         Unreviewed build fix for WinCE after r74360.
2906
2907         Move the OS(WINDOWS) section after the OS(WINCE) section
2908         and add missing argument to the getStackMax call.
2909
2910         * wtf/StackBounds.cpp:
2911         (WTF::StackBounds::initialize):
2912
2913 2010-12-22  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
2914
2915         Unreviewed build fix.
2916
2917         [Symbian] Make sure OSAllocatorSymbian builds
2918
2919         This patch only addresses the build problem.
2920
2921         https://bugs.webkit.org/show_bug.cgi?id=51128 tracks the full
2922         (re)implementation of the Symbian allocator.
2923
2924         * wtf/OSAllocatorSymbian.cpp:
2925         (WTF::OSAllocator::reserveUncommitted):
2926         (WTF::OSAllocator::reserveAndCommit):
2927         (WTF::OSAllocator::commit):
2928
2929 2010-12-22  Dan Bernstein  <mitz@apple.com>
2930
2931         Changed WebKitTools to Tools.
2932
2933         * JavaScriptCore.vcproj/JavaScriptCore.sln:
2934
2935 2010-12-22  Dan Bernstein  <mitz@apple.com>
2936
2937         Rubber-stamped by Mark Rowe.
2938
2939         Changed WebKitTools to Tools in script build phases.
2940
2941         * JavaScriptCore.xcodeproj/project.pbxproj:
2942
2943 2010-12-22  Andrei Popescu  <andreip@google.com>
2944
2945         Unreviewed build fix.
2946
2947         Fix Chromium Linux shared library build.
2948         [Chromium] r74431 broke the Chromium Linux shared library build
2949         https://bugs.webkit.org/show_bug.cgi?id=51462
2950
2951         * JavaScriptCore.gyp/JavaScriptCore.gyp:
2952         * JavaScriptCore.gypi:
2953
2954 2010-12-21  Sheriff Bot  <webkit.review.bot@gmail.com>
2955
2956         Unreviewed, rolling out r74462.
2957         http://trac.webkit.org/changeset/74462
2958         https://bugs.webkit.org/show_bug.cgi?id=51449
2959
2960         broke chromium win (Requested by tonyg-cr on #webkit).
2961
2962         * JavaScriptCore.gypi:
2963
2964 2010-12-21  Tony Gentilcore  <tonyg@chromium.org>
2965
2966         Unreviewed build fix.
2967
2968         [chromium] Build fix after r74431
2969         https://bugs.webkit.org/show_bug.cgi?id=51447
2970
2971         * JavaScriptCore.gypi:
2972
2973 2010-12-21  Gavin Barraclough  <barraclough@apple.com>
2974
2975         Windows build fix.
2976
2977         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2978
2979 2010-12-21  Gavin Barraclough  <barraclough@apple.com>
2980
2981         Windows build fix.
2982
2983         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2984
2985 2010-12-21  Gavin Barraclough  <barraclough@apple.com>
2986
2987         Speculative build fix.
2988
2989         * jit/ExecutableAllocator.cpp:
2990         (JSC::ExecutableAllocator::underMemoryPressure):
2991
2992 2010-12-21  Gavin Barraclough  <barraclough@apple.com>
2993
2994         Reviewed by Oliver Hunt.
2995
2996         Bug 26276 - Need a mechanism to determine stack extent
2997
2998         This patch adds accurate stack size calculation for:
2999             DARWIN, QNX, UNIX
3000         We still need to fix:
3001             WINDOWS, SOLARIS, OPENBSD, SYMBIAN, HAIKU, WINCE
3002
3003         * wtf/StackBounds.cpp:
3004         (WTF::StackBounds::initialize):
3005
3006 2010-12-21  Gavin Barraclough  <barraclough@apple.com>
3007
3008          Reviewed by Geoff Garen.
3009  
3010         <rdar://problem/8765333> CRASH running out of executable memory, loading io9.com
3011         https://bugs.webkit.org/show_bug.cgi?id=51443
3012
3013         The problem here is that each page uses a reasonable amount of memory, (~4Mb),
3014         and that when miultiple pages are open we keep all JIT code for all functions
3015         in all pages alive.
3016
3017         Add a check to detect high memory pressure situations in the executable allocator
3018         (>50% of available memory allocated), and upon a top level entry into JSC (no code
3019         running on the stack) in this situation throw away all JIT code.
3020
3021         * JavaScriptCore.exp:
3022         * debugger/Debugger.cpp:
3023         (JSC::Debugger::recompileAllJSFunctions): stop passing exec to recompile.
3024         * jit/ExecutableAllocator.h:
3025         * jit/ExecutableAllocatorFixedVMPool.cpp:
3026         (JSC::ExecutablePool::systemAlloc): Count allocations.
3027         (JSC::ExecutablePool::systemRelease): Count deallocations.
3028         (JSC::ExecutablePool::underMemoryPressure): Check memory pressure.
3029         * jit/ExecutableAllocatorPosix.cpp:
3030         (JSC::ExecutablePool::underMemoryPressure): Stub out; only meaningful with FixedVMPool.
3031         * jit/ExecutableAllocatorWin.cpp:
3032         (JSC::ExecutablePool::underMemoryPressure): Stub out; only meaningful with FixedVMPool.
3033         * runtime/Executable.cpp:
3034         (JSC::FunctionExecutable::recompile): Remove ExecState argument to recompile.
3035         * runtime/Executable.h:
3036         * runtime/JSGlobalData.cpp:
3037         (JSC::JSGlobalData::recompileAllJSFunctions): throws away all JIT code.
3038         * runtime/JSGlobalData.h:
3039         * runtime/JSGlobalObject.h:
3040         (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): add check / call to throw away.
3041
3042 2010-12-21  Gavin Barraclough  <barraclough@apple.com>
3043
3044         Reviewed by Geoff Garen.
3045
3046         <rdar://problem/8241425> JIT executable memory excessive usage due to regex caching
3047         https://bugs.webkit.org/show_bug.cgi?id=51434
3048
3049         Reduce the amount of memory the RegExpCache can hold on to on iOS.
3050         Currently the RegExpCache can hold 256 RegExp objects. If each falls into a separate
3051         ExecutablePool, with a common size of 16Kb, this means we end up holding onto 4Mb of
3052         memory. Firstly, we can reduce this by simply reducing the size of the cache to 32
3053         entries. Secondly, we can use a separate set of ExecutablePools for JIT code generated
3054         from RegExp objects. This helps in two ways (1) it increases the probability that
3055         RegExps in the cache share the same pool, and (2) it means that a RegExp can't end
3056         up holding on to a large ExecutablePool containing a translation of JS code.
3057         (A RegExp could end up keeping a larger RegExp alive that happened to be sharing the
3058         same pool, but large RegExp patterns are less common).
3059
3060         * runtime/JSGlobalData.h:
3061         * runtime/RegExpCache.h:
3062         * yarr/RegexJIT.cpp:
3063         (JSC::Yarr::RegexGenerator::compile):
3064
3065 2010-12-21  Gavin Barraclough  <barraclough@apple.com>
3066
3067         Windows build fix.
3068
3069         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3070
3071 2010-12-21  Gavin Barraclough  <barraclough@apple.com>
3072
3073         Eeeep! build fix!
3074
3075         * wtf/OSAllocator.h:
3076         (WTF::OSAllocator::decommitAndRelease):
3077
3078 2010-12-21  Gavin Barraclough  <barraclough@apple.com>
3079
3080         Ooops, fixed typo in comment.
3081
3082         * wtf/OSAllocator.h:
3083
3084 2010-12-21  Geoffrey Garen  <ggaren@apple.com>
3085
3086         Reviewed by Gavin Barraclough & Oliver Hunt.
3087
3088         Added PageAllocationAligned, a cross-platform abstraction for memory allocations with arbitrary alignment requirements
3089         https://bugs.webkit.org/show_bug.cgi?id=51359
3090         
3091         I think this patch fixes <rdar://problem/8107952> [5.0.1] WER crash in
3092         Heap::allocateBlock (1902752929), and some other leaks and crashes as well.
3093
3094         * Android.mk:
3095         * CMakeLists.txt:
3096         * GNUmakefile.am:
3097         * JavaScriptCore.gypi:
3098         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
3099         * JavaScriptCore.xcodeproj/project.pbxproj: Updated build files.
3100
3101         * runtime/AlignedMemoryAllocator.h: Removed. Supplanted by
3102         PageAllocationAligned.
3103
3104         * runtime/Collector.cpp:
3105         (JSC::Heap::destroy):
3106         (JSC::Heap::allocateBlock):
3107         (JSC::Heap::freeBlock):
3108         (JSC::Heap::addWeakGCHandle):
3109         * runtime/Collector.h: Switched from AlignedMemoryAllocator to
3110         PageAllocationAligned.
3111
3112         * runtime/GCHandle.cpp:
3113         * runtime/GCHandle.h: Ditto.
3114
3115         * wtf/PageAllocation.h:
3116         (WTF::PageAllocation::PageAllocation): Removed aligned memory allocation
3117         functions. Supplanted by PageAllocationAligned.
3118
3119         * wtf/PageAllocationAligned.cpp: Added.
3120         (WTF::PageAllocationAligned::allocate):
3121         (WTF::PageAllocationAligned::deallocate):
3122         * wtf/PageAllocationAligned.h: Added.
3123         (WTF::PageAllocationAligned::PageAllocationAligned): New cross-platform
3124         class for doing aligned memory allocation. This class properly matches
3125         allocation and deallocation library calls, fixing a long-standing bug
3126         in PageAllocation.
3127
3128         * wtf/Platform.h: Removed some defunction VM platform defines.
3129
3130         * wtf/wtf.pri: Updated build files.
3131
3132 2010-12-21  Oliver Hunt  <oliver@apple.com>
3133
3134         Reviewed by Gavin Barraclough.
3135
3136         ASSERTION FAILED: base->index() == m_codeBlock->argumentsRegister() while loading taobao.com
3137         https://bugs.webkit.org/show_bug.cgi?id=49006
3138
3139         This problem was caused by having a parameter named 'arguments'.
3140         The fix is to treat parameters named 'arguments' as shadowing
3141         the actual arguments property, and so logically turn the function
3142         into one that doesn't "use" arguments.
3143
3144         This required a bit of fiddling in the parser to ensure we correctly
3145         propagate the 'feature' of shadowing is set correctly.
3146
3147         * bytecompiler/BytecodeGenerator.cpp:
3148         (JSC::BytecodeGenerator::createArgumentsIfNecessary):
3149           Change assertion to an early return as we may now reference
3150           a property named 'arguments' without being in a function that
3151           has the ArgumentsFeature
3152         * parser/JSParser.cpp:
3153         (JSC::JSParser::Scope::Scope):
3154         (JSC::JSParser::Scope::declareParameter):
3155         (JSC::JSParser::Scope::shadowsArguments):
3156         (JSC::JSParser::parseProgram):
3157         (JSC::JSParser::parseFormalParameters):
3158         (JSC::JSParser::parseFunctionInfo):
3159         * parser/Nodes.h:
3160         (JSC::ScopeNode::usesArguments):
3161
3162 2010-12-21  Daniel Bates  <dbates@rim.com>
3163
3164         Reviewed by Eric Seidel and Darin Adler.
3165
3166         Deallocate GregorianDateTime.timeZone (if allocated) when copying so that we don't leak memory.
3167         https://bugs.webkit.org/show_bug.cgi?id=51367
3168
3169         Inspired by a patch by George Staikos.
3170
3171         * wtf/DateMath.cpp:
3172         (JSC::msToGregorianDateTime): Modified to set timeZone to nullptr since timeZone is now
3173         of type OwnPtrArray<char>.
3174         * wtf/DateMath.h: Change timeZone to type OwnArrayPtr<char>; Removed destructor since it is no longer needed.
3175         (JSC::GregorianDateTime::GregorianDateTime): Modified to use OwnPtrArray semantics for timeZone.
3176         (JSC::GregorianDateTime::operator tm): Ditto.
3177         (JSC::GregorianDateTime::copyFrom): Ditto.
3178
3179 2010-12-21  Sheriff Bot  <webkit.review.bot@gmail.com>
3180
3181         Unreviewed, rolling out r74402.
3182         http://trac.webkit.org/changeset/74402
3183         https://bugs.webkit.org/show_bug.cgi?id=51402
3184
3185         This patch broke the Windows 7 Release Layout Tests (Requested
3186         by jessieberlin on #webkit).
3187
3188         * wtf/StackBounds.cpp:
3189         (WTF::estimateStackBound):
3190         (WTF::StackBounds::initialize):
3191
3192 2010-12-21  Peter Varga  <pvarga@inf.u-szeged.hu>
3193
3194         Reviewed by Csaba Osztrogonác.
3195
3196         Unify the name of parentheses in YARR: rename parenthesis to
3197         parentheses.
3198
3199         * yarr/RegexCompiler.cpp:
3200         (JSC::Yarr::RegexPatternConstructor::atomParenthesesEnd):
3201
3202 2010-12-21  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
3203
3204         Reviewed by Andreas Kling.
3205
3206         [Qt] Set BUILDING_QT__ consistently
3207         https://bugs.webkit.org/show_bug.cgi?id=51341
3208
3209         * JavaScriptCore.pri: Remove the definition of BUILDING_QT__ as it
3210         is already defined in WebKit.pri.
3211
3212 2010-12-20  Gavin Barraclough  <barraclough@apple.com>
3213
3214         Reviewed by Oliver Hunt.
3215
3216         Bug 26276 - Need a mechanism to determine stack extent
3217
3218         This patch adds accurate stack size calculation for:
3219             DARWIN, WINDOWS, QNX, UNIX
3220         We still need to fix:
3221             SOLARIS, OPENBSD, SYMBIAN, HAIKU, WINCE
3222
3223         * wtf/StackBounds.cpp:
3224         (WTF::StackBounds::initialize):
3225
3226 2010-12-20  Gavin Barraclough  <barraclough@apple.com>
3227
3228         PPC build fix; stop using std::swap on PageAllocation/PageReservation,
3229         this was failing on some compilers since the lack of default construction
3230         for the m_executable/m_writable fields meant the value being swapped may
3231         not have been fully initialized.
3232
3233         * wtf/PageAllocation.h:
3234         (WTF::PageAllocation::deallocate):
3235         * wtf/PageBlock.h:
3236         * wtf/PageReservation.h:
3237         (WTF::PageReservation::deallocate):
3238
3239 2010-12-20  Oliver Hunt  <oliver@apple.com>
3240
3241         Reviewed by Geoffrey Garen.
3242
3243         |delete name| in strict mode code should be an early error
3244         https://bugs.webkit.org/show_bug.cgi?id=50431
3245
3246         Disallow the |delete IDENTIFIER| production in strict mode, and removed
3247         a bunch of now unnecessary code.
3248
3249         * parser/JSParser.cpp:
3250         (JSC::JSParser::Scope::collectFreeVariables):
3251         (JSC::jsParse):
3252         (JSC::JSParser::parseProgram):
3253         (JSC::JSParser::parseUnaryExpression):
3254         * parser/JSParser.h:
3255         * parser/Parser.cpp:
3256         (JSC::Parser::parse):
3257         * parser/Parser.h:
3258         (JSC::Parser::parse):
3259
3260 2010-12-20  Gavin Barraclough  <barraclough@apple.com>
3261
3262         Reviewed by Olver Hunt.
3263
3264         Bug 51358 - Should check stack depth rather than using recursion limits in byte compilation
3265
3266         The current implementation of recursion limit checking is not safe on smaller stacks.
3267         Switch to using a common mechanism, shared with the parser, to check recursion limits.
3268
3269         Make bytecompiler use StackBounds. Empirical testing shows emitStrcat to have the largest
3270         footprint on the stack, at just under 1k on x86-64.  Given this, the default recursion
3271         check (requiring 4k of available space to recurse) seems reasonable.
3272
3273         * bytecompiler/BytecodeGenerator.cpp:
3274         (JSC::BytecodeGenerator::BytecodeGenerator):
3275         * bytecompiler/BytecodeGenerator.h:
3276         (JSC::BytecodeGenerator::emitNode):
3277         (JSC::BytecodeGenerator::emitNodeInConditionContext):
3278         * bytecompiler/NodesCodegen.cpp:
3279         (JSC::BinaryOpNode::emitStrcat):
3280
3281 2010-12-20  Tony Gentilcore  <tonyg@chromium.org>
3282
3283         Unreviewed build fix.
3284
3285         Include pthread to fix chromium mac build (broken by r74360)
3286         https://bugs.webkit.org/show_bug.cgi?id=51356
3287
3288         * wtf/StackBounds.cpp:
3289
3290 2010-12-20  Xan Lopez  <xlopez@igalia.com>
3291
3292         Reviewed by Gustavo Noronha.
3293
3294         * GNUmakefile.am: add missing files.
3295
3296 2010-12-18  Gavin Barraclough  <barraclough@apple.com>
3297
3298         Reviewed by Oliver Hunt.
3299
3300         Bug 26276 - Need a mechanism to determine stack extent
3301
3302         This patch adds a class 'StackBounds', to hold information about the machine stack.
3303         The implementation of this class broadly adheres to the current implmentation of
3304         stack limit checking, and as such does not solve the problem of determining stack
3305         extent, but gives us a common place to do so.
3306
3307         Currently two mechanism are provided to determine the stack origin (the point the
3308         stack is growing away from). currentThreadStackBase() in Collector provides a
3309         more accurate determination of the stack origin, so use this to calculate
3310         StackBounds::m_origin; WTFThreadData::approximatedStackStart is less accurate, and
3311         as such can be removed.  Cache the StackBounds on WTFThreadData such that they
3312         need only be determined once per thread, and for non-API contexts cache this
3313         information in JSGlobalData, to save a thread-specific access.
3314
3315         For the time being retain the estimate of stack size used by JSC's parser
3316         (128 * sizeof(void*) * 1024), with a view to replacing this with something more
3317         accurate in the near future.
3318
3319         * parser/JSParser.cpp:
3320         (JSC::JSParser::canRecurse):
3321         (JSC::JSParser::JSParser):
3322             Change to use StackBounds.
3323         * runtime/Collector.cpp:
3324         (JSC::Heap::registerThread):
3325         (JSC::Heap::markCurrentThreadConservativelyInternal):
3326             Change to use StackBounds, cached on JSGlobalData.
3327         * runtime/JSGlobalData.cpp:
3328         (JSC::JSGlobalData::JSGlobalData):
3329         * runtime/JSGlobalData.h:
3330         (JSC::JSGlobalData::stack):
3331             Add a cached copy of StackBounds.
3332         * wtf/StackBounds.cpp: Copied from JavaScriptCore/runtime/Collector.cpp.
3333         (WTF::estimateStackBound):
3334         (WTF::StackBounds::initialize):
3335         (WTF::getStackMax):
3336             Copy code from Collector.cpp to determine stack origin.
3337         * wtf/StackBounds.h: Added.
3338         (WTF::StackBounds::StackBounds):
3339             No argument constructor; returns a null StackBounds.
3340         (WTF::StackBounds::currentThreadStackBounds):
3341             Returns a StackBounds object representing the stack limits
3342             of the current thread.
3343         (WTF::StackBounds::origin):
3344             Returns to stack origin (the point the stack is growing away
3345             from; the highest extent of the stack on machines where the
3346             stack grows downwards.
3347         (WTF::StackBounds::recursionLimit):
3348             Returns a limit value that is 'a comfortable distance from
3349             the end of the stack'. Our concept of this is currently 1 page
3350             away from the end, however the default value may be tuned in
3351             the future, and clients may override passing a larger delta;
3352             should only be called on StackBounds object representing the
3353             stack of the thread this method is called on (checked by
3354             checkConsistency).
3355         (WTF::StackBounds::recursionCheck):
3356             Checks whether we are currently 'a comfortable distance from
3357             the end of the stack'. Our concept of this is currently 1 page
3358             away from the end, however the default value may be tuned in
3359             the future, and clients may override passing a larger delta
3360             to apply when checking, if they wish to do so. This method
3361             should only be called on StackBounds object representing the
3362             stack of the thread this method is called on (checked by
3363             checkConsistency).
3364         (WTF::StackBounds::current):
3365             Approximate current stack position. On machines where the stack
3366             is growing downwards this is the lowest address that might need
3367             conservative collection.
3368         (WTF::StackBounds::isGrowingDownward):
3369             True for all platforms other than WINCE, which has to check.
3370         (WTF::StackBounds::checkConsistency):
3371             This is called in methods that shoulds only be operating on a
3372             valid set of bounds; as such we expect m_origin != m_bounds
3373             (i.e. stack size != zero) - we're really testing that this
3374             object is not null (the constructor initializes both fields
3375             to zero).  Also checks that current() is within the stack's
3376             bounds.
3377         * wtf/WTFThreadData.cpp:
3378         (WTF::WTFThreadData::WTFThreadData):
3379         * wtf/WTFThreadData.h:
3380         (WTF::WTFThreadData::stack):
3381             Add the StackBounds member variable.
3382
3383 2010-12-17  Geoffrey Garen  <ggaren@apple.com>
3384
3385         Reviewed by Sam Weinig.
3386
3387         Factored common page set management into a new PageBlock base class
3388         https://bugs.webkit.org/show_bug.cgi?id=51285
3389
3390         * Android.mk:
3391         * CMakeLists.txt:
3392         * GNUmakefile.am:
3393         * JavaScriptCore.gypi:
3394         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
3395         * JavaScriptCore.xcodeproj/project.pbxproj:
3396         * interpreter/RegisterFile.h:
3397         (JSC::RegisterFile::RegisterFile):
3398         * jit/ExecutableAllocator.cpp:
3399         (JSC::ExecutableAllocator::intializePageSize):
3400         * wtf/PageAllocation.cpp: Removed.
3401         * wtf/PageAllocation.h:
3402         (WTF::PageAllocation::deallocate):
3403         (WTF::PageAllocation::PageAllocation):
3404         * wtf/PageReservation.h:
3405         (WTF::PageReservation::commit):
3406         (WTF::PageReservation::decommit):
3407         (WTF::PageReservation::deallocate):
3408         (WTF::PageReservation::PageReservation):
3409         * wtf/wtf.pri:
3410
3411 2010-12-17  Michael Saboff  <msaboff@apple.com>
3412
3413         Reviewed by Oliver Hunt.
3414
3415         RegExp Jit'ed expression crashes clicking link on yelp.com
3416         https://bugs.webkit.org/show_bug.cgi?id=51284
3417
3418         When transitioning between an non-repeating beginning of line
3419         anchored expression and the remaining refactored repeating 
3420         expression, we should not clear any residual datalabel in 
3421         state's m_backtrack.  It will be resolved and cleared in subsequent
3422         code when linkAlternativeBacktracks() is called for the repeating
3423         alternative(s).
3424
3425         * yarr/RegexJIT.cpp:
3426         (JSC::Yarr::RegexGenerator::BacktrackDestination::clear):
3427         (JSC::Yarr::RegexGenerator::TermGenerationState::clearBacktrack):
3428
3429 2010-12-17  Dan Bernstein  <mitz@apple.com>
3430
3431         Rubber-stamped by Mark Rowe.
3432
3433         Updated for the renaming of WebKitTools to Tools
3434
3435         * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh:
3436
3437 2010-12-17  Ariya Hidayat  <ariya@sencha.com>
3438
3439         Reviewed by Oliver Hunt.
3440
3441         [JSC] parseAssignmentExpression should use TreeBuilder::CreatesAST
3442         https://bugs.webkit.org/show_bug.cgi?id=51268
3443
3444         * parser/JSParser.cpp:
3445         (JSC::JSParser::parseAssignmentExpression):
3446
3447 2010-12-17  Geoffrey Garen  <ggaren@apple.com>
3448
3449         Reviewed by Oliver Hunt.
3450
3451         Removed RChunk from PageAllocation/PageReservation, since it's now unused.
3452         https://bugs.webkit.org/show_bug.cgi?id=51276
3453
3454         * wtf/PageAllocation.h:
3455         (WTF::PageAllocation::PageAllocation):
3456         * wtf/PageReservation.h:
3457         (WTF::PageReservation::PageReservation):
3458
3459 2010-12-17  Oliver Hunt  <oliver@apple.com>
3460
3461         Reviewed by Gavin Barraclough.
3462
3463         Incorrect encoding of some constants in ARMv7 JIT
3464         https://bugs.webkit.org/show_bug.cgi?id=51273
3465         <rdar://problem/8650210>
3466
3467         When using immediate encoding 3 we need to write the byte
3468         that holds a duplicated value.
3469
3470         * assembler/ARMv7Assembler.h:
3471         (JSC::ARMThumbImmediate::makeEncodedImm):
3472
3473 2010-12-16  Evan Martin  <evan@chromium.org>
3474
3475         Reviewed by Darin Fisher.
3476
3477         [chromium] useless warnings when building on Windows
3478         https://bugs.webkit.org/show_bug.cgi?id=50985
3479
3480         Disable some compiler warnings that aren't indicative of real problems.
3481
3482         * JavaScriptCore.gyp/JavaScriptCore.gyp:
3483
3484 2010-12-16  Pratik Solanki  <psolanki@apple.com>
3485
3486         Reviewed by Geoffrey Garen.
3487
3488         https://bugs.webkit.org/show_bug.cgi?id=51166
3489         ExecutableAllocator::cacheFlush should call sys_cache_control
3490
3491         * jit/ExecutableAllocator.h:
3492         (JSC::ExecutableAllocator::cacheFlush): Use the more correct and forward looking API -
3493         sys_cache_control(kCacheFunctionPrepareForExecution,...).
3494
3495 2010-12-16  Ariya Hidayat  <ariya@sencha.com>
3496
3497         Reviewed by Andreas Kling.
3498
3499         [JSC] Const correctness in ASTBuilder and SyntaxChecker
3500         https://bugs.webkit.org/show_bug.cgi?id=51141
3501
3502         * parser/ASTBuilder.h:
3503         (JSC::ASTBuilder::getName):
3504         (JSC::ASTBuilder::getType):
3505         (JSC::ASTBuilder::isResolve):
3506         * parser/SyntaxChecker.h:
3507         (JSC::SyntaxChecker::operatorStackPop):
3508
3509 2010-12-15  Kenneth Russell  <kbr@google.com>
3510
3511         Reviewed by James Robinson.
3512
3513         Web Audio API: port FFTFrame to MKL
3514         https://bugs.webkit.org/show_bug.cgi?id=50986
3515
3516         Fixed bug in log2 emulation function provided for Windows port of
3517         Web Audio API.
3518
3519         * wtf/MathExtras.h:
3520         (log2):
3521
3522 2010-12-14  Mark Rowe  <mrowe@apple.com>
3523
3524         Reviewed by Sam Weinig.
3525
3526         <http://webkit.org/b/51064> Reproducible crash inside WebCore::MediaPlayerPrivateQTKit::createQTMovie when loading <video>
3527
3528         * wtf/text/WTFString.h: Prevent String from being implicitly convertable to bool.
3529         It was previously implicitly convertible to bool on Mac via operator NSString*,
3530         but since that always has a non-zero return value it would give unexpected results.
3531
3532 2010-12-14  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
3533
3534         Reviewed by Eric Seidel.
3535
3536         [Qt] [Symbian] Do not use pkg-config on Symbian as it is