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