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