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