1 2011-11-21 Filip Pizlo <fpizlo@apple.com>
3 Another attempt at a build fix.
6 (JSC::DFG::dfgResetGetByID):
7 (JSC::DFG::dfgResetPutByID):
9 2011-11-20 Filip Pizlo <fpizlo@apple.com>
11 Unreviewed interpreter build fix.
13 * bytecode/CodeBlock.cpp:
14 (JSC::CodeBlock::finalizeUnconditionally):
17 2011-11-20 Yuqiang Xian <yuqiang.xian@intel.com>
19 Improve modulo operation on 32bit platforms
20 https://bugs.webkit.org/show_bug.cgi?id=72501
22 Reviewed by Filip Pizlo.
24 Extend softModulo to support X86 and MIPS in baseline JIT.
25 Apply the same optimization to 32bit DFG JIT.
26 1% gain on Kraken, tested on Linux Core i7 Nehalem 32bit.
28 * dfg/DFGSpeculativeJIT.h:
29 * dfg/DFGSpeculativeJIT32_64.cpp:
30 (JSC::DFG::SpeculativeJIT::compileSoftModulo):
31 (JSC::DFG::SpeculativeJIT::compile):
32 * jit/JITArithmetic32_64.cpp:
33 (JSC::JIT::emit_op_mod):
34 (JSC::JIT::emitSlow_op_mod):
35 * jit/JITOpcodes32_64.cpp:
36 (JSC::JIT::softModulo):
39 2011-11-18 Filip Pizlo <fpizlo@apple.com>
41 Inline caches that refer to otherwise dead objects should be cleared
42 https://bugs.webkit.org/show_bug.cgi?id=72311
44 Reviewed by Geoff Garen.
46 DFG code blocks now participate in the weak reference harvester fixpoint
47 so that they only consider themselves to be live if either they are
48 currently executing, or their owner is live and all of their weak references
49 are live. If not, the relevant code blocks are jettisoned.
51 Inline caches in both the old JIT and the DFG are now cleared if any of
52 their references are not marked at the end of a GC.
54 This is performance-neutral on SunSpider, V8, and Kraken. With the clear-
55 all-code-on-GC policy that we currently have, it shows a slight reduction
56 in memory usage. If we turn that policy off, it's pretty easy to come up
57 with an example program that will cause ToT to experience linear heap
58 growth, while with this patch, the heap stays small and remains at a
61 * assembler/ARMv7Assembler.h:
62 (JSC::ARMv7Assembler::readCallTarget):
63 * assembler/MacroAssemblerARMv7.h:
64 (JSC::MacroAssemblerARMv7::readCallTarget):
65 * assembler/MacroAssemblerX86.h:
66 (JSC::MacroAssemblerX86::readCallTarget):
67 * assembler/MacroAssemblerX86_64.h:
68 (JSC::MacroAssemblerX86_64::readCallTarget):
69 * bytecode/CodeBlock.cpp:
70 (JSC::CodeBlock::visitAggregate):
71 (JSC::CodeBlock::performTracingFixpointIteration):
72 (JSC::CodeBlock::visitWeakReferences):
73 (JSC::CodeBlock::finalizeUnconditionally):
74 (JSC::CodeBlock::stronglyVisitStrongReferences):
75 (JSC::MethodCallLinkInfo::reset):
76 (JSC::ProgramCodeBlock::jettison):
77 (JSC::EvalCodeBlock::jettison):
78 (JSC::FunctionCodeBlock::jettison):
79 * bytecode/CodeBlock.h:
80 (JSC::CodeBlock::reoptimize):
81 (JSC::CodeBlock::shouldImmediatelyAssumeLivenessDuringScan):
82 * bytecode/Instruction.h:
83 (JSC::PolymorphicAccessStructureList::visitWeak):
84 * bytecode/StructureStubInfo.cpp:
85 (JSC::StructureStubInfo::visitWeakReferences):
86 * bytecode/StructureStubInfo.h:
87 (JSC::isGetByIdAccess):
88 (JSC::isPutByIdAccess):
89 (JSC::StructureStubInfo::reset):
90 * dfg/DFGJITCompiler.cpp:
91 (JSC::DFG::JITCompiler::link):
92 * dfg/DFGOperations.cpp:
94 (JSC::DFG::dfgRepatchByIdSelfAccess):
95 (JSC::DFG::dfgResetGetByID):
96 (JSC::DFG::dfgResetPutByID):
98 (JSC::DFG::dfgResetGetByID):
99 (JSC::DFG::dfgResetPutByID):
101 * jit/JITPropertyAccess.cpp:
102 (JSC::JIT::resetPatchGetById):
103 (JSC::JIT::resetPatchPutById):
104 * jit/JITPropertyAccess32_64.cpp:
105 (JSC::JIT::resetPatchGetById):
106 (JSC::JIT::resetPatchPutById):
108 (JSC::DEFINE_STUB_FUNCTION):
109 * jit/JITWriteBarrier.h:
110 (JSC::JITWriteBarrierBase::clearToMaxUnsigned):
112 2011-11-20 Filip Pizlo <fpizlo@apple.com>
114 Showing the data overlay in OpenStreetMap doesn't work, zooming partially broken
115 https://bugs.webkit.org/show_bug.cgi?id=71505
117 Reviewed by Oliver Hunt.
119 The bytecode generator was assuming that call_varargs never reuses the base register
120 (i.e. the function being called) for the result. This is no longer true.
122 * bytecompiler/BytecodeGenerator.cpp:
123 (JSC::BytecodeGenerator::emitCallVarargs):
124 * bytecompiler/BytecodeGenerator.h:
125 * bytecompiler/NodesCodegen.cpp:
126 (JSC::ApplyFunctionCallDotNode::emitBytecode):
128 2011-11-20 Filip Pizlo <fpizlo@apple.com>
130 DFG 32_64 should directly store double virtual registers on SetLocal
131 https://bugs.webkit.org/show_bug.cgi?id=72845
133 Reviewed by Oliver Hunt.
137 * dfg/DFGSpeculativeJIT32_64.cpp:
138 (JSC::DFG::SpeculativeJIT::compile):
140 2011-11-20 Noel Gordon <noel.gordon@gmail.com>
142 [chromium] Remove DFG::JITCodeGenerator from the gyp projects
143 https://bugs.webkit.org/show_bug.cgi?id=72842
145 Reviewed by Filip Pizlo.
147 dfg/DFGJITCodeGenerator.{h,cpp} were removed in r100244
149 * JavaScriptCore.gypi: remove dfg/DFGJITCodeGenerator.{h,cpp}
151 2011-11-18 Daniel Bates <dbates@rim.com>
153 Add CMake build infrastructure for the BlackBerry port
154 https://bugs.webkit.org/show_bug.cgi?id=72768
156 Reviewed by Antonio Gomes.
158 * PlatformBlackBerry.cmake: Added.
159 * shell/PlatformBlackBerry.cmake: Added.
160 * wtf/PlatformBlackBerry.cmake: Added.
162 2011-11-18 Filip Pizlo <fpizlo@apple.com>
164 DFG JIT fails speculation on InstanceOf if the base is not an object
165 https://bugs.webkit.org/show_bug.cgi?id=72709
167 Reviewed by Geoff Garen.
169 InstanceOf already leverages the fact that we only allow the default
170 hasInstance implementation. So, if the base is predicted to possibly
171 be not an object and the CFA has not yet proven otherwise, InstanceOf
172 will abstain from speculating cell and instead return false if the
175 This appears to be a 1% speed-up on V8 on the V8 harness. 3-4% or so
176 speed-up in earley-boyer. Neutral according to bencher on SunSpider,
177 V8, and Kraken. In 32-bit, it's a 0.5% win on SunSpider and a 1.9%
178 win on V8 even on my harness, due to a 12.5% win on earley-boyer.
180 I also took this opportunity to make the code for InstanceOf common
181 between the two JITs. This was partially successful, in that the
182 "common code" has a bunch of #if's, but overall it seems like a code
185 * dfg/DFGAbstractState.cpp:
186 (JSC::DFG::AbstractState::execute):
187 * dfg/DFGSpeculativeJIT.cpp:
188 (JSC::DFG::SpeculativeJIT::compileInstanceOfForObject):
189 (JSC::DFG::SpeculativeJIT::compileInstanceOf):
190 * dfg/DFGSpeculativeJIT.h:
191 * dfg/DFGSpeculativeJIT32_64.cpp:
192 (JSC::DFG::SpeculativeJIT::compile):
193 * dfg/DFGSpeculativeJIT64.cpp:
194 (JSC::DFG::SpeculativeJIT::compile):
196 2011-11-18 Mark Hahnenberg <mhahnenberg@apple.com>
198 Forgot to completely de-virtualize isDynamicScope
199 https://bugs.webkit.org/show_bug.cgi?id=72763
201 Reviewed by Darin Adler.
203 * runtime/JSActivation.h: Removed virtual keyword.
205 2011-11-18 Filip Pizlo <fpizlo@apple.com>
207 Crash in JSC::DFG::OSRExitCompiler::compileExit(JSC::DFG::OSRExit const&, JSC::DFG::SpeculationRecovery*)
208 https://bugs.webkit.org/show_bug.cgi?id=72292
210 Reviewed by Darin Adler.
214 * dfg/DFGOSRExitCompiler32_64.cpp:
215 (JSC::DFG::OSRExitCompiler::compileExit):
217 2011-11-18 Mark Hahnenberg <mhahnenberg@apple.com>
219 De-virtualize ExecutableBase::intrinsic
220 https://bugs.webkit.org/show_bug.cgi?id=72548
222 Reviewed by Oliver Hunt.
224 * runtime/Executable.cpp:
225 (JSC::ExecutableBase::intrinsic): Dynamic cast to NativeExecutable. If successful, call intrinsic, otherwise return default value.
226 * runtime/Executable.h:
228 (JSC::jsDynamicCast): Add jsDynamicCast that duplicates the functionality of dynamic_cast in C++ but uses ClassInfo
229 rather than requiring C++ RTTI.
231 2011-11-18 Patrick Gansterer <paroga@webkit.org>
233 [CMake] Remove duplicate dtoa files from CMakeLists.txt
234 https://bugs.webkit.org/show_bug.cgi?id=72711
236 Reviewed by Brent Fulgham.
238 * wtf/CMakeLists.txt:
240 2011-11-17 Michael Saboff <msaboff@apple.com>
242 [Qt] REGRESSION(r100510): Enable 8 Bit Strings in JavaScriptCore
243 https://bugs.webkit.org/show_bug.cgi?id=72602
245 Fixed StringImpl::foldCase by adding return in the case we need to handle
246 folding of 8 bit strings with Latin-1 characters.
248 Fixed case where StringImpl::replace was using a char temp instead of an
251 Because of the second change, I changed other uses of char or
252 unsigned char to LChar.
254 Reviewed by Zoltan Herczeg.
256 * wtf/text/StringImpl.cpp:
257 (WTF::StringImpl::upper):
258 (WTF::StringImpl::foldCase):
260 (WTF::equalIgnoringCase):
261 (WTF::StringImpl::replace):
263 2011-11-17 Patrick Gansterer <paroga@webkit.org>
265 [CMake] Move FAST_MALLOC specific lines from Platform*.cmake to CMakeLists.txt
266 https://bugs.webkit.org/show_bug.cgi?id=72644
268 Reviewed by Brent Fulgham.
270 All ports need to do the same determination about fast malloc. Move the CMake code from
271 platform specific files into the generic one, so that additional ports can reuse it.
273 * wtf/CMakeLists.txt:
274 * wtf/PlatformEfl.cmake:
275 * wtf/PlatformWinCE.cmake:
277 2011-11-17 Mark Hahnenberg <mhahnenberg@apple.com>
279 Add finalizer to JSActivation
280 https://bugs.webkit.org/show_bug.cgi?id=72575
282 Reviewed by Geoffrey Garen.
284 * runtime/JSActivation.cpp:
285 (JSC::JSActivation::finishCreation): Attach finalize function to objects during creation.
286 (JSC::JSActivation::finalize):
287 * runtime/JSActivation.h: Replaced virtual destructor with static finalize function.
289 2011-11-15 Filip Pizlo <fpizlo@apple.com>
291 Code block jettisoning should be part of the GC's transitive closure
292 https://bugs.webkit.org/show_bug.cgi?id=72467
294 Reviewed by Geoff Garen.
296 Replaced JettisonedCodeBlocks with DFGCodeBlocks. The latter knows about all
297 DFG code blocks (i.e. those that may be jettisoned, and may have inlined weak
298 references) and helps track what state each of those code blocks is in during
299 GC. The state consists of two flags; mayBeExecuting, which tells if the code block
300 is live from call frames; and isJettisoned, which tells if the code block is
301 not owned by any executable and thus should be deleted as soon as it is not
304 - Not executing, Not jettisoned: The code block may or may not be reachable from
305 any executables, but it is owned by an executable, and hence should be
306 kept alive if its executable is live and if all of its weak references are
307 live. Otherwise it should be deleted during the current GC cycle, and its
308 outgoing references should not be scanned.
310 - Not executing but jettisoned: The code block should be deleted as soon as
311 possible and none of its outgoing references should be scanned.
313 - Executing but not jettisoned: The code block should be kept alive during this
314 GC cycle, and all of its outgoing references (including the weak ones)
315 should be scanned and marked strongly. The mayBeExecuting bit will be cleared at
316 the end of the GC cycle.
318 - Executing and jettisoned: The code block should be kept alive during this
319 GC cycle, and all of its outgoing references (including the weak ones)
320 should be scanned and marked strongly. However, on the next GC cycle, it
321 will have its mayBeExecuting bit cleared and hence it will become a candidate
322 for immediate deletion provided it is not executing again.
324 This is performance-neutral.
327 * GNUmakefile.list.am:
328 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
329 * JavaScriptCore.xcodeproj/project.pbxproj:
331 * bytecode/CodeBlock.cpp:
332 (JSC::CodeBlock::~CodeBlock):
333 * bytecode/CodeBlock.h:
334 (JSC::CodeBlock::setJITCode):
335 (JSC::CodeBlock::DFGData::DFGData):
336 (JSC::DFGCodeBlocks::mark):
337 * heap/ConservativeRoots.cpp:
338 (JSC::ConservativeRoots::add):
339 * heap/ConservativeRoots.h:
340 * heap/DFGCodeBlocks.cpp: Added.
341 (JSC::DFGCodeBlocks::DFGCodeBlocks):
342 (JSC::DFGCodeBlocks::~DFGCodeBlocks):
343 (JSC::DFGCodeBlocks::jettison):
344 (JSC::DFGCodeBlocks::clearMarks):
345 (JSC::DFGCodeBlocks::deleteUnmarkedJettisonedCodeBlocks):
346 (JSC::DFGCodeBlocks::traceMarkedCodeBlocks):
347 * heap/DFGCodeBlocks.h: Added.
349 (JSC::Heap::jettisonDFGCodeBlock):
350 (JSC::Heap::markRoots):
351 (JSC::Heap::collect):
353 * heap/JettisonedCodeBlocks.cpp: Removed.
354 * heap/JettisonedCodeBlocks.h: Removed.
355 * interpreter/RegisterFile.cpp:
356 (JSC::RegisterFile::gatherConservativeRoots):
357 * interpreter/RegisterFile.h:
358 * runtime/Executable.cpp:
359 (JSC::jettisonCodeBlock):
361 2011-11-16 Filip Pizlo <fpizlo@apple.com>
363 Unreviewed, build fix for 32-bit.
365 * dfg/DFGSpeculativeJIT32_64.cpp:
366 (JSC::DFG::SpeculativeJIT::compile):
368 2011-11-16 Geoffrey Garen <ggaren@apple.com>
370 Some CachedCall cleanup, in preparation for reversing argument order.
372 Reviewed by Gavin Barraclough.
374 * bytecode/CodeBlock.cpp:
375 (JSC::CodeBlock::stronglyVisitWeakReferences): A build fix for the interpreter,
378 * interpreter/CachedCall.h:
379 (JSC::CachedCall::CachedCall): Renamed argCount to argumentCount because
380 we are not that desperate for character saving.
382 (JSC::CachedCall::setThis):
383 (JSC::CachedCall::setArgument): Adopted new 0-based argument indexing for
386 * interpreter/CallFrameClosure.h:
387 (JSC::CallFrameClosure::setThis):
388 (JSC::CallFrameClosure::setArgument):
389 (JSC::CallFrameClosure::resetCallFrame): Provide 0-based argument indexing,
390 with an explicit setter for 'this', since that's how most clients think.
392 * interpreter/Interpreter.cpp:
393 (JSC::Interpreter::prepareForRepeatCall):
394 * interpreter/Interpreter.h: Change argCount to argumentCountIncludingThis,
397 2011-11-16 Mark Hahnenberg <mhahnenberg@apple.com>
399 De-virtualize ScriptExecutable::unlinkCalls
400 https://bugs.webkit.org/show_bug.cgi?id=72546
402 Reviewed by Geoffrey Garen.
404 * runtime/Executable.cpp:
405 (JSC::FunctionExecutable::~FunctionExecutable): Added an empty explicit virtual destructor to prevent a very odd compilation error
406 due to the fact that the compiler was trying to generate the implicit inline destructor in every translation unit, some of which
407 didn't have complete type information on the things that needed to be destructed in the implicit destructor.
408 * runtime/Executable.h:
409 (JSC::EvalExecutable::createStructure): Used new type value from JSType
410 (JSC::ProgramExecutable::createStructure): Ditto
411 (JSC::FunctionExecutable::createStructure): Ditto
412 (JSC::ScriptExecutable::unlinkCalls): Condition upon the type value, cast and call the corresponding unlinkCalls implementation.
413 * runtime/JSType.h: Added new values for EvalExecutable, ProgramExecutable, and FunctionExecutable. Remove explicit numbers, since
414 that just adds noise to patches and they currently have no significance.
416 2011-11-16 Filip Pizlo <fpizlo@apple.com>
418 JSC::CodeBlock should know which references generated by the DFG are weak
419 https://bugs.webkit.org/show_bug.cgi?id=72563
421 Reviewed by Geoff Garen.
423 CodeBlock::m_dfgData now tracks weak references and weak reference transitions
424 (like ephemerons) generated by the DFG. The DFG makes sure to notify the
425 CodeBlock of all uses of weak references and weak reference transitions.
426 CodeBlock currently marks them strongly, since the weak marking logic is not
429 * bytecode/CodeBlock.cpp:
430 (JSC::CodeBlock::visitAggregate):
431 (JSC::CodeBlock::stronglyVisitWeakReferences):
432 * bytecode/CodeBlock.h:
433 (JSC::CodeBlock::appendWeakReference):
434 (JSC::CodeBlock::shrinkWeakReferencesToFit):
435 (JSC::CodeBlock::appendWeakReferenceTransition):
436 (JSC::CodeBlock::shrinkWeakReferenceTransitionsToFit):
437 (JSC::CodeBlock::WeakReferenceTransition::WeakReferenceTransition):
438 * bytecode/CodeOrigin.h:
439 (JSC::CodeOrigin::codeOriginOwner):
440 * dfg/DFGByteCodeParser.cpp:
441 (JSC::DFG::ByteCodeParser::handleCall):
442 (JSC::DFG::ByteCodeParser::handleInlining):
443 (JSC::DFG::ByteCodeParser::parseBlock):
444 * dfg/DFGJITCompiler.cpp:
445 (JSC::DFG::JITCompiler::link):
446 * dfg/DFGJITCompiler.h:
447 (JSC::DFG::JITCompiler::addWeakReference):
448 (JSC::DFG::JITCompiler::addWeakReferenceTransition):
449 (JSC::DFG::JITCompiler::branchWeakPtr):
450 * dfg/DFGSpeculativeJIT.h:
451 * dfg/DFGSpeculativeJIT32_64.cpp:
452 (JSC::DFG::SpeculativeJIT::compile):
453 * dfg/DFGSpeculativeJIT64.cpp:
454 (JSC::DFG::SpeculativeJIT::fillJSValue):
455 (JSC::DFG::SpeculativeJIT::compile):
457 2011-11-16 Michael Saboff <msaboff@apple.com>
459 LayoutTests for Debug Builds Crashes in JavaScriptCore/yarr/YarrInterpreter.cpp(185)
460 https://bugs.webkit.org/show_bug.cgi?id=72561
462 Removed #if USE(JSC) and therefore the ASSERT_NOT_REACHED().
463 Simplified the code in the process.
465 Reviewed by James Robinson.
467 * yarr/YarrInterpreter.cpp:
468 (JSC::Yarr::Interpreter::CharAccess::CharAccess):
469 (JSC::Yarr::Interpreter::CharAccess::~CharAccess):
471 2011-11-16 Geoffrey Garen <ggaren@apple.com>
473 Interpreter build fixes.
475 * bytecode/CodeBlock.h:
476 * interpreter/Interpreter.cpp:
477 (JSC::Interpreter::privateExecute):
479 2011-11-16 Patrick Gansterer <paroga@webkit.org>
481 Unreviewed. Build fix for !ENABLE(JIT) after r100363.
483 * bytecode/CodeBlock.h:
485 2011-11-16 Geoffrey Garen <ggaren@apple.com>
487 Rolled back in r100375 and r100385 with 32-bit build fixed.
489 * dfg/DFGOperations.cpp:
491 (JSC::DEFINE_STUB_FUNCTION):
492 * runtime/ArgList.cpp:
493 (JSC::ArgList::getSlice):
495 * runtime/JSArray.cpp:
496 (JSC::JSArray::finishCreation):
498 (JSC::JSArray::create):
499 * runtime/JSGlobalObject.h:
500 (JSC::constructArray):
502 2011-11-16 Filip Pizlo <fpizlo@apple.com>
504 DFG global variable CSE mishandles the cross-global-object inlining corner case
505 https://bugs.webkit.org/show_bug.cgi?id=72542
507 Reviewed by Geoff Garen.
509 Moved code to get the global object for a code origin into CodeBlock, so it is
510 more broadly accessible. Fixed CSE to compare both the variable number, and the
511 global object, before deciding to perform elimination.
513 * bytecode/CodeBlock.h:
514 (JSC::CodeBlock::globalObjectFor):
515 * dfg/DFGAssemblyHelpers.h:
516 (JSC::DFG::AssemblyHelpers::globalObjectFor):
517 * dfg/DFGPropagator.cpp:
518 (JSC::DFG::Propagator::globalVarLoadElimination):
519 (JSC::DFG::Propagator::performNodeCSE):
521 2011-11-16 Michael Saboff <msaboff@apple.com>
523 Enable 8 Bit Strings in JavaScriptCore
524 https://bugs.webkit.org/show_bug.cgi?id=71337
526 This patch turns on 8 bit strings in StringImpl and enables
527 their use in JavaScriptCore. Some of the changes are to
528 turn on code that had been staged (Lexer.cpp, Identifier.cpp,
529 SmallStrings.cpp and some of StringImpl.{h,cpp}).
530 Other changes are minor fixes to make 8 bit strings work
531 (UString.h, StringImpl::getData16SlowCase()).
532 Changed StringBuffer to be a templated class based on character
533 type. This change rippled into WebCore code as well.
535 Reviewed by Geoffrey Garen.
537 * JavaScriptCore.exp:
539 (JSC::::append8): Changed to use 8 bit buffers.
540 (JSC::::parseIdentifier): Changed to use 8 bit buffers.
541 (JSC::::parseString): Changed to use 8 bit buffers.
542 * runtime/Identifier.cpp:
543 (JSC::IdentifierCStringTranslator::translate): 8 bit version keeps data 8 bit
544 (JSC::Identifier::toUInt32FromCharacters): Templated helper.
545 (JSC::Identifier::toUInt32): Added 8 bit optimized path.
546 * runtime/SmallStrings.cpp:
547 (JSC::SmallStringsStorage::SmallStringsStorage): Changed to be 8 bit strings
549 (JSC::UString::characters): Now calls StringImpl::characters()
551 * wtf/text/StringBuffer.h: Made StringBuffer a template base on character type.
552 (WTF::StringBuffer::StringBuffer):
553 (WTF::StringBuffer::characters):
554 (WTF::StringBuffer::release):
555 * wtf/text/StringImpl.cpp:
556 (WTF::StringImpl::create):
557 (WTF::StringImpl::getData16SlowCase): Fixed null terminated case.
558 (WTF::StringImpl::removeCharacters): Added 8 bit path.
559 (WTF::StringImpl::simplifyMatchedCharactersToSpace):
560 (WTF::StringImpl::simplifyWhiteSpace):
561 (WTF::equal): Removed bug from code copied from null terminated version.
562 (WTF::StringImpl::adopt): Added 8 bit path.
563 (WTF::StringImpl::createWithTerminatingNullCharacter): Fixed 8 bi flag propagation.
564 * wtf/text/StringImpl.h:
565 (WTF::StringImpl::StringImpl): Added new 8 bit constructor.
566 (WTF::StringImpl::characters8): Removed ASSERT_NOT_REACHED().
567 (WTF::getCharacters<LChar>): Added templated accessor for 8 bit strings.
568 (WTF::getCharacters<UChar>): Added templated accessor for 16 bit strings.
569 * wtf/text/WTFString.h:
570 (WTF::String::adopt): Changed to use StringBuffer template.
572 2011-11-16 Mark Hahnenberg <mhahnenberg@apple.com>
574 De-virtualize ExecutableBase::clearCodeVirtual
575 https://bugs.webkit.org/show_bug.cgi?id=72337
577 Reviewed by Darin Adler.
579 Added static finalize functions to the subclasses of ExecutableBase that provide an implementation
580 of clearCodeVirtual, changed all of the clearCodeVirtual methods to non-virtual clearCode method,
581 and had the finalize functions call the corresponding clearCode methods.
583 * runtime/Executable.cpp:
584 (JSC::ExecutableBase::clearCode):
585 (JSC::NativeExecutable::finalize):
586 (JSC::EvalExecutable::finalize):
587 (JSC::EvalExecutable::clearCode):
588 (JSC::ProgramExecutable::finalize):
589 (JSC::ProgramExecutable::clearCode):
590 (JSC::FunctionExecutable::discardCode):
591 (JSC::FunctionExecutable::finalize):
592 (JSC::FunctionExecutable::clearCode):
593 * runtime/Executable.h:
594 (JSC::ExecutableBase::finishCreation):
595 (JSC::NativeExecutable::create):
596 (JSC::EvalExecutable::create):
597 (JSC::ProgramExecutable::create):
598 (JSC::FunctionExecutable::create):
600 2011-11-16 Yusuke Suzuki <utatane.tea@gmail.com>
602 String new RegExp('\n').toString() returns is invalid RegularExpressionLiteral
603 https://bugs.webkit.org/show_bug.cgi?id=71572
605 Reviewed by Gavin Barraclough and Darin Adler.
607 * runtime/RegExpObject.cpp:
608 (JSC::regExpObjectSource):
610 2011-11-16 Darin Adler <darin@apple.com>
612 Specialize HashTraits for OwnPtr to use PassOwnPtr and raw pointer
613 https://bugs.webkit.org/show_bug.cgi?id=72475
615 Reviewed by Adam Roben.
617 * wtf/HashTraits.h: Specialize HashTraits for OwnPtr.
618 Do overloads so we can pass a nullptr and also be sure to get the
619 raw pointer type from the OwnPtr template so we handle both forms
620 of OwnPtr: OwnPtr<T> and OwnPtr<T*>.
622 2011-11-16 Simon Hausmann <simon.hausmann@nokia.com>
624 [Qt] Centralize hide_symbols and ensure all libs are built with symbol visibility & bsymbolic_functions
626 Reviewed by Tor Arne Vestbø.
628 * Target.pri: Eliminate duplicated symbol stuff that lives now in default_post.prf.
630 2011-11-16 Simon Hausmann <simon.hausmann@nokia.com>
632 Unreviewed, rolling out r100266.
633 http://trac.webkit.org/changeset/100266
639 2011-11-16 Darin Adler <darin@apple.com>
641 Add a "pass type" and "peek type" concept to HashTraits
642 https://bugs.webkit.org/show_bug.cgi?id=72473
644 Reviewed by Filip Pizlo.
646 * wtf/HashTraits.h: Added the pass type and peek type.
647 For OwnPtr, the pass type will be PassOwnPtr and the peek
648 type will be a raw pointer.
650 2011-11-16 Darin Adler <darin@apple.com>
652 Fix some hash traits that don't derive from the base hash traits
653 https://bugs.webkit.org/show_bug.cgi?id=72470
655 Reviewed by Filip Pizlo.
657 Hash traits structures need to derive from the base hash traits in
658 HashTraits.h, but some were not. This is needed for compatibility with
659 some additional traits we will be adding to make OwnPtr work with HashMap.
661 * runtime/Identifier.h: Make IdentifierMapIndexHashTraits derive from
662 HashTraits<int>. This enabled removal of all the members except for the
663 ones that control the empty value, because this is otherwise the same
664 as the standard int hash.
666 * runtime/SymbolTable.h: Changed SymbolTableIndexHashTraits to derive
667 from HashTraits<SymbolTableEntry> and removed redundant members.
669 2011-11-15 Sheriff Bot <webkit.review.bot@gmail.com>
671 Unreviewed, rolling out r100375 and r100385.
672 http://trac.webkit.org/changeset/100375
673 http://trac.webkit.org/changeset/100385
674 https://bugs.webkit.org/show_bug.cgi?id=72465
676 They broke 32 bit builds on Qt (Requested by ossy on #webkit).
678 * dfg/DFGOperations.cpp:
680 (JSC::DEFINE_STUB_FUNCTION):
681 * runtime/ArgList.cpp:
682 (JSC::ArgList::getSlice):
684 (JSC::ArgList::ArgList):
685 * runtime/JSArray.cpp:
687 * runtime/JSGlobalObject.h:
689 2011-11-15 George Staikos <staikos@webkit.org>
691 Remove the guard page from the addressable stack region on QNX.
692 https://bugs.webkit.org/show_bug.cgi?id=72455
694 Reviewed by Daniel Bates.
696 * wtf/StackBounds.cpp:
697 (WTF::StackBounds::initialize):
699 2011-11-15 Michael Saboff <msaboff@apple.com>
701 Towards 8 bit Strings - Update utf8() and ascii() methods for 8 bit strings
702 https://bugs.webkit.org/show_bug.cgi?id=72323
704 Added 8 bit optimized paths for String and UString ascii() and utf8() methods.
706 Added String::characters8(), characters16() and is8Bit() helper methods.
708 Added an new Unicode::convertLatin1ToUTF8() method that works on
709 LChar (8 bit) strings that is a stripped down version of convertUTF16ToUTF8().
711 Reviewed by Geoff Garen.
713 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
714 * runtime/UString.cpp:
715 (JSC::UString::utf8):
716 * wtf/text/WTFString.cpp:
717 (WTF::String::ascii):
719 * wtf/text/WTFString.h:
720 (WTF::String::characters8):
721 (WTF::String::characters16):
722 (WTF::String::is8Bit):
725 * wtf/unicode/UTF8.cpp:
726 (WTF::Unicode::convertLatin1ToUTF8):
727 * wtf/unicode/UTF8.h:
728 * wtf/unicode/Unicode.h:
730 2011-11-15 Darin Adler <darin@apple.com>
732 REGRESSION (r98887): ParserArena and Keywords leaking
733 https://bugs.webkit.org/show_bug.cgi?id=72428
735 Reviewed by Sam Weinig.
737 * parser/Lexer.h: Made Keywords destructor public since OwnPtr and PassOwnPtr
738 need to be able to destroy it.
741 (JSC::Parser::Parser): Use get now that parserArena is an OwnPtr.
743 * runtime/JSGlobalData.cpp:
744 (JSC::JSGlobalData::JSGlobalData): Use adoptPtr to initialize OwnPtr members.
746 * runtime/JSGlobalData.h: Make parserArena and keywords be OwnPtr.
748 2011-11-15 Geoffrey Garen <ggaren@apple.com>
750 Removed another use of ArgList that baked in the assumption that arguments
751 are forward in the regiter file.
753 Reviewed by Sam Weinig.
755 * dfg/DFGOperations.cpp:
757 (JSC::DEFINE_STUB_FUNCTION): Use our new array creation API, instead of
758 working through ArgList.
760 * runtime/ArgList.h: Removed!
762 2011-11-15 Geoffrey Garen <ggaren@apple.com>
764 Removed a use of ArgList that baked in the assumption that arguments
765 are forward in the regiter file.
767 Reviewed by Sam Weinig.
769 * dfg/DFGOperations.cpp:
771 (JSC::DEFINE_STUB_FUNCTION): Use new API.
773 * runtime/ArgList.cpp:
774 (JSC::ArgList::getSlice): No need to provide an arbitrary constructor --
775 getSlice can do the right thing by using its rights to private data.
777 * runtime/ArgList.h: Removed constructor that took a forward-contiguous
780 * runtime/JSArray.cpp:
781 (JSC::JSArray::finishCreation):
783 (JSC::JSArray::create):
784 * runtime/JSGlobalObject.h:
785 (JSC::constructArray): Added explicit support for creating an array from
786 a pre-allocated set of values, so we could stop relying on the ArgList
787 API we want to remove.
789 2011-11-15 Filip Pizlo <fpizlo@apple.com>
791 Crash in JSC::DFG::OSRExitCompiler::compileExit(JSC::DFG::OSRExit const&, JSC::DFG::SpeculationRecovery*)
792 https://bugs.webkit.org/show_bug.cgi?id=72292
794 Reviewed by Geoff Garen.
796 We need to be careful about how we look for the baseline CodeBlock if we're lazy-compiling
797 an OSR exit after our CodeBlock has been jettisoned. In short, use CodeBlock::baselineVersion()
798 instead of CodeBlock::alternative().
800 No performance effect.
802 No tests because all of our heuristics work very hard to make sure that this never happens in
803 the first place. OSR exits are rare by design, and jettisoning of CodeBlocks (i.e. recompilation)
804 is even rarer. Furthermore, OSR exits after a CodeBlock has been jettisoned is rarer still
805 because the whole point of jettisoning is to bring the probability of future OSR exits to as
806 close to zero as possible. But even that isn't enough to trigger this bug; it requires the OSR
807 exit after a jettison to be the first of its kind; our whole design tries to ensure that
808 CodeBlocks tend to OSR exit at a handful (i.e. 1 in most cases) of points, and since jettisoning
809 is triggered by OSR, in most sane cases the OSR exits after jettison will not require lazy OSR
810 compilation. So this is a truly evil case, and any test for it would be quite fragile.
812 * bytecode/CodeBlock.h:
813 (JSC::CodeBlock::specializationKind):
814 (JSC::CodeBlock::largeFailCountThreshold):
815 (JSC::CodeBlock::largeFailCountThresholdForLoop):
816 * dfg/DFGAssemblyHelpers.h:
817 (JSC::DFG::AssemblyHelpers::AssemblyHelpers):
818 (JSC::DFG::AssemblyHelpers::baselineCodeBlockFor):
819 (JSC::DFG::AssemblyHelpers::baselineCodeBlock):
822 * dfg/DFGOSRExitCompiler.cpp:
823 * dfg/DFGOSRExitCompiler64.cpp:
824 (JSC::DFG::OSRExitCompiler::compileExit):
826 2011-11-15 Geoffrey Garen <ggaren@apple.com>
828 Use MarkedArgumentBuffer to avoid making assumptions about argument order
829 https://bugs.webkit.org/show_bug.cgi?id=72418
831 Reviewed by Sam Weinig.
833 A step toward reversing the argument order.
835 * runtime/JSONObject.cpp:
836 (JSC::Stringifier::toJSON):
837 (JSC::Stringifier::appendStringifiedValue):
838 (JSC::Walker::callReviver): Don't assume that ArgList wants to point
839 at arguments in forward order. Instead, use MarkedArgumentBuffer, which
840 will make the decision for us.
842 2011-11-15 Filip Pizlo <fpizlo@apple.com>
844 DFG should distinguish between constants in the constant pool and weak
845 constants added as artifacts of code generation
846 https://bugs.webkit.org/show_bug.cgi?id=72367
848 Reviewed by Geoff Garen.
850 Added the notion of a WeakJSConstant, which is like a JSConstant except that
851 it can only refer to JSCell*. Currently all WeakJSConstants are also backed
852 by constants in the constant pool, since weak references originated from
853 machine code are not yet properly handled.
855 Replaced CheckMethod, and MethodCheckData, with a combination of WeakJSConstant
856 and CheckStructure. This results in improved CSE, leading to a 1% win on V8.
858 * dfg/DFGAbstractState.cpp:
859 (JSC::DFG::AbstractState::execute):
860 * dfg/DFGByteCodeParser.cpp:
861 (JSC::DFG::ByteCodeParser::cellConstant):
862 (JSC::DFG::ByteCodeParser::prepareToParseBlock):
863 (JSC::DFG::ByteCodeParser::parseBlock):
865 (JSC::DFG::Graph::dump):
867 (JSC::DFG::Graph::getJSConstantPrediction):
868 (JSC::DFG::Graph::valueOfJSConstant):
869 (JSC::DFG::Graph::valueOfInt32Constant):
870 (JSC::DFG::Graph::valueOfNumberConstant):
871 (JSC::DFG::Graph::valueOfBooleanConstant):
873 (JSC::DFG::Node::isWeakConstant):
874 (JSC::DFG::Node::hasConstant):
875 (JSC::DFG::Node::weakConstant):
876 (JSC::DFG::Node::valueOfJSConstant):
877 (JSC::DFG::Node::isInt32Constant):
878 (JSC::DFG::Node::isDoubleConstant):
879 (JSC::DFG::Node::isNumberConstant):
880 (JSC::DFG::Node::isBooleanConstant):
881 (JSC::DFG::Node::hasIdentifier):
882 * dfg/DFGPropagator.cpp:
883 (JSC::DFG::Propagator::propagateNodePredictions):
884 (JSC::DFG::Propagator::performNodeCSE):
885 * dfg/DFGSpeculativeJIT32_64.cpp:
886 (JSC::DFG::SpeculativeJIT::compile):
887 * dfg/DFGSpeculativeJIT64.cpp:
888 (JSC::DFG::SpeculativeJIT::compile):
890 2011-11-15 Michael Saboff <msaboff@apple.com>
892 Towards 8 bit Strings - Initial JS String Tuning
893 https://bugs.webkit.org/show_bug.cgi?id=72326
895 Added 8 bit optimized paths for the methods below.
897 Reviewed by Geoffrey Garen.
899 * runtime/JSString.h:
901 * runtime/StringPrototype.cpp:
902 (JSC::jsSpliceSubstrings):
903 (JSC::jsSpliceSubstringsWithSeparators):
904 (JSC::stringProtoFuncReplace):
905 (JSC::stringProtoFuncCharCodeAt):
907 2011-11-15 Gavin Barraclough <barraclough@apple.com>
909 Result of Error.prototype.toString not ES5 conformant
910 https://bugs.webkit.org/show_bug.cgi?id=70889
912 Reviewed by Oliver Hunt.
914 * runtime/ErrorPrototype.cpp:
915 (JSC::errorProtoFuncToString):
917 2011-11-15 Simon Hausmann <simon.hausmann@nokia.com>
919 [Qt] Centralize hide_symbols and ensure all libs are built with symbol visibility & bsymbolic_functions
921 Reviewed by Tor Arne Vestbø.
923 * Target.pri: Eliminate duplicated symbol stuff that lives now in default_post.prf.
925 2011-11-15 Yuqiang Xian <yuqiang.xian@intel.com>
927 Remove DFGJITCompilerInlineMethods
928 https://bugs.webkit.org/show_bug.cgi?id=72366
930 Reviewed by Filip Pizlo.
932 Those methods are actually seldom used. Modify the few such places and
933 remove DFGJITCompilerInlineMethods stuffs totally.
935 * GNUmakefile.list.am:
936 * JavaScriptCore.xcodeproj/project.pbxproj:
937 * dfg/DFGJITCompiler.h:
938 (JSC::DFG::JITCompiler::addressOfDoubleConstant):
939 * dfg/DFGJITCompilerInlineMethods.h: Removed.
940 * dfg/DFGSpeculativeJIT.cpp:
941 * dfg/DFGSpeculativeJIT.h:
942 (JSC::DFG::SpeculativeJIT::silentFillFPR):
943 * dfg/DFGSpeculativeJIT32_64.cpp:
944 (JSC::DFG::SpeculativeJIT::fillJSValue):
945 (JSC::DFG::SpeculativeJIT::cachedGetMethod):
947 2011-11-14 Filip Pizlo <fpizlo@apple.com>
949 DFG::SpeculativeJIT and DFG::JITCodeGenerator should be combined
950 https://bugs.webkit.org/show_bug.cgi?id=72348
952 Reviewed by Gavin Barraclough.
954 Moved all of JITCodeGenerator into SpeculativeJIT.
957 * GNUmakefile.list.am:
958 * JavaScriptCore.xcodeproj/project.pbxproj:
960 * dfg/DFGJITCodeGenerator.cpp: Removed.
961 * dfg/DFGJITCodeGenerator.h: Removed.
962 * dfg/DFGJITCodeGenerator32_64.cpp: Removed.
963 * dfg/DFGJITCodeGenerator64.cpp: Removed.
964 * dfg/DFGJITCompiler.cpp:
965 * dfg/DFGRepatch.cpp:
966 (JSC::DFG::generateProtoChainAccessStub):
967 (JSC::DFG::tryCacheGetByID):
968 (JSC::DFG::tryCachePutByID):
969 * dfg/DFGSpeculativeJIT.cpp:
970 (JSC::DFG::SpeculativeJIT::clearGenerationInfo):
971 (JSC::DFG::SpeculativeJIT::fillStorage):
972 (JSC::DFG::SpeculativeJIT::useChildren):
973 (JSC::DFG::SpeculativeJIT::isStrictInt32):
974 (JSC::DFG::SpeculativeJIT::isKnownInteger):
975 (JSC::DFG::SpeculativeJIT::isKnownNumeric):
976 (JSC::DFG::SpeculativeJIT::isKnownCell):
977 (JSC::DFG::SpeculativeJIT::isKnownNotCell):
978 (JSC::DFG::SpeculativeJIT::isKnownNotInteger):
979 (JSC::DFG::SpeculativeJIT::isKnownNotNumber):
980 (JSC::DFG::SpeculativeJIT::isKnownBoolean):
981 (JSC::DFG::SpeculativeJIT::writeBarrier):
982 (JSC::DFG::SpeculativeJIT::markCellCard):
983 (JSC::DFG::SpeculativeJIT::nonSpeculativeCompare):
984 (JSC::DFG::SpeculativeJIT::nonSpeculativeStrictEq):
985 (JSC::DFG::dataFormatString):
986 (JSC::DFG::SpeculativeJIT::dump):
987 (JSC::DFG::SpeculativeJIT::checkConsistency):
988 (JSC::DFG::GPRTemporary::GPRTemporary):
989 (JSC::DFG::GPRTemporary::adopt):
990 (JSC::DFG::FPRTemporary::FPRTemporary):
991 * dfg/DFGSpeculativeJIT.h:
992 (JSC::DFG::SpeculativeJIT::at):
993 (JSC::DFG::SpeculativeJIT::lock):
994 (JSC::DFG::SpeculativeJIT::unlock):
995 (JSC::DFG::SpeculativeJIT::canReuse):
996 (JSC::DFG::SpeculativeJIT::reuse):
997 (JSC::DFG::SpeculativeJIT::allocate):
998 (JSC::DFG::SpeculativeJIT::tryAllocate):
999 (JSC::DFG::SpeculativeJIT::fprAllocate):
1000 (JSC::DFG::SpeculativeJIT::isFilled):
1001 (JSC::DFG::SpeculativeJIT::isFilledDouble):
1002 (JSC::DFG::SpeculativeJIT::use):
1003 (JSC::DFG::SpeculativeJIT::selectScratchGPR):
1004 (JSC::DFG::SpeculativeJIT::silentSpillGPR):
1005 (JSC::DFG::SpeculativeJIT::silentSpillFPR):
1006 (JSC::DFG::SpeculativeJIT::silentFillGPR):
1007 (JSC::DFG::SpeculativeJIT::silentFillFPR):
1008 (JSC::DFG::SpeculativeJIT::silentSpillAllRegisters):
1009 (JSC::DFG::SpeculativeJIT::silentFillAllRegisters):
1010 (JSC::DFG::SpeculativeJIT::boxDouble):
1011 (JSC::DFG::SpeculativeJIT::unboxDouble):
1012 (JSC::DFG::SpeculativeJIT::spill):
1013 (JSC::DFG::SpeculativeJIT::isConstant):
1014 (JSC::DFG::SpeculativeJIT::isJSConstant):
1015 (JSC::DFG::SpeculativeJIT::isInt32Constant):
1016 (JSC::DFG::SpeculativeJIT::isDoubleConstant):
1017 (JSC::DFG::SpeculativeJIT::isNumberConstant):
1018 (JSC::DFG::SpeculativeJIT::isBooleanConstant):
1019 (JSC::DFG::SpeculativeJIT::isFunctionConstant):
1020 (JSC::DFG::SpeculativeJIT::valueOfInt32Constant):
1021 (JSC::DFG::SpeculativeJIT::valueOfNumberConstant):
1022 (JSC::DFG::SpeculativeJIT::addressOfDoubleConstant):
1023 (JSC::DFG::SpeculativeJIT::valueOfJSConstant):
1024 (JSC::DFG::SpeculativeJIT::valueOfBooleanConstant):
1025 (JSC::DFG::SpeculativeJIT::valueOfFunctionConstant):
1026 (JSC::DFG::SpeculativeJIT::isNullConstant):
1027 (JSC::DFG::SpeculativeJIT::identifier):
1028 (JSC::DFG::SpeculativeJIT::flushRegisters):
1029 (JSC::DFG::SpeculativeJIT::isFlushed):
1030 (JSC::DFG::SpeculativeJIT::valueOfJSConstantAsImmPtr):
1031 (JSC::DFG::SpeculativeJIT::bitOp):
1032 (JSC::DFG::SpeculativeJIT::shiftOp):
1033 (JSC::DFG::SpeculativeJIT::detectPeepHoleBranch):
1034 (JSC::DFG::SpeculativeJIT::addressOfCallData):
1035 (JSC::DFG::SpeculativeJIT::tagOfCallData):
1036 (JSC::DFG::SpeculativeJIT::payloadOfCallData):
1037 (JSC::DFG::SpeculativeJIT::integerResult):
1038 (JSC::DFG::SpeculativeJIT::noResult):
1039 (JSC::DFG::SpeculativeJIT::cellResult):
1040 (JSC::DFG::SpeculativeJIT::booleanResult):
1041 (JSC::DFG::SpeculativeJIT::jsValueResult):
1042 (JSC::DFG::SpeculativeJIT::storageResult):
1043 (JSC::DFG::SpeculativeJIT::doubleResult):
1044 (JSC::DFG::SpeculativeJIT::initConstantInfo):
1045 (JSC::DFG::SpeculativeJIT::resetCallArguments):
1046 (JSC::DFG::SpeculativeJIT::addCallArgument):
1047 (JSC::DFG::SpeculativeJIT::setupArguments):
1048 (JSC::DFG::SpeculativeJIT::setupArgumentsExecState):
1049 (JSC::DFG::SpeculativeJIT::setupArgumentsWithExecState):
1050 (JSC::DFG::SpeculativeJIT::setupTwoStubArgs):
1051 (JSC::DFG::SpeculativeJIT::setupStubArguments):
1052 (JSC::DFG::SpeculativeJIT::callOperation):
1053 (JSC::DFG::SpeculativeJIT::appendCallWithExceptionCheck):
1054 (JSC::DFG::SpeculativeJIT::appendCallWithExceptionCheckSetResult):
1055 (JSC::DFG::SpeculativeJIT::setupResults):
1056 (JSC::DFG::SpeculativeJIT::appendCallSetResult):
1057 (JSC::DFG::SpeculativeJIT::addBranch):
1058 (JSC::DFG::SpeculativeJIT::linkBranches):
1059 (JSC::DFG::SpeculativeJIT::block):
1060 (JSC::DFG::SpeculativeJIT::checkConsistency):
1061 (JSC::DFG::SpeculativeJIT::BranchRecord::BranchRecord):
1062 (JSC::DFG::IntegerOperand::IntegerOperand):
1063 (JSC::DFG::IntegerOperand::~IntegerOperand):
1064 (JSC::DFG::IntegerOperand::index):
1065 (JSC::DFG::IntegerOperand::format):
1066 (JSC::DFG::IntegerOperand::gpr):
1067 (JSC::DFG::IntegerOperand::use):
1068 (JSC::DFG::DoubleOperand::DoubleOperand):
1069 (JSC::DFG::DoubleOperand::~DoubleOperand):
1070 (JSC::DFG::DoubleOperand::index):
1071 (JSC::DFG::DoubleOperand::fpr):
1072 (JSC::DFG::DoubleOperand::use):
1073 (JSC::DFG::JSValueOperand::JSValueOperand):
1074 (JSC::DFG::JSValueOperand::~JSValueOperand):
1075 (JSC::DFG::JSValueOperand::index):
1076 (JSC::DFG::JSValueOperand::gpr):
1077 (JSC::DFG::JSValueOperand::jsValueRegs):
1078 (JSC::DFG::JSValueOperand::isDouble):
1079 (JSC::DFG::JSValueOperand::fill):
1080 (JSC::DFG::JSValueOperand::tagGPR):
1081 (JSC::DFG::JSValueOperand::payloadGPR):
1082 (JSC::DFG::JSValueOperand::fpr):
1083 (JSC::DFG::JSValueOperand::use):
1084 (JSC::DFG::StorageOperand::StorageOperand):
1085 (JSC::DFG::StorageOperand::~StorageOperand):
1086 (JSC::DFG::StorageOperand::index):
1087 (JSC::DFG::StorageOperand::gpr):
1088 (JSC::DFG::StorageOperand::use):
1089 (JSC::DFG::GPRTemporary::~GPRTemporary):
1090 (JSC::DFG::GPRTemporary::gpr):
1091 (JSC::DFG::FPRTemporary::~FPRTemporary):
1092 (JSC::DFG::FPRTemporary::fpr):
1093 (JSC::DFG::FPRTemporary::FPRTemporary):
1094 (JSC::DFG::GPRResult::GPRResult):
1095 (JSC::DFG::GPRResult2::GPRResult2):
1096 (JSC::DFG::FPRResult::FPRResult):
1097 (JSC::DFG::FPRResult::lockedResult):
1098 (JSC::DFG::SpeculativeJIT::SpeculativeJIT):
1099 * dfg/DFGSpeculativeJIT32_64.cpp:
1100 (JSC::DFG::SpeculativeJIT::fillInteger):
1101 (JSC::DFG::SpeculativeJIT::fillDouble):
1102 (JSC::DFG::SpeculativeJIT::fillJSValue):
1103 (JSC::DFG::SpeculativeJIT::nonSpeculativeValueToNumber):
1104 (JSC::DFG::SpeculativeJIT::nonSpeculativeValueToInt32):
1105 (JSC::DFG::SpeculativeJIT::nonSpeculativeUInt32ToNumber):
1106 (JSC::DFG::SpeculativeJIT::nonSpeculativeKnownConstantArithOp):
1107 (JSC::DFG::SpeculativeJIT::nonSpeculativeBasicArithOp):
1108 (JSC::DFG::SpeculativeJIT::cachedGetById):
1109 (JSC::DFG::SpeculativeJIT::cachedPutById):
1110 (JSC::DFG::SpeculativeJIT::cachedGetMethod):
1111 (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
1112 (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
1113 (JSC::DFG::SpeculativeJIT::nonSpeculativeCompareNull):
1114 (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranch):
1115 (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompare):
1116 (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeStrictEq):
1117 (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeStrictEq):
1118 (JSC::DFG::SpeculativeJIT::emitCall):
1119 * dfg/DFGSpeculativeJIT64.cpp:
1120 (JSC::DFG::SpeculativeJIT::fillInteger):
1121 (JSC::DFG::SpeculativeJIT::fillDouble):
1122 (JSC::DFG::SpeculativeJIT::fillJSValue):
1123 (JSC::DFG::SpeculativeJIT::nonSpeculativeValueToNumber):
1124 (JSC::DFG::SpeculativeJIT::nonSpeculativeValueToInt32):
1125 (JSC::DFG::SpeculativeJIT::nonSpeculativeUInt32ToNumber):
1126 (JSC::DFG::SpeculativeJIT::nonSpeculativeKnownConstantArithOp):
1127 (JSC::DFG::SpeculativeJIT::nonSpeculativeBasicArithOp):
1128 (JSC::DFG::SpeculativeJIT::cachedGetById):
1129 (JSC::DFG::SpeculativeJIT::cachedPutById):
1130 (JSC::DFG::SpeculativeJIT::cachedGetMethod):
1131 (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
1132 (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
1133 (JSC::DFG::SpeculativeJIT::nonSpeculativeCompareNull):
1134 (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranch):
1135 (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompare):
1136 (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeStrictEq):
1137 (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeStrictEq):
1138 (JSC::DFG::SpeculativeJIT::emitCall):
1139 * runtime/JSFunction.h:
1141 2011-11-14 Filip Pizlo <fpizlo@apple.com>
1143 Weak reference harvesters should run to fixpoint
1144 https://bugs.webkit.org/show_bug.cgi?id=72346
1146 Reviewed by Oliver Hunt.
1149 (JSC::Heap::markRoots):
1150 * heap/ListableHandler.h:
1151 (JSC::ListableHandler::next):
1152 (JSC::ListableHandler::List::head):
1153 (JSC::ListableHandler::List::removeNext):
1154 (JSC::ListableHandler::List::removeAll):
1155 * heap/MarkStack.cpp:
1156 (JSC::MarkStackThreadSharedData::reset):
1157 (JSC::SlotVisitor::harvestWeakReferences):
1159 (JSC::MarkStack::isEmpty):
1161 2011-11-14 Oliver Hunt <oliver@apple.com>
1163 Start migrating typed array impl types to WTF
1164 https://bugs.webkit.org/show_bug.cgi?id=72336
1166 Reviewed by Geoffrey Garen.
1168 Add typed array impls to WTF forwarding header.
1172 2011-11-14 Julien Chaffraix <jchaffraix@webkit.org>
1174 Add --css-grid-layout to build-webkit and the build systems
1175 https://bugs.webkit.org/show_bug.cgi?id=72320
1177 Reviewed by Ojan Vafai.
1179 * Configurations/FeatureDefines.xcconfig:
1181 2011-11-14 Geoffrey Garen <ggaren@apple.com>
1183 A little bit of arguments / activation cleanup
1184 https://bugs.webkit.org/show_bug.cgi?id=72339
1186 Reviewed by Gavin Barraclough.
1188 Renamed copyRegisters => tearOff to match bytecode and other terminology.
1190 Renamed setActivation => didTearOffActivation to indicate that this is a
1191 notification the object may choose to ignore. Moved "Should I ignore?"
1192 code into the arguments object to avoid duplication elsewhere.
1194 * interpreter/Interpreter.cpp:
1195 (JSC::Interpreter::unwindCallFrame):
1196 (JSC::Interpreter::privateExecute):
1197 (JSC::Interpreter::retrieveArguments):
1199 (JSC::DEFINE_STUB_FUNCTION):
1200 * runtime/Arguments.h:
1201 (JSC::Arguments::createAndTearOff):
1202 (JSC::Arguments::didTearOffActivation):
1203 (JSC::Arguments::finishCreationButDontTearOff):
1204 (JSC::Arguments::finishCreation):
1205 (JSC::Arguments::finishCreationAndTearOff):
1206 (JSC::Arguments::tearOff):
1208 * runtime/JSActivation.h:
1209 (JSC::JSActivation::tearOff): Moved Activation's code into its own header
1210 because that's where it belongs.
1212 2011-11-14 Gavin Barraclough <barraclough@apple.com>
1214 Should sign the jsc binary
1215 https://bugs.webkit.org/show_bug.cgi?id=72332
1217 Reviewed by David Kilzer.
1219 * Configurations/JSC.xcconfig:
1220 * entitlements.plist: Added.
1222 2011-11-14 Filip Pizlo <fpizlo@apple.com>
1224 DFG's inline references to objects should be tracked
1225 https://bugs.webkit.org/show_bug.cgi?id=72313
1227 Reviewed by Gavin Barraclough.
1229 Added a pinCell() method in the parser that currently creates a
1230 dummy constant in CodeBlock. Added calls to pinCell() wherever the
1231 DFG would inline a constant reference that the original code would
1232 not have referred to.
1234 * dfg/DFGByteCodeParser.cpp:
1235 (JSC::DFG::ByteCodeParser::getCellConstantIndex):
1236 (JSC::DFG::ByteCodeParser::pinCell):
1237 (JSC::DFG::ByteCodeParser::cellConstant):
1238 (JSC::DFG::ByteCodeParser::handleCall):
1239 (JSC::DFG::ByteCodeParser::handleInlining):
1240 (JSC::DFG::ByteCodeParser::parseBlock):
1242 2011-11-14 Filip Pizlo <fpizlo@apple.com>
1244 DFG put_by_id transition optimizations test the wrong structures
1245 https://bugs.webkit.org/show_bug.cgi?id=72324
1247 Reviewed by Gavin Barraclough.
1249 * dfg/DFGByteCodeParser.cpp:
1250 (JSC::DFG::ByteCodeParser::structureChainIsStillValid):
1251 (JSC::DFG::ByteCodeParser::parseBlock):
1252 * jit/JITPropertyAccess.cpp:
1253 (JSC::JIT::privateCompilePutByIdTransition):
1255 2011-11-14 Michael Saboff <msaboff@apple.com>
1257 Further changes and cleanup to JSString.h and cpp.
1259 Reviewed by Darin Adler.
1261 * runtime/JSString.cpp:
1262 (JSC::JSString::resolveRope): Change PassRefPtr to RefPtr. Eliminated exec in slow case calls.
1263 (JSC::JSString::resolveRopeSlowCase8): Darin and I agreed that this should have 8 in name.
1264 (JSC::JSString::resolveRopeSlowCase): Removed exec parameter.
1265 * runtime/JSString.h:
1267 2011-11-14 Adam Barth <abarth@webkit.org>
1269 DateMath.cpp should not depend on JavaScriptCore
1270 https://bugs.webkit.org/show_bug.cgi?id=71747
1272 Reviewed by Darin Adler.
1274 This patch moves the JSC-specific parts of DateMath into JSDateMath in
1275 JavaScriptCore. There shouldn't be any behavior change.
1278 * GNUmakefile.list.am:
1279 * JavaScriptCore.gypi:
1280 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1281 * JavaScriptCore.xcodeproj/project.pbxproj:
1283 * runtime/DateConstructor.cpp:
1284 * runtime/DateConversion.cpp:
1285 * runtime/DateInstance.cpp:
1286 * runtime/DateInstanceCache.h:
1287 * runtime/DatePrototype.cpp:
1288 * runtime/InitializeThreading.cpp:
1289 * runtime/JSDateMath.cpp: Copied from Source/JavaScriptCore/wtf/DateMath.cpp.
1292 * runtime/JSDateMath.h: Copied from Source/JavaScriptCore/wtf/DateMath.h.
1298 (WTF::parseDateFromNullTerminatedCharacters):
1299 (WTF::makeRFC2822DateString):
1302 2011-11-14 Michael Saboff <msaboff@apple.com>
1304 Towards 8 bit strings - Add 8 bit handling to JSString Ropes
1305 https://bugs.webkit.org/show_bug.cgi?id=72317
1307 Added bit to track that a rope is made up of all 8 bit fibers.
1308 Created an 8 bit path (fast and slow cases) to handle 8 bit
1311 Reviewed by Oliver Hunt.
1313 * runtime/JSString.cpp:
1314 (JSC::JSString::resolveRope):
1315 (JSC::JSString::resolveRopeSlowCase8):
1316 (JSC::JSString::resolveRopeSlowCase16):
1317 * runtime/JSString.h:
1318 (JSC::RopeBuilder::finishCreation):
1319 (JSC::RopeBuilder::is8Bit):
1320 (JSC::jsSubstring8):
1322 2011-11-14 Geoffrey Garen <ggaren@apple.com>
1324 A little bit of function call cleanup
1325 https://bugs.webkit.org/show_bug.cgi?id=72314
1327 Reviewed by Oliver Hunt.
1329 * bytecompiler/BytecodeGenerator.cpp:
1330 (JSC::BytecodeGenerator::emitCall): Renamed callFrame to registerOffset
1331 because this value doesn't give you the offset of the callee's call frame.
1333 (JSC::BytecodeGenerator::emitReturn): Tightened to use equality instead
1334 of greater-than. Removed comment since its reasoning was wrong.
1336 (JSC::BytecodeGenerator::emitConstruct): Updated for rename mentioned above.
1338 (JSC::BytecodeGenerator::isArgumentNumber): Provided a more precise way
1339 to ask this question, giving the bytecode generator more freedom to change
1340 internal implementation details.
1342 * bytecompiler/BytecodeGenerator.h: Reduced default vector capacity because
1344 (JSC::CallArguments::registerOffset): Updated for rename mentioned above.
1346 * bytecompiler/NodesCodegen.cpp:
1347 (JSC::CallArguments::CallArguments):
1348 (JSC::CallArguments::newArgument): Factored out argument allocation into
1349 a helper function, so I can change it later.
1351 (JSC::CallFunctionCallDotNode::emitBytecode):
1352 (JSC::FunctionBodyNode::emitBytecode): Use helper function mentioned above.
1354 2011-11-14 Tony Chang <tony@chromium.org>
1356 Remove the CSS3_FLEXBOX compile time flag and enable on all ports
1357 https://bugs.webkit.org/show_bug.cgi?id=72196
1359 Reviewed by Ojan Vafai.
1361 * Configurations/FeatureDefines.xcconfig:
1363 2011-11-14 Mark Rowe <mrowe@apple.com>
1365 <rdar://problem/10424154> testRegExp should not be installed as part of JavaScriptCore
1367 testRegExp and testapi.js were being installed in the JavaScriptCore framework.
1368 As test-only tools they shouldn't be installed there by default, only when
1369 FORCE_TOOL_INSTALL is set to YES.
1371 This patch incorprorates a few related changes:
1372 1) Make the jsc and testRegExp targets be configured via .xcconfig files.
1373 2) Sets up testRegExp so that SKIP_INSTALL is YES by default, and only NO when
1374 FORCE_TOOL_INSTALL is YES.
1375 3) Switches the testapi target to using a script build phase to install testapi.js
1376 so that the installation will be skipped when SKIP_INSTALL is YES. I'm not sure
1377 why this isn't the built-in behavior when a Copy Files build phase has "Copy only
1378 when installing" checked, but it doesn't seem to be.
1379 4) Other random cleanup such as removing a bogus group that refers to files that do
1380 not exist, moving testRegExp.cpp in to the tests group, etc.
1382 Reviewed by Geoff Garen.
1384 * Configurations/JSC.xcconfig: Added.
1385 * Configurations/TestRegExp.xcconfig: Added.
1386 * JavaScriptCore.xcodeproj/project.pbxproj:
1388 2011-11-14 Michael Saboff <msaboff@apple.com>
1390 Towards 8 bit strings - Add 8 bit paths to StringImpl methods
1391 https://bugs.webkit.org/show_bug.cgi?id=72290
1393 Added 8 bit patchs to StringImpl to number and find methods.
1395 Reviewed by Oliver Hunt.
1397 * wtf/text/StringImpl.cpp:
1398 (WTF::StringImpl::toIntStrict):
1399 (WTF::StringImpl::toUIntStrict):
1400 (WTF::StringImpl::toInt64Strict):
1401 (WTF::StringImpl::toUInt64Strict):
1402 (WTF::StringImpl::toIntPtrStrict):
1403 (WTF::StringImpl::toInt):
1404 (WTF::StringImpl::toUInt):
1405 (WTF::StringImpl::toInt64):
1406 (WTF::StringImpl::toUInt64):
1407 (WTF::StringImpl::toIntPtr):
1408 (WTF::StringImpl::toDouble):
1409 (WTF::StringImpl::toFloat):
1410 (WTF::StringImpl::find):
1411 (WTF::StringImpl::reverseFind):
1412 * wtf/text/WTFString.cpp:
1413 (WTF::toIntegralType):
1414 (WTF::lengthOfCharactersAsInteger):
1415 (WTF::charactersToIntStrict):
1416 (WTF::charactersToUIntStrict):
1417 (WTF::charactersToInt64Strict):
1418 (WTF::charactersToUInt64Strict):
1419 (WTF::charactersToIntPtrStrict):
1420 (WTF::charactersToInt):
1421 (WTF::charactersToUInt):
1422 (WTF::charactersToInt64):
1423 (WTF::charactersToUInt64):
1424 (WTF::charactersToIntPtr):
1425 (WTF::toDoubleType):
1426 (WTF::charactersToDouble):
1427 (WTF::charactersToFloat):
1428 * wtf/text/WTFString.h:
1432 2011-11-14 Vincent Scheib <scheib@chromium.org>
1434 Mouse Lock: Renaming to 'Pointer Lock': ENABLE Flags
1435 https://bugs.webkit.org/show_bug.cgi?id=72286
1437 Reviewed by Adam Barth.
1441 2011-11-14 Gavin Barraclough <barraclough@apple.com>
1443 https://bugs.webkit.org/show_bug.cgi?id=72280
1445 Rubber stamped by Geoff Garen.
1449 * JavaScriptCore.xcodeproj/project.pbxproj:
1450 * wtf/OSAllocatorPosix.cpp:
1451 (WTF::OSAllocator::reserveAndCommit):
1453 2011-11-14 Geoffrey Garen <ggaren@apple.com>
1455 32-bit Build fix: declare virtual register indices to be int rather than
1456 unsigned, since they can be positive or negative.
1458 For better clarity, explicitly use ReturnPC instead of -1 as the "invalid"
1459 state, since we'll never load and operate on the ReturnPC as a JS value.
1464 * jit/JITInlineMethods.h:
1465 (JSC::JIT::emitLoadTag):
1466 (JSC::JIT::emitLoadPayload):
1467 (JSC::JIT::emitLoad):
1468 (JSC::JIT::emitLoad2):
1469 (JSC::JIT::emitLoadDouble):
1470 (JSC::JIT::emitLoadInt32ToDouble):
1471 (JSC::JIT::emitStore):
1472 (JSC::JIT::emitStoreInt32):
1473 (JSC::JIT::emitStoreAndMapInt32):
1474 (JSC::JIT::emitStoreCell):
1475 (JSC::JIT::emitStoreBool):
1476 (JSC::JIT::emitStoreDouble):
1479 (JSC::JIT::isMapped):
1480 (JSC::JIT::getMappedPayload):
1481 (JSC::JIT::getMappedTag):
1482 (JSC::JIT::emitJumpSlowCaseIfNotJSCell):
1484 2011-11-14 Michael Saboff <msaboff@apple.com>
1486 Remove unused m_data member from UStringSourceProvider
1487 https://bugs.webkit.org/show_bug.cgi?id=72289
1489 Removed unused m_data member from UStringSourceProvider.
1491 Reviewed by Oliver Hunt.
1493 * parser/SourceProvider.h:
1494 (JSC::UStringSourceProvider::UStringSourceProvider):
1496 2011-11-14 Michael Saboff <msaboff@apple.com>
1498 Towards 8 Bit Strings: Templatize YARR Parser
1499 https://bugs.webkit.org/show_bug.cgi?id=72288
1501 Changed Yarr::Parser to be a template based on character type.
1503 Reviewed by Oliver Hunt.
1505 * yarr/YarrParser.h:
1506 (JSC::Yarr::Parser::Parser):
1509 2011-11-14 Geoffrey Garen <ggaren@apple.com>
1511 32-bit build fix: Removed unused declaration.
1513 * dfg/DFGJITCodeGenerator32_64.cpp:
1514 (JSC::DFG::JITCodeGenerator::emitCall):
1516 2011-11-12 Geoffrey Garen <ggaren@apple.com>
1518 Standardized the JS calling convention
1519 https://bugs.webkit.org/show_bug.cgi?id=72221
1521 Reviewed by Oliver Hunt.
1523 This patch standardizes the calling convention so that the caller always
1524 sets up the callee's CallFrame. Adjustments for call type, callee type,
1525 argument count, etc. now always take place after that initial setup.
1527 This is a step toward reversing the argument order, but also has these
1528 immediate benefits (measured on x64):
1530 (1) 1% benchmark speedup across the board.
1532 (2) 50% code size reduction in baseline JIT function calls.
1534 (3) 1.5x speedup for single-dispatch .apply forwarding.
1536 (4) 1.1x speedup for multi-dispatch .apply forwarding.
1538 This change affected the baseline JIT most, since the baseline JIT had
1539 lots of ad hoc calling conventions for different caller / callee types.
1541 * assembler/MacroAssemblerX86_64.h:
1542 (JSC::MacroAssemblerX86_64::branchPtr):
1543 (JSC::MacroAssemblerX86_64::branchAddPtr): Optimize compare to 0 into
1544 a test, like other assemblers do. (I added some compares to 0, and didn't
1545 want them to be slow.)
1547 * bytecode/CodeBlock.cpp:
1548 (JSC::CodeBlock::dump): Merged op_load_varargs into op_call_varargs so
1549 op_call_varargs could share code generation with other forms of op_call.
1550 This is also a small optimization, since op_*varargs no longer have to
1551 pass arguments to each other through the register file.
1553 (JSC::CallLinkInfo::unlink):
1554 * bytecode/CodeBlock.h: Added a new call type: CallVarargs. This allows
1555 us to link functions called through .apply syntax. We need to distinguish
1556 CallVarargs from Call because CallVarargs changes its argument count
1557 on each inovcation, so we must always link to the argument count checking
1558 version of the callee.
1560 * bytecode/Opcode.h:
1561 * bytecompiler/BytecodeGenerator.cpp:
1562 (JSC::BytecodeGenerator::emitCallVarargs):
1563 * bytecompiler/BytecodeGenerator.h: Merged op_load_varargs into op_call_varargs.
1565 * bytecompiler/NodesCodegen.cpp:
1566 (JSC::ApplyFunctionCallDotNode::emitBytecode): Ditto. Also, simplified
1567 some of this bytecode generation to remove redundant copies.
1569 * dfg/DFGJITCodeGenerator32_64.cpp:
1570 (JSC::DFG::JITCodeGenerator::emitCall):
1571 * dfg/DFGJITCodeGenerator64.cpp:
1572 (JSC::DFG::JITCodeGenerator::emitCall): Added a new call type: CallVarargs.
1573 DFG doesn't support this type, but its code needs to change slightly
1574 to accomodate a 3-state variable.
1576 Stopped passing the argument count in regT1 because this is non-standard.
1577 (The argument count goes in the CallFrame. This trades speed on the slow
1578 path for speed and code size on the fast path, and simplicity on all paths.
1579 A good trade, in my opinion.)
1581 * dfg/DFGJITCompiler.cpp:
1582 (JSC::DFG::JITCompiler::compileEntry):
1583 (JSC::DFG::JITCompiler::link):
1584 (JSC::DFG::JITCompiler::compile):
1585 (JSC::DFG::JITCompiler::compileFunction): Tweaked code to make CallFrame
1586 setup more obvious when single-stepping. Also, updated for argument count
1589 * dfg/DFGJITCompiler.h:
1590 (JSC::DFG::JITCompiler::addJSCall):
1591 (JSC::DFG::JITCompiler::JSCallRecord::JSCallRecord): Added a new call
1594 * dfg/DFGOperations.cpp: Do finish CallFrame setup in one place before
1595 doing anything else. Don't check for stack overflow because we have no callee
1596 registers, and our caller has already checked for its own registers.
1598 * dfg/DFGRepatch.cpp:
1599 (JSC::DFG::dfgLinkFor): We can link to our callee even if our argument
1600 count doesn't match -- we just need to link to the argument count checking
1603 * interpreter/CallFrameClosure.h:
1604 (JSC::CallFrameClosure::setArgument): BUG FIX: When supplying too many
1605 arguments from C++, we need to supply a full copy of the arguments prior
1606 to the subset copy that matches our callee's argument count. (That is what
1607 the standard calling convention would have produced in JS.) I would have
1608 split this into its own patch, but I couldn't find a way to get the JIT
1609 to fail a regression test in this area without my patch applied.
1611 * interpreter/Interpreter.cpp: Let the true code bomb begin!
1613 (JSC::eval): Fixed up this helper function to operate on eval()'s CallFrame,
1614 and not eval()'s caller frame. We no longer leave the CallFrame pointing
1615 to eval()'s caller during a call to eval(), since that is not standard.
1617 (JSC::loadVarargs): Factored out a shared helper function for use by JIT
1618 and interpreter because half the code means one quarter the bugs -- in my
1619 programming, at least.
1621 (JSC::Interpreter::execute): Removed a now-unused way to invoke eval.
1623 (JSC::Interpreter::privateExecute): Removed an invalid ASSERT following
1624 putDirect, because it got in the way of my testing. (When putting a
1625 function, the cached base of a PutPropertySlot can be 0 to signify "do
1628 op_call_eval: Updated for new, standard eval calling convention.
1630 op_load_varargs: Merged op_load_varargs into op_call_varargs.
1632 op_call_varags: Updated for new, standard eval calling convention. Don't
1633 check for stack overflow because the loadVarargs helper function already
1636 * interpreter/Interpreter.h:
1637 (JSC::Interpreter::execute): Headers are fun and educational!
1639 * interpreter/RegisterFile.cpp:
1640 (JSC::RegisterFile::growSlowCase):
1641 * interpreter/RegisterFile.h:
1642 (JSC::RegisterFile::grow): Factored out the slow case into a slow
1643 case because it was cramping the style of my fast case.
1646 (JSC::JIT::privateCompile): Moved initialization of
1647 RegisterFile::CodeBlock to make it more obvious when debugging. Removed
1648 assumption that argument count is in regT1, as above. Removed call to
1649 restoreArgumentReference() because the JITStubCall abstraction does this for us.
1651 (JSC::JIT::linkFor): Link even if we miss on argument count, as above.
1654 * jit/JITCall32_64.cpp:
1655 (JSC::JIT::emitSlow_op_call):
1656 (JSC::JIT::emitSlow_op_call_eval):
1657 (JSC::JIT::emitSlow_op_call_varargs):
1658 (JSC::JIT::emitSlow_op_construct):
1659 (JSC::JIT::emit_op_call_eval):
1660 (JSC::JIT::emit_op_call_varargs): Share all function call code generation.
1661 Don't count call_eval when accounting for linkable function calls because
1662 eval doesn't link. (Its fast path is to perform the eval.)
1664 (JSC::JIT::compileLoadVarargs): Ported this inline copying optimization
1665 to our new calling convention. The key to this optimization is the
1666 observation that, in a function that declares no arguments, if any
1667 arguments are passed, they all end up right behind 'this'.
1669 (JSC::JIT::compileCallEval):
1670 (JSC::JIT::compileCallEvalSlowCase): Factored out eval for a little clarity.
1672 (JSC::JIT::compileOpCall):
1673 (JSC::JIT::compileOpCallSlowCase): If you are still with me, dear reader,
1674 this is the whole point of my patch. The caller now unconditionally moves
1675 the CallFrame forward and fills in the data it knows before taking any
1676 branches to deal with weird caller/callee pairs.
1678 This also means that there is almost no slow path for calls -- it all
1679 gets folded into the shared virtual call stub. The only things remaining
1680 in the slow path are the rare case counter and a call to the stub.
1682 * jit/JITOpcodes32_64.cpp:
1683 (JSC::JIT::privateCompileCTIMachineTrampolines):
1684 (JSC::JIT::privateCompileCTINativeCall): Updated for values being in
1685 different registers or in memory, based on our new standard calling
1688 Added a shared path for calling out to CTI helper functions for non-JS
1691 * jit/JITPropertyAccess32_64.cpp:
1692 (JSC::JIT::emit_op_method_check): method_check emits its own code and
1693 the following get_by_id's code, so it needs to add both when informing
1694 result chaining of its result. This is important because the standard
1695 calling convention can now take advantage of this chaining.
1698 (JSC::JIT::compileLoadVarargs):
1699 (JSC::JIT::compileCallEval):
1700 (JSC::JIT::compileCallEvalSlowCase):
1701 (JSC::JIT::compileOpCall):
1702 (JSC::JIT::compileOpCallSlowCase):
1703 * jit/JITOpcodes.cpp:
1704 (JSC::JIT::privateCompileCTIMachineTrampolines):
1705 (JSC::JIT::emit_op_call_eval):
1706 (JSC::JIT::emit_op_call_varargs):
1707 (JSC::JIT::emitSlow_op_call):
1708 (JSC::JIT::emitSlow_op_call_eval):
1709 (JSC::JIT::emitSlow_op_call_varargs):
1710 (JSC::JIT::emitSlow_op_construct): Observe, as I write all of my code a
1711 second time, now with 64 bits.
1714 (JSC::throwExceptionFromOpCall):
1715 (JSC::jitCompileFor):
1716 (JSC::arityCheckFor):
1717 (JSC::lazyLinkFor): A lot of mechanical changes here for one purpose:
1718 Exceptions thrown in the middle of a function call now use a shared helper
1719 function (throwExceptionFromOpCall). This function understands that the
1720 CallFrame currently points to the callEE, and the exception must be
1721 thrown by the callER. (The old calling convention would often still have
1722 the CallFrame pointing at the callER at the point of an exception. That
1723 is not the way of our new, standard calling convention.)
1725 (JSC::op_call_eval): Finish standard CallFrame setup before calling
1726 our eval helper function, which now depends on that setup.
1728 * runtime/Arguments.h:
1729 (JSC::Arguments::length): Renamed numProvidedArguments() to length()
1730 because that's what other objects call it, and the difference made our
1731 new loadVarargs helper function hard to read.
1733 * runtime/Executable.cpp:
1734 (JSC::FunctionExecutable::compileForCallInternal):
1735 (JSC::FunctionExecutable::compileForConstructInternal): Interpreter build
1738 * runtime/FunctionPrototype.cpp:
1739 (JSC::functionProtoFuncApply): Honor Arguments::MaxArguments even when
1740 the .apply call_varargs optimization fails. (This bug appears on layout
1741 tests when you disable the optimization.)
1743 2011-11-11 Jer Noble <jer.noble@apple.com>
1745 Implement MediaController.
1746 https://bugs.webkit.org/show_bug.cgi?id=71408
1748 Reviewed by Eric Carlson.
1750 Change the definition of WTF_USE_COREAUDIO to exclude Windows completely, as
1751 CoreAudioClock.h is not available there.
1755 2011-11-14 Patrick Gansterer <paroga@webkit.org>
1757 [WIN] Remove dependency on pthread from FastMalloc
1758 https://bugs.webkit.org/show_bug.cgi?id=72098
1760 Reviewed by Adam Roben.
1762 All pthread calls are already ported to native Windows calls.
1763 Use the native version for all OS(WINDOWS) to remove the
1764 runtime dependency on the pthread dll.
1766 * wtf/FastMalloc.cpp:
1768 2011-11-14 Simon Hausmann <simon.hausmann@nokia.com>
1770 [Qt] Replace use of QApplication with QGuiApplication.
1772 Reviewed by Tor Arne Vestbø.
1774 * wtf/qt/compat/qguiapplication.h:
1775 (QGuiApplication::styleHints): Introduce styleHints wrapper hack.
1777 2011-11-14 Carlos Garcia Campos <cgarcia@igalia.com>
1779 Unreviewed. Fix make distcheck build.
1781 * GNUmakefile.list.am: Add missing files.
1783 2011-11-11 Yury Semikhatsky <yurys@chromium.org>
1785 Web Inspector: function remote objetct should provide access to function position in the script
1786 https://bugs.webkit.org/show_bug.cgi?id=71808
1788 Exposed accessor for function source code.
1790 Reviewed by Pavel Feldman.
1792 * JavaScriptCore.exp:
1793 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1794 * runtime/JSFunction.cpp:
1795 (JSC::JSFunction::sourceCode):
1796 * runtime/JSFunction.h:
1798 2011-11-13 Yuqiang Xian <yuqiang.xian@intel.com>
1800 Fix silent spilling/filling GPRs in DFG 32_64
1801 https://bugs.webkit.org/show_bug.cgi?id=72201
1803 Reviewed by Gavin Barraclough.
1805 Current silentSpillGPR/silentFillGPR may not work as expected for some
1806 cases in 32_64. If there's a JSValue which was retained by two GPRs,
1807 we may end up failing to spill/fill some GPRs or redundantly
1808 spilling/filling some GPRs. For example, if we tend to exclude "eax"
1809 from spilling while a JSValue is retained by both "eax" and "edx",
1810 then "edx" won't be spilled as well (wrong). And if another JSValue is
1811 retained by "ecx" and "ebx", both "ecx" and "ebx" will be spilled
1812 twice. The similar problem applies to silentFillGPR.
1813 The fix is to make silentSpillGPR/silentFillGPR more straightforward,
1814 i.e., spilling/filling based on the GPR instead of the virtual
1815 register. FPR spilling/filling is also modified accordingly to make it
1816 consistent with GPR spilling/filling.
1818 * dfg/DFGJITCodeGenerator.h:
1819 (JSC::DFG::JITCodeGenerator::silentSpillGPR):
1820 (JSC::DFG::JITCodeGenerator::silentSpillFPR):
1821 (JSC::DFG::JITCodeGenerator::silentFillGPR):
1822 (JSC::DFG::JITCodeGenerator::silentFillFPR):
1823 (JSC::DFG::JITCodeGenerator::silentSpillAllRegisters):
1824 (JSC::DFG::JITCodeGenerator::silentFillAllRegisters):
1826 2011-11-12 Laszlo Gombos <laszlo.1.gombos@nokia.com>
1828 [Qt][Symbian] Remove support for WINSCW compiler
1829 https://bugs.webkit.org/show_bug.cgi?id=70178
1831 Reviewed by Chang Shu.
1833 * API/JSStringRef.h:
1834 * create_hash_table: Revert r45553.
1835 * runtime/JSGlobalData.cpp: Revert r45553.
1836 * runtime/LiteralParser.cpp: Remove WINSCW comment.
1837 (JSC::LiteralParser::Lexer::lexString):
1838 * runtime/Lookup.h: Revert r45553.
1839 * runtime/Structure.h: Revert r48461.
1841 * wtf/Assertions.h: Revert r52337.
1843 * wtf/ListRefPtr.h: Revert r48988.
1844 (WTF::ListRefPtr::~ListRefPtr):
1845 * wtf/OwnArrayPtr.h: Revert r45911.
1846 (WTF::OwnArrayPtr::operator UnspecifiedBoolType):
1847 * wtf/PassOwnArrayPtr.h:
1848 (WTF::PassOwnArrayPtr::operator UnspecifiedBoolType):
1850 * wtf/StaticConstructors.h:
1851 * wtf/unicode/qt4/UnicodeQt4.h:
1853 2011-11-12 Patrick Gansterer <paroga@webkit.org>
1855 Unreviewed. Add ENABLE(DFG_JIT) around DFGCorrectableJumpPoint code.
1857 * dfg/DFGCorrectableJumpPoint.cpp:
1858 * dfg/DFGCorrectableJumpPoint.h:
1860 2011-11-12 Patrick Gansterer <paroga@webkit.org>
1862 [CMake] Move list of DFG source files into correct file
1863 https://bugs.webkit.org/show_bug.cgi?id=72212
1865 Reviewed by Daniel Bates.
1867 The DFG files are platform independent. So move them from
1868 the EFL specific file into the general CMakeLists.txt.
1871 * PlatformEfl.cmake:
1873 2011-11-12 Patrick Gansterer <paroga@webkit.org>
1875 Fix "unused variable" warning in JSLock
1876 https://bugs.webkit.org/show_bug.cgi?id=72213
1878 Reviewed by Anders Carlsson.
1880 Use ASSERT_UNUSED() instead of ASSERT() to make sure
1881 that the variable is also used in the release build.
1883 * runtime/JSLock.cpp:
1884 (JSC::JSLock::lock):
1885 (JSC::JSLock::unlock):
1887 2011-11-11 Gavin Barraclough <barraclough@apple.com>
1889 Update iOS compiler version.
1891 Reviewed by David Kilzer.
1893 * Configurations/CompilerVersion.xcconfig:
1894 - Update compiler version.
1896 2011-11-11 Gavin Barraclough <barraclough@apple.com>
1898 Update iOS port's configuration setting, particularly in Platform.h
1899 https://bugs.webkit.org/show_bug.cgi?id=72187
1901 Reviewed by David Kilzer.
1903 * interpreter/Interpreter.h:
1904 - Lower the reentry depth.
1905 * runtime/DatePrototype.cpp:
1907 * wtf/FastMalloc.cpp:
1908 (WTF::TCMalloc_PageHeap::IncrementalScavenge):
1909 - Update fastmalloc configuration for iOS.
1910 * wtf/OSAllocatorPosix.cpp:
1911 (WTF::OSAllocator::reserveAndCommit):
1914 - Update platform configuration for iOS.
1916 2011-11-11 David Kilzer <ddkilzer@apple.com>
1918 Only define BUILDING_ON_* and TARGETING_* macros when building for Mac OS X
1919 <http://webkit.org/b/72175>
1921 Reviewed by Joseph Pecoraro.
1923 * wtf/Platform.h: Move the definition of the BUILDING_ON_* and
1924 TARGETING_* macros to where the WTF_OS_MAC_OS_X macro is defined
1925 so that they're only defined on Mac OS X builds. Also include
1926 Availability.h, which is needed on iOS builds.
1928 2011-11-11 Darin Adler <darin@apple.com>
1930 Remove all releaseRef implementations except for RetainPtr
1931 https://bugs.webkit.org/show_bug.cgi?id=71423
1933 Reviewed by Julien Chaffraix.
1935 * API/JSRetainPtr.h: Removed releaseRef.
1936 * wtf/PassRefPtr.h: Removed releaseRef.
1938 2011-11-11 Darin Adler <darin@apple.com>
1940 * JavaScriptCore.xcodeproj/project.pbxproj: Let a newer Xcode update this file.
1941 If an older Xcode downgrades this file and we have a risk of some kind of
1942 oscillating commit situation, please contact me so I know not to do this again.
1944 2011-11-11 Mark Hahnenberg <mhahnenberg@apple.com>
1946 Add jsCast to replace static_cast
1947 https://bugs.webkit.org/show_bug.cgi?id=72071
1949 Reviewed by Geoffrey Garen.
1951 Added new jsCast and changed all of the static_cast sites in functions that
1952 are in the MethodTable to use jsCast instead.
1954 * API/JSCallbackFunction.cpp:
1955 (JSC::JSCallbackFunction::toStringCallback):
1956 (JSC::JSCallbackFunction::valueOfCallback):
1957 * API/JSCallbackObject.h:
1958 (JSC::JSCallbackObject::visitChildren):
1959 * API/JSCallbackObjectFunctions.h:
1961 (JSC::::getOwnPropertySlot):
1962 (JSC::::getOwnPropertyDescriptor):
1964 (JSC::::deleteProperty):
1965 (JSC::::deletePropertyByIndex):
1966 (JSC::::getConstructData):
1967 (JSC::::hasInstance):
1968 (JSC::::getCallData):
1969 (JSC::::getOwnPropertyNames):
1970 * debugger/DebuggerActivation.cpp:
1971 (JSC::DebuggerActivation::visitChildren):
1972 (JSC::DebuggerActivation::className):
1973 (JSC::DebuggerActivation::getOwnPropertySlot):
1974 (JSC::DebuggerActivation::put):
1975 (JSC::DebuggerActivation::putWithAttributes):
1976 (JSC::DebuggerActivation::deleteProperty):
1977 (JSC::DebuggerActivation::getOwnPropertyNames):
1978 (JSC::DebuggerActivation::getOwnPropertyDescriptor):
1979 (JSC::DebuggerActivation::defineGetter):
1980 (JSC::DebuggerActivation::defineSetter):
1981 * runtime/Arguments.cpp:
1982 (JSC::Arguments::visitChildren):
1983 (JSC::Arguments::getOwnPropertySlotByIndex):
1984 (JSC::Arguments::getOwnPropertySlot):
1985 (JSC::Arguments::getOwnPropertyDescriptor):
1986 (JSC::Arguments::getOwnPropertyNames):
1987 (JSC::Arguments::putByIndex):
1988 (JSC::Arguments::put):
1989 (JSC::Arguments::deletePropertyByIndex):
1990 (JSC::Arguments::deleteProperty):
1991 * runtime/ArrayConstructor.cpp:
1992 (JSC::ArrayConstructor::getOwnPropertySlot):
1993 (JSC::ArrayConstructor::getOwnPropertyDescriptor):
1994 * runtime/ArrayPrototype.cpp:
1995 (JSC::ArrayPrototype::getOwnPropertySlot):
1996 (JSC::ArrayPrototype::getOwnPropertyDescriptor):
1997 * runtime/BooleanPrototype.cpp:
1998 (JSC::BooleanPrototype::getOwnPropertySlot):
1999 (JSC::BooleanPrototype::getOwnPropertyDescriptor):
2000 * runtime/DateConstructor.cpp:
2001 (JSC::DateConstructor::getOwnPropertySlot):
2002 (JSC::DateConstructor::getOwnPropertyDescriptor):
2003 * runtime/DatePrototype.cpp:
2004 (JSC::DatePrototype::getOwnPropertySlot):
2005 (JSC::DatePrototype::getOwnPropertyDescriptor):
2006 * runtime/ErrorPrototype.cpp:
2007 (JSC::ErrorPrototype::getOwnPropertySlot):
2008 (JSC::ErrorPrototype::getOwnPropertyDescriptor):
2009 * runtime/Executable.cpp:
2010 (JSC::ExecutableBase::clearCode):
2011 (JSC::EvalExecutable::visitChildren):
2012 (JSC::ProgramExecutable::visitChildren):
2013 (JSC::FunctionExecutable::visitChildren):
2014 * runtime/GetterSetter.cpp:
2015 (JSC::GetterSetter::visitChildren):
2016 * runtime/JSActivation.cpp:
2017 (JSC::JSActivation::visitChildren):
2018 (JSC::JSActivation::getOwnPropertyNames):
2019 (JSC::JSActivation::getOwnPropertySlot):
2020 (JSC::JSActivation::put):
2021 (JSC::JSActivation::putWithAttributes):
2022 * runtime/JSArray.cpp:
2023 (JSC::JSArray::getOwnPropertySlotByIndex):
2024 (JSC::JSArray::getOwnPropertySlot):
2025 (JSC::JSArray::getOwnPropertyDescriptor):
2026 (JSC::JSArray::put):
2027 (JSC::JSArray::putByIndex):
2028 (JSC::JSArray::deleteProperty):
2029 (JSC::JSArray::deletePropertyByIndex):
2030 (JSC::JSArray::getOwnPropertyNames):
2031 (JSC::JSArray::visitChildren):
2032 * runtime/JSBoundFunction.cpp:
2033 (JSC::JSBoundFunction::hasInstance):
2034 (JSC::JSBoundFunction::visitChildren):
2035 * runtime/JSByteArray.cpp:
2036 (JSC::JSByteArray::getOwnPropertySlot):
2037 (JSC::JSByteArray::getOwnPropertyDescriptor):
2038 (JSC::JSByteArray::getOwnPropertySlotByIndex):
2039 (JSC::JSByteArray::put):
2040 (JSC::JSByteArray::putByIndex):
2041 (JSC::JSByteArray::getOwnPropertyNames):
2043 (JSC::JSCell::visitChildren):
2045 * runtime/JSFunction.cpp:
2046 (JSC::JSFunction::visitChildren):
2047 (JSC::JSFunction::getCallData):
2048 (JSC::JSFunction::getOwnPropertySlot):
2049 (JSC::JSFunction::getOwnPropertyDescriptor):
2050 (JSC::JSFunction::getOwnPropertyNames):
2051 (JSC::JSFunction::put):
2052 (JSC::JSFunction::deleteProperty):
2053 (JSC::JSFunction::getConstructData):
2054 * runtime/JSGlobalData.cpp:
2055 (JSC::StackPreservingRecompiler::operator()):
2056 * runtime/JSGlobalObject.cpp:
2057 (JSC::JSGlobalObject::put):
2058 (JSC::JSGlobalObject::putWithAttributes):
2059 (JSC::JSGlobalObject::defineGetter):
2060 (JSC::JSGlobalObject::defineSetter):
2061 (JSC::JSGlobalObject::visitChildren):
2062 (JSC::JSGlobalObject::getOwnPropertySlot):
2063 (JSC::JSGlobalObject::getOwnPropertyDescriptor):
2064 (JSC::JSGlobalObject::clearRareData):
2065 * runtime/JSGlobalThis.cpp:
2066 (JSC::JSGlobalThis::visitChildren):
2067 * runtime/JSONObject.cpp:
2068 (JSC::JSONObject::getOwnPropertySlot):
2069 (JSC::JSONObject::getOwnPropertyDescriptor):
2070 * runtime/JSObject.cpp:
2071 (JSC::JSObject::finalize):
2072 (JSC::JSObject::visitChildren):
2073 (JSC::JSObject::getOwnPropertySlotByIndex):
2074 (JSC::JSObject::put):
2075 (JSC::JSObject::putByIndex):
2076 (JSC::JSObject::deleteProperty):
2077 (JSC::JSObject::deletePropertyByIndex):
2078 * runtime/JSObject.h:
2079 (JSC::JSObject::getOwnPropertySlot):
2080 * runtime/JSPropertyNameIterator.cpp:
2081 (JSC::JSPropertyNameIterator::visitChildren):
2082 * runtime/JSStaticScopeObject.cpp:
2083 (JSC::JSStaticScopeObject::visitChildren):
2084 (JSC::JSStaticScopeObject::put):
2085 (JSC::JSStaticScopeObject::putWithAttributes):
2086 (JSC::JSStaticScopeObject::getOwnPropertySlot):
2087 * runtime/JSString.cpp:
2088 (JSC::JSString::visitChildren):
2089 (JSC::JSString::toThisObject):
2090 (JSC::JSString::getOwnPropertySlot):
2091 (JSC::JSString::getOwnPropertySlotByIndex):
2092 * runtime/JSVariableObject.cpp:
2093 (JSC::JSVariableObject::deleteProperty):
2094 (JSC::JSVariableObject::getOwnPropertyNames):
2095 * runtime/JSWrapperObject.cpp:
2096 (JSC::JSWrapperObject::visitChildren):
2097 * runtime/MathObject.cpp:
2098 (JSC::MathObject::getOwnPropertySlot):
2099 (JSC::MathObject::getOwnPropertyDescriptor):
2100 * runtime/NativeErrorConstructor.cpp:
2101 (JSC::NativeErrorConstructor::visitChildren):
2102 * runtime/NumberConstructor.cpp:
2103 (JSC::NumberConstructor::getOwnPropertySlot):
2104 (JSC::NumberConstructor::getOwnPropertyDescriptor):
2105 * runtime/NumberPrototype.cpp:
2106 (JSC::NumberPrototype::getOwnPropertySlot):
2107 (JSC::NumberPrototype::getOwnPropertyDescriptor):
2108 * runtime/ObjectConstructor.cpp:
2109 (JSC::ObjectConstructor::getOwnPropertySlot):
2110 (JSC::ObjectConstructor::getOwnPropertyDescriptor):
2111 * runtime/ObjectPrototype.cpp:
2112 (JSC::ObjectPrototype::put):
2113 (JSC::ObjectPrototype::getOwnPropertySlotByIndex):
2114 (JSC::ObjectPrototype::getOwnPropertySlot):
2115 (JSC::ObjectPrototype::getOwnPropertyDescriptor):
2116 * runtime/RegExpConstructor.cpp:
2117 (JSC::RegExpConstructor::getOwnPropertySlot):
2118 (JSC::RegExpConstructor::getOwnPropertyDescriptor):
2119 (JSC::RegExpConstructor::put):
2120 * runtime/RegExpMatchesArray.h:
2121 (JSC::RegExpMatchesArray::getOwnPropertySlot):
2122 (JSC::RegExpMatchesArray::getOwnPropertySlotByIndex):
2123 (JSC::RegExpMatchesArray::getOwnPropertyDescriptor):
2124 (JSC::RegExpMatchesArray::put):
2125 (JSC::RegExpMatchesArray::putByIndex):
2126 (JSC::RegExpMatchesArray::deleteProperty):
2127 (JSC::RegExpMatchesArray::deletePropertyByIndex):
2128 (JSC::RegExpMatchesArray::getOwnPropertyNames):
2129 * runtime/RegExpObject.cpp:
2130 (JSC::RegExpObject::visitChildren):
2131 (JSC::RegExpObject::getOwnPropertySlot):
2132 (JSC::RegExpObject::getOwnPropertyDescriptor):
2133 (JSC::RegExpObject::put):
2134 * runtime/RegExpPrototype.cpp:
2135 (JSC::RegExpPrototype::getOwnPropertySlot):
2136 (JSC::RegExpPrototype::getOwnPropertyDescriptor):
2137 * runtime/ScopeChain.cpp:
2138 (JSC::ScopeChainNode::visitChildren):
2139 * runtime/StringConstructor.cpp:
2140 (JSC::StringConstructor::getOwnPropertySlot):
2141 (JSC::StringConstructor::getOwnPropertyDescriptor):
2142 * runtime/StringObject.cpp:
2143 (JSC::StringObject::getOwnPropertySlot):
2144 (JSC::StringObject::getOwnPropertySlotByIndex):
2145 (JSC::StringObject::getOwnPropertyDescriptor):
2146 (JSC::StringObject::deleteProperty):
2147 (JSC::StringObject::getOwnPropertyNames):
2148 * runtime/StringPrototype.cpp:
2149 (JSC::StringPrototype::getOwnPropertySlot):
2150 (JSC::StringPrototype::getOwnPropertyDescriptor):
2151 * runtime/Structure.cpp:
2152 (JSC::Structure::visitChildren):
2153 * runtime/StructureChain.cpp:
2154 (JSC::StructureChain::visitChildren):
2156 2011-11-11 Gavin Barraclough <barraclough@apple.com>
2158 Enable DFG JIT for ARMv7/iOS.
2160 Rubber stamped by Oliver Hunt.
2163 - enable DFG JIT for ARMv7/iOS.
2165 2011-11-11 Mark Hahnenberg <mhahnenberg@apple.com>
2167 De-virtualize supportsProfiling, supportsRichSourceInfo, shouldInterruptScript in JSGlobalObject
2168 https://bugs.webkit.org/show_bug.cgi?id=72035
2170 Reviewed by Geoffrey Garen.
2172 De-virtualized the methods through the use of a new method table just for JSGlobalObject and subclasses.
2174 * JavaScriptCore.exp:
2175 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2176 * bytecompiler/BytecodeGenerator.cpp: Changed call sites to use the new GlobalObjectMethodTable.
2177 (JSC::BytecodeGenerator::BytecodeGenerator):
2178 * interpreter/Interpreter.cpp: Ditto.
2179 (JSC::Interpreter::execute):
2180 * runtime/JSGlobalObject.cpp: Added a static const GlobalObjectMethodTable with the correct function pointers.
2181 * runtime/JSGlobalObject.h: Added a field in JSGlobalObject to keep track of the current method table.
2182 (JSC::JSGlobalObject::JSGlobalObject):
2183 (JSC::JSGlobalObject::globalObjectMethodTable): The new struct to contain the function pointers.
2184 (JSC::JSGlobalObject::supportsProfiling): Made static to put in the method table.
2185 (JSC::JSGlobalObject::supportsRichSourceInfo): Ditto.
2186 (JSC::JSGlobalObject::shouldInterruptScript): Ditto.
2187 * runtime/TimeoutChecker.cpp: Changed call sites to use the new GlobalObjectMethodTable for lookup.
2188 (JSC::TimeoutChecker::didTimeOut):
2190 2011-11-11 Mark Hahnenberg <mhahnenberg@apple.com>
2192 De-virtualize JSGlobalObject::allowsAccessFrom
2193 https://bugs.webkit.org/show_bug.cgi?id=71969
2195 Reviewed by Darin Adler.
2197 * runtime/JSGlobalObject.h: Removed allowsAccessFrom from JSGlobalObject since it is exclusive to
2198 JSDOMWindowBase and WebScriptObject.
2200 2011-11-11 Sheriff Bot <webkit.review.bot@gmail.com>
2202 Unreviewed, rolling out r99950.
2203 http://trac.webkit.org/changeset/99950
2204 https://bugs.webkit.org/show_bug.cgi?id=72117
2206 "Landed wrong patch by mistake" (Requested by yurys on
2209 * JavaScriptCore.exp:
2210 * runtime/JSFunction.cpp:
2211 * runtime/JSFunction.h:
2213 2011-11-11 Patrick Gansterer <paroga@webkit.org>
2215 Unreviewed. Build fix for !ENABLE(JIT) after r99898.
2217 * bytecode/CodeBlock.cpp:
2218 (JSC::CodeBlock::CodeBlock):
2220 2011-11-10 Dan Bernstein <mitz@apple.com>
2222 Disabling assertions breaks the debug build
2223 https://bugs.webkit.org/show_bug.cgi?id=72091
2225 Reviewed by Geoff Garen.
2227 * dfg/DFGNode.h: Made hasIdentifier() available when assertions are
2228 disabled. It is used in Graph::dump().
2229 * runtime/JSObject.cpp:
2230 (JSC::JSObject::visitChildren): Update m_isCheckingForDefaultMarkViolation
2231 only if assertions are enabled.
2233 (WTF::::checkIndexValidity): Changed ASSERT to ASSERT_UNUSED.
2234 * wtf/ThreadRestrictionVerifier.h:
2235 (WTF::ThreadRestrictionVerifier::setShared): Guarded the definition of
2236 a local variable that is only used in an assertion.
2238 2011-11-10 Filip Pizlo <fpizlo@apple.com>
2240 JSString forgets to clear m_fibers when resolving ropes
2241 https://bugs.webkit.org/show_bug.cgi?id=72089
2243 Reviewed by Geoff Garen.
2245 * runtime/JSString.cpp:
2246 (JSC::JSString::resolveRopeSlowCase):
2248 2011-11-09 Filip Pizlo <fpizlo@apple.com>
2250 DFG byte array support sometimes clamps values incorrectly
2251 https://bugs.webkit.org/show_bug.cgi?id=71975
2253 Reviewed by Oliver Hunt.
2255 * dfg/DFGSpeculativeJIT.cpp:
2256 (JSC::DFG::SpeculativeJIT::compilePutByValForByteArray):
2258 2011-11-10 Filip Pizlo <fpizlo@apple.com>
2260 ValueProfile/PredictedType contains dead code, and doesn't recognize functions
2261 https://bugs.webkit.org/show_bug.cgi?id=72065
2263 Reviewed by Gavin Barraclough and Geoff Garen.
2265 Added PredictFunction support, and did some cleaning up along the way.
2266 ValueProfile no longer has statistics machinery, because we never used
2267 it. Rearranged some bits in PredictedType to more easily make room for
2268 one more object type. Changed some debug code to use more consistent
2269 conventions (ByteArray becomes Bytearray so that if we ever have a
2270 "Byte" prediction we don't get confused between a prediction that is
2271 the union of Byte and Array and a prediction that indicates precisely
2274 * bytecode/PredictedType.cpp:
2275 (JSC::predictionToString):
2276 (JSC::predictionFromClassInfo):
2277 * bytecode/PredictedType.h:
2278 (JSC::isFunctionPrediction):
2279 * bytecode/ValueProfile.cpp:
2280 * bytecode/ValueProfile.h:
2281 (JSC::ValueProfile::dump):
2282 * dfg/DFGAbstractState.cpp:
2283 (JSC::DFG::AbstractState::execute):
2284 * dfg/DFGPropagator.cpp:
2285 (JSC::DFG::Propagator::propagateNodePredictions):
2287 2011-11-10 David Kilzer <ddkilzer@apple.com>
2289 <http://webkit.org/b/72049> Specify testapi.js install path using JAVASCRIPTCORE_FRAMEWORKS_DIR
2291 Reviewed by Joseph Pecoraro.
2293 * JavaScriptCore.xcodeproj/project.pbxproj: The testapi.js
2294 script should use JAVASCRIPTCORE_FRAMEWORKS_DIR in its dstPath
2295 for installation. Also removed "Versions/A/" from the path
2296 since this is unneeded due the default symlinks present in the
2299 2011-11-10 Gavin Barraclough <barraclough@apple.com>
2301 Add ARMv7 support to the DFG JIT
2302 https://bugs.webkit.org/show_bug.cgi?id=72061
2304 Reviewed by Geoff Garen.
2306 * dfg/DFGAssemblyHelpers.h:
2307 (JSC::DFG::AssemblyHelpers::preserveReturnAddressAfterCall):
2308 (JSC::DFG::AssemblyHelpers::restoreReturnAddressBeforeReturn):
2309 (JSC::DFG::AssemblyHelpers::emitPutImmediateToCallFrameHeader):
2310 (JSC::DFG::AssemblyHelpers::boxDouble):
2311 (JSC::DFG::AssemblyHelpers::unboxDouble):
2312 - Add CPU(ARM) copies of these functions.
2313 * dfg/DFGJITCodeGenerator.h:
2314 (JSC::DFG::JITCodeGenerator::spill):
2315 - Fix matching of '}' re #if blocks, makes some tools happy.
2316 (JSC::DFG::JITCodeGenerator::setupArguments):
2317 (JSC::DFG::JITCodeGenerator::setupArgumentsWithExecState):
2318 (JSC::DFG::JITCodeGenerator::appendCallWithExceptionCheckSetResult):
2319 (JSC::DFG::JITCodeGenerator::appendCallSetResult):
2320 - Add CPU(ARM) / 4 argument register copies of these functions.
2321 * dfg/DFGJITCodeGenerator32_64.cpp:
2322 (JSC::DFG::JITCodeGenerator::nonSpeculativeValueToInt32):
2323 - Should use callOperation to plant a call to a DFG_OPERATION.
2324 (JSC::DFG::JITCodeGenerator::cachedGetById):
2325 (JSC::DFG::JITCodeGenerator::cachedPutById):
2326 - These methods need to plant a relinkable jump; we currently do so
2327 using beginUninterruptedSequence() / endUninterruptedSequence().
2328 * dfg/DFGJITCodeGenerator64.cpp:
2329 (JSC::DFG::JITCodeGenerator::nonSpeculativeValueToInt32):
2330 - Should use callOperation to plant a call to a DFG_OPERATION.
2331 * dfg/DFGJITCompiler.cpp:
2332 (JSC::DFG::JITCompiler::linkOSRExits):
2333 - This method needs to plant a relinkable jump; we currently do so
2334 using beginUninterruptedSequence() / endUninterruptedSequence().
2335 (JSC::DFG::JITCompiler::compileBody):
2336 - Add abstraction to retrieve the pc after a call.
2337 * dfg/DFGOSRExitCompiler.cpp:
2338 - Fix a bug - CodeLocationLabel needs a data address rather than an
2339 executable one, but can just take a MacroAssemblerCodePtr instead!
2340 * dfg/DFGOperations.cpp:
2341 * dfg/DFGSpeculativeJIT.cpp:
2342 (JSC::DFG::compileClampDoubleToByte):
2343 - Add FIXME comment to come back to! - bug#72054.
2344 * dfg/DFGSpeculativeJIT.h:
2345 (JSC::DFG::SpeculativeJIT::speculationCheck):
2346 - Add missing method (ooops, required by bug#72047)
2347 * dfg/DFGSpeculativeJIT32_64.cpp:
2348 - Need to wrap fmod on ARMv7.
2351 2011-11-10 Filip Pizlo <fpizlo@apple.com>
2353 DFG should not reparse code that was just parsed
2354 https://bugs.webkit.org/show_bug.cgi?id=71977
2356 Reviewed by Geoff Garen.
2358 The instruction stream of a code block is now kept around until
2359 the next GC. When doing either an optimizing compilation of an
2360 executable, or inlining of an executable, we now try to find the
2361 already preexisting bytecode. If we find it, we don't have to parse.
2362 If we don't find it, we parse as before. Inlining takes the extra
2363 step of caching code blocks, so if the same executable gets inlined
2364 multiple times into the same caller, then we parse it at most once
2365 even if prior to inlining that executable did not have any code
2366 blocks with an instruction stream.
2368 Also fixed a silly bug where the strict mode for various operations
2369 was being determined by looking at the machine code block rather
2372 To enable the delete-on-next-GC policy, I introduced the notion
2373 of an ultra weak finalizer, which anyone can register during
2374 tracing. This is thread-safe (for parallel GC) and
2375 stop-the-world-safe (so calls to free() are postponed until the
2376 world is resumed). This required reusing some facilities previously
2377 created for WeakReferenceHarvester, so I created a common utility
2378 class. I also retweaked the handling of WeakReferenceHarvesters,
2379 since they should be executed during stop-the-world since in the
2380 future we may want to allow them to call drain().
2382 2% win on SunSpider. 2% win on V8, when run in my harness. Neutral
2385 * JavaScriptCore.xcodeproj/project.pbxproj:
2386 * bytecode/CodeBlock.cpp:
2387 (JSC::CodeBlock::CodeBlock):
2388 (JSC::CodeBlock::visitAggregate):
2389 (JSC::CodeBlock::copyPostParseDataFrom):
2390 (JSC::CodeBlock::copyPostParseDataFromAlternative):
2391 (JSC::CodeBlock::finalizeUnconditionally):
2392 * bytecode/CodeBlock.h:
2393 (JSC::CodeBlock::canProduceCopyWithBytecode):
2394 (JSC::CodeBlock::discardBytecodeLater):
2395 (JSC::CodeBlock::handleBytecodeDiscardingOpportunity):
2396 (JSC::GlobalCodeBlock::GlobalCodeBlock):
2397 (JSC::ProgramCodeBlock::ProgramCodeBlock):
2398 (JSC::EvalCodeBlock::EvalCodeBlock):
2399 (JSC::FunctionCodeBlock::FunctionCodeBlock):
2400 (JSC::BytecodeDestructionBlocker::BytecodeDestructionBlocker):
2401 (JSC::BytecodeDestructionBlocker::~BytecodeDestructionBlocker):
2402 * dfg/DFGAssemblyHelpers.h:
2403 (JSC::DFG::AssemblyHelpers::strictModeFor):
2404 * dfg/DFGByteCodeCache.h: Added.
2405 (JSC::DFG::CodeBlockKey::CodeBlockKey):
2406 (JSC::DFG::CodeBlockKey::operator==):
2407 (JSC::DFG::CodeBlockKey::hash):
2408 (JSC::DFG::CodeBlockKey::executable):
2409 (JSC::DFG::CodeBlockKey::kind):
2410 (JSC::DFG::CodeBlockKey::isHashTableDeletedValue):
2411 (JSC::DFG::CodeBlockKeyHash::hash):
2412 (JSC::DFG::CodeBlockKeyHash::equal):
2413 (JSC::DFG::ByteCodeCache::ByteCodeCache):
2414 (JSC::DFG::ByteCodeCache::~ByteCodeCache):
2415 (JSC::DFG::ByteCodeCache::get):
2416 * dfg/DFGByteCodeParser.cpp:
2417 (JSC::DFG::ByteCodeParser::handleInlining):
2418 * dfg/DFGJITCodeGenerator32_64.cpp:
2419 (JSC::DFG::JITCodeGenerator::cachedPutById):
2420 * dfg/DFGJITCodeGenerator64.cpp:
2421 (JSC::DFG::JITCodeGenerator::cachedPutById):
2422 * dfg/DFGSpeculativeJIT64.cpp:
2423 (JSC::DFG::SpeculativeJIT::compile):
2425 (JSC::Heap::finalizeUnconditionally):
2426 (JSC::Heap::markRoots):
2427 (JSC::Heap::collect):
2429 * heap/ListableHandler.h: Added.
2430 (JSC::ListableHandler::ListableHandler):
2431 (JSC::ListableHandler::~ListableHandler):
2432 (JSC::ListableHandler::List::List):
2433 (JSC::ListableHandler::List::addNotThreadSafe):
2434 (JSC::ListableHandler::List::addThreadSafe):
2435 (JSC::ListableHandler::List::hasNext):
2436 (JSC::ListableHandler::List::removeNext):
2437 * heap/MarkStack.cpp:
2438 (JSC::MarkStackThreadSharedData::MarkStackThreadSharedData):
2439 (JSC::SlotVisitor::harvestWeakReferences):
2440 (JSC::SlotVisitor::finalizeUnconditionally):
2442 (JSC::MarkStack::addWeakReferenceHarvester):
2443 (JSC::MarkStack::addUnconditionalFinalizer):
2444 * heap/SlotVisitor.h:
2445 * heap/UnconditionalFinalizer.h: Added.
2446 (JSC::UnconditionalFinalizer::~UnconditionalFinalizer):
2447 * heap/WeakReferenceHarvester.h:
2448 (JSC::WeakReferenceHarvester::WeakReferenceHarvester):
2449 (JSC::WeakReferenceHarvester::~WeakReferenceHarvester):
2450 * runtime/Executable.cpp:
2451 (JSC::EvalExecutable::compileInternal):
2452 (JSC::ProgramExecutable::compileInternal):
2453 (JSC::FunctionExecutable::baselineCodeBlockFor):
2454 (JSC::FunctionExecutable::codeBlockWithBytecodeFor):
2455 (JSC::FunctionExecutable::produceCodeBlockFor):
2456 (JSC::FunctionExecutable::compileForCallInternal):
2457 (JSC::FunctionExecutable::compileForConstructInternal):
2458 * runtime/Executable.h:
2459 (JSC::FunctionExecutable::profiledCodeBlockFor):
2461 2011-11-10 Gavin Barraclough <barraclough@apple.com>
2463 Add ARMv7 register info for the DFG JIT
2464 https://bugs.webkit.org/show_bug.cgi?id=72050
2466 Reviewed by Geoff Garen.
2469 (JSC::DFG::FPRInfo::toRegister):
2470 (JSC::DFG::FPRInfo::toIndex):
2471 (JSC::DFG::FPRInfo::debugName):
2473 (JSC::DFG::GPRInfo::toRegister):
2474 (JSC::DFG::GPRInfo::toIndex):
2475 (JSC::DFG::GPRInfo::debugName):
2477 2011-11-10 Gavin Barraclough <barraclough@apple.com>
2479 #ifdef CPU(X86) specific div/mod code in DFGSpeculativeJIT32_64
2480 https://bugs.webkit.org/show_bug.cgi?id=72047
2482 Reviewed by Geoff Garen.
2484 We currently don't attempt to abstract divide through the macro assembler,
2485 due to these instructions commonly having specific requirements. This means
2486 there is architecture specific code in the JIT - #ifdef it, and provide a
2487 common implementation.
2489 * dfg/DFGSpeculativeJIT32_64.cpp:
2490 (JSC::DFG::fmodAsDFGOperation):
2491 (JSC::DFG::SpeculativeJIT::compile):
2493 2011-11-10 Gavin Barraclough <barraclough@apple.com>
2495 Add ENABLE_VALUE_PROFILER support for ARMv7
2496 https://bugs.webkit.org/show_bug.cgi?id=72043
2498 Reviewed by Geoff Garen.
2500 This requires us to make a bucketCounterRegister available; to do so we'll need to spill more registers on entry to JIT code.
2502 * jit/JITArithmetic32_64.cpp:
2503 (JSC::JIT::emitSlow_op_mod):
2504 - cleanup location of UNUSED_PARAM
2506 (JSC::ctiTrampoline):
2507 (JSC::ctiVMThrowTrampoline):
2508 (JSC::ctiOpThrowNotCaught):
2509 (JSC::JITThunks::JITThunks):
2511 - Update JITStackFrame structure & asm code to spill more registers.
2512 * jit/JSInterfaceJIT.h:
2513 - Assign a bucketCounterRegister.
2515 2011-11-10 Gavin Barraclough <barraclough@apple.com>
2517 Fix sampling counters on ARMv7, move add64 functionality to macro assembler
2518 https://bugs.webkit.org/show_bug.cgi?id=72040
2520 Reviewed by Geoff Garen.
2522 The ability to add an integer to a uint64_t in memory is poorly copied in
2523 multiple places & ifdef'ed on architecture, addWithCarry32 is also a badly
2524 designed interface since add32 is not required to set flags (we have no
2525 concept of flags in the macro assembler interface).
2527 * assembler/MacroAssemblerARMv7.h:
2528 (JSC::MacroAssemblerARMv7::add64):
2529 * assembler/MacroAssemblerX86.h:
2530 (JSC::MacroAssemblerX86::add64):
2531 * assembler/MacroAssemblerX86_64.h:
2532 (JSC::MacroAssemblerX86_64::add64):
2533 * dfg/DFGAssemblyHelpers.cpp:
2534 * dfg/DFGAssemblyHelpers.h:
2535 (JSC::DFG::AssemblyHelpers::emitCount):
2536 * dfg/DFGJITCodeGenerator.cpp:
2537 (JSC::DFG::JITCodeGenerator::writeBarrier):
2539 * jit/JITInlineMethods.h:
2540 (JSC::JIT::emitCount):
2542 011-11-10 Ryuan Choi <ryuan.choi@samsung.com>
2544 [CMAKE] Refactoring CMakeLists${PORT}.txt to Platform${PORT}.cmake
2545 https://bugs.webkit.org/show_bug.cgi?id=56705
2547 Reviewed by Adam Roben.
2550 * PlatformEfl.cmake: Renamed from Source/JavaScriptCore/CMakeListsEfl.txt.
2551 * PlatformWinCE.cmake: Renamed from Source/JavaScriptCore/CMakeListsWinCE.txt.
2552 * shell/CMakeLists.txt:
2553 * shell/PlatformEfl.cmake: Renamed from Source/JavaScriptCore/shell/CMakeListsEfl.txt.
2554 * shell/PlatformWinCE.cmake: Renamed from Source/JavaScriptCore/shell/CMakeListsWinCE.txt.
2555 * wtf/CMakeLists.txt:
2556 * wtf/PlatformEfl.cmake: Renamed from Source/JavaScriptCore/wtf/CMakeListsEfl.txt.
2557 * wtf/PlatformWinCE.cmake: Renamed from Source/JavaScriptCore/wtf/CMakeListsWinCE.txt.
2559 2011-11-10 Carlos Garcia Campos <cgarcia@igalia.com>
2561 Unreviewed. Fix make distcheck build.
2563 * GNUmakefile.list.am: Add missing files.
2565 2011-11-09 Michael Saboff <msaboff@apple.com>
2567 Towards 8 Bit Strings: Templatize JSC::LiteralParser class by character type
2568 https://bugs.webkit.org/show_bug.cgi?id=71862
2570 Changed LiteralParser to be templatized of character type.
2572 Moved five enums out of class definition to work around a clang compiler defect.
2574 Added lexIdentifier templated method to break out character specific versions.
2575 Added static setParserTokenString templated method to handle setting approriately
2576 sized string pointer.
2578 To keep code in LiteralParser.cpp and keep LiteralParser.h small, the two
2579 flavors of LiteralParser are explicitly instantiated at the end of
2582 Reviewed by Oliver Hunt.
2584 * API/JSValueRef.cpp:
2585 (JSValueMakeFromJSONString):
2586 * JavaScriptCore.exp:
2587 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2588 * interpreter/Interpreter.cpp:
2589 (JSC::Interpreter::callEval):
2590 (JSC::Interpreter::execute):
2591 * runtime/JSGlobalObjectFunctions.cpp:
2592 (JSC::globalFuncEval):
2593 * runtime/JSONObject.cpp:
2594 (JSC::JSONProtoFuncParse):
2595 * runtime/LiteralParser.cpp:
2596 (JSC::isJSONWhiteSpace):
2597 (JSC::::tryJSONPParse):
2598 (JSC::::makeIdentifier):
2599 (JSC::::Lexer::lex):
2600 (JSC::::Lexer::lexIdentifier):
2601 (JSC::::Lexer::next):
2604 (JSC::isSafeStringCharacter):
2605 (JSC::::Lexer::lexString):
2606 (JSC::::Lexer::lexNumber):
2608 * runtime/LiteralParser.h:
2609 (JSC::LiteralParser::LiteralParser):
2610 (JSC::LiteralParser::getErrorMessage):
2611 (JSC::LiteralParser::tryLiteralParse):
2612 (JSC::LiteralParser::Lexer::Lexer):
2613 (JSC::LiteralParser::Lexer::currentToken):
2614 (JSC::LiteralParser::Lexer::getErrorMessage):
2615 * runtime/UString.h:
2618 * wtf/text/StringBuilder.cpp:
2619 (WTF::StringBuilder::append):
2620 * wtf/text/StringBuilder.h:
2621 (WTF::StringBuilder::append):
2623 2011-11-09 Filip Pizlo <fpizlo@apple.com>
2625 Multiple CodeBlock should be able to share the same instruction
2626 stream without copying
2627 https://bugs.webkit.org/show_bug.cgi?id=71978
2629 Reviewed by Oliver Hunt.
2631 This refactors CodeBlock::m_instructions to be a Vector boxed in a
2632 ref-counted object, but otherwise does not take advantage of this.
2634 This is performance neutral.
2636 * bytecode/CodeBlock.cpp:
2637 (JSC::CodeBlock::printStructure):
2638 (JSC::CodeBlock::printStructures):
2639 (JSC::CodeBlock::dump):
2640 (JSC::CodeBlock::CodeBlock):
2641 (JSC::CodeBlock::visitAggregate):
2642 (JSC::CodeBlock::shrinkToFit):
2643 * bytecode/CodeBlock.h:
2644 (JSC::CodeBlock::hasInstructions):
2645 (JSC::CodeBlock::numberOfInstructions):
2646 (JSC::CodeBlock::instructions):
2650 2011-11-09 Gavin Barraclough <barraclough@apple.com>
2652 Renovate ARMv7 assembler/macro-assembler
2653 https://bugs.webkit.org/show_bug.cgi?id=71982
2655 Reviewed by Geoff Garen.
2658 * add support for strb (byte stores)
2659 * rename the VMOV_CtoS opcodes (there are currently backwards!)
2660 * add support for adc (add with carry)
2661 * add support for vsqrt, vabs
2662 * add support for vmov (between FPRs, and to/from GPR pairs).
2663 * remove '_F64' postfixes from instructions (these aren't helpful, functions can already be distinguished by their signatures).
2664 * 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).
2665 * rename vcvtr_S32_F64 to vcvt_floatingPointToSigned, as for previous, also vcvtr was the incorrect name for the operation (the emitted instruction truncates).
2667 MacroAssemblerARMv7:
2668 * add 3-operand versions of and32, lshift32, or32, rshift32, urshift32, sub32, xor32,
2669 * add store8, and store32 imm to base-index.
2670 * 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).
2671 * Update supportsFloating* flags (all features now supported).
2672 * add moveDouble, storeDouble to absolute address, addDouble to absolute address
2673 * add 3-operand double operations.
2674 * implement sqrtDouble/absDouble
2675 * add branchTruncateDoubleToInt32, implement truncateDoubleToInt32
2676 * move should do nothing if src == dest
2677 * branchTest8-on-memory can be implemented in terms of branchTest32-on-register (branchTest8-on-register has been removed).
2678 * add 3-operand branchAdd32, branchSub32, also branchAdd32 absolute address.
2680 2011-11-09 Gavin Barraclough <barraclough@apple.com>
2682 https://bugs.webkit.org/show_bug.cgi?id=71873
2684 Reviewed by Geoff Garen.
2686 Incrementally re-landing these changes, trying to determine what went wrong.
2687 (The whole patch failed tests on the build bot but worked locally.
2689 * dfg/DFGByteCodeParser.cpp:
2690 (JSC::DFG::ByteCodeParser::handleIntrinsic):
2692 2011-11-09 Filip Pizlo <fpizlo@apple.com>
2694 DFG OSR exit code should be lazily generated
2695 https://bugs.webkit.org/show_bug.cgi?id=71744
2697 Reviewed by Gavin Barraclough.
2699 The OSR exit code is now generated the first time it is executed,
2700 rather than right after speculative compilation. Because most OSR
2701 exits are never taken, this should greatly reduce both code size
2702 and compilation time.
2704 This is a 1% win on SunSpider, and a 1% win on V8 when running in
2705 my harness. No change in V8 in V8's harness (due to the long runs,
2706 so compile time is not an issue) and no change in Kraken (again,
2707 long runs of small code so compile time has no measurable effect).
2709 * CMakeListsEfl.txt:
2710 * GNUmakefile.list.am:
2711 * JavaScriptCore.xcodeproj/project.pbxproj:
2713 * assembler/AbstractMacroAssembler.h:
2714 * assembler/MacroAssemblerX86.h:
2715 (JSC::MacroAssemblerX86::jump):
2716 * assembler/MacroAssemblerX86_64.h:
2717 (JSC::MacroAssemblerX86_64::jump):
2718 * assembler/X86Assembler.h:
2719 (JSC::X86Assembler::jmp_m):
2720 * bytecode/CodeBlock.h:
2721 (JSC::CodeBlock::createDFGDataIfNecessary):
2722 (JSC::CodeBlock::appendDFGOSREntryData):
2723 (JSC::CodeBlock::numberOfDFGOSREntries):
2724 (JSC::CodeBlock::dfgOSREntryData):
2725 (JSC::CodeBlock::dfgOSREntryDataForBytecodeIndex):
2726 (JSC::CodeBlock::appendOSRExit):
2727 (JSC::CodeBlock::appendSpeculationRecovery):
2728 (JSC::CodeBlock::numberOfOSRExits):
2729 (JSC::CodeBlock::numberOfSpeculationRecoveries):
2730 (JSC::CodeBlock::osrExit):
2731 (JSC::CodeBlock::speculationRecovery):
2732 * dfg/DFGAssemblyHelpers.h:
2733 (JSC::DFG::AssemblyHelpers::debugCall):
2734 * dfg/DFGCorrectableJumpPoint.cpp: Added.
2735 (JSC::DFG::CorrectableJumpPoint::codeLocationForRepatch):
2736 * dfg/DFGCorrectableJumpPoint.h: Added.
2737 (JSC::DFG::CorrectableJumpPoint::CorrectableJumpPoint):
2738 (JSC::DFG::CorrectableJumpPoint::switchToLateJump):
2739 (JSC::DFG::CorrectableJumpPoint::correctInitialJump):
2740 (JSC::DFG::CorrectableJumpPoint::correctLateJump):
2741 (JSC::DFG::CorrectableJumpPoint::initialJump):
2742 (JSC::DFG::CorrectableJumpPoint::lateJump):
2743 (JSC::DFG::CorrectableJumpPoint::correctJump):
2744 (JSC::DFG::CorrectableJumpPoint::getJump):
2745 * dfg/DFGJITCompiler.cpp:
2746 (JSC::DFG::JITCompiler::linkOSRExits):
2747 (JSC::DFG::JITCompiler::compileBody):
2748 (JSC::DFG::JITCompiler::link):
2749 * dfg/DFGJITCompiler.h:
2750 * dfg/DFGOSRExit.cpp: Added.
2751 (JSC::DFG::OSRExit::OSRExit):
2752 (JSC::DFG::OSRExit::dump):
2754 * dfg/DFGOSRExitCompiler.cpp: Added.
2755 * dfg/DFGOSRExitCompiler.h:
2756 * dfg/DFGOSRExitCompiler32_64.cpp:
2757 (JSC::DFG::OSRExitCompiler::compileExit):
2758 * dfg/DFGOSRExitCompiler64.cpp:
2759 (JSC::DFG::OSRExitCompiler::compileExit):
2760 * dfg/DFGOperations.cpp:
2761 * dfg/DFGSpeculativeJIT.cpp:
2762 * dfg/DFGSpeculativeJIT.h:
2763 (JSC::DFG::SpeculativeJIT::speculationCheck):
2764 * dfg/DFGThunks.cpp: Added.
2765 (JSC::DFG::osrExitGenerationThunkGenerator):
2766 * dfg/DFGThunks.h: Added.
2768 (JSC::JITCode::dataAddressAtOffset):
2769 * runtime/JSGlobalData.h:
2771 2011-11-09 Mark Hahnenberg <mhahnenberg@apple.com>
2773 Fixing build breakage
2775 Unreviewed build fix
2777 * JavaScriptCore.exp:
2778 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2780 2011-11-09 Mark Hahnenberg <mhahnenberg@apple.com>
2782 De-virtualize JSVariableObject::isDynamicScope
2783 https://bugs.webkit.org/show_bug.cgi?id=71933
2785 Reviewed by Geoffrey Garen.
2787 * runtime/JSActivation.cpp:
2788 * runtime/JSActivation.h: Inlined and de-virtualized isDynamicScope
2789 (JSC::JSActivation::isDynamicScope):
2790 * runtime/JSGlobalObject.cpp:
2791 * runtime/JSGlobalObject.h: Inlined and de-virtualized isDynamicScope
2792 (JSC::JSGlobalObject::isDynamicScope):
2793 * runtime/JSStaticScopeObject.cpp:
2794 * runtime/JSStaticScopeObject.h: Inlined and de-virtualized isDynamicScope
2795 (JSC::JSStaticScopeObject::createStructure): Changed createStructure to use new JSType
2796 (JSC::JSStaticScopeObject::isDynamicScope):
2797 * runtime/JSType.h: Added new type for JSStaticScopeObject
2798 * runtime/JSVariableObject.cpp: De-virtualized and added an implementation that checks the
2799 object's type and calls the corresponding implementation.
2800 (JSC::JSVariableObject::isDynamicScope):
2801 * runtime/JSVariableObject.h:
2803 2011-11-09 Mark Hahnenberg <mhahnenberg@apple.com>
2805 De-virtualize JSGlobalObject::hasOwnPropertyForWrite
2806 https://bugs.webkit.org/show_bug.cgi?id=71934
2808 Reviewed by Geoffrey Garen.
2810 * runtime/JSGlobalObject.h: Removed the virtual-ness of hasOwnPropertyForWrite since nobody overrides it.
2812 2011-11-09 Gavin Barraclough <barraclough@apple.com>
2814 https://bugs.webkit.org/show_bug.cgi?id=71873
2816 Reviewed by Geoff Garen.
2818 Incrementally re-landing these changes, trying to determine what went wrong.
2819 (The whole patch failed tests on the build bot but worked locally.
2821 * assembler/MacroAssemblerARM.h:
2822 (JSC::MacroAssemblerARM::absDouble):
2823 * assembler/MacroAssemblerARMv7.h:
2824 * assembler/MacroAssemblerMIPS.h:
2825 (JSC::MacroAssemblerMIPS::absDouble):
2826 * assembler/MacroAssemblerSH4.h:
2827 (JSC::MacroAssemblerSH4::absDouble):
2828 * assembler/MacroAssemblerX86.h:
2829 (JSC::MacroAssemblerX86::absDouble):
2830 * assembler/MacroAssemblerX86Common.h:
2831 * assembler/MacroAssemblerX86_64.h:
2832 (JSC::MacroAssemblerX86_64::absDouble):
2833 * dfg/DFGSpeculativeJIT32_64.cpp:
2834 (JSC::DFG::SpeculativeJIT::compile):
2835 * dfg/DFGSpeculativeJIT64.cpp:
2836 (JSC::DFG::SpeculativeJIT::compile):
2837 * jit/ThunkGenerators.cpp:
2838 (JSC::absThunkGenerator):
2840 2011-11-09 Mark Hahnenberg <mhahnenberg@apple.com>
2842 De-virtualize JSObject::getOwnPropertyDescriptor
2843 https://bugs.webkit.org/show_bug.cgi?id=71523
2845 Reviewed by Sam Weinig.
2847 Added getOwnPropertyDescriptor to the MethodTable, changed all of the
2848 virtual versions of getOwnPropertyDescriptor to static ones, and
2849 changed all of the call sites to the corresponding lookup in the MethodTable.
2851 * API/JSCallbackObject.h:
2852 * API/JSCallbackObjectFunctions.h:
2853 (JSC::::getOwnPropertyDescriptor):
2854 * JavaScriptCore.exp:
2855 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2856 * debugger/DebuggerActivation.cpp:
2857 (JSC::DebuggerActivation::getOwnPropertyDescriptor):
2858 * debugger/DebuggerActivation.h:
2859 * runtime/Arguments.cpp:
2860 (JSC::Arguments::getOwnPropertyDescriptor):
2861 * runtime/Arguments.h:
2862 * runtime/ArrayConstructor.cpp:
2863 (JSC::ArrayConstructor::getOwnPropertyDescriptor):
2864 * runtime/ArrayConstructor.h:
2865 * runtime/ArrayPrototype.cpp:
2866 (JSC::ArrayPrototype::getOwnPropertyDescriptor):
2867 * runtime/ArrayPrototype.h:
2868 * runtime/BooleanPrototype.cpp:
2869 (JSC::BooleanPrototype::getOwnPropertyDescriptor):
2870 * runtime/BooleanPrototype.h:
2871 * runtime/ClassInfo.h:
2872 * runtime/DateConstructor.cpp:
2873 (JSC::DateConstructor::getOwnPropertyDescriptor):
2874 * runtime/DateConstructor.h:
2875 * runtime/DatePrototype.cpp:
2876 (JSC::DatePrototype::getOwnPropertyDescriptor):
2877 * runtime/DatePrototype.h:
2878 * runtime/ErrorPrototype.cpp:
2879 (JSC::ErrorPrototype::getOwnPropertyDescriptor):
2880 * runtime/ErrorPrototype.h:
2881 * runtime/JSArray.cpp:
2882 (JSC::JSArray::getOwnPropertyDescriptor):
2883 * runtime/JSArray.h:
2884 * runtime/JSByteArray.cpp:
2885 (JSC::JSByteArray::getOwnPropertyDescriptor):
2886 * runtime/JSByteArray.h:
2887 * runtime/JSCell.cpp:
2888 (JSC::JSCell::getOwnPropertyDescriptor):
2890 * runtime/JSFunction.cpp:
2891 (JSC::JSFunction::getOwnPropertyDescriptor):
2892 * runtime/JSFunction.h:
2893 * runtime/JSGlobalObject.cpp:
2894 (JSC::JSGlobalObject::getOwnPropertyDescriptor):
2895 * runtime/JSGlobalObject.h:
2896 * runtime/JSNotAnObject.cpp:
2897 (JSC::JSNotAnObject::getOwnPropertyDescriptor):
2898 * runtime/JSNotAnObject.h:
2899 * runtime/JSONObject.cpp:
2900 (JSC::JSONObject::getOwnPropertyDescriptor):
2901 * runtime/JSONObject.h:
2902 * runtime/JSObject.cpp:
2903 (JSC::JSObject::vtableAnchor):
2904 (JSC::JSObject::propertyIsEnumerable):
2905 (JSC::JSObject::getOwnPropertyDescriptor):
2906 (JSC::JSObject::getPropertyDescriptor):
2907 (JSC::JSObject::defineOwnProperty):
2908 * runtime/JSObject.h:
2909 * runtime/JSString.cpp: Removed getOwnPropertyDescriptor, since this seems to be a relic from a
2910 bygone era when getOwnPropertyDescriptor was rooted in JSCell rather than JSObject. There were
2911 no call sites for this version of getOwnPropertyDescriptor in the entire project.
2912 * runtime/JSString.h:
2914 (JSC::getStaticPropertyDescriptor):
2915 (JSC::getStaticFunctionDescriptor):
2916 (JSC::getStaticValueDescriptor):
2917 * runtime/MathObject.cpp:
2918 (JSC::MathObject::getOwnPropertyDescriptor):
2919 * runtime/MathObject.h:
2920 * runtime/NumberConstructor.cpp:
2921 (JSC::NumberConstructor::getOwnPropertyDescriptor):
2922 * runtime/NumberConstructor.h:
2923 * runtime/NumberPrototype.cpp:
2924 (JSC::NumberPrototype::getOwnPropertyDescriptor):
2925 * runtime/NumberPrototype.h:
2926 * runtime/ObjectConstructor.cpp:
2927 (JSC::ObjectConstructor::getOwnPropertyDescriptor):
2928 (JSC::objectConstructorGetOwnPropertyDescriptor):
2929 * runtime/ObjectConstructor.h:
2930 * runtime/ObjectPrototype.cpp:
2931 (JSC::ObjectPrototype::getOwnPropertyDescriptor):
2932 * runtime/ObjectPrototype.h:
2933 * runtime/RegExpConstructor.cpp:
2934 (JSC::RegExpConstructor::getOwnPropertyDescriptor):
2935 * runtime/RegExpConstructor.h:
2936 * runtime/RegExpMatchesArray.h:
2937 (JSC::RegExpMatchesArray::getOwnPropertyDescriptor):
2938 * runtime/RegExpObject.cpp:
2939 (JSC::RegExpObject::getOwnPropertyDescriptor):
2940 * runtime/RegExpObject.h:
2941 * runtime/RegExpPrototype.cpp:
2942 (JSC::RegExpPrototype::getOwnPropertyDescriptor):
2943 * runtime/RegExpPrototype.h:
2944 * runtime/StringConstructor.cpp:
2945 (JSC::StringConstructor::getOwnPropertyDescriptor):
2946 * runtime/StringConstructor.h:
2947 * runtime/StringObject.cpp:
2948 (JSC::StringObject::vtableAnchor): Added to prevent a weak vtable.
2949 (JSC::StringObject::getOwnPropertyDescriptor):
2950 * runtime/StringObject.h:
2951 * runtime/StringPrototype.cpp:
2952 (JSC::StringPrototype::getOwnPropertyDescriptor):
2953 * runtime/StringPrototype.h:
2955 2011-11-09 Gavin Barraclough <barraclough@apple.com>
2957 https://bugs.webkit.org/show_bug.cgi?id=71873
2959 Reviewed by Geoff Garen.
2961 Incrementally re-landing these changes, trying to determine what went wrong.
2962 (The whole patch failed tests on the build bot but worked locally.
2964 * assembler/MacroAssemblerARM.h:
2965 (JSC::MacroAssemblerARM::supportsFloatingPoint):
2966 (JSC::MacroAssemblerARM::supportsFloatingPointTruncate):
2967 (JSC::MacroAssemblerARM::supportsFloatingPointSqrt):
2968 (JSC::MacroAssemblerARM::supportsFloatingPointAbs):
2969 * assembler/MacroAssemblerARMv7.h:
2970 (JSC::MacroAssemblerARMv7::supportsFloatingPoint):
2971 (JSC::MacroAssemblerARMv7::supportsFloatingPointTruncate):
2972 (JSC::MacroAssemblerARMv7::supportsFloatingPointSqrt):
2973 (JSC::MacroAssemblerARMv7::supportsFloatingPointAbs):
2974 * assembler/MacroAssemblerMIPS.h:
2975 (JSC::MacroAssemblerMIPS::supportsFloatingPoint):
2976 (JSC::MacroAssemblerMIPS::supportsFloatingPointTruncate):
2977 (JSC::MacroAssemblerMIPS::supportsFloatingPointSqrt):
2978 (JSC::MacroAssemblerMIPS::supportsFloatingPointAbs):
2979 * assembler/MacroAssemblerSH4.h:
2980 (JSC::MacroAssemblerSH4::supportsFloatingPoint):
2981 (JSC::MacroAssemblerSH4::supportsFloatingPointTruncate):
2982 (JSC::MacroAssemblerSH4::supportsFloatingPointSqrt):
2983 (JSC::MacroAssemblerSH4::supportsFloatingPointAbs):
2984 * assembler/MacroAssemblerX86.h:
2985 (JSC::MacroAssemblerX86::supportsFloatingPoint):
2986 (JSC::MacroAssemblerX86::supportsFloatingPointTruncate):
2987 (JSC::MacroAssemblerX86::supportsFloatingPointSqrt):
2988 (JSC::MacroAssemblerX86::supportsFloatingPointAbs):
2989 * assembler/MacroAssemblerX86_64.h:
2990 (JSC::MacroAssemblerX86_64::supportsFloatingPoint):
2991 (JSC::MacroAssemblerX86_64::supportsFloatingPointTruncate):
2992 (JSC::MacroAssemblerX86_64::supportsFloatingPointSqrt):
2993 (JSC::MacroAssemblerX86_64::supportsFloatingPointAbs):
2994 * jit/ThunkGenerators.cpp:
2995 (JSC::absThunkGenerator):
2997 2011-11-08 Darin Adler <darin@apple.com>
2999 Add code path in HashTable for emptyValueIsZero that does not require copying the empty value
3000 https://bugs.webkit.org/show_bug.cgi?id=71875
3002 Reviewed by Anders Carlsson.
3004 This is a step along the path of making OwnPtr work as HashMap value types.
3006 * wtf/Alignment.h: Moved the AlignedBufferChar and AlignedBuffer types from Vector.h here.
3007 Also fixed include style. To include other WTF headers inside WTF, we use "" includes.
3008 I did not change the code to fix style checker complaints.
3010 * wtf/HashTable.h: Added includes as needed and fixed include style.
3011 (WTF::doubleHash): Removed the uneeeded and inappropriate "static" in this function, which
3012 gave it internal linkage for no good reason.
3013 (WTF::HashTable::checkKey): Made this use AlignedBuffer for the deleted value check to avoid
3014 construction/destruction problems instead of doing the trick where we construct and destroy
3015 an empty value twice. It's cleaner and simpler and avoids copying the empty value.
3016 (WTF::HashTable::initializeBucket): Specialized initializeBucket to use memset when the
3017 empty value is zero rather than copying an empty value.
3019 * wtf/Vector.h: Moved the AlignedBufferChar and AlignedBuffer types into Alignment.h.
3021 2011-11-09 Gabor Rapcsanyi <rgabor@webkit.org>
3023 Buildfix for 32bit debug mode.
3025 Reviewed by Csaba Osztrogonác.
3027 * dfg/DFGAbstractState.cpp:
3028 (JSC::DFG::AbstractState::dump):
3030 (JSC::DFG::Graph::dump):
3032 2011-11-09 Andy Wingo <wingo@igalia.com>
3034 Enable the DFG JIT on X86-64 Linux platforms
3035 https://bugs.webkit.org/show_bug.cgi?id=71373
3037 Reviewed by Csaba Osztrogonác.
3039 * wtf/Platform.h (ENABLE_DFG_JIT): Enable the DFG JIT on the
3040 x86-64 GNU/Linux platform.
3041 * CMakeListsEfl.txt: Add JSValue64 implementations to EFL build.
3043 2011-11-09 Csaba Osztrogonác <ossy@webkit.org>
3045 Enable the DFG JIT on x86-64 Linux platforms
3046 https://bugs.webkit.org/show_bug.cgi?id=71373
3048 Enable DFG JIT by default on X86 Linux and Mac platforms
3049 https://bugs.webkit.org/show_bug.cgi?id=71686
3051 Buildfix for stricter compilers: -Werror=unused-but-set-variable
3053 Reviewed by Zoltan Herczeg.
3055 * dfg/DFGSpeculativeJIT.cpp:
3056 (JSC::DFG::SpeculativeJIT::compilePutByValForByteArray):
3057 * dfg/DFGSpeculativeJIT32_64.cpp:
3058 (JSC::DFG::SpeculativeJIT::compile):
3059 * dfg/DFGSpeculativeJIT64.cpp:
3060 (JSC::DFG::SpeculativeJIT::compile):
3062 2011-11-09 Sheriff Bot <webkit.review.bot@gmail.com>
3064 Unreviewed, rolling out r99678.
3065 http://trac.webkit.org/changeset/99678
3066 https://bugs.webkit.org/show_bug.cgi?id=71882
3068 broke the build with -Werror=unused-but-set-variable
3069 (Requested by tronical_ on #webkit).
3071 * CMakeListsEfl.txt:
3074 2011-11-09 Andy Wingo <wingo@igalia.com>
3076 Enable the DFG JIT on X86-64 Linux platforms
3077 https://bugs.webkit.org/show_bug.cgi?id=71373
3079 Reviewed by Filip Pizlo.
3081 * wtf/Platform.h (ENABLE_DFG_JIT): Enable the DFG JIT on the
3082 x86-64 GNU/Linux platform.
3083 * CMakeListsEfl.txt: Add JSValue64 implementations to EFL build.
3085 2011-11-09 Mark Hahnenberg <mhahnenberg@apple.com>
3087 De-virtualize JSObject::defineOwnProperty
3088 https://bugs.webkit.org/show_bug.cgi?id=71429
3090 Reviewed by Geoffrey Garen.
3092 Added defineOwnProperty to the MethodTable, changed all the virtual
3093 implementations of defineOwnProperty to static ones, and replaced
3094 all call sites with corresponding lookups in the MethodTable.
3096 * JavaScriptCore.exp:
3097 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3098 * runtime/Arguments.cpp:
3099 (JSC::Arguments::createStrictModeCallerIfNecessary):
3100 (JSC::Arguments::createStrictModeCalleeIfNecessary):
3101 * runtime/ClassInfo.h:
3102 * runtime/JSCell.cpp:
3103 (JSC::JSCell::defineOwnProperty):
3105 * runtime/JSObject.cpp:
3106 (JSC::JSObject::defineOwnProperty):
3107 * runtime/JSObject.h:
3108 * runtime/ObjectConstructor.cpp:
3109 (JSC::objectConstructorDefineProperty):
3110 (JSC::defineProperties):
3112 2011-11-09 Simon Hausmann <simon.hausmann@nokia.com>
3114 [Qt] Build system cleanup
3115 https://bugs.webkit.org/show_bug.cgi?id=71815
3117 Reviewed by Kenneth Rohde Christiansen.
3119 * wtf/wtf.pri: Moved the glib dependency to javascriptcore.prf.
3121 2011-11-08 Simon Hausmann <simon.hausmann@nokia.com>
3123 [Qt] Replace use of QApplication with QGuiApplication
3124 https://bugs.webkit.org/show_bug.cgi?id=71794
3126 Reviewed by Andreas Kling.
3128 Add compat headers for use when building with Qt 4: QGuiApplication
3129 is typedef'ed to QApplication.
3131 * wtf/qt/compat/QGuiApplication: Added.
3132 * wtf/qt/compat/qguiapplication.h: Added.
3134 2011-11-08 Sheriff Bot <webkit.review.bot@gmail.com>
3136 Unreviewed, rolling out r99647.
3137 http://trac.webkit.org/changeset/99647
3138 https://bugs.webkit.org/show_bug.cgi?id=71876
3140 It broke jsc and layout tests on all bot (Requested by
3141 Ossy_night on #webkit).
3143 * assembler/MacroAssemblerARM.h:
3144 (JSC::MacroAssemblerARM::supportsFloatingPoint):
3145 (JSC::MacroAssemblerARM::supportsFloatingPointTruncate):
3146 (JSC::MacroAssemblerARM::supportsFloatingPointSqrt):
3147 (JSC::MacroAssemblerARM::supportsDoubleBitops):
3148 (JSC::MacroAssemblerARM::andnotDouble):
3149 * assembler/MacroAssemblerARMv7.h:
3150 (JSC::MacroAssemblerARMv7::supportsFloatingPoint):
3151 (JSC::MacroAssemblerARMv7::supportsFloatingPointTruncate):
3152 (JSC::MacroAssemblerARMv7::supportsFloatingPointSqrt):
3153 (JSC::MacroAssemblerARMv7::supportsDoubleBitops):
3154 * assembler/MacroAssemblerMIPS.h:
3155 (JSC::MacroAssemblerMIPS::andnotDouble):
3156 (JSC::MacroAssemblerMIPS::supportsFloatingPoint):
3157 (JSC::MacroAssemblerMIPS::supportsFloatingPointTruncate):
3158 (JSC::MacroAssemblerMIPS::supportsFloatingPointSqrt):
3159 (JSC::MacroAssemblerMIPS::supportsDoubleBitops):
3160 * assembler/MacroAssemblerSH4.h:
3161 (JSC::MacroAssemblerSH4::supportsFloatingPoint):
3162 (JSC::MacroAssemblerSH4::supportsFloatingPointTruncate):
3163 (JSC::MacroAssemblerSH4::supportsFloatingPointSqrt):
3164 (JSC::MacroAssemblerSH4::supportsDoubleBitops):
3165 (JSC::MacroAssemblerSH4::andnotDouble):
3166 * assembler/MacroAssemblerX86.h:
3167 (JSC::MacroAssemblerX86::MacroAssemblerX86):
3168 (JSC::MacroAssemblerX86::supportsFloatingPoint):
3169 (JSC::MacroAssemblerX86::supportsFloatingPointTruncate):
3170 (JSC::MacroAssemblerX86::supportsFloatingPointSqrt):
3171 (JSC::MacroAssemblerX86::supportsDoubleBitops):
3172 * assembler/MacroAssemblerX86Common.h:
3173 (JSC::MacroAssemblerX86Common::andnotDouble):
3174 * assembler/MacroAssemblerX86_64.h:
3175 (JSC::MacroAssemblerX86_64::supportsFloatingPoint):
3176 (JSC::MacroAssemblerX86_64::supportsFloatingPointTruncate):
3177 (JSC::MacroAssemblerX86_64::supportsFloatingPointSqrt):
3178 (JSC::MacroAssemblerX86_64::supportsDoubleBitops):
3179 * assembler/X86Assembler.h:
3180 * dfg/DFGByteCodeParser.cpp:
3181 (JSC::DFG::ByteCodeParser::handleIntrinsic):
3182 * dfg/DFGSpeculativeJIT32_64.cpp:
3183 (JSC::DFG::SpeculativeJIT::compile):
3184 * dfg/DFGSpeculativeJIT64.cpp:
3185 (JSC::DFG::SpeculativeJIT::compile):
3186 * jit/ThunkGenerators.cpp:
3187 (JSC::absThunkGenerator):
3188 * runtime/JSGlobalData.cpp:
3190 2011-11-08 Gavin Barraclough <barraclough@apple.com>
3192 Better abstract 'abs' operation through the MacroAssembler.
3193 https://bugs.webkit.org/show_bug.cgi?id=71873
3195 Reviewed by Geoff Garen.
3197 Currently the x86 specific instruction sequence to perform a double abs
3198 is duplicated throughout the JITs / thunk generators.
3200 * assembler/MacroAssemblerARM.h:
3201 (JSC::MacroAssemblerARM::supportsFloatingPoint):
3202 (JSC::MacroAssemblerARM::supportsFloatingPointTruncate):
3203 (JSC::MacroAssemblerARM::supportsFloatingPointSqrt):
3204 (JSC::MacroAssemblerARM::supportsFloatingPointAbs):
3205 (JSC::MacroAssemblerARM::absDouble):
3206 - Renamed supportsFloatingPointAbs, make these methods static so that
3207 we can check the JIT's capabilites before we begin compilation.
3208 * assembler/MacroAssemblerARMv7.h:
3209 (JSC::MacroAssemblerARMv7::supportsFloatingPoint):
3210 (JSC::MacroAssemblerARMv7::supportsFloatingPointTruncate):
3211 (JSC::MacroAssemblerARMv7::supportsFloatingPointSqrt):
3212 (JSC::MacroAssemblerARMv7::supportsFloatingPointAbs):
3213 - Renamed supportsFloatingPointAbs, make these methods static so that
3214 we can check the JIT's capabilites before we begin compilation.
3215 * assembler/MacroAssemblerMIPS.h:
3216 (JSC::MacroAssemblerMIPS::absDouble):
3217 (JSC::MacroAssemblerMIPS::supportsFloatingPoint):
3218 (JSC::MacroAssemblerMIPS::supportsFloatingPointTruncate):
3219 (JSC::MacroAssemblerMIPS::supportsFloatingPointSqrt):
3220 (JSC::MacroAssemblerMIPS::supportsFloatingPointAbs):
3221 - Renamed supportsFloatingPointAbs, make these methods static so that
3222 we can check the JIT's capabilites before we begin compilation.
3223 * assembler/MacroAssemblerSH4.h:
3224 (JSC::MacroAssemblerSH4::supportsFloatingPoint):
3225 (JSC::MacroAssemblerSH4::supportsFloatingPointTruncate):
3226 (JSC::MacroAssemblerSH4::supportsFloatingPointSqrt):
3227 (JSC::MacroAssemblerSH4::supportsFloatingPointAbs):
3228 (JSC::MacroAssemblerSH4::absDouble):
3229 - Renamed supportsFloatingPointAbs, make these methods static so that
3230 we can check the JIT's capabilites before we begin compilation.
3231 * assembler/MacroAssemblerX86.h:
3232 (JSC::MacroAssemblerX86::absDouble):
3233 (JSC::MacroAssemblerX86::supportsFloatingPoint):
3234 (JSC::MacroAssemblerX86::supportsFloatingPointTruncate):
3235 (JSC::MacroAssemblerX86::supportsFloatingPointSqrt):
3236 (JSC::MacroAssemblerX86::supportsFloatingPointAbs):
3237 - Made supports* methods static so that we can check the JIT's
3238 capabilites before we begin compilation. Added absDouble.
3239 * assembler/MacroAssemblerX86Common.h:
3240 - Removed andnotDouble, added s_maskSignBit.
3241 * assembler/MacroAssemblerX86_64.h:
3242 (JSC::MacroAssemblerX86_64::absDouble):
3243 (JSC::MacroAssemblerX86_64::supportsFloatingPoint):
3244 (JSC::MacroAssemblerX86_64::supportsFloatingPointTruncate):
3245 (JSC::MacroAssemblerX86_64::supportsFloatingPointSqrt):
3246 (JSC::MacroAssemblerX86_64::supportsFloatingPointAbs):
3247 - Made supports* methods static so that we can check the JIT's
3248 capabilites before we begin compilation. Added absDouble.
3249 * assembler/X86Assembler.h:
3250 (JSC::X86Assembler::andpd_rr):
3251 (JSC::X86Assembler::andpd_mr):
3252 - Added support for andpd instruction.
3253 * dfg/DFGByteCodeParser.cpp:
3254 (JSC::DFG::ByteCodeParser::handleIntrinsic):
3255 - Added checks for supportsFloatingPointAbs, supportsFloatingPointSqrt.
3256 * dfg/DFGSpeculativeJIT32_64.cpp:
3257 (JSC::DFG::SpeculativeJIT::compile):
3258 - Switched to use doubleAbs, we can now also reuse the operand register for the result.
3259 * dfg/DFGSpeculativeJIT64.cpp:
3260 (JSC::DFG::SpeculativeJIT::compile):
3261 - Switched to use doubleAbs, we can now also reuse the operand register for the result.
3262 * jit/ThunkGenerators.cpp:
3263 - Switched to use doubleAbs.
3264 (JSC::absThunkGenerator):
3265 * runtime/JSGlobalData.cpp:
3266 - Declared MacroAssemblerX86Common::s_maskSignBit here.
3267 This is a little ugly, but it doesn't seem worth adding a whole extra .cpp
3268 to the compile for just one constant.
3270 2011-11-08 Gavin Barraclough <barraclough@apple.com>
3272 Move duplicates of SYMBOL_STRING* macros to the single location
3273 https://bugs.webkit.org/show_bug.cgi?id=71456
3275 Reviewed by Sam Weinig.
3277 * JavaScriptCore.xcodeproj/project.pbxproj:
3278 * dfg/DFGOperations.cpp:
3280 * wtf/InlineASM.h: Added.
3281 - Moved asm related macros.
3283 2011-11-08 Gavin Barraclough <barraclough@apple.com>
3285 Move code to handle 8bit regs from X86Assembler to MacroAssembler
3286 https://bugs.webkit.org/show_bug.cgi?id=71867
3288 Reviewed by Oliver Hunt.
3290 This code is fine, but is in the wrong place really. X86 assembler should
3291 basically just format up exactly the instruction you request - not expand
3292 out to a set of instructions (that is what the macro assembler layer is
3293 for!). For other 8-bit ops, on X86 we don't guard against clients accessing
3296 * assembler/MacroAssemblerX86Common.h:
3297 (JSC::MacroAssemblerX86Common::store8):
3298 * assembler/X86Assembler.h:
3299 (JSC::X86Assembler::movb_rm):
3302 2011-11-08 Filip Pizlo <fpizlo@apple.com>
3304 Unreviewed build fix for GTK.
3306 * GNUmakefile.list.am:
3308 2011-11-08 Gavin Barraclough <barraclough@apple.com>
3312 * assembler/X86Assembler.h:
3314 2011-11-08 Gavin Barraclough <barraclough@apple.com>
3316 Errrk, failed to commit this in last change.
3318 * assembler/X86Assembler.h:
3320 2011-11-08 Gavin Barraclough <barraclough@apple.com>
3322 Remove an unused method.
3324 Rubber stamped by Geoff Garen.
3326 * assembler/AbstractMacroAssembler.h:
3327 * assembler/AssemblerBuffer.h:
3328 - removed rewindToLabel.
3330 2011-11-08 Gavin Barraclough <barraclough@apple.com>
3332 Fix OSR entry points to calculate offsets correctly WRT to branch compaction.
3333 https://bugs.webkit.org/show_bug.cgi?id=71864
3335 Reviewed by Filip Pizlo.
3337 * assembler/LinkBuffer.h:
3338 (JSC::LinkBuffer::offsetOf):
3339 - We use this to return the offsets into the code of the entry points.
3340 * dfg/DFGJITCompiler.cpp:
3341 (JSC::DFG::JITCompiler::compileEntry):
3342 (JSC::DFG::JITCompiler::compileBody):
3343 (JSC::DFG::JITCompiler::compile):
3344 (JSC::DFG::JITCompiler::compileFunction):
3345 - Move the construction of the speculative JIT outside of
3346 compileBody, such that it is still available to link the
3347 OSR entry points at the point we are linking.
3348 * dfg/DFGJITCompiler.h:
3349 (JSC::DFG::JITCompiler::noticeOSREntry):
3350 - Pass the label of the block & linkbuffer into noticeOSREntry.
3351 * dfg/DFGSpeculativeJIT.cpp:
3352 (JSC::DFG::SpeculativeJIT::compile):
3353 (JSC::DFG::SpeculativeJIT::linkOSREntries):
3354 - Moved call to noticeOSREntry until we we linking.
3355 * dfg/DFGSpeculativeJIT.h:
3357 (JSC::JIT::privateCompileMainPass):
3358 (JSC::JIT::privateCompileSlowCases):
3359 (JSC::JIT::privateCompile):
3360 - Moved calculation of entries until we we linking.
3362 - Removed some members.
3364 2011-11-08 Filip Pizlo <fpizlo@apple.com>
3366 DFG OSR exit code should be generated by a separate compiler, not
3367 related to DFG::JITCompiler
3368 https://bugs.webkit.org/show_bug.cgi?id=71787
3370 Reviewed by Gavin Barraclough.
3372 Moves the exitSpeculativeWithOSR() method from JITCompiler to
3373 OSRExitCompiler::compileExit().
3375 * CMakeListsEfl.txt:
3376 * JavaScriptCore.xcodeproj/project.pbxproj:
3378 * dfg/DFGJITCompiler.cpp:
3379 (JSC::DFG::JITCompiler::linkOSRExits):
3380 * dfg/DFGJITCompiler32_64.cpp: Removed.
3381 * dfg/DFGOSRExitCompiler.h: Added.
3382 (JSC::DFG::OSRExitCompiler::OSRExitCompiler):
3383 * dfg/DFGOSRExitCompiler32_64.cpp: Added.
3384 (JSC::DFG::OSRExitCompiler::compileExit):
3385 * dfg/DFGOSRExitCompiler64.cpp: Added.
3386 (JSC::DFG::OSRExitCompiler::compileExit):
3387 * runtime/JSValue.h:
3389 2011-11-08 Filip Pizlo <fpizlo@apple.com>
3391 Basic DFG definitions should be moved out of DFGNode.h
3392 https://bugs.webkit.org/show_bug.cgi?id=71861
3394 Rubber-stamped by Gavin Barraclough.
3396 * JavaScriptCore.xcodeproj/project.pbxproj:
3397 * dfg/DFGCommon.h: Added.
3398 (JSC::DFG::NodeIndexTraits::defaultValue):
3401 * dfg/DFGRegisterBank.h:
3403 2011-11-08 Michael Saboff <msaboff@apple.com>
3405 Towards 8 Bit Strings: Templatize JSC::Parser class by Lexer type
3406 https://bugs.webkit.org/show_bug.cgi?id=71761
3408 Templatized Parser based on Lexer<T>. Moved two enums,
3409 SourceElementsMode and FunctionRequirements out of Parser definition
3410 to work around a clang compiler defect.
3412 Cleaned up SourceCode data() to return StringImpl* and eliminated
3413 the recently added stringData() virtual method.
3415 To keep code in Parser.cpp and keep Parser.h small, the two flavors
3416 of Parser are explicitly instantiated at the end of Parser.cpp.
3418 Reviewed by Gavin Barraclough.
3420 * interpreter/Interpreter.cpp:
3421 (JSC::appendSourceToError):
3424 (JSC::::sourceCode):
3425 * parser/Parser.cpp:
3428 (JSC::::parseInner):
3429 (JSC::::didFinishParsing):
3430 (JSC::::allowAutomaticSemicolon):
3431 (JSC::::parseSourceElements):
3432 (JSC::::parseVarDeclaration):
3433 (JSC::::parseConstDeclaration):
3434 (JSC::::parseDoWhileStatement):
3435 (JSC::::parseWhileStatement):
3436 (JSC::::parseVarDeclarationList):
3437 (JSC::::parseConstDeclarationList):
3438 (JSC::::parseForStatement):
3439 (JSC::::parseBreakStatement):
3440 (JSC::::parseContinueStatement):
3441 (JSC::::parseReturnStatement):
3442 (JSC::::parseThrowStatement):
3443 (JSC::::parseWithStatement):
3444 (JSC::::parseSwitchStatement):
3445 (JSC::::parseSwitchClauses):
3446 (JSC::::parseSwitchDefaultClause):
3447 (JSC::::parseTryStatement):
3448 (JSC::::parseDebuggerStatement):
3449 (JSC::::parseBlockStatement):
3450 (JSC::::parseStatement):
3451 (JSC::::parseFormalParameters):
3452 (JSC::::parseFunctionBody):
3453 (JSC::::parseFunctionInfo):
3454 (JSC::::parseFunctionDeclaration):
3455 (JSC::::parseExpressionOrLabelStatement):
3456 (JSC::::parseExpressionStatement):
3457 (JSC::::parseIfStatement):
3458 (JSC::::parseExpression):
3459 (JSC::::parseAssignmentExpression):
3460 (JSC::::parseConditionalExpression):
3461 (JSC::::isBinaryOperator):
3462 (JSC::::parseBinaryExpression):
3463 (JSC::::parseProperty):
3464 (JSC::::parseObjectLiteral):
3465 (JSC::::parseStrictObjectLiteral):
3466 (JSC::::parseArrayLiteral):
3467 (JSC::::parsePrimaryExpression):
3468 (JSC::::parseArguments):
3469 (JSC::::parseMemberExpression):
3470 (JSC::::parseUnaryExpression):
3474 * parser/SourceCode.h:
3475 (JSC::SourceCode::data):
3476 (JSC::SourceCode::subExpression):
3477 * parser/SourceProvider.h:
3478 (JSC::UStringSourceProvider::data):
3480 2011-11-08 Gavin Barraclough <barraclough@apple.com>
3482 Fix PropertyAccessRecords in DFG JIT to take account of branch compaction.
3483 https://bugs.webkit.org/show_bug.cgi?id=71855
3485 Reviewed by Filip Pizlo.
3487 The DFG JIT presently calculates a set of offsets early, before branches have been compacted.
3488 This won't work on ARMv7.
3490 * assembler/AbstractMacroAssembler.h:
3491 (JSC::AbstractMacroAssembler::differenceBetweenCodePtr):
3492 * assembler/LinkBuffer.h:
3493 (JSC::LinkBuffer::locationOf):
3494 * dfg/DFGJITCodeGenerator32_64.cpp:
3495 (JSC::DFG::JITCodeGenerator::cachedGetById):
3496 (JSC::DFG::JITCodeGenerator::cachedPutById):
3497 * dfg/DFGJITCodeGenerator64.cpp:
3498 (JSC::DFG::JITCodeGenerator::cachedGetById):
3499 (JSC::DFG::JITCodeGenerator::cachedPutById):
3500 * dfg/DFGJITCompiler.cpp:
3501 (JSC::DFG::JITCompiler::link):
3502 * dfg/DFGJITCompiler.h:
3503 (JSC::DFG::PropertyAccessRecord::PropertyAccessRecord):
3504 (JSC::DFG::JITCompiler::addPropertyAccess):
3506 2011-11-08 Gavin Barraclough <barraclough@apple.com>
3508 DFG JIT calculation of OSR entry points is not THUMB2 safe
3509 https://bugs.webkit.org/show_bug.cgi?id=71852
3511 Reviewed by Oliver Hunt.
3513 Executable addresses are tagged with a low bit set to distinguish
3514 between THUMB2 and traditional ARM.
3516 * dfg/DFGJITCompiler.cpp:
3517 (JSC::DFG::JITCompiler::exitSpeculativeWithOSR):
3518 * dfg/DFGJITCompiler32_64.cpp:
3519 (JSC::DFG::JITCompiler::exitSpeculativeWithOSR):
3520 * dfg/DFGOSREntry.cpp:
3521 (JSC::DFG::prepareOSREntry):
3523 (JSC::JITCode::executableAddressAtOffset):
3524 (JSC::JITCode::start):
3525 (JSC::JITCode::size):
3527 2011-11-08 Michael Saboff <msaboff@apple.com>
3529 JSC::Parser::Parser leaks Lexer member
3530 https://bugs.webkit.org/show_bug.cgi?id=71847
3532 Changed m_lexer member of Parser to be OwnPtr to fix a memory leak.
3534 Reviewed by Oliver Hunt.
3536 * parser/Parser.cpp:
3537 (JSC::Parser::Parser):
3538 (JSC::Parser::parseFunctionBody):
3541 2011-11-08 Yuqiang Xian <yuqiang.xian@intel.com>
3543 Enable DFG JIT by default on X86 Linux and Mac platforms
3544 https://bugs.webkit.org/show_bug.cgi?id=71686
3546 Reviewed by Filip Pizlo.
3548 We can get 9% on SunSpider, 89% on Kraken and 37% on V8, on Linux X86.
3552 2011-11-08 Yuqiang Xian <yuqiang.xian@intel.com>
3554 DFG 32_64 - update make lists for efl, gtk, and Qt ports with DFG change r99519
3555 https://bugs.webkit.org/show_bug.cgi?id=71768
3557 Reviewed by Geoffrey Garen.
3559 Also includes a fix to make the newly introduced AssemblyHelpers
3560 friend of JSValue as we need the Tag definitions.
3562 * CMakeListsEfl.txt:
3563 * GNUmakefile.list.am:
3565 * runtime/JSValue.h:
3567 2011-11-07 Yuqiang Xian <yuqiang.xian@intel.com>
3569 Fix gcc 4.4 compilation warnings in DFG 32_64
3570 https://bugs.webkit.org/show_bug.cgi?id=71762
3572 Reviewed by Filip Pizlo.
3574 * dfg/DFGJITCodeGenerator.h:
3575 (JSC::DFG::JITCodeGenerator::registersMatched):
3577 2011-11-07 Filip Pizlo <fpizlo@apple.com>
3579 DFG code base should allow for classes not related to DFG::JITCompiler
3581 https://bugs.webkit.org/show_bug.cgi?id=71746
3583 Reviewed by Gavin Barraclough.
3585 * JavaScriptCore.xcodeproj/project.pbxproj:
3586 * dfg/DFGAssemblyHelpers.cpp: Added.
3587 (JSC::DFG::AssemblyHelpers::decodedCodeMapFor):
3588 (JSC::DFG::AssemblyHelpers::emitCount):
3589 (JSC::DFG::AssemblyHelpers::setSamplingFlag):
3590 (JSC::DFG::AssemblyHelpers::clearSamplingFlag):
3591 (JSC::DFG::AssemblyHelpers::jitAssertIsInt32):
3592 (JSC::DFG::AssemblyHelpers::jitAssertIsJSInt32):
3593 (JSC::DFG::AssemblyHelpers::jitAssertIsJSNumber):
3594 (JSC::DFG::AssemblyHelpers::jitAssertIsJSDouble):
3595 (JSC::DFG::AssemblyHelpers::jitAssertIsCell):
3596 * dfg/DFGAssemblyHelpers.h: Added.
3597 * dfg/DFGJITCompiler.cpp:
3598 * dfg/DFGJITCompiler.h:
3599 (JSC::DFG::JITCompiler::JITCompiler):
3600 (JSC::DFG::JITCompiler::graph):
3601 * dfg/DFGJITCompiler32_64.cpp:
3602 * dfg/DFGOSRExit.h: Added.
3603 (JSC::DFG::SpeculationRecovery::SpeculationRecovery):
3604 (JSC::DFG::SpeculationRecovery::type):
3605 (JSC::DFG::SpeculationRecovery::dest):
3606 (JSC::DFG::SpeculationRecovery::src):
3607 (JSC::DFG::OSRExit::numberOfRecoveries):
3608 (JSC::DFG::OSRExit::valueRecovery):
3609 (JSC::DFG::OSRExit::isArgument):
3610 (JSC::DFG::OSRExit::isVariable):
3611 (JSC::DFG::OSRExit::argumentForIndex):
3612 (JSC::DFG::OSRExit::variableForIndex):
3613 (JSC::DFG::OSRExit::operandForArgument):
3614 (JSC::DFG::OSRExit::operandForIndex):
3615 * dfg/DFGSpeculativeJIT.h:
3617 2011-11-07 Filip Pizlo <fpizlo@apple.com>
3619 Switch back to 1+1 value profiling buckets, since it didn't help on arewefastyet,
3620 but it appears to help on other benchmarks.
3622 Rubber stamped by Oliver Hunt.
3624 * bytecode/ValueProfile.h:
3626 2011-11-07 Ariya Hidayat <ariya@sencha.com>
3628 "use strict" can not contain escape sequences or line continuation
3629 https://bugs.webkit.org/show_bug.cgi?id=71532
3631 Reviewed by Darin Adler.
3633 Store the actual literal length (before the escapes and line
3634 continuation are encoded) while parsing the directive and use it
3635 for the directive comparison.
3637 * parser/Parser.cpp:
3638 (JSC::Parser::parseSourceElements):
3639 (JSC::Parser::parseStatement):
3642 2011-11-06 Filip Pizlo <fpizlo@apple.com>
3644 DFG operationCreateThis slow path may get the wrong callee in case of inlining
3645 https://bugs.webkit.org/show_bug.cgi?id=71647
3647 Reviewed by Oliver Hunt.
3649 No new tests because I only saw this manifest itself when I had other bugs
3650 leading to spurious slow path executions.
3652 * dfg/DFGJITCodeGenerator.h:
3653 (JSC::DFG::callOperation):
3654 * dfg/DFGOperations.cpp:
3655 * dfg/DFGOperations.h:
3656 * dfg/DFGSpeculativeJIT32_64.cpp:
3657 (JSC::DFG::SpeculativeJIT::compile):
3658 * dfg/DFGSpeculativeJIT64.cpp:
3659 (JSC::DFG::SpeculativeJIT::compile):
3661 2011-11-07 Mark Hahnenberg <mhahnenberg@apple.com>
3663 De-virtualize JSObject::putWithAttributes
3664 https://bugs.webkit.org/show_bug.cgi?id=71716
3666 Reviewed by Darin Adler.
3668 Added putWithAttributes to the MethodTable, changed all the virtual
3669 implementations of putWithAttributes to static ones, and replaced
3670 all call sites with corresponding lookups in the MethodTable.
3672 * API/JSObjectRef.cpp:
3673 (JSObjectSetProperty):
3674 * JavaScriptCore.exp:
3675 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3676 * debugger/DebuggerActivation.cpp:
3677 (JSC::DebuggerActivation::putWithAttributes):
3678 * debugger/DebuggerActivation.h:
3679 * interpreter/Interpreter.cpp:
3680 (JSC::Interpreter::execute):
3681 * runtime/ClassInfo.h:
3682 * runtime/JSActivation.cpp:
3683 (JSC::JSActivation::putWithAttributes):
3684 * runtime/JSActivation.h:
3685 * runtime/JSCell.cpp:
3686 (JSC::JSCell::putWithAttributes):
3688 * runtime/JSGlobalObject.cpp:
3689 (JSC::JSGlobalObject::putWithAttributes):
3690 * runtime/JSGlobalObject.h:
3691 * runtime/JSObject.cpp:
3692 (JSC::JSObject::putWithAttributes):
3693 (JSC::putDescriptor):
3694 * runtime/JSObject.h:
3695 * runtime/JSStaticScopeObject.cpp:
3696 (JSC::JSStaticScopeObject::putWithAttributes):
3697 * runtime/JSStaticScopeObject.h:
3698 * runtime/JSVariableObject.cpp:
3699 (JSC::JSVariableObject::putWithAttributes):
3700 * runtime/JSVariableObject.h:
3702 2011-11-07 Dmitry Lomov <dslomov@google.com>
3704 Unreviewed. Release build fix.
3707 (JSC::assertCharIsIn8BitRange):
3709 2011-11-07 Filip Pizlo <fpizlo@apple.com>
3711 Switch the value profiler back to 8 buckets, because we suspect that while this
3712 is more expensive it's also more stable.
3714 Rubber stamped by Geoff Garen.
3716 * bytecode/ValueProfile.h:
3718 2011-11-07 Andrew Wason <rectalogic@rectalogic.com>
3720 Uninitialized Heap member var
3721 https://bugs.webkit.org/show_bug.cgi?id=71722
3723 Reviewed by Filip Pizlo.
3726 (JSC::Heap::Heap): Initialize m_blockFreeingThreadShouldQuit
3728 2011-11-07 Yuqiang Xian <yuqiang.xian@intel.com>
3730 DFG 32_64 - registers cannot be reused arbitrarily if speculation failures are possible
3731 https://bugs.webkit.org/show_bug.cgi?id=71684
3733 Reviewed by Filip Pizlo.
3735 Currently in DFG JIT, we try to reuse the physical register of an
3736 operand for temporary usage if the current use of the operand is the
3737 last use. But sometimes this can be wrong, for example if there are
3738 possible speculation failures and we need to fallback to baseline JIT,
3739 the value of the operand which is supposed to be hold in the physical
3740 register can be modified by register reusing. The fixes the last
3741 inspector failures in layout test on Mac 32-bit if switching on DFG.
3743 * dfg/DFGSpeculativeJIT32_64.cpp:
3744 (JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
3745 (JSC::DFG::SpeculativeJIT::compile):
3747 2011-11-07 Ryosuke Niwa <rniwa@webkit.org>
3749 REGRESSION(r99436): Broke Snow Leopard debug build
3750 https://bugs.webkit.org/show_bug.cgi?id=71713
3752 Reviewed by Darin Adler.
3754 Put the assertion in a template and use template specialization
3755 to avoid warning when instantiated with UChar or LChar.
3757 In the long term, we should have traits for unsigned integral types
3758 and use that to specialize template instead of specializing it for UChar and LChar.
3761 (JSC::assertCharIsIn8BitRange):
3764 2011-11-07 ChangSeok Oh <shivamidow@gmail.com>
3766 [EFL] Support requestAnimationFrame API
3767 https://bugs.webkit.org/show_bug.cgi?id=67112
3769 Reviewed by Andreas Kling.
3771 Let EFL port use REQUEST_ANIMATION_FRAME_TIMER.
3775 2011-11-07 Michael Saboff <msaboff@apple.com>
3777 Towards 8 Bit Strings: Templatize JSC::Lexer class by character type
3778 https://bugs.webkit.org/show_bug.cgi?id=71331
3780 Change the Lexer class to be a template class based on the character
3781 type of the source. In the process updated the parseIdentifier()
3782 and parseString() methods to create 8 bit strings where possible.
3783 Also added some helper methods for accumulating temporary string
3784 data in the 8 and 16 bit vectors.
3786 Changed the SourceProvider::data() virtual method to return a
3787 StringImpl* instead of a UChar*.
3789 Updated the KeywordLookup generator to create code to match keywords
3790 for both 8 and 16 bit source strings.
3792 Due to a compiler bug (<rdar://problem/10194295>) moved enum
3793 definition outside of Lexer class declaration. Remove second enum
3796 Reviewed by Darin Adler.
3798 * KeywordLookupGenerator.py:
3799 * interpreter/Interpreter.cpp:
3800 (JSC::Interpreter::callEval):
3804 (JSC::::getInvalidCharMessage):
3805 (JSC::::currentCharacter):
3807 (JSC::::internalShift):
3810 (JSC::::getUnicodeCharacter):
3811 (JSC::::shiftLineTerminator):
3812 (JSC::::lastTokenWasRestrKeyword):
3817 (JSC::::parseIdentifier):
3818 (JSC::::parseIdentifierSlowCase):
3819 (JSC::::parseString):
3820 (JSC::::parseStringSlowCase):
3822 (JSC::::parseOctal):
3823 (JSC::::parseDecimal):
3824 (JSC::::parseNumberAfterDecimalPoint):
3825 (JSC::::parseNumberAfterExponentIndicator):
3826 (JSC::::parseMultilineComment):
3827 (JSC::::nextTokenIsColon):
3829 (JSC::::scanRegExp):
3830 (JSC::::skipRegExp):
3832 (JSC::::sourceCode):
3834 (JSC::Lexer::append16):
3835 (JSC::Lexer::currentOffset):
3836 (JSC::Lexer::setOffsetFromCharOffset):
3837 (JSC::::isWhiteSpace):
3838 (JSC::::isLineTerminator):
3839 (JSC::::convertHex):
3840 (JSC::::convertUnicode):
3841 (JSC::::makeIdentifier):
3842 (JSC::::setCodeStart):
3843 (JSC::::makeIdentifierLCharFromUChar):
3844 (JSC::::lexExpectIdentifier):
3845 * parser/Parser.cpp:
3846 (JSC::Parser::Parser):
3847 (JSC::Parser::parseProperty):
3848 (JSC::Parser::parseMemberExpression):
3850 (JSC::Parser::next):
3851 (JSC::Parser::nextExpectIdentifier):
3852 * parser/ParserArena.h:
3853 (JSC::IdentifierArena::makeIdentifier):
3854 (JSC::IdentifierArena::makeIdentifierLCharFromUChar):
3855 * parser/SourceCode.h:
3856 (JSC::SourceCode::subExpression):
3857 * parser/SourceProvider.h:
3858 (JSC::UStringSourceProvider::stringData):
3859 * parser/SourceProviderCache.h:
3860 * parser/SyntaxChecker.h:
3861 * runtime/FunctionPrototype.cpp:
3862 (JSC::insertSemicolonIfNeeded):
3863 * runtime/Identifier.cpp:
3864 (JSC::IdentifierTable::add):
3865 (JSC::IdentifierLCharFromUCharTranslator::hash):
3866 (JSC::IdentifierLCharFromUCharTranslator::equal):
3867 (JSC::IdentifierLCharFromUCharTranslator::translate):
3868 (JSC::Identifier::add8):
3869 * runtime/Identifier.h:
3870 (JSC::Identifier::Identifier):
3871 (JSC::Identifier::createLCharFromUChar):
3872 (JSC::Identifier::canUseSingleCharacterString):
3873 (JSC::IdentifierCharBufferTranslator::hash):
3874 (JSC::IdentifierCharBufferTranslator::equal):
3875 (JSC::IdentifierCharBufferTranslator::translate):
3876 (JSC::Identifier::add):
3877 (JSC::Identifier::equal):
3878 (JSC::IdentifierTable::add):
3879 * runtime/JSGlobalObjectFunctions.cpp:
3881 (JSC::parseIntOverflow):
3882 (JSC::globalFuncUnescape):
3883 * runtime/JSGlobalObjectFunctions.h:
3884 (JSC::parseIntOverflow):
3885 * runtime/LiteralParser.cpp:
3886 (JSC::LiteralParser::tryJSONPParse):
3887 (JSC::LiteralParser::Lexer::lexString):
3888 * wtf/text/StringImpl.h:
3890 2011-11-07 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
3892 [Qt] Put the jsc binary in 'bin' instead of leaving it deep in the build tree
3894 Allows us to not package up the whole Source/JavaScriptCore directory for the
3897 Reviewed-by Simon Hausmann.
3901 2011-11-06 Filip Pizlo <fpizlo@apple.com>
3903 REGRESSION(r99374): GTK+ build of the jsc binary doesn't like the call
3904 to initializeMainThread, and crashes
3905 https://bugs.webkit.org/show_bug.cgi?id=71643
3907 Reviewed by Sam Weinig.
3912 2011-11-06 Sam Weinig <sam@webkit.org>
3914 Add space missing from some class declarations
3915 https://bugs.webkit.org/show_bug.cgi?id=71632
3917 Reviewed by Anders Carlsson.
3919 * assembler/AssemblerBufferWithConstantPool.h:
3920 * bytecode/CodeBlock.h:
3921 * dfg/DFGVariableAccessData.h:
3922 * heap/VTableSpectrum.h:
3923 * jit/ExecutableAllocator.cpp:
3924 * jit/ExecutableAllocatorFixedVMPool.cpp:
3925 * wtf/MetaAllocatorHandle.h:
3928 2011-11-06 Sam Weinig <sam@webkit.org>
3930 Allow use of FINAL in JavaScriptCore
3931 https://bugs.webkit.org/show_bug.cgi?id=71630
3933 Reviewed by Anders Carlsson.
3935 * Configurations/Base.xcconfig:
3936 Don't warn about C++11 extensions used in C++98 mode.
3938 2011-11-05 Filip Pizlo <fpizlo@apple.com>
3940 Value profiling should just use two buckets
3941 https://bugs.webkit.org/show_bug.cgi?id=71619
3943 Reviewed by Gavin Barraclough.
3945 Added one more configuration options (like Heuristics::minimumOptimizationDelay),
3946 improved debugging in JIT optimization support, changed the number of buckets
3947 in the value profile from 9 to 2, and wrote a more optimal value profiling path
3948 in the old JIT to take advantage of this. It's still possible to play around with
3949 larger numbers of buckets, and we should probably keep this for a little while
3950 until we convince ourselves that using just two buckets is the right call.
3952 * bytecode/CodeBlock.cpp:
3953 (JSC::CodeBlock::shouldOptimizeNow):
3954 * bytecode/ValueProfile.h:
3955 * jit/JITInlineMethods.h:
3956 (JSC::JIT::emitValueProfilingSite):
3958 (JSC::DEFINE_STUB_FUNCTION):
3959 * runtime/Heuristics.cpp:
3960 (JSC::Heuristics::initializeHeuristics):
3961 * runtime/Heuristics.h:
3963 2011-11-03 Filip Pizlo <fpizlo@apple.com>
3965 JSC should be able to sample itself in a more flexible way than just sampling flags
3966 https://bugs.webkit.org/show_bug.cgi?id=71522
3968 Reviewed by Gavin Barraclough.
3970 Added a construct that looks like SamplingRegion samplingRegion("name").
3972 * JavaScriptCore.exp:
3973 * JavaScriptCore.xcodeproj/project.pbxproj:
3974 * bytecode/SamplingTool.cpp:
3975 (JSC::SamplingRegion::Locker::Locker):
3976 (JSC::SamplingRegion::Locker::~Locker):
3977 (JSC::SamplingRegion::sample):
3978 (JSC::SamplingRegion::dump):
3979 (JSC::SamplingRegion::dumpInternal):
3980 (JSC::SamplingThread::threadStartFunc):
3981 * bytecode/SamplingTool.h:
3982 (JSC::SamplingRegion::SamplingRegion):
3983 (JSC::SamplingRegion::~SamplingRegion):
3984 (JSC::SamplingRegion::exchangeCurrent):
3985 * bytecompiler/BytecodeGenerator.cpp:
3986 (JSC::BytecodeGenerator::generate):
3987 * dfg/DFGDriver.cpp:
3988 (JSC::DFG::compile):
3990 (JSC::Heap::markRoots):
3991 (JSC::Heap::collect):