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