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