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