1 2011-03-17 Jeff Miller <jeffm@apple.com>
3 Use a consistent set of file patterns in the svn:ignore property for all .xcodeproj directories, specifically:
11 * JavaScriptCore.xcodeproj: Modified property svn:ignore.
13 2011-03-17 Gavin Barraclough <barraclough@apple.com>
15 Reverting r81197, breaks JIT + INTERPRETER build.
17 * bytecode/CodeBlock.cpp:
18 (JSC::CodeBlock::hasGlobalResolveInstructionAtBytecodeOffset):
19 (JSC::CodeBlock::hasGlobalResolveInfoAtBytecodeOffset):
20 * bytecode/CodeBlock.h:
21 (JSC::CodeBlock::addPropertyAccessInstruction):
22 (JSC::CodeBlock::addGlobalResolveInstruction):
23 (JSC::CodeBlock::addStructureStubInfo):
25 * bytecode/StructureStubInfo.h:
26 * bytecompiler/BytecodeGenerator.cpp:
27 (JSC::BytecodeGenerator::emitResolve):
28 (JSC::BytecodeGenerator::emitResolveWithBase):
29 (JSC::BytecodeGenerator::emitGetById):
30 (JSC::BytecodeGenerator::emitPutById):
31 (JSC::BytecodeGenerator::emitDirectPutById):
32 (JSC::BytecodeGenerator::emitCall):
33 (JSC::BytecodeGenerator::emitConstruct):
34 (JSC::BytecodeGenerator::emitCatch):
36 2011-03-17 Ben Taylor <bentaylor.solx86@gmail.com>
38 Reviewed by Alexey Proskuryakov.
40 Add a COMPILER(SUNCC) define for Sun Studio 12.
41 https://bugs.webkit.org/show_bug.cgi?56444
42 derived from patch 1 of 16 originally from https://bugs.webkit.org/show_bug.cgi?id=24932
46 2011-03-17 Jay Civelli <jcivelli@chromium.org>
48 Reviewed by David Levin.
50 Adding a contains method to Vector.
51 https://bugs.webkit.org/show_bug.cgi?id=55859
57 2011-03-17 Patrick Gansterer <paroga@webkit.org>
59 Fix the interpreter build.
61 * interpreter/Interpreter.cpp:
62 (JSC::Interpreter::privateExecute): Added globalData to inheritorID().
64 2011-03-16 Sam Weinig <sam@webkit.org>
66 Fix the interpreter build.
68 * interpreter/Interpreter.cpp:
69 (JSC::Interpreter::resolve):
70 (JSC::Interpreter::resolveSkip):
71 (JSC::Interpreter::resolveGlobal):
72 (JSC::Interpreter::resolveGlobalDynamic):
73 (JSC::Interpreter::resolveBaseAndProperty):
74 (JSC::Interpreter::privateExecute):
77 2011-03-16 Adam Barth <abarth@webkit.org>
79 Reviewed by James Robinson.
81 Remove USE(BUILTIN_UTF8_CODEC)
82 https://bugs.webkit.org/show_bug.cgi?id=56508
84 We added this recently when we were unsure about the stability of the
85 built-in UTF-8 codec. However, the codec seems to be stable, so we
90 2011-03-16 Daniel Bates <dbates@rim.com>
92 Reviewed by Darin Adler.
94 Make JIT build for ARM Thumb-2 with RVCT
95 https://bugs.webkit.org/show_bug.cgi?id=56440
97 Derived from a patch by Dave Tapuska.
99 Also, modify the RVCT stub template to indicate that it preserves 8 byte stack alignment.
103 2011-03-16 Chao-ying Fu <fu@mips.com>
105 Reviewed by Darin Adler.
107 Fix MIPS build with const *void
108 https://bugs.webkit.org/show_bug.cgi?id=56513
110 * assembler/MacroAssemblerMIPS.h:
111 (JSC::MacroAssemblerMIPS::load32):
112 (JSC::MacroAssemblerMIPS::store32):
114 2011-03-16 Oliver Hunt <oliver@apple.com>
116 Reviewed by Darin Adler.
118 Remove unnecessary caller tracking shenanigans from CodeBlock
119 https://bugs.webkit.org/show_bug.cgi?id=56483
121 This removes some leftover cruft from when we made CodeBlock
122 mark its callees. Removing it gives us a 0.7% progression,
123 reducing the overall regression to ~1.3%.
125 * bytecode/CodeBlock.cpp:
126 (JSC::CodeBlock::shrinkToFit):
127 * bytecode/CodeBlock.h:
128 (JSC::CallLinkInfo::CallLinkInfo):
130 (JSC::JIT::linkCall):
131 (JSC::JIT::linkConstruct):
133 2011-03-15 Oliver Hunt <oliver@apple.com>
135 Reviewed by Geoffrey Garen.
137 Make Structure creation require a JSGlobalData
138 https://bugs.webkit.org/show_bug.cgi?id=56438
140 Mechanical change to make Structure::create require JSGlobalData&, and
141 require all users to provide the globalData.
143 * API/JSCallbackConstructor.h:
144 (JSC::JSCallbackConstructor::createStructure):
145 * API/JSCallbackFunction.h:
146 (JSC::JSCallbackFunction::createStructure):
147 * API/JSCallbackObject.h:
148 (JSC::JSCallbackObject::createStructure):
149 * API/JSContextRef.cpp:
150 * JavaScriptCore.exp:
151 * debugger/DebuggerActivation.cpp:
152 (JSC::DebuggerActivation::DebuggerActivation):
153 * debugger/DebuggerActivation.h:
154 (JSC::DebuggerActivation::createStructure):
156 (JSC::DEFINE_STUB_FUNCTION):
158 (GlobalObject::GlobalObject):
161 * runtime/Arguments.h:
162 (JSC::Arguments::createStructure):
163 * runtime/ArrayPrototype.h:
164 (JSC::ArrayPrototype::createStructure):
165 * runtime/BooleanObject.h:
166 (JSC::BooleanObject::createStructure):
167 * runtime/DateInstance.h:
168 (JSC::DateInstance::createStructure):
169 * runtime/DatePrototype.h:
170 (JSC::DatePrototype::createStructure):
171 * runtime/ErrorInstance.h:
172 (JSC::ErrorInstance::createStructure):
173 * runtime/Executable.h:
174 (JSC::ExecutableBase::createStructure):
175 (JSC::EvalExecutable::createStructure):
176 (JSC::ProgramExecutable::createStructure):
177 (JSC::FunctionExecutable::createStructure):
178 * runtime/FunctionPrototype.h:
179 (JSC::FunctionPrototype::createStructure):
180 * runtime/GetterSetter.h:
181 (JSC::GetterSetter::createStructure):
182 * runtime/InternalFunction.h:
183 (JSC::InternalFunction::createStructure):
184 * runtime/JSAPIValueWrapper.h:
185 (JSC::JSAPIValueWrapper::createStructure):
186 * runtime/JSActivation.h:
187 (JSC::JSActivation::createStructure):
188 * runtime/JSArray.cpp:
189 (JSC::JSArray::JSArray):
191 (JSC::JSArray::createStructure):
192 * runtime/JSByteArray.cpp:
193 (JSC::JSByteArray::createStructure):
194 * runtime/JSByteArray.h:
195 (JSC::JSByteArray::JSByteArray):
197 (JSC::JSCell::JSCell::createDummyStructure):
198 * runtime/JSFunction.h:
199 (JSC::JSFunction::createStructure):
200 * runtime/JSGlobalData.cpp:
201 (JSC::JSGlobalData::storeVPtrs):
202 (JSC::JSGlobalData::JSGlobalData):
203 * runtime/JSGlobalObject.cpp:
204 (JSC::JSGlobalObject::reset):
205 * runtime/JSGlobalObject.h:
206 (JSC::JSGlobalObject::JSGlobalObject):
207 (JSC::JSGlobalObject::createStructure):
208 * runtime/JSNotAnObject.h:
209 (JSC::JSNotAnObject::createStructure):
210 * runtime/JSONObject.h:
211 (JSC::JSONObject::createStructure):
212 * runtime/JSObject.cpp:
213 (JSC::JSObject::createInheritorID):
214 * runtime/JSObject.h:
215 (JSC::JSObject::createStructure):
216 (JSC::JSNonFinalObject::createStructure):
217 (JSC::JSFinalObject::createStructure):
218 (JSC::createEmptyObjectStructure):
219 (JSC::JSObject::inheritorID):
220 * runtime/JSObjectWithGlobalObject.h:
221 (JSC::JSObjectWithGlobalObject::createStructure):
222 * runtime/JSPropertyNameIterator.h:
223 (JSC::JSPropertyNameIterator::createStructure):
224 * runtime/JSStaticScopeObject.h:
225 (JSC::JSStaticScopeObject::createStructure):
226 * runtime/JSString.h:
227 (JSC::RopeBuilder::createStructure):
228 * runtime/JSVariableObject.h:
229 (JSC::JSVariableObject::createStructure):
230 * runtime/JSWrapperObject.h:
231 (JSC::JSWrapperObject::createStructure):
232 * runtime/JSZombie.h:
233 (JSC::JSZombie::createStructure):
234 * runtime/MathObject.h:
235 (JSC::MathObject::createStructure):
236 * runtime/NativeErrorConstructor.cpp:
237 (JSC::NativeErrorConstructor::NativeErrorConstructor):
238 * runtime/NativeErrorConstructor.h:
239 (JSC::NativeErrorConstructor::createStructure):
240 * runtime/NumberConstructor.h:
241 (JSC::NumberConstructor::createStructure):
242 * runtime/NumberObject.h:
243 (JSC::NumberObject::createStructure):
244 * runtime/ObjectConstructor.h:
245 (JSC::ObjectConstructor::createStructure):
246 * runtime/RegExpConstructor.h:
247 (JSC::RegExpConstructor::createStructure):
248 * runtime/RegExpObject.h:
249 (JSC::RegExpObject::createStructure):
250 * runtime/ScopeChain.h:
251 (JSC::ScopeChainNode::createStructure):
252 * runtime/StringObject.h:
253 (JSC::StringObject::createStructure):
254 * runtime/StringObjectThatMasqueradesAsUndefined.h:
255 (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
256 * runtime/StringPrototype.h:
257 (JSC::StringPrototype::createStructure):
258 * runtime/Structure.h:
259 (JSC::Structure::create):
261 2011-03-16 Geoffrey Garen <ggaren@apple.com>
263 Reviewed by Oliver Hunt.
265 Some conservative root gathering cleanup
266 https://bugs.webkit.org/show_bug.cgi?id=56447
268 SunSpider says 0.5% - 1.8% faster.
270 * interpreter/RegisterFile.cpp:
271 (JSC::RegisterFile::gatherConservativeRoots):
272 * interpreter/RegisterFile.h: New helper function for doing the
273 conservative gathering of the register file. It's still conservative,
274 since the register file may contain uninitialized values, but it's
275 moving-safe, because it only visits values tagged as pointers, so there's
276 no risk of mistaking an integer for a pointer and accidentally changing it.
278 * runtime/ConservativeSet.cpp:
279 (JSC::ConservativeRoots::add):
280 * runtime/ConservativeSet.h: Added a single-value add function, used above.
283 (JSC::Heap::markRoots): Separated machine stack conservative roots from
284 register file conservative roots because machine stack roots must be
285 pinned, but register file roots need not be pinned.
287 Adopted new interface for passing the current stack extent to the machine
288 stack root gathering routine. This allows us to exclude marking-related
289 data structures on the stack, and thus avoid double-marking the set of
292 * runtime/MachineStackMarker.cpp:
293 (JSC::MachineThreads::gatherFromCurrentThread):
294 (JSC::MachineThreads::gatherConservativeRoots):
295 * runtime/MachineStackMarker.h: Added new interface, described above.
297 * runtime/MarkedBlock.h:
298 (JSC::MarkedBlock::firstAtom):
299 * wtf/StdLibExtras.h:
300 (WTF::roundUpToMultipleOf): Moved roundUpToMultipleOf so it could be used
303 2011-03-16 Geoffrey Garen <ggaren@apple.com>
305 Reviewed by Oliver Hunt.
307 A little bit of MarkStack cleanup
308 https://bugs.webkit.org/show_bug.cgi?id=56443
310 Moved MarkStack functions into MarkStack.h/.cpp.
312 SunSpider reports no change.
315 * runtime/JSCell.h: Moved from here...
316 * runtime/MarkStack.cpp:
317 (JSC::MarkStack::markChildren):
318 (JSC::MarkStack::drain): ...to here. Also, no need to inline drain. It's
319 a huge function, and not called many times.
321 * runtime/MarkStack.h:
322 (JSC::MarkStack::~MarkStack): Moved near constructor, per style guide.
323 (JSC::MarkStack::append):
324 (JSC::MarkStack::deprecatedAppend):
325 (JSC::MarkStack::internalAppend): Moved to here.
327 2011-03-15 Geoffrey Garen <ggaren@apple.com>
329 Reviewed by Oliver Hunt.
331 Removed another deprecatedAppend
332 https://bugs.webkit.org/show_bug.cgi?id=56429
334 * collector/handles/HandleHeap.cpp:
335 (JSC::HandleHeap::markStrongHandles):
336 * collector/handles/HandleHeap.h: Use HeapRootMarker, since handles are
337 marked directly by the Heap.
340 (JSC::Heap::markRoots): Ditto.
342 2011-03-15 Geoffrey Garen <ggaren@apple.com>
344 Reviewed by Oliver Hunt.
346 Removed some more deprecated / unsafe append
347 https://bugs.webkit.org/show_bug.cgi?id=56428
349 * collector/handles/HandleStack.cpp:
350 (JSC::HandleStack::mark):
351 * collector/handles/HandleStack.h: Mark the handle stack using a HeapRoot
352 marker, since it's a heap root.
354 * runtime/ArgList.cpp:
355 (JSC::MarkedArgumentBuffer::markLists):
356 (JSC::MarkedArgumentBuffer::slowAppend):
357 * runtime/ArgList.h: Ditto.
360 (JSC::Heap::markRoots): Added a mark call for marking the handle stack.
361 It seems like Oliver forgot this in his last patch. (!)
363 * runtime/MarkStack.h: Removed appendSlots, since it would allow an
364 object to embed JSValues directly instead of using WriteBarrier.
366 (JSC::MarkStack::append): Added a private append for a list of values.
368 (JSC::HeapRootMarker::mark): Access to the above.
370 2011-03-15 Geoffrey Garen <ggaren@apple.com>
372 Reviewed by Oliver Hunt.
374 Removed a few more deprecatedAppends, and removed HeapRoot<T>
375 https://bugs.webkit.org/show_bug.cgi?id=56422
377 Added HeapRootMarker, a privileged class for marking direct heap roots
378 that are iterated during each garbage collection. This is easier to use
379 and more reliable than HeapRoot<T>, so I've removed HeapRoot<T>.
381 * debugger/Debugger.cpp:
382 (JSC::evaluateInGlobalCallFrame):
383 * debugger/DebuggerCallFrame.cpp:
384 (JSC::DebuggerCallFrame::evaluate):
385 * interpreter/CallFrame.h:
386 (JSC::ExecState::exception):
388 (JSC::DEFINE_STUB_FUNCTION):
389 * runtime/Completion.cpp:
390 (JSC::evaluate): exception is no longer a HeapRoot<T>, so no need to
394 (JSC::Heap::markProtectedObjects):
395 (JSC::Heap::markTempSortVectors):
396 (JSC::Heap::markRoots):
397 * runtime/Heap.h: Updated to use HeapRootMarker.
400 (JSC::JSCell::MarkStack::append): Added private functions for
401 HeapRootMarker to use.
403 * runtime/JSGlobalData.h: exception is no longer a HeapRoot<T>.
405 * runtime/MarkStack.h:
406 (JSC::HeapRootMarker::HeapRootMarker):
407 (JSC::HeapRootMarker::mark): Added private functions for
408 HeapRootMarker to use.
410 * runtime/SmallStrings.cpp:
411 (JSC::SmallStrings::markChildren): Updated to use HeapRootMarker.
413 * runtime/SmallStrings.h:
414 (JSC::SmallStrings::emptyString):
415 (JSC::SmallStrings::singleCharacterString):
416 (JSC::SmallStrings::singleCharacterStrings): Updated to use HeapRootMarker.
418 * runtime/WriteBarrier.h: Removed HeapRoot<T>.
420 2011-03-14 Geoffrey Garen <ggaren@apple.com>
422 Reviewed by Oliver Hunt.
424 Made the global object moving-GC-safe
425 https://bugs.webkit.org/show_bug.cgi?id=56348
427 SunSpider reports no change.
429 * runtime/JSGlobalObject.cpp:
430 (JSC::JSGlobalObject::markChildren): Removed a dubious comment that
431 suggested we do not need to visit all our references during GC, since
432 that is not true in a moving GC.
434 Re-sorted data members by type, removed one duplicate, and added back
435 the one missing mark I found.
437 * runtime/JSGlobalObject.h: Re-sorted data members by type.
439 2011-03-15 Oliver Hunt <oliver@apple.com>
441 Reviewed by Geoffrey Garen.
443 Introduce Local<T> to allow us to start moving to precise marking of locals
444 https://bugs.webkit.org/show_bug.cgi?id=56394
446 Introduce a new handle type, Local<T> and a scoping mechanism
447 LocalScope to allow us to start moving towards precise marking
448 of temporaries and local variables.
450 We also start to use the new Local<> type in the JSON stringifier
451 so that we can have some coverage of their behaviour in the initial
455 * JavaScriptCore.gypi:
456 * JavaScriptCore.pro:
457 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
458 * JavaScriptCore.xcodeproj/project.pbxproj:
459 * collector/handles/Handle.h:
461 * collector/handles/HandleStack.cpp: Added.
462 (JSC::HandleStack::HandleStack):
463 (JSC::HandleStack::mark):
464 (JSC::HandleStack::grow):
465 * collector/handles/HandleStack.h: Added.
466 (JSC::HandleStack::enterScope):
467 (JSC::HandleStack::zapTo):
468 (JSC::HandleStack::leaveScope):
469 (JSC::HandleStack::push):
470 * collector/handles/Local.h: Added.
471 (JSC::Local::internalSet):
474 (JSC::LocalStack::LocalStack):
475 (JSC::LocalStack::peek):
476 (JSC::LocalStack::pop):
477 (JSC::LocalStack::push):
478 (JSC::LocalStack::isEmpty):
479 (JSC::LocalStack::size):
480 * collector/handles/LocalScope.h: Added.
481 (JSC::LocalScope::LocalScope):
482 (JSC::LocalScope::~LocalScope):
483 (JSC::LocalScope::release):
485 (JSC::Heap::markRoots):
487 (JSC::Heap::allocateLocalHandle):
488 (JSC::Heap::handleStack):
490 (JSC::JSCell::::getString):
491 * runtime/JSGlobalData.cpp:
492 (JSC::JSGlobalData::JSGlobalData):
493 * runtime/JSGlobalData.h:
494 (JSC::JSGlobalData::allocateLocalHandle):
495 * runtime/JSONObject.cpp:
496 (JSC::Stringifier::Stringifier):
497 (JSC::Stringifier::stringify):
498 (JSC::Stringifier::appendStringifiedValue):
499 (JSC::Stringifier::Holder::Holder):
500 (JSC::Walker::Walker):
502 (JSC::JSONProtoFuncParse):
503 (JSC::JSONProtoFuncStringify):
504 (JSC::JSONStringify):
505 * runtime/JSONObject.h:
506 * runtime/MarkStack.h:
507 (JSC::MarkStack::appendValues):
508 (JSC::MarkStack::appendSlots):
510 2011-03-15 Gavin Barraclough <barraclough@apple.com>
512 Rubber Stamped by Sam Weinig.
514 Bug 56420 - Remove ENABLE(JIT) code from ByteCompiler
515 Some methods have unnecessary differences in name/arguments for interpreter/JIT.
517 * bytecode/CodeBlock.cpp:
518 * bytecode/CodeBlock.h:
519 (JSC::HandlerInfo::HandlerInfo):
520 (JSC::CodeBlock::addPropertyAccessInfo):
521 (JSC::CodeBlock::addGlobalResolveInfo):
522 (JSC::CodeBlock::addCallLinkInfo):
523 (JSC::CodeBlock::globalResolveInfo):
525 * bytecode/StructureStubInfo.h:
526 * bytecompiler/BytecodeGenerator.cpp:
527 (JSC::BytecodeGenerator::emitResolve):
528 (JSC::BytecodeGenerator::emitResolveWithBase):
529 (JSC::BytecodeGenerator::emitGetById):
530 (JSC::BytecodeGenerator::emitPutById):
531 (JSC::BytecodeGenerator::emitDirectPutById):
532 (JSC::BytecodeGenerator::emitCall):
533 (JSC::BytecodeGenerator::emitConstruct):
534 (JSC::BytecodeGenerator::emitCatch):
536 2011-03-15 Gavin Barraclough <barraclough@apple.com>
538 Reviewed by Sam Weinig.
540 Fix broken assert in new code.
542 * dfg/DFGAliasTracker.h:
543 (JSC::DFG::AliasTracker::recordPutByVal):
544 - recordPutByVal is called for both PutByVal & PutByValAlias.
546 2011-03-15 Gavin Barraclough <barraclough@apple.com>
548 Rubber stamped by Sam Weinig.
550 Removed redundant code from BytecodeGenerator.
552 * bytecompiler/BytecodeGenerator.cpp:
553 * bytecompiler/BytecodeGenerator.h:
554 - delete uncalled code missed when reparsing was removed.
556 2011-03-15 Kevin Ollivier <kevino@theolliviers.com>
558 Reviewed by Darin Adler.
560 Introduce WTF_USE_EXPORT_MACROS, which will allow us to put shared library import/export
561 info into the headers rather than in export symbol definition files, but disable it on
562 all platforms initially so we can deal with port build issues one port at a time.
564 https://bugs.webkit.org/show_bug.cgi?id=27551
569 * wtf/ExportMacros.h: Added.
572 2011-03-14 Laszlo Gombos <laszlo.1.gombos@nokia.com>
574 Unreviewed build fix.
576 Buildfix when JIT is not enabled after r81079
577 https://bugs.webkit.org/show_bug.cgi?id=56361
579 * runtime/Executable.cpp:
581 2011-03-14 Geoffrey Garen <ggaren@apple.com>
583 Reviewed by Oliver Hunt.
585 Made the global object moving-GC-safe
586 https://bugs.webkit.org/show_bug.cgi?id=56348
588 SunSpider reports no change.
590 * runtime/JSGlobalObject.cpp:
591 (JSC::JSGlobalObject::markChildren): Removed a dubious comment that
592 suggested we do not need to visit all our references during GC, since
593 that is not true in a moving GC.
595 Re-sorted data members by type, removed one duplicate, and added back
596 the one missing mark I found.
598 * runtime/JSGlobalObject.h: Re-sorted data members by type.
600 2011-03-14 Geoffrey Garen <ggaren@apple.com>
602 Reviewed by Oliver Hunt.
604 Made JSWrapperObject and subclasses moving-GC-safe
605 https://bugs.webkit.org/show_bug.cgi?id=56346
607 SunSpider reports no change.
609 * runtime/BooleanObject.cpp:
610 (JSC::BooleanObject::BooleanObject):
611 * runtime/DateInstance.cpp:
612 (JSC::DateInstance::DateInstance): No more need for JSGlobalData, since
613 we don't initialize the wrapped value in our constructor.
615 * runtime/DateInstance.h: Don't set the OverridesMarkChildren flag because
616 we do not in fact override markChildren.
618 * runtime/DatePrototype.h: Declare an anonymous slot, since wrapper object
619 no longer does so for us. Also added an ASSERT to catch a latent bug,
620 where DatePrototype stomped on its base class's anonymous slot. Hard-coded
621 anonymous slots are a plague on our code. This doesn't cause any problems
622 in our existing code since the base class never reads the anonymous slot
623 it declares, but it caused crashes when I tried to start using the slot
624 in an initial version of this patch.
626 * runtime/JSWrapperObject.h:
627 (JSC::JSWrapperObject::JSWrapperObject):
628 (JSC::JSWrapperObject::internalValue):
629 (JSC::JSWrapperObject::setInternalValue): Resolved a problem where
630 our internal value was stored in two places: an anonymous slot, and a
631 data member which was not always visited during GC. Now, we only use the
632 data member, and we always visit it. (Instead of relying on certain
633 subclasses to set the OverridesMarkChildren bit, we set it ourselves.)
635 * runtime/NumberObject.cpp:
636 (JSC::NumberObject::NumberObject): No more need for JSGlobalData, since
637 we don't initialize the wrapped value in our constructor.
639 * runtime/NumberObject.h: Removed meaningless declaration.
641 * runtime/StringObject.cpp:
642 (JSC::StringObject::StringObject): No more need for JSGlobalData, since
643 we don't initialize the wrapped value in our constructor.
645 * runtime/StringObject.h: Don't set the OverridesMarkChildren flag because
646 we do not in fact override markChildren.
648 * runtime/StringPrototype.h: Declare an anonymous slot, since wrapper object
649 no longer does so for us. Also added an ASSERT to catch a latent bug,
650 where DatePrototype stomped on its base class's anonymous slot. Hard-coded
651 anonymous slots are a plague on our code.
653 2011-03-14 Michael Saboff <msaboff@apple.com>
655 Reviewed by Gavin Barraclough.
657 Look-ahead assertions with back references don’t work as expected
658 https://bugs.webkit.org/show_bug.cgi?id=56082
660 Changed parentheses assertion processing to temporarily back out the
661 number of known characters after the assertion while processing the
662 assertion. This was done so that assertions don't fail due to
663 checking the number of required characters as additional to the
664 rest of the express since assertions don't "consume" input.
665 Added a byte code to uncheck characters to support the change.
667 * yarr/YarrInterpreter.cpp:
668 (JSC::Yarr::Interpreter::matchDisjunction):
669 (JSC::Yarr::ByteCompiler::uncheckInput):
670 (JSC::Yarr::ByteCompiler::emitDisjunction):
671 * yarr/YarrInterpreter.h:
672 (JSC::Yarr::ByteTerm::UncheckInput):
674 2011-03-14 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
676 Reviewed by Laszlo Gombos.
678 [Qt] Warning that round/roundf functions are already defined when compiled with RVCT 4 on symbian.
679 https://bugs.webkit.org/show_bug.cgi?id=56133
681 Add condition to not compile webkit internal math round functions on RVCT compiler versions
682 from 3.0.0 because they are already defined in compiler math library.
686 2011-03-14 Gavin Barraclough <barraclough@apple.com>
688 Reviewed by Geoffrey Garen & Oliver Hunt.
690 Bug 56284 - Add a dataflow intermediate representation for use in JIT generation.
692 The JSC JIT presently generates code directly from the bytecode used by the interpreter.
693 This is not an optimal intermediate representation for JIT code generation, since it does
694 not capture liveness information of values, and provides little opportunity to perform
695 any static analysis for even primitive types. The JIT currently generates two code paths,
696 a fast path handling common cases, and a slower path handling less common operand types.
697 However the slow path jumps back into the fast path, meaning that information arising
698 from the earlier type checks cannot be propagated to later operations.
701 * a dataflow intermediate representation capable of describing a single basic block
703 * a mechanism to convert a simple, single-block bytecode functions to the new IR,
704 * and a JIT code generator capable of generating code from this representation.
706 The JIT generates two code paths, with the slower path not reentering the fast path
707 mid-block, allowing speculative optimizations to be made on the hot path, with type
708 information arising from these speculative decisions able to be propagated through the
709 dataflow. Code generation of both speculative and non-speculative paths exploits the type
710 and liveness information represented in the dataflow graph to attempt to avoid redundant
711 boxing and type-checking of values, and to remove unnecessary spills of temporary values
714 The dataflow JIT currently can only support a subset of bytecode operations, limited to
715 arithmetic, bit-ops, and basic property access. Functions that cannot be compiled by the
716 dataflow JIT will be run using the existing JIT. The coverage of the dataflow JIT will be
717 expanded to include, control-flow, function calls, and then the long-tail of remaining
718 bytecode instructions. The JIT presently only support JSVALUE64, and as a consequence of
719 this only supports x86-64.
721 The status of the dataflow JIT is currently work-in-progress. Limitations of the present
722 JIT code generation may cause performance regressions, particularly:
723 * the policy to only generate arithmetic code on the speculative path using integer
724 instructions, never using floating point.
725 * the policy to only generate arithmetic code on the non-speculative path using
726 floating point instructions, never using integer.
727 * always generating JSValue adds on the non-speculative path as a call out to a
728 C-function, never handling this in JIT code.
729 * always assuming by-Value property accesses on the speculative path to be array
731 * generating all by-Value property accesses from the non-speculative path as a call
733 * generating all by-Indentifer property accesses as a call out to a C-function.
734 Due to these regressions, the code is landed in a state where it is disabled in most
735 cases by the ENABLE_DFG_JIT_RESTRICTIONS guard in Platform.h. As these regressions are
736 addressed, the JIT will be allowed to trigger in more cases.
738 * JavaScriptCore.xcodeproj/project.pbxproj:
739 - Added new files to Xcode project.
741 - Added directory for new code.
742 * dfg/DFGByteCodeParser.cpp: Added.
743 * dfg/DFGByteCodeParser.h: Added.
744 - Contruct a DFG::Graph representation from a bytecode CodeBlock.
745 * dfg/DFGGenerationInfo.h: Added.
746 - Track type & register information for VirtualRegisters during JIT code generation.
747 * dfg/DFGGraph.cpp: Added.
748 * dfg/DFGGraph.h: Added.
749 - Dataflow graph intermediate representation for code generation.
750 * dfg/DFGJITCodeGenerator.cpp: Added.
751 * dfg/DFGJITCodeGenerator.h: Added.
752 - Base class for SpeculativeJIT & NonSpeculativeJIT to share common functionality.
753 * dfg/DFGJITCompiler.cpp: Added.
754 * dfg/DFGJITCompiler.h: Added.
755 - Class responsible for driving code generation of speculativeJIT & non-speculative
756 code paths from the dataflow graph.
757 * dfg/DFGNonSpeculativeJIT.cpp: Added.
758 * dfg/DFGNonSpeculativeJIT.h: Added.
759 - Used to generate the non-speculative code path, this make no assumptions
761 * dfg/DFGOperations.cpp: Added.
762 * dfg/DFGOperations.h: Added.
763 - Helper functions called from the JIT generated code.
764 * dfg/DFGRegisterBank.h: Added.
765 - Used to track contents of physical registers during JIT code generation.
766 * dfg/DFGSpeculativeJIT.cpp: Added.
767 * dfg/DFGSpeculativeJIT.h: Added.
768 - Used to generate the speculative code path, this make assumptions about
769 operand types to enable optimization.
770 * runtime/Executable.cpp:
771 - Add code to attempt to use the DFG JIT to compile a function, with fallback
774 - Added compile guards to enable the DFG JIT.
776 2011-03-14 Geoffrey Garen <ggaren@apple.com>
778 Reviewed by Oliver Hunt.
780 Removed more cases of DeprecatedPtr (exception, SmallStrings)
781 https://bugs.webkit.org/show_bug.cgi?id=56332
783 * runtime/Identifier.cpp:
784 (JSC::Identifier::add):
785 (JSC::Identifier::addSlowCase): Use a variable instead of a hard-coded
786 constant, to make this code less brittle.
788 * runtime/JSGlobalData.h: Use HeapRoot instead of DeprecatedPtr because
789 this reference is owned and managed directly by the heap.
791 * runtime/JSString.cpp:
792 (JSC::JSString::substringFromRope):
793 * runtime/JSString.h:
794 (JSC::jsSingleCharacterString):
795 (JSC::jsSingleCharacterSubstring):
797 (JSC::jsStringWithFinalizer):
799 (JSC::jsOwnedString): Use a variable instead of a hard-coded
800 constant, to make this code less brittle.
802 * runtime/SmallStrings.cpp:
803 (JSC::SmallStringsStorage::rep):
804 (JSC::SmallStringsStorage::SmallStringsStorage):
805 (JSC::SmallStrings::SmallStrings):
806 (JSC::SmallStrings::markChildren):
807 (JSC::SmallStrings::clear):
808 (JSC::SmallStrings::count): Use a variable instead of a hard-coded
809 constant, to make this code less brittle.
811 * runtime/SmallStrings.h:
812 (JSC::SmallStrings::singleCharacterString): Use HeapRoot instead of
813 DeprecatedPtr because these references are owned and managed directly by
816 Stop using FixedArray because we only want a very limited set
817 of classes to be able to use HeapRoot. (Replaced with manual ASSERTs.)
819 * runtime/WriteBarrier.h:
821 (JSC::WriteBarrier::WriteBarrier):
822 (JSC::HeapRoot::HeapRoot):
823 (JSC::HeapRoot::operator=): Added HeapRoot, which is allowed to set
824 without write barrier because we assume all HeapRoots are scanned during
827 2011-03-14 Brian Weinstein <bweinstein@apple.com>
829 Reviewed by Adam Roben and Gavin Barraclough.
831 FileSystemWin.cpp needs listDirectory() implementation
832 https://bugs.webkit.org/show_bug.cgi?id=56331
833 <rdar://problem/9126635>
835 Give StringConcatenate the ability to deal with const UChar*'s as a String type to append.
837 * wtf/text/StringConcatenate.h:
839 2011-03-14 Mark Rowe <mrowe@apple.com>
841 Reviewed by Oliver Hunt.
843 <http://webkit.org/b/56304> REGRESSION(r80892): 100,000+ leaks seen on the build bot
845 * API/JSClassRef.cpp:
846 (OpaqueJSClass::OpaqueJSClass): Don't leak any existing entry for the given name if
847 the class definition contains duplicates. This also removes what look to be leaks
848 of the StringImpl instances that are used as keys: the HashMap key type is a RefPtr
849 which retains / releases the instances at the appropriate time, so explicitly calling
850 ref is not necessary.
852 2011-03-14 Oliver Hunt <oliver@apple.com>
856 * jit/JSInterfaceJIT.h:
857 (JSC::JSInterfaceJIT::emitLoadInt32):
858 (JSC::JSInterfaceJIT::tagFor):
859 (JSC::JSInterfaceJIT::payloadFor):
860 (JSC::JSInterfaceJIT::intPayloadFor):
861 (JSC::JSInterfaceJIT::intTagFor):
862 (JSC::JSInterfaceJIT::addressFor):
864 2011-03-11 Oliver Hunt <oliver@apple.com>
866 Reviewed by Gavin Barraclough.
868 Ensure all values are correctly tagged in the registerfile
869 https://bugs.webkit.org/show_bug.cgi?id=56214
871 This patch makes sure that all JSCell pointers written to
872 the registerfile are correctly tagged as JSCells, and replaces
873 raw int usage with the immediate representation.
875 For performance, register pressure, and general saneness reasons
876 I've added abstractions for reading and writing the tag
877 and payload of integer registers directly for the JSVALUE64
880 * interpreter/Register.h:
881 (JSC::Register::withInt):
882 (JSC::Register::withCallee):
883 (JSC::Register::operator=):
885 (JSC::Register::activation):
886 (JSC::Register::function):
887 (JSC::Register::propertyNameIterator):
888 (JSC::Register::scopeChain):
891 (JSC::JIT::compileOpCallInitializeCallFrame):
892 (JSC::JIT::compileOpCallVarargs):
893 (JSC::JIT::compileOpCall):
894 * jit/JITCall32_64.cpp:
895 (JSC::JIT::compileOpCallInitializeCallFrame):
896 (JSC::JIT::compileOpCallVarargs):
897 (JSC::JIT::compileOpCall):
898 (JSC::JIT::compileOpCallSlowCase):
899 * jit/JITInlineMethods.h:
900 (JSC::JIT::emitPutToCallFrameHeader):
901 (JSC::JIT::emitPutCellToCallFrameHeader):
902 (JSC::JIT::emitPutIntToCallFrameHeader):
903 * jit/JITOpcodes.cpp:
904 (JSC::JIT::privateCompileCTINativeCall):
905 (JSC::JIT::emit_op_get_pnames):
906 (JSC::JIT::emit_op_next_pname):
907 (JSC::JIT::emit_op_load_varargs):
908 (JSC::JIT::emitSlow_op_load_varargs):
909 * jit/JITOpcodes32_64.cpp:
910 (JSC::JIT::privateCompileCTINativeCall):
911 (JSC::JIT::emit_op_get_pnames):
912 (JSC::JIT::emit_op_next_pname):
913 * jit/JSInterfaceJIT.h:
914 (JSC::JSInterfaceJIT::intPayloadFor):
915 (JSC::JSInterfaceJIT::intTagFor):
916 * jit/SpecializedThunkJIT.h:
917 (JSC::SpecializedThunkJIT::returnJSValue):
918 (JSC::SpecializedThunkJIT::returnDouble):
919 (JSC::SpecializedThunkJIT::returnInt32):
920 (JSC::SpecializedThunkJIT::returnJSCell):
922 2011-03-13 Geoffrey Garen <ggaren@apple.com>
924 Reviewed by Sam Weinig.
926 A few Heap-related renames (sans file moves, which should come next)
927 https://bugs.webkit.org/show_bug.cgi?id=56283
929 ConservativeSet => ConservativeRoots. "Set" was misleading, since items
930 are not uniqued. Also, "Roots" is more specific about what's in the set.
932 MachineStackMarker => MachineThreads. "Threads" is more descriptive of
933 the fact that this class maintains a set of all threads using JSC.
934 "Stack" was misleading, since this class traverses stacks and registers.
935 "Mark" was misleading, since this class doesn't mark anything anymore.
937 registerThread => addCurrentThread. "Current" is more specific.
938 unregisterThread => removeCurrentThread. "Current" is more specific.
940 "currentThreadRegistrar" => threadSpecific. The only point of this data
941 structure is to register a thread-specific destructor with a pointer to
944 "mark...Conservatively" => "gather". "Mark" is not true, since these
945 functions don't mark anything. "Conservatively" is redundant, since they
946 take "ConservativeRoots" as an argument.
949 (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
950 * JavaScriptCore.exp:
951 * runtime/ConservativeSet.cpp:
952 (JSC::ConservativeRoots::grow):
953 (JSC::ConservativeRoots::add):
954 * runtime/ConservativeSet.h:
955 (JSC::ConservativeRoots::ConservativeRoots):
956 (JSC::ConservativeRoots::~ConservativeRoots):
957 (JSC::ConservativeRoots::size):
958 (JSC::ConservativeRoots::roots):
961 (JSC::Heap::markRoots):
963 (JSC::Heap::machineThreads):
964 * runtime/JSGlobalData.h:
965 (JSC::JSGlobalData::makeUsableFromMultipleThreads):
966 * runtime/MachineStackMarker.cpp:
967 (JSC::MachineThreads::MachineThreads):
968 (JSC::MachineThreads::~MachineThreads):
969 (JSC::MachineThreads::makeUsableFromMultipleThreads):
970 (JSC::MachineThreads::addCurrentThread):
971 (JSC::MachineThreads::removeThread):
972 (JSC::MachineThreads::removeCurrentThread):
973 (JSC::MachineThreads::gatherFromCurrentThreadInternal):
974 (JSC::MachineThreads::gatherFromCurrentThread):
975 (JSC::MachineThreads::gatherFromOtherThread):
976 (JSC::MachineThreads::gatherConservativeRoots):
977 * runtime/MachineStackMarker.h:
978 * runtime/MarkStack.h:
979 (JSC::MarkStack::append):
981 2011-03-13 David Kilzer <ddkilzer@apple.com>
983 BUILD FIX for armv7 after r80969
985 Bug 56270 - The JIT 'friend's many classes in JSC; start unwinding this.
986 <https://bugs.webkit.org/show_bug.cgi?id=56270>
988 * assembler/MacroAssemblerARMv7.h:
989 (JSC::MacroAssemblerARMv7::load32): Made void* address argument
991 (JSC::MacroAssemblerARMv7::store32): Ditto.
993 2011-03-13 Geoffrey Garen <ggaren@apple.com>
997 Try to fix the Mac build.
999 * JavaScriptCore.xcodeproj/project.pbxproj: Make sure to forward
1000 ConervativeSet.h, since it's now visible when compiling other projects.
1002 2011-03-13 Geoffrey Garen <ggaren@apple.com>
1004 Reviewed by Oliver Hunt.
1006 Removed another case of DeprecatedPtr (ConservativeSet)
1007 https://bugs.webkit.org/show_bug.cgi?id=56281
1009 The ConservativeSet is an internal data structure used during marking,
1010 so direct pointers are fine.
1012 * runtime/ConservativeSet.cpp:
1013 (JSC::ConservativeSet::grow):
1014 * runtime/ConservativeSet.h: Added some accessors, for use by MarkStack::append.
1015 (JSC::ConservativeSet::~ConservativeSet): Fixed a typo where we calculated
1016 the size of the set based on sizeof(DeprecatedPtr<T>*) instead of
1017 sizeof(DeprecatedPtr<T>). I'm not sure if this had real-world implications or not.
1018 (JSC::ConservativeSet::size):
1019 (JSC::ConservativeSet::set): Use direct pointers, as stated above.
1022 (JSC::Heap::markRoots):
1023 * runtime/MarkStack.h:
1024 (JSC::MarkStack::append): Created a special case of append for
1025 ConservativeSet. I didn't want to add back a generic "append JSCell*"
1026 function, since other class might start using that wrong. (In the end,
1027 this function might go away, since the Heap will want to do something
1028 slightly more interesting with the conservative set, but this is OK for
1031 2011-03-13 Geoffrey Garen <ggaren@apple.com>
1033 Reviewed by Oliver Hunt.
1035 Removed another case of DeprecatedPtr (PutPropertySlot)
1036 https://bugs.webkit.org/show_bug.cgi?id=56278
1038 * runtime/PutPropertySlot.h:
1039 (JSC::PutPropertySlot::setExistingProperty):
1040 (JSC::PutPropertySlot::setNewProperty):
1041 (JSC::PutPropertySlot::base): Direct pointer is fine for PutPropertySlot,
1042 since it's a stack-allocated temporary.
1044 2011-03-13 Geoffrey Garen <ggaren@apple.com>
1046 Reviewed by Oliver Hunt.
1048 Removed one case of DeprecatedPtr (ScopeChainIterator)
1049 https://bugs.webkit.org/show_bug.cgi?id=56277
1051 * runtime/ScopeChain.h: Direct pointer is fine for ScopeChainIterator,
1052 since it's a stack-allocated temporary.
1054 2011-03-13 Gavin Barraclough <barraclough@apple.com>
1056 Reviewed by Sam Weinig.
1058 Bug 56273 - Add three operand forms to MacroAssember operations.
1060 Adding for X86(_64) for now, should be rolled out to other backends as necessary.
1061 These may allow more efficient code generation in some cases, avoiding the need
1062 for unnecessary register-register move instructions.
1064 * assembler/AbstractMacroAssembler.h:
1065 (JSC::AbstractMacroAssembler::Jump::link):
1066 (JSC::AbstractMacroAssembler::Jump::linkTo):
1067 - marked these methods const.
1068 (JSC::AbstractMacroAssembler::Jump::isSet):
1069 - add a method to check whether a Jump object has been set to
1070 reference an instruction, or is in a null, unset state.
1071 * assembler/MacroAssemblerCodeRef.h:
1072 (JSC::FunctionPtr::FunctionPtr):
1073 - add non-explicit constructor, for FunctionPtr's to C/C++ functions.
1074 * assembler/MacroAssemblerX86Common.h:
1075 (JSC::MacroAssemblerX86Common::and32):
1076 (JSC::MacroAssemblerX86Common::lshift32):
1077 (JSC::MacroAssemblerX86Common::or32):
1078 (JSC::MacroAssemblerX86Common::rshift32):
1079 (JSC::MacroAssemblerX86Common::urshift32):
1080 (JSC::MacroAssemblerX86Common::xor32):
1081 (JSC::MacroAssemblerX86Common::moveDouble):
1082 (JSC::MacroAssemblerX86Common::addDouble):
1083 (JSC::MacroAssemblerX86Common::divDouble):
1084 (JSC::MacroAssemblerX86Common::subDouble):
1085 (JSC::MacroAssemblerX86Common::mulDouble):
1086 (JSC::MacroAssemblerX86Common::branchTruncateDoubleToInt32):
1087 (JSC::MacroAssemblerX86Common::branchTest32):
1088 (JSC::MacroAssemblerX86Common::branchTest8):
1089 (JSC::MacroAssemblerX86Common::branchAdd32):
1090 (JSC::MacroAssemblerX86Common::branchMul32):
1091 (JSC::MacroAssemblerX86Common::branchSub32):
1092 - add three operand forms of these instructions.
1093 * assembler/MacroAssemblerX86_64.h:
1094 (JSC::MacroAssemblerX86_64::addDouble):
1095 (JSC::MacroAssemblerX86_64::convertInt32ToDouble):
1096 (JSC::MacroAssemblerX86_64::loadPtr):
1097 (JSC::MacroAssemblerX86_64::branchTestPtr):
1098 * assembler/X86Assembler.h:
1099 (JSC::X86Assembler::JmpSrc::isSet):
1100 - add a method to check whether a JmpSrc object has been set to
1101 reference an instruction, or is in a null, unset state.
1102 (JSC::X86Assembler::movsd_rr):
1103 - added FP register-register move.
1104 (JSC::X86Assembler::linkJump):
1105 - Add an assert to check jumps aren't linked more than once.
1106 * jit/JITInlineMethods.h:
1107 (JSC::JIT::emitLoadInt32ToDouble):
1108 - load integers to the FPU via regsiters on x86-64.
1110 2011-03-13 Gavin Barraclough <barraclough@apple.com>
1114 * assembler/MacroAssemblerARM.h:
1115 (JSC::MacroAssemblerARM::load32):
1117 2011-03-13 Gavin Barraclough <barraclough@apple.com>
1119 Reviewed by Sam Weinig.
1121 Bug 56270 - The JIT 'friend's many classes in JSC; start unwinding this.
1123 The JIT need to 'friend' other classes in order to be able to calculate offsets
1124 of various properties, or the absolute addresses of members within specific objects,
1125 in order to JIT generate code that will access members within the class when run.
1127 Instead of using friends in these cases, switch to providing specific accessor
1128 methods to provide this information. In the case of offsets, these can be static
1129 functions, and in the case of pointers to members within a specific object these can
1130 be const methods returning pointers to const values, to prevent clients from
1131 modifying values otherwise encapsulated within classes.
1133 * bytecode/SamplingTool.h:
1134 * interpreter/Register.h:
1135 * interpreter/RegisterFile.h:
1136 * runtime/JSArray.h:
1138 * runtime/JSTypeInfo.h:
1139 * runtime/JSVariableObject.h:
1140 * runtime/Structure.h:
1142 - Change these classes to no longer friend the JIT, add accessors for member offsets.
1144 * jit/JITCall32_64.cpp:
1145 * jit/JITInlineMethods.h:
1146 * jit/JITOpcodes.cpp:
1147 * jit/JITOpcodes32_64.cpp:
1148 * jit/JITPropertyAccess.cpp:
1149 * jit/JITPropertyAccess32_64.cpp:
1150 - Change the JIT to use class accessors, rather than taking object ofsets directly.
1151 * assembler/AbstractMacroAssembler.h:
1152 * assembler/MacroAssemblerX86_64.h:
1153 * assembler/X86Assembler.h:
1154 - Since the accessors for objects members return const pointers to retain encapsulation,
1155 methods generating code with absolute addresses must be able to handle const pointers
1156 (the JIT doesn't write to these values, do dies treat the pointer to value as const
1157 from within the C++ code of the JIT, if not at runtime!).
1159 2011-03-12 Sheriff Bot <webkit.review.bot@gmail.com>
1161 Unreviewed, rolling out r80919.
1162 http://trac.webkit.org/changeset/80919
1163 https://bugs.webkit.org/show_bug.cgi?id=56251
1165 all windows bots failed to compile this change (Requested by
1168 * JavaScriptCore.xcodeproj/project.pbxproj:
1169 * bytecode/StructureStubInfo.cpp:
1170 * interpreter/Register.h:
1171 (JSC::Register::withInt):
1172 (JSC::Register::withCallee):
1173 (JSC::Register::operator=):
1175 (JSC::Register::activation):
1176 (JSC::Register::function):
1177 (JSC::Register::propertyNameIterator):
1178 (JSC::Register::scopeChain):
1181 (JSC::JIT::compileOpCallInitializeCallFrame):
1182 (JSC::JIT::compileOpCallVarargs):
1183 (JSC::JIT::compileOpCall):
1184 * jit/JITCall32_64.cpp:
1185 (JSC::JIT::compileOpCallInitializeCallFrame):
1186 (JSC::JIT::compileOpCallVarargs):
1187 (JSC::JIT::compileOpCall):
1188 (JSC::JIT::compileOpCallSlowCase):
1189 * jit/JITInlineMethods.h:
1190 (JSC::JIT::emitPutToCallFrameHeader):
1191 * jit/JITOpcodes.cpp:
1192 (JSC::JIT::privateCompileCTINativeCall):
1193 (JSC::JIT::emit_op_get_pnames):
1194 (JSC::JIT::emit_op_next_pname):
1195 (JSC::JIT::emit_op_load_varargs):
1196 (JSC::JIT::emitSlow_op_load_varargs):
1197 * jit/JITOpcodes32_64.cpp:
1198 (JSC::JIT::privateCompileCTINativeCall):
1199 (JSC::JIT::emit_op_get_pnames):
1200 (JSC::JIT::emit_op_next_pname):
1201 * jit/JSInterfaceJIT.h:
1202 (JSC::JSInterfaceJIT::payloadFor):
1203 * jit/SpecializedThunkJIT.h:
1204 (JSC::SpecializedThunkJIT::returnJSValue):
1205 (JSC::SpecializedThunkJIT::returnDouble):
1206 (JSC::SpecializedThunkJIT::returnInt32):
1207 (JSC::SpecializedThunkJIT::returnJSCell):
1208 * runtime/ArgList.cpp:
1209 * runtime/DateConversion.cpp:
1210 * runtime/GCActivityCallbackCF.cpp:
1211 * runtime/Identifier.cpp:
1212 * runtime/JSActivation.h:
1213 (JSC::asActivation):
1214 * runtime/JSLock.cpp:
1215 * runtime/JSNumberCell.cpp:
1216 * runtime/JSObject.h:
1217 * runtime/JSPropertyNameIterator.h:
1218 * runtime/JSValue.h:
1219 * runtime/JSZombie.cpp:
1220 * runtime/MarkedBlock.cpp:
1221 * runtime/MarkedSpace.cpp:
1222 * runtime/PropertyNameArray.cpp:
1223 * runtime/ScopeChain.h:
1224 (JSC::ExecState::globalThisValue):
1227 2011-03-11 Oliver Hunt <oliver@apple.com>
1229 Reviewed by Gavin Barraclough.
1231 Ensure all values are correctly tagged in the registerfile
1232 https://bugs.webkit.org/show_bug.cgi?id=56214
1234 This patch makes sure that all JSCell pointers written to
1235 the registerfile are correctly tagged as JSCells, and replaces
1236 raw int usage with the immediate representation.
1238 For performance, register pressure, and general saneness reasons
1239 I've added abstractions for reading and writing the tag
1240 and payload of integer registers directly for the JSVALUE64
1243 * interpreter/Register.h:
1244 (JSC::Register::withInt):
1245 (JSC::Register::withCallee):
1246 (JSC::Register::operator=):
1248 (JSC::Register::activation):
1249 (JSC::Register::function):
1250 (JSC::Register::propertyNameIterator):
1251 (JSC::Register::scopeChain):
1254 (JSC::JIT::compileOpCallInitializeCallFrame):
1255 (JSC::JIT::compileOpCallVarargs):
1256 (JSC::JIT::compileOpCall):
1257 * jit/JITCall32_64.cpp:
1258 (JSC::JIT::compileOpCallInitializeCallFrame):
1259 (JSC::JIT::compileOpCallVarargs):
1260 (JSC::JIT::compileOpCall):
1261 (JSC::JIT::compileOpCallSlowCase):
1262 * jit/JITInlineMethods.h:
1263 (JSC::JIT::emitPutToCallFrameHeader):
1264 (JSC::JIT::emitPutCellToCallFrameHeader):
1265 (JSC::JIT::emitPutIntToCallFrameHeader):
1266 * jit/JITOpcodes.cpp:
1267 (JSC::JIT::privateCompileCTINativeCall):
1268 (JSC::JIT::emit_op_get_pnames):
1269 (JSC::JIT::emit_op_next_pname):
1270 (JSC::JIT::emit_op_load_varargs):
1271 (JSC::JIT::emitSlow_op_load_varargs):
1272 * jit/JITOpcodes32_64.cpp:
1273 (JSC::JIT::privateCompileCTINativeCall):
1274 (JSC::JIT::emit_op_get_pnames):
1275 (JSC::JIT::emit_op_next_pname):
1276 * jit/JSInterfaceJIT.h:
1277 (JSC::JSInterfaceJIT::intPayloadFor):
1278 (JSC::JSInterfaceJIT::intTagFor):
1279 * jit/SpecializedThunkJIT.h:
1280 (JSC::SpecializedThunkJIT::returnJSValue):
1281 (JSC::SpecializedThunkJIT::returnDouble):
1282 (JSC::SpecializedThunkJIT::returnInt32):
1283 (JSC::SpecializedThunkJIT::returnJSCell):
1285 2011-03-11 Dimitri Glazkov <dglazkov@chromium.org>
1287 Reviewed by Eric Seidel.
1289 Introduce project_dir variable and make paths a whole lot saner. Ok, a little bit saner.
1290 https://bugs.webkit.org/show_bug.cgi?id=56231
1292 * JavaScriptCore.gypi: Added project_dir variable.
1293 * gyp/JavaScriptCore.gyp: Changed to use project_dir, rather than DEPTH/JavaScriptCore.
1294 * gyp/generate-dtrace-header.sh: Changed to use project_dir.
1296 2011-03-11 Dimitri Glazkov <dglazkov@chromium.org>
1298 Reviewed by Adam Barth.
1300 Start using derived sources correctly and link minidom with JavaScriptCore gyp project.
1301 https://bugs.webkit.org/show_bug.cgi?id=56217
1303 * gyp/JavaScriptCore.gyp: Added derived source files and passing of shared directory
1305 * gyp/generate-derived-sources.sh: Changed to use passed directory.
1306 * gyp/generate-dtrace-header.sh: Ditto.
1308 2011-03-11 Eric Carlson <eric.carlson@apple.com>
1310 Reviewed by Sam Weinig.
1312 <rdar://problem/8955589> Adopt AVFoundation media back end on Lion.
1314 No new tests, existing media tests cover this.
1316 * JavaScriptCore.exp: Export cancelCallOnMainThread
1317 * wtf/Platform.h: Define WTF_USE_AVFOUNDATION.
1319 2011-03-11 Dimitri Glazkov <dglazkov@chromium.org>
1321 Reviewed by Adam Barth.
1323 Tweak dylib paths and add dtrace header generation action to JavaScriptCore gyp project.
1324 https://bugs.webkit.org/show_bug.cgi?id=56207
1326 * JavaScriptCore.gypi: Added Tracing.d to the sources.
1327 * gyp/generate-dtrace-header.sh: Added.
1328 * gyp/JavaScriptCore.gyp: Updated dylib paths (now the project can see them),
1329 and added DTrace header generating step.
1331 2011-03-10 Oliver Hunt <oliver@apple.com>
1333 Reviewed by Gavin Barraclough.
1335 Fix allocation of native function with a cached thunk
1336 https://bugs.webkit.org/show_bug.cgi?id=56127
1338 Fix this race condition found while fixing zombies.
1340 * collector/handles/HandleHeap.cpp:
1341 (JSC::HandleHeap::clearWeakPointers):
1344 * runtime/JSFunction.cpp:
1345 (JSC::JSFunction::JSFunction):
1346 (JSC::JSFunction::markChildren):
1347 * runtime/JSValue.h:
1348 (JSC::JSValue::decode):
1349 * runtime/JSZombie.cpp:
1350 (JSC::JSZombie::leakedZombieStructure):
1351 * runtime/JSZombie.h:
1352 (JSC::JSZombie::createStructure):
1353 * runtime/MarkedBlock.cpp:
1355 2011-03-10 Luiz Agostini <luiz.agostini@openbossa.org>
1357 Reviewed by Andreas Kling.
1359 [Qt] fast/workers/stress-js-execution.html is crashing on Qt bot (intermittently)
1360 https://bugs.webkit.org/show_bug.cgi?id=33008
1362 Defining WTF_USE_PTHREAD_BASED_QT=1 for platforms where QThread uses pthread internally.
1363 Symbian is excluded because pthread_kill does not work on it. Mac is excluded because
1364 it has its own ways to do JSC threading.
1366 Defining WTF_USE_PTHREADS inside MachineStackMarker.cpp if USE(PTHREAD_BASED_QT) is true.
1368 * runtime/MachineStackMarker.cpp:
1371 2011-03-10 Gavin Barraclough <barraclough@apple.com>
1373 Reviewed by Oliver Hunt.
1375 Bug 56077 - ES5 conformance issues with RegExp.prototype
1377 There are three issues causing test failures in sputnik.
1379 (1) lastIndex should be converted at the point it is used, not the point it is set (this is visible if valueOf is overridden).
1380 (2) The 'length' property of the test/exec functions should be 1.
1381 (3) If no input is specified, the input to test()/exec() is "undefined" (i.e. ToString(undefined)) - not RegExp.input.
1383 * runtime/RegExpObject.cpp:
1384 (JSC::RegExpObject::markChildren):
1385 - Added to mark lastIndex
1386 (JSC::regExpObjectLastIndex):
1387 (JSC::setRegExpObjectLastIndex):
1388 - lastIndex is now stored as a JSValue.
1389 (JSC::RegExpObject::match):
1390 - Use accessor methods to get/set lastIndex, add fast case for isUInt32 (don't convert to double).
1391 * runtime/RegExpObject.h:
1392 (JSC::RegExpObject::setLastIndex):
1393 (JSC::RegExpObject::setLastIndex):
1394 - Set lastIndex, either from a size_t or a JSValue.
1395 (JSC::RegExpObject::getLastIndex):
1397 (JSC::RegExpObject::RegExpObjectData::RegExpObjectData):
1398 - Initialize as a JSValue.
1399 * runtime/RegExpPrototype.cpp:
1400 (JSC::RegExpPrototype::RegExpPrototype):
1401 - Add test/exec properties with length 1.
1402 * runtime/StringPrototype.cpp:
1403 (JSC::stringProtoFuncMatch):
1404 (JSC::stringProtoFuncSearch):
1405 - Do not read RegExp.input if none is provided.
1406 * tests/mozilla/js1_2/regexp/RegExp_input.js:
1407 * tests/mozilla/js1_2/regexp/RegExp_input_as_array.js:
1408 - Update these tests (they relied on non-ES5 behaviour).
1410 2011-03-10 Geoffrey Garen <ggaren@apple.com>
1412 Reviewed by Oliver Hunt.
1414 Rolled back in 80277 and 80280 with event handler layout test failures fixed.
1415 https://bugs.webkit.org/show_bug.cgi?id=55653
1417 The failures were caused by a last minute typo: assigning to currentEvent
1418 instead of m_currentEvent.
1420 * JavaScriptCore.exp:
1421 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1422 * JavaScriptCore.xcodeproj/project.pbxproj:
1423 * bytecompiler/BytecodeGenerator.cpp:
1424 * jit/JITOpcodes.cpp:
1425 * jit/JITOpcodes32_64.cpp:
1426 * runtime/Arguments.h:
1427 * runtime/JSActivation.cpp:
1428 * runtime/JSActivation.h:
1430 * runtime/JSGlobalObject.cpp:
1431 * runtime/JSGlobalObject.h:
1432 * runtime/JSObject.cpp:
1433 * runtime/JSStaticScopeObject.cpp:
1434 * runtime/JSStaticScopeObject.h:
1435 * runtime/JSVariableObject.h:
1436 * runtime/MarkedSpace.cpp:
1437 * runtime/MarkedSpace.h:
1439 2011-03-09 Oliver Hunt <oliver@apple.com>
1441 Reviewed by Gavin Barraclough.
1443 jquery/manipulation.html fails after r80598
1444 https://bugs.webkit.org/show_bug.cgi?id=56019
1446 When linking a call, codeblock now takes ownership of the linked function
1447 This removes the need for unlinking, and thus the incorrectness that was
1448 showing up in these tests.
1450 * bytecode/CodeBlock.cpp:
1451 (JSC::CodeBlock::~CodeBlock):
1452 (JSC::CodeBlock::markAggregate):
1453 * bytecode/CodeBlock.h:
1454 (JSC::CallLinkInfo::CallLinkInfo):
1455 (JSC::CallLinkInfo::setUnlinked):
1456 (JSC::CodeBlock::addCaller):
1458 (JSC::JIT::privateCompile):
1459 (JSC::JIT::linkCall):
1460 (JSC::JIT::linkConstruct):
1462 * runtime/Executable.cpp:
1463 * runtime/Executable.h:
1465 2011-03-09 Daniel Bates <dbates@rim.com>
1467 Attempt to fix the WinCE build after changeset 80684 <http://trac.webkit.org/changeset/80684>
1468 (Bug #56041<https://bugs.webkit.org/show_bug.cgi?id=56041>).
1470 * interpreter/Interpreter.cpp:
1471 (JSC::Interpreter::privateExecute): Substitute variable callFrame for exec in call to createSyntaxError().
1473 2011-03-09 Gavin Barraclough <barraclough@apple.com>
1475 Reviewed by Sam Weinig.
1477 Bug 56041 - RexExp constructor should only accept flags "gim"
1478 Fix for issues introduced in r80667.
1480 Invalid flags to a RegExp literal are a late syntax error!
1482 * bytecode/CodeBlock.h:
1483 (JSC::CodeBlock::addRegExp):
1484 - Pass a PassRefPtr<RegExp>
1485 * bytecompiler/BytecodeGenerator.cpp:
1486 (JSC::BytecodeGenerator::addRegExp):
1487 (JSC::BytecodeGenerator::emitNewRegExp):
1488 * bytecompiler/BytecodeGenerator.h:
1489 - Pass a PassRefPtr<RegExp>
1490 * bytecompiler/NodesCodegen.cpp:
1491 (JSC::RegExpNode::emitBytecode):
1492 - Should not be ASSERTing that the flags are valid - this is a late(er) error.
1493 * interpreter/Interpreter.cpp:
1494 (JSC::Interpreter::privateExecute):
1495 - Need to check for error from RegExp constructor.
1497 (JSC::DEFINE_STUB_FUNCTION):
1498 - Need to check for error from RegExp constructor.
1500 (JSC::RegExp::isValid):
1501 - Make isValid check that the regexp was created with valid flags.
1502 * runtime/RegExpKey.h:
1503 - Since we'll not create RegExp objects with invalid flags, separate out the deleted value.
1505 2011-03-09 Gavin Barraclough <barraclough@apple.com>
1507 Windows build fix part 2.
1509 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1511 2011-03-09 Gavin Barraclough <barraclough@apple.com>
1513 Windows build fix part 1.
1515 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1517 2011-03-09 Gavin Barraclough <barraclough@apple.com>
1519 Reviewed by Darin Adler.
1521 Bug 56041 - RexExp constructor should only accept flags "gim"
1522 We also should be passing the flags around as a bitfield rather than a string,
1523 and should not have redundant, incompatible code for converting the string to a bitfield!
1525 * JavaScriptCore.exp:
1526 * bytecompiler/NodesCodegen.cpp:
1527 (JSC::RegExpNode::emitBytecode):
1528 - Need to parse flags string to enum.
1529 * runtime/RegExp.cpp:
1531 (JSC::RegExp::RegExp):
1532 (JSC::RegExp::create):
1533 - Add method to parse flags string to enum, change constructor/create args to take enum.
1535 (JSC::RegExp::global):
1536 (JSC::RegExp::ignoreCase):
1537 (JSC::RegExp::multiline):
1538 - Change to use new enum values.
1539 * runtime/RegExpCache.cpp:
1540 (JSC::RegExpCache::lookupOrCreate):
1541 (JSC::RegExpCache::create):
1542 * runtime/RegExpCache.h:
1543 - Changed to use regExpFlags enum instead of int/const UString&.
1544 * runtime/RegExpConstructor.cpp:
1545 (JSC::constructRegExp):
1546 - Add use new enum parsing, check for error.
1547 * runtime/RegExpKey.h:
1548 (JSC::RegExpKey::RegExpKey):
1549 * runtime/RegExpPrototype.cpp:
1550 (JSC::RegExpPrototype::RegExpPrototype):
1551 - Pass NoFlags value instead of empty string.
1552 (JSC::regExpProtoFuncCompile):
1553 - Add use new enum parsing, check for error.
1554 * runtime/StringPrototype.cpp:
1555 (JSC::stringProtoFuncMatch):
1556 (JSC::stringProtoFuncSearch):
1557 - Pass NoFlags value instead of empty string.
1559 2011-03-08 Gavin Barraclough <barraclough@apple.com>
1561 Reviewed by Sam Weinig
1563 Bug 55994 - Functions on Array.prototype should check length first.
1564 These methods are designed to work on generic objects too, and if 'length'
1565 is a getter that throws an exception, ensure this is correctly thrown
1566 (even if other exceptions would be thrown, too).
1568 Make the length check the first thing we do.
1569 This change shows a progression on SunSpider on my machine, but this is likely bogus.
1571 * runtime/ArrayPrototype.cpp:
1572 (JSC::arrayProtoFuncToString):
1573 (JSC::arrayProtoFuncToLocaleString):
1574 (JSC::arrayProtoFuncJoin):
1575 (JSC::arrayProtoFuncPop):
1576 (JSC::arrayProtoFuncPush):
1577 (JSC::arrayProtoFuncReverse):
1578 (JSC::arrayProtoFuncShift):
1579 (JSC::arrayProtoFuncSlice):
1580 (JSC::arrayProtoFuncSort):
1581 (JSC::arrayProtoFuncSplice):
1582 (JSC::arrayProtoFuncUnShift):
1583 (JSC::arrayProtoFuncFilter):
1584 (JSC::arrayProtoFuncMap):
1585 (JSC::arrayProtoFuncEvery):
1586 (JSC::arrayProtoFuncForEach):
1587 (JSC::arrayProtoFuncSome):
1588 (JSC::arrayProtoFuncReduce):
1589 (JSC::arrayProtoFuncReduceRight):
1590 (JSC::arrayProtoFuncIndexOf):
1591 (JSC::arrayProtoFuncLastIndexOf):
1593 2011-03-07 Oliver Hunt <oliver@apple.com>
1595 Reviewed by Gavin Barraclough.
1597 Make CodeBlock GC write barrier safe
1598 https://bugs.webkit.org/show_bug.cgi?id=55910
1600 In order to make CodeBlock WriteBarrier safe it was necessary
1601 to make it have a single GC owner, and for that reason I have
1602 made ExecutableBase a GC allocated object. This required
1603 updating their creation routines as well as all sites that hold
1604 a reference to them. GC objects that held Executable's have been
1605 converted to WriteBarriers, and all other sites now use Global<>.
1607 As an added benefit this gets rid of JSGlobalData's list of
1610 Perf testing shows a 0.5% progression on v8, vs. a 0.3% regression
1611 on SunSpider. Given none of the tests that show regressions
1612 demonstrate a regression on their own, and sampling shows up nothing.
1613 I suspect we're just getting one or two additional gc passes at
1616 * bytecode/CodeBlock.cpp:
1617 (JSC::CodeBlock::dump):
1618 (JSC::CodeBlock::CodeBlock):
1619 (JSC::EvalCodeCache::markAggregate):
1620 (JSC::CodeBlock::markAggregate):
1621 * bytecode/CodeBlock.h:
1622 (JSC::CodeBlock::ownerExecutable):
1623 (JSC::CodeBlock::addConstant):
1624 (JSC::CodeBlock::constantRegister):
1625 (JSC::CodeBlock::getConstant):
1626 (JSC::CodeBlock::addFunctionDecl):
1627 (JSC::CodeBlock::addFunctionExpr):
1628 (JSC::GlobalCodeBlock::GlobalCodeBlock):
1629 (JSC::ExecState::r):
1630 * bytecode/EvalCodeCache.h:
1631 (JSC::EvalCodeCache::get):
1632 * bytecode/SamplingTool.h:
1633 (JSC::ScriptSampleRecord::ScriptSampleRecord):
1634 * bytecompiler/BytecodeGenerator.cpp:
1635 (JSC::BytecodeGenerator::addConstantValue):
1636 (JSC::BytecodeGenerator::emitEqualityOp):
1637 * bytecompiler/BytecodeGenerator.h:
1638 (JSC::BytecodeGenerator::makeFunction):
1639 * debugger/Debugger.cpp:
1640 (JSC::evaluateInGlobalCallFrame):
1641 * debugger/DebuggerCallFrame.cpp:
1642 (JSC::DebuggerCallFrame::evaluate):
1643 * interpreter/Interpreter.cpp:
1644 (JSC::Interpreter::callEval):
1645 * jit/JITInlineMethods.h:
1646 (JSC::JIT::emitLoadDouble):
1647 (JSC::JIT::emitLoadInt32ToDouble):
1649 (JSC::JITThunks::JITThunks):
1650 (JSC::JITThunks::hostFunctionStub):
1651 (JSC::JITThunks::clearHostFunctionStubs):
1653 * runtime/Completion.cpp:
1656 * runtime/Executable.cpp:
1657 (JSC::EvalExecutable::EvalExecutable):
1658 (JSC::ProgramExecutable::ProgramExecutable):
1659 (JSC::FunctionExecutable::FunctionExecutable):
1660 (JSC::FunctionExecutable::~FunctionExecutable):
1661 (JSC::EvalExecutable::markChildren):
1662 (JSC::ProgramExecutable::markChildren):
1663 (JSC::FunctionExecutable::markChildren):
1664 (JSC::FunctionExecutable::fromGlobalCode):
1665 * runtime/Executable.h:
1666 (JSC::ExecutableBase::ExecutableBase):
1667 (JSC::ExecutableBase::createStructure):
1668 (JSC::NativeExecutable::create):
1669 (JSC::NativeExecutable::NativeExecutable):
1670 (JSC::VPtrHackExecutable::VPtrHackExecutable):
1671 (JSC::ScriptExecutable::ScriptExecutable):
1672 (JSC::EvalExecutable::create):
1673 (JSC::EvalExecutable::createStructure):
1674 (JSC::ProgramExecutable::create):
1675 (JSC::ProgramExecutable::createStructure):
1676 (JSC::FunctionExecutable::create):
1677 (JSC::FunctionExecutable::createStructure):
1678 * runtime/FunctionConstructor.cpp:
1679 (JSC::constructFunction):
1681 (JSC::Heap::destroy):
1682 (JSC::Heap::markRoots):
1684 * runtime/JSActivation.cpp:
1685 (JSC::JSActivation::JSActivation):
1686 (JSC::JSActivation::markChildren):
1687 * runtime/JSActivation.h:
1688 (JSC::JSActivation::JSActivationData::JSActivationData):
1690 * runtime/JSFunction.cpp:
1691 (JSC::JSFunction::JSFunction):
1692 (JSC::JSFunction::~JSFunction):
1693 (JSC::JSFunction::markChildren):
1694 * runtime/JSFunction.h:
1695 * runtime/JSGlobalData.cpp:
1696 (JSC::JSGlobalData::storeVPtrs):
1697 (JSC::JSGlobalData::JSGlobalData):
1698 (JSC::JSGlobalData::getHostFunction):
1699 * runtime/JSGlobalData.h:
1700 * runtime/JSGlobalObjectFunctions.cpp:
1701 (JSC::globalFuncEval):
1702 * runtime/JSObject.cpp:
1703 * runtime/JSStaticScopeObject.cpp:
1704 (JSC::JSStaticScopeObject::markChildren):
1705 * runtime/JSStaticScopeObject.h:
1706 (JSC::JSStaticScopeObject::JSStaticScopeObjectData::JSStaticScopeObjectData):
1707 (JSC::JSStaticScopeObject::JSStaticScopeObject):
1708 * runtime/JSZombie.cpp:
1709 (JSC::JSZombie::leakedZombieStructure):
1710 * runtime/JSZombie.h:
1711 (JSC::JSZombie::createStructure):
1712 * runtime/MarkedSpace.h:
1714 2011-03-07 Andy Estes <aestes@apple.com>
1716 Reviewed by Dan Bernstein.
1718 REGRESSION (r79060): Timestamp is missing from tweets in twitter.
1719 https://bugs.webkit.org/show_bug.cgi?id=55228
1721 A change to the date parser to handle the case where the year is
1722 specified before the time zone inadvertently started accepting strings
1723 such as '+0000' as valid years. Those strings actually represent time
1724 zones in an offset of hours and minutes from UTC, not years.
1727 (WTF::parseDateFromNullTerminatedCharacters): If the current character
1728 in dateString is '+' or '-', do not try to parse the next token as a
1731 2011-03-06 Yuta Kitamura <yutak@chromium.org>
1733 Reviewed by Kent Tamura.
1735 Add SHA-1 for new WebSocket protocol
1736 https://bugs.webkit.org/show_bug.cgi?id=55039
1738 The code is based on Chromium's portable SHA-1 implementation
1739 (src/base/sha1_portable.cc). Modifications were made in order
1740 to make the code comply with WebKit coding style.
1743 * JavaScriptCore.exp:
1744 * JavaScriptCore.gypi:
1745 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1746 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1747 * JavaScriptCore.xcodeproj/project.pbxproj:
1748 * wtf/CMakeLists.txt:
1751 * wtf/SHA1.cpp: Added.
1752 (WTF::testSHA1): This function will be run the first time SHA1
1753 constructor is called. This function computes a few hash values
1754 and checks the results in debug builds. However, constructor is
1755 probably not a good place to run these tests, so we need to find
1756 a good place for it (bug 55853).
1762 (WTF::SHA1::addBytes):
1763 (WTF::SHA1::computeHash):
1764 (WTF::SHA1::finalize):
1765 (WTF::SHA1::processBlock):
1767 * wtf/SHA1.h: Added.
1768 (WTF::SHA1::addBytes):
1771 2011-03-05 Adam Barth <abarth@webkit.org>
1773 Reviewed by Dimitri Glazkov.
1775 Add Derived Sources to WebCore GYP build
1776 https://bugs.webkit.org/show_bug.cgi?id=55813
1778 Rename the action to be friendlier.
1780 * gyp/JavaScriptCore.gyp:
1782 2011-03-04 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
1784 Reviewed by Laszlo Gombos.
1786 [Qt] Need symbian version of cryptographicallyRandomValuesFromOS
1787 https://bugs.webkit.org/show_bug.cgi?id=55782
1789 Implement Symbian version of cryptographicallyRandomValuesFromOS
1791 * wtf/OSRandomSource.cpp:
1792 (WTF::cryptographicallyRandomValuesFromOS):
1794 2011-03-04 Gavin Barraclough <barraclough@apple.com>
1796 Reviewed by Cameron Zwarich.
1798 Bug 55815 - Should throw an exception from JSObject::defineOwnProperty if !isExtensible().
1800 * runtime/JSObject.cpp:
1801 (JSC::JSObject::defineOwnProperty):
1804 2011-03-04 Gavin Barraclough <barraclough@apple.com>
1806 Rubber stamped by olliej.
1808 Bug 54945 - The web page hangs towards the end of page load in Interpreter enabled javascript code in the latest webkit trunk.
1810 * interpreter/Interpreter.cpp:
1811 (JSC::Interpreter::privateExecute):
1812 (1) don't infinite loop.
1815 2011-03-04 Gavin Barraclough <barraclough@apple.com>
1821 2011-03-04 Adam Barth <abarth@webkit.org>
1823 Reviewed by Dimitri Glazkov.
1825 Add Copy Files step to JavaScriptCore GYP build for apitest and minidom
1826 https://bugs.webkit.org/show_bug.cgi?id=55798
1828 * JavaScriptCore.gypi:
1829 * gyp/JavaScriptCore.gyp:
1831 2011-03-04 Adam Barth <abarth@webkit.org>
1833 Reviewed by Dimitri Glazkov.
1835 Remove unneeded round-trips through ../Source in the Chromium GYP build
1836 https://bugs.webkit.org/show_bug.cgi?id=55795
1838 * JavaScriptCore.gyp/JavaScriptCore.gyp:
1840 2011-03-04 Adam Barth <abarth@webkit.org>
1842 Reviewed by Dimitri Glazkov.
1844 Use target_defaults to reduce boilerplate in GYP build system
1845 https://bugs.webkit.org/show_bug.cgi?id=55790
1847 Instead of setting up the configuration in each target, just defer to
1848 target_defaults. Also, removed a define that was redundant with the
1851 * gyp/JavaScriptCore.gyp:
1853 2011-03-03 Gavin Barraclough <barraclough@apple.com>
1855 Reviewed by Sam Weinig.
1857 Bug 55736 - Implement seal/freeze/preventExtensions for normal object types.
1858 Provide basic functionallity from section 15.2.4 of ECMA-262.
1859 This support will need expanding to cover arrays, too.
1861 Shows a 0.5% progression on SunSpidey, this seems to be due to changing
1862 ObjectConstructor to use a static table.
1864 * DerivedSources.make:
1865 * JavaScriptCore.exp:
1866 * interpreter/CallFrame.h:
1867 (JSC::ExecState::objectConstructorTable):
1868 Add a static table for ObjectConstructor.
1869 * runtime/CommonIdentifiers.h:
1870 * runtime/JSGlobalData.cpp:
1871 (JSC::JSGlobalData::JSGlobalData):
1872 (JSC::JSGlobalData::~JSGlobalData):
1873 Add a static table for ObjectConstructor.
1874 * runtime/JSGlobalData.h:
1875 * runtime/JSGlobalObject.cpp:
1876 (JSC::JSGlobalObject::reset):
1877 Add a static table for ObjectConstructor.
1878 * runtime/JSObject.cpp:
1879 (JSC::JSObject::seal):
1880 (JSC::JSObject::freeze):
1881 (JSC::JSObject::preventExtensions):
1882 Transition the object's structure.
1883 (JSC::JSObject::defineOwnProperty):
1885 * runtime/JSObject.h:
1886 (JSC::JSObject::isSealed):
1887 (JSC::JSObject::isFrozen):
1888 (JSC::JSObject::isExtensible):
1889 These wrap method on structure.
1890 (JSC::JSObject::putDirectInternal):
1892 * runtime/ObjectConstructor.cpp:
1893 (JSC::ObjectConstructor::ObjectConstructor):
1894 (JSC::ObjectConstructor::getOwnPropertySlot):
1895 (JSC::ObjectConstructor::getOwnPropertyDescriptor):
1896 Change ObjectConstructor to use a static table.
1897 (JSC::objectConstructorSeal):
1898 (JSC::objectConstructorFreeze):
1899 (JSC::objectConstructorPreventExtensions):
1900 (JSC::objectConstructorIsSealed):
1901 (JSC::objectConstructorIsFrozen):
1902 (JSC::objectConstructorIsExtensible):
1903 Add new methods on Object.
1904 * runtime/ObjectConstructor.h:
1905 (JSC::ObjectConstructor::createStructure):
1906 * runtime/Structure.cpp:
1907 (JSC::Structure::Structure):
1908 init/propagate m_preventExtensions
1909 (JSC::Structure::sealTransition):
1910 (JSC::Structure::freezeTransition):
1911 (JSC::Structure::preventExtensionsTransition):
1912 transition the structure, materializing the property map, setting m_preventExtensions & changing attributes.
1913 (JSC::Structure::isSealed):
1914 (JSC::Structure::isFrozen):
1915 check attributes to detect if object is sealed/frozen.
1916 * runtime/Structure.h:
1917 (JSC::Structure::isExtensible):
1918 checks the m_preventExtensions flag.
1920 2011-03-04 Steve Falkenburg <sfalken@apple.com>
1922 Reviewed by Jon Honeycutt.
1924 Adopt VersionStamper tool for Windows WebKit DLLs
1925 https://bugs.webkit.org/show_bug.cgi?id=55784
1926 <rdar://problem/9021273>
1928 We now use a tool to stamp the version number onto the Apple WebKit DLLs
1929 during the post-build step.
1931 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc: Removed.
1932 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1933 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd:
1934 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd:
1936 2011-03-04 Adam Barth <abarth@webkit.org>
1938 Reviewed by Dimitri Glazkov.
1940 JavaScriptCore GYP build should use a header map
1941 https://bugs.webkit.org/show_bug.cgi?id=55712
1943 This patch moves the os-win32 files into their own variable so that we
1944 can use a header map in the Apple Mac Xcode build. The problem is that
1945 the header map searches the whole project rather than just the files
1946 included in a given target. Another solution to this problem is to
1947 make GYP smarter about filtering out what files are added to the
1950 * JavaScriptCore.gypi:
1951 * gyp/JavaScriptCore.gyp:
1953 2011-03-03 Ryosuke Niwa <rniwa@webkit.org>
1955 Reviewed by Darin Adler.
1957 Remove LOOSE_PASS_OWN_ARRAY_PTR from PassOwnArrayPtr.h
1958 https://bugs.webkit.org/show_bug.cgi?id=55554
1960 * runtime/JSGlobalObject.cpp:
1961 (JSC::JSGlobalObject::copyGlobalsTo): Pass nullptr instead of 0.
1962 (JSC::JSGlobalObject::resizeRegisters): Ditto; also use OwnArrayPtr instead of a raw pointer.
1963 * runtime/JSGlobalObject.h:
1964 (JSC::JSGlobalObject::addStaticGlobals): Ditto.
1965 * wtf/PassOwnArrayPtr.h: Removed #define LOOSE_PASS_OWN_ARRAY_PTR
1966 (WTF::PassOwnArrayPtr::PassOwnArrayPtr): Added a constructor that takes nullptr_t.
1968 2011-03-03 Adam Barth <abarth@webkit.org>
1970 Reviewed by Dimitri Glazkov.
1972 Add jsc to JavaScriptCore GYP build
1973 https://bugs.webkit.org/show_bug.cgi?id=55711
1975 * JavaScriptCore.gypi:
1976 - Move jsc.cpp into jsc_files because it's really part of the jsc
1978 * JavaScriptCore.xcodeproj/project.pbxproj:
1979 - Remove extraneous files from the normal jsc build. I probably
1980 added these by mistake at some point.
1981 * gyp/JavaScriptCore.gyp:
1982 - Add the jsc target to the GYP file.
1984 2011-03-03 Adam Barth <abarth@webkit.org>
1986 Reviewed by Dimitri Glazkov.
1988 Add testapi to JavaScriptCore GYP build
1989 https://bugs.webkit.org/show_bug.cgi?id=55707
1991 The new testapi target is slightly incomplete. There's a resource
1992 copying step that we don't quite have yet.
1994 This patch also cleans up some of the configuration issues in
1995 JavaScriptCore.xcodeproj. It seems kind of wordy to repeat these for
1996 each target. I suspect there's a more compact way of defining the
1997 configurations, but this removes the "Default" configuration, which is
2000 * JavaScriptCore.gypi:
2001 * gyp/JavaScriptCore.gyp:
2003 2011-03-03 Adam Barth <abarth@webkit.org>
2005 Reviewed by Eric Seidel.
2007 Teach JavaScriptCore GYP build about private headers
2008 https://bugs.webkit.org/show_bug.cgi?id=55532
2010 This patch distinguishes between public and private framework headers
2011 so that public headers are copied into the Headers directory and
2012 private headers are copied into the PrivateHeaders directory.
2014 * gyp/JavaScriptCore.gyp:
2016 2011-03-03 Geoffrey Garen <ggaren@apple.com>
2018 Rolled out 80277 and 80280 because they caused event handler layout test
2021 * JavaScriptCore.exp:
2022 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2023 * JavaScriptCore.xcodeproj/project.pbxproj:
2024 * bytecompiler/BytecodeGenerator.cpp:
2025 * jit/JITOpcodes.cpp:
2026 * jit/JITOpcodes32_64.cpp:
2027 * runtime/Arguments.h:
2028 * runtime/JSActivation.cpp:
2029 * runtime/JSActivation.h:
2031 * runtime/JSGlobalObject.cpp:
2032 * runtime/JSGlobalObject.h:
2033 * runtime/JSObject.cpp:
2034 * runtime/JSStaticScopeObject.cpp:
2035 * runtime/JSStaticScopeObject.h:
2036 * runtime/JSVariableObject.h:
2037 * runtime/MarkedSpace.cpp:
2038 * runtime/MarkedSpace.h:
2040 2011-03-03 Kevin Ollivier <kevino@theolliviers.com>
2042 [wx] Build fix. Alter order of headers included to make sure windows.h
2043 is configured by wx, and skip Posix implementation file we don't use on Win.
2046 * wtf/wx/StringWx.cpp:
2048 2011-03-03 Oliver Hunt <oliver@apple.com>
2050 Reviewed by Geoffrey Garen.
2052 JSVariableObject needs to use WriteBarrier for symboltable property storage
2053 https://bugs.webkit.org/show_bug.cgi?id=55698
2055 Replace the direct usage of Register in JSVariableObject (and descendents)
2056 with WriteBarrier. This requires updating the Arguments object to use
2057 WriteBarrier as well.
2059 * interpreter/Interpreter.cpp:
2060 (JSC::Interpreter::unwindCallFrame):
2061 (JSC::Interpreter::privateExecute):
2062 (JSC::Interpreter::retrieveArguments):
2064 (JSC::DEFINE_STUB_FUNCTION):
2065 * runtime/ArgList.h:
2066 (JSC::MarkedArgumentBuffer::initialize):
2067 * runtime/Arguments.cpp:
2068 (JSC::Arguments::markChildren):
2069 (JSC::Arguments::copyToRegisters):
2070 (JSC::Arguments::fillArgList):
2071 (JSC::Arguments::getOwnPropertySlot):
2072 (JSC::Arguments::getOwnPropertyDescriptor):
2073 (JSC::Arguments::put):
2074 * runtime/Arguments.h:
2075 (JSC::Arguments::setActivation):
2076 (JSC::Arguments::Arguments):
2077 (JSC::Arguments::copyRegisters):
2078 (JSC::JSActivation::copyRegisters):
2079 * runtime/JSActivation.cpp:
2080 (JSC::JSActivation::markChildren):
2081 (JSC::JSActivation::symbolTableGet):
2082 (JSC::JSActivation::symbolTablePut):
2083 (JSC::JSActivation::symbolTablePutWithAttributes):
2084 (JSC::JSActivation::put):
2085 (JSC::JSActivation::putWithAttributes):
2086 (JSC::JSActivation::argumentsGetter):
2087 * runtime/JSActivation.h:
2088 * runtime/JSGlobalObject.cpp:
2089 (JSC::JSGlobalObject::put):
2090 (JSC::JSGlobalObject::putWithAttributes):
2091 (JSC::JSGlobalObject::markChildren):
2092 (JSC::JSGlobalObject::copyGlobalsFrom):
2093 (JSC::JSGlobalObject::copyGlobalsTo):
2094 (JSC::JSGlobalObject::resizeRegisters):
2095 * runtime/JSGlobalObject.h:
2096 (JSC::JSGlobalObject::setRegisters):
2097 (JSC::JSGlobalObject::addStaticGlobals):
2098 * runtime/JSStaticScopeObject.cpp:
2099 (JSC::JSStaticScopeObject::put):
2100 (JSC::JSStaticScopeObject::putWithAttributes):
2101 * runtime/JSVariableObject.cpp:
2102 (JSC::JSVariableObject::symbolTableGet):
2103 * runtime/JSVariableObject.h:
2104 (JSC::JSVariableObject::registerAt):
2105 (JSC::JSVariableObject::JSVariableObjectData::JSVariableObjectData):
2106 (JSC::JSVariableObject::symbolTableGet):
2107 (JSC::JSVariableObject::symbolTablePut):
2108 (JSC::JSVariableObject::symbolTablePutWithAttributes):
2109 (JSC::JSVariableObject::copyRegisterArray):
2110 (JSC::JSVariableObject::setRegisters):
2112 2011-03-03 Geoffrey Garen <ggaren@apple.com>
2114 Try to fix Windows build.
2116 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Removed obsolete symbol.
2118 * runtime/JSStaticScopeObject.cpp:
2119 (JSC::JSStaticScopeObject::getOwnPropertySlot): Don't mark this function
2120 inline -- it's virtual.
2122 2011-03-02 Geoffrey Garen <ggaren@apple.com>
2124 Reviewed by Darin Adler.
2126 Moved all variable object storage inline -- upping the object size limit to 1K
2127 https://bugs.webkit.org/show_bug.cgi?id=55653
2129 * JavaScriptCore.exp:
2130 * bytecompiler/BytecodeGenerator.cpp:
2131 * jit/JITOpcodes.cpp:
2132 * runtime/Arguments.h:
2133 * runtime/JSActivation.h: Removed out-of-line storage. Changed d-> to m_.
2136 (JSC::JSCell::MarkedSpace::sizeClassFor): Added an imprecise size class
2137 to accomodate objects up to 1K.
2139 * runtime/JSGlobalObject.cpp:
2140 * runtime/JSGlobalObject.h: Removed out-of-line storage. Changed d-> to m_.
2142 * runtime/JSObject.cpp: Don't ASSERT that JSFinalObject fills the maximum
2143 object size, since it doesn't anymore.
2145 * runtime/JSStaticScopeObject.cpp:
2146 * runtime/JSStaticScopeObject.h:
2147 * runtime/JSVariableObject.h: Removed out-of-line storage. Changed d-> to m_.
2149 * runtime/MarkedSpace.cpp:
2150 (JSC::MarkedSpace::MarkedSpace):
2151 (JSC::MarkedSpace::reset):
2152 * runtime/MarkedSpace.h: Added an imprecise size class to accomodate objects up to 1K.
2154 2011-03-03 Timothy Hatcher <timothy@apple.com>
2156 Make APIShims usable from WebCore.
2158 Reviewed by Oliver Hunt.
2160 * ForwardingHeaders/JavaScriptCore/APIShims.h: Added.
2162 * JavaScriptCore.exp:
2163 * JavaScriptCore.gypi:
2164 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
2165 * JavaScriptCore.xcodeproj/project.pbxproj:
2167 2011-03-03 Peter Varga <pvarga@webkit.org>
2169 Reviewed by Oliver Hunt.
2171 Begin Characters Optimization Causes YARR Interpreter Errors
2172 https://bugs.webkit.org/show_bug.cgi?id=55479
2174 The addBeginTerm function is removed because it doesn't correctly handle those
2175 cases when an "invalid" term has been
2176 collected (e.g. CharacterClass). Move the removed function to the
2177 setupAlternativeBeginTerms method's switch-case
2178 where the non-allowed cases are correctly handled.
2180 Reenable the Beginning Character Optimization in the YARR Interpreter again.
2182 * yarr/YarrPattern.cpp:
2183 (JSC::Yarr::YarrPatternConstructor::setupAlternativeBeginTerms):
2184 (JSC::Yarr::YarrPattern::compile):
2186 2011-03-02 Jessie Berlin <jberlin@apple.com>
2188 Reviewed by Adam Roben.
2190 WebKit2: Use CFNetwork Sessions API.
2191 https://bugs.webkit.org/show_bug.cgi?id=55435
2193 Add the ability to create a Private Browsing storage session.
2196 Add a new #define for using CF Storage Sessions.
2198 2011-03-02 Oliver Hunt <oliver@apple.com>
2200 Reviewed by Gavin Barraclough.
2202 Remove "register slot" concept from PropertySlot
2203 https://bugs.webkit.org/show_bug.cgi?id=55621
2205 PropertySlot had already stopped storing Register "slots"
2206 so this patch is simply removing that api entirely.
2207 This exposed a problem in the ProgramNode constructor for
2208 BytecodeGenerator where it reads from the registerfile
2209 before it has initialised it.
2211 This bug wasn't a problem before as we were merely testing
2212 for property existence rather than the actual value, and
2213 used to work because setRegisterSlot didn't check that the
2214 provided slot contained an initialised value.
2216 To get around this issue we now use symbolTableHasProperty
2217 to do the symbol table check without trying to read the
2220 * JavaScriptCore.xcodeproj/project.pbxproj:
2221 * bytecompiler/BytecodeGenerator.cpp:
2222 (JSC::BytecodeGenerator::BytecodeGenerator):
2223 * runtime/Arguments.cpp:
2224 (JSC::Arguments::getOwnPropertySlot):
2225 * runtime/JSActivation.cpp:
2226 (JSC::JSActivation::symbolTableGet):
2227 * runtime/JSGlobalObject.h:
2228 (JSC::JSGlobalObject::symbolTableHasProperty):
2229 * runtime/JSVariableObject.h:
2230 (JSC::JSVariableObject::symbolTableGet):
2231 * runtime/PropertySlot.h:
2233 2011-03-02 Daniel Cheng <dcheng@chromium.org>
2235 Reviewed by David Levin.
2237 Add feature define for data transfer items
2238 https://bugs.webkit.org/show_bug.cgi?id=55510
2240 * Configurations/FeatureDefines.xcconfig:
2243 2011-03-02 Adam Roben <aroben@apple.com>
2245 Delete old .res files whenever any .vsprops file changes
2247 Prospective fix for <http://webkit.org/b/55599> r80079 caused incremental Windows builds to
2250 Reviewed by Tony Chang.
2252 * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
2253 (main): Restructured code to loop over a set of file extensions, deleting any old files that
2254 have that extension. Now deletes .res files, too. (We previously deleted any file matching
2255 *.manifest*, but that turned out to just be the union of *.manifest and *.res.)
2257 2011-03-02 Adam Barth <abarth@webkit.org>
2259 Reviewed by Dimitri Glazkov.
2261 Teach JavaScriptCore GYP build how to build minidom
2262 https://bugs.webkit.org/show_bug.cgi?id=55536
2264 * JavaScriptCore.gypi:
2265 * gyp/JavaScriptCore.gyp:
2267 2011-03-01 Adam Barth <abarth@webkit.org>
2269 Reviewed by Eric Seidel.
2271 JavaScriptCore GYP build should copy some headers into the target framework
2272 https://bugs.webkit.org/show_bug.cgi?id=55524
2274 After this patch, all the framework headers are exported as public
2275 headers. We need to teach GYP how to handle private headers.
2277 I struggled to determine how to store the information about whether a
2278 header was public, private, or project (i.e., not exported).
2279 Generally, the GYPI should just list the files, but it seemed siliy to
2280 have an almost duplicated list of files in the GYP file itself. If
2281 this design doesn't scale, we might have to revisit it in the future.
2283 * JavaScriptCore.gyp/JavaScriptCore.gyp:
2284 * JavaScriptCore.gypi:
2285 * gyp/JavaScriptCore.gyp:
2287 2011-03-01 Sheriff Bot <webkit.review.bot@gmail.com>
2289 Unreviewed, rolling out r80079.
2290 http://trac.webkit.org/changeset/80079
2291 https://bugs.webkit.org/show_bug.cgi?id=55547
2293 "Broke the Win debug build?" (Requested by dcheng on #webkit).
2297 2011-03-01 Daniel Cheng <dcheng@chromium.org>
2299 Reviewed by David Levin.
2301 Add feature define for data transfer items
2302 https://bugs.webkit.org/show_bug.cgi?id=55510
2306 2011-03-01 Oliver Hunt <oliver@apple.com>
2308 Reviewed by Joseph Pecoraro.
2310 Misaligned memory access in CloneDeserializer on all ARM arch.
2311 https://bugs.webkit.org/show_bug.cgi?id=48742
2313 Add a CPU class for architectures that need aligned addresses
2318 2011-03-01 Adam Barth <abarth@webkit.org>
2320 Reviewed by Dimitri Glazkov.
2322 Add pre- and post-build actions for JavaScriptCore GYP build
2323 https://bugs.webkit.org/show_bug.cgi?id=55507
2325 After this patch, we have all the steps for building the main
2326 JavaScriptCore framework except the "copy headers" step, which I'll do
2329 * gyp/JavaScriptCore.gyp:
2331 2011-03-01 Geoffrey Garen <ggaren@apple.com>
2333 Reviewed by Sam Weinig.
2335 Rolled back in r79627 now that the underlying cause for it crashing is fixed.
2336 https://bugs.webkit.org/show_bug.cgi?id=55159
2338 * JavaScriptCore.exp:
2339 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2340 * JavaScriptCore.xcodeproj/project.pbxproj:
2342 (JSC::Heap::allocateSlowCase):
2345 (JSC::JSCell::MarkedSpace::sizeClassFor):
2346 (JSC::JSCell::Heap::allocate):
2347 (JSC::JSCell::JSCell::operator new):
2348 * runtime/MarkedBlock.h:
2349 * runtime/MarkedSpace.cpp:
2350 (JSC::MarkedSpace::MarkedSpace):
2351 (JSC::MarkedSpace::allocateBlock):
2352 (JSC::MarkedSpace::reset):
2353 * runtime/MarkedSpace.h:
2354 (JSC::MarkedSpace::SizeClass::SizeClass):
2356 2011-03-01 Mark Rowe <mrowe@apple.com>
2358 Reviewed by Sam Weinig.
2360 Replace two script phases that do nothing but copy files with copy files build phases.
2362 This speeds up the build by a few seconds on high-end Mac Pros.
2364 * JavaScriptCore.xcodeproj/project.pbxproj:
2366 2011-03-01 David Kilzer <ddkilzer@apple.com>
2370 Rubber-stamped by Mark Rowe.
2372 * JavaScriptCore.xcodeproj/project.pbxproj:
2373 (Copy Into Framework): Remove "set -x" and its comment.
2375 2011-03-01 Michael Saboff <msaboff@apple.com>
2377 Reviewed by Darin Adler.
2379 TinyMCE not working in nightlies
2380 https://bugs.webkit.org/show_bug.cgi?id=54978
2382 Disabling setupBeginChars() to temporarily work arround the test
2383 failure. Filed https://bugs.webkit.org/show_bug.cgi?id=55479
2384 to track fixing the issue.
2386 * yarr/YarrPattern.cpp:
2387 (JSC::Yarr::YarrPattern::compile):
2389 2011-02-23 Joseph Pecoraro <joepeck@webkit.org>
2391 Reviewed by Kenneth Rohde Christiansen.
2393 Viewport parsing no longer accepts "1.0;" value as valid.
2394 https://bugs.webkit.org/show_bug.cgi?id=53705
2396 Include a didReadNumber parameter to String -> float / double
2397 conversion functions. This way, if the "ok" boolean out
2398 parameter is false, you can check to see if there in fact
2399 was a valid number parsed with garbage at the end. Examples
2400 of that would be parsing "123x456" would have ok = false,
2401 but didReadNumber = true.
2403 * JavaScriptCore.exp:
2404 * wtf/text/StringImpl.cpp:
2405 (WTF::StringImpl::toDouble):
2406 (WTF::StringImpl::toFloat):
2407 * wtf/text/StringImpl.h:
2408 * wtf/text/WTFString.cpp:
2409 (WTF::String::toDouble):
2410 (WTF::String::toFloat):
2411 (WTF::charactersToDouble):
2412 (WTF::charactersToFloat):
2413 * wtf/text/WTFString.h:
2415 2011-02-28 Geoffrey Garen <ggaren@apple.com>
2417 Reviewed by Gavin Barraclough.
2419 Past-the-end writes in VM exceptions (caused crashes in r79627)
2420 https://bugs.webkit.org/show_bug.cgi?id=55448
2422 Some exceptions had the wrong structures, so they misoverestimated their
2423 inline storage sizes.
2425 * runtime/JSGlobalData.cpp:
2426 (JSC::JSGlobalData::JSGlobalData): Use the right structure.
2428 * runtime/JSObject.h:
2429 (JSC::JSNonFinalObject::JSNonFinalObject):
2430 (JSC::JSFinalObject::JSFinalObject): ASSERT that our structure capacity
2431 is correct to verify this doesn't happen again.
2433 2011-03-01 Andras Becsi <abecsi@webkit.org>
2435 Reviewed by Csaba Osztrogonác.
2437 [Qt] Clean up the project files and move common options to WebKit.pri.
2439 * JavaScriptCore.pri: Move options also needed in WebCore into WebKit.pri.
2440 * JavaScriptCore.pro: Deduplicate options.
2443 2011-03-01 Adam Barth <abarth@webkit.org>
2445 Reviewed by Eric Seidel.
2447 Teach JavaScriptCore GYP build about DEPTH
2448 https://bugs.webkit.org/show_bug.cgi?id=55425
2450 In addition to teaching the JavaScriptCore GYP build about DEPTH, this
2451 change overrides the GCC warning configuration to disable a warning
2452 that's causing probems in Assertions.cpp. With that warning disabled,
2453 JavaScriptCore builds again.
2455 * gyp/JavaScriptCore.gyp:
2457 2011-02-28 Gavin Barraclough <barraclough@apple.com>
2461 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2463 2011-02-28 Sheriff Bot <webkit.review.bot@gmail.com>
2465 Unreviewed, rolling out r79948.
2466 http://trac.webkit.org/changeset/79948
2467 https://bugs.webkit.org/show_bug.cgi?id=55439
2469 "caused crashes on the SL release bot" (Requested by ggaren on
2472 * runtime/JSGlobalData.h:
2473 * runtime/WriteBarrier.h:
2475 2011-02-28 Gavin Barraclough <barraclough@apple.com>
2479 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2481 2011-02-28 Gavin Barraclough <barraclough@apple.com>
2483 Reviewed by Sam Weinig & Darin Adler.
2485 Bug 55423 - Clean up property tables in Structure
2487 Encapsulate, reduce duplication of table search code,
2488 and reduce the size of the tables (remove the index,
2489 just maintain the tables in the correct order).
2491 Shows a 0.5% - 1% progression on sunspider.
2493 * JavaScriptCore.exp:
2494 * runtime/PropertyMapHashTable.h:
2496 (JSC::nextPowerOf2):
2497 bit ops used to calculate table size.
2498 (JSC::PropertyMapEntry::PropertyMapEntry):
2499 (JSC::PropertyTable::ordered_iterator::operator++):
2500 (JSC::PropertyTable::ordered_iterator::operator==):
2501 (JSC::PropertyTable::ordered_iterator::operator!=):
2502 (JSC::PropertyTable::ordered_iterator::operator*):
2503 (JSC::PropertyTable::ordered_iterator::operator->):
2504 (JSC::PropertyTable::ordered_iterator::ordered_iterator):
2505 implementation of the iterator types
2506 (JSC::PropertyTable::PropertyTable):
2507 (JSC::PropertyTable::~PropertyTable):
2508 constructors take an initial capacity for the table,
2509 a table to copy, or both.
2510 (JSC::PropertyTable::begin):
2511 (JSC::PropertyTable::end):
2512 create in-order iterators.
2513 (JSC::PropertyTable::find):
2514 search the hash table
2515 (JSC::PropertyTable::add):
2516 add a value to the hash table
2517 (JSC::PropertyTable::remove):
2518 remove a value from the hash table
2519 (JSC::PropertyTable::size):
2520 (JSC::PropertyTable::isEmpty):
2522 (JSC::PropertyTable::propertyStorageSize):
2523 (JSC::PropertyTable::clearDeletedOffsets):
2524 (JSC::PropertyTable::hasDeletedOffset):
2525 (JSC::PropertyTable::getDeletedOffset):
2526 (JSC::PropertyTable::addDeletedOffset):
2527 cache deleted (available) offsets in the property storage array.
2528 (JSC::PropertyTable::copy):
2529 take a copy of the PropertyTable, potentially expanding the capacity.
2530 (JSC::PropertyTable::sizeInMemory):
2531 used for DEBUG build statistics
2532 (JSC::PropertyTable::reinsert):
2533 (JSC::PropertyTable::rehash):
2534 (JSC::PropertyTable::tableCapacity):
2535 (JSC::PropertyTable::deletedEntryIndex):
2536 (JSC::PropertyTable::skipDeletedEntries):
2537 (JSC::PropertyTable::table):
2538 (JSC::PropertyTable::usedCount):
2539 (JSC::PropertyTable::dataSize):
2540 (JSC::PropertyTable::sizeForCapacity):
2541 (JSC::PropertyTable::canInsert):
2542 these methods provide internal implementation.
2543 * runtime/Structure.cpp:
2544 (JSC::Structure::dumpStatistics):
2545 (JSC::Structure::~Structure):
2546 (JSC::Structure::materializePropertyMap):
2547 (JSC::Structure::despecifyDictionaryFunction):
2548 (JSC::Structure::addPropertyTransition):
2549 (JSC::Structure::flattenDictionaryStructure):
2550 (JSC::Structure::copyPropertyTable):
2551 (JSC::Structure::get):
2552 (JSC::Structure::despecifyFunction):
2553 (JSC::Structure::despecifyAllFunctions):
2554 (JSC::Structure::put):
2555 (JSC::Structure::remove):
2556 (JSC::Structure::createPropertyMap):
2557 (JSC::Structure::getPropertyNames):
2558 (JSC::PropertyTable::checkConsistency):
2559 (JSC::Structure::checkConsistency):
2560 factored out code to PropertyMapHashTable.h
2561 * runtime/Structure.h:
2562 (JSC::Structure::propertyStorageSize):
2563 (JSC::Structure::isEmpty):
2564 (JSC::Structure::get):
2565 factored out code to PropertyMapHashTable.h
2567 2011-02-28 Xan Lopez <xlopez@igalia.com>
2569 Another fix build :(
2573 * runtime/MachineStackMarker.cpp:
2574 (JSC::freePlatformThreadRegisters):
2576 2011-02-28 Xan Lopez <xlopez@igalia.com>
2578 Unreviewed build fix for Snow Leopard.
2580 * runtime/MachineStackMarker.cpp:
2581 (JSC::freePlatformThreadRegisters):
2583 2011-02-28 Alejandro G. Castro <alex@igalia.com>
2585 Unreviewed, fix SnowLeopard compilation after r79952.
2587 * runtime/MachineStackMarker.cpp:
2588 (JSC::freePlatformThreadRegisters):
2590 2011-02-28 Mark Rowe <mrowe@apple.com>
2592 Reviewed by Darin Adler.
2594 <http://webkit.org/b/55430> OwnArrayPtr.h's LOOSE_OWN_ARRAY_PTR results in link errors.
2596 * wtf/OwnArrayPtr.h:
2597 (WTF::::set): Implement OwnArrayPtr::set.
2599 2011-02-28 Martin Zoubek <martin.zoubek@acision.com> and Alejandro G. Castro <alex@igalia.com>
2601 Reviewed by Martin Robinson.
2603 Multithread support for JSC on UNIX
2604 https://bugs.webkit.org/show_bug.cgi?id=26838
2606 Implement suspendThread() and resumeThread() for systems with
2607 pthread.h using thread signal handler.
2609 * runtime/MachineStackMarker.cpp:
2610 (JSC::pthreadSignalHandlerSuspendResume):
2611 (JSC::MachineStackMarker::Thread::Thread):
2612 (JSC::getCurrentPlatformThread):
2613 (JSC::suspendThread):
2614 (JSC::resumeThread):
2615 (JSC::getPlatformThreadRegisters):
2616 (JSC::otherThreadStackPointer):
2617 (JSC::freePlatformThreadRegisters):
2618 (JSC::MachineStackMarker::markOtherThreadConservatively):
2619 * wtf/Platform.h: Added Gtk port to use
2620 ENABLE_JSC_MULTIPLE_THREADS.
2622 2011-02-28 Oliver Hunt <oliver@apple.com>
2624 Reviewed by Darin Adler.
2626 Stop using DeprecatedPtr for the global exception slot
2627 https://bugs.webkit.org/show_bug.cgi?id=55424
2629 Create GCRootPtr to signify that the exception slot is
2630 a gcroot, and so is exempt from the usual writebarrier
2633 * runtime/JSGlobalData.h:
2634 * runtime/WriteBarrier.h:
2635 (JSC::GCRootPtr::GCRootPtr):
2636 (JSC::GCRootPtr::operator=):
2638 2011-02-28 Adam Barth <abarth@webkit.org>
2640 Reviewed by Dimitri Glazkov.
2642 Use more xcconfig files in JavaScriptCore gyp build
2643 https://bugs.webkit.org/show_bug.cgi?id=55391
2645 The GYP experts tell me that we have have a total of two xcconfig
2646 files: one for the xcodeproj as a whole and one for each target. This
2647 patch uses that technique to re-use the existing xcconfig files and
2648 eliminate the duplication.
2650 Technically, this patch introduces some build errors because the
2651 xcconfig files assume that the xcodeproj file is one level higher in
2652 the directory hierarchy. Specifically, the xcodeproj file can no
2653 longer find the Info.plist or the prefix header. I plan to fix that in
2656 Also, this patch introduces the Release and Production configurations,
2657 which should work correctly now.
2659 * gyp/JavaScriptCore.gyp:
2661 2011-02-28 Jon Honeycutt <jhoneycutt@apple.com>
2665 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2666 Add symbol to export.
2668 2011-02-28 Oliver Hunt <oliver@apple.com>
2670 Reviewed by Gavin Barraclough.
2672 Make ScopeChainNode GC allocated
2673 https://bugs.webkit.org/show_bug.cgi?id=55283
2675 Simplify lifetime and other issues with the scopechain
2676 by making it gc allocated. This allows us to simplify
2677 function exit and unwinding, as well as making the
2678 current iterative refcounting go away.
2680 * JavaScriptCore.exp:
2681 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2682 * bytecode/CodeBlock.cpp:
2683 (JSC::CodeBlock::createActivation):
2684 * bytecode/StructureStubInfo.cpp:
2685 * bytecompiler/BytecodeGenerator.cpp:
2686 (JSC::BytecodeGenerator::generate):
2687 (JSC::BytecodeGenerator::BytecodeGenerator):
2688 (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
2689 (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
2690 * bytecompiler/BytecodeGenerator.h:
2691 * debugger/Debugger.cpp:
2692 (JSC::Recompiler::operator()):
2693 * debugger/DebuggerCallFrame.h:
2694 (JSC::DebuggerCallFrame::scopeChain):
2695 * interpreter/CachedCall.h:
2696 (JSC::CachedCall::CachedCall):
2697 * interpreter/CallFrame.h:
2698 * interpreter/Interpreter.cpp:
2700 (JSC::Interpreter::unwindCallFrame):
2701 (JSC::Interpreter::throwException):
2702 (JSC::Interpreter::execute):
2703 (JSC::Interpreter::executeCall):
2704 (JSC::Interpreter::executeConstruct):
2705 (JSC::Interpreter::privateExecute):
2707 (JSC::JIT::compileOpCallInitializeCallFrame):
2708 (JSC::JIT::compileOpCall):
2709 * jit/JITCall32_64.cpp:
2710 (JSC::JIT::compileOpCallInitializeCallFrame):
2711 (JSC::JIT::emit_op_ret):
2712 (JSC::JIT::emit_op_ret_object_or_this):
2713 (JSC::JIT::compileOpCall):
2714 * jit/JITOpcodes.cpp:
2715 (JSC::JIT::emit_op_end):
2716 (JSC::JIT::emit_op_ret):
2717 (JSC::JIT::emit_op_ret_object_or_this):
2718 * jit/JITOpcodes32_64.cpp:
2719 (JSC::JIT::emit_op_end):
2721 (JSC::DEFINE_STUB_FUNCTION):
2723 * runtime/ArgList.cpp:
2724 * runtime/Completion.cpp:
2726 * runtime/Completion.h:
2727 * runtime/DateConversion.cpp:
2728 * runtime/Executable.cpp:
2729 (JSC::EvalExecutable::compileInternal):
2730 (JSC::ProgramExecutable::compileInternal):
2731 (JSC::FunctionExecutable::compileForCallInternal):
2732 (JSC::FunctionExecutable::compileForConstructInternal):
2733 * runtime/FunctionConstructor.cpp:
2734 (JSC::constructFunction):
2735 * runtime/GCActivityCallbackCF.cpp:
2736 * runtime/Identifier.cpp:
2738 * runtime/JSChunk.cpp: Added.
2739 * runtime/JSChunk.h: Added.
2740 * runtime/JSFunction.cpp:
2741 (JSC::JSFunction::JSFunction):
2742 (JSC::JSFunction::markChildren):
2743 (JSC::JSFunction::getCallData):
2744 (JSC::JSFunction::getOwnPropertySlot):
2745 (JSC::JSFunction::getConstructData):
2746 * runtime/JSFunction.h:
2747 (JSC::JSFunction::scope):
2748 (JSC::JSFunction::setScope):
2749 * runtime/JSGlobalData.cpp:
2750 (JSC::JSGlobalData::JSGlobalData):
2751 * runtime/JSGlobalData.h:
2752 * runtime/JSGlobalObject.cpp:
2753 (JSC::JSGlobalObject::init):
2754 (JSC::JSGlobalObject::markChildren):
2755 * runtime/JSGlobalObject.h:
2756 (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
2757 (JSC::JSGlobalObject::globalScopeChain):
2758 * runtime/JSGlobalObjectFunctions.cpp:
2759 (JSC::globalFuncEval):
2760 * runtime/JSLock.cpp:
2761 * runtime/JSNumberCell.cpp:
2762 * runtime/JSZombie.cpp:
2763 * runtime/MarkedBlock.cpp:
2764 * runtime/MarkedSpace.cpp:
2765 * runtime/PropertyNameArray.cpp:
2766 * runtime/ScopeChain.cpp:
2767 (JSC::ScopeChainNode::print):
2768 (JSC::ScopeChainNode::localDepth):
2769 (JSC::ScopeChainNode::markChildren):
2770 * runtime/ScopeChain.h:
2771 (JSC::ScopeChainNode::ScopeChainNode):
2772 (JSC::ScopeChainNode::createStructure):
2773 (JSC::ScopeChainNode::push):
2774 (JSC::ScopeChainNode::pop):
2775 (JSC::ScopeChainIterator::ScopeChainIterator):
2776 (JSC::ScopeChainIterator::operator*):
2777 (JSC::ScopeChainIterator::operator->):
2778 (JSC::ScopeChainIterator::operator++):
2779 (JSC::ScopeChainNode::begin):
2780 (JSC::ScopeChainNode::end):
2781 (JSC::ExecState::globalData):
2782 (JSC::ExecState::lexicalGlobalObject):
2783 (JSC::ExecState::globalThisValue):
2784 * runtime/ScopeChainMark.h:
2787 2011-02-27 Adam Barth <abarth@webkit.org>
2789 Reviewed by Eric Seidel.
2791 Implement WTF::randomNumber in terms of WTF::cryptographicallyRandomNumber when possible
2792 https://bugs.webkit.org/show_bug.cgi?id=55326
2794 Currently, randomNumber does a bunch of platform-specific work that to
2795 get a cryptographic randomness when available. Instead, we should use
2796 cryptographicallyRandomNumber, which abstracts this work.
2797 Unfortunately, we can't remove all of the WTF::randomNumber
2798 implementation because not every port has access to cryptographically
2801 * wtf/RandomNumber.cpp:
2802 (WTF::randomNumber):
2804 2011-02-27 Benjamin Poulain <ikipou@gmail.com>
2806 Reviewed by Darin Adler.
2808 Eliminate DeprecatedPtrList from RenderBlock
2809 https://bugs.webkit.org/show_bug.cgi?id=54972
2811 Add methods find() and contains() using an adaptor to ListHashSet.
2812 Those method are like the one of HashSet, they allow to find objects
2813 based on a different key than the one used to define the set.
2815 Add convenience methods for direct access to the head and tail of the list.
2816 Those methods are providing similar API/behavior as Vector.
2818 * wtf/ListHashSet.h:
2821 (WTF::::removeLast):
2822 (WTF::ListHashSetTranslatorAdapter::hash):
2823 (WTF::ListHashSetTranslatorAdapter::equal):
2827 2011-02-26 Patrick Gansterer <paroga@webkit.org>
2829 Reviewed by Andreas Kling.
2831 Add support for DragonFly BSD
2832 https://bugs.webkit.org/show_bug.cgi?id=54407
2834 DragonFly BSD is based on FreeBSD, so handle it like FreeBSD.
2838 2011-02-26 Adam Barth <abarth@webkit.org>
2840 Reviewed by Dimitri Glazkov.
2842 JavaScriptCore should use the xcconfig file instead of importing that information into GYP
2843 https://bugs.webkit.org/show_bug.cgi?id=55282
2845 Technically, this breaks the build because I had removed one of the
2846 warnings in this config file, but this change seems like an
2849 * gyp/JavaScriptCore.gyp:
2851 2011-02-26 Thouraya ANDOLSI <thouraya.andolsi@st.com>
2853 Reviewed by Nikolas Zimmermann.
2856 https://bugs.webkit.org/show_bug.cgi?id=44329
2858 Provide an ExecutableAllocater::cacheFlush() implementation for
2861 * jit/ExecutableAllocator.h:
2862 (JSC::ExecutableAllocator::cacheFlush):
2864 2011-02-25 Sheriff Bot <webkit.review.bot@gmail.com>
2866 Unreviewed, rolling out r79627.
2867 http://trac.webkit.org/changeset/79627
2868 https://bugs.webkit.org/show_bug.cgi?id=55274
2870 broke worker tests (Requested by olliej on #webkit).
2872 * JavaScriptCore.exp:
2873 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2875 (JSC::Heap::allocate):
2878 (JSC::JSCell::JSCell::operator new):
2879 (JSC::JSCell::MarkedSpace::sizeClassFor):
2880 (JSC::JSCell::MarkedSpace::allocate):
2881 * runtime/MarkedBlock.h:
2882 * runtime/MarkedSpace.cpp:
2883 (JSC::MarkedSpace::MarkedSpace):
2884 (JSC::MarkedSpace::allocateBlock):
2885 (JSC::MarkedSpace::reset):
2886 * runtime/MarkedSpace.h:
2887 (JSC::MarkedSpace::SizeClass::SizeClass):
2889 2011-02-25 Michael Saboff <msaboff@apple.com>
2891 Reviewed by Darin Adler.
2893 Leak in JSParser::Scope of ScopeLabelInfo Vector
2894 https://bugs.webkit.org/show_bug.cgi?id=55249
2896 Changed m_labels to be an OwnPtr<>. Added VectorTraits
2897 and Scope copy constructor to support this change.
2899 * parser/JSParser.cpp:
2900 (JSC::JSParser::Scope::~Scope):
2902 2011-02-25 Fumitoshi Ukai <ukai@chromium.org>
2904 Reviewed by Adam Barth.
2906 WebSocket uses insecure random numbers
2907 https://bugs.webkit.org/show_bug.cgi?id=54714
2909 * JavaScriptCore.exp: Export WTF::cryptographicallyRandomNumber()
2911 2011-02-25 Patrick Gansterer <paroga@webkit.org>
2913 Reviewed by Adam Roben.
2915 Move timeBeginPeriod into OS(WINDOWS) section
2916 https://bugs.webkit.org/show_bug.cgi?id=55247
2919 (main): timeBeginPeriod is available on all Windows versions and not compiler specific.
2921 2011-02-25 Patrick Gansterer <paroga@webkit.org>
2923 Unreviewed WinCE build fix for r79695.
2926 (main): SetErrorMode isn't available on WinCE.
2928 2011-02-25 Adam Roben <aroben@apple.com>
2930 Work around Cygwin's crash-suppression behavior
2932 Cygwin calls ::SetErrorMode(SEM_FAILCRITICALERRORS), which any processes it launches will
2933 inherit. This is bad for testing/debugging, as it causes the post-mortem debugger not to be
2934 invoked. (Cygwin does this because it makes crashes more UNIX-y.) We reset the error mode
2935 when our test apps launch to work around Cygwin's behavior.
2937 Fixes <http://webkit.org/b/55222> Test apps crash silently (without invoking post-mortem
2938 debugger) when launched from Cygwin 1.7
2940 Reviewed by Darin Adler.
2942 * API/tests/testapi.c: Added a now-needed #include.
2946 Call ::SetErrorMode(0) to undo Cygwin's folly.
2948 * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: Define NOMINMAX like many of our
2949 other projects do so that windows.h won't define min/max macros that interfere with
2950 std::numeric_limits<T>::min/max.
2952 2011-02-24 Adam Barth <abarth@webkit.org>
2954 Reviewed by Eric Seidel.
2956 Add GYP project for JavaScriptCore
2957 https://bugs.webkit.org/show_bug.cgi?id=55027
2959 Again, this GYP files is very rough, but it succeeds in building
2960 JavaScriptCore. There's a lot more work to do here, especially in the
2961 area of sharing with JavaScriptGlue.gyp. This patch is more of a
2962 checkpoint so that other folks can help out if they wish.
2965 * gyp/JavaScriptCore.gyp: Added.
2966 * gyp/generate-derived-sources.sh: Added.
2968 2011-02-24 Adam Barth <abarth@webkit.org>
2970 Reviewed by Eric Seidel.
2972 Add missing files to JavaScriptCore.gypi
2973 https://bugs.webkit.org/show_bug.cgi?id=55193
2975 I forgot to add mm files in my previous patch.
2977 * JavaScriptCore.gyp/JavaScriptCore.gyp:
2978 * JavaScriptCore.gypi:
2980 2011-02-24 Adam Barth <abarth@webkit.org>
2982 Reviewed by Eric Seidel.
2984 Remove unused parameter name in GCActivityCallback.cpp
2985 https://bugs.webkit.org/show_bug.cgi?id=55194
2987 This change is not strictly required for the GYP-based build system,
2988 but I noticed this error when working on the new build system.
2990 * runtime/GCActivityCallback.cpp:
2991 (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback):
2993 2011-02-24 James Robinson <jamesr@chromium.org>
2995 Reviewed by Darin Fisher.
2997 Add a USE() macro to control use of the built-in UTF8 codec
2998 https://bugs.webkit.org/show_bug.cgi?id=55189
3000 Defaults USE(BUILTIN_UTF8_CODEC) to true for all platforms except chromium, which controls the flag via features.gypi.
3004 2011-02-24 Geoffrey Garen <ggaren@apple.com>
3006 Reviewed by Darin Adler.
3008 Variable-sized allocation (but still capped at 64 bytes)
3009 https://bugs.webkit.org/show_bug.cgi?id=55159
3011 SunSpider reports no change.
3013 * JavaScriptCore.exp: Some day, I hope not to have to edit this file.
3016 (JSC::Heap::allocateSlowCase): Split allocation into a fast and slow
3017 case, so the fast case can inline size class selection and turn it into
3018 a compile-time constant.
3020 Changed the collect-on-every allocation debugging switch to collect only
3021 on every slow allocation, so you can still flip the switch without
3022 recompiling the world. This may also be preferable for debugging purposes,
3023 since collecting after every single allocation can be unusably slow,
3024 and can mask problems by running destructors early.
3026 * runtime/Heap.h: Ditto.
3029 (JSC::JSCell::MarkedSpace::sizeClassFor):
3030 (JSC::JSCell::Heap::allocate):
3031 (JSC::JSCell::JSCell::operator new): The inlining mentioned above.
3033 * runtime/MarkedBlock.h: Dropped the block size from 256KB to 16KB. With
3034 multiple size classes, allocating a full 256KB for the first allocation
3035 in a given class can be pathologically wasteful. (8KB, or 4KB Mac and
3036 8KB Windows, would be even better, but that seems to be a peformance
3037 regression for now.)
3039 * runtime/MarkedSpace.cpp:
3040 (JSC::MarkedSpace::MarkedSpace):
3041 (JSC::MarkedSpace::allocateBlock):
3042 (JSC::MarkedSpace::reset): There's more than one size class now, and its
3043 cell size is not constant.
3045 * runtime/MarkedSpace.h:
3046 (JSC::MarkedSpace::SizeClass::SizeClass): Ditto.
3048 2011-02-23 Oliver Hunt <oliver@apple.com>
3050 Reviewed by Geoffrey Garen.
3052 Make WeakGCMap use new handle infrastructure
3053 https://bugs.webkit.org/show_bug.cgi?id=55100
3055 Remove old WeakGCMap implementation and move over to new handle
3058 This has a number of benefits, most notably it makes a WeakGCMap
3059 always reflect the true state of the world by as all entries are
3060 removed at the first gc cycle that makes them dead. This allows
3061 us to get rid of code in a wide variety of objects where the only
3062 purpose was to remove themselves from maps.
3064 It also means that we no longer need to have special "unchecked"
3065 versions of any functions on WeakGCMap. Alas in order to maintain
3066 compatibility with the JSWeakObjectMapClear API it is still
3067 necessary to have an api that resembles uncheckedRemove, this is
3068 now deprecatedRemove and will be dealt with in a later patch.
3070 In order to get correct semantics in WeakGCMap we need more
3071 contextual information in the finalizer, so we've added an
3072 abstract class based finaliser and a context parameter to the
3075 The new an improved WeakGCMap also results in sigificantly more
3076 churn in the weak handle lists so exposed some potential problems
3077 during the post mark phase which have been rectified as well.
3079 * API/JSWeakObjectMapRefPrivate.cpp:
3080 * API/JSWeakObjectMapRefPrivate.h:
3082 (JSC::Heap::globalObjectCount):
3083 (JSC::Heap::protectedGlobalObjectCount):
3084 * runtime/JSGlobalData.cpp:
3085 (JSC::JSGlobalData::JSGlobalData):
3086 * runtime/JSGlobalData.h:
3087 * runtime/JSGlobalObject.cpp:
3088 (JSC::JSGlobalObject::~JSGlobalObject):
3089 (JSC::JSGlobalObject::init):
3090 * runtime/WeakGCMap.h:
3091 (JSC::WeakGCMap::iterator::iterator):
3092 (JSC::WeakGCMap::iterator::get):
3093 (JSC::WeakGCMap::iterator::getSlot):
3094 (JSC::WeakGCMap::iterator::operator++):
3095 (JSC::WeakGCMap::iterator::operator==):
3096 (JSC::WeakGCMap::iterator::operator!=):
3097 (JSC::WeakGCMap::WeakGCMap):
3098 (JSC::WeakGCMap::isEmpty):
3099 (JSC::WeakGCMap::clear):
3100 (JSC::WeakGCMap::get):
3101 (JSC::WeakGCMap::getSlot):
3102 (JSC::WeakGCMap::set):
3103 (JSC::WeakGCMap::take):
3104 (JSC::WeakGCMap::size):
3105 (JSC::WeakGCMap::deprecatedRemove):
3106 (JSC::WeakGCMap::begin):
3107 (JSC::WeakGCMap::end):
3108 (JSC::WeakGCMap::~WeakGCMap):
3109 (JSC::WeakGCMap::finalize):
3110 * runtime/WeakGCPtr.h:
3111 (JSC::WeakGCPtr::WeakGCPtr):
3112 (JSC::WeakGCPtr::set):
3114 2011-02-24 Oliver Hunt <oliver@apple.com>
3116 Reviewed by Gavin Barraclough.
3118 Make weaklist processing deal with weak handles being removed during the iteration
3119 https://bugs.webkit.org/show_bug.cgi?id=55105
3121 It is possible for the handle heap to end up in a broken state if
3122 a handle's finalizer removes either the current or next handle
3123 to be visited during the post-gc cleanup. This patch removes that
3124 problem by allowing the deallocate(Node*) routine to update the
3125 iterator if it is called during finalization.
3127 * collector/handles/HandleHeap.cpp:
3128 (JSC::HandleHeap::HandleHeap):
3129 (JSC::HandleHeap::updateAfterMark):
3130 (JSC::HandleHeap::clearWeakPointers):
3131 (JSC::HandleHeap::writeBarrier):
3132 (JSC::HandleHeap::protectedGlobalObjectCount):
3133 * collector/handles/HandleHeap.h:
3134 (JSC::Finalizer::~Finalizer):
3135 (JSC::HandleHeap::getFinalizer):
3136 (JSC::HandleHeap::deallocate):
3137 (JSC::HandleHeap::makeWeak):
3138 (JSC::HandleHeap::makeSelfDestroying):
3139 (JSC::HandleHeap::Node::Node):
3140 (JSC::HandleHeap::Node::setFinalizer):
3141 (JSC::HandleHeap::Node::finalizer):
3142 (JSC::HandleHeap::Node::finalizerContext):
3143 * interpreter/RegisterFile.cpp:
3144 (JSC::RegisterFile::setGlobalObject):
3145 (JSC::GlobalObjectNotifier::finalize):
3146 (JSC::RegisterFile::globalObjectCollectedNotifier):
3147 * interpreter/RegisterFile.h:
3148 (JSC::RegisterFile::RegisterFile):
3150 (JSC::Heap::destroy):
3151 * runtime/WeakGCPtr.h:
3152 (JSC::WeakGCPtr::WeakGCPtr):
3153 (JSC::WeakGCPtr::set):
3155 2011-02-24 Michael Saboff <msaboff@apple.com>
3157 Reviewed by Oliver Hunt.
3159 PatternAlternative leaked in YarrPatternConstructor::atomParenthesesEnd()
3160 https://bugs.webkit.org/show_bug.cgi?id=55156
3162 Added code to delete unneeded PatternAlternative after it is removed
3163 from m_alternatives Vector.
3165 * yarr/YarrPattern.cpp:
3166 (JSC::Yarr::YarrPatternConstructor::atomParenthesesEnd):
3168 2011-02-24 Eric Seidel <eric@webkit.org>
3170 Reviewed by Anders Carlsson.
3172 VectorBuffer should not call malloc(0)
3173 https://bugs.webkit.org/show_bug.cgi?id=55091
3175 Turns out the malloc() call which was so hot in:
3176 https://bugs.webkit.org/show_bug.cgi?id=55005
3177 was actually just malloc(0).
3179 We shouldn't be calling malloc(0) anyway, since there is no need to
3180 and it might actually do work on some systems.
3181 I believe on Mac it ends up taking the standard spinlocks (expensive)
3182 and the code on Brew actually does a malloc(1) instead. Neither is desirable.
3185 (WTF::VectorBufferBase::allocateBuffer):
3186 (WTF::VectorBufferBase::tryAllocateBuffer):
3188 2011-02-24 Patrick Gansterer <paroga@webkit.org>
3190 Reviewed by Darin Adler.
3192 Remove obsolete PLATFORM(CI)
3193 https://bugs.webkit.org/show_bug.cgi?id=55082
3197 2011-02-24 Martin Robinson <mrobinson@igalia.com>
3199 Reviewed by Xan Lopez.
3201 [GTK] Remove the GFile GOwnPtr specialization
3202 https://bugs.webkit.org/show_bug.cgi?id=55154
3204 Remove the GFile specialization of GOwnPtr. It's sufficient to use GRefPtr
3205 to track GFiles since they are just regular reference-counted GObjects.
3207 * wtf/gobject/GOwnPtr.cpp: Remove GFile specialization.
3208 * wtf/gobject/GOwnPtr.h: Ditto.
3210 2011-02-24 Patrick Gansterer <paroga@webkit.org>
3212 Reviewed by Eric Seidel.
3214 Rename PLATFORM(SKIA) to USE(SKIA)
3215 https://bugs.webkit.org/show_bug.cgi?id=55090
3219 2011-02-24 Patrick Gansterer <paroga@webkit.org>
3221 Reviewed by Alexey Proskuryakov.
3223 Remove pthreads dependecy for JSLock
3224 https://bugs.webkit.org/show_bug.cgi?id=54832
3226 JSLock is only needed to support an obsolete execution model where JavaScriptCore
3227 automatically protected against concurrent access from multiple threads.
3228 So it's safe to disable it on non-mac platforms where we don't have native pthreads.
3230 * runtime/JSLock.cpp:
3232 2011-02-24 Chao-ying Fu <fu@mips.com>
3234 Reviewed by Eric Seidel.
3236 Fix MIPS build with new patchOffsetPut/GetByIdPropertyMapOffset1/2 values
3237 https://bugs.webkit.org/show_bug.cgi?id=54997
3241 (JSC::JITThunks::JITThunks):
3243 2011-02-24 Andras Becsi <abecsi@webkit.org>
3245 Reviewed by Laszlo Gombos.
3247 [Qt] MinGW build fails to link
3248 https://bugs.webkit.org/show_bug.cgi?id=55050
3250 Prepend the libraries of subcomponents instead of appending them
3251 to fix the library order according to the dependency of the libraries
3253 * JavaScriptCore.pri: rename addJavaScriptCore to prependJavaScriptCore
3256 2011-02-24 Eric Seidel <eric@webkit.org>
3258 Reviewed by Adam Barth.
3260 Deque<T> should support inline capacity
3261 https://bugs.webkit.org/show_bug.cgi?id=55032
3263 The title says it all. There are currently no places
3264 which use this code yet, however it's been tested in conjunction
3265 with code for bug 55005.
3267 This also adds an ASSERT that capacity is never 1. If you were able
3268 to set the capacity equal to 1, the Deque would just get confused
3269 and happily append your item but still think it had size 0.
3272 (WTF::DequeIterator::DequeIterator):
3273 (WTF::DequeConstIterator::DequeConstIterator):
3274 (WTF::DequeReverseIterator::DequeReverseIterator):
3275 (WTF::DequeConstReverseIterator::DequeConstReverseIterator):
3276 (WTF::::checkValidity):
3277 (WTF::::checkIndexValidity):
3278 (WTF::::invalidateIterators):
3280 (WTF::deleteAllValues):
3282 (WTF::::destroyAll):
3287 (WTF::::expandCapacityIfNeeded):
3288 (WTF::::expandCapacity):
3292 (WTF::::removeFirst):
3294 (WTF::::addToIteratorsList):
3295 (WTF::::removeFromIteratorsList):
3296 (WTF::::DequeIteratorBase):
3297 (WTF::::~DequeIteratorBase):
3305 2011-02-22 Adam Barth <abarth@webkit.org>
3307 Reviewed by Ojan Vafai.
3309 Add missing files to JavaScriptCore.gypi
3310 https://bugs.webkit.org/show_bug.cgi?id=55020
3312 gypi files are supposed to list every file under the sun. This patch
3313 adds some missing files and sorts the rest.
3315 * JavaScriptCore.gypi:
3317 2011-02-23 Geoffrey Garen <ggaren@apple.com>
3319 Reviewed by Darin Adler.
3321 Refactored MarkedSpace to operate in terms of size classes
3322 https://bugs.webkit.org/show_bug.cgi?id=55106
3324 SunSpider reports no change.
3327 (JSC::JSCell::MarkedSpace::sizeClassFor):
3328 (JSC::JSCell::MarkedSpace::allocate): Delegate allocation based on size
3329 class. Since these functions are inline, the compiler can constant fold
3332 * runtime/MarkedBlock.h:
3333 (JSC::MarkedBlock::cellSize):
3334 (JSC::MarkedBlock::size): Factored out a cellSize() helper.
3336 * runtime/MarkedSpace.cpp:
3337 (JSC::MarkedSpace::allocateBlock):
3338 (JSC::MarkedSpace::allocateFromSizeClass):
3339 (JSC::MarkedSpace::shrink):
3340 (JSC::MarkedSpace::reset):
3341 * runtime/MarkedSpace.h:
3342 (JSC::MarkedSpace::SizeClass::SizeClass):
3343 (JSC::MarkedSpace::SizeClass::reset): Changed to operate in terms of
3344 abstract SizeClass objects, which are independent linked lists of blocks
3345 of a certain size class, instead of a single m_heap object.
3347 2011-02-23 Adam Barth <abarth@webkit.org>
3349 Reviewed by James Robinson.
3351 [Chromium] Use WebKitClient for OSRandomSource instead of trying to talk to the file system in the sandbox
3352 https://bugs.webkit.org/show_bug.cgi?id=55093
3354 Exclude OSRandomSource.cpp from the Chromium build. This function is
3355 implemented in WebKit/chromium/src instead.
3357 * JavaScriptCore.gyp/JavaScriptCore.gyp:
3359 2011-02-23 Oliver Hunt <oliver@apple.com>
3361 Roll out r64156 as it introduces incorrect behaviour.
3363 * runtime/JSByteArray.h:
3364 (JSC::JSByteArray::setIndex):
3366 2011-02-23 Geoffrey Garen <ggaren@apple.com>
3368 Reviewed by Oliver Hunt.
3370 Moved the "nextAtom" allocation pointer into MarkedBlock for better encapsulation
3371 https://bugs.webkit.org/show_bug.cgi?id=55079
3373 SunSpider reports no change.
3376 (JSC::Heap::reset): Moved Zombie sweeping here, up from MarkedSpace,
3377 since we want Heap to logically control MarkedSpace. MarkedSpace should
3378 never choose to sweep itself.
3381 (JSC::JSCell::MarkedBlock::allocate): Updated for nextAtom becoming a
3382 member of MarkedBlock. No need to reset nextAtom to firstAtom() when
3383 we reach the end of a block, since there's now an explicit reset pass
3386 * runtime/MarkedBlock.cpp:
3387 (JSC::MarkedBlock::MarkedBlock):
3388 * runtime/MarkedBlock.h:
3389 (JSC::MarkedBlock::reset): Added the nextAtom data member, and reordered
3390 some data members to improve cache locality.
3392 * runtime/MarkedSpace.cpp:
3393 (JSC::MarkedSpace::MarkedSpace):
3394 (JSC::MarkedSpace::allocate):
3395 (JSC::MarkedSpace::reset):
3396 * runtime/MarkedSpace.h:
3397 (JSC::CollectorHeap::CollectorHeap): Removed nextAtom, and added an
3398 explicit reset pass.
3400 2011-02-23 James Robinson <jamesr@chromium.org>
3402 Unreviewed, rolling out r79428.
3403 http://trac.webkit.org/changeset/79428
3404 https://bugs.webkit.org/show_bug.cgi?id=54714
3406 Does not work in the Chromium sandbox
3408 * JavaScriptCore.exp:
3410 2011-02-23 Adam Roben <aroben@apple.com>
3412 Fix an off-by-one error in JSC::appendSourceToError
3414 Looks like this bug has been around since the code was first added in r35245.
3416 Fixes <http://webkit.org/b/55052> <rdar://problem/9043512> Crash in JSC::appendSourceToError
3417 when running fast/dom/objc-big-method-name.html on Windows with full page heap enabled
3419 Reviewed by Darin Adler.
3421 * interpreter/Interpreter.cpp:
3422 (JSC::appendSourceToError): When trimming whitespace off the end of the string, examine the
3423 character at stop-1 rather than at stop. At this point in the code, stop represents the
3424 index just past the end of the characters we care about, and can even be just past the end
3425 of the entire data buffer.
3427 2011-02-23 Geoffrey Garen <ggaren@apple.com>
3429 Reviewed by Darin Adler.
3431 Rolled back in r79367 with SnowLeopard Release bot crash fixed.
3432 https://bugs.webkit.org/show_bug.cgi?id=54999
3434 The crash was caused by failure to update the "nextBlock" pointer when
3435 removing a block from the list while shrinking. The fix is to update the
3436 "nextBlock" pointer.
3438 This crash was very rare because it only happened in cases where the very
3439 first block in the h