1 2011-11-21 Andy Wingo <wingo@igalia.com>
3 Add .dir-locals.el file for better Emacs defaults
4 https://bugs.webkit.org/show_bug.cgi?id=72483
8 * .dir-locals.el: Set appropriate directory-local variables for Emacs.
10 2011-11-21 Filip Pizlo <fpizlo@apple.com>
12 Another attempt at a build fix.
15 (JSC::DFG::dfgResetGetByID):
16 (JSC::DFG::dfgResetPutByID):
18 2011-11-20 Filip Pizlo <fpizlo@apple.com>
20 Unreviewed interpreter build fix.
22 * bytecode/CodeBlock.cpp:
23 (JSC::CodeBlock::finalizeUnconditionally):
26 2011-11-20 Yuqiang Xian <yuqiang.xian@intel.com>
28 Improve modulo operation on 32bit platforms
29 https://bugs.webkit.org/show_bug.cgi?id=72501
31 Reviewed by Filip Pizlo.
33 Extend softModulo to support X86 and MIPS in baseline JIT.
34 Apply the same optimization to 32bit DFG JIT.
35 1% gain on Kraken, tested on Linux Core i7 Nehalem 32bit.
37 * dfg/DFGSpeculativeJIT.h:
38 * dfg/DFGSpeculativeJIT32_64.cpp:
39 (JSC::DFG::SpeculativeJIT::compileSoftModulo):
40 (JSC::DFG::SpeculativeJIT::compile):
41 * jit/JITArithmetic32_64.cpp:
42 (JSC::JIT::emit_op_mod):
43 (JSC::JIT::emitSlow_op_mod):
44 * jit/JITOpcodes32_64.cpp:
45 (JSC::JIT::softModulo):
48 2011-11-18 Filip Pizlo <fpizlo@apple.com>
50 Inline caches that refer to otherwise dead objects should be cleared
51 https://bugs.webkit.org/show_bug.cgi?id=72311
53 Reviewed by Geoff Garen.
55 DFG code blocks now participate in the weak reference harvester fixpoint
56 so that they only consider themselves to be live if either they are
57 currently executing, or their owner is live and all of their weak references
58 are live. If not, the relevant code blocks are jettisoned.
60 Inline caches in both the old JIT and the DFG are now cleared if any of
61 their references are not marked at the end of a GC.
63 This is performance-neutral on SunSpider, V8, and Kraken. With the clear-
64 all-code-on-GC policy that we currently have, it shows a slight reduction
65 in memory usage. If we turn that policy off, it's pretty easy to come up
66 with an example program that will cause ToT to experience linear heap
67 growth, while with this patch, the heap stays small and remains at a
70 * assembler/ARMv7Assembler.h:
71 (JSC::ARMv7Assembler::readCallTarget):
72 * assembler/MacroAssemblerARMv7.h:
73 (JSC::MacroAssemblerARMv7::readCallTarget):
74 * assembler/MacroAssemblerX86.h:
75 (JSC::MacroAssemblerX86::readCallTarget):
76 * assembler/MacroAssemblerX86_64.h:
77 (JSC::MacroAssemblerX86_64::readCallTarget):
78 * bytecode/CodeBlock.cpp:
79 (JSC::CodeBlock::visitAggregate):
80 (JSC::CodeBlock::performTracingFixpointIteration):
81 (JSC::CodeBlock::visitWeakReferences):
82 (JSC::CodeBlock::finalizeUnconditionally):
83 (JSC::CodeBlock::stronglyVisitStrongReferences):
84 (JSC::MethodCallLinkInfo::reset):
85 (JSC::ProgramCodeBlock::jettison):
86 (JSC::EvalCodeBlock::jettison):
87 (JSC::FunctionCodeBlock::jettison):
88 * bytecode/CodeBlock.h:
89 (JSC::CodeBlock::reoptimize):
90 (JSC::CodeBlock::shouldImmediatelyAssumeLivenessDuringScan):
91 * bytecode/Instruction.h:
92 (JSC::PolymorphicAccessStructureList::visitWeak):
93 * bytecode/StructureStubInfo.cpp:
94 (JSC::StructureStubInfo::visitWeakReferences):
95 * bytecode/StructureStubInfo.h:
96 (JSC::isGetByIdAccess):
97 (JSC::isPutByIdAccess):
98 (JSC::StructureStubInfo::reset):
99 * dfg/DFGJITCompiler.cpp:
100 (JSC::DFG::JITCompiler::link):
101 * dfg/DFGOperations.cpp:
102 * dfg/DFGRepatch.cpp:
103 (JSC::DFG::dfgRepatchByIdSelfAccess):
104 (JSC::DFG::dfgResetGetByID):
105 (JSC::DFG::dfgResetPutByID):
107 (JSC::DFG::dfgResetGetByID):
108 (JSC::DFG::dfgResetPutByID):
110 * jit/JITPropertyAccess.cpp:
111 (JSC::JIT::resetPatchGetById):
112 (JSC::JIT::resetPatchPutById):
113 * jit/JITPropertyAccess32_64.cpp:
114 (JSC::JIT::resetPatchGetById):
115 (JSC::JIT::resetPatchPutById):
117 (JSC::DEFINE_STUB_FUNCTION):
118 * jit/JITWriteBarrier.h:
119 (JSC::JITWriteBarrierBase::clearToMaxUnsigned):
121 2011-11-20 Filip Pizlo <fpizlo@apple.com>
123 Showing the data overlay in OpenStreetMap doesn't work, zooming partially broken
124 https://bugs.webkit.org/show_bug.cgi?id=71505
126 Reviewed by Oliver Hunt.
128 The bytecode generator was assuming that call_varargs never reuses the base register
129 (i.e. the function being called) for the result. This is no longer true.
131 * bytecompiler/BytecodeGenerator.cpp:
132 (JSC::BytecodeGenerator::emitCallVarargs):
133 * bytecompiler/BytecodeGenerator.h:
134 * bytecompiler/NodesCodegen.cpp:
135 (JSC::ApplyFunctionCallDotNode::emitBytecode):
137 2011-11-20 Filip Pizlo <fpizlo@apple.com>
139 DFG 32_64 should directly store double virtual registers on SetLocal
140 https://bugs.webkit.org/show_bug.cgi?id=72845
142 Reviewed by Oliver Hunt.
146 * dfg/DFGSpeculativeJIT32_64.cpp:
147 (JSC::DFG::SpeculativeJIT::compile):
149 2011-11-20 Noel Gordon <noel.gordon@gmail.com>
151 [chromium] Remove DFG::JITCodeGenerator from the gyp projects
152 https://bugs.webkit.org/show_bug.cgi?id=72842
154 Reviewed by Filip Pizlo.
156 dfg/DFGJITCodeGenerator.{h,cpp} were removed in r100244
158 * JavaScriptCore.gypi: remove dfg/DFGJITCodeGenerator.{h,cpp}
160 2011-11-18 Daniel Bates <dbates@rim.com>
162 Add CMake build infrastructure for the BlackBerry port
163 https://bugs.webkit.org/show_bug.cgi?id=72768
165 Reviewed by Antonio Gomes.
167 * PlatformBlackBerry.cmake: Added.
168 * shell/PlatformBlackBerry.cmake: Added.
169 * wtf/PlatformBlackBerry.cmake: Added.
171 2011-11-18 Filip Pizlo <fpizlo@apple.com>
173 DFG JIT fails speculation on InstanceOf if the base is not an object
174 https://bugs.webkit.org/show_bug.cgi?id=72709
176 Reviewed by Geoff Garen.
178 InstanceOf already leverages the fact that we only allow the default
179 hasInstance implementation. So, if the base is predicted to possibly
180 be not an object and the CFA has not yet proven otherwise, InstanceOf
181 will abstain from speculating cell and instead return false if the
184 This appears to be a 1% speed-up on V8 on the V8 harness. 3-4% or so
185 speed-up in earley-boyer. Neutral according to bencher on SunSpider,
186 V8, and Kraken. In 32-bit, it's a 0.5% win on SunSpider and a 1.9%
187 win on V8 even on my harness, due to a 12.5% win on earley-boyer.
189 I also took this opportunity to make the code for InstanceOf common
190 between the two JITs. This was partially successful, in that the
191 "common code" has a bunch of #if's, but overall it seems like a code
194 * dfg/DFGAbstractState.cpp:
195 (JSC::DFG::AbstractState::execute):
196 * dfg/DFGSpeculativeJIT.cpp:
197 (JSC::DFG::SpeculativeJIT::compileInstanceOfForObject):
198 (JSC::DFG::SpeculativeJIT::compileInstanceOf):
199 * dfg/DFGSpeculativeJIT.h:
200 * dfg/DFGSpeculativeJIT32_64.cpp:
201 (JSC::DFG::SpeculativeJIT::compile):
202 * dfg/DFGSpeculativeJIT64.cpp:
203 (JSC::DFG::SpeculativeJIT::compile):
205 2011-11-18 Mark Hahnenberg <mhahnenberg@apple.com>
207 Forgot to completely de-virtualize isDynamicScope
208 https://bugs.webkit.org/show_bug.cgi?id=72763
210 Reviewed by Darin Adler.
212 * runtime/JSActivation.h: Removed virtual keyword.
214 2011-11-18 Filip Pizlo <fpizlo@apple.com>
216 Crash in JSC::DFG::OSRExitCompiler::compileExit(JSC::DFG::OSRExit const&, JSC::DFG::SpeculationRecovery*)
217 https://bugs.webkit.org/show_bug.cgi?id=72292
219 Reviewed by Darin Adler.
223 * dfg/DFGOSRExitCompiler32_64.cpp:
224 (JSC::DFG::OSRExitCompiler::compileExit):
226 2011-11-18 Mark Hahnenberg <mhahnenberg@apple.com>
228 De-virtualize ExecutableBase::intrinsic
229 https://bugs.webkit.org/show_bug.cgi?id=72548
231 Reviewed by Oliver Hunt.
233 * runtime/Executable.cpp:
234 (JSC::ExecutableBase::intrinsic): Dynamic cast to NativeExecutable. If successful, call intrinsic, otherwise return default value.
235 * runtime/Executable.h:
237 (JSC::jsDynamicCast): Add jsDynamicCast that duplicates the functionality of dynamic_cast in C++ but uses ClassInfo
238 rather than requiring C++ RTTI.
240 2011-11-18 Patrick Gansterer <paroga@webkit.org>
242 [CMake] Remove duplicate dtoa files from CMakeLists.txt
243 https://bugs.webkit.org/show_bug.cgi?id=72711
245 Reviewed by Brent Fulgham.
247 * wtf/CMakeLists.txt:
249 2011-11-17 Michael Saboff <msaboff@apple.com>
251 [Qt] REGRESSION(r100510): Enable 8 Bit Strings in JavaScriptCore
252 https://bugs.webkit.org/show_bug.cgi?id=72602
254 Fixed StringImpl::foldCase by adding return in the case we need to handle
255 folding of 8 bit strings with Latin-1 characters.
257 Fixed case where StringImpl::replace was using a char temp instead of an
260 Because of the second change, I changed other uses of char or
261 unsigned char to LChar.
263 Reviewed by Zoltan Herczeg.
265 * wtf/text/StringImpl.cpp:
266 (WTF::StringImpl::upper):
267 (WTF::StringImpl::foldCase):
269 (WTF::equalIgnoringCase):
270 (WTF::StringImpl::replace):
272 2011-11-17 Patrick Gansterer <paroga@webkit.org>
274 [CMake] Move FAST_MALLOC specific lines from Platform*.cmake to CMakeLists.txt
275 https://bugs.webkit.org/show_bug.cgi?id=72644
277 Reviewed by Brent Fulgham.
279 All ports need to do the same determination about fast malloc. Move the CMake code from
280 platform specific files into the generic one, so that additional ports can reuse it.
282 * wtf/CMakeLists.txt:
283 * wtf/PlatformEfl.cmake:
284 * wtf/PlatformWinCE.cmake:
286 2011-11-17 Mark Hahnenberg <mhahnenberg@apple.com>
288 Add finalizer to JSActivation
289 https://bugs.webkit.org/show_bug.cgi?id=72575
291 Reviewed by Geoffrey Garen.
293 * runtime/JSActivation.cpp:
294 (JSC::JSActivation::finishCreation): Attach finalize function to objects during creation.
295 (JSC::JSActivation::finalize):
296 * runtime/JSActivation.h: Replaced virtual destructor with static finalize function.
298 2011-11-15 Filip Pizlo <fpizlo@apple.com>
300 Code block jettisoning should be part of the GC's transitive closure
301 https://bugs.webkit.org/show_bug.cgi?id=72467
303 Reviewed by Geoff Garen.
305 Replaced JettisonedCodeBlocks with DFGCodeBlocks. The latter knows about all
306 DFG code blocks (i.e. those that may be jettisoned, and may have inlined weak
307 references) and helps track what state each of those code blocks is in during
308 GC. The state consists of two flags; mayBeExecuting, which tells if the code block
309 is live from call frames; and isJettisoned, which tells if the code block is
310 not owned by any executable and thus should be deleted as soon as it is not
313 - Not executing, Not jettisoned: The code block may or may not be reachable from
314 any executables, but it is owned by an executable, and hence should be
315 kept alive if its executable is live and if all of its weak references are
316 live. Otherwise it should be deleted during the current GC cycle, and its
317 outgoing references should not be scanned.
319 - Not executing but jettisoned: The code block should be deleted as soon as
320 possible and none of its outgoing references should be scanned.
322 - Executing but not jettisoned: The code block should be kept alive during this
323 GC cycle, and all of its outgoing references (including the weak ones)
324 should be scanned and marked strongly. The mayBeExecuting bit will be cleared at
325 the end of the GC cycle.
327 - Executing and jettisoned: The code block should be kept alive during this
328 GC cycle, and all of its outgoing references (including the weak ones)
329 should be scanned and marked strongly. However, on the next GC cycle, it
330 will have its mayBeExecuting bit cleared and hence it will become a candidate
331 for immediate deletion provided it is not executing again.
333 This is performance-neutral.
336 * GNUmakefile.list.am:
337 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
338 * JavaScriptCore.xcodeproj/project.pbxproj:
340 * bytecode/CodeBlock.cpp:
341 (JSC::CodeBlock::~CodeBlock):
342 * bytecode/CodeBlock.h:
343 (JSC::CodeBlock::setJITCode):
344 (JSC::CodeBlock::DFGData::DFGData):
345 (JSC::DFGCodeBlocks::mark):
346 * heap/ConservativeRoots.cpp:
347 (JSC::ConservativeRoots::add):
348 * heap/ConservativeRoots.h:
349 * heap/DFGCodeBlocks.cpp: Added.
350 (JSC::DFGCodeBlocks::DFGCodeBlocks):
351 (JSC::DFGCodeBlocks::~DFGCodeBlocks):
352 (JSC::DFGCodeBlocks::jettison):
353 (JSC::DFGCodeBlocks::clearMarks):
354 (JSC::DFGCodeBlocks::deleteUnmarkedJettisonedCodeBlocks):
355 (JSC::DFGCodeBlocks::traceMarkedCodeBlocks):
356 * heap/DFGCodeBlocks.h: Added.
358 (JSC::Heap::jettisonDFGCodeBlock):
359 (JSC::Heap::markRoots):
360 (JSC::Heap::collect):
362 * heap/JettisonedCodeBlocks.cpp: Removed.
363 * heap/JettisonedCodeBlocks.h: Removed.
364 * interpreter/RegisterFile.cpp:
365 (JSC::RegisterFile::gatherConservativeRoots):
366 * interpreter/RegisterFile.h:
367 * runtime/Executable.cpp:
368 (JSC::jettisonCodeBlock):
370 2011-11-16 Filip Pizlo <fpizlo@apple.com>
372 Unreviewed, build fix for 32-bit.
374 * dfg/DFGSpeculativeJIT32_64.cpp:
375 (JSC::DFG::SpeculativeJIT::compile):
377 2011-11-16 Geoffrey Garen <ggaren@apple.com>
379 Some CachedCall cleanup, in preparation for reversing argument order.
381 Reviewed by Gavin Barraclough.
383 * bytecode/CodeBlock.cpp:
384 (JSC::CodeBlock::stronglyVisitWeakReferences): A build fix for the interpreter,
387 * interpreter/CachedCall.h:
388 (JSC::CachedCall::CachedCall): Renamed argCount to argumentCount because
389 we are not that desperate for character saving.
391 (JSC::CachedCall::setThis):
392 (JSC::CachedCall::setArgument): Adopted new 0-based argument indexing for
395 * interpreter/CallFrameClosure.h:
396 (JSC::CallFrameClosure::setThis):
397 (JSC::CallFrameClosure::setArgument):
398 (JSC::CallFrameClosure::resetCallFrame): Provide 0-based argument indexing,
399 with an explicit setter for 'this', since that's how most clients think.
401 * interpreter/Interpreter.cpp:
402 (JSC::Interpreter::prepareForRepeatCall):
403 * interpreter/Interpreter.h: Change argCount to argumentCountIncludingThis,
406 2011-11-16 Mark Hahnenberg <mhahnenberg@apple.com>
408 De-virtualize ScriptExecutable::unlinkCalls
409 https://bugs.webkit.org/show_bug.cgi?id=72546
411 Reviewed by Geoffrey Garen.
413 * runtime/Executable.cpp:
414 (JSC::FunctionExecutable::~FunctionExecutable): Added an empty explicit virtual destructor to prevent a very odd compilation error
415 due to the fact that the compiler was trying to generate the implicit inline destructor in every translation unit, some of which
416 didn't have complete type information on the things that needed to be destructed in the implicit destructor.
417 * runtime/Executable.h:
418 (JSC::EvalExecutable::createStructure): Used new type value from JSType
419 (JSC::ProgramExecutable::createStructure): Ditto
420 (JSC::FunctionExecutable::createStructure): Ditto
421 (JSC::ScriptExecutable::unlinkCalls): Condition upon the type value, cast and call the corresponding unlinkCalls implementation.
422 * runtime/JSType.h: Added new values for EvalExecutable, ProgramExecutable, and FunctionExecutable. Remove explicit numbers, since
423 that just adds noise to patches and they currently have no significance.
425 2011-11-16 Filip Pizlo <fpizlo@apple.com>
427 JSC::CodeBlock should know which references generated by the DFG are weak
428 https://bugs.webkit.org/show_bug.cgi?id=72563
430 Reviewed by Geoff Garen.
432 CodeBlock::m_dfgData now tracks weak references and weak reference transitions
433 (like ephemerons) generated by the DFG. The DFG makes sure to notify the
434 CodeBlock of all uses of weak references and weak reference transitions.
435 CodeBlock currently marks them strongly, since the weak marking logic is not
438 * bytecode/CodeBlock.cpp:
439 (JSC::CodeBlock::visitAggregate):
440 (JSC::CodeBlock::stronglyVisitWeakReferences):
441 * bytecode/CodeBlock.h:
442 (JSC::CodeBlock::appendWeakReference):
443 (JSC::CodeBlock::shrinkWeakReferencesToFit):
444 (JSC::CodeBlock::appendWeakReferenceTransition):
445 (JSC::CodeBlock::shrinkWeakReferenceTransitionsToFit):
446 (JSC::CodeBlock::WeakReferenceTransition::WeakReferenceTransition):
447 * bytecode/CodeOrigin.h:
448 (JSC::CodeOrigin::codeOriginOwner):
449 * dfg/DFGByteCodeParser.cpp:
450 (JSC::DFG::ByteCodeParser::handleCall):
451 (JSC::DFG::ByteCodeParser::handleInlining):
452 (JSC::DFG::ByteCodeParser::parseBlock):
453 * dfg/DFGJITCompiler.cpp:
454 (JSC::DFG::JITCompiler::link):
455 * dfg/DFGJITCompiler.h:
456 (JSC::DFG::JITCompiler::addWeakReference):
457 (JSC::DFG::JITCompiler::addWeakReferenceTransition):
458 (JSC::DFG::JITCompiler::branchWeakPtr):
459 * dfg/DFGSpeculativeJIT.h:
460 * dfg/DFGSpeculativeJIT32_64.cpp:
461 (JSC::DFG::SpeculativeJIT::compile):
462 * dfg/DFGSpeculativeJIT64.cpp:
463 (JSC::DFG::SpeculativeJIT::fillJSValue):
464 (JSC::DFG::SpeculativeJIT::compile):
466 2011-11-16 Michael Saboff <msaboff@apple.com>
468 LayoutTests for Debug Builds Crashes in JavaScriptCore/yarr/YarrInterpreter.cpp(185)
469 https://bugs.webkit.org/show_bug.cgi?id=72561
471 Removed #if USE(JSC) and therefore the ASSERT_NOT_REACHED().
472 Simplified the code in the process.
474 Reviewed by James Robinson.
476 * yarr/YarrInterpreter.cpp:
477 (JSC::Yarr::Interpreter::CharAccess::CharAccess):
478 (JSC::Yarr::Interpreter::CharAccess::~CharAccess):
480 2011-11-16 Geoffrey Garen <ggaren@apple.com>
482 Interpreter build fixes.
484 * bytecode/CodeBlock.h:
485 * interpreter/Interpreter.cpp:
486 (JSC::Interpreter::privateExecute):
488 2011-11-16 Patrick Gansterer <paroga@webkit.org>
490 Unreviewed. Build fix for !ENABLE(JIT) after r100363.
492 * bytecode/CodeBlock.h:
494 2011-11-16 Geoffrey Garen <ggaren@apple.com>
496 Rolled back in r100375 and r100385 with 32-bit build fixed.
498 * dfg/DFGOperations.cpp:
500 (JSC::DEFINE_STUB_FUNCTION):
501 * runtime/ArgList.cpp:
502 (JSC::ArgList::getSlice):
504 * runtime/JSArray.cpp:
505 (JSC::JSArray::finishCreation):
507 (JSC::JSArray::create):
508 * runtime/JSGlobalObject.h:
509 (JSC::constructArray):
511 2011-11-16 Filip Pizlo <fpizlo@apple.com>
513 DFG global variable CSE mishandles the cross-global-object inlining corner case
514 https://bugs.webkit.org/show_bug.cgi?id=72542
516 Reviewed by Geoff Garen.
518 Moved code to get the global object for a code origin into CodeBlock, so it is
519 more broadly accessible. Fixed CSE to compare both the variable number, and the
520 global object, before deciding to perform elimination.
522 * bytecode/CodeBlock.h:
523 (JSC::CodeBlock::globalObjectFor):
524 * dfg/DFGAssemblyHelpers.h:
525 (JSC::DFG::AssemblyHelpers::globalObjectFor):
526 * dfg/DFGPropagator.cpp:
527 (JSC::DFG::Propagator::globalVarLoadElimination):
528 (JSC::DFG::Propagator::performNodeCSE):
530 2011-11-16 Michael Saboff <msaboff@apple.com>
532 Enable 8 Bit Strings in JavaScriptCore
533 https://bugs.webkit.org/show_bug.cgi?id=71337
535 This patch turns on 8 bit strings in StringImpl and enables
536 their use in JavaScriptCore. Some of the changes are to
537 turn on code that had been staged (Lexer.cpp, Identifier.cpp,
538 SmallStrings.cpp and some of StringImpl.{h,cpp}).
539 Other changes are minor fixes to make 8 bit strings work
540 (UString.h, StringImpl::getData16SlowCase()).
541 Changed StringBuffer to be a templated class based on character
542 type. This change rippled into WebCore code as well.
544 Reviewed by Geoffrey Garen.
546 * JavaScriptCore.exp:
548 (JSC::::append8): Changed to use 8 bit buffers.
549 (JSC::::parseIdentifier): Changed to use 8 bit buffers.
550 (JSC::::parseString): Changed to use 8 bit buffers.
551 * runtime/Identifier.cpp:
552 (JSC::IdentifierCStringTranslator::translate): 8 bit version keeps data 8 bit
553 (JSC::Identifier::toUInt32FromCharacters): Templated helper.
554 (JSC::Identifier::toUInt32): Added 8 bit optimized path.
555 * runtime/SmallStrings.cpp:
556 (JSC::SmallStringsStorage::SmallStringsStorage): Changed to be 8 bit strings
558 (JSC::UString::characters): Now calls StringImpl::characters()
560 * wtf/text/StringBuffer.h: Made StringBuffer a template base on character type.
561 (WTF::StringBuffer::StringBuffer):
562 (WTF::StringBuffer::characters):
563 (WTF::StringBuffer::release):
564 * wtf/text/StringImpl.cpp:
565 (WTF::StringImpl::create):
566 (WTF::StringImpl::getData16SlowCase): Fixed null terminated case.
567 (WTF::StringImpl::removeCharacters): Added 8 bit path.
568 (WTF::StringImpl::simplifyMatchedCharactersToSpace):
569 (WTF::StringImpl::simplifyWhiteSpace):
570 (WTF::equal): Removed bug from code copied from null terminated version.
571 (WTF::StringImpl::adopt): Added 8 bit path.
572 (WTF::StringImpl::createWithTerminatingNullCharacter): Fixed 8 bi flag propagation.
573 * wtf/text/StringImpl.h:
574 (WTF::StringImpl::StringImpl): Added new 8 bit constructor.
575 (WTF::StringImpl::characters8): Removed ASSERT_NOT_REACHED().
576 (WTF::getCharacters<LChar>): Added templated accessor for 8 bit strings.
577 (WTF::getCharacters<UChar>): Added templated accessor for 16 bit strings.
578 * wtf/text/WTFString.h:
579 (WTF::String::adopt): Changed to use StringBuffer template.
581 2011-11-16 Mark Hahnenberg <mhahnenberg@apple.com>
583 De-virtualize ExecutableBase::clearCodeVirtual
584 https://bugs.webkit.org/show_bug.cgi?id=72337
586 Reviewed by Darin Adler.
588 Added static finalize functions to the subclasses of ExecutableBase that provide an implementation
589 of clearCodeVirtual, changed all of the clearCodeVirtual methods to non-virtual clearCode method,
590 and had the finalize functions call the corresponding clearCode methods.
592 * runtime/Executable.cpp:
593 (JSC::ExecutableBase::clearCode):
594 (JSC::NativeExecutable::finalize):
595 (JSC::EvalExecutable::finalize):
596 (JSC::EvalExecutable::clearCode):
597 (JSC::ProgramExecutable::finalize):
598 (JSC::ProgramExecutable::clearCode):
599 (JSC::FunctionExecutable::discardCode):
600 (JSC::FunctionExecutable::finalize):
601 (JSC::FunctionExecutable::clearCode):
602 * runtime/Executable.h:
603 (JSC::ExecutableBase::finishCreation):
604 (JSC::NativeExecutable::create):
605 (JSC::EvalExecutable::create):
606 (JSC::ProgramExecutable::create):
607 (JSC::FunctionExecutable::create):
609 2011-11-16 Yusuke Suzuki <utatane.tea@gmail.com>
611 String new RegExp('\n').toString() returns is invalid RegularExpressionLiteral
612 https://bugs.webkit.org/show_bug.cgi?id=71572
614 Reviewed by Gavin Barraclough and Darin Adler.
616 * runtime/RegExpObject.cpp:
617 (JSC::regExpObjectSource):
619 2011-11-16 Darin Adler <darin@apple.com>
621 Specialize HashTraits for OwnPtr to use PassOwnPtr and raw pointer
622 https://bugs.webkit.org/show_bug.cgi?id=72475
624 Reviewed by Adam Roben.
626 * wtf/HashTraits.h: Specialize HashTraits for OwnPtr.
627 Do overloads so we can pass a nullptr and also be sure to get the
628 raw pointer type from the OwnPtr template so we handle both forms
629 of OwnPtr: OwnPtr<T> and OwnPtr<T*>.
631 2011-11-16 Simon Hausmann <simon.hausmann@nokia.com>
633 [Qt] Centralize hide_symbols and ensure all libs are built with symbol visibility & bsymbolic_functions
635 Reviewed by Tor Arne Vestbø.
637 * Target.pri: Eliminate duplicated symbol stuff that lives now in default_post.prf.
639 2011-11-16 Simon Hausmann <simon.hausmann@nokia.com>
641 Unreviewed, rolling out r100266.
642 http://trac.webkit.org/changeset/100266
648 2011-11-16 Darin Adler <darin@apple.com>
650 Add a "pass type" and "peek type" concept to HashTraits
651 https://bugs.webkit.org/show_bug.cgi?id=72473
653 Reviewed by Filip Pizlo.
655 * wtf/HashTraits.h: Added the pass type and peek type.
656 For OwnPtr, the pass type will be PassOwnPtr and the peek
657 type will be a raw pointer.
659 2011-11-16 Darin Adler <darin@apple.com>
661 Fix some hash traits that don't derive from the base hash traits
662 https://bugs.webkit.org/show_bug.cgi?id=72470
664 Reviewed by Filip Pizlo.
666 Hash traits structures need to derive from the base hash traits in
667 HashTraits.h, but some were not. This is needed for compatibility with
668 some additional traits we will be adding to make OwnPtr work with HashMap.
670 * runtime/Identifier.h: Make IdentifierMapIndexHashTraits derive from
671 HashTraits<int>. This enabled removal of all the members except for the
672 ones that control the empty value, because this is otherwise the same
673 as the standard int hash.
675 * runtime/SymbolTable.h: Changed SymbolTableIndexHashTraits to derive
676 from HashTraits<SymbolTableEntry> and removed redundant members.
678 2011-11-15 Sheriff Bot <webkit.review.bot@gmail.com>
680 Unreviewed, rolling out r100375 and r100385.
681 http://trac.webkit.org/changeset/100375
682 http://trac.webkit.org/changeset/100385
683 https://bugs.webkit.org/show_bug.cgi?id=72465
685 They broke 32 bit builds on Qt (Requested by ossy on #webkit).
687 * dfg/DFGOperations.cpp:
689 (JSC::DEFINE_STUB_FUNCTION):
690 * runtime/ArgList.cpp:
691 (JSC::ArgList::getSlice):
693 (JSC::ArgList::ArgList):
694 * runtime/JSArray.cpp:
696 * runtime/JSGlobalObject.h:
698 2011-11-15 George Staikos <staikos@webkit.org>
700 Remove the guard page from the addressable stack region on QNX.
701 https://bugs.webkit.org/show_bug.cgi?id=72455
703 Reviewed by Daniel Bates.
705 * wtf/StackBounds.cpp:
706 (WTF::StackBounds::initialize):
708 2011-11-15 Michael Saboff <msaboff@apple.com>
710 Towards 8 bit Strings - Update utf8() and ascii() methods for 8 bit strings
711 https://bugs.webkit.org/show_bug.cgi?id=72323
713 Added 8 bit optimized paths for String and UString ascii() and utf8() methods.
715 Added String::characters8(), characters16() and is8Bit() helper methods.
717 Added an new Unicode::convertLatin1ToUTF8() method that works on
718 LChar (8 bit) strings that is a stripped down version of convertUTF16ToUTF8().
720 Reviewed by Geoff Garen.
722 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
723 * runtime/UString.cpp:
724 (JSC::UString::utf8):
725 * wtf/text/WTFString.cpp:
726 (WTF::String::ascii):
728 * wtf/text/WTFString.h:
729 (WTF::String::characters8):
730 (WTF::String::characters16):
731 (WTF::String::is8Bit):
734 * wtf/unicode/UTF8.cpp:
735 (WTF::Unicode::convertLatin1ToUTF8):
736 * wtf/unicode/UTF8.h:
737 * wtf/unicode/Unicode.h:
739 2011-11-15 Darin Adler <darin@apple.com>
741 REGRESSION (r98887): ParserArena and Keywords leaking
742 https://bugs.webkit.org/show_bug.cgi?id=72428
744 Reviewed by Sam Weinig.
746 * parser/Lexer.h: Made Keywords destructor public since OwnPtr and PassOwnPtr
747 need to be able to destroy it.
750 (JSC::Parser::Parser): Use get now that parserArena is an OwnPtr.
752 * runtime/JSGlobalData.cpp:
753 (JSC::JSGlobalData::JSGlobalData): Use adoptPtr to initialize OwnPtr members.
755 * runtime/JSGlobalData.h: Make parserArena and keywords be OwnPtr.
757 2011-11-15 Geoffrey Garen <ggaren@apple.com>
759 Removed another use of ArgList that baked in the assumption that arguments
760 are forward in the regiter file.
762 Reviewed by Sam Weinig.
764 * dfg/DFGOperations.cpp:
766 (JSC::DEFINE_STUB_FUNCTION): Use our new array creation API, instead of
767 working through ArgList.
769 * runtime/ArgList.h: Removed!
771 2011-11-15 Geoffrey Garen <ggaren@apple.com>
773 Removed a use of ArgList that baked in the assumption that arguments
774 are forward in the regiter file.
776 Reviewed by Sam Weinig.
778 * dfg/DFGOperations.cpp:
780 (JSC::DEFINE_STUB_FUNCTION): Use new API.
782 * runtime/ArgList.cpp:
783 (JSC::ArgList::getSlice): No need to provide an arbitrary constructor --
784 getSlice can do the right thing by using its rights to private data.
786 * runtime/ArgList.h: Removed constructor that took a forward-contiguous
789 * runtime/JSArray.cpp:
790 (JSC::JSArray::finishCreation):
792 (JSC::JSArray::create):
793 * runtime/JSGlobalObject.h:
794 (JSC::constructArray): Added explicit support for creating an array from
795 a pre-allocated set of values, so we could stop relying on the ArgList
796 API we want to remove.
798 2011-11-15 Filip Pizlo <fpizlo@apple.com>
800 Crash in JSC::DFG::OSRExitCompiler::compileExit(JSC::DFG::OSRExit const&, JSC::DFG::SpeculationRecovery*)
801 https://bugs.webkit.org/show_bug.cgi?id=72292
803 Reviewed by Geoff Garen.
805 We need to be careful about how we look for the baseline CodeBlock if we're lazy-compiling
806 an OSR exit after our CodeBlock has been jettisoned. In short, use CodeBlock::baselineVersion()
807 instead of CodeBlock::alternative().
809 No performance effect.
811 No tests because all of our heuristics work very hard to make sure that this never happens in
812 the first place. OSR exits are rare by design, and jettisoning of CodeBlocks (i.e. recompilation)
813 is even rarer. Furthermore, OSR exits after a CodeBlock has been jettisoned is rarer still
814 because the whole point of jettisoning is to bring the probability of future OSR exits to as
815 close to zero as possible. But even that isn't enough to trigger this bug; it requires the OSR
816 exit after a jettison to be the first of its kind; our whole design tries to ensure that
817 CodeBlocks tend to OSR exit at a handful (i.e. 1 in most cases) of points, and since jettisoning
818 is triggered by OSR, in most sane cases the OSR exits after jettison will not require lazy OSR
819 compilation. So this is a truly evil case, and any test for it would be quite fragile.
821 * bytecode/CodeBlock.h:
822 (JSC::CodeBlock::specializationKind):
823 (JSC::CodeBlock::largeFailCountThreshold):
824 (JSC::CodeBlock::largeFailCountThresholdForLoop):
825 * dfg/DFGAssemblyHelpers.h:
826 (JSC::DFG::AssemblyHelpers::AssemblyHelpers):
827 (JSC::DFG::AssemblyHelpers::baselineCodeBlockFor):
828 (JSC::DFG::AssemblyHelpers::baselineCodeBlock):
831 * dfg/DFGOSRExitCompiler.cpp:
832 * dfg/DFGOSRExitCompiler64.cpp:
833 (JSC::DFG::OSRExitCompiler::compileExit):
835 2011-11-15 Geoffrey Garen <ggaren@apple.com>
837 Use MarkedArgumentBuffer to avoid making assumptions about argument order
838 https://bugs.webkit.org/show_bug.cgi?id=72418
840 Reviewed by Sam Weinig.
842 A step toward reversing the argument order.
844 * runtime/JSONObject.cpp:
845 (JSC::Stringifier::toJSON):
846 (JSC::Stringifier::appendStringifiedValue):
847 (JSC::Walker::callReviver): Don't assume that ArgList wants to point
848 at arguments in forward order. Instead, use MarkedArgumentBuffer, which
849 will make the decision for us.
851 2011-11-15 Filip Pizlo <fpizlo@apple.com>
853 DFG should distinguish between constants in the constant pool and weak
854 constants added as artifacts of code generation
855 https://bugs.webkit.org/show_bug.cgi?id=72367
857 Reviewed by Geoff Garen.
859 Added the notion of a WeakJSConstant, which is like a JSConstant except that
860 it can only refer to JSCell*. Currently all WeakJSConstants are also backed
861 by constants in the constant pool, since weak references originated from
862 machine code are not yet properly handled.
864 Replaced CheckMethod, and MethodCheckData, with a combination of WeakJSConstant
865 and CheckStructure. This results in improved CSE, leading to a 1% win on V8.
867 * dfg/DFGAbstractState.cpp:
868 (JSC::DFG::AbstractState::execute):
869 * dfg/DFGByteCodeParser.cpp:
870 (JSC::DFG::ByteCodeParser::cellConstant):
871 (JSC::DFG::ByteCodeParser::prepareToParseBlock):
872 (JSC::DFG::ByteCodeParser::parseBlock):
874 (JSC::DFG::Graph::dump):
876 (JSC::DFG::Graph::getJSConstantPrediction):
877 (JSC::DFG::Graph::valueOfJSConstant):
878 (JSC::DFG::Graph::valueOfInt32Constant):
879 (JSC::DFG::Graph::valueOfNumberConstant):
880 (JSC::DFG::Graph::valueOfBooleanConstant):
882 (JSC::DFG::Node::isWeakConstant):
883 (JSC::DFG::Node::hasConstant):
884 (JSC::DFG::Node::weakConstant):
885 (JSC::DFG::Node::valueOfJSConstant):
886 (JSC::DFG::Node::isInt32Constant):
887 (JSC::DFG::Node::isDoubleConstant):
888 (JSC::DFG::Node::isNumberConstant):
889 (JSC::DFG::Node::isBooleanConstant):
890 (JSC::DFG::Node::hasIdentifier):
891 * dfg/DFGPropagator.cpp:
892 (JSC::DFG::Propagator::propagateNodePredictions):
893 (JSC::DFG::Propagator::performNodeCSE):
894 * dfg/DFGSpeculativeJIT32_64.cpp:
895 (JSC::DFG::SpeculativeJIT::compile):
896 * dfg/DFGSpeculativeJIT64.cpp:
897 (JSC::DFG::SpeculativeJIT::compile):
899 2011-11-15 Michael Saboff <msaboff@apple.com>
901 Towards 8 bit Strings - Initial JS String Tuning
902 https://bugs.webkit.org/show_bug.cgi?id=72326
904 Added 8 bit optimized paths for the methods below.
906 Reviewed by Geoffrey Garen.
908 * runtime/JSString.h:
910 * runtime/StringPrototype.cpp:
911 (JSC::jsSpliceSubstrings):
912 (JSC::jsSpliceSubstringsWithSeparators):
913 (JSC::stringProtoFuncReplace):
914 (JSC::stringProtoFuncCharCodeAt):
916 2011-11-15 Gavin Barraclough <barraclough@apple.com>
918 Result of Error.prototype.toString not ES5 conformant
919 https://bugs.webkit.org/show_bug.cgi?id=70889
921 Reviewed by Oliver Hunt.
923 * runtime/ErrorPrototype.cpp:
924 (JSC::errorProtoFuncToString):
926 2011-11-15 Simon Hausmann <simon.hausmann@nokia.com>
928 [Qt] Centralize hide_symbols and ensure all libs are built with symbol visibility & bsymbolic_functions
930 Reviewed by Tor Arne Vestbø.
932 * Target.pri: Eliminate duplicated symbol stuff that lives now in default_post.prf.
934 2011-11-15 Yuqiang Xian <yuqiang.xian@intel.com>
936 Remove DFGJITCompilerInlineMethods
937 https://bugs.webkit.org/show_bug.cgi?id=72366
939 Reviewed by Filip Pizlo.
941 Those methods are actually seldom used. Modify the few such places and
942 remove DFGJITCompilerInlineMethods stuffs totally.
944 * GNUmakefile.list.am:
945 * JavaScriptCore.xcodeproj/project.pbxproj:
946 * dfg/DFGJITCompiler.h:
947 (JSC::DFG::JITCompiler::addressOfDoubleConstant):
948 * dfg/DFGJITCompilerInlineMethods.h: Removed.
949 * dfg/DFGSpeculativeJIT.cpp:
950 * dfg/DFGSpeculativeJIT.h:
951 (JSC::DFG::SpeculativeJIT::silentFillFPR):
952 * dfg/DFGSpeculativeJIT32_64.cpp:
953 (JSC::DFG::SpeculativeJIT::fillJSValue):
954 (JSC::DFG::SpeculativeJIT::cachedGetMethod):
956 2011-11-14 Filip Pizlo <fpizlo@apple.com>
958 DFG::SpeculativeJIT and DFG::JITCodeGenerator should be combined
959 https://bugs.webkit.org/show_bug.cgi?id=72348
961 Reviewed by Gavin Barraclough.
963 Moved all of JITCodeGenerator into SpeculativeJIT.
966 * GNUmakefile.list.am:
967 * JavaScriptCore.xcodeproj/project.pbxproj:
969 * dfg/DFGJITCodeGenerator.cpp: Removed.
970 * dfg/DFGJITCodeGenerator.h: Removed.
971 * dfg/DFGJITCodeGenerator32_64.cpp: Removed.
972 * dfg/DFGJITCodeGenerator64.cpp: Removed.
973 * dfg/DFGJITCompiler.cpp:
974 * dfg/DFGRepatch.cpp:
975 (JSC::DFG::generateProtoChainAccessStub):
976 (JSC::DFG::tryCacheGetByID):
977 (JSC::DFG::tryCachePutByID):
978 * dfg/DFGSpeculativeJIT.cpp:
979 (JSC::DFG::SpeculativeJIT::clearGenerationInfo):
980 (JSC::DFG::SpeculativeJIT::fillStorage):
981 (JSC::DFG::SpeculativeJIT::useChildren):
982 (JSC::DFG::SpeculativeJIT::isStrictInt32):
983 (JSC::DFG::SpeculativeJIT::isKnownInteger):
984 (JSC::DFG::SpeculativeJIT::isKnownNumeric):
985 (JSC::DFG::SpeculativeJIT::isKnownCell):
986 (JSC::DFG::SpeculativeJIT::isKnownNotCell):
987 (JSC::DFG::SpeculativeJIT::isKnownNotInteger):
988 (JSC::DFG::SpeculativeJIT::isKnownNotNumber):
989 (JSC::DFG::SpeculativeJIT::isKnownBoolean):
990 (JSC::DFG::SpeculativeJIT::writeBarrier):
991 (JSC::DFG::SpeculativeJIT::markCellCard):
992 (JSC::DFG::SpeculativeJIT::nonSpeculativeCompare):
993 (JSC::DFG::SpeculativeJIT::nonSpeculativeStrictEq):
994 (JSC::DFG::dataFormatString):
995 (JSC::DFG::SpeculativeJIT::dump):
996 (JSC::DFG::SpeculativeJIT::checkConsistency):
997 (JSC::DFG::GPRTemporary::GPRTemporary):
998 (JSC::DFG::GPRTemporary::adopt):
999 (JSC::DFG::FPRTemporary::FPRTemporary):
1000 * dfg/DFGSpeculativeJIT.h:
1001 (JSC::DFG::SpeculativeJIT::at):
1002 (JSC::DFG::SpeculativeJIT::lock):
1003 (JSC::DFG::SpeculativeJIT::unlock):
1004 (JSC::DFG::SpeculativeJIT::canReuse):
1005 (JSC::DFG::SpeculativeJIT::reuse):
1006 (JSC::DFG::SpeculativeJIT::allocate):
1007 (JSC::DFG::SpeculativeJIT::tryAllocate):
1008 (JSC::DFG::SpeculativeJIT::fprAllocate):
1009 (JSC::DFG::SpeculativeJIT::isFilled):
1010 (JSC::DFG::SpeculativeJIT::isFilledDouble):
1011 (JSC::DFG::SpeculativeJIT::use):
1012 (JSC::DFG::SpeculativeJIT::selectScratchGPR):
1013 (JSC::DFG::SpeculativeJIT::silentSpillGPR):
1014 (JSC::DFG::SpeculativeJIT::silentSpillFPR):
1015 (JSC::DFG::SpeculativeJIT::silentFillGPR):
1016 (JSC::DFG::SpeculativeJIT::silentFillFPR):
1017 (JSC::DFG::SpeculativeJIT::silentSpillAllRegisters):
1018 (JSC::DFG::SpeculativeJIT::silentFillAllRegisters):
1019 (JSC::DFG::SpeculativeJIT::boxDouble):
1020 (JSC::DFG::SpeculativeJIT::unboxDouble):
1021 (JSC::DFG::SpeculativeJIT::spill):
1022 (JSC::DFG::SpeculativeJIT::isConstant):
1023 (JSC::DFG::SpeculativeJIT::isJSConstant):
1024 (JSC::DFG::SpeculativeJIT::isInt32Constant):
1025 (JSC::DFG::SpeculativeJIT::isDoubleConstant):
1026 (JSC::DFG::SpeculativeJIT::isNumberConstant):
1027 (JSC::DFG::SpeculativeJIT::isBooleanConstant):
1028 (JSC::DFG::SpeculativeJIT::isFunctionConstant):
1029 (JSC::DFG::SpeculativeJIT::valueOfInt32Constant):
1030 (JSC::DFG::SpeculativeJIT::valueOfNumberConstant):
1031 (JSC::DFG::SpeculativeJIT::addressOfDoubleConstant):
1032 (JSC::DFG::SpeculativeJIT::valueOfJSConstant):
1033 (JSC::DFG::SpeculativeJIT::valueOfBooleanConstant):
1034 (JSC::DFG::SpeculativeJIT::valueOfFunctionConstant):
1035 (JSC::DFG::SpeculativeJIT::isNullConstant):
1036 (JSC::DFG::SpeculativeJIT::identifier):
1037 (JSC::DFG::SpeculativeJIT::flushRegisters):
1038 (JSC::DFG::SpeculativeJIT::isFlushed):
1039 (JSC::DFG::SpeculativeJIT::valueOfJSConstantAsImmPtr):
1040 (JSC::DFG::SpeculativeJIT::bitOp):
1041 (JSC::DFG::SpeculativeJIT::shiftOp):
1042 (JSC::DFG::SpeculativeJIT::detectPeepHoleBranch):
1043 (JSC::DFG::SpeculativeJIT::addressOfCallData):
1044 (JSC::DFG::SpeculativeJIT::tagOfCallData):
1045 (JSC::DFG::SpeculativeJIT::payloadOfCallData):
1046 (JSC::DFG::SpeculativeJIT::integerResult):
1047 (JSC::DFG::SpeculativeJIT::noResult):
1048 (JSC::DFG::SpeculativeJIT::cellResult):
1049 (JSC::DFG::SpeculativeJIT::booleanResult):
1050 (JSC::DFG::SpeculativeJIT::jsValueResult):
1051 (JSC::DFG::SpeculativeJIT::storageResult):
1052 (JSC::DFG::SpeculativeJIT::doubleResult):
1053 (JSC::DFG::SpeculativeJIT::initConstantInfo):
1054 (JSC::DFG::SpeculativeJIT::resetCallArguments):
1055 (JSC::DFG::SpeculativeJIT::addCallArgument):
1056 (JSC::DFG::SpeculativeJIT::setupArguments):
1057 (JSC::DFG::SpeculativeJIT::setupArgumentsExecState):
1058 (JSC::DFG::SpeculativeJIT::setupArgumentsWithExecState):
1059 (JSC::DFG::SpeculativeJIT::setupTwoStubArgs):
1060 (JSC::DFG::SpeculativeJIT::setupStubArguments):
1061 (JSC::DFG::SpeculativeJIT::callOperation):
1062 (JSC::DFG::SpeculativeJIT::appendCallWithExceptionCheck):
1063 (JSC::DFG::SpeculativeJIT::appendCallWithExceptionCheckSetResult):
1064 (JSC::DFG::SpeculativeJIT::setupResults):
1065 (JSC::DFG::SpeculativeJIT::appendCallSetResult):
1066 (JSC::DFG::SpeculativeJIT::addBranch):
1067 (JSC::DFG::SpeculativeJIT::linkBranches):
1068 (JSC::DFG::SpeculativeJIT::block):
1069 (JSC::DFG::SpeculativeJIT::checkConsistency):
1070 (JSC::DFG::SpeculativeJIT::BranchRecord::BranchRecord):
1071 (JSC::DFG::IntegerOperand::IntegerOperand):
1072 (JSC::DFG::IntegerOperand::~IntegerOperand):
1073 (JSC::DFG::IntegerOperand::index):
1074 (JSC::DFG::IntegerOperand::format):
1075 (JSC::DFG::IntegerOperand::gpr):
1076 (JSC::DFG::IntegerOperand::use):
1077 (JSC::DFG::DoubleOperand::DoubleOperand):
1078 (JSC::DFG::DoubleOperand::~DoubleOperand):
1079 (JSC::DFG::DoubleOperand::index):
1080 (JSC::DFG::DoubleOperand::fpr):
1081 (JSC::DFG::DoubleOperand::use):
1082 (JSC::DFG::JSValueOperand::JSValueOperand):
1083 (JSC::DFG::JSValueOperand::~JSValueOperand):
1084 (JSC::DFG::JSValueOperand::index):
1085 (JSC::DFG::JSValueOperand::gpr):
1086 (JSC::DFG::JSValueOperand::jsValueRegs):
1087 (JSC::DFG::JSValueOperand::isDouble):
1088 (JSC::DFG::JSValueOperand::fill):
1089 (JSC::DFG::JSValueOperand::tagGPR):
1090 (JSC::DFG::JSValueOperand::payloadGPR):
1091 (JSC::DFG::JSValueOperand::fpr):
1092 (JSC::DFG::JSValueOperand::use):
1093 (JSC::DFG::StorageOperand::StorageOperand):
1094 (JSC::DFG::StorageOperand::~StorageOperand):
1095 (JSC::DFG::StorageOperand::index):
1096 (JSC::DFG::StorageOperand::gpr):
1097 (JSC::DFG::StorageOperand::use):
1098 (JSC::DFG::GPRTemporary::~GPRTemporary):
1099 (JSC::DFG::GPRTemporary::gpr):
1100 (JSC::DFG::FPRTemporary::~FPRTemporary):
1101 (JSC::DFG::FPRTemporary::fpr):
1102 (JSC::DFG::FPRTemporary::FPRTemporary):
1103 (JSC::DFG::GPRResult::GPRResult):
1104 (JSC::DFG::GPRResult2::GPRResult2):
1105 (JSC::DFG::FPRResult::FPRResult):
1106 (JSC::DFG::FPRResult::lockedResult):
1107 (JSC::DFG::SpeculativeJIT::SpeculativeJIT):
1108 * dfg/DFGSpeculativeJIT32_64.cpp:
1109 (JSC::DFG::SpeculativeJIT::fillInteger):
1110 (JSC::DFG::SpeculativeJIT::fillDouble):
1111 (JSC::DFG::SpeculativeJIT::fillJSValue):
1112 (JSC::DFG::SpeculativeJIT::nonSpeculativeValueToNumber):
1113 (JSC::DFG::SpeculativeJIT::nonSpeculativeValueToInt32):
1114 (JSC::DFG::SpeculativeJIT::nonSpeculativeUInt32ToNumber):
1115 (JSC::DFG::SpeculativeJIT::nonSpeculativeKnownConstantArithOp):
1116 (JSC::DFG::SpeculativeJIT::nonSpeculativeBasicArithOp):
1117 (JSC::DFG::SpeculativeJIT::cachedGetById):
1118 (JSC::DFG::SpeculativeJIT::cachedPutById):
1119 (JSC::DFG::SpeculativeJIT::cachedGetMethod):
1120 (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
1121 (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
1122 (JSC::DFG::SpeculativeJIT::nonSpeculativeCompareNull):
1123 (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranch):
1124 (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompare):
1125 (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeStrictEq):
1126 (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeStrictEq):
1127 (JSC::DFG::SpeculativeJIT::emitCall):
1128 * dfg/DFGSpeculativeJIT64.cpp:
1129 (JSC::DFG::SpeculativeJIT::fillInteger):
1130 (JSC::DFG::SpeculativeJIT::fillDouble):
1131 (JSC::DFG::SpeculativeJIT::fillJSValue):
1132 (JSC::DFG::SpeculativeJIT::nonSpeculativeValueToNumber):
1133 (JSC::DFG::SpeculativeJIT::nonSpeculativeValueToInt32):
1134 (JSC::DFG::SpeculativeJIT::nonSpeculativeUInt32ToNumber):
1135 (JSC::DFG::SpeculativeJIT::nonSpeculativeKnownConstantArithOp):
1136 (JSC::DFG::SpeculativeJIT::nonSpeculativeBasicArithOp):
1137 (JSC::DFG::SpeculativeJIT::cachedGetById):
1138 (JSC::DFG::SpeculativeJIT::cachedPutById):
1139 (JSC::DFG::SpeculativeJIT::cachedGetMethod):
1140 (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
1141 (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
1142 (JSC::DFG::SpeculativeJIT::nonSpeculativeCompareNull):
1143 (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranch):
1144 (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompare):
1145 (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeStrictEq):
1146 (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeStrictEq):
1147 (JSC::DFG::SpeculativeJIT::emitCall):
1148 * runtime/JSFunction.h:
1150 2011-11-14 Filip Pizlo <fpizlo@apple.com>
1152 Weak reference harvesters should run to fixpoint
1153 https://bugs.webkit.org/show_bug.cgi?id=72346
1155 Reviewed by Oliver Hunt.
1158 (JSC::Heap::markRoots):
1159 * heap/ListableHandler.h:
1160 (JSC::ListableHandler::next):
1161 (JSC::ListableHandler::List::head):
1162 (JSC::ListableHandler::List::removeNext):
1163 (JSC::ListableHandler::List::removeAll):
1164 * heap/MarkStack.cpp:
1165 (JSC::MarkStackThreadSharedData::reset):
1166 (JSC::SlotVisitor::harvestWeakReferences):
1168 (JSC::MarkStack::isEmpty):
1170 2011-11-14 Oliver Hunt <oliver@apple.com>
1172 Start migrating typed array impl types to WTF
1173 https://bugs.webkit.org/show_bug.cgi?id=72336
1175 Reviewed by Geoffrey Garen.
1177 Add typed array impls to WTF forwarding header.
1181 2011-11-14 Julien Chaffraix <jchaffraix@webkit.org>
1183 Add --css-grid-layout to build-webkit and the build systems
1184 https://bugs.webkit.org/show_bug.cgi?id=72320
1186 Reviewed by Ojan Vafai.
1188 * Configurations/FeatureDefines.xcconfig:
1190 2011-11-14 Geoffrey Garen <ggaren@apple.com>
1192 A little bit of arguments / activation cleanup
1193 https://bugs.webkit.org/show_bug.cgi?id=72339
1195 Reviewed by Gavin Barraclough.
1197 Renamed copyRegisters => tearOff to match bytecode and other terminology.
1199 Renamed setActivation => didTearOffActivation to indicate that this is a
1200 notification the object may choose to ignore. Moved "Should I ignore?"
1201 code into the arguments object to avoid duplication elsewhere.
1203 * interpreter/Interpreter.cpp:
1204 (JSC::Interpreter::unwindCallFrame):
1205 (JSC::Interpreter::privateExecute):
1206 (JSC::Interpreter::retrieveArguments):
1208 (JSC::DEFINE_STUB_FUNCTION):
1209 * runtime/Arguments.h:
1210 (JSC::Arguments::createAndTearOff):
1211 (JSC::Arguments::didTearOffActivation):
1212 (JSC::Arguments::finishCreationButDontTearOff):
1213 (JSC::Arguments::finishCreation):
1214 (JSC::Arguments::finishCreationAndTearOff):
1215 (JSC::Arguments::tearOff):
1217 * runtime/JSActivation.h:
1218 (JSC::JSActivation::tearOff): Moved Activation's code into its own header
1219 because that's where it belongs.
1221 2011-11-14 Gavin Barraclough <barraclough@apple.com>
1223 Should sign the jsc binary
1224 https://bugs.webkit.org/show_bug.cgi?id=72332
1226 Reviewed by David Kilzer.
1228 * Configurations/JSC.xcconfig:
1229 * entitlements.plist: Added.
1231 2011-11-14 Filip Pizlo <fpizlo@apple.com>
1233 DFG's inline references to objects should be tracked
1234 https://bugs.webkit.org/show_bug.cgi?id=72313
1236 Reviewed by Gavin Barraclough.
1238 Added a pinCell() method in the parser that currently creates a
1239 dummy constant in CodeBlock. Added calls to pinCell() wherever the
1240 DFG would inline a constant reference that the original code would
1241 not have referred to.
1243 * dfg/DFGByteCodeParser.cpp:
1244 (JSC::DFG::ByteCodeParser::getCellConstantIndex):
1245 (JSC::DFG::ByteCodeParser::pinCell):
1246 (JSC::DFG::ByteCodeParser::cellConstant):
1247 (JSC::DFG::ByteCodeParser::handleCall):
1248 (JSC::DFG::ByteCodeParser::handleInlining):
1249 (JSC::DFG::ByteCodeParser::parseBlock):
1251 2011-11-14 Filip Pizlo <fpizlo@apple.com>
1253 DFG put_by_id transition optimizations test the wrong structures
1254 https://bugs.webkit.org/show_bug.cgi?id=72324
1256 Reviewed by Gavin Barraclough.
1258 * dfg/DFGByteCodeParser.cpp:
1259 (JSC::DFG::ByteCodeParser::structureChainIsStillValid):
1260 (JSC::DFG::ByteCodeParser::parseBlock):
1261 * jit/JITPropertyAccess.cpp:
1262 (JSC::JIT::privateCompilePutByIdTransition):
1264 2011-11-14 Michael Saboff <msaboff@apple.com>
1266 Further changes and cleanup to JSString.h and cpp.
1268 Reviewed by Darin Adler.
1270 * runtime/JSString.cpp:
1271 (JSC::JSString::resolveRope): Change PassRefPtr to RefPtr. Eliminated exec in slow case calls.
1272 (JSC::JSString::resolveRopeSlowCase8): Darin and I agreed that this should have 8 in name.
1273 (JSC::JSString::resolveRopeSlowCase): Removed exec parameter.
1274 * runtime/JSString.h:
1276 2011-11-14 Adam Barth <abarth@webkit.org>
1278 DateMath.cpp should not depend on JavaScriptCore
1279 https://bugs.webkit.org/show_bug.cgi?id=71747
1281 Reviewed by Darin Adler.
1283 This patch moves the JSC-specific parts of DateMath into JSDateMath in
1284 JavaScriptCore. There shouldn't be any behavior change.
1287 * GNUmakefile.list.am:
1288 * JavaScriptCore.gypi:
1289 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1290 * JavaScriptCore.xcodeproj/project.pbxproj:
1292 * runtime/DateConstructor.cpp:
1293 * runtime/DateConversion.cpp:
1294 * runtime/DateInstance.cpp:
1295 * runtime/DateInstanceCache.h:
1296 * runtime/DatePrototype.cpp:
1297 * runtime/InitializeThreading.cpp:
1298 * runtime/JSDateMath.cpp: Copied from Source/JavaScriptCore/wtf/DateMath.cpp.
1301 * runtime/JSDateMath.h: Copied from Source/JavaScriptCore/wtf/DateMath.h.
1307 (WTF::parseDateFromNullTerminatedCharacters):
1308 (WTF::makeRFC2822DateString):
1311 2011-11-14 Michael Saboff <msaboff@apple.com>
1313 Towards 8 bit strings - Add 8 bit handling to JSString Ropes
1314 https://bugs.webkit.org/show_bug.cgi?id=72317
1316 Added bit to track that a rope is made up of all 8 bit fibers.
1317 Created an 8 bit path (fast and slow cases) to handle 8 bit
1320 Reviewed by Oliver Hunt.
1322 * runtime/JSString.cpp:
1323 (JSC::JSString::resolveRope):
1324 (JSC::JSString::resolveRopeSlowCase8):
1325 (JSC::JSString::resolveRopeSlowCase16):
1326 * runtime/JSString.h:
1327 (JSC::RopeBuilder::finishCreation):
1328 (JSC::RopeBuilder::is8Bit):
1329 (JSC::jsSubstring8):
1331 2011-11-14 Geoffrey Garen <ggaren@apple.com>
1333 A little bit of function call cleanup
1334 https://bugs.webkit.org/show_bug.cgi?id=72314
1336 Reviewed by Oliver Hunt.
1338 * bytecompiler/BytecodeGenerator.cpp:
1339 (JSC::BytecodeGenerator::emitCall): Renamed callFrame to registerOffset
1340 because this value doesn't give you the offset of the callee's call frame.
1342 (JSC::BytecodeGenerator::emitReturn): Tightened to use equality instead
1343 of greater-than. Removed comment since its reasoning was wrong.
1345 (JSC::BytecodeGenerator::emitConstruct): Updated for rename mentioned above.
1347 (JSC::BytecodeGenerator::isArgumentNumber): Provided a more precise way
1348 to ask this question, giving the bytecode generator more freedom to change
1349 internal implementation details.
1351 * bytecompiler/BytecodeGenerator.h: Reduced default vector capacity because
1353 (JSC::CallArguments::registerOffset): Updated for rename mentioned above.
1355 * bytecompiler/NodesCodegen.cpp:
1356 (JSC::CallArguments::CallArguments):
1357 (JSC::CallArguments::newArgument): Factored out argument allocation into
1358 a helper function, so I can change it later.
1360 (JSC::CallFunctionCallDotNode::emitBytecode):
1361 (JSC::FunctionBodyNode::emitBytecode): Use helper function mentioned above.
1363 2011-11-14 Tony Chang <tony@chromium.org>
1365 Remove the CSS3_FLEXBOX compile time flag and enable on all ports
1366 https://bugs.webkit.org/show_bug.cgi?id=72196
1368 Reviewed by Ojan Vafai.
1370 * Configurations/FeatureDefines.xcconfig:
1372 2011-11-14 Mark Rowe <mrowe@apple.com>
1374 <rdar://problem/10424154> testRegExp should not be installed as part of JavaScriptCore
1376 testRegExp and testapi.js were being installed in the JavaScriptCore framework.
1377 As test-only tools they shouldn't be installed there by default, only when
1378 FORCE_TOOL_INSTALL is set to YES.
1380 This patch incorprorates a few related changes:
1381 1) Make the jsc and testRegExp targets be configured via .xcconfig files.
1382 2) Sets up testRegExp so that SKIP_INSTALL is YES by default, and only NO when
1383 FORCE_TOOL_INSTALL is YES.
1384 3) Switches the testapi target to using a script build phase to install testapi.js
1385 so that the installation will be skipped when SKIP_INSTALL is YES. I'm not sure
1386 why this isn't the built-in behavior when a Copy Files build phase has "Copy only
1387 when installing" checked, but it doesn't seem to be.
1388 4) Other random cleanup such as removing a bogus group that refers to files that do
1389 not exist, moving testRegExp.cpp in to the tests group, etc.
1391 Reviewed by Geoff Garen.
1393 * Configurations/JSC.xcconfig: Added.
1394 * Configurations/TestRegExp.xcconfig: Added.
1395 * JavaScriptCore.xcodeproj/project.pbxproj:
1397 2011-11-14 Michael Saboff <msaboff@apple.com>
1399 Towards 8 bit strings - Add 8 bit paths to StringImpl methods
1400 https://bugs.webkit.org/show_bug.cgi?id=72290
1402 Added 8 bit patchs to StringImpl to number and find methods.
1404 Reviewed by Oliver Hunt.
1406 * wtf/text/StringImpl.cpp:
1407 (WTF::StringImpl::toIntStrict):
1408 (WTF::StringImpl::toUIntStrict):
1409 (WTF::StringImpl::toInt64Strict):
1410 (WTF::StringImpl::toUInt64Strict):
1411 (WTF::StringImpl::toIntPtrStrict):
1412 (WTF::StringImpl::toInt):
1413 (WTF::StringImpl::toUInt):
1414 (WTF::StringImpl::toInt64):
1415 (WTF::StringImpl::toUInt64):
1416 (WTF::StringImpl::toIntPtr):
1417 (WTF::StringImpl::toDouble):
1418 (WTF::StringImpl::toFloat):
1419 (WTF::StringImpl::find):
1420 (WTF::StringImpl::reverseFind):
1421 * wtf/text/WTFString.cpp:
1422 (WTF::toIntegralType):
1423 (WTF::lengthOfCharactersAsInteger):
1424 (WTF::charactersToIntStrict):
1425 (WTF::charactersToUIntStrict):
1426 (WTF::charactersToInt64Strict):
1427 (WTF::charactersToUInt64Strict):
1428 (WTF::charactersToIntPtrStrict):
1429 (WTF::charactersToInt):
1430 (WTF::charactersToUInt):
1431 (WTF::charactersToInt64):
1432 (WTF::charactersToUInt64):
1433 (WTF::charactersToIntPtr):
1434 (WTF::toDoubleType):
1435 (WTF::charactersToDouble):
1436 (WTF::charactersToFloat):
1437 * wtf/text/WTFString.h:
1441 2011-11-14 Vincent Scheib <scheib@chromium.org>
1443 Mouse Lock: Renaming to 'Pointer Lock': ENABLE Flags
1444 https://bugs.webkit.org/show_bug.cgi?id=72286
1446 Reviewed by Adam Barth.
1450 2011-11-14 Gavin Barraclough <barraclough@apple.com>
1452 https://bugs.webkit.org/show_bug.cgi?id=72280
1454 Rubber stamped by Geoff Garen.
1458 * JavaScriptCore.xcodeproj/project.pbxproj:
1459 * wtf/OSAllocatorPosix.cpp:
1460 (WTF::OSAllocator::reserveAndCommit):
1462 2011-11-14 Geoffrey Garen <ggaren@apple.com>
1464 32-bit Build fix: declare virtual register indices to be int rather than
1465 unsigned, since they can be positive or negative.
1467 For better clarity, explicitly use ReturnPC instead of -1 as the "invalid"
1468 state, since we'll never load and operate on the ReturnPC as a JS value.
1473 * jit/JITInlineMethods.h:
1474 (JSC::JIT::emitLoadTag):
1475 (JSC::JIT::emitLoadPayload):
1476 (JSC::JIT::emitLoad):
1477 (JSC::JIT::emitLoad2):
1478 (JSC::JIT::emitLoadDouble):
1479 (JSC::JIT::emitLoadInt32ToDouble):
1480 (JSC::JIT::emitStore):
1481 (JSC::JIT::emitStoreInt32):
1482 (JSC::JIT::emitStoreAndMapInt32):
1483 (JSC::JIT::emitStoreCell):
1484 (JSC::JIT::emitStoreBool):
1485 (JSC::JIT::emitStoreDouble):
1488 (JSC::JIT::isMapped):
1489 (JSC::JIT::getMappedPayload):
1490 (JSC::JIT::getMappedTag):
1491 (JSC::JIT::emitJumpSlowCaseIfNotJSCell):
1493 2011-11-14 Michael Saboff <msaboff@apple.com>
1495 Remove unused m_data member from UStringSourceProvider
1496 https://bugs.webkit.org/show_bug.cgi?id=72289
1498 Removed unused m_data member from UStringSourceProvider.
1500 Reviewed by Oliver Hunt.
1502 * parser/SourceProvider.h:
1503 (JSC::UStringSourceProvider::UStringSourceProvider):
1505 2011-11-14 Michael Saboff <msaboff@apple.com>
1507 Towards 8 Bit Strings: Templatize YARR Parser
1508 https://bugs.webkit.org/show_bug.cgi?id=72288
1510 Changed Yarr::Parser to be a template based on character type.
1512 Reviewed by Oliver Hunt.
1514 * yarr/YarrParser.h:
1515 (JSC::Yarr::Parser::Parser):
1518 2011-11-14 Geoffrey Garen <ggaren@apple.com>
1520 32-bit build fix: Removed unused declaration.
1522 * dfg/DFGJITCodeGenerator32_64.cpp:
1523 (JSC::DFG::JITCodeGenerator::emitCall):
1525 2011-11-12 Geoffrey Garen <ggaren@apple.com>
1527 Standardized the JS calling convention
1528 https://bugs.webkit.org/show_bug.cgi?id=72221
1530 Reviewed by Oliver Hunt.
1532 This patch standardizes the calling convention so that the caller always
1533 sets up the callee's CallFrame. Adjustments for call type, callee type,
1534 argument count, etc. now always take place after that initial setup.
1536 This is a step toward reversing the argument order, but also has these
1537 immediate benefits (measured on x64):
1539 (1) 1% benchmark speedup across the board.
1541 (2) 50% code size reduction in baseline JIT function calls.
1543 (3) 1.5x speedup for single-dispatch .apply forwarding.
1545 (4) 1.1x speedup for multi-dispatch .apply forwarding.
1547 This change affected the baseline JIT most, since the baseline JIT had
1548 lots of ad hoc calling conventions for different caller / callee types.
1550 * assembler/MacroAssemblerX86_64.h:
1551 (JSC::MacroAssemblerX86_64::branchPtr):
1552 (JSC::MacroAssemblerX86_64::branchAddPtr): Optimize compare to 0 into
1553 a test, like other assemblers do. (I added some compares to 0, and didn't
1554 want them to be slow.)
1556 * bytecode/CodeBlock.cpp:
1557 (JSC::CodeBlock::dump): Merged op_load_varargs into op_call_varargs so
1558 op_call_varargs could share code generation with other forms of op_call.
1559 This is also a small optimization, since op_*varargs no longer have to
1560 pass arguments to each other through the register file.
1562 (JSC::CallLinkInfo::unlink):
1563 * bytecode/CodeBlock.h: Added a new call type: CallVarargs. This allows
1564 us to link functions called through .apply syntax. We need to distinguish
1565 CallVarargs from Call because CallVarargs changes its argument count
1566 on each inovcation, so we must always link to the argument count checking
1567 version of the callee.
1569 * bytecode/Opcode.h:
1570 * bytecompiler/BytecodeGenerator.cpp:
1571 (JSC::BytecodeGenerator::emitCallVarargs):
1572 * bytecompiler/BytecodeGenerator.h: Merged op_load_varargs into op_call_varargs.
1574 * bytecompiler/NodesCodegen.cpp:
1575 (JSC::ApplyFunctionCallDotNode::emitBytecode): Ditto. Also, simplified
1576 some of this bytecode generation to remove redundant copies.
1578 * dfg/DFGJITCodeGenerator32_64.cpp:
1579 (JSC::DFG::JITCodeGenerator::emitCall):
1580 * dfg/DFGJITCodeGenerator64.cpp:
1581 (JSC::DFG::JITCodeGenerator::emitCall): Added a new call type: CallVarargs.
1582 DFG doesn't support this type, but its code needs to change slightly
1583 to accomodate a 3-state variable.
1585 Stopped passing the argument count in regT1 because this is non-standard.
1586 (The argument count goes in the CallFrame. This trades speed on the slow
1587 path for speed and code size on the fast path, and simplicity on all paths.
1588 A good trade, in my opinion.)
1590 * dfg/DFGJITCompiler.cpp:
1591 (JSC::DFG::JITCompiler::compileEntry):
1592 (JSC::DFG::JITCompiler::link):
1593 (JSC::DFG::JITCompiler::compile):
1594 (JSC::DFG::JITCompiler::compileFunction): Tweaked code to make CallFrame
1595 setup more obvious when single-stepping. Also, updated for argument count
1598 * dfg/DFGJITCompiler.h:
1599 (JSC::DFG::JITCompiler::addJSCall):
1600 (JSC::DFG::JITCompiler::JSCallRecord::JSCallRecord): Added a new call
1603 * dfg/DFGOperations.cpp: Do finish CallFrame setup in one place before
1604 doing anything else. Don't check for stack overflow because we have no callee
1605 registers, and our caller has already checked for its own registers.
1607 * dfg/DFGRepatch.cpp:
1608 (JSC::DFG::dfgLinkFor): We can link to our callee even if our argument
1609 count doesn't match -- we just need to link to the argument count checking
1612 * interpreter/CallFrameClosure.h:
1613 (JSC::CallFrameClosure::setArgument): BUG FIX: When supplying too many
1614 arguments from C++, we need to supply a full copy of the arguments prior
1615 to the subset copy that matches our callee's argument count. (That is what
1616 the standard calling convention would have produced in JS.) I would have
1617 split this into its own patch, but I couldn't find a way to get the JIT
1618 to fail a regression test in this area without my patch applied.
1620 * interpreter/Interpreter.cpp: Let the true code bomb begin!
1622 (JSC::eval): Fixed up this helper function to operate on eval()'s CallFrame,
1623 and not eval()'s caller frame. We no longer leave the CallFrame pointing
1624 to eval()'s caller during a call to eval(), since that is not standard.
1626 (JSC::loadVarargs): Factored out a shared helper function for use by JIT
1627 and interpreter because half the code means one quarter the bugs -- in my
1628 programming, at least.
1630 (JSC::Interpreter::execute): Removed a now-unused way to invoke eval.
1632 (JSC::Interpreter::privateExecute): Removed an invalid ASSERT following
1633 putDirect, because it got in the way of my testing. (When putting a
1634 function, the cached base of a PutPropertySlot can be 0 to signify "do
1637 op_call_eval: Updated for new, standard eval calling convention.
1639 op_load_varargs: Merged op_load_varargs into op_call_varargs.
1641 op_call_varags: Updated for new, standard eval calling convention. Don't
1642 check for stack overflow because the loadVarargs helper function already
1645 * interpreter/Interpreter.h:
1646 (JSC::Interpreter::execute): Headers are fun and educational!
1648 * interpreter/RegisterFile.cpp:
1649 (JSC::RegisterFile::growSlowCase):
1650 * interpreter/RegisterFile.h:
1651 (JSC::RegisterFile::grow): Factored out the slow case into a slow
1652 case because it was cramping the style of my fast case.
1655 (JSC::JIT::privateCompile): Moved initialization of
1656 RegisterFile::CodeBlock to make it more obvious when debugging. Removed
1657 assumption that argument count is in regT1, as above. Removed call to
1658 restoreArgumentReference() because the JITStubCall abstraction does this for us.
1660 (JSC::JIT::linkFor): Link even if we miss on argument count, as above.
1663 * jit/JITCall32_64.cpp:
1664 (JSC::JIT::emitSlow_op_call):
1665 (JSC::JIT::emitSlow_op_call_eval):
1666 (JSC::JIT::emitSlow_op_call_varargs):
1667 (JSC::JIT::emitSlow_op_construct):
1668 (JSC::JIT::emit_op_call_eval):
1669 (JSC::JIT::emit_op_call_varargs): Share all function call code generation.
1670 Don't count call_eval when accounting for linkable function calls because
1671 eval doesn't link. (Its fast path is to perform the eval.)
1673 (JSC::JIT::compileLoadVarargs): Ported this inline copying optimization
1674 to our new calling convention. The key to this optimization is the
1675 observation that, in a function that declares no arguments, if any
1676 arguments are passed, they all end up right behind 'this'.
1678 (JSC::JIT::compileCallEval):
1679 (JSC::JIT::compileCallEvalSlowCase): Factored out eval for a little clarity.
1681 (JSC::JIT::compileOpCall):
1682 (JSC::JIT::compileOpCallSlowCase): If you are still with me, dear reader,
1683 this is the whole point of my patch. The caller now unconditionally moves
1684 the CallFrame forward and fills in the data it knows before taking any
1685 branches to deal with weird caller/callee pairs.
1687 This also means that there is almost no slow path for calls -- it all
1688 gets folded into the shared virtual call stub. The only things remaining
1689 in the slow path are the rare case counter and a call to the stub.
1691 * jit/JITOpcodes32_64.cpp:
1692 (JSC::JIT::privateCompileCTIMachineTrampolines):
1693 (JSC::JIT::privateCompileCTINativeCall): Updated for values being in
1694 different registers or in memory, based on our new standard calling
1697 Added a shared path for calling out to CTI helper functions for non-JS
1700 * jit/JITPropertyAccess32_64.cpp:
1701 (JSC::JIT::emit_op_method_check): method_check emits its own code and
1702 the following get_by_id's code, so it needs to add both when informing
1703 result chaining of its result. This is important because the standard
1704 calling convention can now take advantage of this chaining.
1707 (JSC::JIT::compileLoadVarargs):
1708 (JSC::JIT::compileCallEval):
1709 (JSC::JIT::compileCallEvalSlowCase):
1710 (JSC::JIT::compileOpCall):
1711 (JSC::JIT::compileOpCallSlowCase):
1712 * jit/JITOpcodes.cpp:
1713 (JSC::JIT::privateCompileCTIMachineTrampolines):
1714 (JSC::JIT::emit_op_call_eval):
1715 (JSC::JIT::emit_op_call_varargs):
1716 (JSC::JIT::emitSlow_op_call):
1717 (JSC::JIT::emitSlow_op_call_eval):
1718 (JSC::JIT::emitSlow_op_call_varargs):
1719 (JSC::JIT::emitSlow_op_construct): Observe, as I write all of my code a
1720 second time, now with 64 bits.
1723 (JSC::throwExceptionFromOpCall):
1724 (JSC::jitCompileFor):
1725 (JSC::arityCheckFor):
1726 (JSC::lazyLinkFor): A lot of mechanical changes here for one purpose:
1727 Exceptions thrown in the middle of a function call now use a shared helper
1728 function (throwExceptionFromOpCall). This function understands that the
1729 CallFrame currently points to the callEE, and the exception must be
1730 thrown by the callER. (The old calling convention would often still have
1731 the CallFrame pointing at the callER at the point of an exception. That
1732 is not the way of our new, standard calling convention.)
1734 (JSC::op_call_eval): Finish standard CallFrame setup before calling
1735 our eval helper function, which now depends on that setup.
1737 * runtime/Arguments.h:
1738 (JSC::Arguments::length): Renamed numProvidedArguments() to length()
1739 because that's what other objects call it, and the difference made our
1740 new loadVarargs helper function hard to read.
1742 * runtime/Executable.cpp:
1743 (JSC::FunctionExecutable::compileForCallInternal):
1744 (JSC::FunctionExecutable::compileForConstructInternal): Interpreter build
1747 * runtime/FunctionPrototype.cpp:
1748 (JSC::functionProtoFuncApply): Honor Arguments::MaxArguments even when
1749 the .apply call_varargs optimization fails. (This bug appears on layout
1750 tests when you disable the optimization.)
1752 2011-11-11 Jer Noble <jer.noble@apple.com>
1754 Implement MediaController.
1755 https://bugs.webkit.org/show_bug.cgi?id=71408
1757 Reviewed by Eric Carlson.
1759 Change the definition of WTF_USE_COREAUDIO to exclude Windows completely, as
1760 CoreAudioClock.h is not available there.
1764 2011-11-14 Patrick Gansterer <paroga@webkit.org>
1766 [WIN] Remove dependency on pthread from FastMalloc
1767 https://bugs.webkit.org/show_bug.cgi?id=72098
1769 Reviewed by Adam Roben.
1771 All pthread calls are already ported to native Windows calls.
1772 Use the native version for all OS(WINDOWS) to remove the
1773 runtime dependency on the pthread dll.
1775 * wtf/FastMalloc.cpp:
1777 2011-11-14 Simon Hausmann <simon.hausmann@nokia.com>
1779 [Qt] Replace use of QApplication with QGuiApplication.
1781 Reviewed by Tor Arne Vestbø.
1783 * wtf/qt/compat/qguiapplication.h:
1784 (QGuiApplication::styleHints): Introduce styleHints wrapper hack.
1786 2011-11-14 Carlos Garcia Campos <cgarcia@igalia.com>
1788 Unreviewed. Fix make distcheck build.
1790 * GNUmakefile.list.am: Add missing files.
1792 2011-11-11 Yury Semikhatsky <yurys@chromium.org>
1794 Web Inspector: function remote objetct should provide access to function position in the script
1795 https://bugs.webkit.org/show_bug.cgi?id=71808
1797 Exposed accessor for function source code.
1799 Reviewed by Pavel Feldman.
1801 * JavaScriptCore.exp:
1802 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1803 * runtime/JSFunction.cpp:
1804 (JSC::JSFunction::sourceCode):
1805 * runtime/JSFunction.h:
1807 2011-11-13 Yuqiang Xian <yuqiang.xian@intel.com>
1809 Fix silent spilling/filling GPRs in DFG 32_64
1810 https://bugs.webkit.org/show_bug.cgi?id=72201
1812 Reviewed by Gavin Barraclough.
1814 Current silentSpillGPR/silentFillGPR may not work as expected for some
1815 cases in 32_64. If there's a JSValue which was retained by two GPRs,
1816 we may end up failing to spill/fill some GPRs or redundantly
1817 spilling/filling some GPRs. For example, if we tend to exclude "eax"
1818 from spilling while a JSValue is retained by both "eax" and "edx",
1819 then "edx" won't be spilled as well (wrong). And if another JSValue is
1820 retained by "ecx" and "ebx", both "ecx" and "ebx" will be spilled
1821 twice. The similar problem applies to silentFillGPR.
1822 The fix is to make silentSpillGPR/silentFillGPR more straightforward,
1823 i.e., spilling/filling based on the GPR instead of the virtual
1824 register. FPR spilling/filling is also modified accordingly to make it
1825 consistent with GPR spilling/filling.
1827 * dfg/DFGJITCodeGenerator.h:
1828 (JSC::DFG::JITCodeGenerator::silentSpillGPR):
1829 (JSC::DFG::JITCodeGenerator::silentSpillFPR):
1830 (JSC::DFG::JITCodeGenerator::silentFillGPR):
1831 (JSC::DFG::JITCodeGenerator::silentFillFPR):
1832 (JSC::DFG::JITCodeGenerator::silentSpillAllRegisters):
1833 (JSC::DFG::JITCodeGenerator::silentFillAllRegisters):
1835 2011-11-12 Laszlo Gombos <laszlo.1.gombos@nokia.com>
1837 [Qt][Symbian] Remove support for WINSCW compiler
1838 https://bugs.webkit.org/show_bug.cgi?id=70178
1840 Reviewed by Chang Shu.
1842 * API/JSStringRef.h:
1843 * create_hash_table: Revert r45553.
1844 * runtime/JSGlobalData.cpp: Revert r45553.
1845 * runtime/LiteralParser.cpp: Remove WINSCW comment.
1846 (JSC::LiteralParser::Lexer::lexString):
1847 * runtime/Lookup.h: Revert r45553.
1848 * runtime/Structure.h: Revert r48461.
1850 * wtf/Assertions.h: Revert r52337.
1852 * wtf/ListRefPtr.h: Revert r48988.
1853 (WTF::ListRefPtr::~ListRefPtr):
1854 * wtf/OwnArrayPtr.h: Revert r45911.
1855 (WTF::OwnArrayPtr::operator UnspecifiedBoolType):
1856 * wtf/PassOwnArrayPtr.h:
1857 (WTF::PassOwnArrayPtr::operator UnspecifiedBoolType):
1859 * wtf/StaticConstructors.h:
1860 * wtf/unicode/qt4/UnicodeQt4.h:
1862 2011-11-12 Patrick Gansterer <paroga@webkit.org>
1864 Unreviewed. Add ENABLE(DFG_JIT) around DFGCorrectableJumpPoint code.
1866 * dfg/DFGCorrectableJumpPoint.cpp:
1867 * dfg/DFGCorrectableJumpPoint.h:
1869 2011-11-12 Patrick Gansterer <paroga@webkit.org>
1871 [CMake] Move list of DFG source files into correct file
1872 https://bugs.webkit.org/show_bug.cgi?id=72212
1874 Reviewed by Daniel Bates.
1876 The DFG files are platform independent. So move them from
1877 the EFL specific file into the general CMakeLists.txt.
1880 * PlatformEfl.cmake:
1882 2011-11-12 Patrick Gansterer <paroga@webkit.org>
1884 Fix "unused variable" warning in JSLock
1885 https://bugs.webkit.org/show_bug.cgi?id=72213
1887 Reviewed by Anders Carlsson.
1889 Use ASSERT_UNUSED() instead of ASSERT() to make sure
1890 that the variable is also used in the release build.
1892 * runtime/JSLock.cpp:
1893 (JSC::JSLock::lock):
1894 (JSC::JSLock::unlock):
1896 2011-11-11 Gavin Barraclough <barraclough@apple.com>
1898 Update iOS compiler version.
1900 Reviewed by David Kilzer.
1902 * Configurations/CompilerVersion.xcconfig:
1903 - Update compiler version.
1905 2011-11-11 Gavin Barraclough <barraclough@apple.com>
1907 Update iOS port's configuration setting, particularly in Platform.h
1908 https://bugs.webkit.org/show_bug.cgi?id=72187
1910 Reviewed by David Kilzer.
1912 * interpreter/Interpreter.h:
1913 - Lower the reentry depth.
1914 * runtime/DatePrototype.cpp:
1916 * wtf/FastMalloc.cpp:
1917 (WTF::TCMalloc_PageHeap::IncrementalScavenge):
1918 - Update fastmalloc configuration for iOS.
1919 * wtf/OSAllocatorPosix.cpp:
1920 (WTF::OSAllocator::reserveAndCommit):
1923 - Update platform configuration for iOS.
1925 2011-11-11 David Kilzer <ddkilzer@apple.com>
1927 Only define BUILDING_ON_* and TARGETING_* macros when building for Mac OS X
1928 <http://webkit.org/b/72175>
1930 Reviewed by Joseph Pecoraro.
1932 * wtf/Platform.h: Move the definition of the BUILDING_ON_* and
1933 TARGETING_* macros to where the WTF_OS_MAC_OS_X macro is defined
1934 so that they're only defined on Mac OS X builds. Also include
1935 Availability.h, which is needed on iOS builds.
1937 2011-11-11 Darin Adler <darin@apple.com>
1939 Remove all releaseRef implementations except for RetainPtr
1940 https://bugs.webkit.org/show_bug.cgi?id=71423
1942 Reviewed by Julien Chaffraix.
1944 * API/JSRetainPtr.h: Removed releaseRef.
1945 * wtf/PassRefPtr.h: Removed releaseRef.
1947 2011-11-11 Darin Adler <darin@apple.com>
1949 * JavaScriptCore.xcodeproj/project.pbxproj: Let a newer Xcode update this file.
1950 If an older Xcode downgrades this file and we have a risk of some kind of
1951 oscillating commit situation, please contact me so I know not to do this again.
1953 2011-11-11 Mark Hahnenberg <mhahnenberg@apple.com>
1955 Add jsCast to replace static_cast
1956 https://bugs.webkit.org/show_bug.cgi?id=72071
1958 Reviewed by Geoffrey Garen.
1960 Added new jsCast and changed all of the static_cast sites in functions that
1961 are in the MethodTable to use jsCast instead.
1963 * API/JSCallbackFunction.cpp:
1964 (JSC::JSCallbackFunction::toStringCallback):
1965 (JSC::JSCallbackFunction::valueOfCallback):
1966 * API/JSCallbackObject.h:
1967 (JSC::JSCallbackObject::visitChildren):
1968 * API/JSCallbackObjectFunctions.h:
1970 (JSC::::getOwnPropertySlot):
1971 (JSC::::getOwnPropertyDescriptor):
1973 (JSC::::deleteProperty):
1974 (JSC::::deletePropertyByIndex):
1975 (JSC::::getConstructData):
1976 (JSC::::hasInstance):
1977 (JSC::::getCallData):
1978 (JSC::::getOwnPropertyNames):
1979 * debugger/DebuggerActivation.cpp:
1980 (JSC::DebuggerActivation::visitChildren):
1981 (JSC::DebuggerActivation::className):
1982 (JSC::DebuggerActivation::getOwnPropertySlot):
1983 (JSC::DebuggerActivation::put):
1984 (JSC::DebuggerActivation::putWithAttributes):
1985 (JSC::DebuggerActivation::deleteProperty):
1986 (JSC::DebuggerActivation::getOwnPropertyNames):
1987 (JSC::DebuggerActivation::getOwnPropertyDescriptor):
1988 (JSC::DebuggerActivation::defineGetter):
1989 (JSC::DebuggerActivation::defineSetter):
1990 * runtime/Arguments.cpp:
1991 (JSC::Arguments::visitChildren):
1992 (JSC::Arguments::getOwnPropertySlotByIndex):
1993 (JSC::Arguments::getOwnPropertySlot):
1994 (JSC::Arguments::getOwnPropertyDescriptor):
1995 (JSC::Arguments::getOwnPropertyNames):
1996 (JSC::Arguments::putByIndex):
1997 (JSC::Arguments::put):
1998 (JSC::Arguments::deletePropertyByIndex):
1999 (JSC::Arguments::deleteProperty):
2000 * runtime/ArrayConstructor.cpp:
2001 (JSC::ArrayConstructor::getOwnPropertySlot):
2002 (JSC::ArrayConstructor::getOwnPropertyDescriptor):
2003 * runtime/ArrayPrototype.cpp:
2004 (JSC::ArrayPrototype::getOwnPropertySlot):
2005 (JSC::ArrayPrototype::getOwnPropertyDescriptor):
2006 * runtime/BooleanPrototype.cpp:
2007 (JSC::BooleanPrototype::getOwnPropertySlot):
2008 (JSC::BooleanPrototype::getOwnPropertyDescriptor):
2009 * runtime/DateConstructor.cpp:
2010 (JSC::DateConstructor::getOwnPropertySlot):
2011 (JSC::DateConstructor::getOwnPropertyDescriptor):
2012 * runtime/DatePrototype.cpp:
2013 (JSC::DatePrototype::getOwnPropertySlot):
2014 (JSC::DatePrototype::getOwnPropertyDescriptor):
2015 * runtime/ErrorPrototype.cpp:
2016 (JSC::ErrorPrototype::getOwnPropertySlot):
2017 (JSC::ErrorPrototype::getOwnPropertyDescriptor):
2018 * runtime/Executable.cpp:
2019 (JSC::ExecutableBase::clearCode):
2020 (JSC::EvalExecutable::visitChildren):
2021 (JSC::ProgramExecutable::visitChildren):
2022 (JSC::FunctionExecutable::visitChildren):
2023 * runtime/GetterSetter.cpp:
2024 (JSC::GetterSetter::visitChildren):
2025 * runtime/JSActivation.cpp:
2026 (JSC::JSActivation::visitChildren):
2027 (JSC::JSActivation::getOwnPropertyNames):
2028 (JSC::JSActivation::getOwnPropertySlot):
2029 (JSC::JSActivation::put):
2030 (JSC::JSActivation::putWithAttributes):
2031 * runtime/JSArray.cpp:
2032 (JSC::JSArray::getOwnPropertySlotByIndex):
2033 (JSC::JSArray::getOwnPropertySlot):
2034 (JSC::JSArray::getOwnPropertyDescriptor):
2035 (JSC::JSArray::put):
2036 (JSC::JSArray::putByIndex):
2037 (JSC::JSArray::deleteProperty):
2038 (JSC::JSArray::deletePropertyByIndex):
2039 (JSC::JSArray::getOwnPropertyNames):
2040 (JSC::JSArray::visitChildren):
2041 * runtime/JSBoundFunction.cpp:
2042 (JSC::JSBoundFunction::hasInstance):
2043 (JSC::JSBoundFunction::visitChildren):
2044 * runtime/JSByteArray.cpp:
2045 (JSC::JSByteArray::getOwnPropertySlot):
2046 (JSC::JSByteArray::getOwnPropertyDescriptor):
2047 (JSC::JSByteArray::getOwnPropertySlotByIndex):
2048 (JSC::JSByteArray::put):
2049 (JSC::JSByteArray::putByIndex):
2050 (JSC::JSByteArray::getOwnPropertyNames):
2052 (JSC::JSCell::visitChildren):
2054 * runtime/JSFunction.cpp:
2055 (JSC::JSFunction::visitChildren):
2056 (JSC::JSFunction::getCallData):
2057 (JSC::JSFunction::getOwnPropertySlot):
2058 (JSC::JSFunction::getOwnPropertyDescriptor):
2059 (JSC::JSFunction::getOwnPropertyNames):
2060 (JSC::JSFunction::put):
2061 (JSC::JSFunction::deleteProperty):
2062 (JSC::JSFunction::getConstructData):
2063 * runtime/JSGlobalData.cpp:
2064 (JSC::StackPreservingRecompiler::operator()):
2065 * runtime/JSGlobalObject.cpp:
2066 (JSC::JSGlobalObject::put):
2067 (JSC::JSGlobalObject::putWithAttributes):
2068 (JSC::JSGlobalObject::defineGetter):
2069 (JSC::JSGlobalObject::defineSetter):
2070 (JSC::JSGlobalObject::visitChildren):
2071 (JSC::JSGlobalObject::getOwnPropertySlot):
2072 (JSC::JSGlobalObject::getOwnPropertyDescriptor):
2073 (JSC::JSGlobalObject::clearRareData):
2074 * runtime/JSGlobalThis.cpp:
2075 (JSC::JSGlobalThis::visitChildren):
2076 * runtime/JSONObject.cpp:
2077 (JSC::JSONObject::getOwnPropertySlot):
2078 (JSC::JSONObject::getOwnPropertyDescriptor):
2079 * runtime/JSObject.cpp:
2080 (JSC::JSObject::finalize):
2081 (JSC::JSObject::visitChildren):
2082 (JSC::JSObject::getOwnPropertySlotByIndex):
2083 (JSC::JSObject::put):
2084 (JSC::JSObject::putByIndex):
2085 (JSC::JSObject::deleteProperty):
2086 (JSC::JSObject::deletePropertyByIndex):
2087 * runtime/JSObject.h:
2088 (JSC::JSObject::getOwnPropertySlot):
2089 * runtime/JSPropertyNameIterator.cpp:
2090 (JSC::JSPropertyNameIterator::visitChildren):
2091 * runtime/JSStaticScopeObject.cpp:
2092 (JSC::JSStaticScopeObject::visitChildren):
2093 (JSC::JSStaticScopeObject::put):
2094 (JSC::JSStaticScopeObject::putWithAttributes):
2095 (JSC::JSStaticScopeObject::getOwnPropertySlot):
2096 * runtime/JSString.cpp:
2097 (JSC::JSString::visitChildren):
2098 (JSC::JSString::toThisObject):
2099 (JSC::JSString::getOwnPropertySlot):
2100 (JSC::JSString::getOwnPropertySlotByIndex):
2101 * runtime/JSVariableObject.cpp:
2102 (JSC::JSVariableObject::deleteProperty):
2103 (JSC::JSVariableObject::getOwnPropertyNames):
2104 * runtime/JSWrapperObject.cpp:
2105 (JSC::JSWrapperObject::visitChildren):
2106 * runtime/MathObject.cpp:
2107 (JSC::MathObject::getOwnPropertySlot):
2108 (JSC::MathObject::getOwnPropertyDescriptor):
2109 * runtime/NativeErrorConstructor.cpp:
2110 (JSC::NativeErrorConstructor::visitChildren):
2111 * runtime/NumberConstructor.cpp:
2112 (JSC::NumberConstructor::getOwnPropertySlot):
2113 (JSC::NumberConstructor::getOwnPropertyDescriptor):
2114 * runtime/NumberPrototype.cpp:
2115 (JSC::NumberPrototype::getOwnPropertySlot):
2116 (JSC::NumberPrototype::getOwnPropertyDescriptor):
2117 * runtime/ObjectConstructor.cpp:
2118 (JSC::ObjectConstructor::getOwnPropertySlot):
2119 (JSC::ObjectConstructor::getOwnPropertyDescriptor):
2120 * runtime/ObjectPrototype.cpp:
2121 (JSC::ObjectPrototype::put):
2122 (JSC::ObjectPrototype::getOwnPropertySlotByIndex):
2123 (JSC::ObjectPrototype::getOwnPropertySlot):
2124 (JSC::ObjectPrototype::getOwnPropertyDescriptor):
2125 * runtime/RegExpConstructor.cpp:
2126 (JSC::RegExpConstructor::getOwnPropertySlot):
2127 (JSC::RegExpConstructor::getOwnPropertyDescriptor):
2128 (JSC::RegExpConstructor::put):
2129 * runtime/RegExpMatchesArray.h:
2130 (JSC::RegExpMatchesArray::getOwnPropertySlot):
2131 (JSC::RegExpMatchesArray::getOwnPropertySlotByIndex):
2132 (JSC::RegExpMatchesArray::getOwnPropertyDescriptor):
2133 (JSC::RegExpMatchesArray::put):
2134 (JSC::RegExpMatchesArray::putByIndex):
2135 (JSC::RegExpMatchesArray::deleteProperty):
2136 (JSC::RegExpMatchesArray::deletePropertyByIndex):
2137 (JSC::RegExpMatchesArray::getOwnPropertyNames):
2138 * runtime/RegExpObject.cpp:
2139 (JSC::RegExpObject::visitChildren):
2140 (JSC::RegExpObject::getOwnPropertySlot):
2141 (JSC::RegExpObject::getOwnPropertyDescriptor):
2142 (JSC::RegExpObject::put):
2143 * runtime/RegExpPrototype.cpp:
2144 (JSC::RegExpPrototype::getOwnPropertySlot):
2145 (JSC::RegExpPrototype::getOwnPropertyDescriptor):
2146 * runtime/ScopeChain.cpp:
2147 (JSC::ScopeChainNode::visitChildren):
2148 * runtime/StringConstructor.cpp:
2149 (JSC::StringConstructor::getOwnPropertySlot):
2150 (JSC::StringConstructor::getOwnPropertyDescriptor):
2151 * runtime/StringObject.cpp:
2152 (JSC::StringObject::getOwnPropertySlot):
2153 (JSC::StringObject::getOwnPropertySlotByIndex):
2154 (JSC::StringObject::getOwnPropertyDescriptor):
2155 (JSC::StringObject::deleteProperty):
2156 (JSC::StringObject::getOwnPropertyNames):
2157 * runtime/StringPrototype.cpp:
2158 (JSC::StringPrototype::getOwnPropertySlot):
2159 (JSC::StringPrototype::getOwnPropertyDescriptor):
2160 * runtime/Structure.cpp:
2161 (JSC::Structure::visitChildren):
2162 * runtime/StructureChain.cpp:
2163 (JSC::StructureChain::visitChildren):
2165 2011-11-11 Gavin Barraclough <barraclough@apple.com>
2167 Enable DFG JIT for ARMv7/iOS.
2169 Rubber stamped by Oliver Hunt.
2172 - enable DFG JIT for ARMv7/iOS.
2174 2011-11-11 Mark Hahnenberg <mhahnenberg@apple.com>
2176 De-virtualize supportsProfiling, supportsRichSourceInfo, shouldInterruptScript in JSGlobalObject
2177 https://bugs.webkit.org/show_bug.cgi?id=72035
2179 Reviewed by Geoffrey Garen.
2181 De-virtualized the methods through the use of a new method table just for JSGlobalObject and subclasses.
2183 * JavaScriptCore.exp:
2184 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2185 * bytecompiler/BytecodeGenerator.cpp: Changed call sites to use the new GlobalObjectMethodTable.
2186 (JSC::BytecodeGenerator::BytecodeGenerator):
2187 * interpreter/Interpreter.cpp: Ditto.
2188 (JSC::Interpreter::execute):
2189 * runtime/JSGlobalObject.cpp: Added a static const GlobalObjectMethodTable with the correct function pointers.
2190 * runtime/JSGlobalObject.h: Added a field in JSGlobalObject to keep track of the current method table.
2191 (JSC::JSGlobalObject::JSGlobalObject):
2192 (JSC::JSGlobalObject::globalObjectMethodTable): The new struct to contain the function pointers.
2193 (JSC::JSGlobalObject::supportsProfiling): Made static to put in the method table.
2194 (JSC::JSGlobalObject::supportsRichSourceInfo): Ditto.
2195 (JSC::JSGlobalObject::shouldInterruptScript): Ditto.
2196 * runtime/TimeoutChecker.cpp: Changed call sites to use the new GlobalObjectMethodTable for lookup.
2197 (JSC::TimeoutChecker::didTimeOut):
2199 2011-11-11 Mark Hahnenberg <mhahnenberg@apple.com>
2201 De-virtualize JSGlobalObject::allowsAccessFrom
2202 https://bugs.webkit.org/show_bug.cgi?id=71969
2204 Reviewed by Darin Adler.
2206 * runtime/JSGlobalObject.h: Removed allowsAccessFrom from JSGlobalObject since it is exclusive to
2207 JSDOMWindowBase and WebScriptObject.
2209 2011-11-11 Sheriff Bot <webkit.review.bot@gmail.com>
2211 Unreviewed, rolling out r99950.
2212 http://trac.webkit.org/changeset/99950
2213 https://bugs.webkit.org/show_bug.cgi?id=72117
2215 "Landed wrong patch by mistake" (Requested by yurys on
2218 * JavaScriptCore.exp:
2219 * runtime/JSFunction.cpp:
2220 * runtime/JSFunction.h:
2222 2011-11-11 Patrick Gansterer <paroga@webkit.org>
2224 Unreviewed. Build fix for !ENABLE(JIT) after r99898.
2226 * bytecode/CodeBlock.cpp:
2227 (JSC::CodeBlock::CodeBlock):
2229 2011-11-10 Dan Bernstein <mitz@apple.com>
2231 Disabling assertions breaks the debug build
2232 https://bugs.webkit.org/show_bug.cgi?id=72091
2234 Reviewed by Geoff Garen.
2236 * dfg/DFGNode.h: Made hasIdentifier() available when assertions are
2237 disabled. It is used in Graph::dump().
2238 * runtime/JSObject.cpp:
2239 (JSC::JSObject::visitChildren): Update m_isCheckingForDefaultMarkViolation
2240 only if assertions are enabled.
2242 (WTF::::checkIndexValidity): Changed ASSERT to ASSERT_UNUSED.
2243 * wtf/ThreadRestrictionVerifier.h:
2244 (WTF::ThreadRestrictionVerifier::setShared): Guarded the definition of
2245 a local variable that is only used in an assertion.
2247 2011-11-10 Filip Pizlo <fpizlo@apple.com>
2249 JSString forgets to clear m_fibers when resolving ropes
2250 https://bugs.webkit.org/show_bug.cgi?id=72089
2252 Reviewed by Geoff Garen.
2254 * runtime/JSString.cpp:
2255 (JSC::JSString::resolveRopeSlowCase):
2257 2011-11-09 Filip Pizlo <fpizlo@apple.com>
2259 DFG byte array support sometimes clamps values incorrectly
2260 https://bugs.webkit.org/show_bug.cgi?id=71975
2262 Reviewed by Oliver Hunt.
2264 * dfg/DFGSpeculativeJIT.cpp:
2265 (JSC::DFG::SpeculativeJIT::compilePutByValForByteArray):
2267 2011-11-10 Filip Pizlo <fpizlo@apple.com>
2269 ValueProfile/PredictedType contains dead code, and doesn't recognize functions
2270 https://bugs.webkit.org/show_bug.cgi?id=72065
2272 Reviewed by Gavin Barraclough and Geoff Garen.
2274 Added PredictFunction support, and did some cleaning up along the way.
2275 ValueProfile no longer has statistics machinery, because we never used
2276 it. Rearranged some bits in PredictedType to more easily make room for
2277 one more object type. Changed some debug code to use more consistent
2278 conventions (ByteArray becomes Bytearray so that if we ever have a
2279 "Byte" prediction we don't get confused between a prediction that is
2280 the union of Byte and Array and a prediction that indicates precisely
2283 * bytecode/PredictedType.cpp:
2284 (JSC::predictionToString):
2285 (JSC::predictionFromClassInfo):
2286 * bytecode/PredictedType.h:
2287 (JSC::isFunctionPrediction):
2288 * bytecode/ValueProfile.cpp:
2289 * bytecode/ValueProfile.h:
2290 (JSC::ValueProfile::dump):
2291 * dfg/DFGAbstractState.cpp:
2292 (JSC::DFG::AbstractState::execute):
2293 * dfg/DFGPropagator.cpp:
2294 (JSC::DFG::Propagator::propagateNodePredictions):
2296 2011-11-10 David Kilzer <ddkilzer@apple.com>
2298 <http://webkit.org/b/72049> Specify testapi.js install path using JAVASCRIPTCORE_FRAMEWORKS_DIR
2300 Reviewed by Joseph Pecoraro.
2302 * JavaScriptCore.xcodeproj/project.pbxproj: The testapi.js
2303 script should use JAVASCRIPTCORE_FRAMEWORKS_DIR in its dstPath
2304 for installation. Also removed "Versions/A/" from the path
2305 since this is unneeded due the default symlinks present in the
2308 2011-11-10 Gavin Barraclough <barraclough@apple.com>
2310 Add ARMv7 support to the DFG JIT
2311 https://bugs.webkit.org/show_bug.cgi?id=72061
2313 Reviewed by Geoff Garen.
2315 * dfg/DFGAssemblyHelpers.h:
2316 (JSC::DFG::AssemblyHelpers::preserveReturnAddressAfterCall):
2317 (JSC::DFG::AssemblyHelpers::restoreReturnAddressBeforeReturn):
2318 (JSC::DFG::AssemblyHelpers::emitPutImmediateToCallFrameHeader):
2319 (JSC::DFG::AssemblyHelpers::boxDouble):
2320 (JSC::DFG::AssemblyHelpers::unboxDouble):
2321 - Add CPU(ARM) copies of these functions.
2322 * dfg/DFGJITCodeGenerator.h:
2323 (JSC::DFG::JITCodeGenerator::spill):
2324 - Fix matching of '}' re #if blocks, makes some tools happy.
2325 (JSC::DFG::JITCodeGenerator::setupArguments):
2326 (JSC::DFG::JITCodeGenerator::setupArgumentsWithExecState):
2327 (JSC::DFG::JITCodeGenerator::appendCallWithExceptionCheckSetResult):
2328 (JSC::DFG::JITCodeGenerator::appendCallSetResult):
2329 - Add CPU(ARM) / 4 argument register copies of these functions.
2330 * dfg/DFGJITCodeGenerator32_64.cpp:
2331 (JSC::DFG::JITCodeGenerator::nonSpeculativeValueToInt32):
2332 - Should use callOperation to plant a call to a DFG_OPERATION.
2333 (JSC::DFG::JITCodeGenerator::cachedGetById):
2334 (JSC::DFG::JITCodeGenerator::cachedPutById):
2335 - These methods need to plant a relinkable jump; we currently do so
2336 using beginUninterruptedSequence() / endUninterruptedSequence().
2337 * dfg/DFGJITCodeGenerator64.cpp:
2338 (JSC::DFG::JITCodeGenerator::nonSpeculativeValueToInt32):
2339 - Should use callOperation to plant a call to a DFG_OPERATION.
2340 * dfg/DFGJITCompiler.cpp:
2341 (JSC::DFG::JITCompiler::linkOSRExits):
2342 - This method needs to plant a relinkable jump; we currently do so
2343 using beginUninterruptedSequence() / endUninterruptedSequence().
2344 (JSC::DFG::JITCompiler::compileBody):
2345 - Add abstraction to retrieve the pc after a call.
2346 * dfg/DFGOSRExitCompiler.cpp:
2347 - Fix a bug - CodeLocationLabel needs a data address rather than an
2348 executable one, but can just take a MacroAssemblerCodePtr instead!
2349 * dfg/DFGOperations.cpp:
2350 * dfg/DFGSpeculativeJIT.cpp:
2351 (JSC::DFG::compileClampDoubleToByte):
2352 - Add FIXME comment to come back to! - bug#72054.
2353 * dfg/DFGSpeculativeJIT.h:
2354 (JSC::DFG::SpeculativeJIT::speculationCheck):
2355 - Add missing method (ooops, required by bug#72047)
2356 * dfg/DFGSpeculativeJIT32_64.cpp:
2357 - Need to wrap fmod on ARMv7.
2360 2011-11-10 Filip Pizlo <fpizlo@apple.com>
2362 DFG should not reparse code that was just parsed
2363 https://bugs.webkit.org/show_bug.cgi?id=71977
2365 Reviewed by Geoff Garen.
2367 The instruction stream of a code block is now kept around until
2368 the next GC. When doing either an optimizing compilation of an
2369 executable, or inlining of an executable, we now try to find the
2370 already preexisting bytecode. If we find it, we don't have to parse.
2371 If we don't find it, we parse as before. Inlining takes the extra
2372 step of caching code blocks, so if the same executable gets inlined
2373 multiple times into the same caller, then we parse it at most once
2374 even if prior to inlining that executable did not have any code
2375 blocks with an instruction stream.
2377 Also fixed a silly bug where the strict mode for various operations
2378 was being determined by looking at the machine code block rather
2381 To enable the delete-on-next-GC policy, I introduced the notion
2382 of an ultra weak finalizer, which anyone can register during
2383 tracing. This is thread-safe (for parallel GC) and
2384 stop-the-world-safe (so calls to free() are postponed until the
2385 world is resumed). This required reusing some facilities previously
2386 created for WeakReferenceHarvester, so I created a common utility
2387 class. I also retweaked the handling of WeakReferenceHarvesters,
2388 since they should be executed during stop-the-world since in the
2389 future we may want to allow them to call drain().
2391 2% win on SunSpider. 2% win on V8, when run in my harness. Neutral
2394 * JavaScriptCore.xcodeproj/project.pbxproj:
2395 * bytecode/CodeBlock.cpp:
2396 (JSC::CodeBlock::CodeBlock):
2397 (JSC::CodeBlock::visitAggregate):
2398 (JSC::CodeBlock::copyPostParseDataFrom):
2399 (JSC::CodeBlock::copyPostParseDataFromAlternative):
2400 (JSC::CodeBlock::finalizeUnconditionally):
2401 * bytecode/CodeBlock.h:
2402 (JSC::CodeBlock::canProduceCopyWithBytecode):
2403 (JSC::CodeBlock::discardBytecodeLater):
2404 (JSC::CodeBlock::handleBytecodeDiscardingOpportunity):
2405 (JSC::GlobalCodeBlock::GlobalCodeBlock):
2406 (JSC::ProgramCodeBlock::ProgramCodeBlock):
2407 (JSC::EvalCodeBlock::EvalCodeBlock):
2408 (JSC::FunctionCodeBlock::FunctionCodeBlock):
2409 (JSC::BytecodeDestructionBlocker::BytecodeDestructionBlocker):
2410 (JSC::BytecodeDestructionBlocker::~BytecodeDestructionBlocker):
2411 * dfg/DFGAssemblyHelpers.h:
2412 (JSC::DFG::AssemblyHelpers::strictModeFor):
2413 * dfg/DFGByteCodeCache.h: Added.
2414 (JSC::DFG::CodeBlockKey::CodeBlockKey):
2415 (JSC::DFG::CodeBlockKey::operator==):
2416 (JSC::DFG::CodeBlockKey::hash):
2417 (JSC::DFG::CodeBlockKey::executable):
2418 (JSC::DFG::CodeBlockKey::kind):
2419 (JSC::DFG::CodeBlockKey::isHashTableDeletedValue):
2420 (JSC::DFG::CodeBlockKeyHash::hash):
2421 (JSC::DFG::CodeBlockKeyHash::equal):
2422 (JSC::DFG::ByteCodeCache::ByteCodeCache):
2423 (JSC::DFG::ByteCodeCache::~ByteCodeCache):
2424 (JSC::DFG::ByteCodeCache::get):
2425 * dfg/DFGByteCodeParser.cpp:
2426 (JSC::DFG::ByteCodeParser::handleInlining):
2427 * dfg/DFGJITCodeGenerator32_64.cpp:
2428 (JSC::DFG::JITCodeGenerator::cachedPutById):
2429 * dfg/DFGJITCodeGenerator64.cpp:
2430 (JSC::DFG::JITCodeGenerator::cachedPutById):
2431 * dfg/DFGSpeculativeJIT64.cpp:
2432 (JSC::DFG::SpeculativeJIT::compile):
2434 (JSC::Heap::finalizeUnconditionally):
2435 (JSC::Heap::markRoots):
2436 (JSC::Heap::collect):
2438 * heap/ListableHandler.h: Added.
2439 (JSC::ListableHandler::ListableHandler):
2440 (JSC::ListableHandler::~ListableHandler):
2441 (JSC::ListableHandler::List::List):
2442 (JSC::ListableHandler::List::addNotThreadSafe):
2443 (JSC::ListableHandler::List::addThreadSafe):
2444 (JSC::ListableHandler::List::hasNext):
2445 (JSC::ListableHandler::List::removeNext):
2446 * heap/MarkStack.cpp:
2447 (JSC::MarkStackThreadSharedData::MarkStackThreadSharedData):
2448 (JSC::SlotVisitor::harvestWeakReferences):
2449 (JSC::SlotVisitor::finalizeUnconditionally):
2451 (JSC::MarkStack::addWeakReferenceHarvester):
2452 (JSC::MarkStack::addUnconditionalFinalizer):
2453 * heap/SlotVisitor.h:
2454 * heap/UnconditionalFinalizer.h: Added.
2455 (JSC::UnconditionalFinalizer::~UnconditionalFinalizer):
2456 * heap/WeakReferenceHarvester.h:
2457 (JSC::WeakReferenceHarvester::WeakReferenceHarvester):
2458 (JSC::WeakReferenceHarvester::~WeakReferenceHarvester):
2459 * runtime/Executable.cpp:
2460 (JSC::EvalExecutable::compileInternal):
2461 (JSC::ProgramExecutable::compileInternal):
2462 (JSC::FunctionExecutable::baselineCodeBlockFor):
2463 (JSC::FunctionExecutable::codeBlockWithBytecodeFor):
2464 (JSC::FunctionExecutable::produceCodeBlockFor):
2465 (JSC::FunctionExecutable::compileForCallInternal):
2466 (JSC::FunctionExecutable::compileForConstructInternal):
2467 * runtime/Executable.h:
2468 (JSC::FunctionExecutable::profiledCodeBlockFor):
2470 2011-11-10 Gavin Barraclough <barraclough@apple.com>
2472 Add ARMv7 register info for the DFG JIT
2473 https://bugs.webkit.org/show_bug.cgi?id=72050
2475 Reviewed by Geoff Garen.
2478 (JSC::DFG::FPRInfo::toRegister):
2479 (JSC::DFG::FPRInfo::toIndex):
2480 (JSC::DFG::FPRInfo::debugName):
2482 (JSC::DFG::GPRInfo::toRegister):
2483 (JSC::DFG::GPRInfo::toIndex):
2484 (JSC::DFG::GPRInfo::debugName):
2486 2011-11-10 Gavin Barraclough <barraclough@apple.com>
2488 #ifdef CPU(X86) specific div/mod code in DFGSpeculativeJIT32_64
2489 https://bugs.webkit.org/show_bug.cgi?id=72047
2491 Reviewed by Geoff Garen.
2493 We currently don't attempt to abstract divide through the macro assembler,
2494 due to these instructions commonly having specific requirements. This means
2495 there is architecture specific code in the JIT - #ifdef it, and provide a
2496 common implementation.
2498 * dfg/DFGSpeculativeJIT32_64.cpp:
2499 (JSC::DFG::fmodAsDFGOperation):
2500 (JSC::DFG::SpeculativeJIT::compile):
2502 2011-11-10 Gavin Barraclough <barraclough@apple.com>
2504 Add ENABLE_VALUE_PROFILER support for ARMv7
2505 https://bugs.webkit.org/show_bug.cgi?id=72043
2507 Reviewed by Geoff Garen.
2509 This requires us to make a bucketCounterRegister available; to do so we'll need to spill more registers on entry to JIT code.
2511 * jit/JITArithmetic32_64.cpp:
2512 (JSC::JIT::emitSlow_op_mod):
2513 - cleanup location of UNUSED_PARAM
2515 (JSC::ctiTrampoline):
2516 (JSC::ctiVMThrowTrampoline):
2517 (JSC::ctiOpThrowNotCaught):
2518 (JSC::JITThunks::JITThunks):
2520 - Update JITStackFrame structure & asm code to spill more registers.
2521 * jit/JSInterfaceJIT.h:
2522 - Assign a bucketCounterRegister.
2524 2011-11-10 Gavin Barraclough <barraclough@apple.com>
2526 Fix sampling counters on ARMv7, move add64 functionality to macro assembler
2527 https://bugs.webkit.org/show_bug.cgi?id=72040
2529 Reviewed by Geoff Garen.
2531 The ability to add an integer to a uint64_t in memory is poorly copied in
2532 multiple places & ifdef'ed on architecture, addWithCarry32 is also a badly
2533 designed interface since add32 is not required to set flags (we have no
2534 concept of flags in the macro assembler interface).
2536 * assembler/MacroAssemblerARMv7.h:
2537 (JSC::MacroAssemblerARMv7::add64):
2538 * assembler/MacroAssemblerX86.h:
2539 (JSC::MacroAssemblerX86::add64):
2540 * assembler/MacroAssemblerX86_64.h:
2541 (JSC::MacroAssemblerX86_64::add64):
2542 * dfg/DFGAssemblyHelpers.cpp:
2543 * dfg/DFGAssemblyHelpers.h:
2544 (JSC::DFG::AssemblyHelpers::emitCount):
2545 * dfg/DFGJITCodeGenerator.cpp:
2546 (JSC::DFG::JITCodeGenerator::writeBarrier):
2548 * jit/JITInlineMethods.h:
2549 (JSC::JIT::emitCount):
2551 011-11-10 Ryuan Choi <ryuan.choi@samsung.com>
2553 [CMAKE] Refactoring CMakeLists${PORT}.txt to Platform${PORT}.cmake
2554 https://bugs.webkit.org/show_bug.cgi?id=56705
2556 Reviewed by Adam Roben.
2559 * PlatformEfl.cmake: Renamed from Source/JavaScriptCore/CMakeListsEfl.txt.
2560 * PlatformWinCE.cmake: Renamed from Source/JavaScriptCore/CMakeListsWinCE.txt.
2561 * shell/CMakeLists.txt:
2562 * shell/PlatformEfl.cmake: Renamed from Source/JavaScriptCore/shell/CMakeListsEfl.txt.
2563 * shell/PlatformWinCE.cmake: Renamed from Source/JavaScriptCore/shell/CMakeListsWinCE.txt.
2564 * wtf/CMakeLists.txt:
2565 * wtf/PlatformEfl.cmake: Renamed from Source/JavaScriptCore/wtf/CMakeListsEfl.txt.
2566 * wtf/PlatformWinCE.cmake: Renamed from Source/JavaScriptCore/wtf/CMakeListsWinCE.txt.
2568 2011-11-10 Carlos Garcia Campos <cgarcia@igalia.com>
2570 Unreviewed. Fix make distcheck build.
2572 * GNUmakefile.list.am: Add missing files.
2574 2011-11-09 Michael Saboff <msaboff@apple.com>
2576 Towards 8 Bit Strings: Templatize JSC::LiteralParser class by character type
2577 https://bugs.webkit.org/show_bug.cgi?id=71862
2579 Changed LiteralParser to be templatized of character type.
2581 Moved five enums out of class definition to work around a clang compiler defect.
2583 Added lexIdentifier templated method to break out character specific versions.
2584 Added static setParserTokenString templated method to handle setting approriately
2585 sized string pointer.
2587 To keep code in LiteralParser.cpp and keep LiteralParser.h small, the two
2588 flavors of LiteralParser are explicitly instantiated at the end of
2591 Reviewed by Oliver Hunt.
2593 * API/JSValueRef.cpp:
2594 (JSValueMakeFromJSONString):
2595 * JavaScriptCore.exp:
2596 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2597 * interpreter/Interpreter.cpp:
2598 (JSC::Interpreter::callEval):
2599 (JSC::Interpreter::execute):
2600 * runtime/JSGlobalObjectFunctions.cpp:
2601 (JSC::globalFuncEval):
2602 * runtime/JSONObject.cpp:
2603 (JSC::JSONProtoFuncParse):
2604 * runtime/LiteralParser.cpp:
2605 (JSC::isJSONWhiteSpace):
2606 (JSC::::tryJSONPParse):
2607 (JSC::::makeIdentifier):
2608 (JSC::::Lexer::lex):
2609 (JSC::::Lexer::lexIdentifier):
2610 (JSC::::Lexer::next):
2613 (JSC::isSafeStringCharacter):
2614 (JSC::::Lexer::lexString):
2615 (JSC::::Lexer::lexNumber):
2617 * runtime/LiteralParser.h:
2618 (JSC::LiteralParser::LiteralParser):
2619 (JSC::LiteralParser::getErrorMessage):
2620 (JSC::LiteralParser::tryLiteralParse):
2621 (JSC::LiteralParser::Lexer::Lexer):
2622 (JSC::LiteralParser::Lexer::currentToken):
2623 (JSC::LiteralParser::Lexer::getErrorMessage):
2624 * runtime/UString.h:
2627 * wtf/text/StringBuilder.cpp:
2628 (WTF::StringBuilder::append):
2629 * wtf/text/StringBuilder.h:
2630 (WTF::StringBuilder::append):
2632 2011-11-09 Filip Pizlo <fpizlo@apple.com>
2634 Multiple CodeBlock should be able to share the same instruction
2635 stream without copying
2636 https://bugs.webkit.org/show_bug.cgi?id=71978
2638 Reviewed by Oliver Hunt.
2640 This refactors CodeBlock::m_instructions to be a Vector boxed in a
2641 ref-counted object, but otherwise does not take advantage of this.
2643 This is performance neutral.
2645 * bytecode/CodeBlock.cpp:
2646 (JSC::CodeBlock::printStructure):
2647 (JSC::CodeBlock::printStructures):
2648 (JSC::CodeBlock::dump):
2649 (JSC::CodeBlock::CodeBlock):
2650 (JSC::CodeBlock::visitAggregate):
2651 (JSC::CodeBlock::shrinkToFit):
2652 * bytecode/CodeBlock.h:
2653 (JSC::CodeBlock::hasInstructions):
2654 (JSC::CodeBlock::numberOfInstructions):
2655 (JSC::CodeBlock::instructions):
2659 2011-11-09 Gavin Barraclough <barraclough@apple.com>
2661 Renovate ARMv7 assembler/macro-assembler
2662 https://bugs.webkit.org/show_bug.cgi?id=71982
2664 Reviewed by Geoff Garen.
2667 * add support for strb (byte stores)
2668 * rename the VMOV_CtoS opcodes (there are currently backwards!)
2669 * add support for adc (add with carry)
2670 * add support for vsqrt, vabs
2671 * add support for vmov (between FPRs, and to/from GPR pairs).
2672 * remove '_F64' postfixes from instructions (these aren't helpful, functions can already be distinguished by their signatures).
2673 * rename vcvt_F64_S32 to vcvt_signedToFloatingPoint, the prior postfix was unhelpful in failing to distinguish the types (S32 indicates a single precision register, but the type could be float, int32, or uint32).
2674 * rename vcvtr_S32_F64 to vcvt_floatingPointToSigned, as for previous, also vcvtr was the incorrect name for the operation (the emitted instruction truncates).
2676 MacroAssemblerARMv7:
2677 * add 3-operand versions of and32, lshift32, or32, rshift32, urshift32, sub32, xor32,
2678 * add store8, and store32 imm to base-index.
2679 * fix load32WithCompactAddressOffsetPatch to work for all gprs (the fix is a little kludgy but functional; to do better we'll have to also fix the repatching code).
2680 * Update supportsFloating* flags (all features now supported).
2681 * add moveDouble, storeDouble to absolute address, addDouble to absolute address
2682 * add 3-operand double operations.
2683 * implement sqrtDouble/absDouble
2684 * add branchTruncateDoubleToInt32, implement truncateDoubleToInt32
2685 * move should do nothing if src == dest
2686 * branchTest8-on-memory can be implemented in terms of branchTest32-on-register (branchTest8-on-register has been removed).
2687 * add 3-operand branchAdd32, branchSub32, also branchAdd32 absolute address.
2689 2011-11-09 Gavin Barraclough <barraclough@apple.com>
2691 https://bugs.webkit.org/show_bug.cgi?id=71873
2693 Reviewed by Geoff Garen.
2695 Incrementally re-landing these changes, trying to determine what went wrong.
2696 (The whole patch failed tests on the build bot but worked locally.
2698 * dfg/DFGByteCodeParser.cpp:
2699 (JSC::DFG::ByteCodeParser::handleIntrinsic):
2701 2011-11-09 Filip Pizlo <fpizlo@apple.com>
2703 DFG OSR exit code should be lazily generated
2704 https://bugs.webkit.org/show_bug.cgi?id=71744
2706 Reviewed by Gavin Barraclough.
2708 The OSR exit code is now generated the first time it is executed,
2709 rather than right after speculative compilation. Because most OSR
2710 exits are never taken, this should greatly reduce both code size
2711 and compilation time.
2713 This is a 1% win on SunSpider, and a 1% win on V8 when running in
2714 my harness. No change in V8 in V8's harness (due to the long runs,
2715 so compile time is not an issue) and no change in Kraken (again,
2716 long runs of small code so compile time has no measurable effect).
2718 * CMakeListsEfl.txt:
2719 * GNUmakefile.list.am:
2720 * JavaScriptCore.xcodeproj/project.pbxproj:
2722 * assembler/AbstractMacroAssembler.h:
2723 * assembler/MacroAssemblerX86.h:
2724 (JSC::MacroAssemblerX86::jump):
2725 * assembler/MacroAssemblerX86_64.h:
2726 (JSC::MacroAssemblerX86_64::jump):
2727 * assembler/X86Assembler.h:
2728 (JSC::X86Assembler::jmp_m):
2729 * bytecode/CodeBlock.h:
2730 (JSC::CodeBlock::createDFGDataIfNecessary):
2731 (JSC::CodeBlock::appendDFGOSREntryData):
2732 (JSC::CodeBlock::numberOfDFGOSREntries):
2733 (JSC::CodeBlock::dfgOSREntryData):
2734 (JSC::CodeBlock::dfgOSREntryDataForBytecodeIndex):
2735 (JSC::CodeBlock::appendOSRExit):
2736 (JSC::CodeBlock::appendSpeculationRecovery):
2737 (JSC::CodeBlock::numberOfOSRExits):
2738 (JSC::CodeBlock::numberOfSpeculationRecoveries):
2739 (JSC::CodeBlock::osrExit):
2740 (JSC::CodeBlock::speculationRecovery):
2741 * dfg/DFGAssemblyHelpers.h:
2742 (JSC::DFG::AssemblyHelpers::debugCall):
2743 * dfg/DFGCorrectableJumpPoint.cpp: Added.
2744 (JSC::DFG::CorrectableJumpPoint::codeLocationForRepatch):
2745 * dfg/DFGCorrectableJumpPoint.h: Added.
2746 (JSC::DFG::CorrectableJumpPoint::CorrectableJumpPoint):
2747 (JSC::DFG::CorrectableJumpPoint::switchToLateJump):
2748 (JSC::DFG::CorrectableJumpPoint::correctInitialJump):
2749 (JSC::DFG::CorrectableJumpPoint::correctLateJump):
2750 (JSC::DFG::CorrectableJumpPoint::initialJump):
2751 (JSC::DFG::CorrectableJumpPoint::lateJump):
2752 (JSC::DFG::CorrectableJumpPoint::correctJump):
2753 (JSC::DFG::CorrectableJumpPoint::getJump):
2754 * dfg/DFGJITCompiler.cpp:
2755 (JSC::DFG::JITCompiler::linkOSRExits):
2756 (JSC::DFG::JITCompiler::compileBody):
2757 (JSC::DFG::JITCompiler::link):
2758 * dfg/DFGJITCompiler.h:
2759 * dfg/DFGOSRExit.cpp: Added.
2760 (JSC::DFG::OSRExit::OSRExit):
2761 (JSC::DFG::OSRExit::dump):
2763 * dfg/DFGOSRExitCompiler.cpp: Added.
2764 * dfg/DFGOSRExitCompiler.h:
2765 * dfg/DFGOSRExitCompiler32_64.cpp:
2766 (JSC::DFG::OSRExitCompiler::compileExit):
2767 * dfg/DFGOSRExitCompiler64.cpp:
2768 (JSC::DFG::OSRExitCompiler::compileExit):
2769 * dfg/DFGOperations.cpp:
2770 * dfg/DFGSpeculativeJIT.cpp:
2771 * dfg/DFGSpeculativeJIT.h:
2772 (JSC::DFG::SpeculativeJIT::speculationCheck):
2773 * dfg/DFGThunks.cpp: Added.
2774 (JSC::DFG::osrExitGenerationThunkGenerator):
2775 * dfg/DFGThunks.h: Added.
2777 (JSC::JITCode::dataAddressAtOffset):
2778 * runtime/JSGlobalData.h:
2780 2011-11-09 Mark Hahnenberg <mhahnenberg@apple.com>
2782 Fixing build breakage
2784 Unreviewed build fix
2786 * JavaScriptCore.exp:
2787 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2789 2011-11-09 Mark Hahnenberg <mhahnenberg@apple.com>
2791 De-virtualize JSVariableObject::isDynamicScope
2792 https://bugs.webkit.org/show_bug.cgi?id=71933
2794 Reviewed by Geoffrey Garen.
2796 * runtime/JSActivation.cpp:
2797 * runtime/JSActivation.h: Inlined and de-virtualized isDynamicScope
2798 (JSC::JSActivation::isDynamicScope):
2799 * runtime/JSGlobalObject.cpp:
2800 * runtime/JSGlobalObject.h: Inlined and de-virtualized isDynamicScope
2801 (JSC::JSGlobalObject::isDynamicScope):
2802 * runtime/JSStaticScopeObject.cpp:
2803 * runtime/JSStaticScopeObject.h: Inlined and de-virtualized isDynamicScope
2804 (JSC::JSStaticScopeObject::createStructure): Changed createStructure to use new JSType
2805 (JSC::JSStaticScopeObject::isDynamicScope):
2806 * runtime/JSType.h: Added new type for JSStaticScopeObject
2807 * runtime/JSVariableObject.cpp: De-virtualized and added an implementation that checks the
2808 object's type and calls the corresponding implementation.
2809 (JSC::JSVariableObject::isDynamicScope):
2810 * runtime/JSVariableObject.h:
2812 2011-11-09 Mark Hahnenberg <mhahnenberg@apple.com>
2814 De-virtualize JSGlobalObject::hasOwnPropertyForWrite
2815 https://bugs.webkit.org/show_bug.cgi?id=71934
2817 Reviewed by Geoffrey Garen.
2819 * runtime/JSGlobalObject.h: Removed the virtual-ness of hasOwnPropertyForWrite since nobody overrides it.
2821 2011-11-09 Gavin Barraclough <barraclough@apple.com>
2823 https://bugs.webkit.org/show_bug.cgi?id=71873
2825 Reviewed by Geoff Garen.
2827 Incrementally re-landing these changes, trying to determine what went wrong.
2828 (The whole patch failed tests on the build bot but worked locally.
2830 * assembler/MacroAssemblerARM.h:
2831 (JSC::MacroAssemblerARM::absDouble):
2832 * assembler/MacroAssemblerARMv7.h:
2833 * assembler/MacroAssemblerMIPS.h:
2834 (JSC::MacroAssemblerMIPS::absDouble):
2835 * assembler/MacroAssemblerSH4.h:
2836 (JSC::MacroAssemblerSH4::absDouble):
2837 * assembler/MacroAssemblerX86.h:
2838 (JSC::MacroAssemblerX86::absDouble):
2839 * assembler/MacroAssemblerX86Common.h:
2840 * assembler/MacroAssemblerX86_64.h:
2841 (JSC::MacroAssemblerX86_64::absDouble):
2842 * dfg/DFGSpeculativeJIT32_64.cpp:
2843 (JSC::DFG::SpeculativeJIT::compile):
2844 * dfg/DFGSpeculativeJIT64.cpp:
2845 (JSC::DFG::SpeculativeJIT::compile):
2846 * jit/ThunkGenerators.cpp:
2847 (JSC::absThunkGenerator):
2849 2011-11-09 Mark Hahnenberg <mhahnenberg@apple.com>
2851 De-virtualize JSObject::getOwnPropertyDescriptor
2852 https://bugs.webkit.org/show_bug.cgi?id=71523
2854 Reviewed by Sam Weinig.
2856 Added getOwnPropertyDescriptor to the MethodTable, changed all of the
2857 virtual versions of getOwnPropertyDescriptor to static ones, and
2858 changed all of the call sites to the corresponding lookup in the MethodTable.
2860 * API/JSCallbackObject.h:
2861 * API/JSCallbackObjectFunctions.h:
2862 (JSC::::getOwnPropertyDescriptor):
2863 * JavaScriptCore.exp:
2864 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2865 * debugger/DebuggerActivation.cpp:
2866 (JSC::DebuggerActivation::getOwnPropertyDescriptor):
2867 * debugger/DebuggerActivation.h:
2868 * runtime/Arguments.cpp:
2869 (JSC::Arguments::getOwnPropertyDescriptor):
2870 * runtime/Arguments.h:
2871 * runtime/ArrayConstructor.cpp:
2872 (JSC::ArrayConstructor::getOwnPropertyDescriptor):
2873 * runtime/ArrayConstructor.h:
2874 * runtime/ArrayPrototype.cpp:
2875 (JSC::ArrayPrototype::getOwnPropertyDescriptor):
2876 * runtime/ArrayPrototype.h:
2877 * runtime/BooleanPrototype.cpp:
2878 (JSC::BooleanPrototype::getOwnPropertyDescriptor):
2879 * runtime/BooleanPrototype.h:
2880 * runtime/ClassInfo.h:
2881 * runtime/DateConstructor.cpp:
2882 (JSC::DateConstructor::getOwnPropertyDescriptor):
2883 * runtime/DateConstructor.h:
2884 * runtime/DatePrototype.cpp:
2885 (JSC::DatePrototype::getOwnPropertyDescriptor):
2886 * runtime/DatePrototype.h:
2887 * runtime/ErrorPrototype.cpp:
2888 (JSC::ErrorPrototype::getOwnPropertyDescriptor):
2889 * runtime/ErrorPrototype.h:
2890 * runtime/JSArray.cpp:
2891 (JSC::JSArray::getOwnPropertyDescriptor):
2892 * runtime/JSArray.h:
2893 * runtime/JSByteArray.cpp:
2894 (JSC::JSByteArray::getOwnPropertyDescriptor):
2895 * runtime/JSByteArray.h:
2896 * runtime/JSCell.cpp:
2897 (JSC::JSCell::getOwnPropertyDescriptor):
2899 * runtime/JSFunction.cpp:
2900 (JSC::JSFunction::getOwnPropertyDescriptor):
2901 * runtime/JSFunction.h:
2902 * runtime/JSGlobalObject.cpp:
2903 (JSC::JSGlobalObject::getOwnPropertyDescriptor):
2904 * runtime/JSGlobalObject.h:
2905 * runtime/JSNotAnObject.cpp:
2906 (JSC::JSNotAnObject::getOwnPropertyDescriptor):
2907 * runtime/JSNotAnObject.h:
2908 * runtime/JSONObject.cpp:
2909 (JSC::JSONObject::getOwnPropertyDescriptor):
2910 * runtime/JSONObject.h:
2911 * runtime/JSObject.cpp:
2912 (JSC::JSObject::vtableAnchor):
2913 (JSC::JSObject::propertyIsEnumerable):
2914 (JSC::JSObject::getOwnPropertyDescriptor):
2915 (JSC::JSObject::getPropertyDescriptor):
2916 (JSC::JSObject::defineOwnProperty):
2917 * runtime/JSObject.h:
2918 * runtime/JSString.cpp: Removed getOwnPropertyDescriptor, since this seems to be a relic from a
2919 bygone era when getOwnPropertyDescriptor was rooted in JSCell rather than JSObject. There were
2920 no call sites for this version of getOwnPropertyDescriptor in the entire project.
2921 * runtime/JSString.h:
2923 (JSC::getStaticPropertyDescriptor):
2924 (JSC::getStaticFunctionDescriptor):
2925 (JSC::getStaticValueDescriptor):
2926 * runtime/MathObject.cpp:
2927 (JSC::MathObject::getOwnPropertyDescriptor):
2928 * runtime/MathObject.h:
2929 * runtime/NumberConstructor.cpp:
2930 (JSC::NumberConstructor::getOwnPropertyDescriptor):
2931 * runtime/NumberConstructor.h:
2932 * runtime/NumberPrototype.cpp:
2933 (JSC::NumberPrototype::getOwnPropertyDescriptor):
2934 * runtime/NumberPrototype.h:
2935 * runtime/ObjectConstructor.cpp:
2936 (JSC::ObjectConstructor::getOwnPropertyDescriptor):
2937 (JSC::objectConstructorGetOwnPropertyDescriptor):
2938 * runtime/ObjectConstructor.h:
2939 * runtime/ObjectPrototype.cpp:
2940 (JSC::ObjectPrototype::getOwnPropertyDescriptor):
2941 * runtime/ObjectPrototype.h:
2942 * runtime/RegExpConstructor.cpp:
2943 (JSC::RegExpConstructor::getOwnPropertyDescriptor):
2944 * runtime/RegExpConstructor.h:
2945 * runtime/RegExpMatchesArray.h:
2946 (JSC::RegExpMatchesArray::getOwnPropertyDescriptor):
2947 * runtime/RegExpObject.cpp:
2948 (JSC::RegExpObject::getOwnPropertyDescriptor):
2949 * runtime/RegExpObject.h:
2950 * runtime/RegExpPrototype.cpp:
2951 (JSC::RegExpPrototype::getOwnPropertyDescriptor):
2952 * runtime/RegExpPrototype.h:
2953 * runtime/StringConstructor.cpp:
2954 (JSC::StringConstructor::getOwnPropertyDescriptor):
2955 * runtime/StringConstructor.h:
2956 * runtime/StringObject.cpp:
2957 (JSC::StringObject::vtableAnchor): Added to prevent a weak vtable.
2958 (JSC::StringObject::getOwnPropertyDescriptor):
2959 * runtime/StringObject.h:
2960 * runtime/StringPrototype.cpp:
2961 (JSC::StringPrototype::getOwnPropertyDescriptor):
2962 * runtime/StringPrototype.h:
2964 2011-11-09 Gavin Barraclough <barraclough@apple.com>
2966 https://bugs.webkit.org/show_bug.cgi?id=71873
2968 Reviewed by Geoff Garen.
2970 Incrementally re-landing these changes, trying to determine what went wrong.
2971 (The whole patch failed tests on the build bot but worked locally.
2973 * assembler/MacroAssemblerARM.h:
2974 (JSC::MacroAssemblerARM::supportsFloatingPoint):
2975 (JSC::MacroAssemblerARM::supportsFloatingPointTruncate):
2976 (JSC::MacroAssemblerARM::supportsFloatingPointSqrt):
2977 (JSC::MacroAssemblerARM::supportsFloatingPointAbs):
2978 * assembler/MacroAssemblerARMv7.h:
2979 (JSC::MacroAssemblerARMv7::supportsFloatingPoint):
2980 (JSC::MacroAssemblerARMv7::supportsFloatingPointTruncate):
2981 (JSC::MacroAssemblerARMv7::supportsFloatingPointSqrt):
2982 (JSC::MacroAssemblerARMv7::supportsFloatingPointAbs):
2983 * assembler/MacroAssemblerMIPS.h:
2984 (JSC::MacroAssemblerMIPS::supportsFloatingPoint):
2985 (JSC::MacroAssemblerMIPS::supportsFloatingPointTruncate):
2986 (JSC::MacroAssemblerMIPS::supportsFloatingPointSqrt):
2987 (JSC::MacroAssemblerMIPS::supportsFloatingPointAbs):
2988 * assembler/MacroAssemblerSH4.h:
2989 (JSC::MacroAssemblerSH4::supportsFloatingPoint):
2990 (JSC::MacroAssemblerSH4::supportsFloatingPointTruncate):
2991 (JSC::MacroAssemblerSH4::supportsFloatingPointSqrt):
2992 (JSC::MacroAssemblerSH4::supportsFloatingPointAbs):
2993 * assembler/MacroAssemblerX86.h:
2994 (JSC::MacroAssemblerX86::supportsFloatingPoint):
2995 (JSC::MacroAssemblerX86::supportsFloatingPointTruncate):
2996 (JSC::MacroAssemblerX86::supportsFloatingPointSqrt):
2997 (JSC::MacroAssemblerX86::supportsFloatingPointAbs):
2998 * assembler/MacroAssemblerX86_64.h:
2999 (JSC::MacroAssemblerX86_64::supportsFloatingPoint):
3000 (JSC::MacroAssemblerX86_64::supportsFloatingPointTruncate):
3001 (JSC::MacroAssemblerX86_64::supportsFloatingPointSqrt):
3002 (JSC::MacroAssemblerX86_64::supportsFloatingPointAbs):
3003 * jit/ThunkGenerators.cpp:
3004 (JSC::absThunkGenerator):
3006 2011-11-08 Darin Adler <darin@apple.com>
3008 Add code path in HashTable for emptyValueIsZero that does not require copying the empty value
3009 https://bugs.webkit.org/show_bug.cgi?id=71875
3011 Reviewed by Anders Carlsson.
3013 This is a step along the path of making OwnPtr work as HashMap value types.
3015 * wtf/Alignment.h: Moved the AlignedBufferChar and AlignedBuffer types from Vector.h here.
3016 Also fixed include style. To include other WTF headers inside WTF, we use "" includes.
3017 I did not change the code to fix style checker complaints.
3019 * wtf/HashTable.h: Added includes as needed and fixed include style.
3020 (WTF::doubleHash): Removed the uneeeded and inappropriate "static" in this function, which
3021 gave it internal linkage for no good reason.
3022 (WTF::HashTable::checkKey): Made this use AlignedBuffer for the deleted value check to avoid
3023 construction/destruction problems instead of doing the trick where we construct and destroy
3024 an empty value twice. It's cleaner and simpler and avoids copying the empty value.
3025 (WTF::HashTable::initializeBucket): Specialized initializeBucket to use memset when the
3026 empty value is zero rather than copying an empty value.
3028 * wtf/Vector.h: Moved the AlignedBufferChar and AlignedBuffer types into Alignment.h.
3030 2011-11-09 Gabor Rapcsanyi <rgabor@webkit.org>
3032 Buildfix for 32bit debug mode.
3034 Reviewed by Csaba Osztrogonác.
3036 * dfg/DFGAbstractState.cpp:
3037 (JSC::DFG::AbstractState::dump):
3039 (JSC::DFG::Graph::dump):
3041 2011-11-09 Andy Wingo <wingo@igalia.com>
3043 Enable the DFG JIT on X86-64 Linux platforms
3044 https://bugs.webkit.org/show_bug.cgi?id=71373
3046 Reviewed by Csaba Osztrogonác.
3048 * wtf/Platform.h (ENABLE_DFG_JIT): Enable the DFG JIT on the
3049 x86-64 GNU/Linux platform.
3050 * CMakeListsEfl.txt: Add JSValue64 implementations to EFL build.
3052 2011-11-09 Csaba Osztrogonác <ossy@webkit.org>
3054 Enable the DFG JIT on x86-64 Linux platforms
3055 https://bugs.webkit.org/show_bug.cgi?id=71373
3057 Enable DFG JIT by default on X86 Linux and Mac platforms
3058 https://bugs.webkit.org/show_bug.cgi?id=71686
3060 Buildfix for stricter compilers: -Werror=unused-but-set-variable
3062 Reviewed by Zoltan Herczeg.
3064 * dfg/DFGSpeculativeJIT.cpp:
3065 (JSC::DFG::SpeculativeJIT::compilePutByValForByteArray):
3066 * dfg/DFGSpeculativeJIT32_64.cpp:
3067 (JSC::DFG::SpeculativeJIT::compile):
3068 * dfg/DFGSpeculativeJIT64.cpp:
3069 (JSC::DFG::SpeculativeJIT::compile):
3071 2011-11-09 Sheriff Bot <webkit.review.bot@gmail.com>
3073 Unreviewed, rolling out r99678.
3074 http://trac.webkit.org/changeset/99678
3075 https://bugs.webkit.org/show_bug.cgi?id=71882
3077 broke the build with -Werror=unused-but-set-variable
3078 (Requested by tronical_ on #webkit).
3080 * CMakeListsEfl.txt:
3083 2011-11-09 Andy Wingo <wingo@igalia.com>
3085 Enable the DFG JIT on X86-64 Linux platforms
3086 https://bugs.webkit.org/show_bug.cgi?id=71373
3088 Reviewed by Filip Pizlo.
3090 * wtf/Platform.h (ENABLE_DFG_JIT): Enable the DFG JIT on the
3091 x86-64 GNU/Linux platform.
3092 * CMakeListsEfl.txt: Add JSValue64 implementations to EFL build.
3094 2011-11-09 Mark Hahnenberg <mhahnenberg@apple.com>
3096 De-virtualize JSObject::defineOwnProperty
3097 https://bugs.webkit.org/show_bug.cgi?id=71429
3099 Reviewed by Geoffrey Garen.
3101 Added defineOwnProperty to the MethodTable, changed all the virtual
3102 implementations of defineOwnProperty to static ones, and replaced
3103 all call sites with corresponding lookups in the MethodTable.
3105 * JavaScriptCore.exp:
3106 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3107 * runtime/Arguments.cpp:
3108 (JSC::Arguments::createStrictModeCallerIfNecessary):
3109 (JSC::Arguments::createStrictModeCalleeIfNecessary):
3110 * runtime/ClassInfo.h:
3111 * runtime/JSCell.cpp:
3112 (JSC::JSCell::defineOwnProperty):
3114 * runtime/JSObject.cpp:
3115 (JSC::JSObject::defineOwnProperty):
3116 * runtime/JSObject.h:
3117 * runtime/ObjectConstructor.cpp:
3118 (JSC::objectConstructorDefineProperty):
3119 (JSC::defineProperties):
3121 2011-11-09 Simon Hausmann <simon.hausmann@nokia.com>
3123 [Qt] Build system cleanup
3124 https://bugs.webkit.org/show_bug.cgi?id=71815
3126 Reviewed by Kenneth Rohde Christiansen.
3128 * wtf/wtf.pri: Moved the glib dependency to javascriptcore.prf.
3130 2011-11-08 Simon Hausmann <simon.hausmann@nokia.com>
3132 [Qt] Replace use of QApplication with QGuiApplication
3133 https://bugs.webkit.org/show_bug.cgi?id=71794
3135 Reviewed by Andreas Kling.
3137 Add compat headers for use when building with Qt 4: QGuiApplication
3138 is typedef'ed to QApplication.
3140 * wtf/qt/compat/QGuiApplication: Added.
3141 * wtf/qt/compat/qguiapplication.h: Added.
3143 2011-11-08 Sheriff Bot <webkit.review.bot@gmail.com>
3145 Unreviewed, rolling out r99647.
3146 http://trac.webkit.org/changeset/99647
3147 https://bugs.webkit.org/show_bug.cgi?id=71876
3149 It broke jsc and layout tests on all bot (Requested by
3150 Ossy_night on #webkit).
3152 * assembler/MacroAssemblerARM.h:
3153 (JSC::MacroAssemblerARM::supportsFloatingPoint):
3154 (JSC::MacroAssemblerARM::supportsFloatingPointTruncate):
3155 (JSC::MacroAssemblerARM::supportsFloatingPointSqrt):
3156 (JSC::MacroAssemblerARM::supportsDoubleBitops):
3157 (JSC::MacroAssemblerARM::andnotDouble):
3158 * assembler/MacroAssemblerARMv7.h:
3159 (JSC::MacroAssemblerARMv7::supportsFloatingPoint):
3160 (JSC::MacroAssemblerARMv7::supportsFloatingPointTruncate):
3161 (JSC::MacroAssemblerARMv7::supportsFloatingPointSqrt):
3162 (JSC::MacroAssemblerARMv7::supportsDoubleBitops):
3163 * assembler/MacroAssemblerMIPS.h:
3164 (JSC::MacroAssemblerMIPS::andnotDouble):
3165 (JSC::MacroAssemblerMIPS::supportsFloatingPoint):
3166 (JSC::MacroAssemblerMIPS::supportsFloatingPointTruncate):
3167 (JSC::MacroAssemblerMIPS::supportsFloatingPointSqrt):
3168 (JSC::MacroAssemblerMIPS::supportsDoubleBitops):
3169 * assembler/MacroAssemblerSH4.h:
3170 (JSC::MacroAssemblerSH4::supportsFloatingPoint):
3171 (JSC::MacroAssemblerSH4::supportsFloatingPointTruncate):
3172 (JSC::MacroAssemblerSH4::supportsFloatingPointSqrt):
3173 (JSC::MacroAssemblerSH4::supportsDoubleBitops):
3174 (JSC::MacroAssemblerSH4::andnotDouble):
3175 * assembler/MacroAssemblerX86.h:
3176 (JSC::MacroAssemblerX86::MacroAssemblerX86):
3177 (JSC::MacroAssemblerX86::supportsFloatingPoint):
3178 (JSC::MacroAssemblerX86::supportsFloatingPointTruncate):
3179 (JSC::MacroAssemblerX86::supportsFloatingPointSqrt):
3180 (JSC::MacroAssemblerX86::supportsDoubleBitops):
3181 * assembler/MacroAssemblerX86Common.h:
3182 (JSC::MacroAssemblerX86Common::andnotDouble):
3183 * assembler/MacroAssemblerX86_64.h:
3184 (JSC::MacroAssemblerX86_64::supportsFloatingPoint):
3185 (JSC::MacroAssemblerX86_64::supportsFloatingPointTruncate):
3186 (JSC::MacroAssemblerX86_64::supportsFloatingPointSqrt):
3187 (JSC::MacroAssemblerX86_64::supportsDoubleBitops):
3188 * assembler/X86Assembler.h:
3189 * dfg/DFGByteCodeParser.cpp:
3190 (JSC::DFG::ByteCodeParser::handleIntrinsic):
3191 * dfg/DFGSpeculativeJIT32_64.cpp:
3192 (JSC::DFG::SpeculativeJIT::compile):
3193 * dfg/DFGSpeculativeJIT64.cpp:
3194 (JSC::DFG::SpeculativeJIT::compile):
3195 * jit/ThunkGenerators.cpp:
3196 (JSC::absThunkGenerator):
3197 * runtime/JSGlobalData.cpp:
3199 2011-11-08 Gavin Barraclough <barraclough@apple.com>
3201 Better abstract 'abs' operation through the MacroAssembler.
3202 https://bugs.webkit.org/show_bug.cgi?id=71873
3204 Reviewed by Geoff Garen.
3206 Currently the x86 specific instruction sequence to perform a double abs
3207 is duplicated throughout the JITs / thunk generators.
3209 * assembler/MacroAssemblerARM.h:
3210 (JSC::MacroAssemblerARM::supportsFloatingPoint):
3211 (JSC::MacroAssemblerARM::supportsFloatingPointTruncate):
3212 (JSC::MacroAssemblerARM::supportsFloatingPointSqrt):
3213 (JSC::MacroAssemblerARM::supportsFloatingPointAbs):
3214 (JSC::MacroAssemblerARM::absDouble):
3215 - Renamed supportsFloatingPointAbs, make these methods static so that
3216 we can check the JIT's capabilites before we begin compilation.
3217 * assembler/MacroAssemblerARMv7.h:
3218 (JSC::MacroAssemblerARMv7::supportsFloatingPoint):
3219 (JSC::MacroAssemblerARMv7::supportsFloatingPointTruncate):
3220 (JSC::MacroAssemblerARMv7::supportsFloatingPointSqrt):
3221 (JSC::MacroAssemblerARMv7::supportsFloatingPointAbs):
3222 - Renamed supportsFloatingPointAbs, make these methods static so that
3223 we can check the JIT's capabilites before we begin compilation.
3224 * assembler/MacroAssemblerMIPS.h:
3225 (JSC::MacroAssemblerMIPS::absDouble):
3226 (JSC::MacroAssemblerMIPS::supportsFloatingPoint):
3227 (JSC::MacroAssemblerMIPS::supportsFloatingPointTruncate):
3228 (JSC::MacroAssemblerMIPS::supportsFloatingPointSqrt):
3229 (JSC::MacroAssemblerMIPS::supportsFloatingPointAbs):
3230 - Renamed supportsFloatingPointAbs, make these methods static so that
3231 we can check the JIT's capabilites before we begin compilation.
3232 * assembler/MacroAssemblerSH4.h:
3233 (JSC::MacroAssemblerSH4::supportsFloatingPoint):
3234 (JSC::MacroAssemblerSH4::supportsFloatingPointTruncate):
3235 (JSC::MacroAssemblerSH4::supportsFloatingPointSqrt):
3236 (JSC::MacroAssemblerSH4::supportsFloatingPointAbs):
3237 (JSC::MacroAssemblerSH4::absDouble):
3238 - Renamed supportsFloatingPointAbs, make these methods static so that
3239 we can check the JIT's capabilites before we begin compilation.
3240 * assembler/MacroAssemblerX86.h:
3241 (JSC::MacroAssemblerX86::absDouble):
3242 (JSC::MacroAssemblerX86::supportsFloatingPoint):
3243 (JSC::MacroAssemblerX86::supportsFloatingPointTruncate):
3244 (JSC::MacroAssemblerX86::supportsFloatingPointSqrt):
3245 (JSC::MacroAssemblerX86::supportsFloatingPointAbs):
3246 - Made supports* methods static so that we can check the JIT's
3247 capabilites before we begin compilation. Added absDouble.
3248 * assembler/MacroAssemblerX86Common.h:
3249 - Removed andnotDouble, added s_maskSignBit.
3250 * assembler/MacroAssemblerX86_64.h:
3251 (JSC::MacroAssemblerX86_64::absDouble):
3252 (JSC::MacroAssemblerX86_64::supportsFloatingPoint):
3253 (JSC::MacroAssemblerX86_64::supportsFloatingPointTruncate):
3254 (JSC::MacroAssemblerX86_64::supportsFloatingPointSqrt):
3255 (JSC::MacroAssemblerX86_64::supportsFloatingPointAbs):
3256 - Made supports* methods static so that we can check the JIT's
3257 capabilites before we begin compilation. Added absDouble.
3258 * assembler/X86Assembler.h:
3259 (JSC::X86Assembler::andpd_rr):
3260 (JSC::X86Assembler::andpd_mr):
3261 - Added support for andpd instruction.
3262 * dfg/DFGByteCodeParser.cpp:
3263 (JSC::DFG::ByteCodeParser::handleIntrinsic):
3264 - Added checks for supportsFloatingPointAbs, supportsFloatingPointSqrt.
3265 * dfg/DFGSpeculativeJIT32_64.cpp:
3266 (JSC::DFG::SpeculativeJIT::compile):
3267 - Switched to use doubleAbs, we can now also reuse the operand register for the result.
3268 * dfg/DFGSpeculativeJIT64.cpp:
3269 (JSC::DFG::SpeculativeJIT::compile):
3270 - Switched to use doubleAbs, we can now also reuse the operand register for the result.
3271 * jit/ThunkGenerators.cpp:
3272 - Switched to use doubleAbs.
3273 (JSC::absThunkGenerator):
3274 * runtime/JSGlobalData.cpp:
3275 - Declared MacroAssemblerX86Common::s_maskSignBit here.
3276 This is a little ugly, but it doesn't seem worth adding a whole extra .cpp
3277 to the compile for just one constant.
3279 2011-11-08 Gavin Barraclough <barraclough@apple.com>
3281 Move duplicates of SYMBOL_STRING* macros to the single location
3282 https://bugs.webkit.org/show_bug.cgi?id=71456
3284 Reviewed by Sam Weinig.
3286 * JavaScriptCore.xcodeproj/project.pbxproj:
3287 * dfg/DFGOperations.cpp:
3289 * wtf/InlineASM.h: Added.
3290 - Moved asm related macros.
3292 2011-11-08 Gavin Barraclough <barraclough@apple.com>
3294 Move code to handle 8bit regs from X86Assembler to MacroAssembler
3295 https://bugs.webkit.org/show_bug.cgi?id=71867
3297 Reviewed by Oliver Hunt.
3299 This code is fine, but is in the wrong place really. X86 assembler should
3300 basically just format up exactly the instruction you request - not expand
3301 out to a set of instructions (that is what the macro assembler layer is
3302 for!). For other 8-bit ops, on X86 we don't guard against clients accessing
3305 * assembler/MacroAssemblerX86Common.h:
3306 (JSC::MacroAssemblerX86Common::store8):
3307 * assembler/X86Assembler.h:
3308 (JSC::X86Assembler::movb_rm):
3311 2011-11-08 Filip Pizlo <fpizlo@apple.com>
3313 Unreviewed build fix for GTK.
3315 * GNUmakefile.list.am:
3317 2011-11-08 Gavin Barraclough <barraclough@apple.com>
3321 * assembler/X86Assembler.h:
3323 2011-11-08 Gavin Barraclough <barraclough@apple.com>
3325 Errrk, failed to commit this in last change.
3327 * assembler/X86Assembler.h:
3329 2011-11-08 Gavin Barraclough <barraclough@apple.com>
3331 Remove an unused method.
3333 Rubber stamped by Geoff Garen.
3335 * assembler/AbstractMacroAssembler.h:
3336 * assembler/AssemblerBuffer.h:
3337 - removed rewindToLabel.
3339 2011-11-08 Gavin Barraclough <barraclough@apple.com>
3341 Fix OSR entry points to calculate offsets correctly WRT to branch compaction.
3342 https://bugs.webkit.org/show_bug.cgi?id=71864
3344 Reviewed by Filip Pizlo.
3346 * assembler/LinkBuffer.h:
3347 (JSC::LinkBuffer::offsetOf):
3348 - We use this to return the offsets into the code of the entry points.
3349 * dfg/DFGJITCompiler.cpp:
3350 (JSC::DFG::JITCompiler::compileEntry):
3351 (JSC::DFG::JITCompiler::compileBody):
3352 (JSC::DFG::JITCompiler::compile):
3353 (JSC::DFG::JITCompiler::compileFunction):
3354 - Move the construction of the speculative JIT outside of
3355 compileBody, such that it is still available to link the
3356 OSR entry points at the point we are linking.
3357 * dfg/DFGJITCompiler.h:
3358 (JSC::DFG::JITCompiler::noticeOSREntry):
3359 - Pass the label of the block & linkbuffer into noticeOSREntry.
3360 * dfg/DFGSpeculativeJIT.cpp:
3361 (JSC::DFG::SpeculativeJIT::compile):
3362 (JSC::DFG::SpeculativeJIT::linkOSREntries):
3363 - Moved call to noticeOSREntry until we we linking.
3364 * dfg/DFGSpeculativeJIT.h:
3366 (JSC::JIT::privateCompileMainPass):
3367 (JSC::JIT::privateCompileSlowCases):
3368 (JSC::JIT::privateCompile):
3369 - Moved calculation of entries until we we linking.
3371 - Removed some members.
3373 2011-11-08 Filip Pizlo <fpizlo@apple.com>
3375 DFG OSR exit code should be generated by a separate compiler, not
3376 related to DFG::JITCompiler
3377 https://bugs.webkit.org/show_bug.cgi?id=71787
3379 Reviewed by Gavin Barraclough.
3381 Moves the exitSpeculativeWithOSR() method from JITCompiler to
3382 OSRExitCompiler::compileExit().
3384 * CMakeListsEfl.txt:
3385 * JavaScriptCore.xcodeproj/project.pbxproj:
3387 * dfg/DFGJITCompiler.cpp:
3388 (JSC::DFG::JITCompiler::linkOSRExits):
3389 * dfg/DFGJITCompiler32_64.cpp: Removed.
3390 * dfg/DFGOSRExitCompiler.h: Added.
3391 (JSC::DFG::OSRExitCompiler::OSRExitCompiler):
3392 * dfg/DFGOSRExitCompiler32_64.cpp: Added.
3393 (JSC::DFG::OSRExitCompiler::compileExit):
3394 * dfg/DFGOSRExitCompiler64.cpp: Added.
3395 (JSC::DFG::OSRExitCompiler::compileExit):
3396 * runtime/JSValue.h:
3398 2011-11-08 Filip Pizlo <fpizlo@apple.com>