1 2011-01-28 Geoffrey Garen <ggaren@apple.com>
3 Reviewed by Maciej Stachowiak.
5 Some more Heap cleanup.
6 https://bugs.webkit.org/show_bug.cgi?id=53357
9 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Updated exported symbols.
12 (JSC::Heap::reportExtraMemoryCostSlowCase): Renamed recordExtraCost to
13 reportExtraMemoryCostSlowCase to match our naming conventions.
15 (JSC::Heap::capacity): Renamed size to capacity because this function
16 returns the capacity of the heap, including unused portions.
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
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.
30 * runtime/MarkedSpace.h: Removed statistics and the Statistics class because
31 the same information can be gotten just by calling size() and capacity().
33 * runtime/MemoryStatistics.cpp:
34 * runtime/MemoryStatistics.h: Ditto.
36 2011-01-29 Daniel Bates <dbates@rim.com>
38 Reviewed by Eric Seidel.
40 Move wince/mt19937ar.c to ThirdParty and make it a policy choice
41 https://bugs.webkit.org/show_bug.cgi?id=53253
43 Make inclusion of MT19937 a policy decision.
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.
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).
57 2011-01-29 Cameron Zwarich <zwarich@apple.com>
59 Reviewed by David Kilzer.
61 Bug 53374 - Remove uses of unsafe string functions in debugging code
62 https://bugs.webkit.org/show_bug.cgi?id=53374
65 (JSC::RegExp::printTraceData):
67 2011-01-29 Cameron Zwarich <zwarich@apple.com>
69 Reviewed by Oliver Hunt.
71 JavaScriptCoreUseJIT environment variable broken
72 https://bugs.webkit.org/show_bug.cgi?id=53372
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.
78 2011-01-29 Patrick Gansterer <paroga@webkit.org>
80 Reviewed by David Kilzer.
82 Move CharacterNames.h into WTF directory
83 https://bugs.webkit.org/show_bug.cgi?id=49618
86 * JavaScriptCore.gypi:
87 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
88 * JavaScriptCore.xcodeproj/project.pbxproj:
90 * wtf/unicode/CharacterNames.h: Renamed from WebCore/platform/text/CharacterNames.h.
91 * wtf/unicode/UTF8.cpp:
93 2011-01-28 Simon Fraser <simon.fraser@apple.com>
95 Reviewed by Gavin Barraclough.
97 Add various clampToInt() methods to MathExtras.h
98 https://bugs.webkit.org/show_bug.cgi?id=52910
100 Add functions for clamping doubles and floats to valid int
101 ranges, for signed and positive integers.
105 (clampToPositiveInteger):
107 2011-01-28 Sheriff Bot <webkit.review.bot@gmail.com>
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
114 "Broke Windows tests" (Requested by rniwa on #webkit).
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:
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):
163 (JSC::JITThunks::tryCacheGetByID):
164 (JSC::DEFINE_STUB_FUNCTION):
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):
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):
245 (JSC::JSArray::putSlowCase):
246 (JSC::JSArray::deleteProperty):
247 (JSC::JSArray::increaseVectorLength):
248 (JSC::JSArray::setLength):
250 (JSC::JSArray::push):
251 (JSC::JSArray::unshiftCount):
252 (JSC::JSArray::sort):
253 (JSC::JSArray::fillArgList):
254 (JSC::JSArray::copyToRegisters):
255 (JSC::JSArray::compactForSorting):
257 (JSC::JSArray::getIndex):
258 (JSC::JSArray::setIndex):
259 (JSC::JSArray::uncheckedSetIndex):
260 (JSC::JSArray::markChildrenDirect):
261 * runtime/JSByteArray.cpp:
262 (JSC::JSByteArray::JSByteArray):
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:
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):
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):
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):
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):
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:
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):
409 (JSC::::uncheckedRemove):
410 * runtime/WriteBarrier.h: Removed.
412 2011-01-28 Gavin Barraclough <barraclough@apple.com>
414 Reviewed by Geoff Garen.
416 https://bugs.webkit.org/show_bug.cgi?id=53352
417 Heavy external fragmentation in FixedVMPoolAllocator can lead to a CRASH().
419 The FixedVMPoolAllocator currently uses a best fix policy -
420 switch to first fit, this is less prone to external fragmentation.
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):
474 2011-01-27 Oliver Hunt <oliver@apple.com>
476 Reviewed by Geoffrey Garen.
478 Convert markstack to a slot visitor API
479 https://bugs.webkit.org/show_bug.cgi?id=53219
481 Move the MarkStack over to a slot based marking API.
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.
490 The change over to this model has produced a large amount of
491 code changes, but they are mostly mechanical (forwarding JSGlobalData,
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:
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):
535 (JSC::JITThunks::tryCacheGetByID):
536 (JSC::DEFINE_STUB_FUNCTION):
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):
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):
611 (JSC::JSArray::putSlowCase):
612 (JSC::JSArray::deleteProperty):
613 (JSC::JSArray::increaseVectorLength):
614 (JSC::JSArray::setLength):
616 (JSC::JSArray::push):
617 (JSC::JSArray::unshiftCount):
618 (JSC::JSArray::sort):
619 (JSC::JSArray::fillArgList):
620 (JSC::JSArray::copyToRegisters):
621 (JSC::JSArray::compactForSorting):
623 (JSC::JSArray::getIndex):
624 (JSC::JSArray::setIndex):
625 (JSC::JSArray::uncheckedSetIndex):
626 (JSC::JSArray::markChildrenDirect):
627 * runtime/JSByteArray.cpp:
628 (JSC::JSByteArray::JSByteArray):
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:
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):
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):
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):
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):
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:
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):
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):
785 2011-01-28 Adam Roben <aroben@apple.com>
787 Chromium build fix after r76967
789 * wtf/ThreadingPrimitives.h: Use OS(WINDOWS) instead of PLATFORM(WIN), to match other
790 similar macros in this file.
792 2011-01-28 Michael Saboff <msaboff@apple.com>
794 Potentially Unsafe HashSet of RuntimeObject* in RootObject definition
795 https://bugs.webkit.org/show_bug.cgi?id=53271
797 Reapplying this this change. No change from prior patch in
800 Added new isValid() methods to check if a contained object in
801 a WeakGCMap is valid when using an unchecked iterator.
803 * runtime/WeakGCMap.h:
804 (JSC::WeakGCMap::isValid):
806 2011-01-27 Adam Roben <aroben@apple.com>
808 Extract code to convert a WTF absolute time to a Win32 wait interval into a separate
811 Fixes <http://webkit.org/b/53208> <rdar://problem/8922490> BinarySemaphore should wrap a
814 Reviewed by Dave Hyatt.
816 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export the new function.
818 * wtf/ThreadingPrimitives.h: Declare the new function.
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.
825 2011-01-28 Sam Weinig <sam@webkit.org>
827 Reviewed by Maciej Stachowiak.
829 Add basic rubber banding support
830 <rdar://problem/8219429>
831 https://bugs.webkit.org/show_bug.cgi?id=53277
833 * wtf/Platform.h: Add ENABLE for rubber banding.
835 2011-01-28 Sheriff Bot <webkit.review.bot@gmail.com>
837 Unreviewed, rolling out r76893.
838 http://trac.webkit.org/changeset/76893
839 https://bugs.webkit.org/show_bug.cgi?id=53287
841 It made some tests crash on GTK and Qt debug bots (Requested
844 * runtime/WeakGCMap.h:
846 2011-01-27 Adam Barth <abarth@webkit.org>
848 Reviewed by Eric Seidel.
850 Add WTFString method to compare equality with Vector<UChar>
851 https://bugs.webkit.org/show_bug.cgi?id=53266
853 I'm planning to use this method in the new XSS filter implementation,
854 but it seems generally useful.
856 * wtf/text/StringImpl.h:
857 (WTF::equalIgnoringNullity):
858 * wtf/text/WTFString.h:
859 (WTF::equalIgnoringNullity):
861 2011-01-27 Michael Saboff <msaboff@apple.com>
863 Potentially Unsafe HashSet of RuntimeObject* in RootObject definition
864 https://bugs.webkit.org/show_bug.cgi?id=53271
866 Added new isValid() methods to check if a contained object in
867 a WeakGCMap is valid when using an unchecked iterator.
869 * runtime/WeakGCMap.h:
870 (JSC::WeakGCMap::isValid):
872 2011-01-26 Sam Weinig <sam@webkit.org>
874 Reviewed by Maciej Stachowiak.
876 Add events to represent the start/end of a gesture scroll
877 https://bugs.webkit.org/show_bug.cgi?id=53215
879 * wtf/Platform.h: Add ENABLE for gesture events.
881 2011-01-26 Yael Aharon <yael.aharon@nokia.com>
883 Reviewed by Laszlo Gombos.
885 [Qt][Symbian] Fix --minimal build
886 https://bugs.webkit.org/show_bug.cgi?id=52839
888 Move definition of USE_SYSTEM_MALLOC out of pri file.
889 Put it in platform.h instead.
892 * wtf/TCSystemAlloc.cpp:
895 2011-01-26 Patrick Gansterer <paroga@webkit.org>
897 Reviewed by Andreas Kling.
899 [WINCE] Add JIT support to build system
900 https://bugs.webkit.org/show_bug.cgi?id=53079
902 * CMakeListsWinCE.txt:
904 2011-01-25 Adam Roben <aroben@apple.com>
906 Windows Production build fix
908 Reviewed by Steve Falkenburg.
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).
914 2011-01-25 Steve Falkenburg <sfalken@apple.com>
916 Rubber-stamped by Adam Roben.
918 Windows production build fix.
919 Use correct environment variable escaping
921 * JavaScriptCore.vcproj/JavaScriptCore.make:
922 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
924 2011-01-25 Oliver Hunt <oliver@apple.com>
926 Reviewed by Gavin Barraclough.
928 JSON.stringify processing time exponentially grows with size of object
929 https://bugs.webkit.org/show_bug.cgi?id=51922
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
935 * runtime/JSONObject.cpp:
936 (JSC::Stringifier::appendQuotedString):
938 2011-01-25 Antti Koivisto <antti@apple.com>
942 Try to fix windows build.
944 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
946 2011-01-25 Antti Koivisto <antti@apple.com>
948 Reviewed by Oliver Hunt.
950 REGRESSION: Leak in JSParser::Scope::copyCapturedVariablesToVector()
951 https://bugs.webkit.org/show_bug.cgi?id=53061
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.
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):
981 2011-01-25 Marcilio Mendonca <mamendonca@rim.com>
983 Reviewed by Darin Adler.
985 Bug 53087: Refactoring: replaced a hanging "else" with a "return"
987 https://bugs.webkit.org/show_bug.cgi?id=53087.
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
995 * wtf/Assertions.cpp:
997 2011-01-24 Chris Marrin <cmarrin@apple.com>
999 Reviewed by Eric Seidel.
1001 Change ENABLE_3D_CANVAS to ENABLE_WEBGL
1002 https://bugs.webkit.org/show_bug.cgi?id=53041
1004 * Configurations/FeatureDefines.xcconfig:
1006 2011-01-25 Adam Roben <aroben@apple.com>
1008 Windows Production build fix
1010 * JavaScriptCore.vcproj/JavaScriptCore.make: Added a missing "set".
1012 2011-01-25 Patrick Gansterer <paroga@webkit.org>
1014 Reviewed by Eric Seidel.
1016 Add missing defines for COMPILER(RVCT) && CPU(ARM_THUMB2)
1017 https://bugs.webkit.org/show_bug.cgi?id=52949
1021 2011-01-24 Adam Roben <aroben@apple.com>
1023 Windows Production build fix
1025 * JavaScriptCore.vcproj/JavaScriptCore.make: Update for move of JavaScriptCore into Source.
1027 2011-01-24 Peter Varga <pvarga@webkit.org>
1029 Reviewed by Oliver Hunt.
1031 Optimize regex patterns which contain empty alternatives
1032 https://bugs.webkit.org/show_bug.cgi?id=51395
1034 Eliminate the empty alternatives from the regex pattern and convert it to do
1035 the matching in an easier way.
1037 * yarr/YarrPattern.cpp:
1038 (JSC::Yarr::YarrPatternConstructor::atomParenthesesEnd):
1040 2011-01-24 Andras Becsi <abecsi@webkit.org>
1042 Reviewed by Csaba Osztrogonác.
1044 [Qt] Move project files into Source
1045 https://bugs.webkit.org/show_bug.cgi?id=52891
1047 * JavaScriptCore.pri:
1048 * JavaScriptCore.pro:
1051 2011-01-23 Mark Rowe <mrowe@apple.com>
1053 Follow-up to r76477.
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.
1061 * JavaScriptCore.xcodeproj/project.pbxproj:
1063 2011-01-23 Patrick Gansterer <paroga@webkit.org>
1065 Reviewed by Darin Adler.
1067 Use WTF::StringHasher in WebCore
1068 https://bugs.webkit.org/show_bug.cgi?id=52934
1070 Add an additional function to calculate the hash
1071 of data with a runtimedependent size.
1073 * wtf/StringHasher.h:
1074 (WTF::StringHasher::createBlobHash):
1076 2011-01-23 Patrick Gansterer <paroga@webkit.org>
1078 Reviewed by David Kilzer.
1080 Fix comment in String::ascii()
1081 https://bugs.webkit.org/show_bug.cgi?id=52980
1083 * wtf/text/WTFString.cpp:
1084 (WTF::String::ascii):
1086 2011-01-23 Patrick Gansterer <paroga@webkit.org>
1088 Reviewed by David Kilzer.
1090 Add String::containsOnlyLatin1()
1091 https://bugs.webkit.org/show_bug.cgi?id=52979
1093 * wtf/text/WTFString.h:
1094 (WTF::String::containsOnlyLatin1):
1095 (WTF::charactersAreAllLatin1):
1097 2011-01-23 Patrick Gansterer <paroga@webkit.org>
1099 Reviewed by Oliver Hunt.
1101 Remove obsolete JSVALUE32 code
1102 https://bugs.webkit.org/show_bug.cgi?id=52948
1104 r70111 removed support for JSVALUE32.
1105 ARM, MIPS and X86 support JSVALUE32_64 only.
1109 2011-01-22 Geoffrey Garen <ggaren@apple.com>
1111 Reviewed by Dan Bernstein.
1113 ASSERT running run-webkit-tests --threaded.
1114 https://bugs.webkit.org/show_bug.cgi?id=52971
1116 SunSpider and v8 report no change.
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
1129 2011-01-22 Geoffrey Garen <ggaren@apple.com>
1131 Reviewed by Geoffrey Garen.
1133 Rubber-stamped by Maciej Stachowiak.
1135 A few of Maciej's review suggestions for my last patch.
1136 https://bugs.webkit.org/show_bug.cgi?id=52946
1138 SunSpider reports no change.
1143 * JavaScriptCore.gypi:
1144 * JavaScriptCore.pro:
1145 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1146 * JavaScriptCore.xcodeproj/project.pbxproj: Updated build systems.
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.
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.
1165 2011-01-22 Patrick Gansterer <paroga@webkit.org>
1167 Unreviewed WinCE build fix for r76430.
1169 * runtime/MachineStackMarker.cpp:
1170 (JSC::swapIfBackwards):
1172 2011-01-21 Geoffrey Garen <ggaren@apple.com>
1174 Reviewed by Beth Dakin.
1176 Reorganized MarkedSpace, making many of its functions private.
1179 (JSC::JSCell::Heap::heap):
1180 * runtime/MarkedSpace.h:
1181 (JSC::MarkedSpace::globalData):
1182 (JSC::MarkedSpace::heap):
1184 2011-01-21 Geoffrey Garen <ggaren@apple.com>
1186 Try to fix build: moved helper function out of #ifdef.
1188 * runtime/MachineStackMarker.cpp:
1189 (JSC::swapIfBackwards):
1191 2011-01-21 Geoffrey Garen <ggaren@apple.com>
1193 Rubber-stamped by Maciej Stachowiak.
1195 A few of Maciej's review suggestions for my last patch.
1196 https://bugs.webkit.org/show_bug.cgi?id=52946
1198 SunSpider reports no change.
1200 * runtime/MachineStackMarker.cpp:
1201 (JSC::swapIfBackwards): Added a helper function for handling platforms
1202 where the stack can grow in any direction.
1204 (JSC::MachineStackMarker::markCurrentThreadConservativelyInternal):
1205 (JSC::MachineStackMarker::markOtherThreadConservatively): Use the helper
1208 (JSC::isPointerAligned): Use "!" instead of "==0" because a robot told me to.
1210 (JSC::MachineStackMarker::markConservatively): Changed to use a more
1211 standard looping idiom, and to use the helper function above.
1213 * runtime/MarkedSpace.h:
1214 (JSC::MarkedSpace::isCellAligned): Use "!" instead of "==0" because a robot told me to.
1216 2011-01-21 Geoffrey Garen <ggaren@apple.com>
1218 Reviewed by Maciej Stachowiak.
1220 Cleaned up some conservative marking code.
1221 https://bugs.webkit.org/show_bug.cgi?id=52946
1223 SunSpider reports no change.
1225 * interpreter/RegisterFile.h: No need for a special marking function,
1226 since we already expose a start() and end().
1229 (JSC::Heap::registerFile):
1230 (JSC::Heap::markRoots):
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.
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.
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.
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.
1258 (WTF::::add): Added two missing inlines that I noticed while testing
1261 2011-01-21 Mark Rowe <mrowe@apple.com>
1263 Reviewed by Sam Weinig.
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".
1268 * wtf/PageAllocation.h:
1269 (WTF::PageAllocation::operator bool):
1270 * wtf/PageReservation.h:
1271 (WTF::PageReservation::operator bool):
1273 2011-01-21 Michael Saboff <msaboff@apple.com>
1275 Reviewed by Oliver Hunt.
1277 [RegexFuzz] Hang with forward assertion
1278 https://bugs.webkit.org/show_bug.cgi?id=52825
1279 <rdar://problem/8894332>
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.
1288 (JSC::Yarr::YarrGenerator::BacktrackDestination::propagateBacktrackToLabel):
1289 (JSC::Yarr::YarrGenerator::generateParenthesesSingle):
1291 2011-01-21 Geoffrey Garen <ggaren@apple.com>
1293 Reviewed by Sam Weinig.
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
1299 SunSpider reports no change.
1303 (JSC::Heap::markRoots):
1305 * runtime/JSGlobalData.cpp:
1306 (JSC::JSGlobalData::JSGlobalData):
1307 * runtime/JSGlobalData.h:
1309 2011-01-21 Peter Gal <galpeter@inf.u-szeged.hu>
1311 Reviewed by Darin Adler.
1313 REGRESSION(r76177): All JavaScriptCore tests fail on ARM
1314 https://bugs.webkit.org/show_bug.cgi?id=52814
1316 Get the approximateByteSize value before releasing the OwnPtr.
1318 * parser/JSParser.cpp:
1319 (JSC::JSParser::parseFunctionInfo):
1321 2011-01-21 Xan Lopez <xlopez@igalia.com>
1323 Reviewed by Martin Robinson.
1325 Remove unnecessary <stdio.h> include
1326 https://bugs.webkit.org/show_bug.cgi?id=52884
1328 * jit/JIT.cpp: remove unnecessary include.
1330 2011-01-20 Ryosuke Niwa <rniwa@webkit.org>
1332 Reviewed by Maciej Stachowiak.
1334 Added OwnPtrCommon.h because OwnArrayPtr::set calls deleteOwnedPtr.
1336 * wtf/OwnArrayPtr.h:
1338 2011-01-20 Patrick Gansterer <paroga@webkit.org>
1340 Reviewed by Oliver Hunt.
1342 [WINCE] Remove obsolete JSVALUE32 code
1343 https://bugs.webkit.org/show_bug.cgi?id=52450
1345 Remove the "offset hack" in create_jit_stubs, since we
1346 only support JSVALUE32_64 in the meantime.
1348 * create_jit_stubs: Removed offset argument
1351 2011-01-20 Geoffrey Garen <ggaren@apple.com>
1353 Reviewed by Oliver Hunt.
1355 When marking conservatively, guard against reviving dead objects.
1356 https://bugs.webkit.org/show_bug.cgi?id=52840
1358 SunSpider and v8 say no change.
1360 * interpreter/RegisterFile.h:
1361 (JSC::RegisterFile::markCallFrames): Updated to use the ConservativeSet API.
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.
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.
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.
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.
1382 * runtime/Heap.h: Updated to use the ConservativeSet API.
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.
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.
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.
1404 2011-01-20 Siddharth Mathur <siddharth.mathur@nokia.com>
1406 Reviewed by Geoffrey Garen.
1408 [Symbian] Fix StackBounds::initialize()
1409 https://bugs.webkit.org/show_bug.cgi?id=52842
1411 * wtf/StackBounds.cpp:
1412 (WTF::StackBounds::initialize): Use TThreadStackInfo.iLimit for stack limit
1414 2011-01-20 Michael Saboff <msaboff@apple.com>
1416 Reviewed by Oliver Hunt.
1418 <rdar://problem/8890203> [RegexFuzz] Crash in generated code (52773)
1419 https://bugs.webkit.org/show_bug.cgi?id=52773
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.
1427 (JSC::Yarr::YarrGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists):
1429 2011-01-20 Andras Becsi <abecsi@webkit.org>
1431 Reviewed by Csaba Osztrogonác.
1433 [Qt][WK2] WebKit2 enabled build fails to link
1435 Work around undefined reference linking issues until the buildsystem gets redesigned.
1436 These issues first occured in minimal builds (see BUG 50519).
1438 * JavaScriptCore.pri: link as whole-archive for WebKit2 builds
1440 2011-01-20 Zoltan Horvath <zoltan@webkit.org>
1442 Reviewed by Csaba Osztrogonác.
1444 Refactoring of the custom allocation framework
1445 https://bugs.webkit.org/show_bug.cgi?id=49897
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.
1451 * wtf/FastAllocBase.h: Turn FastAllocBase's implementation into a macro.
1453 2011-01-20 Mark Rowe <mrowe@apple.com>
1455 Reviewed by Maciej Stachowiak.
1457 Follow-up to r75766 / <rdar://problem/5469576>.
1459 We were failing to initialize the key, causing all sorts of unexpected behavior.
1461 * wtf/FastMalloc.cpp:
1462 (WTF::setThreadHeap):
1463 (WTF::TCMalloc_ThreadCache::GetThreadHeap):
1464 (WTF::TCMalloc_ThreadCache::InitTSD): Ensure that the key is initialized.
1466 2011-01-18 Geoffrey Garen <ggaren@apple.com>
1468 Reviewed by Darin Adler.
1470 Rolled back in r76078, with crash fixed.
1471 https://bugs.webkit.org/show_bug.cgi?id=52668
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.
1480 2011-01-18 Darin Adler <darin@apple.com>
1482 Reviewed by Geoffrey Garen.
1484 Stack overflow when converting an Error object to string
1485 https://bugs.webkit.org/show_bug.cgi?id=46410
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.
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.
1502 * runtime/ErrorPrototype.cpp:
1503 (JSC::errorProtoFuncToString): Use StringRecursionChecker.
1505 * runtime/JSGlobalData.h: Renamed arrayVisitedElements to
1506 stringRecursionCheckVisitedObjects.
1508 * runtime/RegExpPrototype.cpp:
1509 (JSC::regExpProtoFuncToString): Use StringRecursionChecker.
1511 * runtime/StringRecursionChecker.cpp: Added.
1512 * runtime/StringRecursionChecker.h: Added.
1514 2011-01-19 Oliver Hunt <oliver@apple.com>
1516 Reviewed by Gavin Barraclough.
1518 Remove non-spec support for callable RegExp
1519 https://bugs.webkit.org/show_bug.cgi?id=28285
1521 Remove support for callable regexps. If it breaks sites we can
1524 * runtime/RegExpObject.cpp:
1525 * runtime/RegExpObject.h:
1526 * tests/mozilla/expected.html: update results.
1528 2011-01-19 Antti Koivisto <antti@apple.com>
1530 Reviewed by Oliver Hunt.
1532 Cache function offsets to speed up javascript parsing
1533 https://bugs.webkit.org/show_bug.cgi?id=52622
1535 Use cache to save function offsets and some other info.
1536 This avoids quite a bit of work when reparsing the source.
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):
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:
1567 2011-01-19 Mark Rowe <mrowe@apple.com>
1569 Reviewed by Darin Adler.
1571 Follow-up to r75766 / <rdar://problem/5469576>.
1573 * DerivedSources.make: Evaluate the SDKROOT variable correctly.
1575 2011-01-19 Oliver Hunt <oliver@apple.com>
1577 Reviewed by Gavin Barraclough.
1579 [jsfunfuzz] Defining a function called __proto__ inside an eval triggers an assertion
1580 https://bugs.webkit.org/show_bug.cgi?id=52672
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.
1586 * parser/JSParser.cpp:
1587 (JSC::JSParser::parseFunctionInfo):
1589 2011-01-19 Michael Saboff <msaboff@apple.com>
1591 Reviewed by Darin Adler.
1593 <rdar://problem/8882994> Regression: Simple nested backtrack hangs
1594 https://bugs.webkit.org/show_bug.cgi?id=52675
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.
1601 (JSC::Yarr::YarrGenerator::BacktrackDestination::hasBacktrackToLabel):
1602 (JSC::Yarr::YarrGenerator::TermGenerationState::propagateBacktrackingFrom):
1603 (JSC::Yarr::YarrGenerator::generateParenthesesSingle):
1605 2011-01-19 Pavel Podivilov <podivilov@chromium.org>
1607 Reviewed by Yury Semikhatsky.
1609 Web Inspector: [JSC] scripts have incorrect starting line (always 1).
1610 https://bugs.webkit.org/show_bug.cgi?id=52721
1612 * debugger/Debugger.cpp:
1613 (JSC::Debugger::recompileAllJSFunctions):
1614 * debugger/Debugger.h:
1616 (JSC::Parser::parse):
1617 * parser/SourceCode.h:
1618 (JSC::SourceCode::SourceCode):
1619 * parser/SourceProvider.h:
1620 (JSC::SourceProvider::startPosition):
1622 2011-01-19 Csaba Osztrogonác <ossy@webkit.org>
1624 Reviewed by Laszlo Gombos and Tor Arne Vestbø.
1626 [Qt] Remove unnecessary "../Source" from paths
1627 after moving source files into Source is finished.
1629 * JavaScriptCore.pri:
1631 2011-01-19 Benjamin Kalman <kalman@chromium.org>
1633 Reviewed by Darin Adler.
1635 Don't return void from void function String::split
1636 https://bugs.webkit.org/show_bug.cgi?id=52684
1638 * wtf/text/WTFString.cpp:
1639 (WTF::String::split):
1641 2011-01-18 Kenneth Russell <kbr@google.com>
1643 Unreviewed, rolling out r76078.
1644 http://trac.webkit.org/changeset/76078
1645 https://bugs.webkit.org/show_bug.cgi?id=52668
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.
1653 * interpreter/RegisterFile.h:
1654 (JSC::RegisterFile::markGlobals):
1655 * runtime/JSActivation.cpp:
1656 (JSC::JSActivation::markChildren):
1657 * runtime/JSGlobalObject.cpp:
1658 (JSC::JSGlobalObject::markChildren):
1660 2011-01-18 Oliver Hunt <oliver@apple.com>
1662 Reviewed by Gavin Barraclough.
1664 [jsfunfuzz] Assertion asking activation for arguments when arguments is overridden
1665 https://bugs.webkit.org/show_bug.cgi?id=52690
1667 Clean up code to retrieve arguments from activation and function objects.
1668 Remove the incorrect assertion from JSActivation's argumentsGetter.
1670 * interpreter/Interpreter.cpp:
1671 (JSC::Interpreter::retrieveArguments):
1672 * runtime/JSActivation.cpp:
1673 (JSC::JSActivation::argumentsGetter):
1675 2011-01-18 Geoffrey Garen <ggaren@apple.com>
1677 Reviewed by Darin Adler.
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
1683 * interpreter/RegisterFile.h: Removed markGlobals.
1685 * runtime/JSActivation.cpp:
1686 (JSC::JSActivation::markChildren): Added a comment explaning why some
1687 JSActivations don't always mark their registers arrays.
1689 * runtime/JSGlobalObject.cpp:
1690 (JSC::JSGlobalObject::markChildren): Instead of calling markGlobals, mark
1691 the registers array directly.
1693 2011-01-18 Michael Saboff <msaboff@apple.com>
1695 Reviewed by Oliver Hunt.
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
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
1707 (JSC::Yarr::YarrGenerator::BacktrackDestination::linkBacktrackToLabel):
1708 (JSC::Yarr::YarrGenerator::generateParenthesesSingle):
1710 2011-01-18 Daniel Bates <dbates@rim.com>
1712 Reviewed by Gavin Barraclough.
1714 Only use moving memory model assumption in ExecutableAllocator::intializePageSize() for Symbian OS
1715 https://bugs.webkit.org/show_bug.cgi?id=52517
1717 Patch by David Tapuska
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.
1724 * jit/ExecutableAllocator.cpp:
1725 (JSC::ExecutableAllocator::intializePageSize):
1727 2011-01-18 Dimitry Andric <dim@freebsd.org>
1729 Reviewed by Andreas Kling.
1731 Fix linking JavaScriptCore on FreeBSD/amd64
1732 https://bugs.webkit.org/show_bug.cgi?id=52591
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.
1738 * jit/JITStubs.cpp: use @plt suffix on x86_64 platforms, for both Linux
1741 2011-01-18 Oliver Hunt <oliver@apple.com>
1743 Reviewed by Antti Koivisto.
1745 [jsfunfuzz] Assertion in codegen for array of NaN constants
1746 https://bugs.webkit.org/show_bug.cgi?id=52643
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.
1751 * bytecompiler/BytecodeGenerator.cpp:
1752 (JSC::BytecodeGenerator::emitLoad):
1754 2011-01-17 Jarred Nicholls <jarred@sencha.com>
1756 Reviewed by Csaba Osztrogonác.
1758 REGRESSION(r75709): Return value of fscanf() shouldn't be ignored.
1759 https://bugs.webkit.org/show_bug.cgi?id=52585
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
1764 * jit/ExecutableAllocatorFixedVMPool.cpp:
1765 (JSC::maybeModifyVMPoolSize):
1767 2011-01-17 Michael Saboff <msaboff@apple.com>
1769 Reviewed by Oliver Hunt.
1771 [regexfuzz] Crash running regex with lookahead
1772 https://bugs.webkit.org/show_bug.cgi?id=52548
1774 Eliminated agressive chaining of backtracks. This code was overwriting
1775 already valid backtrack information.
1778 (JSC::Yarr::YarrGenerator::ParenthesesTail::processBacktracks):
1780 2011-01-17 Tony Gentilcore <tonyg@chromium.org>
1782 Reviewed by Alexey Proskuryakov.
1784 Fix some headers with missing or misspelled #ifndef guards
1785 https://bugs.webkit.org/show_bug.cgi?id=52545
1787 * wtf/RefPtrHashMap.h:
1789 2011-01-17 Dan Bernstein <mitz@apple.com>
1791 Rubber-stamped by Mark Rowe.
1793 Update xcodeproj svn:ignore to include xcuserdata.
1795 * JavaScriptCore.xcodeproj: Modified property svn:ignore.
1797 2011-01-16 Adam Barth <abarth@webkit.org>
1799 Rubber-stamped by Eric Seidel.
1801 Move WebKit into Source
1802 https://bugs.webkit.org/show_bug.cgi?id=52530
1804 * JavaScriptCore.gyp/JavaScriptCore.gyp:
1806 2011-01-16 Oliver Hunt <oliver@apple.com>
1808 Reviewed by Sam Weinig.
1810 [jsfunfuzz] Parser doesn't correctly validate for-loop syntax
1811 https://bugs.webkit.org/show_bug.cgi?id=52516
1813 Ensure that we always check for a semicolon after encountering
1814 multiple declarations in the initialiser portion of a for-loop.
1816 * parser/JSParser.cpp:
1817 (JSC::JSParser::parseForStatement):
1819 2011-01-16 Oliver Hunt <oliver@apple.com>
1821 Reviewed by Geoffrey Garen.
1823 Strict mode restrictions on arguments and eval usage aren't complete
1824 https://bugs.webkit.org/show_bug.cgi?id=52528
1826 Fix a few bugs in strict mode where we incorrect allow mutation of
1827 arguments and eval in the parser.
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.
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.
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):
1852 2011-01-15 Geoffrey Garen <ggaren@apple.com>
1854 Reviewed by Oliver Hunt.
1856 Rolled back in r75886.
1857 https://bugs.webkit.org/show_bug.cgi?id=52527
1859 r75886 broke the GTK Linux bot because Linux was -- quite surprisingly --
1860 set up to use the constants for embedded devices.
1862 * jit/ExecutableAllocatorFixedVMPool.cpp:
1863 (JSC::maybeModifyVMPoolSize): Separated Linux constants from embedded
1866 2011-01-15 Sheriff Bot <webkit.review.bot@gmail.com>
1868 Unreviewed, rolling out r75886.
1869 http://trac.webkit.org/changeset/75886
1870 https://bugs.webkit.org/show_bug.cgi?id=52526
1872 "Broke GTK+ 64bit" (Requested by xan_ on #webkit).
1874 * jit/ExecutableAllocatorFixedVMPool.cpp:
1876 2011-01-15 Geoffrey Garen <ggaren@apple.com>
1878 Reviewed by Sam Weinig.
1880 <rdar://problem/8870429> Shrink the executable pool on embedded devices
1882 * jit/ExecutableAllocatorFixedVMPool.cpp: Dropped the pool size from 32MB
1885 2011-01-15 Oliver Hunt <oliver@apple.com>
1887 Reviewed by Maciej Stachowiak.
1889 Incorrect behavior changing attributes of an accessor
1890 https://bugs.webkit.org/show_bug.cgi?id=52515
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.
1898 * runtime/JSObject.cpp:
1899 (JSC::putDescriptor):
1900 (JSC::JSObject::defineOwnProperty):
1902 2011-01-14 Oliver Hunt <oliver@apple.com>
1904 Reviewed by Maciej Stachowiak.
1906 [jsfunfuzz] Incorrect handling of consecutive duplicate labels
1907 https://bugs.webkit.org/show_bug.cgi?id=52505
1909 Compare StringImpl*'s instead of Identifier*'s when looking for duplicate
1912 * parser/JSParser.cpp:
1913 (JSC::JSParser::parseExpressionOrLabelStatement):
1915 2011-01-14 Simon Fraser <simon.fraser@apple.com>
1919 Initialize m_operationInProgress after r75855.
1924 2011-01-14 Geoffrey Garen <ggaren@apple.com>
1926 Reverted accidentally committed code from my last checkin.
1929 (JSC::Heap::markRoots):
1931 2011-01-14 Geoffrey Garen <ggaren@apple.com>
1933 Reviewed by Sam Weinig.
1935 Try to fix the GTK bot.
1939 (JSC::Heap::markRoots): Kids, remember to initialize your data members.
1940 Knowing is half the battle.
1942 2011-01-14 Oliver Hunt <oliver@apple.com>
1944 Reviewed by Stephanie Lewis.
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
1949 Clear the temporary character buffers used for reading escaped characters and
1953 (JSC::Lexer::setOffset):
1955 2011-01-14 Geoffrey Garen <ggaren@apple.com>
1957 Try to fix non-Dtrace builds: #include Tracing.h instead of TracingDtrace.h.
1961 2011-01-13 Geoffrey Garen <ggaren@apple.com>
1963 Reviewed by Oliver Hunt.
1965 Split out a MarkedSpace strategy object from Heap.
1966 https://bugs.webkit.org/show_bug.cgi?id=52421
1968 SunSpider reports no change.
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.
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):
1988 (JSC::Heap::isBusy):
1989 (JSC::Heap::collectAllGarbage):
1990 (JSC::Heap::primaryHeapBegin):
1991 (JSC::Heap::primaryHeapEnd):
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.
2001 (JSC::JSCell::Heap::heap): Updated for MarkedSpace delegation.
2003 * runtime/JSValue.h: Moved the ValueStringPair typedef to help with #includes.
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.
2035 * runtime/MemoryStatistics.cpp:
2036 (JSC::heapStatistics):
2037 * runtime/MemoryStatistics.h: Updated for MarkedSpace delegation.
2039 2011-01-14 Oliver Hunt <oliver@apple.com>
2041 Reviewed by Gavin Barraclough.
2043 [jsfunfuzz] parser doesn't enforce continue restrictions correctly.
2044 https://bugs.webkit.org/show_bug.cgi?id=52493
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.
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.
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.
2080 (JSC::Lexer::nextTokenIsColon):
2082 (JSC::Lexer::setOffset):
2084 2011-01-14 Patrick Gansterer <paroga@webkit.org>
2086 Reviewed by Adam Roben.
2088 Use the Windows thread pool instead of an extra thread for FastMalloc scavenging
2089 https://bugs.webkit.org/show_bug.cgi?id=45186
2091 * wtf/FastMalloc.cpp:
2092 (WTF::TCMalloc_PageHeap::scheduleScavenger): Added missing this pointer to CreateTimerQueueTimer().
2094 2011-01-14 Patrick Gansterer <paroga@webkit.org>
2096 Reviewed by Adam Roben.
2098 Use the Windows thread pool instead of an extra thread for FastMalloc scavenging
2099 https://bugs.webkit.org/show_bug.cgi?id=45186
2101 r75819 accidentally changed the initial state of the scavenge timer.
2103 * wtf/FastMalloc.cpp:
2104 (WTF::TCMalloc_PageHeap::initializeScavenger): Changed initial state of m_scavengingSuspended to true.
2106 2011-01-14 Patrick Gansterer <paroga@webkit.org>
2108 Unreviewed Windows Release build fix.
2110 * wtf/FastMalloc.cpp:
2111 (WTF::TCMalloc_PageHeap::scavengerTimerFired):
2113 2011-01-14 Patrick Gansterer <paroga@webkit.org>
2115 Unreviewed Windows Release build fix.
2117 * wtf/FastMalloc.cpp:
2118 (WTF::TCMalloc_PageHeap::scavengerTimerFired):
2120 2011-01-14 Patrick Gansterer <paroga@webkit.org>
2122 Reviewed by Adam Roben.
2124 Use the Windows thread pool instead of an extra thread for FastMalloc scavenging
2125 https://bugs.webkit.org/show_bug.cgi?id=45186
2127 Use CreateTimerQueueTimer() to start periodicScavenge() and stop it with DeleteTimerQueueTimer().
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):
2139 2011-01-14 Laszlo Gombos <laszlo.1.gombos@nokia.com>
2141 Reviewed by Kenneth Rohde Christiansen.
2143 Align import/export directives
2144 https://bugs.webkit.org/show_bug.cgi?id=52208
2146 * API/JSBase.h: Align import/export directives with
2147 WebKit2/Shared/API/c/WKBase.h
2149 2011-01-14 Michael Saboff <msaboff@apple.com>
2151 Reviewed by Oliver Hunt.
2153 Incorrect backtracking for nested alternatives
2154 https://bugs.webkit.org/show_bug.cgi?id=52387
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
2162 BacktrackDestination::linkDataLabelToHereIfExists()
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
2174 (JSC::Yarr::YarrGenerator::generateParenthesesDisjunction): Changed to
2175 reflect updated linkDataLabelToBacktrackIfExists().
2177 2011-01-14 Pavel Podivilov <podivilov@chromium.org>
2179 Reviewed by Yury Semikhatsky.
2181 Web Inspector: provide script column offset to frontend.
2182 https://bugs.webkit.org/show_bug.cgi?id=52377
2184 * parser/SourceCode.h:
2185 (JSC::SourceCode::SourceCode):
2186 (JSC::SourceCode::firstColumn):
2188 2011-01-13 Darin Adler <darin@apple.com>
2190 Reviewed by Geoff Garen.
2192 <rdar://problem/5469576> Use __PTK_FRAMEWORK_JAVASCRIPTCORE_KEY0 if available.
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.
2201 2011-01-13 Xan Lopez <xlopez@igalia.com>
2203 Reviewed by Gavin Barraclough.
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
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.
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
2222 (JSC::ExecutableAllocator::underMemoryPressure): use new variables
2223 for VM pool size and coalesce limit.
2225 2011-01-12 Xan Lopez <xlopez@igalia.com>
2227 Reviewed by Martin Robinson.
2229 Add new Yarr.h header to the list file.
2231 * GNUmakefile.am: ditto.
2233 2011-01-12 Martin Robinson <mrobinson@igalia.com>
2235 Missing Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h in WebKitGtk tarball
2236 https://bugs.webkit.org/show_bug.cgi?id=52299
2238 * GNUmakefile.am: Fix the GTK+ build on ARMv7 by including missing source
2239 files in the source list.
2241 2011-01-12 Peter Varga <pvarga@webkit.org>
2243 Reviewed by Gavin Barraclough.
2246 https://bugs.webkit.org/show_bug.cgi?id=51021
2248 Move other common constants and functions from YARR's different files
2250 Use Yarr.h header instead of including other YARR headers where it
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:
2261 (JSC::Yarr::jitCompile):
2262 (JSC::Yarr::execute):
2264 * yarr/YarrParser.h:
2265 * yarr/YarrPattern.cpp:
2266 (JSC::Yarr::YarrPattern::compile):
2267 (JSC::Yarr::YarrPattern::YarrPattern):
2268 * yarr/YarrPattern.h:
2270 2011-01-12 Sheriff Bot <webkit.review.bot@gmail.com>
2272 Unreviewed, rolling out r75595.
2273 http://trac.webkit.org/changeset/75595
2274 https://bugs.webkit.org/show_bug.cgi?id=52286
2276 It broke fast/regex/pcre-test-1.html (Requested by Ossy on
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:
2287 (JSC::Yarr::jitCompile):
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:
2296 2011-01-12 Peter Varga <pvarga@webkit.org>
2298 Reviewed by Gavin Barraclough.
2301 https://bugs.webkit.org/show_bug.cgi?id=51021
2303 Move other common constants and functions from YARR's different files
2305 Use Yarr.h header instead of including other YARR headers where it
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:
2316 (JSC::Yarr::jitCompile):
2317 (JSC::Yarr::execute):
2319 * yarr/YarrParser.h:
2320 * yarr/YarrPattern.cpp:
2321 (JSC::Yarr::YarrPattern::compile):
2322 (JSC::Yarr::YarrPattern::YarrPattern):
2323 * yarr/YarrPattern.h:
2325 2011-01-11 Michael Saboff <msaboff@apple.com>
2327 Reviewed by Geoffrey Garen.
2329 Missing call to popTempSortVector() for exception case in JSArray::sort.
2330 https://bugs.webkit.org/show_bug.cgi?id=50718
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()
2337 * runtime/JSArray.cpp:
2338 (JSC::JSArray::sort): Added popTempSortVector()
2340 2011-01-11 Xan Lopez <xlopez@igalia.com>
2342 Reviewed by Darin Adler.
2344 Microoptimization in ~JSString
2345 https://bugs.webkit.org/show_bug.cgi?id=52222
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.
2354 * runtime/JSString.h:
2355 (JSC::RopeBuilder::~JSString):
2357 2011-01-10 Michael Saboff <msaboff@apple.com>
2359 Reviewed by Geoffrey Garen.
2361 ASSERTION Failure in JSC::binaryChop
2362 https://bugs.webkit.org/show_bug.cgi?id=25614
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.
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.
2374 (JSC::DEFINE_STUB_FUNCTION): Use the current call frame's return PC.
2376 2011-01-10 Daniel Bates <dbates@rim.com>
2378 Reviewed by Martin Robinson.
2380 Remove extraneous COMPILER(GCC) condition when checking GCC_VERSION_AT_LEAST()
2381 https://bugs.webkit.org/show_bug.cgi?id=52178
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.
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.
2390 * jit/ExecutableAllocator.h:
2391 (JSC::ExecutableAllocator::cacheFlush):
2394 2011-01-10 Geoffrey Garen <ggaren@apple.com>
2396 Build fix: removed some uses of nextNumber that I missed last time.
2400 (JSC::Heap::collectAllGarbage):
2402 2011-01-10 Daniel Bates <dbates@rim.com>
2404 Reviewed by Darin Adler.
2406 Use __builtin_expect when compiling using RVCT in GNU mode
2407 https://bugs.webkit.org/show_bug.cgi?id=51866
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>.
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
2417 2011-01-10 Geoffrey Garen <ggaren@apple.com>
2419 Reviewed by Oliver Hunt.
2421 Moved Collector.* => Heap.*, since the file contains a class named "Heap".
2423 * API/JSCallbackObject.cpp:
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:
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:
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:
2453 2011-01-10 Xan Lopez <xlopez@igalia.com>
2455 Reviewed by Gavin Barraclough.
2457 Remove unused isString() case in JSString::toPrimitiveString()
2458 https://bugs.webkit.org/show_bug.cgi?id=52167
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.
2464 * runtime/JSString.h:
2465 (JSC::JSValue::toPrimitiveString):
2467 2011-01-10 Peter Varga <pvarga@inf.u-szeged.hu>
2469 Reviewed by Gavin Barraclough.
2471 Rename the existing YARR files and classes
2472 https://bugs.webkit.org/show_bug.cgi?id=51872
2474 Replace the "Regex" prefix with "Yarr" in the name of YARR files and classes.
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):
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):
2847 2011-01-10 Gavin Barraclough <barraclough@apple.com>
2851 * parser/SyntaxChecker.h:
2853 2011-01-10 Dave Tapuska <dtapuska@rim.com>
2855 Reviewed by Gavin Barraclough.
2857 Add CTI ASM versions for RVCT ARM THUMB2 mode.
2859 https://bugs.webkit.org/show_bug.cgi?id=52154
2862 (JSC::ctiTrampoline):
2863 (JSC::ctiVMThrowTrampoline):
2864 (JSC::ctiOpThrowNotCaught):
2866 2011-01-10 Gavin Barraclough <barraclough@apple.com>
2870 * JavaScriptCore.pro:
2872 2011-01-10 Gavin Barraclough <barraclough@apple.com>
2874 Reviewed by Oliver Hunt.
2876 Bug 52079 - Syntax errors should be early errors.
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.
2886 An implementation must treat any instance of the following kinds of errors as an early error:
2887 * Any syntax error."
2889 * JavaScriptCore.xcodeproj/project.pbxproj:
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):
2915 (JSC::JIT::privateCompileMainPass):
2917 * jit/JITOpcodes.cpp:
2918 * jit/JITOpcodes32_64.cpp:
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):
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:
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.
3000 2011-01-10 Adam Roben <aroben@apple.com>
3004 It was causing assertion failures. See <http://webkit.org/b/52156>.
3006 * wtf/StackBounds.cpp:
3007 (WTF::StackBounds::initialize):
3009 2011-01-08 Patrick Gansterer <paroga@webkit.org>
3011 Reviewed by Darin Adler.
3013 Unify string table adding in AtomicString
3014 https://bugs.webkit.org/show_bug.cgi?id=51927
3016 Move code for adding a string into a separate function.
3017 This removes multiple occurrence of the same logic.
3019 * wtf/text/AtomicString.cpp:
3020 (WTF::addToStringTable): Added.
3021 (WTF::AtomicString::add): Use addToStringTable().
3022 (WTF::AtomicString::fromUTF8): Ditto.
3024 2011-01-07 Geoffrey Garen <ggaren@apple.com>
3026 Reviewed by Gavin Barraclough.
3028 Split machine stack marking functions into their own class (MachineStackMarker)
3029 https://bugs.webkit.org/show_bug.cgi?id=52088
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.
3039 * JavaScriptCore.gypi:
3040 * JavaScriptCore.pro:
3041 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
3042 * JavaScriptCore.xcodeproj/project.pbxproj: Updated projects.
3044 * runtime/Collector.cpp:
3046 (JSC::Heap::destroy):
3047 (JSC::Heap::markRoots):
3048 * runtime/Collector.h:
3049 (JSC::Heap::machineStackMarker): Moved code to machineStackMarker.
3051 * runtime/JSGlobalData.h:
3052 (JSC::JSGlobalData::makeUsableFromMultipleThreads): Removed an unnecessary
3053 level of indirection, to make Heap less of a God class.
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.
3067 2011-01-07 Gavin Barraclough <barraclough@apple.com>
3069 Reviewed by Geoff Garen.
3071 Bug 26276 - Need a mechanism to determine stack extent on WINDOWS, SOLARIS, OPENBSD, SYMBIAN, HAIKU, WINCE platforms
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!
3077 * wtf/StackBounds.cpp:
3078 (WTF::StackBounds::initialize):
3080 2011-01-07 Adam Roben <aroben@apple.com>
3082 Update react-to-vsprops-changes.py after r74855
3084 * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
3086 2011-01-07 Carlos Garcia Campos <cgarcia@igalia.com>
3088 Reviewed by Martin Robinson.
3090 [GTK] Port scrollbar painting to GtkStyleContext
3091 https://bugs.webkit.org/show_bug.cgi?id=52051
3093 * wtf/gobject/GTypedefs.h: Add GtkStyleContext forward
3096 2011-01-07 Daniel Bates <dbates@rim.com>
3098 Reviewed by Martin Robinson.
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
3103 Derived from a patch by Eli Fidler.
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>.
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.
3112 2011-01-06 Gavin Barraclough <barraclough@apple.com>
3114 Reviewed by Geoff Garen.
3116 Bug 52035 - Unregistering DOMWrapperWorlds is unsafe
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:
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.
3132 Fix the problem by not removing the JSGlobalData's wrapper map until the world really goes away.
3134 * runtime/WeakGCMap.h:
3135 (JSC::WeakGCMap::clear):
3137 2011-01-06 Gavin Barraclough <barraclough@apple.com>
3139 Reviewed by Darin Adler.
3141 Bug 52021 - zeroDouble broken on ARMv7
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).
3148 Additionally this patch removes a redundant duplicate compare
3149 in some (many) case.
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):
3172 2011-01-06 Michael Saboff <msaboff@apple.com>
3174 Reviewed by Gavin Barraclough.
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.
3181 Fixed a discovered problem in RegExp::printTraceData, changing
3182 m_pattern to the getter pattern().
3183 Also deleted an extraneous semicolon.
3185 Enhancement: Add Regexp Debug Compare between JIT and Interpreter
3186 https://bugs.webkit.org/show_bug.cgi?id=51834
3188 * runtime/RegExp.cpp:
3189 (JSC::RegExp::compile):
3190 (JSC::RegExp::match):
3191 (JSC::RegExp::printTraceData):
3194 2011-01-06 Patrick Gansterer <paroga@webkit.org>
3196 Reviewed by Eric Seidel.
3198 [WINCE] Remove JSC::g_stackBase
3199 https://bugs.webkit.org/show_bug.cgi?id=51779
3201 * wtf/StackBounds.cpp:
3203 2011-01-06 Joone Hur <joone.hur@collabora.co.uk>
3205 Reviewed by Eric Seidel.
3207 WML Parser should treat line/column number in a consistent way
3208 https://bugs.webkit.org/show_bug.cgi?id=51601
3210 Add the equality operators to TextPosition class.
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.
3221 2011-01-06 Patrick Gansterer <paroga@webkit.org>
3223 Reviewed by Gavin Barraclough.
3225 [WINCE] Determine stack extent
3226 https://bugs.webkit.org/show_bug.cgi?id=26276
3228 Scan the stack for writeable pages and use the limits.
3230 * wtf/StackBounds.cpp:
3231 (WTF::detectGrowingDownward):
3232 (WTF::isPageWritable):
3233 (WTF::getLowerStackBound):
3234 (WTF::getUpperStackBound):
3235 (WTF::StackBounds::initialize):
3237 2011-01-05 Steve Falkenburg <sfalken@apple.com>
3241 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: Revert change to additional library search path needed to find ICU.
3243 2011-01-05 Steve Falkenburg <sfalken@apple.com>
3245 Reviewed by Darin Adler.
3247 Debug and Release builds on Windows clobber each other
3248 https://bugs.webkit.org/show_bug.cgi?id=49185
3250 Changes the structure of WebKitBuild build products directory so we
3251 completely separate each build configuration into independent directories.
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.
3257 Most use of $(WebKitOutputDir) in the build files has been replaced by $(ConfigurationBuildDir),
3258 defined in common.vsprops to be $(WebKitOutputDir)\$(ConfigurationName).
3260 For PGO, $(ConfigurationBuildDir) points to the same directory (Release_PGO) to allow
3261 for proper operation of the instrumentation/optimization scripts.
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:
3288 2011-01-05 Brent Fulgham <bfulgham@webkit.org>
3290 Unreviewed build fix.
3292 * wtf/Encoder.h: Add <stdint.h> include for systems that
3293 do not natively know about uint8_t, etc.
3295 2011-01-05 Patrick Gansterer <paroga@webkit.org>
3297 Reviewed by Andreas Kling.
3299 [CMake] Fix the usage of SOURCE_GROUP
3300 https://bugs.webkit.org/show_bug.cgi?id=51739
3304 2011-01-05 Andras Becsi <abecsi@webkit.org>
3306 Reviewed by Csaba Osztrogonác.
3308 [Qt][V8] Fix the build after recent changes.
3310 * pcre/pcre.pri: Correct the path after Source was introduced.
3312 2011-01-04 Steve Falkenburg <sfalken@apple.com>
3314 Build fix. Update path to FindSafari after source code reorganization.
3316 * JavaScriptCore.vcproj/JavaScriptCore.sln:
3318 2011-01-04 Daniel Bates <dbates@rim.com>
3320 Fix the Android build after changeset 74975 <http://trac.webkit.org/changeset/74975>
3321 (https://bugs.webkit.org/show_bug.cgi?id=51855).
3323 * wtf/ThreadingPthreads.cpp: Add include of PassOwnPtr.h.
3324 (WTF::runThreadWithRegistration): Use -> instead of . to dereference pointer.
3326 2011-01-04 Martin Robinson <mrobinson@igalia.com>
3328 Try to fix the EFL build.
3330 * wtf/CMakeLists.txt: Remove PlatformRefPtr from the CMake source list.
3332 2011-01-04 James Robinson <jamesr@chromium.org>
3334 Reviewed by Darin Adler.
3336 StackBounds initialization in WTFThreadData should be guarded by #if USE(JSC)
3337 https://bugs.webkit.org/show_bug.cgi?id=51881
3339 The StackBounds class is only used by JavaScriptCore.
3341 * wtf/WTFThreadData.cpp:
3342 (WTF::WTFThreadData::WTFThreadData):
3343 * wtf/WTFThreadData.h:
3344 (WTF::WTFThreadData::resetCurrentIdentifierTable):
3346 2011-01-03 Martin Robinson <mrobinson@igalia.com>
3348 Reviewed by Darin Adler.
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
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.
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.
3391 2011-01-04 Daniel Bates <dbates@rim.com>
3393 Reviewed by Adam Roben.
3395 LEAK: Deallocate instance of ThreadFunctionInvocation if thread creation fails
3396 https://bugs.webkit.org/show_bug.cgi?id=51860
3398 * wtf/ThreadingWin.cpp:
3399 (WTF::createThreadInternal):
3401 2011-01-04 Laszlo Gombos <laszlo.1.gombos@nokia.com>
3403 Reviewed by Ariya Hidayat.
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
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.
3412 No new tests as there is no new functionality.
3414 * JavaScriptCore.pri:
3416 2011-01-04 Darin Adler <darin@apple.com>
3418 Try to fix Windows build.
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.
3425 2011-01-04 Daniel Bates <dbates@rim.com>
3427 Reviewed by Adam Roben.
3429 Extract ThreadFunctionInvocation into separate file and share between Apple Windows and Android
3430 https://bugs.webkit.org/show_bug.cgi?id=51855
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.
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.
3447 2011-01-04 Daniel Bates <dbates@rim.com>
3449 Reviewed by Darin Adler.
3451 Use __builtin_expect when compiling using RVCT in GNU mode
3452 https://bugs.webkit.org/show_bug.cgi?id=51866
3454 Derived from a patch by Dave Tapuska.
3456 * wtf/AlwaysInline.h:
3458 2011-01-03 Darin Adler <darin@apple.com>
3460 Reviewed by Brady Eidson.
3462 * wtf/Forward.h: Added Decoder and Encoder.
3464 2011-01-03 Brady Eidson <beidson@apple.com>
3466 Reviewed by Darin Adler.
3468 Add Encode/Decode machinery Darin and I plan to work with for back/forward stuff in WebKit2.
3470 Starting out with a pure virtual interface to be implemented in WK2, but we might change that later.
3473 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
3474 * JavaScriptCore.xcodeproj/project.pbxproj:
3475 * wtf/CMakeLists.txt:
3477 * wtf/Decoder.h: Added.
3478 * wtf/Encoder.h: Added.
3480 2011-01-03 Laszlo Gombos <laszlo.1.gombos@nokia.com>
3482 Unreviewed build fix.
3484 [Qt] Add NullPtr.cpp introduced in r71155 to the Qt build system.
3486 This fix is required for builds where HAVE(NULLPTR) is false
3487 (e.g. some MSVC and Symbian builds).
3491 2011-01-02 Dan Bernstein <mitz@apple.com>
3493 Rubber-stamped by Simon Fraser.
3495 <rdar://problem/8812159> Update copyright strings
3499 2011-01-02 Csaba Osztrogonác <ossy@webkit.org>
3501 Fix GTK+ build after r74855.
3503 Reviewed by Xan Lopez.
3505 * GNUmakefile.am: Fix include pathes.
3507 2011-01-02 Adam Barth <abarth@webkit.org>
3509 One more .. missing in the Qt build.
3513 2011-01-02 Xan Lopez <xlopez@igalia.com>
3517 * GNUmakefile.am: add -I$(srcdir)/Source to the JSC cppflags so
3518 that anyone can include its headers without adding the prefix
3521 2011-01-02 Carl Lobo <carllobo@gmail.com>
3523 Reviewed by Adam Barth.
3525 Fix Windows Build for non-production where VSPropsRedirectionDir is not defined.
3526 https://bugs.webkit.org/show_bug.cgi?id=51797
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:
3534 2011-01-01 Adam Barth <abarth@webkit.org>
3536 Fix relative include paths in an attempt to fix the Qt build.
3538 * JavaScriptCore.pri:
3539 * JavaScriptCore.pro:
3541 2011-01-01 Adam Barth <abarth@webkit.org>
3543 Another speculative build fix for GTK.
3547 2011-01-01 Adam Barth <abarth@webkit.org>
3549 Speculative build fix for GTK. Update the paths in GNUmakefile to
3554 2011-01-01 Adam Barth <abarth@webkit.org>
3556 Update relative paths in JavaScriptCore.gyp to account for the extra
3557 level of directories.
3559 * JavaScriptCore.gyp/JavaScriptCore.gyp:
3561 2010-12-31 Patrick Gansterer <paroga@webkit.org>
3563 Reviewed by Darin Adler.
3565 Add a fast case for ASCII strings in HashAndUTF8CharactersTranslator::equal
3566 https://bugs.webkit.org/show_bug.cgi?id=50517
3568 This change shows about 2% performance win on the xml-parser benchmark.
3570 * wtf/text/AtomicString.cpp:
3571 (WTF::HashAndUTF8CharactersTranslator::equal):
3573 2010-12-30 Patrick Gansterer <paroga@webkit.org>
3575 Reviewed by Ariya Hidayat.
3577 [CMake] Add WTF_HEADERS
3578 https://bugs.webkit.org/show_bug.cgi?id=51741
3580 Add the WTF headers to show them in Visual Studio.
3582 * wtf/CMakeLists.txt:
3583 * wtf/CMakeListsWinCE.txt:
3585 2010-12-30 Konstantin Tokarev <annulen@yandex.ru>
3587 Reviewed by David Kilzer.
3589 [Qt] Don't build wtf/TCSystemAlloc.cpp if --system-malloc option is
3591 https://bugs.webkit.org/show_bug.cgi?id=51672
3593 * wtf/wtf.pri: Replaced USE_SYSTEM_MALLOC with USE_SYSTEM_MALLOC=1
3595 2010-12-30 Patrick Gansterer <paroga@webkit.org>
3597 Reviewed by Darin Adler.
3599 Use OS(WINDOWS) instead of COMPILER(MSVC) in FastMalloc.cpp
3600 https://bugs.webkit.org/show_bug.cgi?id=51743
3602 Most of the ifdefs belong to windows and not to the MSVC compiler.
3604 * wtf/FastMalloc.cpp:
3606 2010-12-29 Gavin Barraclough <barraclough@apple.com>
3608 Reviewed by Sam Weinig.
3610 Bug 51724 - In strict mode string literals should allow \0, but disallow \8 and \9.
3613 (JSC::Lexer::parseString):
3615 2010-12-29 Helder Correia <helder@sencha.com>
3617 Reviewed by Eric Seidel.
3619 <VT> and <FF> are not valid JSON whitespace characters
3620 https://bugs.webkit.org/show_bug.cgi?id=51671
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).
3625 Tests: ietestcenter/Javascript/15.12.1.1-0-2.html
3626 ietestcenter/Javascript/15.12.1.1-0-3.html
3628 * runtime/LiteralParser.cpp:
3629 (JSC::isJSONWhiteSpace):
3630 (JSC::LiteralParser::Lexer::lex):
3632 2010-12-28 Helder Correia <helder@sencha.com>
3634 Reviewed by Eric Seidel.
3636 JSON.stringify must exist as a function taking 3 parameters
3637 https://bugs.webkit.org/show_bug.cgi?id=51667
3639 The reported function length is 1 instead.
3641 Test: ietestcenter/Javascript/15.12.3-0-2.html
3643 * runtime/JSONObject.cpp:
3645 2010-12-28 Helder Correia <helder@sencha.com>
3647 Reviewed by Sam Weinig.
3649 JSON.parse must exist as a function taking 2 parameters
3650 https://bugs.webkit.org/show_bug.cgi?id=51666
3652 Support for revivers was introduced in bug 26591, but the function
3653 length has since remained unchanged.
3655 Test: ietestcenter/Javascript/15.12.2-0-2.html
3657 * runtime/JSONObject.cpp:
3659 2010-12-27 Jake Helfert <jake@jakeonthenet.com>
3661 Reviewed and reworked by Darin Adler.
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
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.
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.
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
3688 * JavaScriptCore.xcodeproj/project.pbxproj: Added NullPtr.cpp,
3689 accidentally omitted when the file was first added.
3691 2010-12-26 Xan Lopez <xlopez@igalia.com>
3693 Reviewed by Eric Seidel.
3695 [GTK] Add standalone target for JSC
3696 https://bugs.webkit.org/show_bug.cgi?id=51607
3698 * GNUmakefile.am: add convenience target to only build jsc and its
3701 2010-12-24 Patrick Gansterer <paroga@webkit.org>
3703 Reviewed by Eric Seidel.
3705 [WINCE] Add CPU(MIPS) detection
3706 https://bugs.webkit.org/show_bug.cgi?id=51342
3708 WinCE usually defines MIPS and _MIPS_.
3712 2010-12-23 Gavin Barraclough <barraclough@apple.com>
3714 Reviewed by Sam Weinig.
3716 Rename RegexCompiler.cpp to RegexPattern.cpp.
3717 Implicitly call compileRegex from RegexPattern's constructor.
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:
3737 2010-12-23 Patrick Gansterer <paroga@webkit.org>
3739 Unreviewed build fix for WinCE after r74360.
3741 Move the OS(WINDOWS) section after the OS(WINCE) section
3742 and add missing argument to the getStackMax call.
3744 * wtf/StackBounds.cpp:
3745 (WTF::StackBounds::initialize):
3747 2010-12-22 Laszlo Gombos <laszlo.1.gombos@nokia.com>
3749 Unreviewed build fix.
3751 [Symbian] Make sure OSAllocatorSymbian builds
3753 This patch only addresses the build problem.
3755 https://bugs.webkit.org/show_bug.cgi?id=51128 tracks the full
3756 (re)implementation of the Symbian allocator.
3758 * wtf/OSAllocatorSymbian.cpp:
3759 (WTF::OSAllocator::reserveUncommitted):
3760 (WTF::OSAllocator::reserveAndCommit):
3761 (WTF::OSAllocator::commit):
3763 2010-12-22 Dan Bernstein <mitz@apple.com>
3765 Changed WebKitTools to Tools.
3767 * JavaScriptCore.vcproj/JavaScriptCore.sln:
3769 2010-12-22 Dan Bernstein <mitz@apple.com>
3771 Rubber-stamped by Mark Rowe.
3773 Changed WebKitTools to Tools in script build phases.
3775 * JavaScriptCore.xcodeproj/project.pbxproj:
3777 2010-12-22 Andrei Popescu <andreip@google.com>
3779 Unreviewed build fix.
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
3785 * JavaScriptCore.gyp/JavaScriptCore.gyp:
3786 * JavaScriptCore.gypi:
3788 2010-12-21 Sheriff Bot <webkit.review.bot@gmail.com>
3790 Unreviewed, rolling out r74462.
3791 http://trac.webkit.org/changeset/74462
3792 https://bugs.webkit.org/show_bug.cgi?id=51449
3794 broke chromium win (Requested by tonyg-cr on #webkit).
3796 * JavaScriptCore.gypi:
3798 2010-12-21 Tony Gentilcore <tonyg@chromium.org>
3800 Unreviewed build fix.
3802 [chromium] Build fix after r74431
3803 https://bugs.webkit.org/show_bug.cgi?id=51447
3805 * JavaScriptCore.gypi:
3807 2010-12-21 Gavin Barraclough <barraclough@apple.com>
3811 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3813 2010-12-21 Gavin Barraclough <barraclough@apple.com>
3817 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3819 2010-12-21 Gavin Barraclough <barraclough@apple.com>
3821 Speculative build fix.
3823 * jit/ExecutableAllocator.cpp:
3824 (JSC::ExecutableAllocator::underMemoryPressure):
3826 2010-12-21 Gavin Barraclough <barraclough@apple.com>
3828 Reviewed by Oliver Hunt.
3830 Bug 26276 - Need a mechanism to determine stack extent
3832 This patch adds accurate stack size calculation for:
3834 We still need to fix:
3835 WINDOWS, SOLARIS, OPENBSD, SYMBIAN, HAIKU, WINCE
3837 * wtf/StackBounds.cpp:
3838 (WTF::StackBounds::initialize):
3840 2010-12-21 Gavin Barraclough <barraclough@apple.com>
3842 Reviewed by Geoff Garen.
3844 <rdar://problem/8765333> CRASH running out of executable memory, loading io9.com
3845 https://bugs.webkit.org/show_bug.cgi?id=51443
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
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.
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.
3876 2010-12-21 Gavin Barraclough <barraclough@apple.com>
3878 Reviewed by Geoff Garen.
3880 <rdar://problem/8241425> JIT executable memory excessive usage due to regex caching
3881 https://bugs.webkit.org/show_bug.cgi?id=51434
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).
3894 * runtime/JSGlobalData.h:
3895 * runtime/RegExpCache.h:
3896 * yarr/RegexJIT.cpp:
3897 (JSC::Yarr::RegexGenerator::compile):
3899 2010-12-21 Gavin Barraclough <barraclough@apple.com>
3903 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3905 2010-12-21 Gavin Barraclough <barraclough@apple.com>
3909 * wtf/OSAllocator.h:
3910 (WTF::OSAllocator::decommitAndRelease):
3912 2010-12-21 Gavin Barraclough <barraclough@apple.com>
3914 Ooops, fixed typo in comment.
3916 * wtf/OSAllocator.h:
3918 2010-12-21 Geoffrey Garen <ggaren@apple.com>
3920 Reviewed by Gavin Barraclough & Oliver Hunt.
3922 Added PageAllocationAligned, a cross-platform abstraction for memory allocations with arbitrary alignment requirements
3923 https://bugs.webkit.org/show_bug.cgi?id=51359
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.
3931 * JavaScriptCore.gypi:
3932 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
3933 * JavaScriptCore.xcodeproj/project.pbxproj: Updated build files.
3935 * runtime/AlignedMemoryAllocator.h: Removed. Supplanted by
3936 PageAllocationAligned.
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.
3946 * runtime/GCHandle.cpp:
3947 * runtime/GCHandle.h: Ditto.
3949 * wtf/PageAllocation.h:
3950 (WTF::PageAllocation::PageAllocation): Removed aligned memory allocation
3951 functions. Supplanted by PageAllocationAligned.
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
3962 * wtf/Platform.h: Removed some defunction VM platform defines.
3964 * wtf/wtf.pri: Updated build files.
3966 2010-12-21 Oliver Hunt <oliver@apple.com>
3968 Reviewed by Gavin Barraclough.
3970 ASSERTION FAILED: base->index() == m_codeBlock->argumentsRegister() while loading taobao.com
3971 https://bugs.webkit.org/show_bug.cgi?id=49006
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.
3978 This required a bit of fiddling in the parser to ensure we correctly
3979 propagate the 'feature' of shadowing is set correctly.
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):
3994 (JSC::ScopeNode::usesArguments):
3996 2010-12-21 Daniel Bates <dbates@rim.com>
3998 Reviewed by Eric Seidel and Darin Adler.
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
4003 Inspired by a patch by George Staikos.
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.
4013 2010-12-21 Sheriff Bot <webkit.review.bot@gmail.com>
4015 Unreviewed, rolling out r74402.
4016 http://trac.webkit.org/changeset/74402
4017 https://bugs.webkit.org/show_bug.cgi?id=51402
4019 This patch broke the Windows 7 Release Layout Tests (Requested
4020 by jessieberlin on #webkit).
4022 * wtf/StackBounds.cpp:
4023 (WTF::estimateStackBound):
4024 (WTF::StackBounds::initialize):
4026 2010-12-21 Peter Varga <pvarga@inf.u-szeged.hu>
4028 Reviewed by Csaba Osztrogonác.
4030 Unify the name of parentheses in YARR: rename parenthesis to
4033 * yarr/RegexCompiler.cpp:
4034 (JSC::Yarr::RegexPatternConstructor::atomParenthesesEnd):
4036 2010-12-21 Laszlo Gombos <laszlo.1.gombos@nokia.com>
4038 Reviewed by Andreas Kling.
4040 [Qt] Set BUILDING_QT__ consistently
4041 https://bugs.webkit.org/show_bug.cgi?id=51341
4043 * JavaScriptCore.pri: Remove the definition of BUILDING_QT__ as it
4044 is already defined in WebKit.pri.
4046 2010-12-20 Gavin Barraclough <barraclough@apple.com>
4048 Reviewed by Oliver Hunt.
4050 Bug 26276 - Need a mechanism to determine stack extent
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
4057 * wtf/StackBounds.cpp:
4058 (WTF::StackBounds::initialize):
4060 2010-12-20 Gavin Barraclough <barraclough@apple.com>
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.
4067 * wtf/PageAllocation.h:
4068 (WTF::PageAllocation::deallocate):
4070 * wtf/PageReservation.h:
4071 (WTF::PageReservation::deallocate):
4073 2010-12-20 Oliver Hunt <oliver@apple.com>
4075 Reviewed by Geoffrey Garen.
4077 |delete name| in strict mode code should be an early error
4078 https://bugs.webkit.org/show_bug.cgi?id=50431
4080 Disallow the |delete IDENTIFIER| production in strict mode, and removed
4081 a bunch of now unnecessary code.
4083 * parser/JSParser.cpp:
4084 (JSC::JSParser::Scope::collectFreeVariables):
4086 (JSC::JSParser::parseProgram):
4087 (JSC::JSParser::parseUnaryExpression):
4088 * parser/JSParser.h:
4089 * parser/Parser.cpp:
4090 (JSC::Parser::parse):
4092 (JSC::Parser::parse):
4094 2010-12-20 Gavin Barraclough <barraclough@apple.com>
4096 Reviewed by Olver Hunt.
4098 Bug 51358 - Should check stack depth rather than using recursion limits in byte compilation
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.
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.
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):
4115 2010-12-20 Tony Gentilcore <tonyg@chromium.org>
4117 Unreviewed build fix.
4119 Include pthread to fix chromium mac build (broken by r74360)
4120 https://bugs.webkit.org/show_bug.cgi?id=51356
4122 * wtf/StackBounds.cpp:
4124 2010-12-20 Xan Lopez <xlopez@igalia.com>
4126 Reviewed by Gustavo Noronha.
4128 * GNUmakefile.am: add missing files.
4130 2010-12-18 Gavin Barraclough <barraclough@apple.com>
4132 Reviewed by Oliver Hunt.
4134 Bug 26276 - Need a mechanism to determine stack extent
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.
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.
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.
4153 * parser/JSParser.cpp: