summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-02-09 14:16:12 +0100
committerSimon Hausmann <simon.hausmann@nokia.com>2012-02-09 14:16:12 +0100
commit03e12282df9aa1e1fb05a8b90f1cfc2e08764cec (patch)
tree52599cd0ab782b1768e23ad176f7618f98333cb6 /Source/JavaScriptCore
parentcd44dc59cdfc39534aef4d417e9f3c412e3be139 (diff)
downloadqtwebkit-03e12282df9aa1e1fb05a8b90f1cfc2e08764cec.tar.gz
Imported WebKit commit e09a82039aa4273ab318b71122e92d8e5f233525 (http://svn.webkit.org/repository/webkit/trunk@107223)
Diffstat (limited to 'Source/JavaScriptCore')
-rw-r--r--Source/JavaScriptCore/CMakeLists.txt1
-rw-r--r--Source/JavaScriptCore/ChangeLog780
-rw-r--r--Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig4
-rw-r--r--Source/JavaScriptCore/Configurations/JavaScriptCore.xcconfig6
-rw-r--r--Source/JavaScriptCore/Configurations/Version.xcconfig2
-rw-r--r--Source/JavaScriptCore/DerivedSources.make11
-rw-r--r--Source/JavaScriptCore/GNUmakefile.list.am9
-rw-r--r--Source/JavaScriptCore/JavaScriptCore.JSVALUE32_64only.exp1
-rw-r--r--Source/JavaScriptCore/JavaScriptCore.JSVALUE64only.exp1
-rw-r--r--Source/JavaScriptCore/JavaScriptCore.exp634
-rw-r--r--Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def10
-rw-r--r--Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj8
-rw-r--r--Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj22
-rw-r--r--Source/JavaScriptCore/Target.pri1
-rw-r--r--Source/JavaScriptCore/assembler/ARMAssembler.h2
-rw-r--r--Source/JavaScriptCore/assembler/ARMv7Assembler.h4
-rw-r--r--Source/JavaScriptCore/assembler/AbstractMacroAssembler.h2
-rw-r--r--Source/JavaScriptCore/assembler/AssemblerBuffer.h2
-rw-r--r--Source/JavaScriptCore/assembler/LinkBuffer.h2
-rw-r--r--Source/JavaScriptCore/assembler/MIPSAssembler.h2
-rw-r--r--Source/JavaScriptCore/assembler/X86Assembler.h4
-rw-r--r--Source/JavaScriptCore/bytecode/CodeBlock.cpp4
-rw-r--r--Source/JavaScriptCore/bytecode/CodeBlock.h14
-rw-r--r--Source/JavaScriptCore/bytecode/CodeOrigin.h4
-rw-r--r--Source/JavaScriptCore/bytecode/DFGExitProfile.h2
-rw-r--r--Source/JavaScriptCore/bytecode/DataFormat.h2
-rw-r--r--Source/JavaScriptCore/bytecode/PredictedType.cpp2
-rw-r--r--Source/JavaScriptCore/bytecode/PredictedType.h2
-rw-r--r--Source/JavaScriptCore/bytecode/ValueRecovery.h7
-rw-r--r--Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp12
-rw-r--r--Source/JavaScriptCore/debugger/DebuggerActivation.cpp10
-rw-r--r--Source/JavaScriptCore/debugger/DebuggerActivation.h3
-rw-r--r--Source/JavaScriptCore/dfg/DFGAbstractState.cpp16
-rw-r--r--Source/JavaScriptCore/dfg/DFGAbstractState.h5
-rw-r--r--Source/JavaScriptCore/dfg/DFGAbstractValue.h4
-rw-r--r--Source/JavaScriptCore/dfg/DFGAssemblyHelpers.h4
-rw-r--r--Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp91
-rw-r--r--Source/JavaScriptCore/dfg/DFGCommon.h5
-rw-r--r--Source/JavaScriptCore/dfg/DFGFPRInfo.h4
-rw-r--r--Source/JavaScriptCore/dfg/DFGGPRInfo.h6
-rw-r--r--Source/JavaScriptCore/dfg/DFGGraph.cpp32
-rw-r--r--Source/JavaScriptCore/dfg/DFGGraph.h41
-rw-r--r--Source/JavaScriptCore/dfg/DFGJITCompiler.h1
-rw-r--r--Source/JavaScriptCore/dfg/DFGNode.h73
-rw-r--r--Source/JavaScriptCore/dfg/DFGNodeReferenceBlob.h155
-rw-r--r--Source/JavaScriptCore/dfg/DFGNodeUse.h130
-rw-r--r--Source/JavaScriptCore/dfg/DFGOSRExit.cpp2
-rw-r--r--Source/JavaScriptCore/dfg/DFGOSRExit.h2
-rw-r--r--Source/JavaScriptCore/dfg/DFGPropagator.cpp167
-rw-r--r--Source/JavaScriptCore/dfg/DFGScoreBoard.h6
-rw-r--r--Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp140
-rw-r--r--Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h113
-rw-r--r--Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp126
-rw-r--r--Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp130
-rw-r--r--Source/JavaScriptCore/heap/HandleTypes.h2
-rw-r--r--Source/JavaScriptCore/heap/Heap.cpp6
-rw-r--r--Source/JavaScriptCore/heap/Heap.h6
-rw-r--r--Source/JavaScriptCore/heap/MarkedAllocator.cpp128
-rw-r--r--Source/JavaScriptCore/heap/MarkedAllocator.h97
-rw-r--r--Source/JavaScriptCore/heap/MarkedBlock.cpp2
-rw-r--r--Source/JavaScriptCore/heap/MarkedBlock.h2
-rw-r--r--Source/JavaScriptCore/heap/MarkedSpace.cpp147
-rw-r--r--Source/JavaScriptCore/heap/MarkedSpace.h82
-rw-r--r--Source/JavaScriptCore/interpreter/CallFrame.h2
-rw-r--r--Source/JavaScriptCore/interpreter/Interpreter.cpp9
-rw-r--r--Source/JavaScriptCore/interpreter/Interpreter.h2
-rw-r--r--Source/JavaScriptCore/jit/JIT.cpp4
-rw-r--r--Source/JavaScriptCore/jit/JIT.h18
-rw-r--r--Source/JavaScriptCore/jit/JITDriver.h8
-rw-r--r--Source/JavaScriptCore/jit/JITInlineMethods.h9
-rw-r--r--Source/JavaScriptCore/parser/Parser.cpp6
-rw-r--r--Source/JavaScriptCore/runtime/ClassInfo.h8
-rw-r--r--Source/JavaScriptCore/runtime/Executable.cpp4
-rw-r--r--Source/JavaScriptCore/runtime/JSBoundFunction.cpp5
-rw-r--r--Source/JavaScriptCore/runtime/JSCell.cpp10
-rw-r--r--Source/JavaScriptCore/runtime/JSCell.h2
-rw-r--r--Source/JavaScriptCore/runtime/JSFunction.cpp11
-rw-r--r--Source/JavaScriptCore/runtime/JSGlobalObject.cpp15
-rw-r--r--Source/JavaScriptCore/runtime/JSGlobalObject.h1
-rw-r--r--Source/JavaScriptCore/runtime/JSObject.cpp100
-rw-r--r--Source/JavaScriptCore/runtime/JSObject.h8
-rw-r--r--Source/JavaScriptCore/runtime/JSType.h5
-rw-r--r--Source/JavaScriptCore/runtime/JSValue.cpp2
-rw-r--r--Source/JavaScriptCore/runtime/JSValue.h2
-rw-r--r--Source/JavaScriptCore/runtime/ObjectPrototype.cpp36
-rw-r--r--Source/JavaScriptCore/runtime/WriteBarrier.h4
-rw-r--r--Source/JavaScriptCore/shell/CMakeLists.txt4
-rw-r--r--Source/JavaScriptCore/tools/CodeProfiling.cpp7
-rw-r--r--Source/JavaScriptCore/wtf/BitVector.cpp2
-rw-r--r--Source/JavaScriptCore/wtf/BitVector.h7
-rw-r--r--Source/JavaScriptCore/wtf/CurrentTime.cpp6
-rw-r--r--Source/JavaScriptCore/wtf/FastAllocBase.h2
-rw-r--r--Source/JavaScriptCore/wtf/HashTable.h3
-rw-r--r--Source/JavaScriptCore/wtf/Platform.h12
-rw-r--r--Source/JavaScriptCore/wtf/ThreadSpecific.h32
-rw-r--r--Source/JavaScriptCore/wtf/gobject/GlibUtilities.cpp16
-rw-r--r--Source/JavaScriptCore/yarr/YarrPattern.cpp19
97 files changed, 1920 insertions, 1756 deletions
diff --git a/Source/JavaScriptCore/CMakeLists.txt b/Source/JavaScriptCore/CMakeLists.txt
index a620c5a52..eaa395e15 100644
--- a/Source/JavaScriptCore/CMakeLists.txt
+++ b/Source/JavaScriptCore/CMakeLists.txt
@@ -80,6 +80,7 @@ SET(JavaScriptCore_SOURCES
heap/HandleHeap.cpp
heap/HandleStack.cpp
heap/MachineStackMarker.cpp
+ heap/MarkedAllocator.cpp
heap/MarkedBlock.cpp
heap/MarkedSpace.cpp
heap/ConservativeRoots.cpp
diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog
index 1f53cd789..bbef23628 100644
--- a/Source/JavaScriptCore/ChangeLog
+++ b/Source/JavaScriptCore/ChangeLog
@@ -1,3 +1,783 @@
+2012-02-08 Oliver Hunt <oliver@apple.com>
+
+ Whoops, fix the build.
+
+ * runtime/Executable.cpp:
+ (JSC::FunctionExecutable::FunctionExecutable):
+
+2012-02-08 Oliver Hunt <oliver@apple.com>
+
+ Fix issue encountered while debugging stacktraces
+ https://bugs.webkit.org/show_bug.cgi?id=78147
+
+ Reviewed by Gavin Barraclough.
+
+ Debugging is easier if we always ensure that we have a non-null
+ inferred name.
+
+ * runtime/Executable.cpp:
+ (JSC::FunctionExecutable::FunctionExecutable):
+
+2012-02-08 Oliver Hunt <oliver@apple.com>
+
+ updateTopCallframe in the baseline JIT doesn't provide enough information to the stubs
+ https://bugs.webkit.org/show_bug.cgi?id=78145
+
+ Reviewed by Gavin Barraclough.
+
+ Fix the updateTopCallFrame helper to store additional information
+ that becomes necessary when we are trying to provide more stack
+ frame information.
+
+ * interpreter/CallFrame.h:
+ (JSC::ExecState::bytecodeOffsetForBaselineJIT):
+ (ExecState):
+ * jit/JIT.cpp:
+ (JSC::JIT::privateCompile):
+ * jit/JIT.h:
+ (JSC::JIT::compileGetByIdProto):
+ (JSC::JIT::compileGetByIdSelfList):
+ (JSC::JIT::compileGetByIdProtoList):
+ (JSC::JIT::compileGetByIdChainList):
+ (JSC::JIT::compileGetByIdChain):
+ (JSC::JIT::compilePutByIdTransition):
+ (JIT):
+ * jit/JITInlineMethods.h:
+ (JSC::JIT::updateTopCallFrame):
+
+2012-02-07 Robert Kroeger <rjkroege@chromium.org>
+
+ [chromium] Remove the enable marcro for the no longer necessary Chromium
+ gesture recognizer.
+ https://bugs.webkit.org/show_bug.cgi?id=77492
+
+ Reviewed by Adam Barth.
+
+ * wtf/Platform.h:
+
+2012-02-07 Tony Chang <tony@chromium.org>
+
+ merge DashboardSupportCSSPropertyNames.in into CSSPropertyNames.in
+ https://bugs.webkit.org/show_bug.cgi?id=78036
+
+ Reviewed by Darin Adler.
+
+ * Configurations/FeatureDefines.xcconfig: Add ENABLE_DASHBOARD_SUPPORT to FEATURE_DEFINES.
+
+2012-02-07 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ [CMAKE] Use *bin* and *lib* directories for executable and libraries.
+ https://bugs.webkit.org/show_bug.cgi?id=77928
+
+ Reviewed by Daniel Bates.
+
+ CMake has used *Programs* directory for executable. In addition, shared libraries are being
+ built in source directory. It is better to set common places in order to maintain executable
+ and libraries. *bin* is for executable and *lib* is for library.
+
+ * shell/CMakeLists.txt: Change *Programs* with *bin*.
+
+2012-02-07 Gavin Barraclough <barraclough@apple.com>
+
+ Crash on http://www.rickshawbags.com/
+ https://bugs.webkit.org/show_bug.cgi?id=78045
+
+ Reviewed by Darin Adler.
+
+ Problem URL is: http://www.rickshawbags.com/customize/custom-bag#!thl=rickshaw/bag()
+
+ This is a bug introduced by https://bugs.webkit.org/show_bug.cgi?id=71933,
+ isVariableObject() checks were excluding StaticScopeObjects, this patch
+ inadvertently changed them to be included.
+
+ * runtime/JSType.h:
+ - sort JSType enum such that StaticScopeObjectType comes before VariableObjectType,
+ and thus is excluded from isVariableObject() checks.
+
+2012-02-06 Jer Noble <jer.noble@apple.com>
+
+ Use CMClock as a timing source for PlatformClock where available.
+ https://bugs.webkit.org/show_bug.cgi?id=77885
+
+ Reviewed by Eric Carlson.
+
+ * wtf/Platform.h: Added WTF_USE_COREMEDIA.
+
+2012-02-06 Filip Pizlo <fpizlo@apple.com>
+
+ ValueToNumber and ValueToDouble nodes don't do anything and should be removed
+ https://bugs.webkit.org/show_bug.cgi?id=77855
+ <rdar://problem/10811325>
+
+ Reviewed by Gavin Barraclough.
+
+ Removed ValueToNumber and ValueToDouble, because the only thing they were doing
+ was wasting registers.
+
+ This looks like a 1% win on V8 (with a 5% win on crypto) and a 2-3% win on Kraken,
+ mostly due to a >10% win on gaussian-blur. No win anywhere else.
+
+ * dfg/DFGAbstractState.cpp:
+ (JSC::DFG::AbstractState::execute):
+ * dfg/DFGByteCodeParser.cpp:
+ (JSC::DFG::ByteCodeParser::getToInt32):
+ (ByteCodeParser):
+ (JSC::DFG::ByteCodeParser::handleMinMax):
+ (JSC::DFG::ByteCodeParser::handleIntrinsic):
+ (JSC::DFG::ByteCodeParser::parseBlock):
+ * dfg/DFGNode.h:
+ (DFG):
+ (JSC::DFG::Node::hasArithNodeFlags):
+ * dfg/DFGPropagator.cpp:
+ (JSC::DFG::Propagator::propagateArithNodeFlags):
+ (JSC::DFG::Propagator::propagateNodePredictions):
+ (JSC::DFG::Propagator::vote):
+ (JSC::DFG::Propagator::doRoundOfDoubleVoting):
+ (Propagator):
+ (JSC::DFG::Propagator::fixupNode):
+ (JSC::DFG::Propagator::canonicalize):
+ * dfg/DFGSpeculativeJIT.cpp:
+ (JSC::DFG::SpeculativeJIT::computeValueRecoveryFor):
+ * dfg/DFGSpeculativeJIT32_64.cpp:
+ (JSC::DFG::SpeculativeJIT::compile):
+ * dfg/DFGSpeculativeJIT64.cpp:
+ (JSC::DFG::SpeculativeJIT::compile):
+
+2012-02-06 Patrick Gansterer <paroga@webkit.org>
+
+ Unreviewed WinCE build fix after r106197.
+
+ * tools/CodeProfiling.cpp:
+ (JSC::CodeProfiling::notifyAllocator): getenv() isn't supported by WinCE. Don't call it.
+
+2012-02-05 Gavin Barraclough <barraclough@apple.com>
+
+ Remove JSObject defineGetter/defineSetter lookupGetter/lookupSetter
+ https://bugs.webkit.org/show_bug.cgi?id=77451
+
+ Reviewed by Sam Weinig.
+
+ These can now all be implemented in terms of defineOwnProperty & getPropertyDescriptor.
+ Also remove initializeGetterSetterProperty, since this is equivalent to putDirectAccessor.
+
+ * JavaScriptCore.exp:
+ * debugger/DebuggerActivation.cpp:
+ (JSC::DebuggerActivation::defineOwnProperty):
+ * debugger/DebuggerActivation.h:
+ (DebuggerActivation):
+ * runtime/ClassInfo.h:
+ (MethodTable):
+ (JSC):
+ * runtime/JSBoundFunction.cpp:
+ (JSC::JSBoundFunction::finishCreation):
+ * runtime/JSCell.cpp:
+ (JSC):
+ * runtime/JSCell.h:
+ (JSCell):
+ * runtime/JSFunction.cpp:
+ (JSC::JSFunction::getOwnPropertySlot):
+ (JSC::JSFunction::getOwnPropertyDescriptor):
+ * runtime/JSGlobalObject.cpp:
+ (JSC::JSGlobalObject::defineOwnProperty):
+ (JSC):
+ * runtime/JSGlobalObject.h:
+ (JSGlobalObject):
+ * runtime/JSObject.cpp:
+ (JSC):
+ * runtime/JSObject.h:
+ (JSObject):
+ * runtime/ObjectPrototype.cpp:
+ (JSC::objectProtoFuncDefineGetter):
+ (JSC::objectProtoFuncDefineSetter):
+ (JSC::objectProtoFuncLookupGetter):
+ (JSC::objectProtoFuncLookupSetter):
+
+2012-02-06 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ Unreviewed. Fix make distcheck.
+
+ * GNUmakefile.list.am: Add missing files.
+
+2012-02-05 Filip Pizlo <fpizlo@apple.com>
+
+ DFG's child references from one node to another should have room for type information
+ https://bugs.webkit.org/show_bug.cgi?id=77797
+
+ Reviewed by Oliver Hunt.
+
+ The DFG::Node::child fields now contain both a DFG::NodeIndex (which is just an unsigned)
+ and a DFG::UseKind (which is currently an effectively empty enum). They are encapsulated
+ together as a DFG::NodeUse, which can in most cases still be used as an index (for
+ example DFG::Graph, AbstractState, and SpeculativeJIT all accept NodeUse in most places
+ where they really want a NodeIndex).
+
+ The NodeUse stores both the index and the UseKind without bloating the memory usage of
+ DFG::Node, since we really don't need full 32 bits for the NodeIndex (a DFG::Node is
+ roughly 11 words, so if we assume that we never want to use more than 1GB to DFG compile
+ something - likely a sensible assumption! - then we will only be able to have room for
+ about 24 million nodes, which means we only need about 24.5 bits for the node index).
+ Currently the DFG::NodeUse allocates 4 bits for the UseKind and 28 bits for the index,
+ but stores the index as a signed number to make NoNode work naturally. Hence we really
+ just have 27 bits for the index.
+
+ This is performance-neutral on all benchmarks we track.
+
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+ * dfg/DFGAbstractState.h:
+ (JSC::DFG::AbstractState::forNode):
+ (AbstractState):
+ * dfg/DFGByteCodeParser.cpp:
+ (JSC::DFG::ByteCodeParser::getLocal):
+ (JSC::DFG::ByteCodeParser::getArgument):
+ (JSC::DFG::ByteCodeParser::toInt32):
+ (JSC::DFG::ByteCodeParser::addVarArgChild):
+ (JSC::DFG::ByteCodeParser::processPhiStack):
+ * dfg/DFGCommon.h:
+ * dfg/DFGGraph.cpp:
+ (JSC::DFG::Graph::dump):
+ (DFG):
+ * dfg/DFGGraph.h:
+ (Graph):
+ (JSC::DFG::Graph::operator[]):
+ (JSC::DFG::Graph::at):
+ (JSC::DFG::Graph::ref):
+ (JSC::DFG::Graph::deref):
+ (JSC::DFG::Graph::clearAndDerefChild1):
+ (JSC::DFG::Graph::clearAndDerefChild2):
+ (JSC::DFG::Graph::clearAndDerefChild3):
+ * dfg/DFGJITCompiler.h:
+ (JSC::DFG::JITCompiler::getPrediction):
+ * dfg/DFGNode.h:
+ (JSC::DFG::Node::Node):
+ (JSC::DFG::Node::child1):
+ (JSC::DFG::Node::child1Unchecked):
+ (JSC::DFG::Node::child2):
+ (JSC::DFG::Node::child3):
+ (JSC::DFG::Node::firstChild):
+ (JSC::DFG::Node::numChildren):
+ (JSC::DFG::Node::dumpChildren):
+ (Node):
+ * dfg/DFGNodeReferenceBlob.h: Added.
+ (DFG):
+ (NodeReferenceBlob):
+ (JSC::DFG::NodeReferenceBlob::NodeReferenceBlob):
+ (JSC::DFG::NodeReferenceBlob::child):
+ (JSC::DFG::NodeReferenceBlob::child1):
+ (JSC::DFG::NodeReferenceBlob::child2):
+ (JSC::DFG::NodeReferenceBlob::child3):
+ (JSC::DFG::NodeReferenceBlob::child1Unchecked):
+ (JSC::DFG::NodeReferenceBlob::initialize):
+ (JSC::DFG::NodeReferenceBlob::firstChild):
+ (JSC::DFG::NodeReferenceBlob::setFirstChild):
+ (JSC::DFG::NodeReferenceBlob::numChildren):
+ (JSC::DFG::NodeReferenceBlob::setNumChildren):
+ * dfg/DFGNodeUse.h: Added.
+ (DFG):
+ (NodeUse):
+ (JSC::DFG::NodeUse::NodeUse):
+ (JSC::DFG::NodeUse::indexUnchecked):
+ (JSC::DFG::NodeUse::index):
+ (JSC::DFG::NodeUse::setIndex):
+ (JSC::DFG::NodeUse::useKind):
+ (JSC::DFG::NodeUse::setUseKind):
+ (JSC::DFG::NodeUse::isSet):
+ (JSC::DFG::NodeUse::operator!):
+ (JSC::DFG::NodeUse::operator==):
+ (JSC::DFG::NodeUse::operator!=):
+ (JSC::DFG::NodeUse::shift):
+ (JSC::DFG::NodeUse::makeWord):
+ (JSC::DFG::operator==):
+ (JSC::DFG::operator!=):
+ * dfg/DFGPropagator.cpp:
+ (JSC::DFG::Propagator::propagateArithNodeFlags):
+ (JSC::DFG::Propagator::vote):
+ (JSC::DFG::Propagator::toDouble):
+ (JSC::DFG::Propagator::fixupNode):
+ (JSC::DFG::Propagator::canonicalize):
+ (JSC::DFG::Propagator::startIndex):
+ (JSC::DFG::Propagator::globalVarLoadElimination):
+ (JSC::DFG::Propagator::getByValLoadElimination):
+ (JSC::DFG::Propagator::getByOffsetLoadElimination):
+ (JSC::DFG::Propagator::performSubstitution):
+ (JSC::DFG::Propagator::performNodeCSE):
+ * dfg/DFGScoreBoard.h:
+ (JSC::DFG::ScoreBoard::use):
+ * dfg/DFGSpeculativeJIT.cpp:
+ (JSC::DFG::SpeculativeJIT::useChildren):
+ (JSC::DFG::SpeculativeJIT::writeBarrier):
+ (JSC::DFG::SpeculativeJIT::nonSpeculativeStrictEq):
+ (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectEquality):
+ (JSC::DFG::SpeculativeJIT::compilePeepHoleIntegerBranch):
+ (JSC::DFG::SpeculativeJIT::compileMovHint):
+ (JSC::DFG::SpeculativeJIT::computeValueRecoveryFor):
+ (JSC::DFG::SpeculativeJIT::compilePutByValForByteArray):
+ (JSC::DFG::SpeculativeJIT::compilePutByValForIntTypedArray):
+ (JSC::DFG::SpeculativeJIT::compilePutByValForFloatTypedArray):
+ (JSC::DFG::SpeculativeJIT::compileSoftModulo):
+ (JSC::DFG::SpeculativeJIT::compileAdd):
+ (JSC::DFG::SpeculativeJIT::compileArithSub):
+ (JSC::DFG::SpeculativeJIT::compileStrictEqForConstant):
+ (JSC::DFG::SpeculativeJIT::compileStrictEq):
+ * dfg/DFGSpeculativeJIT.h:
+ (JSC::DFG::SpeculativeJIT::at):
+ (JSC::DFG::SpeculativeJIT::canReuse):
+ (JSC::DFG::SpeculativeJIT::use):
+ (SpeculativeJIT):
+ (JSC::DFG::SpeculativeJIT::detectPeepHoleBranch):
+ (JSC::DFG::SpeculativeJIT::speculationCheck):
+ (JSC::DFG::SpeculativeJIT::terminateSpeculativeExecution):
+ (JSC::DFG::IntegerOperand::IntegerOperand):
+ (JSC::DFG::DoubleOperand::DoubleOperand):
+ (JSC::DFG::JSValueOperand::JSValueOperand):
+ (JSC::DFG::StorageOperand::StorageOperand):
+ (JSC::DFG::SpeculateIntegerOperand::SpeculateIntegerOperand):
+ (JSC::DFG::SpeculateStrictInt32Operand::SpeculateStrictInt32Operand):
+ (JSC::DFG::SpeculateDoubleOperand::SpeculateDoubleOperand):
+ (JSC::DFG::SpeculateCellOperand::SpeculateCellOperand):
+ (JSC::DFG::SpeculateBooleanOperand::SpeculateBooleanOperand):
+ * dfg/DFGSpeculativeJIT32_64.cpp:
+ (JSC::DFG::SpeculativeJIT::nonSpeculativeValueToNumber):
+ (JSC::DFG::SpeculativeJIT::nonSpeculativeValueToInt32):
+ (JSC::DFG::SpeculativeJIT::cachedPutById):
+ (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
+ (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
+ (JSC::DFG::SpeculativeJIT::nonSpeculativeCompareNull):
+ (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranch):
+ (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompare):
+ (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeStrictEq):
+ (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeStrictEq):
+ (JSC::DFG::SpeculativeJIT::emitCall):
+ (JSC::DFG::SpeculativeJIT::compileValueAdd):
+ (JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
+ (JSC::DFG::SpeculativeJIT::compileLogicalNot):
+ (JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
+ (JSC::DFG::SpeculativeJIT::emitBranch):
+ (JSC::DFG::SpeculativeJIT::compile):
+ * dfg/DFGSpeculativeJIT64.cpp:
+ (JSC::DFG::SpeculativeJIT::nonSpeculativeValueToNumber):
+ (JSC::DFG::SpeculativeJIT::nonSpeculativeValueToInt32):
+ (JSC::DFG::SpeculativeJIT::cachedPutById):
+ (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
+ (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
+ (JSC::DFG::SpeculativeJIT::nonSpeculativeCompareNull):
+ (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranch):
+ (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompare):
+ (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeStrictEq):
+ (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeStrictEq):
+ (JSC::DFG::SpeculativeJIT::emitCall):
+ (JSC::DFG::SpeculativeJIT::compileObjectEquality):
+ (JSC::DFG::SpeculativeJIT::compileValueAdd):
+ (JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
+ (JSC::DFG::SpeculativeJIT::compileLogicalNot):
+ (JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
+ (JSC::DFG::SpeculativeJIT::emitBranch):
+ (JSC::DFG::SpeculativeJIT::compile):
+
+2012-02-05 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ [CMAKE] Support javascriptcore test for EFL port.
+ https://bugs.webkit.org/show_bug.cgi?id=77425
+
+ Reviewed by Daniel Bates.
+
+ Efl and WinCE as well as Blackberry port are now using Cmake as its build system
+ and they are share the make file to create jsc excutable. In order to run
+ "run-javascriptcore-tests", EFL port needs to change jsc installation configuration
+ with executable output directory(e.g. Programs). So, this patch change jsc installation
+ configuration only for EFL port.
+
+ * shell/CMakeLists.txt:
+
+2012-02-04 Gavin Barraclough <barraclough@apple.com>
+
+ Rubber stamped by Sam Weinig.
+
+ * yarr/YarrPattern.cpp:
+ (JSC::Yarr::YarrPatternConstructor::quantifyAtom):
+ - Fix comment.
+
+2012-02-04 Kalev Lember <kalevlember@gmail.com>
+
+ [GTK] CurrentTime: Reorder headers for win32
+ https://bugs.webkit.org/show_bug.cgi?id=77808
+
+ Reviewed by Martin Robinson.
+
+ In GTK+ win32 port, monotonicallyIncreasingTime() implementation is
+ based on g_get_monotonic_time(). Reorder headers to make sure glib.h
+ gets included even when the platform is win32.
+
+ CurrentTime.cpp: In function 'double WTF::monotonicallyIncreasingTime()':
+ CurrentTime.cpp:321:53: error: 'g_get_monotonic_time' was not declared in this scope
+ CurrentTime.cpp:322:1: warning: control reaches end of non-void function [-Wreturn-type]
+
+ * wtf/CurrentTime.cpp:
+
+2012-02-03 Anders Carlsson <andersca@apple.com>
+
+ Prefix the typedef in WTF_MAKE_FAST_ALLOCATED with underscores
+ https://bugs.webkit.org/show_bug.cgi?id=77788
+
+ Reviewed by Andreas Kling.
+
+ The current typedef name, 'ThisIsHereToForceASemicolonAfterThisMacro', shows up when trying to
+ code-complete 'this' in Xcode. Prefix the typedef with two underscores to stop this from happening.
+
+ * wtf/FastAllocBase.h:
+
+2012-02-03 Rob Buis <rbuis@rim.com>
+
+ Fix alignment warnings in ARMv7
+ https://bugs.webkit.org/show_bug.cgi?id=55368
+
+ Reviewed by Filip Pizlo.
+
+ Use reinterpret_cast_ptr and static_cast to get rid of alignment issues in ARMv7 code.
+
+ * heap/HandleTypes.h:
+ (JSC::HandleTypes::getFromSlot):
+ * heap/MarkedBlock.cpp:
+ (JSC::MarkedBlock::specializedSweep):
+ * heap/MarkedBlock.h:
+ (JSC::MarkedBlock::forEachCell):
+ * runtime/WriteBarrier.h:
+ (JSC::WriteBarrierBase::get):
+ (JSC::WriteBarrierBase::unvalidatedGet):
+
+2012-02-03 Mark Hahnenberg <mhahnenberg@apple.com>
+
+ Build fix
+
+ Unreviewed build fix
+
+ Forgot to add a couple files.
+
+ * heap/MarkedAllocator.cpp: Added.
+ (JSC):
+ (JSC::MarkedAllocator::tryAllocateHelper):
+ (JSC::MarkedAllocator::tryAllocate):
+ (JSC::MarkedAllocator::allocateSlowCase):
+ (JSC::MarkedAllocator::allocateBlock):
+ (JSC::MarkedAllocator::addBlock):
+ (JSC::MarkedAllocator::removeBlock):
+ * heap/MarkedAllocator.h: Added.
+ (JSC):
+ (DFG):
+ (MarkedAllocator):
+ (JSC::MarkedAllocator::cellSize):
+ (JSC::MarkedAllocator::heap):
+ (JSC::MarkedAllocator::setHeap):
+ (JSC::MarkedAllocator::setCellSize):
+ (JSC::MarkedAllocator::setMarkedSpace):
+ (JSC::MarkedAllocator::MarkedAllocator):
+ (JSC::MarkedAllocator::allocate):
+ (JSC::MarkedAllocator::reset):
+ (JSC::MarkedAllocator::zapFreeList):
+ (JSC::MarkedAllocator::forEachBlock):
+
+2012-02-03 Mark Hahnenberg <mhahnenberg@apple.com>
+
+ Refactor MarkedBlock::SizeClass into a separate class
+ https://bugs.webkit.org/show_bug.cgi?id=77600
+
+ Reviewed by Geoffrey Garen.
+
+ We pulled SizeClass out into its own class, named MarkedAllocator, and gave it
+ the responsibility of allocating objects from the collection of MarkedBlocks
+ that it manages. Also limited the amount of coupling to internal data fields
+ from other places, although it's mostly unavoidable in the JIT code.
+
+ Eventually MarkedAllocator will implement various policies to do with object
+ management, e.g. whether or not to run destructors on objects that it manages.
+ MarkedSpace will manage a collection of MarkedAllocators with varying policies,
+ as it does now but to a larger extent.
+
+ * CMakeLists.txt:
+ * GNUmakefile.list.am:
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+ * Target.pri:
+ * dfg/DFGSpeculativeJIT.h:
+ (JSC::DFG::SpeculativeJIT::emitAllocateJSFinalObject):
+ * heap/Heap.cpp:
+ (JSC::Heap::collect):
+ (JSC::Heap::resetAllocators):
+ * heap/Heap.h:
+ (JSC::Heap::allocatorForObject):
+ (Heap):
+ * heap/MarkedAllocator.cpp: Added.
+ (JSC):
+ (JSC::MarkedAllocator::tryAllocateHelper):
+ (JSC::MarkedAllocator::tryAllocate):
+ (JSC::MarkedAllocator::allocateSlowCase):
+ (JSC::MarkedAllocator::allocateBlock):
+ (JSC::MarkedAllocator::addBlock):
+ (JSC::MarkedAllocator::removeBlock):
+ * heap/MarkedAllocator.h: Added.
+ (JSC):
+ (DFG):
+ (MarkedAllocator):
+ (JSC::MarkedAllocator::cellSize):
+ (JSC::MarkedAllocator::heap):
+ (JSC::MarkedAllocator::setHeap):
+ (JSC::MarkedAllocator::setCellSize):
+ (JSC::MarkedAllocator::setMarkedSpace):
+ (JSC::MarkedAllocator::MarkedAllocator):
+ (JSC::MarkedAllocator::allocate):
+ (JSC::MarkedAllocator::reset):
+ (JSC::MarkedAllocator::zapFreeList):
+ (JSC::MarkedAllocator::forEachBlock):
+ * heap/MarkedSpace.cpp:
+ (JSC::MarkedSpace::MarkedSpace):
+ (JSC::MarkedSpace::resetAllocators):
+ (JSC::MarkedSpace::canonicalizeCellLivenessData):
+ (JSC::TakeIfUnmarked::operator()):
+ * heap/MarkedSpace.h:
+ (MarkedSpace):
+ (JSC::MarkedSpace::allocatorFor):
+ (JSC::MarkedSpace::allocate):
+ (JSC::MarkedSpace::forEachBlock):
+ (JSC::MarkedSpace::didAddBlock):
+ (JSC::MarkedSpace::didConsumeFreeList):
+ * jit/JITInlineMethods.h:
+ (JSC::JIT::emitAllocateBasicJSObject):
+
+2012-02-03 Simon Hausmann <simon.hausmann@nokia.com>
+
+ [Qt] Replace GNU linker script for exports with export macros in WTF/JSC
+ https://bugs.webkit.org/show_bug.cgi?id=77723
+
+ Reviewed by Tor Arne Vestbø.
+
+ * wtf/Platform.h: Enable use of export macros.
+
+2012-02-02 Hajime Morrita <morrita@chromium.org>
+
+ Unreviewed, removing an unnecessarily JS_PRIVATE_EXPORT annotation.
+
+ * interpreter/Interpreter.h:
+ (Interpreter):
+
+2012-01-31 Hajime Morrita <morrita@chromium.org>
+
+ [Mac] eliminate JavaScriptCore.exp
+ https://bugs.webkit.org/show_bug.cgi?id=72854
+
+ Reviewed by Darin Adler.
+
+ - Removed exp files and corresponding makefile entries.
+ - Changed the build configuration no to use exp file.
+
+ * Configurations/JavaScriptCore.xcconfig:
+ * DerivedSources.make:
+ * JavaScriptCore.JSVALUE32_64only.exp: Removed.
+ * JavaScriptCore.JSVALUE64only.exp: Removed.
+ * JavaScriptCore.exp: Removed.
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+ * wtf/Platform.h:
+
+2012-02-02 Benjamin Poulain <bpoulain@apple.com>
+
+ Running a Web Worker on about:blank crashes the interpreter
+ https://bugs.webkit.org/show_bug.cgi?id=77593
+
+ Reviewed by Michael Saboff.
+
+ The method Interpreter::execute() was crashing on empty programs because
+ the assumption is made the source is not null.
+
+ This patch shortcut the execution when the String is null to avoid invalid
+ memory access.
+
+ * interpreter/Interpreter.cpp:
+ (JSC::Interpreter::execute):
+
+2012-02-02 Kalev Lember <kalevlember@gmail.com>
+
+ [GTK] Use win32 native threading
+ https://bugs.webkit.org/show_bug.cgi?id=77676
+
+ Reviewed by Martin Robinson.
+
+ r97269 switched from glib threading to pthreads, breaking win32 GTK+.
+ This is a follow up, removing some leftovers in ThreadSpecific.h and
+ switching win32 to use the native threading in ThreadingWin.cpp.
+
+ * GNUmakefile.list.am: Compile in win32 native threading support
+ * wtf/ThreadSpecific.h: Remove GTK+-specific definitions
+ (ThreadSpecific):
+ (WTF::::destroy):
+
+2012-02-02 Filip Pizlo <fpizlo@apple.com>
+
+ retrieveCallerFromVMCode should call trueCallerFrame
+ https://bugs.webkit.org/show_bug.cgi?id=77684
+
+ Reviewed by Oliver Hunt.
+
+ * interpreter/Interpreter.cpp:
+ (JSC::Interpreter::retrieveCallerFromVMCode):
+
+2012-02-02 Kalev Lember <kalevlember@gmail.com>
+
+ [GTK] Implement current executable path finding for win32
+ https://bugs.webkit.org/show_bug.cgi?id=77677
+
+ Reviewed by Martin Robinson.
+
+ The WTF helper for getting the binary path that was added in r101710
+ left out the win32 implementation. Fix this.
+
+ * wtf/gobject/GlibUtilities.cpp:
+ (getCurrentExecutablePath):
+
+2012-02-02 Filip Pizlo <fpizlo@apple.com>
+
+ Throwing away bytecode and then reparsing during DFG optimization is just
+ plain wrong and makes things crash
+ https://bugs.webkit.org/show_bug.cgi?id=77680
+ <rdar://problem/10798490>
+
+ Reviewed by Oliver Hunt.
+
+ This is the minimal surgical fix: it removes the code that triggered bytecode
+ throw-away. Once we're confident that this is a good idea, we can kill all of
+ the code that implements the feature.
+
+ * bytecode/CodeBlock.h:
+ (JSC::CodeBlock::discardBytecodeLater):
+ (JSC::CodeBlock::addValueProfile):
+ * jit/JITDriver.h:
+ (JSC::jitCompileIfAppropriate):
+ (JSC::jitCompileFunctionIfAppropriate):
+
+2012-02-02 Filip Pizlo <fpizlo@apple.com>
+
+ Release build debugging should be easier
+ https://bugs.webkit.org/show_bug.cgi?id=77669
+
+ Reviewed by Gavin Barraclough.
+
+ * assembler/ARMAssembler.h:
+ (ARMAssembler):
+ (JSC::ARMAssembler::debugOffset):
+ * assembler/ARMv7Assembler.h:
+ (ARMv7Assembler):
+ (JSC::ARMv7Assembler::debugOffset):
+ (ARMInstructionFormatter):
+ (JSC::ARMv7Assembler::ARMInstructionFormatter::debugOffset):
+ * assembler/AbstractMacroAssembler.h:
+ (AbstractMacroAssembler):
+ (JSC::AbstractMacroAssembler::debugOffset):
+ * assembler/AssemblerBuffer.h:
+ (AssemblerBuffer):
+ (JSC::AssemblerBuffer::debugOffset):
+ * assembler/LinkBuffer.h:
+ (LinkBuffer):
+ (JSC::LinkBuffer::debugSize):
+ * assembler/MIPSAssembler.h:
+ (MIPSAssembler):
+ (JSC::MIPSAssembler::debugOffset):
+ * assembler/X86Assembler.h:
+ (X86Assembler):
+ (JSC::X86Assembler::debugOffset):
+ (X86InstructionFormatter):
+ (JSC::X86Assembler::X86InstructionFormatter::debugOffset):
+ * bytecode/CodeBlock.cpp:
+ (JSC):
+ * bytecode/CodeBlock.h:
+ (CodeBlock):
+ * bytecode/CodeOrigin.h:
+ (CodeOrigin):
+ (JSC):
+ (JSC::CodeOrigin::inlineStack):
+ * bytecode/DFGExitProfile.h:
+ (JSC::DFG::exitKindToString):
+ * bytecode/DataFormat.h:
+ (JSC::dataFormatToString):
+ * bytecode/PredictedType.cpp:
+ (JSC):
+ (JSC::predictionToString):
+ * bytecode/PredictedType.h:
+ (JSC):
+ * bytecode/ValueRecovery.h:
+ (ValueRecovery):
+ (JSC::ValueRecovery::dump):
+ * bytecompiler/BytecodeGenerator.cpp:
+ (JSC):
+ (JSC::BytecodeGenerator::setDumpsGeneratedCode):
+ (JSC::BytecodeGenerator::dumpsGeneratedCode):
+ (JSC::BytecodeGenerator::generate):
+ * dfg/DFGAbstractValue.h:
+ (StructureAbstractValue):
+ (JSC::DFG::StructureAbstractValue::dump):
+ (AbstractValue):
+ (JSC::DFG::AbstractValue::dump):
+ * dfg/DFGAssemblyHelpers.h:
+ (DFG):
+ (AssemblyHelpers):
+ (JSC::DFG::AssemblyHelpers::debugCall):
+ * dfg/DFGFPRInfo.h:
+ (FPRInfo):
+ (JSC::DFG::FPRInfo::debugName):
+ * dfg/DFGGPRInfo.h:
+ (GPRInfo):
+ (JSC::DFG::GPRInfo::debugName):
+ * dfg/DFGGraph.cpp:
+ (DFG):
+ * dfg/DFGGraph.h:
+ (Graph):
+ * dfg/DFGNode.h:
+ (DFG):
+ (JSC::DFG::arithNodeFlagsAsString):
+ (Node):
+ (JSC::DFG::Node::hasIdentifier):
+ (JSC::DFG::Node::dumpChildren):
+ * dfg/DFGOSRExit.cpp:
+ (DFG):
+ (JSC::DFG::OSRExit::dump):
+ * dfg/DFGOSRExit.h:
+ (OSRExit):
+ * runtime/JSValue.cpp:
+ (JSC):
+ (JSC::JSValue::description):
+ * runtime/JSValue.h:
+ (JSValue):
+ * wtf/BitVector.cpp:
+ (WTF):
+ (WTF::BitVector::dump):
+ * wtf/BitVector.h:
+ (BitVector):
+
+2012-02-02 Oliver Hunt <oliver@apple.com>
+
+ Getters and setters cause line numbers in errors/console.log to be offset for the whole file
+ https://bugs.webkit.org/show_bug.cgi?id=77675
+
+ Reviewed by Timothy Hatcher.
+
+ Our default literal parsing logic doesn't handle the extra work required for
+ getters and setters. When it encounters one, it rolls back the lexer and
+ then switches to a more complete parsing function. Unfortunately it was only
+ winding back the character position, and was ignoring the line number and
+ other lexer data. This led to every getter and setter causing the line number
+ to be incorrectly incremented leading to increasingly incorrect numbers for
+ the rest of the file.
+
+ * parser/Parser.cpp:
+ (JSC::::parseObjectLiteral):
+
+2012-02-02 Andy Wingo <wingo@igalia.com>
+
+ Fix type punning warning in HashTable.h debug builds
+ https://bugs.webkit.org/show_bug.cgi?id=77422
+
+ Reviewed by Gavin Barraclough.
+
+ * wtf/HashTable.h (WTF::HashTable::checkKey): Fix type punning
+ warning appearing in debug builds with gcc-4.6.2 on GNU/Linux.
+
2012-02-01 Michael Saboff <msaboff@apple.com>
Yarr crash with regexp replace
diff --git a/Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig b/Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig
index 3846b27bf..6447eb7ee 100644
--- a/Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig
+++ b/Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig
@@ -37,6 +37,8 @@ ENABLE_BLOB_macosx = ENABLE_BLOB;
ENABLE_CLIENT_BASED_GEOLOCATION = $(ENABLE_CLIENT_BASED_GEOLOCATION_$(REAL_PLATFORM_NAME));
ENABLE_CLIENT_BASED_GEOLOCATION_macosx = ENABLE_CLIENT_BASED_GEOLOCATION;
+ENABLE_DASHBOARD_SUPPORT = ENABLE_DASHBOARD_SUPPORT;
+
ENABLE_DATALIST = $(ENABLE_DATALIST_$(REAL_PLATFORM_NAME));
ENABLE_DATALIST_macosx = ENABLE_DATALIST;
@@ -123,4 +125,4 @@ ENABLE_WEB_TIMING = ;
ENABLE_WORKERS = ENABLE_WORKERS;
ENABLE_XSLT = ENABLE_XSLT;
-FEATURE_DEFINES = $(ENABLE_3D_RENDERING) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ANIMATION_API) $(ENABLE_BLOB) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_CSS_FILTERS) $(ENABLE_CSS_GRID_LAYOUT) $(ENABLE_CSS_SHADERS) $(ENABLE_DATALIST) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_FILE_SYSTEM) $(ENABLE_FILTERS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_COLOR) $(ENABLE_INPUT_SPEECH) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_LINK_PREFETCH) $(ENABLE_MATHML) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_METER_TAG) $(ENABLE_MUTATION_OBSERVERS) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAGE_VISIBILITY_API) $(ENABLE_PROGRESS_TAG) $(ENABLE_QUOTA) $(ENABLE_REGISTER_PROTOCOL_HANDLER) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_SHADOW_DOM) $(ENABLE_SHARED_WORKERS) $(ENABLE_SQL_DATABASE) $(ENABLE_STYLE_SCOPED) $(ENABLE_SVG) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_TEXT_NOTIFICATIONS_ONLY) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_WEBGL) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WORKERS) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_3D_RENDERING) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ANIMATION_API) $(ENABLE_BLOB) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_CSS_FILTERS) $(ENABLE_CSS_GRID_LAYOUT) $(ENABLE_CSS_SHADERS) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_FILE_SYSTEM) $(ENABLE_FILTERS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_COLOR) $(ENABLE_INPUT_SPEECH) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_LINK_PREFETCH) $(ENABLE_MATHML) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_METER_TAG) $(ENABLE_MUTATION_OBSERVERS) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAGE_VISIBILITY_API) $(ENABLE_PROGRESS_TAG) $(ENABLE_QUOTA) $(ENABLE_REGISTER_PROTOCOL_HANDLER) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_SHADOW_DOM) $(ENABLE_SHARED_WORKERS) $(ENABLE_SQL_DATABASE) $(ENABLE_STYLE_SCOPED) $(ENABLE_SVG) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_TEXT_NOTIFICATIONS_ONLY) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_WEBGL) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WORKERS) $(ENABLE_XSLT);
diff --git a/Source/JavaScriptCore/Configurations/JavaScriptCore.xcconfig b/Source/JavaScriptCore/Configurations/JavaScriptCore.xcconfig
index 827749871..d88b46e4e 100644
--- a/Source/JavaScriptCore/Configurations/JavaScriptCore.xcconfig
+++ b/Source/JavaScriptCore/Configurations/JavaScriptCore.xcconfig
@@ -33,8 +33,9 @@ JSVALUE_MODEL_ppc = 32_64;
JSVALUE_MODEL_ppc64 = 64;
JSVALUE_MODEL_x86_64 = 64;
-EXPORTED_SYMBOLS_FILE = $(BUILT_PRODUCTS_DIR)/DerivedSources/JavaScriptCore/JavaScriptCore.JSVALUE$(JSVALUE_MODEL).exp;
-OTHER_LDFLAGS_BASE = -lobjc -Wl,-Y,3;
+// Prevent C++ standard library operator new, delete and their related exception types from being exported as weak symbols.
+OTHER_LDFLAGS_HIDE_SYMBOLS = -Wl,-unexported_symbol -Wl,__ZTISt9bad_alloc -Wl,-unexported_symbol -Wl,__ZTISt9exception -Wl,-unexported_symbol -Wl,__ZTSSt9bad_alloc -Wl,-unexported_symbol -Wl,__ZTSSt9exception -Wl,-unexported_symbol -Wl,__ZdlPvS_ -Wl,-unexported_symbol -Wl,__ZnwmPv;
+OTHER_LDFLAGS_BASE = -lobjc -Wl,-Y,3 $(OTHER_LDFLAGS_HIDE_SYMBOLS);
OTHER_LDFLAGS = $(OTHER_LDFLAGS_$(REAL_PLATFORM_NAME));
OTHER_LDFLAGS_iphoneos = $(OTHER_LDFLAGS_BASE);
OTHER_LDFLAGS_iphonesimulator = $(OTHER_LDFLAGS_iphoneos);
@@ -43,6 +44,7 @@ OTHER_LDFLAGS_macosx_1070 = -Xlinker -objc_gc_compaction;
OTHER_LDFLAGS_macosx_1080 = $(OTHER_LDFLAGS_macosx_1070);
OTHER_LDFLAGS_macosx_1090 = $(OTHER_LDFLAGS_macosx_1070);
GCC_PREFIX_HEADER = JavaScriptCorePrefix.h;
+GCC_SYMBOLS_PRIVATE_EXTERN = YES;
HEADER_SEARCH_PATHS = "${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore" $(HEADER_SEARCH_PATHS);
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = $(JAVASCRIPTCORE_FRAMEWORKS_DIR);
diff --git a/Source/JavaScriptCore/Configurations/Version.xcconfig b/Source/JavaScriptCore/Configurations/Version.xcconfig
index 0510654ff..73fc62d56 100644
--- a/Source/JavaScriptCore/Configurations/Version.xcconfig
+++ b/Source/JavaScriptCore/Configurations/Version.xcconfig
@@ -22,7 +22,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
MAJOR_VERSION = 535;
-MINOR_VERSION = 19;
+MINOR_VERSION = 20;
TINY_VERSION = 0;
FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION);
diff --git a/Source/JavaScriptCore/DerivedSources.make b/Source/JavaScriptCore/DerivedSources.make
index 80af4b6d5..90e099d18 100644
--- a/Source/JavaScriptCore/DerivedSources.make
+++ b/Source/JavaScriptCore/DerivedSources.make
@@ -43,8 +43,6 @@ all : \
ErrorPrototype.lut.h \
HeaderDetection.h \
JSONObject.lut.h \
- JavaScriptCore.JSVALUE32_64.exp \
- JavaScriptCore.JSVALUE64.exp \
JSGlobalObject.lut.h \
KeywordLookup.h \
Lexer.lut.h \
@@ -80,15 +78,6 @@ RegExpJitTables.h: create_regex_tables
KeywordLookup.h: KeywordLookupGenerator.py Keywords.table
python $^ > $@
-# export files
-
-JavaScriptCore.JSVALUE32_64.exp: JavaScriptCore.exp JavaScriptCore.JSVALUE32_64only.exp
- cat $^ > $@
-
-JavaScriptCore.JSVALUE64.exp: JavaScriptCore.exp JavaScriptCore.JSVALUE64only.exp
- cat $^ > $@
-
-
# header detection
ifeq ($(OS),MACOS)
diff --git a/Source/JavaScriptCore/GNUmakefile.list.am b/Source/JavaScriptCore/GNUmakefile.list.am
index de5338dd4..79c68326d 100644
--- a/Source/JavaScriptCore/GNUmakefile.list.am
+++ b/Source/JavaScriptCore/GNUmakefile.list.am
@@ -154,6 +154,8 @@ javascriptcore_sources += \
Source/JavaScriptCore/dfg/DFGJITCompiler.cpp \
Source/JavaScriptCore/dfg/DFGJITCompiler.h \
Source/JavaScriptCore/dfg/DFGNode.h \
+ Source/JavaScriptCore/dfg/DFGNodeReferenceBlob.h \
+ Source/JavaScriptCore/dfg/DFGNodeUse.h \
Source/JavaScriptCore/dfg/DFGOperands.h \
Source/JavaScriptCore/dfg/DFGOperations.cpp \
Source/JavaScriptCore/dfg/DFGOperations.h \
@@ -205,6 +207,8 @@ javascriptcore_sources += \
Source/JavaScriptCore/heap/MarkStack.cpp \
Source/JavaScriptCore/heap/MarkStack.h \
Source/JavaScriptCore/heap/HeapRootVisitor.h \
+ Source/JavaScriptCore/heap/MarkedAllocator.cpp \
+ Source/JavaScriptCore/heap/MarkedAllocator.h \
Source/JavaScriptCore/heap/MarkedBlock.cpp \
Source/JavaScriptCore/heap/MarkedBlock.h \
Source/JavaScriptCore/heap/MarkedBlockSet.h \
@@ -756,7 +760,10 @@ javascriptcore_sources += \
if TARGET_WIN32
javascriptcore_sources += \
- Source/JavaScriptCore/wtf/OSAllocatorWin.cpp
+ Source/JavaScriptCore/wtf/OSAllocatorWin.cpp \
+ Source/JavaScriptCore/wtf/ThreadFunctionInvocation.h \
+ Source/JavaScriptCore/wtf/ThreadingWin.cpp \
+ Source/JavaScriptCore/wtf/ThreadSpecificWin.cpp
else
javascriptcore_sources += \
Source/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp \
diff --git a/Source/JavaScriptCore/JavaScriptCore.JSVALUE32_64only.exp b/Source/JavaScriptCore/JavaScriptCore.JSVALUE32_64only.exp
deleted file mode 100644
index 44680ce98..000000000
--- a/Source/JavaScriptCore/JavaScriptCore.JSVALUE32_64only.exp
+++ /dev/null
@@ -1 +0,0 @@
-__ZN3JSC10JSFunction6createEPNS_9ExecStateEPNS_14JSGlobalObjectEiRKNS_10IdentifierEPFxS2_ES9_
diff --git a/Source/JavaScriptCore/JavaScriptCore.JSVALUE64only.exp b/Source/JavaScriptCore/JavaScriptCore.JSVALUE64only.exp
deleted file mode 100644
index aad7228ce..000000000
--- a/Source/JavaScriptCore/JavaScriptCore.JSVALUE64only.exp
+++ /dev/null
@@ -1 +0,0 @@
-__ZN3JSC10JSFunction6createEPNS_9ExecStateEPNS_14JSGlobalObjectEiRKNS_10IdentifierEPFPvS2_ESA_
diff --git a/Source/JavaScriptCore/JavaScriptCore.exp b/Source/JavaScriptCore/JavaScriptCore.exp
deleted file mode 100644
index 51032d742..000000000
--- a/Source/JavaScriptCore/JavaScriptCore.exp
+++ /dev/null
@@ -1,634 +0,0 @@
-_JSCheckScriptSyntax
-_JSClassCreate
-_JSClassRelease
-_JSClassRetain
-_JSContextCreateBacktrace
-_JSContextGetGlobalContext
-_JSContextGetGlobalObject
-_JSContextGetGroup
-_JSContextGroupCreate
-_JSContextGroupRelease
-_JSContextGroupRetain
-_JSEndProfiling
-_JSEvaluateScript
-_JSGarbageCollect
-_JSGlobalContextCreate
-_JSGlobalContextCreateInGroup
-_JSGlobalContextRelease
-_JSGlobalContextRetain
-_JSObjectCallAsConstructor
-_JSObjectCallAsFunction
-_JSObjectCopyPropertyNames
-_JSObjectDeletePrivateProperty
-_JSObjectDeleteProperty
-_JSObjectGetPrivate
-_JSObjectGetPrivateProperty
-_JSObjectGetProperty
-_JSObjectGetPropertyAtIndex
-_JSObjectGetPrototype
-_JSObjectHasProperty
-_JSObjectIsConstructor
-_JSObjectIsFunction
-_JSObjectMake
-_JSObjectMakeArray
-_JSObjectMakeConstructor
-_JSObjectMakeDate
-_JSObjectMakeError
-_JSObjectMakeFunction
-_JSObjectMakeFunctionWithCallback
-_JSObjectMakeRegExp
-_JSObjectSetPrivate
-_JSObjectSetPrivateProperty
-_JSObjectSetProperty
-_JSObjectSetPropertyAtIndex
-_JSObjectSetPrototype
-_JSPropertyNameAccumulatorAddName
-_JSPropertyNameArrayGetCount
-_JSPropertyNameArrayGetNameAtIndex
-_JSPropertyNameArrayRelease
-_JSPropertyNameArrayRetain
-_JSReportExtraMemoryCost
-_JSStartProfiling
-_JSStringCopyCFString
-_JSStringCreateWithCFString
-_JSStringCreateWithCharacters
-_JSStringCreateWithUTF8CString
-_JSStringGetCharactersPtr
-_JSStringGetLength
-_JSStringGetMaximumUTF8CStringSize
-_JSStringGetUTF8CString
-_JSStringIsEqual
-_JSStringIsEqualToUTF8CString
-_JSStringRelease
-_JSStringRetain
-_JSValueCreateJSONString
-_JSValueGetType
-_JSValueIsBoolean
-_JSValueIsEqual
-_JSValueIsInstanceOfConstructor
-_JSValueIsNull
-_JSValueIsNumber
-_JSValueIsObject
-_JSValueIsObjectOfClass
-_JSValueIsStrictEqual
-_JSValueIsString
-_JSValueIsUndefined
-_JSValueMakeBoolean
-_JSValueMakeFromJSONString
-_JSValueMakeNull
-_JSValueMakeNumber
-_JSValueMakeString
-_JSValueMakeUndefined
-_JSValueProtect
-_JSValueToBoolean
-_JSValueToNumber
-_JSValueToObject
-_JSValueToStringCopy
-_JSValueUnprotect
-_JSWeakObjectMapClear
-_JSWeakObjectMapCreate
-_JSWeakObjectMapGet
-_JSWeakObjectMapRemove
-_JSWeakObjectMapSet
-_WTFGetBacktrace
-_WTFInvokeCrashHook
-_WTFLog
-_WTFLogVerbose
-_WTFReportArgumentAssertionFailure
-_WTFReportAssertionFailure
-_WTFReportAssertionFailureWithMessage
-_WTFReportBacktrace
-_WTFReportError
-_WTFReportFatalError
-_WTFSetCrashHook
-__ZN14OpaqueJSString6createERKN3JSC7UStringE
-__ZN3JSC10HandleHeap12writeBarrierEPNS_7JSValueERKS1_
-__ZN3JSC10HandleHeap4growEv
-__ZN3JSC10Identifier11addSlowCaseEPNS_12JSGlobalDataEPN3WTF10StringImplE
-__ZN3JSC10Identifier11addSlowCaseEPNS_9ExecStateEPN3WTF10StringImplE
-__ZN3JSC10Identifier27checkCurrentIdentifierTableEPNS_12JSGlobalDataE
-__ZN3JSC10Identifier27checkCurrentIdentifierTableEPNS_9ExecStateE
-__ZN3JSC10Identifier3addEPNS_9ExecStateEPKc
-__ZN3JSC10Identifier4fromEPNS_9ExecStateEi
-__ZN3JSC10Identifier4fromEPNS_9ExecStateEj
-__ZN3JSC10Identifier8toUInt32ERKNS_7UStringERb
-__ZN3JSC10JSFunction11displayNameEPNS_9ExecStateE
-__ZN3JSC10JSFunction21calculatedDisplayNameEPNS_9ExecStateE
-__ZN3JSC10JSFunction4nameEPNS_9ExecStateE
-__ZN3JSC10JSFunction6s_infoE
-__ZN3JSC10JSFunctionC1EPNS_9ExecStateEPNS_14JSGlobalObjectEPNS_9StructureE
-__ZN3JSC10throwErrorEPNS_9ExecStateENS_7JSValueE
-__ZN3JSC10throwErrorEPNS_9ExecStateEPNS_8JSObjectE
-__ZN3JSC11JSByteArray10putByIndexEPNS_6JSCellEPNS_9ExecStateEjNS_7JSValueE
-__ZN3JSC11JSByteArray15createStructureERNS_12JSGlobalDataEPNS_14JSGlobalObjectENS_7JSValueEPKNS_9ClassInfoE
-__ZN3JSC11JSByteArray18getOwnPropertySlotEPNS_6JSCellEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE
-__ZN3JSC11JSByteArray19getOwnPropertyNamesEPNS_8JSObjectEPNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE
-__ZN3JSC11JSByteArray24getOwnPropertyDescriptorEPNS_8JSObjectEPNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorE
-__ZN3JSC11JSByteArray25getOwnPropertySlotByIndexEPNS_6JSCellEPNS_9ExecStateEjRNS_12PropertySlotE
-__ZN3JSC11JSByteArray3putEPNS_6JSCellEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueERNS_15PutPropertySlotE
-__ZN3JSC11JSByteArray6s_infoE
-__ZN3JSC11JSByteArray7destroyEPNS_6JSCellE
-__ZN3JSC11JSByteArrayC1EPNS_9ExecStateEPNS_9StructureEPN3WTF9ByteArrayE
-__ZN3JSC11MarkedSpace16allocateSlowCaseERNS0_9SizeClassE
-__ZN3JSC11ParserArena5resetEv
-__ZN3JSC11checkSyntaxEPNS_9ExecStateERKNS_10SourceCodeEPNS_7JSValueE
-__ZN3JSC11createErrorEPNS_9ExecStateERKNS_7UStringE
-__ZN3JSC11regExpFlagsERKNS_7UStringE
-__ZN3JSC12DateInstance14finishCreationERNS_12JSGlobalDataEd
-__ZN3JSC12DateInstance6s_infoE
-__ZN3JSC12DateInstanceC1EPNS_9ExecStateEPNS_9StructureE
-__ZN3JSC12JSGlobalData10ClientDataD2Ev
-__ZN3JSC12JSGlobalData12createLeakedENS_15ThreadStackTypeENS_8HeapSizeE
-__ZN3JSC12JSGlobalData12stopSamplingEv
-__ZN3JSC12JSGlobalData13startSamplingEv
-__ZN3JSC12JSGlobalData14dumpSampleDataEPNS_9ExecStateE
-__ZN3JSC12JSGlobalData14resetDateCacheEv
-__ZN3JSC12JSGlobalData14sharedInstanceEv
-__ZN3JSC12JSGlobalData15dumpRegExpTraceEv
-__ZN3JSC12JSGlobalData22clearBuiltinStructuresEv
-__ZN3JSC12JSGlobalData23releaseExecutableMemoryEv
-__ZN3JSC12JSGlobalData6createENS_15ThreadStackTypeENS_8HeapSizeE
-__ZN3JSC12JSGlobalDataD1Ev
-__ZN3JSC12JSGlobalThis13visitChildrenEPNS_6JSCellERNS_11SlotVisitorE
-__ZN3JSC12JSGlobalThis6s_infoE
-__ZN3JSC12RegExpObject14finishCreationEPNS_14JSGlobalObjectE
-__ZN3JSC12RegExpObject6s_infoE
-__ZN3JSC12RegExpObjectC1EPNS_14JSGlobalObjectEPNS_9StructureEPNS_6RegExpE
-__ZN3JSC12SamplingTool5setupEv
-__ZN3JSC12SmallStrings17createEmptyStringEPNS_12JSGlobalDataE
-__ZN3JSC12SmallStrings24singleCharacterStringRepEh
-__ZN3JSC12SmallStrings27createSingleCharacterStringEPNS_12JSGlobalDataEh
-__ZN3JSC12StringObject14finishCreationERNS_12JSGlobalDataEPNS_8JSStringE
-__ZN3JSC12StringObject6s_infoE
-__ZN3JSC12StringObjectC2ERNS_12JSGlobalDataEPNS_9StructureE
-__ZN3JSC13JSFinalObject6s_infoE
-__ZN3JSC13SamplingFlags4stopEv
-__ZN3JSC13SamplingFlags5startEv
-__ZN3JSC13SamplingFlags7s_flagsE
-__ZN3JSC13StatementNode6setLocEii
-__ZN3JSC14ExecutableBase6s_infoE
-__ZN3JSC14JSGlobalObject10globalExecEv
-__ZN3JSC14JSGlobalObject12defineGetterEPNS_8JSObjectEPNS_9ExecStateERKNS_10IdentifierES2_j
-__ZN3JSC14JSGlobalObject12defineSetterEPNS_8JSObjectEPNS_9ExecStateERKNS_10IdentifierES2_j
-__ZN3JSC14JSGlobalObject13clearRareDataEPNS_6JSCellE
-__ZN3JSC14JSGlobalObject13visitChildrenEPNS_6JSCellERNS_11SlotVisitorE
-__ZN3JSC14JSGlobalObject16addStaticGlobalsEPNS0_18GlobalPropertyInfoEi
-__ZN3JSC14JSGlobalObject16putDirectVirtualEPNS_8JSObjectEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueEj
-__ZN3JSC14JSGlobalObject18getOwnPropertySlotEPNS_6JSCellEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE
-__ZN3JSC14JSGlobalObject24getOwnPropertyDescriptorEPNS_8JSObjectEPNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorE
-__ZN3JSC14JSGlobalObject25s_globalObjectMethodTableE
-__ZN3JSC14JSGlobalObject3putEPNS_6JSCellEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueERNS_15PutPropertySlotE
-__ZN3JSC14JSGlobalObject4initEPNS_8JSObjectE
-__ZN3JSC14JSGlobalObject6s_infoE
-__ZN3JSC14JSGlobalObject7destroyEPNS_6JSCellE
-__ZN3JSC14JSGlobalObjectD2Ev
-__ZN3JSC14MachineThreads16addCurrentThreadEv
-__ZN3JSC14MarkStackArray6expandEv
-__ZN3JSC14SamplingRegion4dumpEv
-__ZN3JSC14SamplingThread4stopEv
-__ZN3JSC14SamplingThread5startEj
-__ZN3JSC14ScopeChainNode6s_infoE
-__ZN3JSC14TimeoutChecker10didTimeOutEPNS_9ExecStateE
-__ZN3JSC14TimeoutChecker5resetEv
-__ZN3JSC14VTableSpectrum5countEPNS_6JSCellE
-__ZN3JSC14throwTypeErrorEPNS_9ExecStateE
-__ZN3JSC14throwTypeErrorEPNS_9ExecStateERKNS_7UStringE
-__ZN3JSC15WeakHandleOwner26isReachableFromOpaqueRootsENS_6HandleINS_7UnknownEEEPvRNS_11SlotVisitorE
-__ZN3JSC15WeakHandleOwner8finalizeENS_6HandleINS_7UnknownEEEPv
-__ZN3JSC15WeakHandleOwnerD2Ev
-__ZN3JSC15createTypeErrorEPNS_9ExecStateERKNS_7UStringE
-__ZN3JSC16InternalFunction14finishCreationERNS_12JSGlobalDataERKNS_10IdentifierE
-__ZN3JSC16InternalFunction4nameEPNS_9ExecStateE
-__ZN3JSC16InternalFunction6s_infoE
-__ZN3JSC16InternalFunctionC2EPNS_14JSGlobalObjectEPNS_9StructureE
-__ZN3JSC16JSNonFinalObject7destroyEPNS_6JSCellE
-__ZN3JSC16JSVariableObject14deletePropertyEPNS_6JSCellEPNS_9ExecStateERKNS_10IdentifierE
-__ZN3JSC16JSVariableObject14symbolTableGetERKNS_10IdentifierERNS_18PropertyDescriptorE
-__ZN3JSC16JSVariableObject19getOwnPropertyNamesEPNS_8JSObjectEPNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE
-__ZN3JSC16JSVariableObject7destroyEPNS_6JSCellE
-__ZN3JSC16createRangeErrorEPNS_9ExecStateERKNS_7UStringE
-__ZN3JSC16slowValidateCellEPNS_14JSGlobalObjectE
-__ZN3JSC16slowValidateCellEPNS_6JSCellE
-__ZN3JSC16throwSyntaxErrorEPNS_9ExecStateE
-__ZN3JSC17BytecodeGenerator21setDumpsGeneratedCodeEb
-__ZN3JSC17JSAPIValueWrapper6s_infoE
-__ZN3JSC17PropertyNameArray3addEPN3WTF10StringImplE
-__ZN3JSC17createSyntaxErrorEPNS_9ExecStateERKNS_7UStringE
-__ZN3JSC18DebuggerActivation14finishCreationERNS_12JSGlobalDataEPNS_8JSObjectE
-__ZN3JSC18DebuggerActivation6s_infoE
-__ZN3JSC18DebuggerActivationC1ERNS_12JSGlobalDataE
-__ZN3JSC18PropertyDescriptor11setWritableEb
-__ZN3JSC18PropertyDescriptor12setUndefinedEv
-__ZN3JSC18PropertyDescriptor13setDescriptorENS_7JSValueEj
-__ZN3JSC18PropertyDescriptor13setEnumerableEb
-__ZN3JSC18PropertyDescriptor15setConfigurableEb
-__ZN3JSC18PropertyDescriptor17defaultAttributesE
-__ZN3JSC18PropertyDescriptor9setGetterENS_7JSValueE
-__ZN3JSC18PropertyDescriptor9setSetterENS_7JSValueE
-__ZN3JSC19SourceProviderCache5clearEv
-__ZN3JSC19SourceProviderCacheD1Ev
-__ZN3JSC19initializeThreadingEv
-__ZN3JSC20MarkedArgumentBuffer10slowAppendENS_7JSValueE
-__ZN3JSC20WriteBarrierCounters22usesWithBarrierFromCppE
-__ZN3JSC20WriteBarrierCounters25usesWithoutBarrierFromCppE
-__ZN3JSC20createReferenceErrorEPNS_9ExecStateERKNS_7UStringE
-__ZN3JSC22globalMemoryStatisticsEv
-__ZN3JSC22objectConstructorTableE
-__ZN3JSC23AbstractSamplingCounter30s_abstractSamplingCounterChainE
-__ZN3JSC23AbstractSamplingCounter4dumpEv
-__ZN3JSC23objectProtoFuncToStringEPNS_9ExecStateE
-__ZN3JSC23setUpStaticFunctionSlotEPNS_9ExecStateEPKNS_9HashEntryEPNS_8JSObjectERKNS_10IdentifierERNS_12PropertySlotE
-__ZN3JSC24DynamicGlobalObjectScopeC1ERNS_12JSGlobalDataEPNS_14JSGlobalObjectE
-__ZN3JSC24TerminatedExecutionError6s_infoE
-__ZN3JSC24createStackOverflowErrorEPNS_9ExecStateE
-__ZN3JSC24getCalculatedDisplayNameEPNS_9ExecStateEPNS_8JSObjectE
-__ZN3JSC25evaluateInGlobalCallFrameERKNS_7UStringERNS_7JSValueEPNS_14JSGlobalObjectE
-__ZN3JSC29callHostFunctionAsConstructorEPNS_9ExecStateE
-__ZN3JSC30isTerminatedExecutionExceptionENS_7JSValueE
-__ZN3JSC35createInterruptedExecutionExceptionEPNS_12JSGlobalDataE
-__ZN3JSC36StrictModeReadonlyPropertyWriteErrorE
-__ZN3JSC41constructFunctionSkippingEvalEnabledCheckEPNS_9ExecStateEPNS_14JSGlobalObjectERKNS_7ArgListERKNS_10IdentifierERKNS_7UStringERKN3WTF12TextPositionE
-__ZN3JSC4Heap11objectCountEv
-__ZN3JSC4Heap12addFinalizerEPNS_6JSCellEPFvS2_E
-__ZN3JSC4Heap16activityCallbackEv
-__ZN3JSC4Heap16objectTypeCountsEv
-__ZN3JSC4Heap17collectAllGarbageEv
-__ZN3JSC4Heap17globalObjectCountEv
-__ZN3JSC4Heap17isValidAllocationEm
-__ZN3JSC4Heap19setActivityCallbackEN3WTF10PassOwnPtrINS_18GCActivityCallbackEEE
-__ZN3JSC4Heap20protectedObjectCountEv
-__ZN3JSC4Heap25protectedObjectTypeCountsEv
-__ZN3JSC4Heap26protectedGlobalObjectCountEv
-__ZN3JSC4Heap29reportExtraMemoryCostSlowCaseEm
-__ZN3JSC4Heap4sizeEv
-__ZN3JSC4Heap7destroyEv
-__ZN3JSC4Heap7protectENS_7JSValueE
-__ZN3JSC4Heap8capacityEv
-__ZN3JSC4Heap9unprotectENS_7JSValueE
-__ZN3JSC4Yarr11YarrPatternC1ERKNS_7UStringEbbPPKc
-__ZN3JSC4Yarr11byteCompileERNS0_11YarrPatternEPN3WTF20BumpPointerAllocatorE
-__ZN3JSC4Yarr9interpretEPNS0_15BytecodePatternERKNS_7UStringEjjPi
-__ZN3JSC4callEPNS_9ExecStateENS_7JSValueENS_8CallTypeERKNS_8CallDataES2_RKNS_7ArgListE
-__ZN3JSC6JSCell11getCallDataEPS0_RNS_8CallDataE
-__ZN3JSC6JSCell16getConstructDataEPS0_RNS_13ConstructDataE
-__ZN3JSC6JSCell7destroyEPS0_
-__ZN3JSC6JSCell9getObjectEv
-__ZN3JSC6JSLock12DropAllLocksC1ENS_14JSLockBehaviorE
-__ZN3JSC6JSLock12DropAllLocksC1EPNS_9ExecStateE
-__ZN3JSC6JSLock12DropAllLocksD1Ev
-__ZN3JSC6JSLock26currentThreadIsHoldingLockEv
-__ZN3JSC6JSLock4lockENS_14JSLockBehaviorE
-__ZN3JSC6JSLock6unlockENS_14JSLockBehaviorE
-__ZN3JSC6JSLock9lockCountEv
-__ZN3JSC6JSLockC1EPNS_9ExecStateE
-__ZN3JSC6RegExp5matchERNS_12JSGlobalDataERKNS_7UStringEjPN3WTF6VectorIiLm32EEE
-__ZN3JSC6RegExp6createERNS_12JSGlobalDataERKNS_7UStringENS_11RegExpFlagsE
-__ZN3JSC7JSArray13visitChildrenEPNS_6JSCellERNS_11SlotVisitorE
-__ZN3JSC7JSArray14finishCreationERNS_12JSGlobalDataEj
-__ZN3JSC7JSArray15setSubclassDataEPv
-__ZN3JSC7JSArray17defineOwnPropertyEPNS_8JSObjectEPNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorEb
-__ZN3JSC7JSArray25getOwnPropertySlotByIndexEPNS_6JSCellEPNS_9ExecStateEjRNS_12PropertySlotE
-__ZN3JSC7JSArray30tryFinishCreationUninitializedERNS_12JSGlobalDataEj
-__ZN3JSC7JSArray6s_infoE
-__ZN3JSC7JSArrayC1ERNS_12JSGlobalDataEPNS_9StructureE
-__ZN3JSC7JSArrayC2ERNS_12JSGlobalDataEPNS_9StructureE
-__ZN3JSC7JSValue13isValidCalleeEv
-__ZN3JSC7Options17numberOfGCMarkersE
-__ZN3JSC7Options24opaqueRootMergeThresholdE
-__ZN3JSC7Profile10restoreAllEv
-__ZN3JSC7Profile5focusEPKNS_11ProfileNodeE
-__ZN3JSC7Profile7excludeEPKNS_11ProfileNodeE
-__ZN3JSC7Profile7forEachEMNS_11ProfileNodeEFvvE
-__ZN3JSC7UString6numberEd
-__ZN3JSC7UString6numberEi
-__ZN3JSC7UString6numberEj
-__ZN3JSC7UString6numberEl
-__ZN3JSC7UStringC1EPKc
-__ZN3JSC7UStringC1EPKcj
-__ZN3JSC7UStringC1EPKt
-__ZN3JSC7UStringC1EPKtj
-__ZN3JSC7toInt32Ed
-__ZN3JSC8Debugger23recompileAllJSFunctionsEPNS_12JSGlobalDataE
-__ZN3JSC8Debugger6attachEPNS_14JSGlobalObjectE
-__ZN3JSC8Debugger6detachEPNS_14JSGlobalObjectE
-__ZN3JSC8DebuggerD2Ev
-__ZN3JSC8JSObject10putByIndexEPNS_6JSCellEPNS_9ExecStateEjNS_7JSValueE
-__ZN3JSC8JSObject11hasInstanceEPS0_PNS_9ExecStateENS_7JSValueES4_
-__ZN3JSC8JSObject12defaultValueEPKS0_PNS_9ExecStateENS_22PreferredPrimitiveTypeE
-__ZN3JSC8JSObject12defineGetterEPS0_PNS_9ExecStateERKNS_10IdentifierES1_j
-__ZN3JSC8JSObject12defineSetterEPS0_PNS_9ExecStateERKNS_10IdentifierES1_j
-__ZN3JSC8JSObject12lookupGetterEPNS_9ExecStateERKNS_10IdentifierE
-__ZN3JSC8JSObject12lookupSetterEPNS_9ExecStateERKNS_10IdentifierE
-__ZN3JSC8JSObject12toThisObjectEPNS_6JSCellEPNS_9ExecStateE
-__ZN3JSC8JSObject13visitChildrenEPNS_6JSCellERNS_11SlotVisitorE
-__ZN3JSC8JSObject14deletePropertyEPNS_6JSCellEPNS_9ExecStateERKNS_10IdentifierE
-__ZN3JSC8JSObject16getPropertyNamesEPS0_PNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE
-__ZN3JSC8JSObject16putDirectVirtualEPS0_PNS_9ExecStateERKNS_10IdentifierENS_7JSValueEj
-__ZN3JSC8JSObject17defineOwnPropertyEPS0_PNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorEb
-__ZN3JSC8JSObject17preventExtensionsERNS_12JSGlobalDataE
-__ZN3JSC8JSObject19getOwnPropertyNamesEPS0_PNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE
-__ZN3JSC8JSObject21deletePropertyByIndexEPNS_6JSCellEPNS_9ExecStateEj
-__ZN3JSC8JSObject21getPropertyDescriptorEPNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorE
-__ZN3JSC8JSObject22fillGetterPropertySlotERNS_12PropertySlotEPNS_16WriteBarrierBaseINS_7UnknownEEE
-__ZN3JSC8JSObject23allocatePropertyStorageERNS_12JSGlobalDataEmm
-__ZN3JSC8JSObject24getOwnPropertyDescriptorEPS0_PNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorE
-__ZN3JSC8JSObject25getOwnPropertySlotByIndexEPNS_6JSCellEPNS_9ExecStateEjRNS_12PropertySlotE
-__ZN3JSC8JSObject3putEPNS_6JSCellEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueERNS_15PutPropertySlotE
-__ZN3JSC8JSObject6s_infoE
-__ZN3JSC8JSObject7destroyEPNS_6JSCellE
-__ZN3JSC8JSObject9classNameEPKS0_
-__ZN3JSC8JSString6s_infoE
-__ZN3JSC8Profiler13stopProfilingEPNS_9ExecStateERKNS_7UStringE
-__ZN3JSC8Profiler14startProfilingEPNS_9ExecStateERKNS_7UStringE
-__ZN3JSC8Profiler8profilerEv
-__ZN3JSC8evaluateEPNS_9ExecStateEPNS_14ScopeChainNodeERKNS_10SourceCodeENS_7JSValueEPS7_
-__ZN3JSC9CodeBlockD1Ev
-__ZN3JSC9CodeBlockD2Ev
-__ZN3JSC9MarkStack16mergeOpaqueRootsEv
-__ZN3JSC9MarkStack8validateEPNS_6JSCellE
-__ZN3JSC9Structure21addPropertyTransitionERNS_12JSGlobalDataEPS0_RKNS_10IdentifierEjPNS_6JSCellERm
-__ZN3JSC9Structure22materializePropertyMapERNS_12JSGlobalDataE
-__ZN3JSC9Structure25changePrototypeTransitionERNS_12JSGlobalDataEPS0_NS_7JSValueE
-__ZN3JSC9Structure27despecifyDictionaryFunctionERNS_12JSGlobalDataERKNS_10IdentifierE
-__ZN3JSC9Structure27despecifyFunctionTransitionERNS_12JSGlobalDataEPS0_RKNS_10IdentifierE
-__ZN3JSC9Structure28addPropertyWithoutTransitionERNS_12JSGlobalDataERKNS_10IdentifierEjPNS_6JSCellE
-__ZN3JSC9Structure3getERNS_12JSGlobalDataEPN3WTF10StringImplERjRPNS_6JSCellE
-__ZN3JSC9Structure40addPropertyTransitionToExistingStructureEPS0_RKNS_10IdentifierEjPNS_6JSCellERm
-__ZN3JSC9Structure6s_infoE
-__ZN3JSC9StructureC1ERNS_12JSGlobalDataEPNS_14JSGlobalObjectENS_7JSValueERKNS_8TypeInfoEPKNS_9ClassInfoE
-__ZN3JSC9constructEPNS_9ExecStateENS_7JSValueENS_13ConstructTypeERKNS_13ConstructDataERKNS_7ArgListE
-__ZN3JSCeqERKNS_7UStringEPKc
-__ZN3JSCgtERKNS_7UStringES2_
-__ZN3JSCltERKNS_7UStringES2_
-__ZN3WTF10StringImpl11reverseFindEPS0_j
-__ZN3WTF10StringImpl11reverseFindEtj
-__ZN3WTF10StringImpl16findIgnoringCaseEPS0_j
-__ZN3WTF10StringImpl18simplifyWhiteSpaceEv
-__ZN3WTF10StringImpl19characterStartingAtEj
-__ZN3WTF10StringImpl19createUninitializedEjRPt
-__ZN3WTF10StringImpl22containsOnlyWhitespaceEv
-__ZN3WTF10StringImpl23defaultWritingDirectionEPb
-__ZN3WTF10StringImpl23reverseFindIgnoringCaseEPS0_j
-__ZN3WTF10StringImpl4fillEt
-__ZN3WTF10StringImpl4findEPFbtEj
-__ZN3WTF10StringImpl4findEPS0_j
-__ZN3WTF10StringImpl4findEtj
-__ZN3WTF10StringImpl5adoptERNS_12StringBufferItEE
-__ZN3WTF10StringImpl5emptyEv
-__ZN3WTF10StringImpl5lowerEv
-__ZN3WTF10StringImpl5toIntEPb
-__ZN3WTF10StringImpl5upperEv
-__ZN3WTF10StringImpl6createEPKh
-__ZN3WTF10StringImpl6createEPKtj
-__ZN3WTF10StringImpl7replaceEPS0_S1_
-__ZN3WTF10StringImpl7replaceEjjPS0_
-__ZN3WTF10StringImpl7replaceEtPS0_
-__ZN3WTF10StringImpl7replaceEtt
-__ZN3WTF10StringImpl8endsWithEPS0_b
-__ZN3WTF10StringImpl9substringEjj
-__ZN3WTF10StringImplD1Ev
-__ZN3WTF10fastCallocEmm
-__ZN3WTF10fastMallocEm
-__ZN3WTF10fastStrDupEPKc
-__ZN3WTF11OSAllocator16reserveAndCommitEmNS0_5UsageEbbb
-__ZN3WTF11OSAllocator18releaseDecommittedEPvm
-__ZN3WTF11commentAtomE
-__ZN3WTF11currentTimeEv
-__ZN3WTF11dtoaRoundDPEPcdiRbRiRj
-__ZN3WTF11dtoaRoundSFEPcdiRbRiRj
-__ZN3WTF11emptyStringEv
-__ZN3WTF11fastReallocEPvm
-__ZN3WTF12AtomicString11addSlowCaseEPNS_10StringImplE
-__ZN3WTF12AtomicString16fromUTF8InternalEPKcS2_
-__ZN3WTF12AtomicString3addEPKh
-__ZN3WTF12AtomicString3addEPKt
-__ZN3WTF12AtomicString3addEPKtj
-__ZN3WTF12AtomicString3addEPKtjj
-__ZN3WTF12AtomicString3addEPNS_10StringImplEjj
-__ZN3WTF12AtomicString4findEPKtjj
-__ZN3WTF12AtomicString4initEv
-__ZN3WTF12createThreadEPFPvS0_ES0_
-__ZN3WTF12createThreadEPFPvS0_ES0_PKc
-__ZN3WTF12detachThreadEj
-__ZN3WTF12isMainThreadEv
-__ZN3WTF12randomNumberEv
-__ZN3WTF13MetaAllocator17addFreshFreeSpaceEPvm
-__ZN3WTF13MetaAllocator17freeFreeSpaceNodeEPNS0_13FreeSpaceNodeE
-__ZN3WTF13MetaAllocator18debugFreeSpaceSizeEv
-__ZN3WTF13MetaAllocator8allocateEmPv
-__ZN3WTF13MetaAllocatorC2Em
-__ZN3WTF13StringBuilder11shrinkToFitEv
-__ZN3WTF13StringBuilder15reserveCapacityEj
-__ZN3WTF13StringBuilder6appendEPKhj
-__ZN3WTF13StringBuilder6appendEPKtj
-__ZN3WTF13StringBuilder6resizeEj
-__ZN3WTF13WTFThreadData10staticDataE
-__ZN3WTF13WTFThreadDataC1Ev
-__ZN3WTF13WTFThreadDataD1Ev
-__ZN3WTF13currentThreadEv
-__ZN3WTF13tryFastCallocEmm
-__ZN3WTF13tryFastMallocEm
-__ZN3WTF14fastMallocSizeEPKv
-__ZN3WTF14numberToStringEdPc
-__ZN3WTF14tryFastReallocEPvm
-__ZN3WTF15ArrayBufferView6neuterEv
-__ZN3WTF15ArrayBufferViewC2ENS_10PassRefPtrINS_11ArrayBufferEEEj
-__ZN3WTF15ArrayBufferViewD2Ev
-__ZN3WTF15ThreadCondition4waitERNS_5MutexE
-__ZN3WTF15ThreadCondition6signalEv
-__ZN3WTF15ThreadCondition9broadcastEv
-__ZN3WTF15ThreadCondition9timedWaitERNS_5MutexEd
-__ZN3WTF15ThreadConditionC1Ev
-__ZN3WTF15ThreadConditionD1Ev
-__ZN3WTF15charactersToIntEPKtmPb
-__ZN3WTF16callOnMainThreadEPFvPvES0_
-__ZN3WTF16callOnMainThreadERKNS_8FunctionIFvvEEE
-__ZN3WTF16codePointCompareEPKNS_10StringImplES2_
-__ZN3WTF16codePointCompareERKNS_6StringES2_
-__ZN3WTF16fastZeroedMallocEm
-__ZN3WTF17charactersToFloatEPKtmPbS2_
-__ZN3WTF17equalIgnoringCaseEPKtPKhj
-__ZN3WTF17equalIgnoringCaseEPNS_10StringImplEPKh
-__ZN3WTF17equalIgnoringCaseEPNS_10StringImplES1_
-__ZN3WTF18calculateDSTOffsetEdd
-__ZN3WTF18calculateUTCOffsetEv
-__ZN3WTF18charactersToDoubleEPKhmPbS2_
-__ZN3WTF18charactersToDoubleEPKtmPbS2_
-__ZN3WTF18dateToDaysFrom1970Eiii
-__ZN3WTF18monthFromDayInYearEib
-__ZN3WTF19MetaAllocatorHandle6shrinkEm
-__ZN3WTF19MetaAllocatorHandleD1Ev
-__ZN3WTF19initializeThreadingEv
-__ZN3WTF20equalIgnoringNullityEPNS_10StringImplES1_
-__ZN3WTF20fastMallocStatisticsEv
-__ZN3WTF20initializeMainThreadEv
-__ZN3WTF21RefCountedLeakCounter16suppressMessagesEPKc
-__ZN3WTF21RefCountedLeakCounter24cancelMessageSuppressionEPKc
-__ZN3WTF21RefCountedLeakCounter9decrementEv
-__ZN3WTF21RefCountedLeakCounter9incrementEv
-__ZN3WTF21RefCountedLeakCounterC1EPKc
-__ZN3WTF21RefCountedLeakCounterD1Ev
-__ZN3WTF21charactersToIntStrictEPKtmPbi
-__ZN3WTF22cancelCallOnMainThreadEPFvPvES0_
-__ZN3WTF22charactersToUIntStrictEPKtmPbi
-__ZN3WTF22isMainThreadOrGCThreadEv
-__ZN3WTF23callOnMainThreadAndWaitEPFvPvES0_
-__ZN3WTF23dayInMonthFromDayInYearEib
-__ZN3WTF23waitForThreadCompletionEjPPv
-__ZN3WTF27monotonicallyIncreasingTimeEv
-__ZN3WTF27releaseFastMallocFreeMemoryEv
-__ZN3WTF28setMainThreadCallbacksPausedEb
-__ZN3WTF29cryptographicallyRandomNumberEv
-__ZN3WTF29cryptographicallyRandomValuesEPvm
-__ZN3WTF36lockAtomicallyInitializedStaticMutexEv
-__ZN3WTF37parseDateFromNullTerminatedCharactersEPKc
-__ZN3WTF38unlockAtomicallyInitializedStaticMutexEv
-__ZN3WTF39initializeMainThreadToProcessMainThreadEv
-__ZN3WTF3MD58addBytesEPKhm
-__ZN3WTF3MD58checksumERNS_6VectorIhLm16EEE
-__ZN3WTF3MD5C1Ev
-__ZN3WTF4SHA111computeHashERNS_6VectorIhLm20EEE
-__ZN3WTF4SHA18addBytesEPKhm
-__ZN3WTF4SHA1C1Ev
-__ZN3WTF4dtoaEPcdRbRiRj
-__ZN3WTF5Mutex4lockEv
-__ZN3WTF5Mutex6unlockEv
-__ZN3WTF5Mutex7tryLockEv
-__ZN3WTF5MutexC1Ev
-__ZN3WTF5MutexD1Ev
-__ZN3WTF5equalEPKNS_10StringImplEPKh
-__ZN3WTF5equalEPKNS_10StringImplEPKhj
-__ZN3WTF5equalEPKNS_10StringImplEPKtj
-__ZN3WTF5equalEPKNS_10StringImplES2_
-__ZN3WTF5yieldEv
-__ZN3WTF6String26fromUTF8WithLatin1FallbackEPKhm
-__ZN3WTF6String29charactersWithNullTerminationEv
-__ZN3WTF6String6appendEPKtj
-__ZN3WTF6String6appendERKS0_
-__ZN3WTF6String6appendEh
-__ZN3WTF6String6appendEt
-__ZN3WTF6String6formatEPKcz
-__ZN3WTF6String6insertERKS0_j
-__ZN3WTF6String6numberEdjj
-__ZN3WTF6String6numberEi
-__ZN3WTF6String6numberEj
-__ZN3WTF6String6numberEl
-__ZN3WTF6String6numberEm
-__ZN3WTF6String6numberEt
-__ZN3WTF6String6numberEx
-__ZN3WTF6String6numberEy
-__ZN3WTF6String6removeEji
-__ZN3WTF6String8fromUTF8EPKh
-__ZN3WTF6String8fromUTF8EPKhm
-__ZN3WTF6String8truncateEj
-__ZN3WTF6StringC1EPKc
-__ZN3WTF6StringC1EPKcj
-__ZN3WTF6StringC1EPKt
-__ZN3WTF6StringC1EPKtj
-__ZN3WTF6strtodEPKcPPc
-__ZN3WTF7CString11mutableDataEv
-__ZN3WTF7CString16newUninitializedEmRPc
-__ZN3WTF7CStringC1EPKc
-__ZN3WTF7CStringC1EPKcm
-__ZN3WTF7Unicode18convertUTF16ToUTF8EPPKtS2_PPcS4_b
-__ZN3WTF7Unicode18convertUTF8ToUTF16EPPKcS2_PPtS4_b
-__ZN3WTF7xmlAtomE
-__ZN3WTF8Collator18setOrderLowerFirstEb
-__ZN3WTF8CollatorC1EPKc
-__ZN3WTF8CollatorD1Ev
-__ZN3WTF8Internal21fastMallocMatchFailedEPv
-__ZN3WTF8fastFreeEPv
-__ZN3WTF8msToYearEd
-__ZN3WTF8nullAtomE
-__ZN3WTF8pageSizeEv
-__ZN3WTF8starAtomE
-__ZN3WTF8textAtomE
-__ZN3WTF9ByteArray6createEm
-__ZN3WTF9dayInYearEdi
-__ZN3WTF9emptyAtomE
-__ZN3WTF9xmlnsAtomE
-__ZN3WTFeqERKNS_7CStringES2_
-__ZNK3JSC10JSFunction10sourceCodeEv
-__ZNK3JSC10JSFunction23isHostFunctionNonInlineEv
-__ZNK3JSC11Interpreter18retrieveLastCallerEPNS_9ExecStateERiRlRNS_7UStringERNS_7JSValueE
-__ZNK3JSC12PropertySlot14functionGetterEPNS_9ExecStateE
-__ZNK3JSC17DebuggerCallFrame10thisObjectEv
-__ZNK3JSC17DebuggerCallFrame12functionNameEv
-__ZNK3JSC17DebuggerCallFrame22calculatedFunctionNameEv
-__ZNK3JSC17DebuggerCallFrame4typeEv
-__ZNK3JSC17DebuggerCallFrame8evaluateERKNS_7UStringERNS_7JSValueE
-__ZNK3JSC18PropertyDescriptor10enumerableEv
-__ZNK3JSC18PropertyDescriptor12configurableEv
-__ZNK3JSC18PropertyDescriptor16isDataDescriptorEv
-__ZNK3JSC18PropertyDescriptor20isAccessorDescriptorEv
-__ZNK3JSC18PropertyDescriptor6getterEv
-__ZNK3JSC18PropertyDescriptor6setterEv
-__ZNK3JSC18PropertyDescriptor8writableEv
-__ZNK3JSC19SourceProviderCache8byteSizeEv
-__ZNK3JSC6JSCell11toPrimitiveEPNS_9ExecStateENS_22PreferredPrimitiveTypeE
-__ZNK3JSC6JSCell8toNumberEPNS_9ExecStateE
-__ZNK3JSC6JSCell8toObjectEPNS_9ExecStateEPNS_14JSGlobalObjectE
-__ZNK3JSC6JSCell9getStringEPNS_9ExecStateE
-__ZNK3JSC6JSCell9getStringEPNS_9ExecStateERNS_7UStringE
-__ZNK3JSC7ArgList8getSliceEiRS0_
-__ZNK3JSC7JSArray12subclassDataEv
-__ZNK3JSC7JSValue16toNumberSlowCaseEPNS_9ExecStateE
-__ZNK3JSC7JSValue16toObjectSlowCaseEPNS_9ExecStateEPNS_14JSGlobalObjectE
-__ZNK3JSC7JSValue16toStringSlowCaseEPNS_9ExecStateE
-__ZNK3JSC7JSValue19synthesizePrototypeEPNS_9ExecStateE
-__ZNK3JSC7JSValue20toThisObjectSlowCaseEPNS_9ExecStateE
-__ZNK3JSC7JSValue9toIntegerEPNS_9ExecStateE
-__ZNK3JSC7UString20substringSharingImplEjj
-__ZNK3JSC7UString4utf8Eb
-__ZNK3JSC7UString5asciiEv
-__ZNK3JSC8JSObject11hasPropertyEPNS_9ExecStateERKNS_10IdentifierE
-__ZNK3JSC8JSObject11hasPropertyEPNS_9ExecStateEj
-__ZNK3JSC8JSObject8toNumberEPNS_9ExecStateE
-__ZNK3JSC8JSObject8toStringEPNS_9ExecStateE
-__ZNK3JSC8JSObject9toBooleanEPNS_9ExecStateE
-__ZNK3JSC8JSString11resolveRopeEPNS_9ExecStateE
-__ZNK3JSC8JSString9toBooleanEPNS_9ExecStateE
-__ZNK3JSC9HashTable11createTableEPNS_12JSGlobalDataE
-__ZNK3JSC9HashTable11deleteTableEv
-__ZNK3WTF10StringImpl12hashSlowCaseEv
-__ZNK3WTF10StringImpl17getData16SlowCaseEv
-__ZNK3WTF10StringImpl19upconvertCharactersEjj
-__ZNK3WTF12AtomicString5lowerEv
-__ZNK3WTF13DecimalNumber15toStringDecimalEPtj
-__ZNK3WTF13DecimalNumber19toStringExponentialEPtj
-__ZNK3WTF13DecimalNumber28bufferLengthForStringDecimalEv
-__ZNK3WTF13DecimalNumber32bufferLengthForStringExponentialEv
-__ZNK3WTF13StringBuilder11reifyStringEv
-__ZNK3WTF13StringBuilder9canShrinkEv
-__ZNK3WTF6String11toIntStrictEPbi
-__ZNK3WTF6String12isolatedCopyEv
-__ZNK3WTF6String12toUIntStrictEPbi
-__ZNK3WTF6String13toInt64StrictEPbi
-__ZNK3WTF6String15stripWhiteSpaceEPFbtE
-__ZNK3WTF6String15stripWhiteSpaceEv
-__ZNK3WTF6String16removeCharactersEPFbtE
-__ZNK3WTF6String18simplifyWhiteSpaceEPFbtE
-__ZNK3WTF6String18simplifyWhiteSpaceEv
-__ZNK3WTF6String19characterStartingAtEj
-__ZNK3WTF6String4utf8Eb
-__ZNK3WTF6String5asciiEv
-__ZNK3WTF6String5lowerEv
-__ZNK3WTF6String5splitERKS0_RNS_6VectorIS0_Lm0EEE
-__ZNK3WTF6String5splitERKS0_bRNS_6VectorIS0_Lm0EEE
-__ZNK3WTF6String5splitEtRNS_6VectorIS0_Lm0EEE
-__ZNK3WTF6String5splitEtbRNS_6VectorIS0_Lm0EEE
-__ZNK3WTF6String5toIntEPb
-__ZNK3WTF6String5upperEv
-__ZNK3WTF6String6latin1Ev
-__ZNK3WTF6String6toUIntEPb
-__ZNK3WTF6String7toFloatEPbS1_
-__ZNK3WTF6String8foldCaseEv
-__ZNK3WTF6String8toDoubleEPbS1_
-__ZNK3WTF6String8toIntPtrEPb
-__ZNK3WTF6String8toUInt64EPb
-__ZNK3WTF6String9substringEjj
-__ZNK3WTF8Collator7collateEPKtmS2_m
-__ZTVN3JSC15WeakHandleOwnerE
-__ZTVN3JSC8DebuggerE
-_jscore_fastmalloc_introspection
-_kJSClassDefinitionEmpty
diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
index 93c9e7569..ad4c02634 100644
--- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
+++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
@@ -64,7 +64,7 @@ EXPORTS
?addSlowCase@Identifier@JSC@@CA?AV?$PassRefPtr@VStringImpl@WTF@@@WTF@@PAVJSGlobalData@2@PAVStringImpl@4@@Z
?addStaticGlobals@JSGlobalObject@JSC@@IAEXPAUGlobalPropertyInfo@12@H@Z
?allocatePropertyStorage@JSObject@JSC@@QAEXAAVJSGlobalData@2@II@Z
- ?allocateSlowCase@MarkedSpace@JSC@@AAEPAXAAUSizeClass@12@@Z
+ ?allocateSlowCase@MarkedAllocator@JSC@@AAEPAXXZ
?append@StringBuilder@WTF@@QAEXPBEI@Z
?append@StringBuilder@WTF@@QAEXPB_WI@Z
?ascii@UString@JSC@@QBE?AVCString@WTF@@XZ
@@ -135,11 +135,8 @@ EXPORTS
?decrement@RefCountedLeakCounter@WTF@@QAEXXZ
?defaultAttributes@PropertyDescriptor@JSC@@0IA
?defaultValue@JSObject@JSC@@SA?AVJSValue@2@PBV12@PAVExecState@2@W4PreferredPrimitiveType@2@@Z
- ?defineGetter@JSGlobalObject@JSC@@SAXPAVJSObject@2@PAVExecState@2@ABVIdentifier@2@0I@Z
- ?defineGetter@JSObject@JSC@@SAXPAV12@PAVExecState@2@ABVIdentifier@2@0I@Z
+ ?defineOwnProperty@JSGlobalObject@JSC@@SA_NPAVJSObject@2@PAVExecState@2@ABVIdentifier@2@AAVPropertyDescriptor@2@_N@Z
?defineOwnProperty@JSObject@JSC@@SA_NPAV12@PAVExecState@2@ABVIdentifier@2@AAVPropertyDescriptor@2@_N@Z
- ?defineSetter@JSGlobalObject@JSC@@SAXPAVJSObject@2@PAVExecState@2@ABVIdentifier@2@0I@Z
- ?defineSetter@JSObject@JSC@@SAXPAV12@PAVExecState@2@ABVIdentifier@2@0I@Z
?deleteOwnedPtr@WTF@@YAXPAUHBITMAP__@@@Z
?deleteOwnedPtr@WTF@@YAXPAUHBRUSH__@@@Z
?deleteOwnedPtr@WTF@@YAXPAUHDC__@@@Z
@@ -178,7 +175,7 @@ EXPORTS
?fastRealloc@WTF@@YAPAXPAXI@Z
?fastStrDup@WTF@@YAPADPBD@Z
?fastZeroedMalloc@WTF@@YAPAXI@Z
- ?fillGetterPropertySlot@JSObject@JSC@@QAEXAAVPropertySlot@2@PAV?$WriteBarrierBase@W4Unknown@JSC@@@2@@Z
+ ?fillGetterPropertySlot@JSObject@JSC@@AAEXAAVPropertySlot@2@PAV?$WriteBarrierBase@W4Unknown@JSC@@@2@@Z
?finalize@WeakHandleOwner@JSC@@UAEXV?$Handle@W4Unknown@JSC@@@2@PAX@Z
?finishCreation@DateInstance@JSC@@IAEXAAVJSGlobalData@2@N@Z
?finishCreation@InternalFunction@JSC@@IAEXAAVJSGlobalData@2@ABVIdentifier@2@@Z
@@ -283,6 +280,7 @@ EXPORTS
?reifyString@StringBuilder@WTF@@ABEXXZ
?releaseDecommitted@OSAllocator@WTF@@SAXPAXI@Z
?releaseExecutableMemory@JSGlobalData@JSC@@QAEXXZ
+ ?removeBlock@MarkedAllocator@JSC@@QAEXPAVMarkedBlock@2@@Z
?reportExtraMemoryCostSlowCase@Heap@JSC@@AAEXI@Z
?reserveAndCommit@OSAllocator@WTF@@SAPAXIW4Usage@12@_N11@Z
?reserveCapacity@StringBuilder@WTF@@QAEXI@Z
diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj
index fea820ddc..bee218833 100644
--- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj
+++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj
@@ -2066,6 +2066,14 @@
>
</File>
<File
+ RelativePath="..\..\heap\MarkedAllocator.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\heap\MarkedAllocator.h"
+ >
+ </File>
+ <File
RelativePath="..\..\heap\MarkedBlock.cpp"
>
</File>
diff --git a/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj b/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
index 9d8b3dd58..997b0bbf4 100644
--- a/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
+++ b/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
@@ -81,6 +81,8 @@
0F620178143FCD440068B77C /* DFGAbstractState.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F62016E143FCD2F0068B77C /* DFGAbstractState.h */; settings = {ATTRIBUTES = (Private, ); }; };
0F620179143FCD480068B77C /* DFGAbstractState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F62016D143FCD2F0068B77C /* DFGAbstractState.cpp */; };
0F636DA0142D27D700B2E66A /* PackedIntVector.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F636D9F142D27D200B2E66A /* PackedIntVector.h */; };
+ 0F66E16B14DF3F1600B7B2E4 /* DFGNodeReferenceBlob.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F66E16814DF3F1300B7B2E4 /* DFGNodeReferenceBlob.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 0F66E16C14DF3F1600B7B2E4 /* DFGNodeUse.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F66E16914DF3F1300B7B2E4 /* DFGNodeUse.h */; settings = {ATTRIBUTES = (Private, ); }; };
0F7700921402FF3C0078EB39 /* SamplingCounter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F7700911402FF280078EB39 /* SamplingCounter.cpp */; };
0F7B294A14C3CD29007C3DB1 /* DFGCCallHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F7B294814C3CD23007C3DB1 /* DFGCCallHelpers.h */; settings = {ATTRIBUTES = (Private, ); }; };
0F7B294B14C3CD2F007C3DB1 /* DFGCapabilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD82E1F14172C2F00179C94 /* DFGCapabilities.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -721,6 +723,8 @@
C22C531413FAF6EF00B7DC0D /* strtod.h in Headers */ = {isa = PBXBuildFile; fileRef = C22C52BA13FAF6EF00B7DC0D /* strtod.h */; settings = {ATTRIBUTES = (Private, ); }; };
C22C531513FAF6EF00B7DC0D /* utils.h in Headers */ = {isa = PBXBuildFile; fileRef = C22C52BB13FAF6EF00B7DC0D /* utils.h */; settings = {ATTRIBUTES = (Private, ); }; };
C240305514B404E60079EB64 /* BumpSpace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C240305314B404C90079EB64 /* BumpSpace.cpp */; };
+ C2B916C214DA014E00CBAC86 /* MarkedAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = C2B916C114DA014E00CBAC86 /* MarkedAllocator.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ C2B916C514DA040C00CBAC86 /* MarkedAllocator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C2B916C414DA040C00CBAC86 /* MarkedAllocator.cpp */; };
C2C8D02D14A3C6E000578E65 /* BumpSpaceInlineMethods.h in Headers */ = {isa = PBXBuildFile; fileRef = C2C8D02B14A3C6B200578E65 /* BumpSpaceInlineMethods.h */; settings = {ATTRIBUTES = (Private, ); }; };
C2C8D03014A3CEFC00578E65 /* BumpBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = C2C8D02E14A3CEFC00578E65 /* BumpBlock.h */; settings = {ATTRIBUTES = (Private, ); }; };
C2C8D03114A3CEFC00578E65 /* HeapBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = C2C8D02F14A3CEFC00578E65 /* HeapBlock.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -873,6 +877,8 @@
0F620171143FCD2F0068B77C /* DFGOperands.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGOperands.h; path = dfg/DFGOperands.h; sourceTree = "<group>"; };
0F620172143FCD2F0068B77C /* DFGVariableAccessData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGVariableAccessData.h; path = dfg/DFGVariableAccessData.h; sourceTree = "<group>"; };
0F636D9F142D27D200B2E66A /* PackedIntVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PackedIntVector.h; sourceTree = "<group>"; };
+ 0F66E16814DF3F1300B7B2E4 /* DFGNodeReferenceBlob.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGNodeReferenceBlob.h; path = dfg/DFGNodeReferenceBlob.h; sourceTree = "<group>"; };
+ 0F66E16914DF3F1300B7B2E4 /* DFGNodeUse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGNodeUse.h; path = dfg/DFGNodeUse.h; sourceTree = "<group>"; };
0F77008E1402FDD60078EB39 /* SamplingCounter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SamplingCounter.h; sourceTree = "<group>"; };
0F7700911402FF280078EB39 /* SamplingCounter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SamplingCounter.cpp; sourceTree = "<group>"; };
0F7B294814C3CD23007C3DB1 /* DFGCCallHelpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGCCallHelpers.h; path = dfg/DFGCCallHelpers.h; sourceTree = "<group>"; };
@@ -1015,7 +1021,6 @@
14B3EF0412BC24DD00D29EFF /* PageBlock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PageBlock.cpp; sourceTree = "<group>"; };
14B7233F12D7D0DA003BD5ED /* MachineStackMarker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MachineStackMarker.cpp; sourceTree = "<group>"; };
14B7234012D7D0DA003BD5ED /* MachineStackMarker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MachineStackMarker.h; sourceTree = "<group>"; };
- 14B8ECA60A5653980062BE54 /* JavaScriptCore.exp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.exports; path = JavaScriptCore.exp; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
14BA78F013AAB88F005B7C2C /* SlotVisitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SlotVisitor.h; sourceTree = "<group>"; };
14BA7A9513AADFF8005B7C2C /* Heap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Heap.cpp; sourceTree = "<group>"; };
14BA7A9613AADFF8005B7C2C /* Heap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Heap.h; sourceTree = "<group>"; };
@@ -1164,8 +1169,6 @@
86704B8112DBA33700A9FE7B /* YarrParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = YarrParser.h; path = yarr/YarrParser.h; sourceTree = "<group>"; };
86704B8212DBA33700A9FE7B /* YarrPattern.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = YarrPattern.cpp; path = yarr/YarrPattern.cpp; sourceTree = "<group>"; };
86704B8312DBA33700A9FE7B /* YarrPattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = YarrPattern.h; path = yarr/YarrPattern.h; sourceTree = "<group>"; };
- 867FC35F11B763950025105E /* JavaScriptCore.JSVALUE32_64only.exp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.exports; path = JavaScriptCore.JSVALUE32_64only.exp; sourceTree = "<group>"; };
- 867FC36111B763950025105E /* JavaScriptCore.JSVALUE64only.exp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.exports; path = JavaScriptCore.JSVALUE64only.exp; sourceTree = "<group>"; };
86880F1B14328BB900B08D42 /* DFGSpeculativeJIT32_64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGSpeculativeJIT32_64.cpp; path = dfg/DFGSpeculativeJIT32_64.cpp; sourceTree = "<group>"; };
86880F4C14353B2100B08D42 /* DFGSpeculativeJIT64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGSpeculativeJIT64.cpp; path = dfg/DFGSpeculativeJIT64.cpp; sourceTree = "<group>"; };
868BFA00117CEFD100B908B1 /* AtomicString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AtomicString.cpp; path = text/AtomicString.cpp; sourceTree = "<group>"; };
@@ -1506,6 +1509,8 @@
C22C52BA13FAF6EF00B7DC0D /* strtod.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = strtod.h; sourceTree = "<group>"; };
C22C52BB13FAF6EF00B7DC0D /* utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utils.h; sourceTree = "<group>"; };
C240305314B404C90079EB64 /* BumpSpace.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BumpSpace.cpp; sourceTree = "<group>"; };
+ C2B916C114DA014E00CBAC86 /* MarkedAllocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MarkedAllocator.h; sourceTree = "<group>"; };
+ C2B916C414DA040C00CBAC86 /* MarkedAllocator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MarkedAllocator.cpp; sourceTree = "<group>"; };
C2C8D02B14A3C6B200578E65 /* BumpSpaceInlineMethods.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BumpSpaceInlineMethods.h; sourceTree = "<group>"; };
C2C8D02E14A3CEFC00578E65 /* BumpBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BumpBlock.h; sourceTree = "<group>"; };
C2C8D02F14A3CEFC00578E65 /* HeapBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HeapBlock.h; sourceTree = "<group>"; };
@@ -1669,9 +1674,6 @@
937B63CC09E766D200A671DD /* DerivedSources.make */,
A7C225CC139981F100FF1662 /* KeywordLookupGenerator.py */,
F692A8540255597D01FF60F7 /* create_hash_table */,
- 14B8ECA60A5653980062BE54 /* JavaScriptCore.exp */,
- 867FC35F11B763950025105E /* JavaScriptCore.JSVALUE32_64only.exp */,
- 867FC36111B763950025105E /* JavaScriptCore.JSVALUE64only.exp */,
F5C290E60284F98E018635CA /* JavaScriptCorePrefix.h */,
45E12D8806A49B0F00E9DF84 /* jsc.cpp */,
F68EBB8C0255D4C601FF60F7 /* config.h */,
@@ -1806,6 +1808,8 @@
142E3131134FF0A600AFADB5 /* LocalScope.h */,
14B7233F12D7D0DA003BD5ED /* MachineStackMarker.cpp */,
14B7234012D7D0DA003BD5ED /* MachineStackMarker.h */,
+ C2B916C414DA040C00CBAC86 /* MarkedAllocator.cpp */,
+ C2B916C114DA014E00CBAC86 /* MarkedAllocator.h */,
142D6F0613539A2800B02E86 /* MarkedBlock.cpp */,
142D6F0713539A2800B02E86 /* MarkedBlock.h */,
141448CA13A176EC00F5BA1A /* MarkedBlockSet.h */,
@@ -2458,6 +2462,8 @@
86EC9DBB1328DF82002B2AD7 /* DFGJITCompiler.cpp */,
86EC9DBC1328DF82002B2AD7 /* DFGJITCompiler.h */,
86ECA3E9132DEF1C002B2AD7 /* DFGNode.h */,
+ 0F66E16814DF3F1300B7B2E4 /* DFGNodeReferenceBlob.h */,
+ 0F66E16914DF3F1300B7B2E4 /* DFGNodeUse.h */,
0F620171143FCD2F0068B77C /* DFGOperands.h */,
86EC9DBF1328DF82002B2AD7 /* DFGOperations.cpp */,
86EC9DC01328DF82002B2AD7 /* DFGOperations.h */,
@@ -2678,6 +2684,7 @@
A73BE169148420520091204B /* ArrayBuffer.h in Headers */,
C2D9CA1314BCC04600304B46 /* CheckedBoolean.h in Headers */,
A73BE16B148420520091204B /* ArrayBufferView.h in Headers */,
+ C2B916C214DA014E00CBAC86 /* MarkedAllocator.h in Headers */,
BC18C3E60E16F5CD00B34460 /* ArrayConstructor.h in Headers */,
BC18C3E70E16F5CD00B34460 /* ArrayPrototype.h in Headers */,
BC18C5240E16FC8A00B34460 /* ArrayPrototype.lut.h in Headers */,
@@ -3119,6 +3126,8 @@
0F9332A414CA7DD90085F3C6 /* PutByIdStatus.h in Headers */,
0F9332A514CA7DDD0085F3C6 /* StructureSet.h in Headers */,
0F55F0F514D1063C00AC7649 /* AbstractPC.h in Headers */,
+ 0F66E16B14DF3F1600B7B2E4 /* DFGNodeReferenceBlob.h in Headers */,
+ 0F66E16C14DF3F1600B7B2E4 /* DFGNodeUse.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -3664,6 +3673,7 @@
0F55F0F414D1063900AC7649 /* AbstractPC.cpp in Sources */,
86B5826714D2796C00A9C306 /* CodeProfile.cpp in Sources */,
86B5826914D2797000A9C306 /* CodeProfiling.cpp in Sources */,
+ C2B916C514DA040C00CBAC86 /* MarkedAllocator.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/Source/JavaScriptCore/Target.pri b/Source/JavaScriptCore/Target.pri
index c61fb37f1..155ee124d 100644
--- a/Source/JavaScriptCore/Target.pri
+++ b/Source/JavaScriptCore/Target.pri
@@ -73,6 +73,7 @@ SOURCES += \
heap/Heap.cpp \
heap/MachineStackMarker.cpp \
heap/MarkStack.cpp \
+ heap/MarkedAllocator.cpp \
heap/MarkedBlock.cpp \
heap/MarkedSpace.cpp \
heap/VTableSpectrum.cpp \
diff --git a/Source/JavaScriptCore/assembler/ARMAssembler.h b/Source/JavaScriptCore/assembler/ARMAssembler.h
index a659eefee..ef199d2d1 100644
--- a/Source/JavaScriptCore/assembler/ARMAssembler.h
+++ b/Source/JavaScriptCore/assembler/ARMAssembler.h
@@ -681,9 +681,7 @@ namespace JSC {
PassRefPtr<ExecutableMemoryHandle> executableCopy(JSGlobalData&, void* ownerUID);
-#ifndef NDEBUG
unsigned debugOffset() { return m_buffer.debugOffset(); }
-#endif
// Patching helpers
diff --git a/Source/JavaScriptCore/assembler/ARMv7Assembler.h b/Source/JavaScriptCore/assembler/ARMv7Assembler.h
index 0b83776df..5f376bf3d 100644
--- a/Source/JavaScriptCore/assembler/ARMv7Assembler.h
+++ b/Source/JavaScriptCore/assembler/ARMv7Assembler.h
@@ -1991,9 +1991,7 @@ public:
return reinterpret_cast<void*>(readInt32(where));
}
-#ifndef NDEBUG
unsigned debugOffset() { return m_formatter.debugOffset(); }
-#endif
private:
// VFP operations commonly take one or more 5-bit operands, typically representing a
@@ -2490,9 +2488,7 @@ private:
bool isAligned(int alignment) const { return m_buffer.isAligned(alignment); }
void* data() const { return m_buffer.data(); }
-#ifndef NDEBUG
unsigned debugOffset() { return m_buffer.debugOffset(); }
-#endif
private:
AssemblerBuffer m_buffer;
diff --git a/Source/JavaScriptCore/assembler/AbstractMacroAssembler.h b/Source/JavaScriptCore/assembler/AbstractMacroAssembler.h
index 288c706d7..b4262e894 100644
--- a/Source/JavaScriptCore/assembler/AbstractMacroAssembler.h
+++ b/Source/JavaScriptCore/assembler/AbstractMacroAssembler.h
@@ -538,9 +538,7 @@ public:
void beginUninterruptedSequence() { }
void endUninterruptedSequence() { }
-#ifndef NDEBUG
unsigned debugOffset() { return m_assembler.debugOffset(); }
-#endif
protected:
AssemblerType m_assembler;
diff --git a/Source/JavaScriptCore/assembler/AssemblerBuffer.h b/Source/JavaScriptCore/assembler/AssemblerBuffer.h
index c6e0a1003..55706c1ab 100644
--- a/Source/JavaScriptCore/assembler/AssemblerBuffer.h
+++ b/Source/JavaScriptCore/assembler/AssemblerBuffer.h
@@ -146,9 +146,7 @@ namespace JSC {
return result.release();
}
-#ifndef NDEBUG
unsigned debugOffset() { return m_index; }
-#endif
protected:
void append(const char* data, int size)
diff --git a/Source/JavaScriptCore/assembler/LinkBuffer.h b/Source/JavaScriptCore/assembler/LinkBuffer.h
index e8047e100..e078024b1 100644
--- a/Source/JavaScriptCore/assembler/LinkBuffer.h
+++ b/Source/JavaScriptCore/assembler/LinkBuffer.h
@@ -189,7 +189,6 @@ public:
return CodePtr(MacroAssembler::AssemblerType_T::getRelocatedAddress(code(), applyOffset(label.m_label)));
}
-#ifndef NDEBUG
void* debugAddress()
{
return m_code;
@@ -199,7 +198,6 @@ public:
{
return m_size;
}
-#endif
private:
template <typename T> T applyOffset(T src)
diff --git a/Source/JavaScriptCore/assembler/MIPSAssembler.h b/Source/JavaScriptCore/assembler/MIPSAssembler.h
index 4471c1303..b59fa0b8f 100644
--- a/Source/JavaScriptCore/assembler/MIPSAssembler.h
+++ b/Source/JavaScriptCore/assembler/MIPSAssembler.h
@@ -655,9 +655,7 @@ public:
return result.release();
}
-#ifndef NDEBUG
unsigned debugOffset() { return m_buffer.debugOffset(); }
-#endif
static unsigned getCallReturnOffset(AssemblerLabel call)
{
diff --git a/Source/JavaScriptCore/assembler/X86Assembler.h b/Source/JavaScriptCore/assembler/X86Assembler.h
index 3b9e122cd..25f8602e8 100644
--- a/Source/JavaScriptCore/assembler/X86Assembler.h
+++ b/Source/JavaScriptCore/assembler/X86Assembler.h
@@ -1787,9 +1787,7 @@ public:
return m_formatter.executableCopy(globalData, ownerUID);
}
-#ifndef NDEBUG
unsigned debugOffset() { return m_formatter.debugOffset(); }
-#endif
void nop()
{
@@ -2137,9 +2135,7 @@ private:
return m_buffer.executableCopy(globalData, ownerUID);
}
-#ifndef NDEBUG
unsigned debugOffset() { return m_buffer.debugOffset(); }
-#endif
private:
diff --git a/Source/JavaScriptCore/bytecode/CodeBlock.cpp b/Source/JavaScriptCore/bytecode/CodeBlock.cpp
index 4a953266e..191fafd62 100644
--- a/Source/JavaScriptCore/bytecode/CodeBlock.cpp
+++ b/Source/JavaScriptCore/bytecode/CodeBlock.cpp
@@ -59,8 +59,6 @@ namespace JSC {
using namespace DFG;
#endif
-#if !defined(NDEBUG) || ENABLE(OPCODE_SAMPLING)
-
static UString escapeQuotes(const UString& str)
{
UString result = str;
@@ -1286,8 +1284,6 @@ void CodeBlock::dump(ExecState* exec, const Vector<Instruction>::const_iterator&
}
}
-#endif // !defined(NDEBUG) || ENABLE(OPCODE_SAMPLING)
-
#if DUMP_CODE_BLOCK_STATISTICS
static HashSet<CodeBlock*> liveCodeBlockSet;
#endif
diff --git a/Source/JavaScriptCore/bytecode/CodeBlock.h b/Source/JavaScriptCore/bytecode/CodeBlock.h
index 23d6a6b6d..bc2feeb2a 100644
--- a/Source/JavaScriptCore/bytecode/CodeBlock.h
+++ b/Source/JavaScriptCore/bytecode/CodeBlock.h
@@ -134,11 +134,9 @@ namespace JSC {
static void dumpStatistics();
-#if !defined(NDEBUG) || ENABLE_OPCODE_SAMPLING
void dump(ExecState*) const;
void printStructures(const Instruction*) const;
void printStructure(const char* name, const Instruction*, int operand) const;
-#endif
bool isStrictMode() const { return m_isStrictMode; }
@@ -354,17 +352,8 @@ namespace JSC {
{
m_shouldDiscardBytecode = true;
}
- void handleBytecodeDiscardingOpportunity()
- {
- if (!!alternative())
- discardBytecode();
- else
- discardBytecodeLater();
- }
-#ifndef NDEBUG
bool usesOpcode(OpcodeID);
-#endif
unsigned instructionCount() { return m_instructionCount; }
void setInstructionCount(unsigned instructionCount) { m_instructionCount = instructionCount; }
@@ -522,6 +511,7 @@ namespace JSC {
ValueProfile* addValueProfile(int bytecodeOffset)
{
ASSERT(bytecodeOffset != -1);
+ ASSERT(m_valueProfiles.isEmpty() || m_valueProfiles.last().m_bytecodeOffset < bytecodeOffset);
m_valueProfiles.append(ValueProfile(bytecodeOffset));
return &m_valueProfiles.last();
}
@@ -1016,7 +1006,6 @@ namespace JSC {
void tallyFrequentExitSites() { }
#endif
-#if !defined(NDEBUG) || ENABLE(OPCODE_SAMPLING)
void dump(ExecState*, const Vector<Instruction>::const_iterator& begin, Vector<Instruction>::const_iterator&) const;
CString registerName(ExecState*, int r) const;
@@ -1026,7 +1015,6 @@ namespace JSC {
void printGetByIdOp(ExecState*, int location, Vector<Instruction>::const_iterator&, const char* op) const;
void printCallOp(ExecState*, int location, Vector<Instruction>::const_iterator&, const char* op) const;
void printPutByIdOp(ExecState*, int location, Vector<Instruction>::const_iterator&, const char* op) const;
-#endif
void visitStructures(SlotVisitor&, Instruction* vPC) const;
#if ENABLE(DFG_JIT)
diff --git a/Source/JavaScriptCore/bytecode/CodeOrigin.h b/Source/JavaScriptCore/bytecode/CodeOrigin.h
index 25a116c55..eda17648b 100644
--- a/Source/JavaScriptCore/bytecode/CodeOrigin.h
+++ b/Source/JavaScriptCore/bytecode/CodeOrigin.h
@@ -83,10 +83,8 @@ struct CodeOrigin {
bool operator!=(const CodeOrigin& other) const { return !(*this == other); }
-#ifndef NDEBUG
// Get the inline stack. This is slow, and is intended for debugging only.
Vector<CodeOrigin> inlineStack() const;
-#endif
};
struct InlineCallFrame {
@@ -122,7 +120,6 @@ inline bool CodeOrigin::operator==(const CodeOrigin& other) const
&& inlineCallFrame == other.inlineCallFrame;
}
-#ifndef NDEBUG
// Get the inline stack. This is slow, and is intended for debugging only.
inline Vector<CodeOrigin> CodeOrigin::inlineStack() const
{
@@ -133,7 +130,6 @@ inline Vector<CodeOrigin> CodeOrigin::inlineStack() const
result[index--] = current->caller;
return result;
}
-#endif
inline unsigned getCallReturnOffsetForCodeOrigin(CodeOriginAtCallReturnOffset* data)
{
diff --git a/Source/JavaScriptCore/bytecode/DFGExitProfile.h b/Source/JavaScriptCore/bytecode/DFGExitProfile.h
index f18b69a54..edabfabf9 100644
--- a/Source/JavaScriptCore/bytecode/DFGExitProfile.h
+++ b/Source/JavaScriptCore/bytecode/DFGExitProfile.h
@@ -41,7 +41,6 @@ enum ExitKind {
Uncountable, // We exited for none of the above reasons, and we should not count it. Most uses of this should be viewed as a FIXME.
};
-#ifndef NDEBUG
inline const char* exitKindToString(ExitKind kind)
{
switch (kind) {
@@ -59,7 +58,6 @@ inline const char* exitKindToString(ExitKind kind)
return "Unknown";
}
}
-#endif
inline bool exitKindIsCountable(ExitKind kind)
{
diff --git a/Source/JavaScriptCore/bytecode/DataFormat.h b/Source/JavaScriptCore/bytecode/DataFormat.h
index b78a6e8e6..4f015486a 100644
--- a/Source/JavaScriptCore/bytecode/DataFormat.h
+++ b/Source/JavaScriptCore/bytecode/DataFormat.h
@@ -50,7 +50,6 @@ enum DataFormat {
DataFormatJSBoolean = DataFormatJS | DataFormatBoolean
};
-#ifndef NDEBUG
inline const char* dataFormatToString(DataFormat dataFormat)
{
switch (dataFormat) {
@@ -80,7 +79,6 @@ inline const char* dataFormatToString(DataFormat dataFormat)
return "Unknown";
}
}
-#endif
#if USE(JSVALUE64)
inline bool needDataFormatConversion(DataFormat from, DataFormat to)
diff --git a/Source/JavaScriptCore/bytecode/PredictedType.cpp b/Source/JavaScriptCore/bytecode/PredictedType.cpp
index 4b07ff446..a8118adf9 100644
--- a/Source/JavaScriptCore/bytecode/PredictedType.cpp
+++ b/Source/JavaScriptCore/bytecode/PredictedType.cpp
@@ -36,7 +36,6 @@
namespace JSC {
-#ifndef NDEBUG
const char* predictionToString(PredictedType value)
{
if (value == PredictNone)
@@ -160,7 +159,6 @@ const char* predictionToString(PredictedType value)
return description;
}
-#endif
PredictedType predictionFromClassInfo(const ClassInfo* classInfo)
{
diff --git a/Source/JavaScriptCore/bytecode/PredictedType.h b/Source/JavaScriptCore/bytecode/PredictedType.h
index 47583361d..efbe9b30d 100644
--- a/Source/JavaScriptCore/bytecode/PredictedType.h
+++ b/Source/JavaScriptCore/bytecode/PredictedType.h
@@ -217,9 +217,7 @@ inline bool isOtherPrediction(PredictedType value)
return value == PredictOther;
}
-#ifndef NDEBUG
const char* predictionToString(PredictedType value);
-#endif
// Merge two predictions. Note that currently this just does left | right. It may
// seem tempting to do so directly, but you would be doing so at your own peril,
diff --git a/Source/JavaScriptCore/bytecode/ValueRecovery.h b/Source/JavaScriptCore/bytecode/ValueRecovery.h
index 356abe84f..4d2134e0a 100644
--- a/Source/JavaScriptCore/bytecode/ValueRecovery.h
+++ b/Source/JavaScriptCore/bytecode/ValueRecovery.h
@@ -30,11 +30,8 @@
#include "JSValue.h"
#include "MacroAssembler.h"
#include "VirtualRegister.h"
-#include <wtf/Platform.h>
-
-#ifndef NDEBUG
#include <stdio.h>
-#endif
+#include <wtf/Platform.h>
namespace JSC {
@@ -249,7 +246,6 @@ public:
return JSValue::decode(m_source.constant);
}
-#ifndef NDEBUG
void dump(FILE* out) const
{
switch (technique()) {
@@ -314,7 +310,6 @@ public:
break;
}
}
-#endif
private:
ValueRecoveryTechnique m_technique;
diff --git a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
index 3d363354e..437dd53b0 100644
--- a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
+++ b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
@@ -150,26 +150,16 @@ void ResolveResult::checkValidity()
}
#endif
-#ifndef NDEBUG
static bool s_dumpsGeneratedCode = false;
-#endif
void BytecodeGenerator::setDumpsGeneratedCode(bool dumpsGeneratedCode)
{
-#ifndef NDEBUG
s_dumpsGeneratedCode = dumpsGeneratedCode;
-#else
- UNUSED_PARAM(dumpsGeneratedCode);
-#endif
}
bool BytecodeGenerator::dumpsGeneratedCode()
{
-#ifndef NDEBUG
return s_dumpsGeneratedCode;
-#else
- return false;
-#endif
}
JSObject* BytecodeGenerator::generate()
@@ -182,10 +172,8 @@ JSObject* BytecodeGenerator::generate()
m_codeBlock->setInstructionCount(m_codeBlock->instructions().size());
-#ifndef NDEBUG
if (s_dumpsGeneratedCode)
m_codeBlock->dump(m_scopeChain->globalObject->globalExec());
-#endif
if ((m_codeType == FunctionCode && !m_codeBlock->needsFullScopeChain() && !m_codeBlock->usesArguments()) || m_codeType == EvalCode)
symbolTable().clear();
diff --git a/Source/JavaScriptCore/debugger/DebuggerActivation.cpp b/Source/JavaScriptCore/debugger/DebuggerActivation.cpp
index 330476da2..529a02f16 100644
--- a/Source/JavaScriptCore/debugger/DebuggerActivation.cpp
+++ b/Source/JavaScriptCore/debugger/DebuggerActivation.cpp
@@ -101,16 +101,10 @@ bool DebuggerActivation::getOwnPropertyDescriptor(JSObject* object, ExecState* e
return thisObject->m_activation->methodTable()->getOwnPropertyDescriptor(thisObject->m_activation.get(), exec, propertyName, descriptor);
}
-void DebuggerActivation::defineGetter(JSObject* object, ExecState* exec, const Identifier& propertyName, JSObject* getterFunction, unsigned attributes)
+bool DebuggerActivation::defineOwnProperty(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor, bool shouldThrow)
{
DebuggerActivation* thisObject = jsCast<DebuggerActivation*>(object);
- thisObject->m_activation->methodTable()->defineGetter(thisObject->m_activation.get(), exec, propertyName, getterFunction, attributes);
-}
-
-void DebuggerActivation::defineSetter(JSObject* object, ExecState* exec, const Identifier& propertyName, JSObject* setterFunction, unsigned attributes)
-{
- DebuggerActivation* thisObject = jsCast<DebuggerActivation*>(object);
- thisObject->m_activation->methodTable()->defineSetter(thisObject->m_activation.get(), exec, propertyName, setterFunction, attributes);
+ return thisObject->m_activation->methodTable()->defineOwnProperty(thisObject->m_activation.get(), exec, propertyName, descriptor, shouldThrow);
}
} // namespace JSC
diff --git a/Source/JavaScriptCore/debugger/DebuggerActivation.h b/Source/JavaScriptCore/debugger/DebuggerActivation.h
index 8dba70b80..6560c3d11 100644
--- a/Source/JavaScriptCore/debugger/DebuggerActivation.h
+++ b/Source/JavaScriptCore/debugger/DebuggerActivation.h
@@ -49,8 +49,7 @@ namespace JSC {
static bool deleteProperty(JSCell*, ExecState*, const Identifier& propertyName);
static void getOwnPropertyNames(JSObject*, ExecState*, PropertyNameArray&, EnumerationMode);
static bool getOwnPropertyDescriptor(JSObject*, ExecState*, const Identifier&, PropertyDescriptor&);
- static void defineGetter(JSObject*, ExecState*, const Identifier& propertyName, JSObject* getterFunction, unsigned attributes);
- static void defineSetter(JSObject*, ExecState*, const Identifier& propertyName, JSObject* setterFunction, unsigned attributes);
+ static bool defineOwnProperty(JSObject*, ExecState*, const Identifier& propertyName, PropertyDescriptor&, bool shouldThrow);
JS_EXPORTDATA static const ClassInfo s_info;
diff --git a/Source/JavaScriptCore/dfg/DFGAbstractState.cpp b/Source/JavaScriptCore/dfg/DFGAbstractState.cpp
index bd35e1d43..72c1759c7 100644
--- a/Source/JavaScriptCore/dfg/DFGAbstractState.cpp
+++ b/Source/JavaScriptCore/dfg/DFGAbstractState.cpp
@@ -262,22 +262,6 @@ bool AbstractState::execute(NodeIndex nodeIndex)
forNode(nodeIndex).set(PredictInt32);
break;
- case ValueToNumber:
- if (m_graph[node.child1()].shouldNotSpeculateInteger()) {
- forNode(node.child1()).filter(PredictNumber);
- forNode(nodeIndex).set(PredictDouble);
- break;
- }
-
- forNode(node.child1()).filter(PredictInt32);
- forNode(nodeIndex).set(PredictInt32);
- break;
-
- case ValueToDouble:
- forNode(node.child1()).filter(PredictNumber);
- forNode(nodeIndex).set(PredictDouble);
- break;
-
case ValueAdd:
case ArithAdd: {
if (m_graph.addShouldSpeculateInteger(node, m_codeBlock)) {
diff --git a/Source/JavaScriptCore/dfg/DFGAbstractState.h b/Source/JavaScriptCore/dfg/DFGAbstractState.h
index 337a4d0b4..015563485 100644
--- a/Source/JavaScriptCore/dfg/DFGAbstractState.h
+++ b/Source/JavaScriptCore/dfg/DFGAbstractState.h
@@ -101,6 +101,11 @@ public:
return m_nodes[nodeIndex - m_block->begin];
}
+ AbstractValue& forNode(NodeUse nodeUse)
+ {
+ return forNode(nodeUse.index());
+ }
+
// Call this before beginning CFA to initialize the abstract values of
// arguments, and to indicate which blocks should be listed for CFA
// execution.
diff --git a/Source/JavaScriptCore/dfg/DFGAbstractValue.h b/Source/JavaScriptCore/dfg/DFGAbstractValue.h
index 15bc0d496..aa5518187 100644
--- a/Source/JavaScriptCore/dfg/DFGAbstractValue.h
+++ b/Source/JavaScriptCore/dfg/DFGAbstractValue.h
@@ -287,7 +287,6 @@ public:
return m_structure == other.m_structure;
}
-#ifndef NDEBUG
void dump(FILE* out) const
{
if (isTop()) {
@@ -300,7 +299,6 @@ public:
fprintf(out, "%p", m_structure);
fprintf(out, "]");
}
-#endif
private:
static Structure* topValue() { return reinterpret_cast<Structure*>(1); }
@@ -466,14 +464,12 @@ struct AbstractValue {
// complexity of the code.
}
-#ifndef NDEBUG
void dump(FILE* out) const
{
fprintf(out, "(%s, ", predictionToString(m_type));
m_structure.dump(out);
fprintf(out, ")");
}
-#endif
StructureAbstractValue m_structure;
PredictedType m_type;
diff --git a/Source/JavaScriptCore/dfg/DFGAssemblyHelpers.h b/Source/JavaScriptCore/dfg/DFGAssemblyHelpers.h
index e0d817c9f..0d7dd3a27 100644
--- a/Source/JavaScriptCore/dfg/DFGAssemblyHelpers.h
+++ b/Source/JavaScriptCore/dfg/DFGAssemblyHelpers.h
@@ -39,9 +39,7 @@
namespace JSC { namespace DFG {
-#ifndef NDEBUG
typedef void (*V_DFGDebugOperation_EP)(ExecState*, void*);
-#endif
class AssemblyHelpers : public MacroAssembler {
public:
@@ -152,7 +150,6 @@ public:
return branch8(Below, Address(structureReg, Structure::typeInfoTypeOffset()), TrustedImm32(ObjectType));
}
-#ifndef NDEBUG
// Add a debug call. This call has no effect on JIT code execution state.
void debugCall(V_DFGDebugOperation_EP function, void* argument)
{
@@ -182,7 +179,6 @@ public:
for (unsigned i = 0; i < GPRInfo::numberOfRegisters; ++i)
loadPtr(buffer + i, GPRInfo::toRegister(i));
}
-#endif
// These methods JIT generate dynamic, debug-only checks - akin to ASSERTs.
#if DFG_ENABLE(JIT_ASSERT)
diff --git a/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp b/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
index 87c3a23b9..2a5d249b3 100644
--- a/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
+++ b/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
@@ -170,7 +170,7 @@ private:
Node& flushChild = m_graph[nodePtr->child1()];
if (flushChild.op == Phi) {
VariableAccessData* variableAccessData = flushChild.variableAccessData();
- nodeIndex = addToGraph(GetLocal, OpInfo(variableAccessData), nodePtr->child1());
+ nodeIndex = addToGraph(GetLocal, OpInfo(variableAccessData), nodePtr->child1().index());
m_currentBlock->variablesAtTail.local(operand) = nodeIndex;
return nodeIndex;
}
@@ -179,7 +179,7 @@ private:
if (nodePtr->op == GetLocal)
return nodeIndex;
ASSERT(nodePtr->op == SetLocal);
- return nodePtr->child1();
+ return nodePtr->child1().index();
}
// Check for reads of temporaries from prior blocks,
@@ -219,7 +219,7 @@ private:
Node& flushChild = m_graph[nodePtr->child1()];
if (flushChild.op == Phi) {
VariableAccessData* variableAccessData = flushChild.variableAccessData();
- nodeIndex = addToGraph(GetLocal, OpInfo(variableAccessData), nodePtr->child1());
+ nodeIndex = addToGraph(GetLocal, OpInfo(variableAccessData), nodePtr->child1().index());
m_currentBlock->variablesAtTail.local(operand) = nodeIndex;
return nodeIndex;
}
@@ -238,7 +238,7 @@ private:
return nodeIndex;
ASSERT(nodePtr->op == SetLocal);
- return nodePtr->child1();
+ return nodePtr->child1().index();
}
VariableAccessData* variableAccessData = newVariableAccessData(operand);
@@ -313,10 +313,6 @@ private:
{
return toInt32(get(operand));
}
- NodeIndex getToNumber(int operand)
- {
- return toNumber(get(operand));
- }
// Perform an ES5 ToInt32 operation - returns a node of type NodeResultInt32.
NodeIndex toInt32(NodeIndex index)
@@ -327,7 +323,7 @@ private:
return index;
if (node.op == UInt32ToNumber)
- return node.child1();
+ return node.child1().index();
// Check for numeric constants boxed as JSValues.
if (node.op == JSConstant) {
@@ -341,23 +337,6 @@ private:
return addToGraph(ValueToInt32, index);
}
- // Perform an ES5 ToNumber operation - returns a node of type NodeResultDouble.
- NodeIndex toNumber(NodeIndex index)
- {
- Node& node = m_graph[index];
-
- if (node.hasNumberResult())
- return index;
-
- if (node.op == JSConstant) {
- JSValue v = valueOfJSConstant(index);
- if (v.isNumber())
- return getJSConstant(node.constantNumber());
- }
-
- return addToGraph(ValueToNumber, OpInfo(NodeUseBottom), index);
- }
-
NodeIndex getJSConstantForValue(JSValue constantValue)
{
unsigned constantIndex = m_codeBlock->addOrFindConstant(constantValue);
@@ -572,7 +551,7 @@ private:
}
void addVarArgChild(NodeIndex child)
{
- m_graph.m_varArgChildren.append(child);
+ m_graph.m_varArgChildren.append(NodeUse(child));
m_numPassedVarArgs++;
}
@@ -1198,12 +1177,12 @@ bool ByteCodeParser::handleMinMax(bool usesResult, int resultOperand, NodeType o
}
if (argumentCountIncludingThis == 2) { // Math.min(x)
- set(resultOperand, getToNumber(registerOffset + argumentToOperand(1)));
+ set(resultOperand, get(registerOffset + argumentToOperand(1)));
return true;
}
if (argumentCountIncludingThis == 3) { // Math.min(x, y)
- set(resultOperand, addToGraph(op, OpInfo(NodeUseBottom), getToNumber(registerOffset + argumentToOperand(1)), getToNumber(registerOffset + argumentToOperand(2))));
+ set(resultOperand, addToGraph(op, OpInfo(NodeUseBottom), get(registerOffset + argumentToOperand(1)), get(registerOffset + argumentToOperand(2))));
return true;
}
@@ -1231,7 +1210,7 @@ bool ByteCodeParser::handleIntrinsic(bool usesResult, int resultOperand, Intrins
if (!MacroAssembler::supportsFloatingPointAbs())
return false;
- NodeIndex nodeIndex = addToGraph(ArithAbs, OpInfo(NodeUseBottom), getToNumber(registerOffset + argumentToOperand(1)));
+ NodeIndex nodeIndex = addToGraph(ArithAbs, OpInfo(NodeUseBottom), get(registerOffset + argumentToOperand(1)));
if (m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, Overflow))
m_graph[nodeIndex].mergeArithNodeFlags(NodeMayOverflow);
set(resultOperand, nodeIndex);
@@ -1256,7 +1235,7 @@ bool ByteCodeParser::handleIntrinsic(bool usesResult, int resultOperand, Intrins
if (!MacroAssembler::supportsFloatingPointSqrt())
return false;
- set(resultOperand, addToGraph(ArithSqrt, getToNumber(registerOffset + argumentToOperand(1))));
+ set(resultOperand, addToGraph(ArithSqrt, get(registerOffset + argumentToOperand(1))));
return true;
}
@@ -1512,7 +1491,7 @@ bool ByteCodeParser::parseBlock(unsigned limit)
case op_pre_inc: {
unsigned srcDst = currentInstruction[1].u.operand;
- NodeIndex op = getToNumber(srcDst);
+ NodeIndex op = get(srcDst);
set(srcDst, makeSafe(addToGraph(ArithAdd, OpInfo(NodeUseBottom), op, one())));
NEXT_OPCODE(op_pre_inc);
}
@@ -1521,7 +1500,7 @@ bool ByteCodeParser::parseBlock(unsigned limit)
unsigned result = currentInstruction[1].u.operand;
unsigned srcDst = currentInstruction[2].u.operand;
ASSERT(result != srcDst); // Required for assumptions we make during OSR.
- NodeIndex op = getToNumber(srcDst);
+ NodeIndex op = get(srcDst);
set(result, op);
set(srcDst, makeSafe(addToGraph(ArithAdd, OpInfo(NodeUseBottom), op, one())));
NEXT_OPCODE(op_post_inc);
@@ -1529,7 +1508,7 @@ bool ByteCodeParser::parseBlock(unsigned limit)
case op_pre_dec: {
unsigned srcDst = currentInstruction[1].u.operand;
- NodeIndex op = getToNumber(srcDst);
+ NodeIndex op = get(srcDst);
set(srcDst, makeSafe(addToGraph(ArithSub, OpInfo(NodeUseBottom), op, one())));
NEXT_OPCODE(op_pre_dec);
}
@@ -1537,7 +1516,7 @@ bool ByteCodeParser::parseBlock(unsigned limit)
case op_post_dec: {
unsigned result = currentInstruction[1].u.operand;
unsigned srcDst = currentInstruction[2].u.operand;
- NodeIndex op = getToNumber(srcDst);
+ NodeIndex op = get(srcDst);
set(result, op);
set(srcDst, makeSafe(addToGraph(ArithSub, OpInfo(NodeUseBottom), op, one())));
NEXT_OPCODE(op_post_dec);
@@ -1549,37 +1528,37 @@ bool ByteCodeParser::parseBlock(unsigned limit)
NodeIndex op1 = get(currentInstruction[2].u.operand);
NodeIndex op2 = get(currentInstruction[3].u.operand);
if (m_graph[op1].hasNumberResult() && m_graph[op2].hasNumberResult())
- set(currentInstruction[1].u.operand, makeSafe(addToGraph(ArithAdd, OpInfo(NodeUseBottom), toNumber(op1), toNumber(op2))));
+ set(currentInstruction[1].u.operand, makeSafe(addToGraph(ArithAdd, OpInfo(NodeUseBottom), op1, op2)));
else
set(currentInstruction[1].u.operand, makeSafe(addToGraph(ValueAdd, OpInfo(NodeUseBottom), op1, op2)));
NEXT_OPCODE(op_add);
}
case op_sub: {
- NodeIndex op1 = getToNumber(currentInstruction[2].u.operand);
- NodeIndex op2 = getToNumber(currentInstruction[3].u.operand);
+ NodeIndex op1 = get(currentInstruction[2].u.operand);
+ NodeIndex op2 = get(currentInstruction[3].u.operand);
set(currentInstruction[1].u.operand, makeSafe(addToGraph(ArithSub, OpInfo(NodeUseBottom), op1, op2)));
NEXT_OPCODE(op_sub);
}
case op_mul: {
// Multiply requires that the inputs are not truncated, unfortunately.
- NodeIndex op1 = getToNumber(currentInstruction[2].u.operand);
- NodeIndex op2 = getToNumber(currentInstruction[3].u.operand);
+ NodeIndex op1 = get(currentInstruction[2].u.operand);
+ NodeIndex op2 = get(currentInstruction[3].u.operand);
set(currentInstruction[1].u.operand, makeSafe(addToGraph(ArithMul, OpInfo(NodeUseBottom), op1, op2)));
NEXT_OPCODE(op_mul);
}
case op_mod: {
- NodeIndex op1 = getToNumber(currentInstruction[2].u.operand);
- NodeIndex op2 = getToNumber(currentInstruction[3].u.operand);
+ NodeIndex op1 = get(currentInstruction[2].u.operand);
+ NodeIndex op2 = get(currentInstruction[3].u.operand);
set(currentInstruction[1].u.operand, makeSafe(addToGraph(ArithMod, OpInfo(NodeUseBottom), op1, op2)));
NEXT_OPCODE(op_mod);
}
case op_div: {
- NodeIndex op1 = getToNumber(currentInstruction[2].u.operand);
- NodeIndex op2 = getToNumber(currentInstruction[3].u.operand);
+ NodeIndex op1 = get(currentInstruction[2].u.operand);
+ NodeIndex op2 = get(currentInstruction[3].u.operand);
set(currentInstruction[1].u.operand, makeDivSafe(addToGraph(ArithDiv, OpInfo(NodeUseBottom), op1, op2)));
NEXT_OPCODE(op_div);
}
@@ -2241,9 +2220,9 @@ void ByteCodeParser::processPhiStack()
// GetLocal and its block-local Phi. Strictly speaking we only need the two
// to be unified. But for efficiency, we want the code that creates GetLocals
// and Phis to try to reuse VariableAccessDatas as much as possible.
- ASSERT(m_graph[valueInPredecessor].variableAccessData() == m_graph[m_graph[valueInPredecessor].child1()].variableAccessData());
+ ASSERT(m_graph[valueInPredecessor].variableAccessData() == m_graph[m_graph[valueInPredecessor].child1().index()].variableAccessData());
- valueInPredecessor = m_graph[valueInPredecessor].child1();
+ valueInPredecessor = m_graph[valueInPredecessor].child1().index();
} else {
#if DFG_ENABLE(DEBUG_PROPAGATION_VERBOSE)
printf(" Found @%u.\n", valueInPredecessor);
@@ -2266,11 +2245,11 @@ void ByteCodeParser::processPhiStack()
m_graph.ref(valueInPredecessor);
}
- if (phiNode->child1() == NoNode) {
+ if (!phiNode->child1()) {
#if DFG_ENABLE(DEBUG_PROPAGATION_VERBOSE)
printf(" Setting @%u->child1 = @%u.\n", entry.m_phi, valueInPredecessor);
#endif
- phiNode->children.fixed.child1 = valueInPredecessor;
+ phiNode->children.setChild1(NodeUse(valueInPredecessor));
#if DFG_ENABLE(DEBUG_PROPAGATION_VERBOSE)
printf(" Children of @%u: ", entry.m_phi);
phiNode->dumpChildren(stdout);
@@ -2278,11 +2257,11 @@ void ByteCodeParser::processPhiStack()
#endif
continue;
}
- if (phiNode->child2() == NoNode) {
+ if (!phiNode->child2()) {
#if DFG_ENABLE(DEBUG_PROPAGATION_VERBOSE)
printf(" Setting @%u->child2 = @%u.\n", entry.m_phi, valueInPredecessor);
#endif
- phiNode->children.fixed.child2 = valueInPredecessor;
+ phiNode->children.setChild2(NodeUse(valueInPredecessor));
#if DFG_ENABLE(DEBUG_PROPAGATION_VERBOSE)
printf(" Children of @%u: ", entry.m_phi);
phiNode->dumpChildren(stdout);
@@ -2290,11 +2269,11 @@ void ByteCodeParser::processPhiStack()
#endif
continue;
}
- if (phiNode->child3() == NoNode) {
+ if (!phiNode->child3()) {
#if DFG_ENABLE(DEBUG_PROPAGATION_VERBOSE)
printf(" Setting @%u->child3 = @%u.\n", entry.m_phi, valueInPredecessor);
#endif
- phiNode->children.fixed.child3 = valueInPredecessor;
+ phiNode->children.setChild3(NodeUse(valueInPredecessor));
#if DFG_ENABLE(DEBUG_PROPAGATION_VERBOSE)
printf(" Children of @%u: ", entry.m_phi);
phiNode->dumpChildren(stdout);
@@ -2314,9 +2293,7 @@ void ByteCodeParser::processPhiStack()
if (phiNode->refCount())
m_graph.ref(newPhi);
- newPhiNode.children.fixed.child1 = phiNode->child1();
- newPhiNode.children.fixed.child2 = phiNode->child2();
- newPhiNode.children.fixed.child3 = phiNode->child3();
+ newPhiNode.children = phiNode->children;
#if DFG_ENABLE(DEBUG_PROPAGATION_VERBOSE)
printf(" Children of @%u: ", newPhi);
@@ -2324,9 +2301,7 @@ void ByteCodeParser::processPhiStack()
printf(".\n");
#endif
- phiNode->children.fixed.child1 = newPhi;
- phiNode->children.fixed.child2 = valueInPredecessor;
- phiNode->children.fixed.child3 = NoNode;
+ phiNode->children.initialize(newPhi, valueInPredecessor, NoNode);
#if DFG_ENABLE(DEBUG_PROPAGATION_VERBOSE)
printf(" Children of @%u: ", entry.m_phi);
diff --git a/Source/JavaScriptCore/dfg/DFGCommon.h b/Source/JavaScriptCore/dfg/DFGCommon.h
index 469dbd33e..14edff3a5 100644
--- a/Source/JavaScriptCore/dfg/DFGCommon.h
+++ b/Source/JavaScriptCore/dfg/DFGCommon.h
@@ -92,6 +92,11 @@ struct NodeIndexTraits {
}
};
+enum UseKind {
+ UntypedUse,
+ LastUseKind // Must always be the last entry in the enum, as it is used to denote the number of enum elements.
+};
+
} } // namespace JSC::DFG
#endif // ENABLE(DFG_JIT)
diff --git a/Source/JavaScriptCore/dfg/DFGFPRInfo.h b/Source/JavaScriptCore/dfg/DFGFPRInfo.h
index dbd60a4e6..6af45dd81 100644
--- a/Source/JavaScriptCore/dfg/DFGFPRInfo.h
+++ b/Source/JavaScriptCore/dfg/DFGFPRInfo.h
@@ -78,7 +78,6 @@ public:
return (unsigned)reg;
}
-#ifndef NDEBUG
static const char* debugName(FPRReg reg)
{
ASSERT(reg != InvalidFPRReg);
@@ -99,7 +98,6 @@ public:
#endif
return nameForRegister[reg];
}
-#endif
};
#endif
@@ -141,7 +139,6 @@ public:
return (unsigned)reg;
}
-#ifndef NDEBUG
static const char* debugName(FPRReg reg)
{
ASSERT(reg != InvalidFPRReg);
@@ -158,7 +155,6 @@ public:
};
return nameForRegister[reg];
}
-#endif
};
#endif
diff --git a/Source/JavaScriptCore/dfg/DFGGPRInfo.h b/Source/JavaScriptCore/dfg/DFGGPRInfo.h
index 2f779d645..f010d8c18 100644
--- a/Source/JavaScriptCore/dfg/DFGGPRInfo.h
+++ b/Source/JavaScriptCore/dfg/DFGGPRInfo.h
@@ -292,7 +292,6 @@ public:
return result;
}
-#ifndef NDEBUG
static const char* debugName(GPRReg reg)
{
ASSERT(reg != InvalidGPRReg);
@@ -303,7 +302,6 @@ public:
};
return nameForRegister[reg];
}
-#endif
private:
static const unsigned InvalidIndex = 0xffffffff;
@@ -363,7 +361,6 @@ public:
return result;
}
-#ifndef NDEBUG
static const char* debugName(GPRReg reg)
{
ASSERT(reg != InvalidGPRReg);
@@ -376,7 +373,6 @@ public:
};
return nameForRegister[reg];
}
-#endif
private:
static const unsigned InvalidIndex = 0xffffffff;
@@ -436,7 +432,6 @@ public:
return result;
}
-#ifndef NDEBUG
static const char* debugName(GPRReg reg)
{
ASSERT(reg != InvalidGPRReg);
@@ -449,7 +444,6 @@ public:
};
return nameForRegister[reg];
}
-#endif
private:
static const unsigned InvalidIndex = 0xffffffff;
diff --git a/Source/JavaScriptCore/dfg/DFGGraph.cpp b/Source/JavaScriptCore/dfg/DFGGraph.cpp
index e01bea195..c304dc8e7 100644
--- a/Source/JavaScriptCore/dfg/DFGGraph.cpp
+++ b/Source/JavaScriptCore/dfg/DFGGraph.cpp
@@ -32,8 +32,6 @@
namespace JSC { namespace DFG {
-#ifndef NDEBUG
-
// Creates an array of stringized names.
static const char* dfgOpNames[] = {
#define STRINGIZE_DFG_OP_ENUM(opcode, flags) #opcode ,
@@ -165,16 +163,16 @@ void Graph::dump(NodeIndex nodeIndex, CodeBlock* codeBlock)
printf(", ");
else
hasPrinted = true;
- printf("@%u", m_varArgChildren[childIdx]);
+ printf("@%u", m_varArgChildren[childIdx].index());
}
} else {
- if (node.child1() != NoNode)
- printf("@%u", node.child1());
- if (node.child2() != NoNode)
- printf(", @%u", node.child2());
- if (node.child3() != NoNode)
- printf(", @%u", node.child3());
- hasPrinted = node.child1() != NoNode;
+ if (!!node.child1())
+ printf("@%u", node.child1().index());
+ if (!!node.child2())
+ printf(", @%u", node.child2().index());
+ if (!!node.child3())
+ printf(", @%u", node.child3().index());
+ hasPrinted = !!node.child1();
}
if (node.hasArithNodeFlags()) {
@@ -298,8 +296,6 @@ void Graph::dump(CodeBlock* codeBlock)
dump(i, codeBlock);
}
-#endif
-
// FIXME: Convert this to be iterative, not recursive.
#define DO_TO_CHILDREN(node, thingToDo) do { \
Node& _node = (node); \
@@ -309,20 +305,20 @@ void Graph::dump(CodeBlock* codeBlock)
_childIdx++) \
thingToDo(m_varArgChildren[_childIdx]); \
} else { \
- if (_node.child1() == NoNode) { \
- ASSERT(_node.child2() == NoNode \
- && _node.child3() == NoNode); \
+ if (!_node.child1()) { \
+ ASSERT(!_node.child2() \
+ && !_node.child3()); \
break; \
} \
thingToDo(_node.child1()); \
\
- if (_node.child2() == NoNode) { \
- ASSERT(_node.child3() == NoNode); \
+ if (!_node.child2()) { \
+ ASSERT(!_node.child3()); \
break; \
} \
thingToDo(_node.child2()); \
\
- if (_node.child3() == NoNode) \
+ if (!_node.child3()) \
break; \
thingToDo(_node.child3()); \
} \
diff --git a/Source/JavaScriptCore/dfg/DFGGraph.h b/Source/JavaScriptCore/dfg/DFGGraph.h
index d3f16a0f4..ecd77b3a4 100644
--- a/Source/JavaScriptCore/dfg/DFGGraph.h
+++ b/Source/JavaScriptCore/dfg/DFGGraph.h
@@ -71,6 +71,15 @@ struct ResolveGlobalData {
// Nodes that are 'dead' remain in the vector with refCount 0.
class Graph : public Vector<Node, 64> {
public:
+ using Vector<Node, 64>::operator[];
+ using Vector<Node, 64>::at;
+
+ Node& operator[](NodeUse nodeUse) { return at(nodeUse.index()); }
+ const Node& operator[](NodeUse nodeUse) const { return at(nodeUse.index()); }
+
+ Node& at(NodeUse nodeUse) { return at(nodeUse.index()); }
+ const Node& at(NodeUse nodeUse) const { return at(nodeUse.index()); }
+
// Mark a node as being referenced.
void ref(NodeIndex nodeIndex)
{
@@ -79,38 +88,45 @@ public:
if (node.ref())
refChildren(nodeIndex);
}
+ void ref(NodeUse nodeUse)
+ {
+ ref(nodeUse.index());
+ }
void deref(NodeIndex nodeIndex)
{
if (at(nodeIndex).deref())
derefChildren(nodeIndex);
}
+ void deref(NodeUse nodeUse)
+ {
+ deref(nodeUse.index());
+ }
void clearAndDerefChild1(Node& node)
{
- if (node.children.fixed.child1 == NoNode)
+ if (!node.child1())
return;
- deref(node.children.fixed.child1);
- node.children.fixed.child1 = NoNode;
+ deref(node.child1());
+ node.children.child1() = NodeUse();
}
void clearAndDerefChild2(Node& node)
{
- if (node.children.fixed.child2 == NoNode)
+ if (!node.child2())
return;
- deref(node.children.fixed.child2);
- node.children.fixed.child2 = NoNode;
+ deref(node.child2());
+ node.children.child2() = NodeUse();
}
void clearAndDerefChild3(Node& node)
{
- if (node.children.fixed.child3 == NoNode)
+ if (!node.child3())
return;
- deref(node.children.fixed.child3);
- node.children.fixed.child3 = NoNode;
+ deref(node.child3());
+ node.children.child3() = NodeUse();
}
-#ifndef NDEBUG
// CodeBlock is optional, but may allow additional information to be dumped (e.g. Identifier names).
void dump(CodeBlock* = 0);
void dump(NodeIndex, CodeBlock* = 0);
@@ -118,7 +134,6 @@ public:
// Dump the code origin of the given node as a diff from the code origin of the
// preceding node.
void dumpCodeOrigin(NodeIndex);
-#endif
BlockIndex blockIndexForBytecodeOffset(Vector<BlockIndex>& blocks, unsigned bytecodeBegin);
@@ -214,12 +229,10 @@ public:
return asFunction(function);
}
-#ifndef NDEBUG
static const char *opName(NodeType);
// This is O(n), and should only be used for verbose dumps.
const char* nameOfVariableAccessData(VariableAccessData*);
-#endif
void predictArgumentTypes(CodeBlock*);
@@ -259,7 +272,7 @@ public:
}
Vector< OwnPtr<BasicBlock> , 8> m_blocks;
- Vector<NodeIndex, 16> m_varArgChildren;
+ Vector<NodeUse, 16> m_varArgChildren;
Vector<StorageAccessData> m_storageAccessData;
Vector<ResolveGlobalData> m_resolveGlobalData;
Vector<NodeIndex, 8> m_arguments;
diff --git a/Source/JavaScriptCore/dfg/DFGJITCompiler.h b/Source/JavaScriptCore/dfg/DFGJITCompiler.h
index 451bee6ca..5596876fc 100644
--- a/Source/JavaScriptCore/dfg/DFGJITCompiler.h
+++ b/Source/JavaScriptCore/dfg/DFGJITCompiler.h
@@ -272,6 +272,7 @@ public:
// Helper methods to get predictions
PredictedType getPrediction(Node& node) { return node.prediction(); }
PredictedType getPrediction(NodeIndex nodeIndex) { return getPrediction(graph()[nodeIndex]); }
+ PredictedType getPrediction(NodeUse nodeUse) { return getPrediction(nodeUse.index()); }
#if USE(JSVALUE32_64)
void* addressOfDoubleConstant(NodeIndex nodeIndex)
diff --git a/Source/JavaScriptCore/dfg/DFGNode.h b/Source/JavaScriptCore/dfg/DFGNode.h
index 7366c1c40..2b6ebdb7f 100644
--- a/Source/JavaScriptCore/dfg/DFGNode.h
+++ b/Source/JavaScriptCore/dfg/DFGNode.h
@@ -33,6 +33,7 @@
#include "CodeBlock.h"
#include "CodeOrigin.h"
#include "DFGCommon.h"
+#include "DFGNodeReferenceBlob.h"
#include "DFGOperands.h"
#include "DFGVariableAccessData.h"
#include "JSValue.h"
@@ -96,7 +97,6 @@ static inline bool nodeCanSpeculateInteger(ArithNodeFlags flags)
return true;
}
-#ifndef NDEBUG
static inline const char* arithNodeFlagsAsString(ArithNodeFlags flags)
{
if (!flags)
@@ -138,7 +138,6 @@ static inline const char* arithNodeFlagsAsString(ArithNodeFlags flags)
return description;
}
-#endif
// Entries in the NodeType enum (below) are composed of an id, a result type (possibly none)
// and some additional informative flags (must generate, is constant, etc).
@@ -212,11 +211,6 @@ static inline const char* arithNodeFlagsAsString(ArithNodeFlags flags)
macro(ArithMin, NodeResultNumber) \
macro(ArithMax, NodeResultNumber) \
macro(ArithSqrt, NodeResultNumber) \
- /* Arithmetic operators call ToNumber on their operands. */\
- macro(ValueToNumber, NodeResultNumber | NodeMustGenerate) \
- \
- /* A variant of ValueToNumber, which a hint that the parents will always use this as a double. */\
- macro(ValueToDouble, NodeResultNumber | NodeMustGenerate) \
\
/* Add of values may either be arithmetic, or result in string concatenation. */\
macro(ValueAdd, NodeResultJS | NodeMustGenerate | NodeMightClobber) \
@@ -349,36 +343,33 @@ struct Node {
Node(NodeType op, CodeOrigin codeOrigin, NodeIndex child1 = NoNode, NodeIndex child2 = NoNode, NodeIndex child3 = NoNode)
: op(op)
, codeOrigin(codeOrigin)
+ , children(NodeReferenceBlob::Fixed, child1, child2, child3)
, m_virtualRegister(InvalidVirtualRegister)
, m_refCount(0)
, m_prediction(PredictNone)
{
ASSERT(!(op & NodeHasVarArgs));
ASSERT(!hasArithNodeFlags());
- children.fixed.child1 = child1;
- children.fixed.child2 = child2;
- children.fixed.child3 = child3;
}
// Construct a node with up to 3 children and an immediate value.
Node(NodeType op, CodeOrigin codeOrigin, OpInfo imm, NodeIndex child1 = NoNode, NodeIndex child2 = NoNode, NodeIndex child3 = NoNode)
: op(op)
, codeOrigin(codeOrigin)
+ , children(NodeReferenceBlob::Fixed, child1, child2, child3)
, m_virtualRegister(InvalidVirtualRegister)
, m_refCount(0)
, m_opInfo(imm.m_value)
, m_prediction(PredictNone)
{
ASSERT(!(op & NodeHasVarArgs));
- children.fixed.child1 = child1;
- children.fixed.child2 = child2;
- children.fixed.child3 = child3;
}
// Construct a node with up to 3 children and two immediate values.
Node(NodeType op, CodeOrigin codeOrigin, OpInfo imm1, OpInfo imm2, NodeIndex child1 = NoNode, NodeIndex child2 = NoNode, NodeIndex child3 = NoNode)
: op(op)
, codeOrigin(codeOrigin)
+ , children(NodeReferenceBlob::Fixed, child1, child2, child3)
, m_virtualRegister(InvalidVirtualRegister)
, m_refCount(0)
, m_opInfo(imm1.m_value)
@@ -386,15 +377,13 @@ struct Node {
, m_prediction(PredictNone)
{
ASSERT(!(op & NodeHasVarArgs));
- children.fixed.child1 = child1;
- children.fixed.child2 = child2;
- children.fixed.child3 = child3;
}
// Construct a node with a variable number of children and two immediate values.
Node(VarArgTag, NodeType op, CodeOrigin codeOrigin, OpInfo imm1, OpInfo imm2, unsigned firstChild, unsigned numChildren)
: op(op)
, codeOrigin(codeOrigin)
+ , children(NodeReferenceBlob::Variable, firstChild, numChildren)
, m_virtualRegister(InvalidVirtualRegister)
, m_refCount(0)
, m_opInfo(imm1.m_value)
@@ -402,8 +391,6 @@ struct Node {
, m_prediction(PredictNone)
{
ASSERT(op & NodeHasVarArgs);
- children.variable.firstChild = firstChild;
- children.variable.numChildren = numChildren;
}
bool mustGenerate()
@@ -499,7 +486,6 @@ struct Node {
return variableAccessData()->local();
}
-#ifndef NDEBUG
bool hasIdentifier()
{
switch (op) {
@@ -515,7 +501,6 @@ struct Node {
return false;
}
}
-#endif
unsigned identifierNumber()
{
@@ -532,8 +517,6 @@ struct Node {
bool hasArithNodeFlags()
{
switch (op) {
- case ValueToNumber:
- case ValueToDouble:
case UInt32ToNumber:
case ArithAdd:
case ArithSub:
@@ -849,42 +832,42 @@ struct Node {
return !--m_refCount;
}
- NodeIndex child1()
+ NodeUse child1()
{
ASSERT(!(op & NodeHasVarArgs));
- return children.fixed.child1;
+ return children.child1();
}
// This is useful if you want to do a fast check on the first child
// before also doing a check on the opcode. Use this with care and
// avoid it if possible.
- NodeIndex child1Unchecked()
+ NodeUse child1Unchecked()
{
- return children.fixed.child1;
+ return children.child1Unchecked();
}
- NodeIndex child2()
+ NodeUse child2()
{
ASSERT(!(op & NodeHasVarArgs));
- return children.fixed.child2;
+ return children.child2();
}
- NodeIndex child3()
+ NodeUse child3()
{
ASSERT(!(op & NodeHasVarArgs));
- return children.fixed.child3;
+ return children.child3();
}
unsigned firstChild()
{
ASSERT(op & NodeHasVarArgs);
- return children.variable.firstChild;
+ return children.firstChild();
}
unsigned numChildren()
{
ASSERT(op & NodeHasVarArgs);
- return children.variable.numChildren;
+ return children.numChildren();
}
PredictedType prediction()
@@ -1036,35 +1019,25 @@ struct Node {
return nodeCanSpeculateInteger(arithNodeFlags());
}
-#ifndef NDEBUG
void dumpChildren(FILE* out)
{
- if (child1() == NoNode)
+ if (!child1())
return;
- fprintf(out, "@%u", child1());
- if (child2() == NoNode)
+ fprintf(out, "@%u", child1().index());
+ if (!child2())
return;
- fprintf(out, ", @%u", child2());
- if (child3() == NoNode)
+ fprintf(out, ", @%u", child2().index());
+ if (!child3())
return;
- fprintf(out, ", @%u", child3());
+ fprintf(out, ", @%u", child3().index());
}
-#endif
// This enum value describes the type of the node.
NodeType op;
// Used to look up exception handling information (currently implemented as a bytecode index).
CodeOrigin codeOrigin;
- // References to up to 3 children (0 for no child).
- union {
- struct {
- NodeIndex child1, child2, child3;
- } fixed;
- struct {
- unsigned firstChild;
- unsigned numChildren;
- } variable;
- } children;
+ // References to up to 3 children, or links to a variable length set of children.
+ NodeReferenceBlob children;
private:
// The virtual register number (spill location) associated with this .
diff --git a/Source/JavaScriptCore/dfg/DFGNodeReferenceBlob.h b/Source/JavaScriptCore/dfg/DFGNodeReferenceBlob.h
new file mode 100644
index 000000000..df3ff5f5f
--- /dev/null
+++ b/Source/JavaScriptCore/dfg/DFGNodeReferenceBlob.h
@@ -0,0 +1,155 @@
+/*
+ * Copyright (C) 2011 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef DFGNodeReferenceBlob_h
+#define DFGNodeReferenceBlob_h
+
+#include <wtf/Platform.h>
+
+#if ENABLE(DFG_JIT)
+
+#include "DFGCommon.h"
+#include "DFGNodeUse.h"
+
+namespace JSC { namespace DFG {
+
+class NodeReferenceBlob {
+public:
+ enum Kind {
+ Fixed,
+ Variable
+ };
+
+ NodeReferenceBlob(Kind kind)
+#if !ASSERT_DISABLED
+ : m_kind(kind)
+#endif
+ {
+ if (kind == Variable) {
+ m_words[0].m_encodedWord = UINT_MAX;
+ m_words[1].m_encodedWord = UINT_MAX;
+ }
+ }
+
+ NodeReferenceBlob(Kind kind, NodeIndex child1, NodeIndex child2, NodeIndex child3)
+#if !ASSERT_DISABLED
+ : m_kind(Fixed)
+#endif
+ {
+ ASSERT_UNUSED(kind, kind == Fixed);
+ initialize(child1, child2, child3);
+ }
+
+ NodeReferenceBlob(Kind kind, unsigned firstChild, unsigned numChildren)
+#if !ASSERT_DISABLED
+ : m_kind(Variable)
+#endif
+ {
+ ASSERT_UNUSED(kind, kind == Variable);
+ setFirstChild(firstChild);
+ setNumChildren(numChildren);
+ }
+
+ const NodeUse& child(unsigned i) const
+ {
+ ASSERT(i < 3);
+ ASSERT(m_kind == Fixed);
+ return m_words[i];
+ }
+
+ NodeUse& child(unsigned i)
+ {
+ ASSERT(i < 3);
+ ASSERT(m_kind == Fixed);
+ return m_words[i];
+ }
+
+ void setChild(unsigned i, NodeUse nodeUse)
+ {
+ ASSERT(i < 30);
+ ASSERT(m_kind == Fixed);
+ m_words[i] = nodeUse;
+ }
+
+ NodeUse child1() const { return child(0); }
+ NodeUse child2() const { return child(1); }
+ NodeUse child3() const { return child(2); }
+
+ NodeUse& child1() { return child(0); }
+ NodeUse& child2() { return child(1); }
+ NodeUse& child3() { return child(2); }
+
+ void setChild1(NodeUse nodeUse) { setChild(0, nodeUse); }
+ void setChild2(NodeUse nodeUse) { setChild(1, nodeUse); }
+ void setChild3(NodeUse nodeUse) { setChild(2, nodeUse); }
+
+ NodeUse child1Unchecked() const { return m_words[0]; }
+
+ void initialize(NodeUse child1, NodeUse child2, NodeUse child3)
+ {
+ child(0) = child1;
+ child(1) = child2;
+ child(2) = child3;
+ }
+
+ void initialize(NodeIndex child1, NodeIndex child2, NodeIndex child3)
+ {
+ initialize(NodeUse(child1), NodeUse(child2), NodeUse(child3));
+ }
+
+ unsigned firstChild() const
+ {
+ ASSERT(m_kind == Variable);
+ return m_words[0].m_encodedWord;
+ }
+ void setFirstChild(unsigned firstChild)
+ {
+ ASSERT(m_kind == Variable);
+ m_words[0].m_encodedWord = firstChild;
+ }
+
+ unsigned numChildren() const
+ {
+ ASSERT(m_kind == Variable);
+ return m_words[1].m_encodedWord;
+ }
+ void setNumChildren(unsigned numChildren)
+ {
+ ASSERT(m_kind == Variable);
+ m_words[1].m_encodedWord = numChildren;
+ }
+
+private:
+ NodeUse m_words[3];
+#if !ASSERT_DISABLED
+ Kind m_kind;
+#endif
+};
+
+} } // namespace JSC::DFG
+
+#endif // ENABLE(DFG_JIT)
+
+#endif // DFGNodeReferenceBlob_h
diff --git a/Source/JavaScriptCore/dfg/DFGNodeUse.h b/Source/JavaScriptCore/dfg/DFGNodeUse.h
new file mode 100644
index 000000000..71154997c
--- /dev/null
+++ b/Source/JavaScriptCore/dfg/DFGNodeUse.h
@@ -0,0 +1,130 @@
+/*
+ * Copyright (C) 2011 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef DFGNodeUse_h
+#define DFGNodeUse_h
+
+#include <wtf/Platform.h>
+
+#if ENABLE(DFG_JIT)
+
+#include "DFGCommon.h"
+
+namespace JSC { namespace DFG {
+
+class NodeReferenceBlob;
+
+class NodeUse {
+public:
+ NodeUse()
+ : m_encodedWord(makeWord(NoNode, UntypedUse))
+ {
+ }
+
+ explicit NodeUse(NodeIndex nodeIndex)
+ : m_encodedWord(makeWord(nodeIndex, UntypedUse))
+ {
+ }
+
+ NodeUse(NodeIndex nodeIndex, UseKind useKind)
+ : m_encodedWord(makeWord(nodeIndex, useKind))
+ {
+ }
+
+ NodeIndex indexUnchecked() const { return m_encodedWord >> shift(); }
+ NodeIndex index() const
+ {
+ ASSERT(isSet());
+ return m_encodedWord >> shift();
+ }
+ void setIndex(NodeIndex nodeIndex)
+ {
+ m_encodedWord = makeWord(nodeIndex, useKind());
+ }
+
+ UseKind useKind() const
+ {
+ ASSERT(isSet());
+ unsigned masked = m_encodedWord & (((1 << shift()) - 1));
+ ASSERT(masked < LastUseKind);
+ return static_cast<UseKind>(masked);
+ }
+ void setUseKind(UseKind useKind)
+ {
+ ASSERT(isSet());
+ m_encodedWord = makeWord(index(), useKind);
+ }
+
+ bool isSet() const { return indexUnchecked() != NoNode; }
+ bool operator!() const { return !isSet(); }
+
+ bool operator==(NodeUse other) const
+ {
+ return m_encodedWord == other.m_encodedWord;
+ }
+ bool operator!=(NodeUse other) const
+ {
+ return m_encodedWord != other.m_encodedWord;
+ }
+
+private:
+ friend class NodeReferenceBlob;
+
+ static uint32_t shift() { return 4; }
+
+ static int32_t makeWord(NodeIndex nodeIndex, UseKind useKind)
+ {
+ ASSERT(static_cast<uint32_t>(((static_cast<int32_t>(nodeIndex) << shift()) >> shift())) == nodeIndex);
+ ASSERT(useKind >= 0 && useKind < LastUseKind);
+ ASSERT(LastUseKind <= (1 << shift()));
+ return (nodeIndex << shift()) | useKind;
+ }
+
+ int32_t m_encodedWord;
+};
+
+inline bool operator==(NodeUse nodeUse, NodeIndex nodeIndex)
+{
+ return nodeUse.indexUnchecked() == nodeIndex;
+}
+inline bool operator==(NodeIndex nodeIndex, NodeUse nodeUse)
+{
+ return nodeUse.indexUnchecked() == nodeIndex;
+}
+inline bool operator!=(NodeUse nodeUse, NodeIndex nodeIndex)
+{
+ return nodeUse.indexUnchecked() != nodeIndex;
+}
+inline bool operator!=(NodeIndex nodeIndex, NodeUse nodeUse)
+{
+ return nodeUse.indexUnchecked() != nodeIndex;
+}
+
+} } // namespace JSC::DFG
+
+#endif // ENABLE(DFG_JIT)
+
+#endif // DFGNodeUse_h
+
diff --git a/Source/JavaScriptCore/dfg/DFGOSRExit.cpp b/Source/JavaScriptCore/dfg/DFGOSRExit.cpp
index 7b1941146..113f2ea0d 100644
--- a/Source/JavaScriptCore/dfg/DFGOSRExit.cpp
+++ b/Source/JavaScriptCore/dfg/DFGOSRExit.cpp
@@ -53,7 +53,6 @@ OSRExit::OSRExit(ExitKind kind, JSValueSource jsValueSource, ValueProfile* value
m_variables[variable] = jit->computeValueRecoveryFor(jit->m_variables[variable]);
}
-#ifndef NDEBUG
void OSRExit::dump(FILE* out) const
{
for (unsigned argument = 0; argument < m_arguments.size(); ++argument)
@@ -62,7 +61,6 @@ void OSRExit::dump(FILE* out) const
for (unsigned variable = 0; variable < m_variables.size(); ++variable)
m_variables[variable].dump(out);
}
-#endif
bool OSRExit::considerAddingAsFrequentExitSiteSlow(CodeBlock* dfgCodeBlock, CodeBlock* profiledCodeBlock)
{
diff --git a/Source/JavaScriptCore/dfg/DFGOSRExit.h b/Source/JavaScriptCore/dfg/DFGOSRExit.h
index cf96f4f3a..8e3fa6a5d 100644
--- a/Source/JavaScriptCore/dfg/DFGOSRExit.h
+++ b/Source/JavaScriptCore/dfg/DFGOSRExit.h
@@ -137,9 +137,7 @@ struct OSRExit {
return considerAddingAsFrequentExitSiteSlow(dfgCodeBlock, profiledCodeBlock);
}
-#ifndef NDEBUG
void dump(FILE* out) const;
-#endif
Vector<ValueRecovery, 0> m_arguments;
Vector<ValueRecovery, 0> m_variables;
diff --git a/Source/JavaScriptCore/dfg/DFGPropagator.cpp b/Source/JavaScriptCore/dfg/DFGPropagator.cpp
index acfd2d364..f00f13e96 100644
--- a/Source/JavaScriptCore/dfg/DFGPropagator.cpp
+++ b/Source/JavaScriptCore/dfg/DFGPropagator.cpp
@@ -138,8 +138,6 @@ private:
break;
}
- case ValueToNumber:
- case ValueToDouble:
case UInt32ToNumber: {
changed |= m_graph[node.child1()].mergeArithNodeFlags(flags);
break;
@@ -147,7 +145,7 @@ private:
case ArithAdd:
case ValueAdd: {
- if (isNotNegZero(node.child1()) || isNotNegZero(node.child2()))
+ if (isNotNegZero(node.child1().index()) || isNotNegZero(node.child2().index()))
flags &= ~NodeNeedsNegZero;
changed |= m_graph[node.child1()].mergeArithNodeFlags(flags);
@@ -156,7 +154,7 @@ private:
}
case ArithSub: {
- if (isNotZero(node.child1()) || isNotZero(node.child2()))
+ if (isNotZero(node.child1().index()) || isNotZero(node.child2().index()))
flags &= ~NodeNeedsNegZero;
changed |= m_graph[node.child1()].mergeArithNodeFlags(flags);
@@ -210,13 +208,13 @@ private:
for (unsigned childIdx = node.firstChild(); childIdx < node.firstChild() + node.numChildren(); childIdx++)
changed |= m_graph[m_graph.m_varArgChildren[childIdx]].mergeArithNodeFlags(flags);
} else {
- if (node.child1() == NoNode)
+ if (!node.child1())
break;
changed |= m_graph[node.child1()].mergeArithNodeFlags(flags);
- if (node.child2() == NoNode)
+ if (!node.child2())
break;
changed |= m_graph[node.child2()].mergeArithNodeFlags(flags);
- if (node.child3() == NoNode)
+ if (!node.child3())
break;
changed |= m_graph[node.child3()].mergeArithNodeFlags(flags);
}
@@ -363,19 +361,6 @@ private:
break;
}
- case ValueToNumber: {
- PredictedType prediction = m_graph[node.child1()].prediction();
-
- if (prediction) {
- if (!(prediction & PredictDouble) && nodeCanSpeculateInteger(node.arithNodeFlags()))
- changed |= mergePrediction(PredictInt32);
- else
- changed |= mergePrediction(PredictNumber);
- }
-
- break;
- }
-
case ValueAdd: {
PredictedType left = m_graph[node.child1()].prediction();
PredictedType right = m_graph[node.child2()].prediction();
@@ -597,7 +582,6 @@ private:
break;
}
- case ValueToDouble:
case GetArrayLength:
case GetByteArrayLength:
case GetInt8ArrayLength:
@@ -676,21 +660,19 @@ private:
propagateNodePredictions(m_graph[m_compileIndex]);
}
- void vote(NodeIndex nodeIndex, VariableAccessData::Ballot ballot)
+ void vote(NodeUse nodeUse, VariableAccessData::Ballot ballot)
{
- switch (m_graph[nodeIndex].op) {
- case ValueToNumber:
- case ValueToDouble:
+ switch (m_graph[nodeUse].op) {
case ValueToInt32:
case UInt32ToNumber:
- nodeIndex = m_graph[nodeIndex].child1();
+ nodeUse = m_graph[nodeUse].child1();
break;
default:
break;
}
- if (m_graph[nodeIndex].op == GetLocal)
- m_graph[nodeIndex].variableAccessData()->vote(ballot);
+ if (m_graph[nodeUse].op == GetLocal)
+ m_graph[nodeUse].variableAccessData()->vote(ballot);
}
void vote(Node& node, VariableAccessData::Ballot ballot)
@@ -701,13 +683,13 @@ private:
return;
}
- if (node.child1() == NoNode)
+ if (!node.child1())
return;
vote(node.child1(), ballot);
- if (node.child2() == NoNode)
+ if (!node.child2())
return;
vote(node.child2(), ballot);
- if (node.child3() == NoNode)
+ if (!node.child3())
return;
vote(node.child3(), ballot);
}
@@ -775,11 +757,6 @@ private:
vote(node.child1(), VariableAccessData::VoteDouble);
break;
- case ValueToNumber:
- case ValueToDouble:
- // Don't vote.
- break;
-
case SetLocal: {
PredictedType prediction = m_graph[node.child1()].prediction();
if (isDoublePrediction(prediction))
@@ -835,16 +812,6 @@ private:
} while (m_changed);
}
- void toDouble(NodeIndex nodeIndex)
- {
- if (m_graph[nodeIndex].op == ValueToNumber) {
-#if DFG_ENABLE(DEBUG_PROPAGATION_VERBOSE)
- printf(" @%u -> ValueToDouble", nodeIndex);
-#endif
- m_graph[nodeIndex].op = ValueToDouble;
- }
- }
-
void fixupNode(Node& node)
{
if (!node.shouldGenerate())
@@ -857,60 +824,6 @@ private:
#endif
switch (op) {
- case ValueAdd:
- case ArithAdd:
- case ArithSub: {
- PredictedType left = m_graph[node.child1()].prediction();
- PredictedType right = m_graph[node.child2()].prediction();
-
- if (left && right
- && isNumberPrediction(left) && isNumberPrediction(right)
- && !m_graph.addShouldSpeculateInteger(node, m_codeBlock)) {
- toDouble(node.child1());
- toDouble(node.child2());
- }
- break;
- }
-
- case ArithMul:
- case ArithMin:
- case ArithMax:
- case ArithMod:
- case ArithDiv: {
- if (!nodeCanSpeculateInteger(node.arithNodeFlags())) {
- toDouble(node.child1());
- toDouble(node.child2());
- break;
- }
-
- PredictedType left = m_graph[node.child1()].prediction();
- PredictedType right = m_graph[node.child2()].prediction();
-
- if (left && right
- && ((left & PredictDouble) || (right & PredictDouble))) {
- toDouble(node.child1());
- toDouble(node.child2());
- }
- break;
- }
-
- case ArithAbs: {
- if (!nodeCanSpeculateInteger(node.arithNodeFlags())) {
- toDouble(node.child1());
- break;
- }
-
- PredictedType prediction = m_graph[node.child1()].prediction();
- if (prediction & PredictDouble)
- toDouble(node.child1());
- break;
- }
-
- case ArithSqrt: {
- toDouble(node.child1());
- break;
- }
-
case GetById: {
if (!isInt32Prediction(m_graph[m_compileIndex].prediction()))
break;
@@ -977,8 +890,8 @@ private:
case GetByVal:
case StringCharAt:
case StringCharCodeAt: {
- if (node.child3() != NoNode && m_graph[node.child3()].op == Nop)
- node.children.fixed.child3 = NoNode;
+ if (!!node.child3() && m_graph[node.child3()].op == Nop)
+ node.children.child3() = NodeUse();
break;
}
default:
@@ -1004,14 +917,15 @@ private:
if (nodeIndex == NoNode)
return NoNode;
- if (m_graph[nodeIndex].op == ValueToNumber)
- nodeIndex = m_graph[nodeIndex].child1();
-
if (m_graph[nodeIndex].op == ValueToInt32)
- nodeIndex = m_graph[nodeIndex].child1();
+ nodeIndex = m_graph[nodeIndex].child1().index();
return nodeIndex;
}
+ NodeIndex canonicalize(NodeUse nodeUse)
+ {
+ return canonicalize(nodeUse.indexUnchecked());
+ }
// Computes where the search for a candidate for CSE should start. Don't call
// this directly; call startIndex() instead as it does logging in debug mode.
@@ -1061,7 +975,10 @@ private:
NodeIndex startIndex()
{
Node& node = m_graph[m_compileIndex];
- return startIndexForChildren(node.child1(), node.child2(), node.child3());
+ return startIndexForChildren(
+ node.child1().indexUnchecked(),
+ node.child2().indexUnchecked(),
+ node.child3().indexUnchecked());
}
NodeIndex endIndexForPureCSE()
@@ -1207,7 +1124,7 @@ private:
break;
case PutGlobalVar:
if (node.varNumber() == varNumber && m_codeBlock->globalObjectFor(node.codeOrigin) == globalObject)
- return node.child1();
+ return node.child1().index();
break;
default:
break;
@@ -1235,7 +1152,7 @@ private:
if (!byValIsPure(node))
return NoNode;
if (node.child1() == child1 && canonicalize(node.child2()) == canonicalize(child2))
- return node.child3();
+ return node.child3().index();
// We must assume that the PutByVal will clobber the location we're getting from.
// FIXME: We can do better; if we know that the PutByVal is accessing an array of a
// different type than the GetByVal, then we know that they won't clobber each other.
@@ -1328,7 +1245,7 @@ private:
case PutByOffset:
if (m_graph.m_storageAccessData[node.storageAccessDataIndex()].identifierNumber == identifierNumber) {
if (node.child2() == child1)
- return node.child3();
+ return node.child3().index();
return NoNode;
}
break;
@@ -1442,22 +1359,22 @@ private:
return NoNode;
}
- void performSubstitution(NodeIndex& child, bool addRef = true)
+ void performSubstitution(NodeUse& child, bool addRef = true)
{
// Check if this operand is actually unused.
- if (child == NoNode)
+ if (!child)
return;
// Check if there is any replacement.
- NodeIndex replacement = m_replacements[child];
+ NodeIndex replacement = m_replacements[child.index()];
if (replacement == NoNode)
return;
- child = replacement;
+ child.setIndex(replacement);
// There is definitely a replacement. Assert that the replacement does not
// have a replacement.
- ASSERT(m_replacements[child] == NoNode);
+ ASSERT(m_replacements[child.index()] == NoNode);
if (addRef)
m_graph[child].ref();
@@ -1505,9 +1422,9 @@ private:
for (unsigned childIdx = node.firstChild(); childIdx < node.firstChild() + node.numChildren(); childIdx++)
performSubstitution(m_graph.m_varArgChildren[childIdx], shouldGenerate);
} else {
- performSubstitution(node.children.fixed.child1, shouldGenerate);
- performSubstitution(node.children.fixed.child2, shouldGenerate);
- performSubstitution(node.children.fixed.child3, shouldGenerate);
+ performSubstitution(node.children.child1(), shouldGenerate);
+ performSubstitution(node.children.child2(), shouldGenerate);
+ performSubstitution(node.children.child3(), shouldGenerate);
}
if (!shouldGenerate)
@@ -1602,37 +1519,37 @@ private:
case GetByVal:
if (byValIsPure(node))
- setReplacement(getByValLoadElimination(node.child1(), node.child2()));
+ setReplacement(getByValLoadElimination(node.child1().index(), node.child2().index()));
break;
case PutByVal:
- if (byValIsPure(node) && getByValLoadElimination(node.child1(), node.child2()) != NoNode)
+ if (byValIsPure(node) && getByValLoadElimination(node.child1().index(), node.child2().index()) != NoNode)
node.op = PutByValAlias;
break;
case CheckStructure:
- if (checkStructureLoadElimination(node.structureSet(), node.child1()))
+ if (checkStructureLoadElimination(node.structureSet(), node.child1().index()))
eliminate();
break;
case CheckFunction:
- if (checkFunctionElimination(node.function(), node.child1()))
+ if (checkFunctionElimination(node.function(), node.child1().index()))
eliminate();
break;
case GetIndexedPropertyStorage: {
PredictedType basePrediction = m_graph[node.child2()].prediction();
bool nodeHasIntegerIndexPrediction = !(!(basePrediction & PredictInt32) && basePrediction);
- setReplacement(getIndexedPropertyStorageLoadElimination(node.child1(), nodeHasIntegerIndexPrediction));
+ setReplacement(getIndexedPropertyStorageLoadElimination(node.child1().index(), nodeHasIntegerIndexPrediction));
break;
}
case GetPropertyStorage:
- setReplacement(getPropertyStorageLoadElimination(node.child1()));
+ setReplacement(getPropertyStorageLoadElimination(node.child1().index()));
break;
case GetByOffset:
- setReplacement(getByOffsetLoadElimination(m_graph.m_storageAccessData[node.storageAccessDataIndex()].identifierNumber, node.child1()));
+ setReplacement(getByOffsetLoadElimination(m_graph.m_storageAccessData[node.storageAccessDataIndex()].identifierNumber, node.child1().index()));
break;
default:
diff --git a/Source/JavaScriptCore/dfg/DFGScoreBoard.h b/Source/JavaScriptCore/dfg/DFGScoreBoard.h
index 7f9211a26..cc3272812 100644
--- a/Source/JavaScriptCore/dfg/DFGScoreBoard.h
+++ b/Source/JavaScriptCore/dfg/DFGScoreBoard.h
@@ -28,7 +28,7 @@
#if ENABLE(DFG_JIT)
-#include <dfg/DFGGraph.h>
+#include "DFGGraph.h"
#include <wtf/BitVector.h>
#include <wtf/Vector.h>
@@ -106,6 +106,10 @@ public:
m_free.append(index);
}
}
+ void use(NodeUse child)
+ {
+ use(child.indexUnchecked());
+ }
unsigned highWatermark()
{
diff --git a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
index e647fb87a..77b3e54b1 100644
--- a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
+++ b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
@@ -87,22 +87,22 @@ void SpeculativeJIT::useChildren(Node& node)
for (unsigned childIdx = node.firstChild(); childIdx < node.firstChild() + node.numChildren(); childIdx++)
use(m_jit.graph().m_varArgChildren[childIdx]);
} else {
- NodeIndex child1 = node.child1();
- if (child1 == NoNode) {
- ASSERT(node.child2() == NoNode && node.child3() == NoNode);
+ NodeUse child1 = node.child1();
+ if (!child1) {
+ ASSERT(!node.child2() && !node.child3());
return;
}
use(child1);
- NodeIndex child2 = node.child2();
- if (child2 == NoNode) {
- ASSERT(node.child3() == NoNode);
+ NodeUse child2 = node.child2();
+ if (!child2) {
+ ASSERT(!node.child3());
return;
}
use(child2);
- NodeIndex child3 = node.child3();
- if (child3 == NoNode)
+ NodeUse child3 = node.child3();
+ if (!child3)
return;
use(child3);
}
@@ -249,7 +249,7 @@ void SpeculativeJIT::markCellCard(MacroAssembler& jit, GPRReg owner, GPRReg scra
#endif
}
-void SpeculativeJIT::writeBarrier(GPRReg ownerGPR, GPRReg valueGPR, NodeIndex valueIndex, WriteBarrierUseKind useKind, GPRReg scratch1, GPRReg scratch2)
+void SpeculativeJIT::writeBarrier(GPRReg ownerGPR, GPRReg valueGPR, NodeUse valueUse, WriteBarrierUseKind useKind, GPRReg scratch1, GPRReg scratch2)
{
UNUSED_PARAM(ownerGPR);
UNUSED_PARAM(valueGPR);
@@ -257,7 +257,7 @@ void SpeculativeJIT::writeBarrier(GPRReg ownerGPR, GPRReg valueGPR, NodeIndex va
UNUSED_PARAM(scratch2);
UNUSED_PARAM(useKind);
- if (isKnownNotCell(valueIndex))
+ if (isKnownNotCell(valueUse.index()))
return;
#if ENABLE(WRITE_BARRIER_PROFILING)
@@ -280,7 +280,7 @@ void SpeculativeJIT::writeBarrier(GPRReg ownerGPR, GPRReg valueGPR, NodeIndex va
JITCompiler::Jump rhsNotCell;
bool hadCellCheck = false;
- if (!isKnownCell(valueIndex) && !isCellPrediction(m_jit.getPrediction(valueIndex))) {
+ if (!isKnownCell(valueUse.index()) && !isCellPrediction(m_jit.getPrediction(valueUse.index()))) {
hadCellCheck = true;
rhsNotCell = m_jit.branchIfNotCell(valueGPR);
}
@@ -325,14 +325,14 @@ void SpeculativeJIT::writeBarrier(GPRReg ownerGPR, JSCell* value, WriteBarrierUs
#endif
}
-void SpeculativeJIT::writeBarrier(JSCell* owner, GPRReg valueGPR, NodeIndex valueIndex, WriteBarrierUseKind useKind, GPRReg scratch)
+void SpeculativeJIT::writeBarrier(JSCell* owner, GPRReg valueGPR, NodeUse valueUse, WriteBarrierUseKind useKind, GPRReg scratch)
{
UNUSED_PARAM(owner);
UNUSED_PARAM(valueGPR);
UNUSED_PARAM(scratch);
UNUSED_PARAM(useKind);
- if (isKnownNotCell(valueIndex))
+ if (isKnownNotCell(valueUse.index()))
return;
#if ENABLE(WRITE_BARRIER_PROFILING)
@@ -342,7 +342,7 @@ void SpeculativeJIT::writeBarrier(JSCell* owner, GPRReg valueGPR, NodeIndex valu
#if ENABLE(GGC)
JITCompiler::Jump rhsNotCell;
bool hadCellCheck = false;
- if (!isKnownCell(valueIndex) && !isCellPrediction(m_jit.getPrediction(valueIndex))) {
+ if (!isKnownCell(valueUse.index()) && !isCellPrediction(m_jit.getPrediction(valueUse.index()))) {
hadCellCheck = true;
rhsNotCell = m_jit.branchIfNotCell(valueGPR);
}
@@ -383,7 +383,7 @@ bool SpeculativeJIT::nonSpeculativeCompare(Node& node, MacroAssembler::Relationa
bool SpeculativeJIT::nonSpeculativeStrictEq(Node& node, bool invert)
{
- if (!invert && (isKnownNumeric(node.child1()) || isKnownNumeric(node.child2())))
+ if (!invert && (isKnownNumeric(node.child1().index()) || isKnownNumeric(node.child2().index())))
return nonSpeculativeCompare(node, MacroAssembler::Equal, operationCompareStrictEq);
NodeIndex branchNodeIndex = detectPeepHoleBranch();
@@ -831,9 +831,9 @@ void SpeculativeJIT::compilePeepHoleObjectEquality(Node& node, NodeIndex branchN
GPRReg op2GPR = op2.gpr();
if (!predictionCheck(m_state.forNode(node.child1()).m_type))
- speculationCheck(BadType, JSValueSource::unboxedCell(op1GPR), node.child1(), m_jit.branchPtr(MacroAssembler::NotEqual, MacroAssembler::Address(op1GPR, JSCell::classInfoOffset()), MacroAssembler::TrustedImmPtr(classInfo)));
+ speculationCheck(BadType, JSValueSource::unboxedCell(op1GPR), node.child1().index(), m_jit.branchPtr(MacroAssembler::NotEqual, MacroAssembler::Address(op1GPR, JSCell::classInfoOffset()), MacroAssembler::TrustedImmPtr(classInfo)));
if (!predictionCheck(m_state.forNode(node.child2()).m_type))
- speculationCheck(BadType, JSValueSource::unboxedCell(op2GPR), node.child2(), m_jit.branchPtr(MacroAssembler::NotEqual, MacroAssembler::Address(op2GPR, JSCell::classInfoOffset()), MacroAssembler::TrustedImmPtr(classInfo)));
+ speculationCheck(BadType, JSValueSource::unboxedCell(op2GPR), node.child2().index(), m_jit.branchPtr(MacroAssembler::NotEqual, MacroAssembler::Address(op2GPR, JSCell::classInfoOffset()), MacroAssembler::TrustedImmPtr(classInfo)));
addBranch(m_jit.branchPtr(condition, op1GPR, op2GPR), taken);
if (notTaken != (m_block + 1))
@@ -855,13 +855,13 @@ void SpeculativeJIT::compilePeepHoleIntegerBranch(Node& node, NodeIndex branchNo
notTaken = tmp;
}
- if (isInt32Constant(node.child1())) {
- int32_t imm = valueOfInt32Constant(node.child1());
+ if (isInt32Constant(node.child1().index())) {
+ int32_t imm = valueOfInt32Constant(node.child1().index());
SpeculateIntegerOperand op2(this, node.child2());
addBranch(m_jit.branch32(condition, JITCompiler::Imm32(imm), op2.gpr()), taken);
- } else if (isInt32Constant(node.child2())) {
+ } else if (isInt32Constant(node.child2().index())) {
SpeculateIntegerOperand op1(this, node.child1());
- int32_t imm = valueOfInt32Constant(node.child2());
+ int32_t imm = valueOfInt32Constant(node.child2().index());
addBranch(m_jit.branch32(condition, op1.gpr(), JITCompiler::Imm32(imm)), taken);
} else {
SpeculateIntegerOperand op1(this, node.child1());
@@ -913,7 +913,7 @@ void SpeculativeJIT::compileMovHint(Node& node)
{
ASSERT(node.op == SetLocal);
- setNodeIndexForOperand(node.child1(), node.local());
+ setNodeIndexForOperand(node.child1().index(), node.local());
m_lastSetOperand = node.local();
}
@@ -1268,15 +1268,8 @@ ValueRecovery SpeculativeJIT::computeValueRecoveryFor(const ValueSource& valueSo
// Try to see if there is an alternate node that would contain the value we want.
// There are four possibilities:
//
- // ValueToNumber: If the only live version of the value is a ValueToNumber node
- // then it means that all remaining uses of the value would have performed a
- // ValueToNumber conversion anyway. Thus, we can substitute ValueToNumber.
- //
- // ValueToInt32: Likewise, if the only remaining live version of the value is
- // ValueToInt32, then we can use it. But if there is both a ValueToInt32
- // and a ValueToNumber, then we better go with ValueToNumber because it
- // means that some remaining uses would have converted to number while
- // others would have converted to Int32.
+ // ValueToInt32: If the only remaining live version of the value is
+ // ValueToInt32, then we can use it.
//
// UInt32ToNumber: If the only live version of the value is a UInt32ToNumber
// then the only remaining uses are ones that want a properly formed number
@@ -1289,7 +1282,7 @@ ValueRecovery SpeculativeJIT::computeValueRecoveryFor(const ValueSource& valueSo
bool found = false;
if (nodePtr->op == UInt32ToNumber) {
- NodeIndex nodeIndex = nodePtr->child1();
+ NodeIndex nodeIndex = nodePtr->child1().index();
nodePtr = &at(nodeIndex);
infoPtr = &m_generationInfo[nodePtr->virtualRegister()];
if (infoPtr->alive() && infoPtr->nodeIndex() == nodeIndex)
@@ -1297,7 +1290,6 @@ ValueRecovery SpeculativeJIT::computeValueRecoveryFor(const ValueSource& valueSo
}
if (!found) {
- NodeIndex valueToNumberIndex = NoNode;
NodeIndex valueToInt32Index = NoNode;
NodeIndex uint32ToNumberIndex = NoNode;
@@ -1311,10 +1303,6 @@ ValueRecovery SpeculativeJIT::computeValueRecoveryFor(const ValueSource& valueSo
if (node.child1Unchecked() != valueSource.nodeIndex())
continue;
switch (node.op) {
- case ValueToNumber:
- case ValueToDouble:
- valueToNumberIndex = info.nodeIndex();
- break;
case ValueToInt32:
valueToInt32Index = info.nodeIndex();
break;
@@ -1327,9 +1315,7 @@ ValueRecovery SpeculativeJIT::computeValueRecoveryFor(const ValueSource& valueSo
}
NodeIndex nodeIndexToUse;
- if (valueToNumberIndex != NoNode)
- nodeIndexToUse = valueToNumberIndex;
- else if (valueToInt32Index != NoNode)
+ if (valueToInt32Index != NoNode)
nodeIndexToUse = valueToInt32Index;
else if (uint32ToNumberIndex != NoNode)
nodeIndexToUse = uint32ToNumberIndex;
@@ -1594,16 +1580,16 @@ static void compileClampDoubleToByte(JITCompiler& jit, GPRReg result, FPRReg sou
void SpeculativeJIT::compilePutByValForByteArray(GPRReg base, GPRReg property, Node& node)
{
- NodeIndex baseIndex = node.child1();
- NodeIndex valueIndex = node.child3();
+ NodeUse baseUse = node.child1();
+ NodeUse valueUse = node.child3();
- if (!isByteArrayPrediction(m_state.forNode(baseIndex).m_type))
- speculationCheck(BadType, JSValueSource::unboxedCell(base), baseIndex, m_jit.branchPtr(MacroAssembler::NotEqual, MacroAssembler::Address(base, JSCell::classInfoOffset()), MacroAssembler::TrustedImmPtr(&JSByteArray::s_info)));
+ if (!isByteArrayPrediction(m_state.forNode(baseUse).m_type))
+ speculationCheck(BadType, JSValueSource::unboxedCell(base), baseUse.index(), m_jit.branchPtr(MacroAssembler::NotEqual, MacroAssembler::Address(base, JSCell::classInfoOffset()), MacroAssembler::TrustedImmPtr(&JSByteArray::s_info)));
GPRTemporary value;
GPRReg valueGPR;
- if (at(valueIndex).isConstant()) {
- JSValue jsValue = valueOfJSConstant(valueIndex);
+ if (at(valueUse).isConstant()) {
+ JSValue jsValue = valueOfJSConstant(valueUse.index());
if (!jsValue.isNumber()) {
terminateSpeculativeExecution(Uncountable, JSValueRegs(), NoNode);
noResult(m_compileIndex);
@@ -1615,8 +1601,8 @@ void SpeculativeJIT::compilePutByValForByteArray(GPRReg base, GPRReg property, N
m_jit.move(Imm32(clampedValue), scratchReg);
value.adopt(scratch);
valueGPR = scratchReg;
- } else if (!at(valueIndex).shouldNotSpeculateInteger()) {
- SpeculateIntegerOperand valueOp(this, valueIndex);
+ } else if (!at(valueUse).shouldNotSpeculateInteger()) {
+ SpeculateIntegerOperand valueOp(this, valueUse);
GPRTemporary scratch(this);
GPRReg scratchReg = scratch.gpr();
m_jit.move(valueOp.gpr(), scratchReg);
@@ -1624,7 +1610,7 @@ void SpeculativeJIT::compilePutByValForByteArray(GPRReg base, GPRReg property, N
value.adopt(scratch);
valueGPR = scratchReg;
} else {
- SpeculateDoubleOperand valueOp(this, valueIndex);
+ SpeculateDoubleOperand valueOp(this, valueUse);
GPRTemporary result(this);
FPRTemporary floatScratch(this);
FPRReg fpr = valueOp.fpr();
@@ -1745,16 +1731,16 @@ void SpeculativeJIT::compileGetByValOnIntTypedArray(const TypedArrayDescriptor&
void SpeculativeJIT::compilePutByValForIntTypedArray(const TypedArrayDescriptor& descriptor, GPRReg base, GPRReg property, Node& node, size_t elementSize, TypedArraySpeculationRequirements speculationRequirements, TypedArraySignedness signedness, TypedArrayRounding rounding)
{
- NodeIndex baseIndex = node.child1();
- NodeIndex valueIndex = node.child3();
+ NodeUse baseUse = node.child1();
+ NodeUse valueUse = node.child3();
if (speculationRequirements != NoTypedArrayTypeSpecCheck)
- speculationCheck(BadType, JSValueSource::unboxedCell(base), baseIndex, m_jit.branchPtr(MacroAssembler::NotEqual, MacroAssembler::Address(base, JSCell::classInfoOffset()), MacroAssembler::TrustedImmPtr(descriptor.m_classInfo)));
+ speculationCheck(BadType, JSValueSource::unboxedCell(base), baseUse, m_jit.branchPtr(MacroAssembler::NotEqual, MacroAssembler::Address(base, JSCell::classInfoOffset()), MacroAssembler::TrustedImmPtr(descriptor.m_classInfo)));
GPRTemporary value;
GPRReg valueGPR;
- if (at(valueIndex).isConstant()) {
- JSValue jsValue = valueOfJSConstant(valueIndex);
+ if (at(valueUse).isConstant()) {
+ JSValue jsValue = valueOfJSConstant(valueUse.index());
if (!jsValue.isNumber()) {
terminateSpeculativeExecution(Uncountable, JSValueRegs(), NoNode);
noResult(m_compileIndex);
@@ -1770,8 +1756,8 @@ void SpeculativeJIT::compilePutByValForIntTypedArray(const TypedArrayDescriptor&
m_jit.move(Imm32(static_cast<int>(d)), scratchReg);
value.adopt(scratch);
valueGPR = scratchReg;
- } else if (!at(valueIndex).shouldNotSpeculateInteger()) {
- SpeculateIntegerOperand valueOp(this, valueIndex);
+ } else if (!at(valueUse).shouldNotSpeculateInteger()) {
+ SpeculateIntegerOperand valueOp(this, valueUse);
GPRTemporary scratch(this);
GPRReg scratchReg = scratch.gpr();
m_jit.move(valueOp.gpr(), scratchReg);
@@ -1783,7 +1769,7 @@ void SpeculativeJIT::compilePutByValForIntTypedArray(const TypedArrayDescriptor&
valueGPR = scratchReg;
} else if (rounding == ClampRounding) {
ASSERT(elementSize == 1);
- SpeculateDoubleOperand valueOp(this, valueIndex);
+ SpeculateDoubleOperand valueOp(this, valueUse);
GPRTemporary result(this);
FPRTemporary floatScratch(this);
FPRReg fpr = valueOp.fpr();
@@ -1792,7 +1778,7 @@ void SpeculativeJIT::compilePutByValForIntTypedArray(const TypedArrayDescriptor&
value.adopt(result);
valueGPR = gpr;
} else {
- SpeculateDoubleOperand valueOp(this, valueIndex);
+ SpeculateDoubleOperand valueOp(this, valueUse);
GPRTemporary result(this);
FPRReg fpr = valueOp.fpr();
GPRReg gpr = result.gpr();
@@ -1891,13 +1877,13 @@ void SpeculativeJIT::compileGetByValOnFloatTypedArray(const TypedArrayDescriptor
void SpeculativeJIT::compilePutByValForFloatTypedArray(const TypedArrayDescriptor& descriptor, GPRReg base, GPRReg property, Node& node, size_t elementSize, TypedArraySpeculationRequirements speculationRequirements)
{
- NodeIndex baseIndex = node.child1();
- NodeIndex valueIndex = node.child3();
+ NodeUse baseUse = node.child1();
+ NodeUse valueUse = node.child3();
- SpeculateDoubleOperand valueOp(this, valueIndex);
+ SpeculateDoubleOperand valueOp(this, valueUse);
if (speculationRequirements != NoTypedArrayTypeSpecCheck)
- speculationCheck(BadType, JSValueSource::unboxedCell(base), baseIndex, m_jit.branchPtr(MacroAssembler::NotEqual, MacroAssembler::Address(base, JSCell::classInfoOffset()), MacroAssembler::TrustedImmPtr(descriptor.m_classInfo)));
+ speculationCheck(BadType, JSValueSource::unboxedCell(base), baseUse.index(), m_jit.branchPtr(MacroAssembler::NotEqual, MacroAssembler::Address(base, JSCell::classInfoOffset()), MacroAssembler::TrustedImmPtr(descriptor.m_classInfo)));
GPRTemporary result(this);
@@ -2042,8 +2028,8 @@ void SpeculativeJIT::compileSoftModulo(Node& node)
SpeculateStrictInt32Operand op1(this, node.child1());
GPRReg op1Gpr = op1.gpr();
- if (isInt32Constant(node.child2())) {
- int32_t divisor = valueOfInt32Constant(node.child2());
+ if (isInt32Constant(node.child2().index())) {
+ int32_t divisor = valueOfInt32Constant(node.child2().index());
if (divisor < 0)
divisor = -divisor;
@@ -2199,8 +2185,8 @@ void SpeculativeJIT::compileSoftModulo(Node& node)
void SpeculativeJIT::compileAdd(Node& node)
{
if (m_jit.graph().addShouldSpeculateInteger(node, m_jit.codeBlock())) {
- if (isNumberConstant(node.child1())) {
- int32_t imm1 = valueOfNumberConstantAsInt32(node.child1());
+ if (isNumberConstant(node.child1().index())) {
+ int32_t imm1 = valueOfNumberConstantAsInt32(node.child1().index());
SpeculateIntegerOperand op2(this, node.child2());
GPRTemporary result(this);
@@ -2214,9 +2200,9 @@ void SpeculativeJIT::compileAdd(Node& node)
return;
}
- if (isNumberConstant(node.child2())) {
+ if (isNumberConstant(node.child2().index())) {
SpeculateIntegerOperand op1(this, node.child1());
- int32_t imm2 = valueOfNumberConstantAsInt32(node.child2());
+ int32_t imm2 = valueOfNumberConstantAsInt32(node.child2().index());
GPRTemporary result(this);
if (nodeCanTruncateInteger(node.arithNodeFlags())) {
@@ -2279,9 +2265,9 @@ void SpeculativeJIT::compileAdd(Node& node)
void SpeculativeJIT::compileArithSub(Node& node)
{
if (m_jit.graph().addShouldSpeculateInteger(node, m_jit.codeBlock())) {
- if (isNumberConstant(node.child2())) {
+ if (isNumberConstant(node.child2().index())) {
SpeculateIntegerOperand op1(this, node.child1());
- int32_t imm2 = valueOfNumberConstantAsInt32(node.child2());
+ int32_t imm2 = valueOfNumberConstantAsInt32(node.child2().index());
GPRTemporary result(this);
if (nodeCanTruncateInteger(node.arithNodeFlags())) {
@@ -2294,8 +2280,8 @@ void SpeculativeJIT::compileArithSub(Node& node)
return;
}
- if (isNumberConstant(node.child1())) {
- int32_t imm1 = valueOfNumberConstantAsInt32(node.child1());
+ if (isNumberConstant(node.child1().index())) {
+ int32_t imm1 = valueOfNumberConstantAsInt32(node.child1().index());
SpeculateIntegerOperand op2(this, node.child2());
GPRTemporary result(this);
@@ -2421,7 +2407,7 @@ bool SpeculativeJIT::compare(Node& node, MacroAssembler::RelationalCondition con
return false;
}
-bool SpeculativeJIT::compileStrictEqForConstant(Node& node, NodeIndex value, JSValue constant)
+bool SpeculativeJIT::compileStrictEqForConstant(Node& node, NodeUse value, JSValue constant)
{
JSValueOperand op1(this, value);
@@ -2498,14 +2484,14 @@ bool SpeculativeJIT::compileStrictEq(Node& node)
// 1) If either operand is a constant and that constant is not a double, integer,
// or string, then do a JSValue comparison.
- if (isJSConstant(node.child1())) {
- JSValue value = valueOfJSConstant(node.child1());
+ if (isJSConstant(node.child1().index())) {
+ JSValue value = valueOfJSConstant(node.child1().index());
if (!value.isNumber() && !value.isString())
return compileStrictEqForConstant(node, node.child2(), value);
}
- if (isJSConstant(node.child2())) {
- JSValue value = valueOfJSConstant(node.child2());
+ if (isJSConstant(node.child2().index())) {
+ JSValue value = valueOfJSConstant(node.child2().index());
if (!value.isNumber() && !value.isString())
return compileStrictEqForConstant(node, node.child1(), value);
}
diff --git a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
index 0098da3a1..cfb2189cf 100644
--- a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
+++ b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
@@ -33,6 +33,7 @@
#include "DFGJITCompiler.h"
#include "DFGOSRExit.h"
#include "DFGOperations.h"
+#include "MarkedAllocator.h"
#include "ValueRecovery.h"
namespace JSC { namespace DFG {
@@ -181,6 +182,10 @@ public:
{
return m_jit.graph()[nodeIndex];
}
+ Node& at(NodeUse nodeUse)
+ {
+ return at(nodeUse.index());
+ }
GPRReg fillInteger(NodeIndex, DataFormat& returnFormat);
FPRReg fillDouble(NodeIndex);
@@ -217,6 +222,10 @@ public:
GenerationInfo& info = m_generationInfo[virtualRegister];
return info.canReuse();
}
+ bool canReuse(NodeUse nodeUse)
+ {
+ return canReuse(nodeUse.index());
+ }
GPRReg reuse(GPRReg reg)
{
m_gprs.lock(reg);
@@ -317,13 +326,17 @@ public:
m_gprs.release(info.gpr());
#endif
}
+ void use(NodeUse nodeUse)
+ {
+ use(nodeUse.index());
+ }
static void markCellCard(MacroAssembler&, GPRReg ownerGPR, GPRReg scratchGPR1, GPRReg scratchGPR2);
static void writeBarrier(MacroAssembler&, GPRReg ownerGPR, GPRReg scratchGPR1, GPRReg scratchGPR2, WriteBarrierUseKind);
- void writeBarrier(GPRReg ownerGPR, GPRReg valueGPR, NodeIndex valueIndex, WriteBarrierUseKind, GPRReg scratchGPR1 = InvalidGPRReg, GPRReg scratchGPR2 = InvalidGPRReg);
+ void writeBarrier(GPRReg ownerGPR, GPRReg valueGPR, NodeUse valueUse, WriteBarrierUseKind, GPRReg scratchGPR1 = InvalidGPRReg, GPRReg scratchGPR2 = InvalidGPRReg);
void writeBarrier(GPRReg ownerGPR, JSCell* value, WriteBarrierUseKind, GPRReg scratchGPR1 = InvalidGPRReg, GPRReg scratchGPR2 = InvalidGPRReg);
- void writeBarrier(JSCell* owner, GPRReg valueGPR, NodeIndex valueIndex, WriteBarrierUseKind, GPRReg scratchGPR1 = InvalidGPRReg);
+ void writeBarrier(JSCell* owner, GPRReg valueGPR, NodeUse valueUse, WriteBarrierUseKind, GPRReg scratchGPR1 = InvalidGPRReg);
static GPRReg selectScratchGPR(GPRReg preserve1 = InvalidGPRReg, GPRReg preserve2 = InvalidGPRReg, GPRReg preserve3 = InvalidGPRReg, GPRReg preserve4 = InvalidGPRReg)
{
@@ -874,7 +887,7 @@ private:
// Check if the lastNode is a branch on this node.
Node& lastNode = at(lastNodeIndex);
- return lastNode.op == Branch && lastNode.child1() == m_compileIndex ? lastNodeIndex : NoNode;
+ return lastNode.op == Branch && lastNode.child1().index() == m_compileIndex ? lastNodeIndex : NoNode;
}
void nonSpeculativeValueToNumber(Node&);
@@ -884,15 +897,15 @@ private:
enum SpillRegistersMode { NeedToSpill, DontSpill };
#if USE(JSVALUE64)
JITCompiler::Call cachedGetById(CodeOrigin, GPRReg baseGPR, GPRReg resultGPR, GPRReg scratchGPR, unsigned identifierNumber, JITCompiler::Jump slowPathTarget = JITCompiler::Jump(), SpillRegistersMode = NeedToSpill);
- void cachedPutById(CodeOrigin, GPRReg base, GPRReg value, NodeIndex valueIndex, GPRReg scratchGPR, unsigned identifierNumber, PutKind, JITCompiler::Jump slowPathTarget = JITCompiler::Jump());
+ void cachedPutById(CodeOrigin, GPRReg base, GPRReg value, NodeUse valueUse, GPRReg scratchGPR, unsigned identifierNumber, PutKind, JITCompiler::Jump slowPathTarget = JITCompiler::Jump());
#elif USE(JSVALUE32_64)
JITCompiler::Call cachedGetById(CodeOrigin, GPRReg baseTagGPROrNone, GPRReg basePayloadGPR, GPRReg resultTagGPR, GPRReg resultPayloadGPR, GPRReg scratchGPR, unsigned identifierNumber, JITCompiler::Jump slowPathTarget = JITCompiler::Jump(), SpillRegistersMode = NeedToSpill);
- void cachedPutById(CodeOrigin, GPRReg basePayloadGPR, GPRReg valueTagGPR, GPRReg valuePayloadGPR, NodeIndex valueIndex, GPRReg scratchGPR, unsigned identifierNumber, PutKind, JITCompiler::Jump slowPathTarget = JITCompiler::Jump());
+ void cachedPutById(CodeOrigin, GPRReg basePayloadGPR, GPRReg valueTagGPR, GPRReg valuePayloadGPR, NodeUse valueUse, GPRReg scratchGPR, unsigned identifierNumber, PutKind, JITCompiler::Jump slowPathTarget = JITCompiler::Jump());
#endif
- void nonSpeculativeNonPeepholeCompareNull(NodeIndex operand, bool invert = false);
- void nonSpeculativePeepholeBranchNull(NodeIndex operand, NodeIndex branchNodeIndex, bool invert = false);
- bool nonSpeculativeCompareNull(Node&, NodeIndex operand, bool invert = false);
+ void nonSpeculativeNonPeepholeCompareNull(NodeUse operand, bool invert = false);
+ void nonSpeculativePeepholeBranchNull(NodeUse operand, NodeIndex branchNodeIndex, bool invert = false);
+ bool nonSpeculativeCompareNull(Node&, NodeUse operand, bool invert = false);
void nonSpeculativePeepholeBranch(Node&, NodeIndex branchNodeIndex, MacroAssembler::RelationalCondition, S_DFGOperation_EJJ helperFunction);
void nonSpeculativeNonPeepholeCompare(Node&, MacroAssembler::RelationalCondition, S_DFGOperation_EJJ helperFunction);
@@ -1504,15 +1517,15 @@ private:
void compilePeepHoleObjectEquality(Node&, NodeIndex branchNodeIndex, const ClassInfo*, PredictionChecker);
void compileObjectEquality(Node&, const ClassInfo*, PredictionChecker);
void compileValueAdd(Node&);
- void compileObjectOrOtherLogicalNot(NodeIndex value, const ClassInfo*, bool needSpeculationCheck);
+ void compileObjectOrOtherLogicalNot(NodeUse value, const ClassInfo*, bool needSpeculationCheck);
void compileLogicalNot(Node&);
- void emitObjectOrOtherBranch(NodeIndex value, BlockIndex taken, BlockIndex notTaken, const ClassInfo*, bool needSpeculationCheck);
+ void emitObjectOrOtherBranch(NodeUse value, BlockIndex taken, BlockIndex notTaken, const ClassInfo*, bool needSpeculationCheck);
void emitBranch(Node&);
void compileIntegerCompare(Node&, MacroAssembler::RelationalCondition);
void compileDoubleCompare(Node&, MacroAssembler::DoubleCondition);
- bool compileStrictEqForConstant(Node&, NodeIndex value, JSValue constant);
+ bool compileStrictEqForConstant(Node&, NodeUse value, JSValue constant);
bool compileStrictEq(Node&);
@@ -1552,9 +1565,9 @@ private:
template<typename T>
void emitAllocateJSFinalObject(T structure, GPRReg resultGPR, GPRReg scratchGPR, MacroAssembler::JumpList& slowPath)
{
- MarkedSpace::SizeClass* sizeClass = &m_jit.globalData()->heap.sizeClassForObject(sizeof(JSFinalObject));
+ MarkedAllocator* allocator = &m_jit.globalData()->heap.allocatorForObject(sizeof(JSFinalObject));
- m_jit.loadPtr(&sizeClass->firstFreeCell, resultGPR);
+ m_jit.loadPtr(&allocator->m_firstFreeCell, resultGPR);
slowPath.append(m_jit.branchTestPtr(MacroAssembler::Zero, resultGPR));
// The object is half-allocated: we have what we know is a fresh object, but
@@ -1566,7 +1579,7 @@ private:
// Now that we have scratchGPR back, remove the object from the free list
m_jit.loadPtr(MacroAssembler::Address(resultGPR), scratchGPR);
- m_jit.storePtr(scratchGPR, &sizeClass->firstFreeCell);
+ m_jit.storePtr(scratchGPR, &allocator->m_firstFreeCell);
// Initialize the object's classInfo pointer
m_jit.storePtr(MacroAssembler::TrustedImmPtr(&JSFinalObject::s_info), MacroAssembler::Address(resultGPR, JSCell::classInfoOffset()));
@@ -1592,6 +1605,10 @@ private:
return;
m_jit.codeBlock()->appendOSRExit(OSRExit(kind, jsValueSource, m_jit.valueProfileFor(nodeIndex), jumpToFail, this));
}
+ void speculationCheck(ExitKind kind, JSValueSource jsValueSource, NodeUse nodeUse, MacroAssembler::Jump jumpToFail)
+ {
+ speculationCheck(kind, jsValueSource, nodeUse.index(), jumpToFail);
+ }
// Add a set of speculation checks without additional recovery.
void speculationCheck(ExitKind kind, JSValueSource jsValueSource, NodeIndex nodeIndex, MacroAssembler::JumpList& jumpsToFail)
{
@@ -1599,6 +1616,10 @@ private:
for (unsigned i = 0; i < JumpVector.size(); ++i)
speculationCheck(kind, jsValueSource, nodeIndex, JumpVector[i]);
}
+ void speculationCheck(ExitKind kind, JSValueSource jsValueSource, NodeUse nodeUse, MacroAssembler::JumpList& jumpsToFail)
+ {
+ speculationCheck(kind, jsValueSource, nodeUse.index(), jumpsToFail);
+ }
// Add a speculation check with additional recovery.
void speculationCheck(ExitKind kind, JSValueSource jsValueSource, NodeIndex nodeIndex, MacroAssembler::Jump jumpToFail, const SpeculationRecovery& recovery)
{
@@ -1607,6 +1628,10 @@ private:
m_jit.codeBlock()->appendSpeculationRecovery(recovery);
m_jit.codeBlock()->appendOSRExit(OSRExit(kind, jsValueSource, m_jit.valueProfileFor(nodeIndex), jumpToFail, this, m_jit.codeBlock()->numberOfSpeculationRecoveries()));
}
+ void speculationCheck(ExitKind kind, JSValueSource jsValueSource, NodeUse nodeUse, MacroAssembler::Jump jumpToFail, const SpeculationRecovery& recovery)
+ {
+ speculationCheck(kind, jsValueSource, nodeUse.index(), jumpToFail, recovery);
+ }
// Called when we statically determine that a speculation will fail.
void terminateSpeculativeExecution(ExitKind kind, JSValueRegs jsValueRegs, NodeIndex nodeIndex)
@@ -1619,6 +1644,10 @@ private:
speculationCheck(kind, jsValueRegs, nodeIndex, m_jit.jump());
m_compileOkay = false;
}
+ void terminateSpeculativeExecution(ExitKind kind, JSValueRegs jsValueRegs, NodeUse nodeUse)
+ {
+ terminateSpeculativeExecution(kind, jsValueRegs, nodeUse.index());
+ }
template<bool strict>
GPRReg fillSpeculateIntInternal(NodeIndex, DataFormat& returnFormat);
@@ -1711,16 +1740,16 @@ private:
class IntegerOperand {
public:
- explicit IntegerOperand(SpeculativeJIT* jit, NodeIndex index)
+ explicit IntegerOperand(SpeculativeJIT* jit, NodeUse use)
: m_jit(jit)
- , m_index(index)
+ , m_index(use.index())
, m_gprOrInvalid(InvalidGPRReg)
#ifndef NDEBUG
, m_format(DataFormatNone)
#endif
{
ASSERT(m_jit);
- if (jit->isFilled(index))
+ if (jit->isFilled(m_index))
gpr();
}
@@ -1763,13 +1792,13 @@ private:
class DoubleOperand {
public:
- explicit DoubleOperand(SpeculativeJIT* jit, NodeIndex index)
+ explicit DoubleOperand(SpeculativeJIT* jit, NodeUse use)
: m_jit(jit)
- , m_index(index)
+ , m_index(use.index())
, m_fprOrInvalid(InvalidFPRReg)
{
ASSERT(m_jit);
- if (jit->isFilledDouble(index))
+ if (jit->isFilledDouble(m_index))
fpr();
}
@@ -1804,9 +1833,9 @@ private:
class JSValueOperand {
public:
- explicit JSValueOperand(SpeculativeJIT* jit, NodeIndex index)
+ explicit JSValueOperand(SpeculativeJIT* jit, NodeUse use)
: m_jit(jit)
- , m_index(index)
+ , m_index(use.index())
#if USE(JSVALUE64)
, m_gprOrInvalid(InvalidGPRReg)
#elif USE(JSVALUE32_64)
@@ -1815,12 +1844,12 @@ public:
{
ASSERT(m_jit);
#if USE(JSVALUE64)
- if (jit->isFilled(index))
+ if (jit->isFilled(m_index))
gpr();
#elif USE(JSVALUE32_64)
m_register.pair.tagGPR = InvalidGPRReg;
m_register.pair.payloadGPR = InvalidGPRReg;
- if (jit->isFilled(index))
+ if (jit->isFilled(m_index))
fill();
#endif
}
@@ -1918,13 +1947,13 @@ private:
class StorageOperand {
public:
- explicit StorageOperand(SpeculativeJIT* jit, NodeIndex index)
+ explicit StorageOperand(SpeculativeJIT* jit, NodeUse use)
: m_jit(jit)
- , m_index(index)
+ , m_index(use.index())
, m_gprOrInvalid(InvalidGPRReg)
{
ASSERT(m_jit);
- if (jit->isFilled(index))
+ if (jit->isFilled(m_index))
gpr();
}
@@ -2087,16 +2116,16 @@ private:
class SpeculateIntegerOperand {
public:
- explicit SpeculateIntegerOperand(SpeculativeJIT* jit, NodeIndex index)
+ explicit SpeculateIntegerOperand(SpeculativeJIT* jit, NodeUse use)
: m_jit(jit)
- , m_index(index)
+ , m_index(use.index())
, m_gprOrInvalid(InvalidGPRReg)
#ifndef NDEBUG
, m_format(DataFormatNone)
#endif
{
ASSERT(m_jit);
- if (jit->isFilled(index))
+ if (jit->isFilled(m_index))
gpr();
}
@@ -2134,13 +2163,13 @@ private:
class SpeculateStrictInt32Operand {
public:
- explicit SpeculateStrictInt32Operand(SpeculativeJIT* jit, NodeIndex index)
+ explicit SpeculateStrictInt32Operand(SpeculativeJIT* jit, NodeUse use)
: m_jit(jit)
- , m_index(index)
+ , m_index(use.index())
, m_gprOrInvalid(InvalidGPRReg)
{
ASSERT(m_jit);
- if (jit->isFilled(index))
+ if (jit->isFilled(m_index))
gpr();
}
@@ -2175,13 +2204,13 @@ private:
class SpeculateDoubleOperand {
public:
- explicit SpeculateDoubleOperand(SpeculativeJIT* jit, NodeIndex index)
+ explicit SpeculateDoubleOperand(SpeculativeJIT* jit, NodeUse use)
: m_jit(jit)
- , m_index(index)
+ , m_index(use.index())
, m_fprOrInvalid(InvalidFPRReg)
{
ASSERT(m_jit);
- if (jit->isFilled(index))
+ if (jit->isFilled(m_index))
fpr();
}
@@ -2211,13 +2240,13 @@ private:
class SpeculateCellOperand {
public:
- explicit SpeculateCellOperand(SpeculativeJIT* jit, NodeIndex index)
+ explicit SpeculateCellOperand(SpeculativeJIT* jit, NodeUse use)
: m_jit(jit)
- , m_index(index)
+ , m_index(use.index())
, m_gprOrInvalid(InvalidGPRReg)
{
ASSERT(m_jit);
- if (jit->isFilled(index))
+ if (jit->isFilled(m_index))
gpr();
}
@@ -2252,13 +2281,13 @@ private:
class SpeculateBooleanOperand {
public:
- explicit SpeculateBooleanOperand(SpeculativeJIT* jit, NodeIndex index)
+ explicit SpeculateBooleanOperand(SpeculativeJIT* jit, NodeUse use)
: m_jit(jit)
- , m_index(index)
+ , m_index(use.index())
, m_gprOrInvalid(InvalidGPRReg)
{
ASSERT(m_jit);
- if (jit->isFilled(index))
+ if (jit->isFilled(m_index))
gpr();
}
diff --git a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
index e1f92ba9e..a2cdec086 100644
--- a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
+++ b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
@@ -360,7 +360,7 @@ bool SpeculativeJIT::fillJSValue(NodeIndex nodeIndex, GPRReg& tagGPR, GPRReg& pa
void SpeculativeJIT::nonSpeculativeValueToNumber(Node& node)
{
- if (isKnownNumeric(node.child1())) {
+ if (isKnownNumeric(node.child1().index())) {
JSValueOperand op1(this, node.child1());
op1.fill();
if (op1.isDouble()) {
@@ -381,8 +381,8 @@ void SpeculativeJIT::nonSpeculativeValueToNumber(Node& node)
GPRTemporary resultTag(this, op1);
GPRTemporary resultPayload(this, op1, false);
- ASSERT(!isInt32Constant(node.child1()));
- ASSERT(!isNumberConstant(node.child1()));
+ ASSERT(!isInt32Constant(node.child1().index()));
+ ASSERT(!isNumberConstant(node.child1().index()));
GPRReg tagGPR = op1.tagGPR();
GPRReg payloadGPR = op1.payloadGPR();
@@ -415,9 +415,9 @@ void SpeculativeJIT::nonSpeculativeValueToNumber(Node& node)
void SpeculativeJIT::nonSpeculativeValueToInt32(Node& node)
{
- ASSERT(!isInt32Constant(node.child1()));
+ ASSERT(!isInt32Constant(node.child1().index()));
- if (isKnownInteger(node.child1())) {
+ if (isKnownInteger(node.child1().index())) {
IntegerOperand op1(this, node.child1());
GPRTemporary result(this, op1);
m_jit.move(op1.gpr(), result.gpr());
@@ -532,14 +532,14 @@ JITCompiler::Call SpeculativeJIT::cachedGetById(CodeOrigin codeOrigin, GPRReg ba
return functionCall;
}
-void SpeculativeJIT::cachedPutById(CodeOrigin codeOrigin, GPRReg basePayloadGPR, GPRReg valueTagGPR, GPRReg valuePayloadGPR, NodeIndex valueIndex, GPRReg scratchGPR, unsigned identifierNumber, PutKind putKind, JITCompiler::Jump slowPathTarget)
+void SpeculativeJIT::cachedPutById(CodeOrigin codeOrigin, GPRReg basePayloadGPR, GPRReg valueTagGPR, GPRReg valuePayloadGPR, NodeUse valueUse, GPRReg scratchGPR, unsigned identifierNumber, PutKind putKind, JITCompiler::Jump slowPathTarget)
{
m_jit.beginUninterruptedSequence();
JITCompiler::DataLabelPtr structureToCompare;
JITCompiler::Jump structureCheck = m_jit.branchPtrWithPatch(JITCompiler::NotEqual, JITCompiler::Address(basePayloadGPR, JSCell::structureOffset()), structureToCompare, JITCompiler::TrustedImmPtr(reinterpret_cast<void*>(-1)));
m_jit.endUninterruptedSequence();
- writeBarrier(basePayloadGPR, valueTagGPR, valueIndex, WriteBarrierForPropertyAccess, scratchGPR);
+ writeBarrier(basePayloadGPR, valueTagGPR, valueUse, WriteBarrierForPropertyAccess, scratchGPR);
m_jit.loadPtr(JITCompiler::Address(basePayloadGPR, JSObject::offsetOfPropertyStorage()), scratchGPR);
JITCompiler::DataLabel32 tagStoreWithPatch = m_jit.store32WithAddressOffsetPatch(valueTagGPR, JITCompiler::Address(scratchGPR, OBJECT_OFFSETOF(EncodedValueDescriptor, asBits.tag)));
@@ -576,7 +576,7 @@ void SpeculativeJIT::cachedPutById(CodeOrigin codeOrigin, GPRReg basePayloadGPR,
m_jit.addPropertyAccess(PropertyAccessRecord(codeOrigin, structureToCompare, functionCall, structureCheck, JITCompiler::DataLabelCompact(tagStoreWithPatch.label()), JITCompiler::DataLabelCompact(payloadStoreWithPatch.label()), slowCase, doneLabel, safeCast<int8_t>(basePayloadGPR), safeCast<int8_t>(valueTagGPR), safeCast<int8_t>(valuePayloadGPR), safeCast<int8_t>(scratchGPR)));
}
-void SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull(NodeIndex operand, bool invert)
+void SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull(NodeUse operand, bool invert)
{
JSValueOperand arg(this, operand);
GPRReg argTagGPR = arg.tagGPR();
@@ -586,13 +586,13 @@ void SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull(NodeIndex operand, boo
GPRReg resultPayloadGPR = resultPayload.gpr();
JITCompiler::Jump notCell;
- if (!isKnownCell(operand))
+ if (!isKnownCell(operand.index()))
notCell = m_jit.branch32(MacroAssembler::NotEqual, argTagGPR, TrustedImm32(JSValue::CellTag));
m_jit.loadPtr(JITCompiler::Address(argPayloadGPR, JSCell::structureOffset()), resultPayloadGPR);
m_jit.test8(invert ? JITCompiler::Zero : JITCompiler::NonZero, JITCompiler::Address(resultPayloadGPR, Structure::typeInfoFlagsOffset()), JITCompiler::TrustedImm32(MasqueradesAsUndefined), resultPayloadGPR);
- if (!isKnownCell(operand)) {
+ if (!isKnownCell(operand.index())) {
JITCompiler::Jump done = m_jit.jump();
notCell.link(&m_jit);
@@ -608,7 +608,7 @@ void SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull(NodeIndex operand, boo
booleanResult(resultPayloadGPR, m_compileIndex);
}
-void SpeculativeJIT::nonSpeculativePeepholeBranchNull(NodeIndex operand, NodeIndex branchNodeIndex, bool invert)
+void SpeculativeJIT::nonSpeculativePeepholeBranchNull(NodeUse operand, NodeIndex branchNodeIndex, bool invert)
{
Node& branchNode = at(branchNodeIndex);
BlockIndex taken = branchNode.takenBlockIndex();
@@ -630,13 +630,13 @@ void SpeculativeJIT::nonSpeculativePeepholeBranchNull(NodeIndex operand, NodeInd
JITCompiler::Jump notCell;
- if (!isKnownCell(operand))
+ if (!isKnownCell(operand.index()))
notCell = m_jit.branch32(MacroAssembler::NotEqual, argTagGPR, TrustedImm32(JSValue::CellTag));
m_jit.loadPtr(JITCompiler::Address(argPayloadGPR, JSCell::structureOffset()), resultGPR);
addBranch(m_jit.branchTest8(invert ? JITCompiler::Zero : JITCompiler::NonZero, JITCompiler::Address(resultGPR, Structure::typeInfoFlagsOffset()), JITCompiler::TrustedImm32(MasqueradesAsUndefined)), taken);
- if (!isKnownCell(operand)) {
+ if (!isKnownCell(operand.index())) {
addBranch(m_jit.jump(), notTaken);
notCell.link(&m_jit);
@@ -651,7 +651,7 @@ void SpeculativeJIT::nonSpeculativePeepholeBranchNull(NodeIndex operand, NodeInd
addBranch(m_jit.jump(), notTaken);
}
-bool SpeculativeJIT::nonSpeculativeCompareNull(Node& node, NodeIndex operand, bool invert)
+bool SpeculativeJIT::nonSpeculativeCompareNull(Node& node, NodeUse operand, bool invert)
{
NodeIndex branchNodeIndex = detectPeepHoleBranch();
if (branchNodeIndex != NoNode) {
@@ -698,7 +698,7 @@ void SpeculativeJIT::nonSpeculativePeepholeBranch(Node& node, NodeIndex branchNo
JITCompiler::JumpList slowPath;
- if (isKnownNotInteger(node.child1()) || isKnownNotInteger(node.child2())) {
+ if (isKnownNotInteger(node.child1().index()) || isKnownNotInteger(node.child2().index())) {
GPRResult result(this);
GPRReg resultGPR = result.gpr();
@@ -716,14 +716,14 @@ void SpeculativeJIT::nonSpeculativePeepholeBranch(Node& node, NodeIndex branchNo
arg1.use();
arg2.use();
- if (!isKnownInteger(node.child1()))
+ if (!isKnownInteger(node.child1().index()))
slowPath.append(m_jit.branch32(MacroAssembler::NotEqual, arg1TagGPR, JITCompiler::TrustedImm32(JSValue::Int32Tag)));
- if (!isKnownInteger(node.child2()))
+ if (!isKnownInteger(node.child2().index()))
slowPath.append(m_jit.branch32(MacroAssembler::NotEqual, arg2TagGPR, JITCompiler::TrustedImm32(JSValue::Int32Tag)));
addBranch(m_jit.branch32(cond, arg1PayloadGPR, arg2PayloadGPR), taken);
- if (!isKnownInteger(node.child1()) || !isKnownInteger(node.child2())) {
+ if (!isKnownInteger(node.child1().index()) || !isKnownInteger(node.child2().index())) {
addBranch(m_jit.jump(), notTaken);
slowPath.link(&m_jit);
@@ -751,7 +751,7 @@ void SpeculativeJIT::nonSpeculativeNonPeepholeCompare(Node& node, MacroAssembler
JITCompiler::JumpList slowPath;
- if (isKnownNotInteger(node.child1()) || isKnownNotInteger(node.child2())) {
+ if (isKnownNotInteger(node.child1().index()) || isKnownNotInteger(node.child2().index())) {
GPRResult result(this);
GPRReg resultPayloadGPR = result.gpr();
@@ -769,14 +769,14 @@ void SpeculativeJIT::nonSpeculativeNonPeepholeCompare(Node& node, MacroAssembler
arg1.use();
arg2.use();
- if (!isKnownInteger(node.child1()))
+ if (!isKnownInteger(node.child1().index()))
slowPath.append(m_jit.branch32(MacroAssembler::NotEqual, arg1TagGPR, JITCompiler::TrustedImm32(JSValue::Int32Tag)));
- if (!isKnownInteger(node.child2()))
+ if (!isKnownInteger(node.child2().index()))
slowPath.append(m_jit.branch32(MacroAssembler::NotEqual, arg2TagGPR, JITCompiler::TrustedImm32(JSValue::Int32Tag)));
m_jit.compare32(cond, arg1PayloadGPR, arg2PayloadGPR, resultPayloadGPR);
- if (!isKnownInteger(node.child1()) || !isKnownInteger(node.child2())) {
+ if (!isKnownInteger(node.child1().index()) || !isKnownInteger(node.child2().index())) {
JITCompiler::Jump haveResult = m_jit.jump();
slowPath.link(&m_jit);
@@ -822,7 +822,7 @@ void SpeculativeJIT::nonSpeculativePeepholeStrictEq(Node& node, NodeIndex branch
arg1.use();
arg2.use();
- if (isKnownCell(node.child1()) && isKnownCell(node.child2())) {
+ if (isKnownCell(node.child1().index()) && isKnownCell(node.child2().index())) {
// see if we get lucky: if the arguments are cells and they reference the same
// cell, then they must be strictly equal.
addBranch(m_jit.branchPtr(JITCompiler::Equal, arg1PayloadGPR, arg2PayloadGPR), invert ? notTaken : taken);
@@ -861,7 +861,7 @@ void SpeculativeJIT::nonSpeculativeNonPeepholeStrictEq(Node& node, bool invert)
arg1.use();
arg2.use();
- if (isKnownCell(node.child1()) && isKnownCell(node.child2())) {
+ if (isKnownCell(node.child1().index()) && isKnownCell(node.child2().index())) {
// see if we get lucky: if the arguments are cells and they reference the same
// cell, then they must be strictly equal.
JITCompiler::Jump notEqualCase = m_jit.branchPtr(JITCompiler::NotEqual, arg1PayloadGPR, arg2PayloadGPR);
@@ -908,11 +908,11 @@ void SpeculativeJIT::emitCall(Node& node)
CallLinkInfo::CallType callType = node.op == Call ? CallLinkInfo::Call : CallLinkInfo::Construct;
- NodeIndex calleeNodeIndex = m_jit.graph().m_varArgChildren[node.firstChild()];
- JSValueOperand callee(this, calleeNodeIndex);
+ NodeUse calleeNodeUse = m_jit.graph().m_varArgChildren[node.firstChild()];
+ JSValueOperand callee(this, calleeNodeUse);
GPRReg calleeTagGPR = callee.tagGPR();
GPRReg calleePayloadGPR = callee.payloadGPR();
- use(calleeNodeIndex);
+ use(calleeNodeUse);
// The call instruction's first child is either the function (normal call) or the
// receiver (method call). subsequent children are the arguments.
@@ -924,11 +924,11 @@ void SpeculativeJIT::emitCall(Node& node)
m_jit.store32(calleeTagGPR, callFrameTagSlot(RegisterFile::Callee));
for (int i = 0; i < numPassedArgs; i++) {
- NodeIndex argNodeIndex = m_jit.graph().m_varArgChildren[node.firstChild() + 1 + i];
- JSValueOperand arg(this, argNodeIndex);
+ NodeUse argNodeUse = m_jit.graph().m_varArgChildren[node.firstChild() + 1 + i];
+ JSValueOperand arg(this, argNodeUse);
GPRReg argTagGPR = arg.tagGPR();
GPRReg argPayloadGPR = arg.payloadGPR();
- use(argNodeIndex);
+ use(argNodeUse);
m_jit.store32(argTagGPR, argumentTagSlot(i + dummyThisArgument));
m_jit.store32(argPayloadGPR, argumentPayloadSlot(i + dummyThisArgument));
@@ -1439,7 +1439,7 @@ void SpeculativeJIT::compileValueAdd(Node& node)
GPRResult2 resultTag(this);
GPRResult resultPayload(this);
- if (isKnownNotNumber(node.child1()) || isKnownNotNumber(node.child2()))
+ if (isKnownNotNumber(node.child1().index()) || isKnownNotNumber(node.child2().index()))
callOperation(operationValueAddNotNumber, resultTag.gpr(), resultPayload.gpr(), op1TagGPR, op1PayloadGPR, op2TagGPR, op2PayloadGPR);
else
callOperation(operationValueAdd, resultTag.gpr(), resultPayload.gpr(), op1TagGPR, op1PayloadGPR, op2TagGPR, op2PayloadGPR);
@@ -1447,9 +1447,9 @@ void SpeculativeJIT::compileValueAdd(Node& node)
jsValueResult(resultTag.gpr(), resultPayload.gpr(), m_compileIndex);
}
-void SpeculativeJIT::compileObjectOrOtherLogicalNot(NodeIndex nodeIndex, const ClassInfo* classInfo, bool needSpeculationCheck)
+void SpeculativeJIT::compileObjectOrOtherLogicalNot(NodeUse nodeUse, const ClassInfo* classInfo, bool needSpeculationCheck)
{
- JSValueOperand value(this, nodeIndex);
+ JSValueOperand value(this, nodeUse);
GPRTemporary resultPayload(this);
GPRReg valueTagGPR = value.tagGPR();
GPRReg valuePayloadGPR = value.payloadGPR();
@@ -1457,7 +1457,7 @@ void SpeculativeJIT::compileObjectOrOtherLogicalNot(NodeIndex nodeIndex, const C
MacroAssembler::Jump notCell = m_jit.branch32(MacroAssembler::NotEqual, valueTagGPR, TrustedImm32(JSValue::CellTag));
if (needSpeculationCheck)
- speculationCheck(BadType, JSValueRegs(valueTagGPR, valuePayloadGPR), nodeIndex, m_jit.branchPtr(MacroAssembler::NotEqual, MacroAssembler::Address(valuePayloadGPR, JSCell::classInfoOffset()), MacroAssembler::TrustedImmPtr(classInfo)));
+ speculationCheck(BadType, JSValueRegs(valueTagGPR, valuePayloadGPR), nodeUse, m_jit.branchPtr(MacroAssembler::NotEqual, MacroAssembler::Address(valuePayloadGPR, JSCell::classInfoOffset()), MacroAssembler::TrustedImmPtr(classInfo)));
m_jit.move(TrustedImm32(0), resultPayloadGPR);
MacroAssembler::Jump done = m_jit.jump();
@@ -1467,7 +1467,7 @@ void SpeculativeJIT::compileObjectOrOtherLogicalNot(NodeIndex nodeIndex, const C
if (needSpeculationCheck) {
m_jit.move(valueTagGPR, resultPayloadGPR);
m_jit.or32(TrustedImm32(1), resultPayloadGPR);
- speculationCheck(BadType, JSValueRegs(valueTagGPR, valuePayloadGPR), nodeIndex, m_jit.branch32(MacroAssembler::NotEqual, resultPayloadGPR, TrustedImm32(JSValue::NullTag)));
+ speculationCheck(BadType, JSValueRegs(valueTagGPR, valuePayloadGPR), nodeUse, m_jit.branch32(MacroAssembler::NotEqual, resultPayloadGPR, TrustedImm32(JSValue::NullTag)));
}
m_jit.move(TrustedImm32(1), resultPayloadGPR);
@@ -1478,7 +1478,7 @@ void SpeculativeJIT::compileObjectOrOtherLogicalNot(NodeIndex nodeIndex, const C
void SpeculativeJIT::compileLogicalNot(Node& node)
{
- if (isKnownBoolean(node.child1()) || isBooleanPrediction(m_jit.getPrediction(node.child1()))) {
+ if (isKnownBoolean(node.child1().index()) || isBooleanPrediction(m_jit.getPrediction(node.child1().index()))) {
SpeculateBooleanOperand value(this, node.child1());
GPRTemporary result(this, value);
m_jit.xor32(TrustedImm32(1), value.gpr(), result.gpr());
@@ -1535,9 +1535,9 @@ void SpeculativeJIT::compileLogicalNot(Node& node)
booleanResult(resultPayloadGPR, m_compileIndex, UseChildrenCalledExplicitly);
}
-void SpeculativeJIT::emitObjectOrOtherBranch(NodeIndex nodeIndex, BlockIndex taken, BlockIndex notTaken, const ClassInfo* classInfo, bool needSpeculationCheck)
+void SpeculativeJIT::emitObjectOrOtherBranch(NodeUse nodeUse, BlockIndex taken, BlockIndex notTaken, const ClassInfo* classInfo, bool needSpeculationCheck)
{
- JSValueOperand value(this, nodeIndex);
+ JSValueOperand value(this, nodeUse);
GPRTemporary scratch(this);
GPRReg valueTagGPR = value.tagGPR();
GPRReg valuePayloadGPR = value.payloadGPR();
@@ -1545,7 +1545,7 @@ void SpeculativeJIT::emitObjectOrOtherBranch(NodeIndex nodeIndex, BlockIndex tak
MacroAssembler::Jump notCell = m_jit.branch32(MacroAssembler::NotEqual, valueTagGPR, TrustedImm32(JSValue::CellTag));
if (needSpeculationCheck)
- speculationCheck(BadType, JSValueRegs(valueTagGPR, valuePayloadGPR), nodeIndex, m_jit.branchPtr(MacroAssembler::NotEqual, MacroAssembler::Address(valuePayloadGPR, JSCell::classInfoOffset()), MacroAssembler::TrustedImmPtr(classInfo)));
+ speculationCheck(BadType, JSValueRegs(valueTagGPR, valuePayloadGPR), nodeUse, m_jit.branchPtr(MacroAssembler::NotEqual, MacroAssembler::Address(valuePayloadGPR, JSCell::classInfoOffset()), MacroAssembler::TrustedImmPtr(classInfo)));
addBranch(m_jit.jump(), taken);
notCell.link(&m_jit);
@@ -1554,7 +1554,7 @@ void SpeculativeJIT::emitObjectOrOtherBranch(NodeIndex nodeIndex, BlockIndex tak
if (needSpeculationCheck) {
m_jit.move(valueTagGPR, scratchGPR);
m_jit.or32(TrustedImm32(1), scratchGPR);
- speculationCheck(BadType, JSValueRegs(valueTagGPR, valuePayloadGPR), nodeIndex, m_jit.branch32(MacroAssembler::NotEqual, scratchGPR, TrustedImm32(JSValue::NullTag)));
+ speculationCheck(BadType, JSValueRegs(valueTagGPR, valuePayloadGPR), nodeUse, m_jit.branch32(MacroAssembler::NotEqual, scratchGPR, TrustedImm32(JSValue::NullTag)));
}
if (notTaken != (m_block + 1))
@@ -1568,7 +1568,7 @@ void SpeculativeJIT::emitBranch(Node& node)
BlockIndex taken = node.takenBlockIndex();
BlockIndex notTaken = node.notTakenBlockIndex();
- if (isKnownBoolean(node.child1())) {
+ if (isKnownBoolean(node.child1().index())) {
SpeculateBooleanOperand value(this, node.child1());
MacroAssembler::ResultCondition condition = MacroAssembler::NonZero;
@@ -1800,18 +1800,18 @@ void SpeculativeJIT::compile(Node& node)
case BitAnd:
case BitOr:
case BitXor:
- if (isInt32Constant(node.child1())) {
+ if (isInt32Constant(node.child1().index())) {
SpeculateIntegerOperand op2(this, node.child2());
GPRTemporary result(this, op2);
- bitOp(op, valueOfInt32Constant(node.child1()), op2.gpr(), result.gpr());
+ bitOp(op, valueOfInt32Constant(node.child1().index()), op2.gpr(), result.gpr());
integerResult(result.gpr(), m_compileIndex);
- } else if (isInt32Constant(node.child2())) {
+ } else if (isInt32Constant(node.child2().index())) {
SpeculateIntegerOperand op1(this, node.child1());
GPRTemporary result(this, op1);
- bitOp(op, valueOfInt32Constant(node.child2()), op1.gpr(), result.gpr());
+ bitOp(op, valueOfInt32Constant(node.child2().index()), op1.gpr(), result.gpr());
integerResult(result.gpr(), m_compileIndex);
} else {
@@ -1830,11 +1830,11 @@ void SpeculativeJIT::compile(Node& node)
case BitRShift:
case BitLShift:
case BitURShift:
- if (isInt32Constant(node.child2())) {
+ if (isInt32Constant(node.child2().index())) {
SpeculateIntegerOperand op1(this, node.child1());
GPRTemporary result(this, op1);
- shiftOp(op, op1.gpr(), valueOfInt32Constant(node.child2()) & 0x1f, result.gpr());
+ shiftOp(op, op1.gpr(), valueOfInt32Constant(node.child2().index()) & 0x1f, result.gpr());
integerResult(result.gpr(), m_compileIndex);
} else {
@@ -1861,30 +1861,6 @@ void SpeculativeJIT::compile(Node& node)
break;
}
- case ValueToNumber: {
- if (at(node.child1()).shouldNotSpeculateInteger()) {
- SpeculateDoubleOperand op1(this, node.child1());
- FPRTemporary result(this, op1);
- m_jit.moveDouble(op1.fpr(), result.fpr());
- doubleResult(result.fpr(), m_compileIndex);
- break;
- }
-
- SpeculateIntegerOperand op1(this, node.child1());
- GPRTemporary result(this, op1);
- m_jit.move(op1.gpr(), result.gpr());
- integerResult(result.gpr(), m_compileIndex, op1.format());
- break;
- }
-
- case ValueToDouble: {
- SpeculateDoubleOperand op1(this, node.child1());
- FPRTemporary result(this, op1);
- m_jit.moveDouble(op1.fpr(), result.fpr());
- doubleResult(result.fpr(), m_compileIndex);
- break;
- }
-
case ValueAdd:
case ArithAdd:
compileAdd(node);
@@ -2091,12 +2067,12 @@ void SpeculativeJIT::compile(Node& node)
break;
case CompareEq:
- if (isNullConstant(node.child1())) {
+ if (isNullConstant(node.child1().index())) {
if (nonSpeculativeCompareNull(node, node.child2()))
return;
break;
}
- if (isNullConstant(node.child2())) {
+ if (isNullConstant(node.child2().index())) {
if (nonSpeculativeCompareNull(node, node.child1()))
return;
break;
@@ -2631,7 +2607,7 @@ void SpeculativeJIT::compile(Node& node)
}
case Branch:
- if (isStrictInt32(node.child1()) || at(node.child1()).shouldSpeculateInteger()) {
+ if (isStrictInt32(node.child1().index()) || at(node.child1()).shouldSpeculateInteger()) {
SpeculateIntegerOperand op(this, node.child1());
BlockIndex taken = node.takenBlockIndex();
@@ -2720,7 +2696,7 @@ void SpeculativeJIT::compile(Node& node)
// FIXME: Add string speculation here.
- bool wasPrimitive = isKnownNumeric(node.child1()) || isKnownBoolean(node.child1());
+ bool wasPrimitive = isKnownNumeric(node.child1().index()) || isKnownBoolean(node.child1().index());
JSValueOperand op1(this, node.child1());
GPRTemporary resultTag(this, op1);
diff --git a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp
index 139dedded..0dc207f75 100644
--- a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp
+++ b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp
@@ -360,7 +360,7 @@ GPRReg SpeculativeJIT::fillJSValue(NodeIndex nodeIndex)
void SpeculativeJIT::nonSpeculativeValueToNumber(Node& node)
{
- if (isKnownNumeric(node.child1())) {
+ if (isKnownNumeric(node.child1().index())) {
JSValueOperand op1(this, node.child1());
GPRTemporary result(this, op1);
m_jit.move(op1.gpr(), result.gpr());
@@ -371,8 +371,8 @@ void SpeculativeJIT::nonSpeculativeValueToNumber(Node& node)
JSValueOperand op1(this, node.child1());
GPRTemporary result(this);
- ASSERT(!isInt32Constant(node.child1()));
- ASSERT(!isNumberConstant(node.child1()));
+ ASSERT(!isInt32Constant(node.child1().index()));
+ ASSERT(!isNumberConstant(node.child1().index()));
GPRReg jsValueGpr = op1.gpr();
GPRReg gpr = result.gpr();
@@ -404,9 +404,9 @@ void SpeculativeJIT::nonSpeculativeValueToNumber(Node& node)
void SpeculativeJIT::nonSpeculativeValueToInt32(Node& node)
{
- ASSERT(!isInt32Constant(node.child1()));
+ ASSERT(!isInt32Constant(node.child1().index()));
- if (isKnownInteger(node.child1())) {
+ if (isKnownInteger(node.child1().index())) {
IntegerOperand op1(this, node.child1());
GPRTemporary result(this, op1);
m_jit.move(op1.gpr(), result.gpr());
@@ -512,13 +512,13 @@ JITCompiler::Call SpeculativeJIT::cachedGetById(CodeOrigin codeOrigin, GPRReg ba
return functionCall;
}
-void SpeculativeJIT::cachedPutById(CodeOrigin codeOrigin, GPRReg baseGPR, GPRReg valueGPR, NodeIndex valueIndex, GPRReg scratchGPR, unsigned identifierNumber, PutKind putKind, JITCompiler::Jump slowPathTarget)
+void SpeculativeJIT::cachedPutById(CodeOrigin codeOrigin, GPRReg baseGPR, GPRReg valueGPR, NodeUse valueUse, GPRReg scratchGPR, unsigned identifierNumber, PutKind putKind, JITCompiler::Jump slowPathTarget)
{
JITCompiler::DataLabelPtr structureToCompare;
JITCompiler::Jump structureCheck = m_jit.branchPtrWithPatch(JITCompiler::NotEqual, JITCompiler::Address(baseGPR, JSCell::structureOffset()), structureToCompare, JITCompiler::TrustedImmPtr(reinterpret_cast<void*>(-1)));
- writeBarrier(baseGPR, valueGPR, valueIndex, WriteBarrierForPropertyAccess, scratchGPR);
+ writeBarrier(baseGPR, valueGPR, valueUse, WriteBarrierForPropertyAccess, scratchGPR);
m_jit.loadPtr(JITCompiler::Address(baseGPR, JSObject::offsetOfPropertyStorage()), scratchGPR);
JITCompiler::DataLabel32 storeWithPatch = m_jit.storePtrWithAddressOffsetPatch(valueGPR, JITCompiler::Address(scratchGPR, 0));
@@ -554,7 +554,7 @@ void SpeculativeJIT::cachedPutById(CodeOrigin codeOrigin, GPRReg baseGPR, GPRReg
m_jit.addPropertyAccess(PropertyAccessRecord(codeOrigin, structureToCompare, functionCall, structureCheck, JITCompiler::DataLabelCompact(storeWithPatch.label()), slowCase, doneLabel, safeCast<int8_t>(baseGPR), safeCast<int8_t>(valueGPR), safeCast<int8_t>(scratchGPR)));
}
-void SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull(NodeIndex operand, bool invert)
+void SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull(NodeUse operand, bool invert)
{
JSValueOperand arg(this, operand);
GPRReg argGPR = arg.gpr();
@@ -564,13 +564,13 @@ void SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull(NodeIndex operand, boo
JITCompiler::Jump notCell;
- if (!isKnownCell(operand))
+ if (!isKnownCell(operand.index()))
notCell = m_jit.branchTestPtr(MacroAssembler::NonZero, argGPR, GPRInfo::tagMaskRegister);
m_jit.loadPtr(JITCompiler::Address(argGPR, JSCell::structureOffset()), resultGPR);
m_jit.test8(invert ? JITCompiler::Zero : JITCompiler::NonZero, JITCompiler::Address(resultGPR, Structure::typeInfoFlagsOffset()), JITCompiler::TrustedImm32(MasqueradesAsUndefined), resultGPR);
- if (!isKnownCell(operand)) {
+ if (!isKnownCell(operand.index())) {
JITCompiler::Jump done = m_jit.jump();
notCell.link(&m_jit);
@@ -586,7 +586,7 @@ void SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull(NodeIndex operand, boo
jsValueResult(resultGPR, m_compileIndex, DataFormatJSBoolean);
}
-void SpeculativeJIT::nonSpeculativePeepholeBranchNull(NodeIndex operand, NodeIndex branchNodeIndex, bool invert)
+void SpeculativeJIT::nonSpeculativePeepholeBranchNull(NodeUse operand, NodeIndex branchNodeIndex, bool invert)
{
Node& branchNode = at(branchNodeIndex);
BlockIndex taken = branchNode.takenBlockIndex();
@@ -607,13 +607,13 @@ void SpeculativeJIT::nonSpeculativePeepholeBranchNull(NodeIndex operand, NodeInd
JITCompiler::Jump notCell;
- if (!isKnownCell(operand))
+ if (!isKnownCell(operand.index()))
notCell = m_jit.branchTestPtr(MacroAssembler::NonZero, argGPR, GPRInfo::tagMaskRegister);
m_jit.loadPtr(JITCompiler::Address(argGPR, JSCell::structureOffset()), resultGPR);
addBranch(m_jit.branchTest8(invert ? JITCompiler::Zero : JITCompiler::NonZero, JITCompiler::Address(resultGPR, Structure::typeInfoFlagsOffset()), JITCompiler::TrustedImm32(MasqueradesAsUndefined)), taken);
- if (!isKnownCell(operand)) {
+ if (!isKnownCell(operand.index())) {
addBranch(m_jit.jump(), notTaken);
notCell.link(&m_jit);
@@ -627,7 +627,7 @@ void SpeculativeJIT::nonSpeculativePeepholeBranchNull(NodeIndex operand, NodeInd
addBranch(m_jit.jump(), notTaken);
}
-bool SpeculativeJIT::nonSpeculativeCompareNull(Node& node, NodeIndex operand, bool invert)
+bool SpeculativeJIT::nonSpeculativeCompareNull(Node& node, NodeUse operand, bool invert)
{
NodeIndex branchNodeIndex = detectPeepHoleBranch();
if (branchNodeIndex != NoNode) {
@@ -672,7 +672,7 @@ void SpeculativeJIT::nonSpeculativePeepholeBranch(Node& node, NodeIndex branchNo
JITCompiler::JumpList slowPath;
- if (isKnownNotInteger(node.child1()) || isKnownNotInteger(node.child2())) {
+ if (isKnownNotInteger(node.child1().index()) || isKnownNotInteger(node.child2().index())) {
GPRResult result(this);
GPRReg resultGPR = result.gpr();
@@ -690,14 +690,14 @@ void SpeculativeJIT::nonSpeculativePeepholeBranch(Node& node, NodeIndex branchNo
arg1.use();
arg2.use();
- if (!isKnownInteger(node.child1()))
+ if (!isKnownInteger(node.child1().index()))
slowPath.append(m_jit.branchPtr(MacroAssembler::Below, arg1GPR, GPRInfo::tagTypeNumberRegister));
- if (!isKnownInteger(node.child2()))
+ if (!isKnownInteger(node.child2().index()))
slowPath.append(m_jit.branchPtr(MacroAssembler::Below, arg2GPR, GPRInfo::tagTypeNumberRegister));
addBranch(m_jit.branch32(cond, arg1GPR, arg2GPR), taken);
- if (!isKnownInteger(node.child1()) || !isKnownInteger(node.child2())) {
+ if (!isKnownInteger(node.child1().index()) || !isKnownInteger(node.child2().index())) {
addBranch(m_jit.jump(), notTaken);
slowPath.link(&m_jit);
@@ -723,7 +723,7 @@ void SpeculativeJIT::nonSpeculativeNonPeepholeCompare(Node& node, MacroAssembler
JITCompiler::JumpList slowPath;
- if (isKnownNotInteger(node.child1()) || isKnownNotInteger(node.child2())) {
+ if (isKnownNotInteger(node.child1().index()) || isKnownNotInteger(node.child2().index())) {
GPRResult result(this);
GPRReg resultGPR = result.gpr();
@@ -742,14 +742,14 @@ void SpeculativeJIT::nonSpeculativeNonPeepholeCompare(Node& node, MacroAssembler
arg1.use();
arg2.use();
- if (!isKnownInteger(node.child1()))
+ if (!isKnownInteger(node.child1().index()))
slowPath.append(m_jit.branchPtr(MacroAssembler::Below, arg1GPR, GPRInfo::tagTypeNumberRegister));
- if (!isKnownInteger(node.child2()))
+ if (!isKnownInteger(node.child2().index()))
slowPath.append(m_jit.branchPtr(MacroAssembler::Below, arg2GPR, GPRInfo::tagTypeNumberRegister));
m_jit.compare32(cond, arg1GPR, arg2GPR, resultGPR);
- if (!isKnownInteger(node.child1()) || !isKnownInteger(node.child2())) {
+ if (!isKnownInteger(node.child1().index()) || !isKnownInteger(node.child2().index())) {
JITCompiler::Jump haveResult = m_jit.jump();
slowPath.link(&m_jit);
@@ -795,7 +795,7 @@ void SpeculativeJIT::nonSpeculativePeepholeStrictEq(Node& node, NodeIndex branch
arg1.use();
arg2.use();
- if (isKnownCell(node.child1()) && isKnownCell(node.child2())) {
+ if (isKnownCell(node.child1().index()) && isKnownCell(node.child2().index())) {
// see if we get lucky: if the arguments are cells and they reference the same
// cell, then they must be strictly equal.
addBranch(m_jit.branchPtr(JITCompiler::Equal, arg1GPR, arg2GPR), invert ? notTaken : taken);
@@ -844,7 +844,7 @@ void SpeculativeJIT::nonSpeculativeNonPeepholeStrictEq(Node& node, bool invert)
arg1.use();
arg2.use();
- if (isKnownCell(node.child1()) && isKnownCell(node.child2())) {
+ if (isKnownCell(node.child1().index()) && isKnownCell(node.child2().index())) {
// see if we get lucky: if the arguments are cells and they reference the same
// cell, then they must be strictly equal.
JITCompiler::Jump notEqualCase = m_jit.branchPtr(JITCompiler::NotEqual, arg1GPR, arg2GPR);
@@ -917,10 +917,10 @@ void SpeculativeJIT::emitCall(Node& node)
CallLinkInfo::CallType callType = node.op == Call ? CallLinkInfo::Call : CallLinkInfo::Construct;
- NodeIndex calleeNodeIndex = m_jit.graph().m_varArgChildren[node.firstChild()];
- JSValueOperand callee(this, calleeNodeIndex);
+ NodeUse calleeNodeUse = m_jit.graph().m_varArgChildren[node.firstChild()];
+ JSValueOperand callee(this, calleeNodeUse);
GPRReg calleeGPR = callee.gpr();
- use(calleeNodeIndex);
+ use(calleeNodeUse);
// The call instruction's first child is either the function (normal call) or the
// receiver (method call). subsequent children are the arguments.
@@ -931,10 +931,10 @@ void SpeculativeJIT::emitCall(Node& node)
m_jit.storePtr(calleeGPR, callFrameSlot(RegisterFile::Callee));
for (int i = 0; i < numPassedArgs; i++) {
- NodeIndex argNodeIndex = m_jit.graph().m_varArgChildren[node.firstChild() + 1 + i];
- JSValueOperand arg(this, argNodeIndex);
+ NodeUse argNodeUse = m_jit.graph().m_varArgChildren[node.firstChild() + 1 + i];
+ JSValueOperand arg(this, argNodeUse);
GPRReg argGPR = arg.gpr();
- use(argNodeIndex);
+ use(argNodeUse);
m_jit.storePtr(argGPR, argumentSlot(i + dummyThisArgument));
}
@@ -1459,9 +1459,9 @@ void SpeculativeJIT::compileObjectEquality(Node& node, const ClassInfo* classInf
GPRReg resultGPR = result.gpr();
if (!predictionCheck(m_state.forNode(node.child1()).m_type))
- speculationCheck(BadType, JSValueRegs(op1GPR), node.child1(), m_jit.branchPtr(MacroAssembler::NotEqual, MacroAssembler::Address(op1GPR, JSCell::classInfoOffset()), MacroAssembler::TrustedImmPtr(classInfo)));
+ speculationCheck(BadType, JSValueRegs(op1GPR), node.child1().index(), m_jit.branchPtr(MacroAssembler::NotEqual, MacroAssembler::Address(op1GPR, JSCell::classInfoOffset()), MacroAssembler::TrustedImmPtr(classInfo)));
if (!predictionCheck(m_state.forNode(node.child2()).m_type))
- speculationCheck(BadType, JSValueRegs(op2GPR), node.child2(), m_jit.branchPtr(MacroAssembler::NotEqual, MacroAssembler::Address(op2GPR, JSCell::classInfoOffset()), MacroAssembler::TrustedImmPtr(classInfo)));
+ speculationCheck(BadType, JSValueRegs(op2GPR), node.child2().index(), m_jit.branchPtr(MacroAssembler::NotEqual, MacroAssembler::Address(op2GPR, JSCell::classInfoOffset()), MacroAssembler::TrustedImmPtr(classInfo)));
MacroAssembler::Jump falseCase = m_jit.branchPtr(MacroAssembler::NotEqual, op1GPR, op2GPR);
m_jit.move(Imm32(ValueTrue), resultGPR);
@@ -1511,7 +1511,7 @@ void SpeculativeJIT::compileValueAdd(Node& node)
flushRegisters();
GPRResult result(this);
- if (isKnownNotNumber(node.child1()) || isKnownNotNumber(node.child2()))
+ if (isKnownNotNumber(node.child1().index()) || isKnownNotNumber(node.child2().index()))
callOperation(operationValueAddNotNumber, result.gpr(), op1GPR, op2GPR);
else
callOperation(operationValueAdd, result.gpr(), op1GPR, op2GPR);
@@ -1519,16 +1519,16 @@ void SpeculativeJIT::compileValueAdd(Node& node)
jsValueResult(result.gpr(), m_compileIndex);
}
-void SpeculativeJIT::compileObjectOrOtherLogicalNot(NodeIndex nodeIndex, const ClassInfo* classInfo, bool needSpeculationCheck)
+void SpeculativeJIT::compileObjectOrOtherLogicalNot(NodeUse nodeUse, const ClassInfo* classInfo, bool needSpeculationCheck)
{
- JSValueOperand value(this, nodeIndex);
+ JSValueOperand value(this, nodeUse);
GPRTemporary result(this);
GPRReg valueGPR = value.gpr();
GPRReg resultGPR = result.gpr();
MacroAssembler::Jump notCell = m_jit.branchTestPtr(MacroAssembler::NonZero, valueGPR, GPRInfo::tagMaskRegister);
if (needSpeculationCheck)
- speculationCheck(BadType, JSValueRegs(valueGPR), nodeIndex, m_jit.branchPtr(MacroAssembler::NotEqual, MacroAssembler::Address(valueGPR, JSCell::classInfoOffset()), MacroAssembler::TrustedImmPtr(classInfo)));
+ speculationCheck(BadType, JSValueRegs(valueGPR), nodeUse, m_jit.branchPtr(MacroAssembler::NotEqual, MacroAssembler::Address(valueGPR, JSCell::classInfoOffset()), MacroAssembler::TrustedImmPtr(classInfo)));
m_jit.move(TrustedImm32(static_cast<int32_t>(ValueFalse)), resultGPR);
MacroAssembler::Jump done = m_jit.jump();
@@ -1537,7 +1537,7 @@ void SpeculativeJIT::compileObjectOrOtherLogicalNot(NodeIndex nodeIndex, const C
if (needSpeculationCheck) {
m_jit.move(valueGPR, resultGPR);
m_jit.andPtr(MacroAssembler::TrustedImm32(~TagBitUndefined), resultGPR);
- speculationCheck(BadType, JSValueRegs(valueGPR), nodeIndex, m_jit.branchPtr(MacroAssembler::NotEqual, resultGPR, MacroAssembler::TrustedImmPtr(reinterpret_cast<void*>(ValueNull))));
+ speculationCheck(BadType, JSValueRegs(valueGPR), nodeUse, m_jit.branchPtr(MacroAssembler::NotEqual, resultGPR, MacroAssembler::TrustedImmPtr(reinterpret_cast<void*>(ValueNull))));
}
m_jit.move(TrustedImm32(static_cast<int32_t>(ValueTrue)), resultGPR);
@@ -1548,7 +1548,7 @@ void SpeculativeJIT::compileObjectOrOtherLogicalNot(NodeIndex nodeIndex, const C
void SpeculativeJIT::compileLogicalNot(Node& node)
{
- if (isKnownBoolean(node.child1())) {
+ if (isKnownBoolean(node.child1().index())) {
SpeculateBooleanOperand value(this, node.child1());
GPRTemporary result(this, value);
@@ -1623,16 +1623,16 @@ void SpeculativeJIT::compileLogicalNot(Node& node)
jsValueResult(resultGPR, m_compileIndex, DataFormatJSBoolean, UseChildrenCalledExplicitly);
}
-void SpeculativeJIT::emitObjectOrOtherBranch(NodeIndex nodeIndex, BlockIndex taken, BlockIndex notTaken, const ClassInfo* classInfo, bool needSpeculationCheck)
+void SpeculativeJIT::emitObjectOrOtherBranch(NodeUse nodeUse, BlockIndex taken, BlockIndex notTaken, const ClassInfo* classInfo, bool needSpeculationCheck)
{
- JSValueOperand value(this, nodeIndex);
+ JSValueOperand value(this, nodeUse);
GPRTemporary scratch(this);
GPRReg valueGPR = value.gpr();
GPRReg scratchGPR = scratch.gpr();
MacroAssembler::Jump notCell = m_jit.branchTestPtr(MacroAssembler::NonZero, valueGPR, GPRInfo::tagMaskRegister);
if (needSpeculationCheck)
- speculationCheck(BadType, JSValueRegs(valueGPR), nodeIndex, m_jit.branchPtr(MacroAssembler::NotEqual, MacroAssembler::Address(valueGPR, JSCell::classInfoOffset()), MacroAssembler::TrustedImmPtr(classInfo)));
+ speculationCheck(BadType, JSValueRegs(valueGPR), nodeUse.index(), m_jit.branchPtr(MacroAssembler::NotEqual, MacroAssembler::Address(valueGPR, JSCell::classInfoOffset()), MacroAssembler::TrustedImmPtr(classInfo)));
addBranch(m_jit.jump(), taken);
notCell.link(&m_jit);
@@ -1640,7 +1640,7 @@ void SpeculativeJIT::emitObjectOrOtherBranch(NodeIndex nodeIndex, BlockIndex tak
if (needSpeculationCheck) {
m_jit.move(valueGPR, scratchGPR);
m_jit.andPtr(MacroAssembler::TrustedImm32(~TagBitUndefined), scratchGPR);
- speculationCheck(BadType, JSValueRegs(valueGPR), nodeIndex, m_jit.branchPtr(MacroAssembler::NotEqual, scratchGPR, MacroAssembler::TrustedImmPtr(reinterpret_cast<void*>(ValueNull))));
+ speculationCheck(BadType, JSValueRegs(valueGPR), nodeUse.index(), m_jit.branchPtr(MacroAssembler::NotEqual, scratchGPR, MacroAssembler::TrustedImmPtr(reinterpret_cast<void*>(ValueNull))));
}
if (notTaken != (m_block + 1))
addBranch(m_jit.jump(), notTaken);
@@ -1656,7 +1656,7 @@ void SpeculativeJIT::emitBranch(Node& node)
BlockIndex taken = node.takenBlockIndex();
BlockIndex notTaken = node.notTakenBlockIndex();
- if (isKnownBoolean(node.child1())) {
+ if (isKnownBoolean(node.child1().index())) {
MacroAssembler::ResultCondition condition = MacroAssembler::NonZero;
if (taken == (m_block + 1)) {
@@ -1879,18 +1879,18 @@ void SpeculativeJIT::compile(Node& node)
case BitAnd:
case BitOr:
case BitXor:
- if (isInt32Constant(node.child1())) {
+ if (isInt32Constant(node.child1().index())) {
SpeculateIntegerOperand op2(this, node.child2());
GPRTemporary result(this, op2);
- bitOp(op, valueOfInt32Constant(node.child1()), op2.gpr(), result.gpr());
+ bitOp(op, valueOfInt32Constant(node.child1().index()), op2.gpr(), result.gpr());
integerResult(result.gpr(), m_compileIndex);
- } else if (isInt32Constant(node.child2())) {
+ } else if (isInt32Constant(node.child2().index())) {
SpeculateIntegerOperand op1(this, node.child1());
GPRTemporary result(this, op1);
- bitOp(op, valueOfInt32Constant(node.child2()), op1.gpr(), result.gpr());
+ bitOp(op, valueOfInt32Constant(node.child2().index()), op1.gpr(), result.gpr());
integerResult(result.gpr(), m_compileIndex);
} else {
@@ -1909,11 +1909,11 @@ void SpeculativeJIT::compile(Node& node)
case BitRShift:
case BitLShift:
case BitURShift:
- if (isInt32Constant(node.child2())) {
+ if (isInt32Constant(node.child2().index())) {
SpeculateIntegerOperand op1(this, node.child1());
GPRTemporary result(this, op1);
- shiftOp(op, op1.gpr(), valueOfInt32Constant(node.child2()) & 0x1f, result.gpr());
+ shiftOp(op, op1.gpr(), valueOfInt32Constant(node.child2().index()) & 0x1f, result.gpr());
integerResult(result.gpr(), m_compileIndex);
} else {
@@ -1940,30 +1940,6 @@ void SpeculativeJIT::compile(Node& node)
break;
}
- case ValueToNumber: {
- if (at(node.child1()).shouldNotSpeculateInteger()) {
- SpeculateDoubleOperand op1(this, node.child1());
- FPRTemporary result(this, op1);
- m_jit.moveDouble(op1.fpr(), result.fpr());
- doubleResult(result.fpr(), m_compileIndex);
- break;
- }
-
- SpeculateIntegerOperand op1(this, node.child1());
- GPRTemporary result(this, op1);
- m_jit.move(op1.gpr(), result.gpr());
- integerResult(result.gpr(), m_compileIndex, op1.format());
- break;
- }
-
- case ValueToDouble: {
- SpeculateDoubleOperand op1(this, node.child1());
- FPRTemporary result(this, op1);
- m_jit.moveDouble(op1.fpr(), result.fpr());
- doubleResult(result.fpr(), m_compileIndex);
- break;
- }
-
case ValueAdd:
case ArithAdd:
compileAdd(node);
@@ -2147,12 +2123,12 @@ void SpeculativeJIT::compile(Node& node)
break;
case CompareEq:
- if (isNullConstant(node.child1())) {
+ if (isNullConstant(node.child1().index())) {
if (nonSpeculativeCompareNull(node, node.child2()))
return;
break;
}
- if (isNullConstant(node.child2())) {
+ if (isNullConstant(node.child2().index())) {
if (nonSpeculativeCompareNull(node, node.child1()))
return;
break;
@@ -2661,7 +2637,7 @@ void SpeculativeJIT::compile(Node& node)
}
case Branch:
- if (isStrictInt32(node.child1()) || at(node.child1()).shouldSpeculateInteger()) {
+ if (isStrictInt32(node.child1().index()) || at(node.child1()).shouldSpeculateInteger()) {
SpeculateIntegerOperand op(this, node.child1());
BlockIndex taken = node.takenBlockIndex();
@@ -2738,7 +2714,7 @@ void SpeculativeJIT::compile(Node& node)
// FIXME: Add string speculation here.
- bool wasPrimitive = isKnownNumeric(node.child1()) || isKnownBoolean(node.child1());
+ bool wasPrimitive = isKnownNumeric(node.child1().index()) || isKnownBoolean(node.child1().index());
JSValueOperand op1(this, node.child1());
GPRTemporary result(this, op1);
diff --git a/Source/JavaScriptCore/heap/HandleTypes.h b/Source/JavaScriptCore/heap/HandleTypes.h
index 780ab85cd..bdfbcfda3 100644
--- a/Source/JavaScriptCore/heap/HandleTypes.h
+++ b/Source/JavaScriptCore/heap/HandleTypes.h
@@ -35,7 +35,7 @@ typedef JSValue* HandleSlot;
template<typename T> struct HandleTypes {
typedef T* ExternalType;
- static ExternalType getFromSlot(HandleSlot slot) { return (slot && *slot) ? reinterpret_cast<ExternalType>(slot->asCell()) : 0; }
+ static ExternalType getFromSlot(HandleSlot slot) { return (slot && *slot) ? reinterpret_cast<ExternalType>(static_cast<void*>(slot->asCell())) : 0; }
static JSValue toJSValue(T* cell) { return reinterpret_cast<JSCell*>(cell); }
template<typename U> static void validateUpcast() { T* temp; temp = (U*)0; }
};
diff --git a/Source/JavaScriptCore/heap/Heap.cpp b/Source/JavaScriptCore/heap/Heap.cpp
index a2136083a..9f5094a58 100644
--- a/Source/JavaScriptCore/heap/Heap.cpp
+++ b/Source/JavaScriptCore/heap/Heap.cpp
@@ -811,7 +811,7 @@ void Heap::collect(SweepToggle sweepToggle)
{
GCPHASE(ResetAllocator);
- resetAllocator();
+ resetAllocators();
}
{
@@ -846,10 +846,10 @@ void Heap::canonicalizeCellLivenessData()
m_objectSpace.canonicalizeCellLivenessData();
}
-void Heap::resetAllocator()
+void Heap::resetAllocators()
{
m_extraCost = 0;
- m_objectSpace.resetAllocator();
+ m_objectSpace.resetAllocators();
}
void Heap::setActivityCallback(PassOwnPtr<GCActivityCallback> activityCallback)
diff --git a/Source/JavaScriptCore/heap/Heap.h b/Source/JavaScriptCore/heap/Heap.h
index 40a8376f0..1d0ac5407 100644
--- a/Source/JavaScriptCore/heap/Heap.h
+++ b/Source/JavaScriptCore/heap/Heap.h
@@ -25,6 +25,7 @@
#include "DFGCodeBlocks.h"
#include "HandleHeap.h"
#include "HandleStack.h"
+#include "MarkedAllocator.h"
#include "MarkedBlock.h"
#include "MarkedBlockSet.h"
#include "MarkedSpace.h"
@@ -94,7 +95,7 @@ namespace JSC {
// true if an allocation or collection is in progress
inline bool isBusy();
- MarkedSpace::SizeClass& sizeClassForObject(size_t bytes) { return m_objectSpace.sizeClassFor(bytes); }
+ MarkedAllocator& allocatorForObject(size_t bytes) { return m_objectSpace.allocatorFor(bytes); }
void* allocate(size_t);
CheckedBoolean tryAllocateStorage(size_t, void**);
CheckedBoolean tryReallocateStorage(void**, size_t, size_t);
@@ -136,6 +137,7 @@ namespace JSC {
private:
friend class MarkedSpace;
+ friend class MarkedAllocator;
friend class MarkedBlock;
friend class BumpSpace;
friend class SlotVisitor;
@@ -160,7 +162,7 @@ namespace JSC {
// conservative marking, eager sweeping, or iterating the cells in a MarkedBlock.)
void canonicalizeCellLivenessData();
- void resetAllocator();
+ void resetAllocators();
void freeBlocks(MarkedBlock*);
void clearMarks();
diff --git a/Source/JavaScriptCore/heap/MarkedAllocator.cpp b/Source/JavaScriptCore/heap/MarkedAllocator.cpp
new file mode 100644
index 000000000..8239fbaed
--- /dev/null
+++ b/Source/JavaScriptCore/heap/MarkedAllocator.cpp
@@ -0,0 +1,128 @@
+#include "config.h"
+#include "MarkedAllocator.h"
+
+#include "Heap.h"
+
+namespace JSC {
+
+inline void* MarkedAllocator::tryAllocateHelper()
+{
+ MarkedBlock::FreeCell* firstFreeCell = m_firstFreeCell;
+ if (!firstFreeCell) {
+ for (MarkedBlock*& block = m_currentBlock; block; block = static_cast<MarkedBlock*>(block->next())) {
+ firstFreeCell = block->sweep(MarkedBlock::SweepToFreeList);
+ if (firstFreeCell)
+ break;
+ m_markedSpace->didConsumeFreeList(block);
+ block->didConsumeFreeList();
+ }
+
+ if (!firstFreeCell)
+ return 0;
+ }
+
+ ASSERT(firstFreeCell);
+ m_firstFreeCell = firstFreeCell->next;
+ return firstFreeCell;
+}
+
+inline void* MarkedAllocator::tryAllocate()
+{
+ m_heap->m_operationInProgress = Allocation;
+ void* result = tryAllocateHelper();
+ m_heap->m_operationInProgress = NoOperation;
+ return result;
+}
+
+void* MarkedAllocator::allocateSlowCase()
+{
+#if COLLECT_ON_EVERY_ALLOCATION
+ m_heap->collectAllGarbage();
+ ASSERT(m_heap->m_operationInProgress == NoOperation);
+#endif
+
+ void* result = tryAllocate();
+
+ if (LIKELY(result != 0))
+ return result;
+
+ AllocationEffort allocationEffort;
+
+ if ((
+#if ENABLE(GGC)
+ nurseryWaterMark() < m_heap->m_minBytesPerCycle
+#else
+ m_heap->waterMark() < m_heap->highWaterMark()
+#endif
+ ) || !m_heap->m_isSafeToCollect)
+ allocationEffort = AllocationMustSucceed;
+ else
+ allocationEffort = AllocationCanFail;
+
+ MarkedBlock* block = allocateBlock(allocationEffort);
+ if (block) {
+ addBlock(block);
+ void* result = tryAllocate();
+ ASSERT(result);
+ return result;
+ }
+
+ m_heap->collect(Heap::DoNotSweep);
+
+ result = tryAllocate();
+
+ if (result)
+ return result;
+
+ ASSERT(m_heap->waterMark() < m_heap->highWaterMark());
+
+ addBlock(allocateBlock(AllocationMustSucceed));
+
+ result = tryAllocate();
+ ASSERT(result);
+ return result;
+}
+
+MarkedBlock* MarkedAllocator::allocateBlock(AllocationEffort allocationEffort)
+{
+ MarkedBlock* block;
+
+ {
+ MutexLocker locker(m_heap->m_freeBlockLock);
+ if (m_heap->m_numberOfFreeBlocks) {
+ block = static_cast<MarkedBlock*>(m_heap->m_freeBlocks.removeHead());
+ ASSERT(block);
+ m_heap->m_numberOfFreeBlocks--;
+ } else
+ block = 0;
+ }
+ if (block)
+ block = MarkedBlock::recycle(block, m_heap, m_cellSize);
+ else if (allocationEffort == AllocationCanFail)
+ return 0;
+ else
+ block = MarkedBlock::create(m_heap, m_cellSize);
+
+ m_markedSpace->didAddBlock(block);
+
+ return block;
+}
+
+void MarkedAllocator::addBlock(MarkedBlock* block)
+{
+ ASSERT(!m_currentBlock);
+ ASSERT(!m_firstFreeCell);
+
+ m_blockList.append(block);
+ m_currentBlock = block;
+ m_firstFreeCell = block->sweep(MarkedBlock::SweepToFreeList);
+}
+
+void MarkedAllocator::removeBlock(MarkedBlock* block)
+{
+ if (m_currentBlock == block)
+ m_currentBlock = 0;
+ m_blockList.remove(block);
+}
+
+} // namespace JSC
diff --git a/Source/JavaScriptCore/heap/MarkedAllocator.h b/Source/JavaScriptCore/heap/MarkedAllocator.h
new file mode 100644
index 000000000..5644c691b
--- /dev/null
+++ b/Source/JavaScriptCore/heap/MarkedAllocator.h
@@ -0,0 +1,97 @@
+#ifndef MarkedAllocator_h
+#define MarkedAllocator_h
+
+#include "MarkedBlock.h"
+#include <wtf/DoublyLinkedList.h>
+
+namespace JSC {
+
+class Heap;
+class MarkedSpace;
+
+namespace DFG {
+class SpeculativeJIT;
+}
+
+class MarkedAllocator {
+ friend class JIT;
+ friend class DFG::SpeculativeJIT;
+
+public:
+ MarkedAllocator();
+ void reset();
+ void zapFreeList();
+ size_t cellSize() { return m_cellSize; }
+ void* allocate();
+ Heap* heap() { return m_heap; }
+
+ template<typename Functor> void forEachBlock(Functor&);
+
+ void addBlock(MarkedBlock*);
+ void removeBlock(MarkedBlock*);
+ void setHeap(Heap* heap) { m_heap = heap; }
+ void setCellSize(size_t cellSize) { m_cellSize = cellSize; }
+ void setMarkedSpace(MarkedSpace* space) { m_markedSpace = space; }
+
+private:
+ JS_EXPORT_PRIVATE void* allocateSlowCase();
+ void* tryAllocate();
+ void* tryAllocateHelper();
+ MarkedBlock* allocateBlock(AllocationEffort);
+
+ MarkedBlock::FreeCell* m_firstFreeCell;
+ MarkedBlock* m_currentBlock;
+ DoublyLinkedList<HeapBlock> m_blockList;
+ size_t m_cellSize;
+ Heap* m_heap;
+ MarkedSpace* m_markedSpace;
+};
+
+inline MarkedAllocator::MarkedAllocator()
+ : m_firstFreeCell(0)
+ , m_currentBlock(0)
+ , m_cellSize(0)
+ , m_heap(0)
+ , m_markedSpace(0)
+{
+}
+
+inline void* MarkedAllocator::allocate()
+{
+ MarkedBlock::FreeCell* firstFreeCell = m_firstFreeCell;
+ // This is a light-weight fast path to cover the most common case.
+ if (UNLIKELY(!firstFreeCell))
+ return allocateSlowCase();
+
+ m_firstFreeCell = firstFreeCell->next;
+ return firstFreeCell;
+}
+
+inline void MarkedAllocator::reset()
+{
+ m_currentBlock = static_cast<MarkedBlock*>(m_blockList.head());
+}
+
+inline void MarkedAllocator::zapFreeList()
+{
+ if (!m_currentBlock) {
+ ASSERT(!m_firstFreeCell);
+ return;
+ }
+
+ m_currentBlock->zapFreeList(m_firstFreeCell);
+ m_firstFreeCell = 0;
+}
+
+template <typename Functor> inline void MarkedAllocator::forEachBlock(Functor& functor)
+{
+ HeapBlock* next;
+ for (HeapBlock* block = m_blockList.head(); block; block = next) {
+ next = block->next();
+ functor(static_cast<MarkedBlock*>(block));
+ }
+}
+
+} // namespace JSC
+
+#endif
diff --git a/Source/JavaScriptCore/heap/MarkedBlock.cpp b/Source/JavaScriptCore/heap/MarkedBlock.cpp
index 715f25d92..dd9233300 100644
--- a/Source/JavaScriptCore/heap/MarkedBlock.cpp
+++ b/Source/JavaScriptCore/heap/MarkedBlock.cpp
@@ -89,7 +89,7 @@ MarkedBlock::FreeCell* MarkedBlock::specializedSweep()
if (blockState == Marked && m_marks.get(i))
continue;
- JSCell* cell = reinterpret_cast<JSCell*>(&atoms()[i]);
+ JSCell* cell = reinterpret_cast_ptr<JSCell*>(&atoms()[i]);
if (blockState == Zapped && !cell->isZapped())
continue;
diff --git a/Source/JavaScriptCore/heap/MarkedBlock.h b/Source/JavaScriptCore/heap/MarkedBlock.h
index 00eb54b1f..0a4ebe47e 100644
--- a/Source/JavaScriptCore/heap/MarkedBlock.h
+++ b/Source/JavaScriptCore/heap/MarkedBlock.h
@@ -317,7 +317,7 @@ namespace JSC {
template <typename Functor> inline void MarkedBlock::forEachCell(Functor& functor)
{
for (size_t i = firstAtom(); i < m_endAtom; i += m_atomsPerCell) {
- JSCell* cell = reinterpret_cast<JSCell*>(&atoms()[i]);
+ JSCell* cell = reinterpret_cast_ptr<JSCell*>(&atoms()[i]);
if (!isLive(cell))
continue;
diff --git a/Source/JavaScriptCore/heap/MarkedSpace.cpp b/Source/JavaScriptCore/heap/MarkedSpace.cpp
index fcca188e4..87dc0493d 100644
--- a/Source/JavaScriptCore/heap/MarkedSpace.cpp
+++ b/Source/JavaScriptCore/heap/MarkedSpace.cpp
@@ -35,155 +35,40 @@ MarkedSpace::MarkedSpace(Heap* heap)
, m_nurseryWaterMark(0)
, m_heap(heap)
{
- for (size_t cellSize = preciseStep; cellSize <= preciseCutoff; cellSize += preciseStep)
- sizeClassFor(cellSize).cellSize = cellSize;
-
- for (size_t cellSize = impreciseStep; cellSize <= impreciseCutoff; cellSize += impreciseStep)
- sizeClassFor(cellSize).cellSize = cellSize;
-}
-
-void MarkedSpace::addBlock(SizeClass& sizeClass, MarkedBlock* block)
-{
- ASSERT(!sizeClass.currentBlock);
- ASSERT(!sizeClass.firstFreeCell);
-
- sizeClass.blockList.append(block);
- sizeClass.currentBlock = block;
- sizeClass.firstFreeCell = block->sweep(MarkedBlock::SweepToFreeList);
-}
+ for (size_t cellSize = preciseStep; cellSize <= preciseCutoff; cellSize += preciseStep) {
+ allocatorFor(cellSize).setCellSize(cellSize);
+ allocatorFor(cellSize).setHeap(heap);
+ allocatorFor(cellSize).setMarkedSpace(this);
+ }
-void MarkedSpace::removeBlock(MarkedBlock* block)
-{
- SizeClass& sizeClass = sizeClassFor(block->cellSize());
- if (sizeClass.currentBlock == block)
- sizeClass.currentBlock = 0;
- sizeClass.blockList.remove(block);
+ for (size_t cellSize = impreciseStep; cellSize <= impreciseCutoff; cellSize += impreciseStep) {
+ allocatorFor(cellSize).setCellSize(cellSize);
+ allocatorFor(cellSize).setHeap(heap);
+ allocatorFor(cellSize).setMarkedSpace(this);
+ }
}
-void MarkedSpace::resetAllocator()
+void MarkedSpace::resetAllocators()
{
m_waterMark = 0;
m_nurseryWaterMark = 0;
for (size_t cellSize = preciseStep; cellSize <= preciseCutoff; cellSize += preciseStep)
- sizeClassFor(cellSize).resetAllocator();
+ allocatorFor(cellSize).reset();
for (size_t cellSize = impreciseStep; cellSize <= impreciseCutoff; cellSize += impreciseStep)
- sizeClassFor(cellSize).resetAllocator();
+ allocatorFor(cellSize).reset();
}
void MarkedSpace::canonicalizeCellLivenessData()
{
for (size_t cellSize = preciseStep; cellSize <= preciseCutoff; cellSize += preciseStep)
- sizeClassFor(cellSize).zapFreeList();
+ allocatorFor(cellSize).zapFreeList();
for (size_t cellSize = impreciseStep; cellSize <= impreciseCutoff; cellSize += impreciseStep)
- sizeClassFor(cellSize).zapFreeList();
+ allocatorFor(cellSize).zapFreeList();
}
-inline void* MarkedSpace::tryAllocateHelper(MarkedSpace::SizeClass& sizeClass)
-{
- MarkedBlock::FreeCell* firstFreeCell = sizeClass.firstFreeCell;
- if (!firstFreeCell) {
- for (MarkedBlock*& block = sizeClass.currentBlock; block; block = static_cast<MarkedBlock*>(block->next())) {
- firstFreeCell = block->sweep(MarkedBlock::SweepToFreeList);
- if (firstFreeCell)
- break;
- m_nurseryWaterMark += block->capacity() - block->size();
- m_waterMark += block->capacity();
- block->didConsumeFreeList();
- }
-
- if (!firstFreeCell)
- return 0;
- }
-
- ASSERT(firstFreeCell);
- sizeClass.firstFreeCell = firstFreeCell->next;
- return firstFreeCell;
-}
-
-inline void* MarkedSpace::tryAllocate(MarkedSpace::SizeClass& sizeClass)
-{
- m_heap->m_operationInProgress = Allocation;
- void* result = tryAllocateHelper(sizeClass);
- m_heap->m_operationInProgress = NoOperation;
- return result;
-}
-
-void* MarkedSpace::allocateSlowCase(MarkedSpace::SizeClass& sizeClass)
-{
-#if COLLECT_ON_EVERY_ALLOCATION
- m_heap->collectAllGarbage();
- ASSERT(m_heap->m_operationInProgress == NoOperation);
-#endif
-
- void* result = tryAllocate(sizeClass);
-
- if (LIKELY(result != 0))
- return result;
-
- AllocationEffort allocationEffort;
-
- if ((
-#if ENABLE(GGC)
- nurseryWaterMark() < m_heap->m_minBytesPerCycle
-#else
- m_heap->waterMark() < m_heap->highWaterMark()
-#endif
- ) || !m_heap->m_isSafeToCollect)
- allocationEffort = AllocationMustSucceed;
- else
- allocationEffort = AllocationCanFail;
-
- MarkedBlock* block = allocateBlock(sizeClass.cellSize, allocationEffort);
- if (block) {
- addBlock(sizeClass, block);
- void* result = tryAllocate(sizeClass);
- ASSERT(result);
- return result;
- }
-
- m_heap->collect(Heap::DoNotSweep);
-
- result = tryAllocate(sizeClass);
-
- if (result)
- return result;
-
- ASSERT(m_heap->waterMark() < m_heap->highWaterMark());
-
- addBlock(sizeClass, allocateBlock(sizeClass.cellSize, AllocationMustSucceed));
-
- result = tryAllocate(sizeClass);
- ASSERT(result);
- return result;
-}
-
-MarkedBlock* MarkedSpace::allocateBlock(size_t cellSize, AllocationEffort allocationEffort)
-{
- MarkedBlock* block;
-
- {
- MutexLocker locker(m_heap->m_freeBlockLock);
- if (m_heap->m_numberOfFreeBlocks) {
- block = static_cast<MarkedBlock*>(m_heap->m_freeBlocks.removeHead());
- ASSERT(block);
- m_heap->m_numberOfFreeBlocks--;
- } else
- block = 0;
- }
- if (block)
- block = MarkedBlock::recycle(block, m_heap, cellSize);
- else if (allocationEffort == AllocationCanFail)
- return 0;
- else
- block = MarkedBlock::create(m_heap, cellSize);
-
- m_blocks.add(block);
-
- return block;
-}
void MarkedSpace::freeBlocks(MarkedBlock* head)
{
@@ -222,7 +107,7 @@ inline void TakeIfUnmarked::operator()(MarkedBlock* block)
if (!block->markCountIsZero())
return;
- m_markedSpace->removeBlock(block);
+ m_markedSpace->allocatorFor(block->cellSize()).removeBlock(block);
m_empties.append(block);
}
diff --git a/Source/JavaScriptCore/heap/MarkedSpace.h b/Source/JavaScriptCore/heap/MarkedSpace.h
index f7d96c774..21a0b48de 100644
--- a/Source/JavaScriptCore/heap/MarkedSpace.h
+++ b/Source/JavaScriptCore/heap/MarkedSpace.h
@@ -23,6 +23,7 @@
#define MarkedSpace_h
#include "MachineStackMarker.h"
+#include "MarkedAllocator.h"
#include "MarkedBlock.h"
#include "MarkedBlockSet.h"
#include "PageAllocationAligned.h"
@@ -48,27 +49,13 @@ class MarkedSpace {
public:
static const size_t maxCellSize = 2048;
- struct SizeClass {
- SizeClass();
- void resetAllocator();
- void zapFreeList();
-
- MarkedBlock::FreeCell* firstFreeCell;
- MarkedBlock* currentBlock;
- DoublyLinkedList<HeapBlock> blockList;
- size_t cellSize;
- };
-
MarkedSpace(Heap*);
- SizeClass& sizeClassFor(size_t);
+ MarkedAllocator& allocatorFor(size_t);
void* allocate(size_t);
- void* allocate(SizeClass&);
- void resetAllocator();
+ void resetAllocators();
- void addBlock(SizeClass&, MarkedBlock*);
- void removeBlock(MarkedBlock*);
MarkedBlockSet& blocks() { return m_blocks; }
void canonicalizeCellLivenessData();
@@ -85,13 +72,10 @@ public:
void shrink();
void freeBlocks(MarkedBlock* head);
+ void didAddBlock(MarkedBlock*);
+ void didConsumeFreeList(MarkedBlock*);
private:
- JS_EXPORT_PRIVATE void* allocateSlowCase(SizeClass&);
- void* tryAllocateHelper(MarkedSpace::SizeClass&);
- void* tryAllocate(MarkedSpace::SizeClass&);
- MarkedBlock* allocateBlock(size_t, AllocationEffort);
-
// [ 32... 256 ]
static const size_t preciseStep = MarkedBlock::atomSize;
static const size_t preciseCutoff = 256;
@@ -102,8 +86,8 @@ private:
static const size_t impreciseCutoff = maxCellSize;
static const size_t impreciseCount = impreciseCutoff / impreciseStep;
- FixedArray<SizeClass, preciseCount> m_preciseSizeClasses;
- FixedArray<SizeClass, impreciseCount> m_impreciseSizeClasses;
+ FixedArray<MarkedAllocator, preciseCount> m_preciseSizeClasses;
+ FixedArray<MarkedAllocator, impreciseCount> m_impreciseSizeClasses;
size_t m_waterMark;
size_t m_nurseryWaterMark;
Heap* m_heap;
@@ -136,7 +120,7 @@ template<typename Functor> inline typename Functor::ReturnType MarkedSpace::forE
return forEachCell(functor);
}
-inline MarkedSpace::SizeClass& MarkedSpace::sizeClassFor(size_t bytes)
+inline MarkedAllocator& MarkedSpace::allocatorFor(size_t bytes)
{
ASSERT(bytes && bytes <= maxCellSize);
if (bytes <= preciseCutoff)
@@ -146,39 +130,17 @@ inline MarkedSpace::SizeClass& MarkedSpace::sizeClassFor(size_t bytes)
inline void* MarkedSpace::allocate(size_t bytes)
{
- SizeClass& sizeClass = sizeClassFor(bytes);
- return allocate(sizeClass);
-}
-
-inline void* MarkedSpace::allocate(SizeClass& sizeClass)
-{
- // This is a light-weight fast path to cover the most common case.
- MarkedBlock::FreeCell* firstFreeCell = sizeClass.firstFreeCell;
- if (UNLIKELY(!firstFreeCell))
- return allocateSlowCase(sizeClass);
-
- sizeClass.firstFreeCell = firstFreeCell->next;
- return firstFreeCell;
+ return allocatorFor(bytes).allocate();
}
template <typename Functor> inline typename Functor::ReturnType MarkedSpace::forEachBlock(Functor& functor)
{
for (size_t i = 0; i < preciseCount; ++i) {
- SizeClass& sizeClass = m_preciseSizeClasses[i];
- HeapBlock* next;
- for (HeapBlock* block = sizeClass.blockList.head(); block; block = next) {
- next = block->next();
- functor(static_cast<MarkedBlock*>(block));
- }
+ m_preciseSizeClasses[i].forEachBlock(functor);
}
for (size_t i = 0; i < impreciseCount; ++i) {
- SizeClass& sizeClass = m_impreciseSizeClasses[i];
- HeapBlock* next;
- for (HeapBlock* block = sizeClass.blockList.head(); block; block = next) {
- next = block->next();
- functor(static_cast<MarkedBlock*>(block));
- }
+ m_impreciseSizeClasses[i].forEachBlock(functor);
}
return functor.returnValue();
@@ -190,27 +152,15 @@ template <typename Functor> inline typename Functor::ReturnType MarkedSpace::for
return forEachBlock(functor);
}
-inline MarkedSpace::SizeClass::SizeClass()
- : firstFreeCell(0)
- , currentBlock(0)
- , cellSize(0)
-{
-}
-
-inline void MarkedSpace::SizeClass::resetAllocator()
+inline void MarkedSpace::didAddBlock(MarkedBlock* block)
{
- currentBlock = static_cast<MarkedBlock*>(blockList.head());
+ m_blocks.add(block);
}
-inline void MarkedSpace::SizeClass::zapFreeList()
+inline void MarkedSpace::didConsumeFreeList(MarkedBlock* block)
{
- if (!currentBlock) {
- ASSERT(!firstFreeCell);
- return;
- }
-
- currentBlock->zapFreeList(firstFreeCell);
- firstFreeCell = 0;
+ m_nurseryWaterMark += block->capacity() - block->size();
+ m_waterMark += block->capacity();
}
} // namespace JSC
diff --git a/Source/JavaScriptCore/interpreter/CallFrame.h b/Source/JavaScriptCore/interpreter/CallFrame.h
index e0a291f8b..4fadfab28 100644
--- a/Source/JavaScriptCore/interpreter/CallFrame.h
+++ b/Source/JavaScriptCore/interpreter/CallFrame.h
@@ -106,6 +106,8 @@ namespace JSC {
ReturnAddressPtr returnPC() const { return ReturnAddressPtr(this[RegisterFile::ReturnPC].vPC()); }
#endif
AbstractPC abstractReturnPC(JSGlobalData& globalData) { return AbstractPC(globalData, this); }
+ unsigned bytecodeOffsetForBaselineJIT() { return this[RegisterFile::ArgumentCount].tag(); }
+
#if ENABLE(DFG_JIT)
InlineCallFrame* inlineCallFrame() const { return this[RegisterFile::ReturnPC].asInlineCallFrame(); }
unsigned codeOriginIndexForDFGWithInlining() const { return this[RegisterFile::ArgumentCount].tag(); }
diff --git a/Source/JavaScriptCore/interpreter/Interpreter.cpp b/Source/JavaScriptCore/interpreter/Interpreter.cpp
index 51843f2d2..d42e869f1 100644
--- a/Source/JavaScriptCore/interpreter/Interpreter.cpp
+++ b/Source/JavaScriptCore/interpreter/Interpreter.cpp
@@ -885,6 +885,8 @@ JSValue Interpreter::execute(ProgramExecutable* program, CallFrame* callFrame, S
Vector<JSONPData> JSONPData;
bool parseResult;
const UString programSource = program->source().toString();
+ if (programSource.isNull())
+ return jsUndefined();
if (programSource.is8Bit()) {
LiteralParser<LChar> literalParser(callFrame, programSource.characters8(), programSource.length(), JSONP);
parseResult = literalParser.tryJSONPParse(JSONPData, scopeChain->globalObject->globalObjectMethodTable()->supportsRichSourceInfo(scopeChain->globalObject.get()));
@@ -5126,11 +5128,12 @@ JSValue Interpreter::retrieveCallerFromVMCode(CallFrame* callFrame, JSFunction*
CallFrame* functionCallFrame = findFunctionCallFrameFromVMCode(callFrame, function);
if (!functionCallFrame)
return jsNull();
-
- CallFrame* callerFrame = functionCallFrame->callerFrame();
- if (callerFrame->hasHostCallFrameFlag())
+
+ if (functionCallFrame->callerFrame()->hasHostCallFrameFlag())
return jsNull();
+ CallFrame* callerFrame = functionCallFrame->trueCallerFrame();
+
JSValue caller = callerFrame->callee();
if (!caller)
return jsNull();
diff --git a/Source/JavaScriptCore/interpreter/Interpreter.h b/Source/JavaScriptCore/interpreter/Interpreter.h
index 1943513ae..884c4248e 100644
--- a/Source/JavaScriptCore/interpreter/Interpreter.h
+++ b/Source/JavaScriptCore/interpreter/Interpreter.h
@@ -142,7 +142,7 @@ namespace JSC {
JSValue execute(EvalExecutable*, CallFrame*, JSValue thisValue, ScopeChainNode*, int globalRegisterOffset);
JSValue retrieveArgumentsFromVMCode(CallFrame*, JSFunction*) const;
- JS_EXPORT_PRIVATE JSValue retrieveCallerFromVMCode(CallFrame*, JSFunction*) const;
+ JSValue retrieveCallerFromVMCode(CallFrame*, JSFunction*) const;
JS_EXPORT_PRIVATE void retrieveLastCaller(CallFrame*, int& lineNumber, intptr_t& sourceID, UString& sourceURL, JSValue& function) const;
void getArgumentsData(CallFrame*, JSFunction*&, ptrdiff_t& firstParameterIndex, Register*& argv, int& argc);
diff --git a/Source/JavaScriptCore/jit/JIT.cpp b/Source/JavaScriptCore/jit/JIT.cpp
index 247495aaf..c8584a316 100644
--- a/Source/JavaScriptCore/jit/JIT.cpp
+++ b/Source/JavaScriptCore/jit/JIT.cpp
@@ -606,7 +606,11 @@ JITCode JIT::privateCompile(CodePtr* functionEntryArityCheck)
load32(payloadFor(RegisterFile::ArgumentCount), regT1);
branch32(AboveOrEqual, regT1, TrustedImm32(m_codeBlock->m_numParameters)).linkTo(beginLabel, this);
+ m_bytecodeOffset = 0;
JITStubCall(this, m_codeBlock->m_isConstructor ? cti_op_construct_arityCheck : cti_op_call_arityCheck).call(callFrameRegister);
+#if !ASSERT_DISABLED
+ m_bytecodeOffset = (unsigned)-1; // Reset this, in order to guard its use with ASSERTs.
+#endif
jump(beginLabel);
}
diff --git a/Source/JavaScriptCore/jit/JIT.h b/Source/JavaScriptCore/jit/JIT.h
index c357e8c39..8dd332893 100644
--- a/Source/JavaScriptCore/jit/JIT.h
+++ b/Source/JavaScriptCore/jit/JIT.h
@@ -207,34 +207,40 @@ namespace JSC {
static void compileGetByIdProto(JSGlobalData* globalData, CallFrame* callFrame, CodeBlock* codeBlock, StructureStubInfo* stubInfo, Structure* structure, Structure* prototypeStructure, const Identifier& ident, const PropertySlot& slot, size_t cachedOffset, ReturnAddressPtr returnAddress)
{
JIT jit(globalData, codeBlock);
+ jit.m_bytecodeOffset = stubInfo->bytecodeIndex;
jit.privateCompileGetByIdProto(stubInfo, structure, prototypeStructure, ident, slot, cachedOffset, returnAddress, callFrame);
}
static void compileGetByIdSelfList(JSGlobalData* globalData, CodeBlock* codeBlock, StructureStubInfo* stubInfo, PolymorphicAccessStructureList* polymorphicStructures, int currentIndex, Structure* structure, const Identifier& ident, const PropertySlot& slot, size_t cachedOffset)
{
JIT jit(globalData, codeBlock);
+ jit.m_bytecodeOffset = stubInfo->bytecodeIndex;
jit.privateCompileGetByIdSelfList(stubInfo, polymorphicStructures, currentIndex, structure, ident, slot, cachedOffset);
}
static void compileGetByIdProtoList(JSGlobalData* globalData, CallFrame* callFrame, CodeBlock* codeBlock, StructureStubInfo* stubInfo, PolymorphicAccessStructureList* prototypeStructureList, int currentIndex, Structure* structure, Structure* prototypeStructure, const Identifier& ident, const PropertySlot& slot, size_t cachedOffset)
{
JIT jit(globalData, codeBlock);
+ jit.m_bytecodeOffset = stubInfo->bytecodeIndex;
jit.privateCompileGetByIdProtoList(stubInfo, prototypeStructureList, currentIndex, structure, prototypeStructure, ident, slot, cachedOffset, callFrame);
}
static void compileGetByIdChainList(JSGlobalData* globalData, CallFrame* callFrame, CodeBlock* codeBlock, StructureStubInfo* stubInfo, PolymorphicAccessStructureList* prototypeStructureList, int currentIndex, Structure* structure, StructureChain* chain, size_t count, const Identifier& ident, const PropertySlot& slot, size_t cachedOffset)
{
JIT jit(globalData, codeBlock);
+ jit.m_bytecodeOffset = stubInfo->bytecodeIndex;
jit.privateCompileGetByIdChainList(stubInfo, prototypeStructureList, currentIndex, structure, chain, count, ident, slot, cachedOffset, callFrame);
}
static void compileGetByIdChain(JSGlobalData* globalData, CallFrame* callFrame, CodeBlock* codeBlock, StructureStubInfo* stubInfo, Structure* structure, StructureChain* chain, size_t count, const Identifier& ident, const PropertySlot& slot, size_t cachedOffset, ReturnAddressPtr returnAddress)
{
JIT jit(globalData, codeBlock);
+ jit.m_bytecodeOffset = stubInfo->bytecodeIndex;
jit.privateCompileGetByIdChain(stubInfo, structure, chain, count, ident, slot, cachedOffset, returnAddress, callFrame);
}
static void compilePutByIdTransition(JSGlobalData* globalData, CodeBlock* codeBlock, StructureStubInfo* stubInfo, Structure* oldStructure, Structure* newStructure, size_t cachedOffset, StructureChain* chain, ReturnAddressPtr returnAddress, bool direct)
{
JIT jit(globalData, codeBlock);
+ jit.m_bytecodeOffset = stubInfo->bytecodeIndex;
jit.privateCompilePutByIdTransition(stubInfo, oldStructure, newStructure, cachedOffset, chain, returnAddress, direct);
}
@@ -398,9 +404,9 @@ namespace JSC {
static const int patchOffsetGetByIdPropertyMapOffset2 = 22;
static const int patchOffsetGetByIdPutResult = 22;
#if ENABLE(OPCODE_SAMPLING)
- static const int patchOffsetGetByIdSlowCaseCall = 37;
+ static const int patchOffsetGetByIdSlowCaseCall = 44;
#else
- static const int patchOffsetGetByIdSlowCaseCall = 33;
+ static const int patchOffsetGetByIdSlowCaseCall = 40;
#endif
static const int patchOffsetOpCallCompareToJump = 6;
@@ -421,7 +427,7 @@ namespace JSC {
#if ENABLE(OPCODE_SAMPLING)
#error "OPCODE_SAMPLING is not yet supported"
#else
- static const int patchOffsetGetByIdSlowCaseCall = 40;
+ static const int patchOffsetGetByIdSlowCaseCall = 48;
#endif
static const int patchOffsetOpCallCompareToJump = 12;
@@ -458,7 +464,7 @@ namespace JSC {
#if ENABLE(OPCODE_SAMPLING)
#error "OPCODE_SAMPLING is not yet supported"
#else
- static const int patchOffsetGetByIdSlowCaseCall = 40;
+ static const int patchOffsetGetByIdSlowCaseCall = 48;
#endif
static const int patchOffsetOpCallCompareToJump = 16;
@@ -634,9 +640,9 @@ namespace JSC {
static const int patchOffsetGetByIdPropertyMapOffset = 28;
static const int patchOffsetGetByIdPutResult = 28;
#if ENABLE(OPCODE_SAMPLING)
- static const int patchOffsetGetByIdSlowCaseCall = 64;
+ static const int patchOffsetGetByIdSlowCaseCall = 72;
#else
- static const int patchOffsetGetByIdSlowCaseCall = 54;
+ static const int patchOffsetGetByIdSlowCaseCall = 62;
#endif
static const int patchOffsetOpCallCompareToJump = 9;
diff --git a/Source/JavaScriptCore/jit/JITDriver.h b/Source/JavaScriptCore/jit/JITDriver.h
index 7e010cdfe..4b8df4751 100644
--- a/Source/JavaScriptCore/jit/JITDriver.h
+++ b/Source/JavaScriptCore/jit/JITDriver.h
@@ -55,10 +55,6 @@ inline bool jitCompileIfAppropriate(JSGlobalData& globalData, OwnPtr<CodeBlockTy
}
jitCode = JIT::compile(&globalData, codeBlock.get());
}
-#if !ENABLE(OPCODE_SAMPLING)
- if (!BytecodeGenerator::dumpsGeneratedCode())
- codeBlock->handleBytecodeDiscardingOpportunity();
-#endif
codeBlock->setJITCode(jitCode, MacroAssemblerCodePtr());
return true;
@@ -83,10 +79,6 @@ inline bool jitCompileFunctionIfAppropriate(JSGlobalData& globalData, OwnPtr<Fun
}
jitCode = JIT::compile(&globalData, codeBlock.get(), &jitCodeWithArityCheck);
}
-#if !ENABLE(OPCODE_SAMPLING)
- if (!BytecodeGenerator::dumpsGeneratedCode())
- codeBlock->handleBytecodeDiscardingOpportunity();
-#endif
codeBlock->setJITCode(jitCode, jitCodeWithArityCheck);
diff --git a/Source/JavaScriptCore/jit/JITInlineMethods.h b/Source/JavaScriptCore/jit/JITInlineMethods.h
index e617961b5..dfcfbd499 100644
--- a/Source/JavaScriptCore/jit/JITInlineMethods.h
+++ b/Source/JavaScriptCore/jit/JITInlineMethods.h
@@ -264,6 +264,9 @@ ALWAYS_INLINE void JIT::restoreArgumentReference()
ALWAYS_INLINE void JIT::updateTopCallFrame()
{
+ ASSERT(static_cast<int>(m_bytecodeOffset) >= 0);
+ if (m_bytecodeOffset)
+ store32(Imm32(m_bytecodeOffset + 1), intTagFor(RegisterFile::ArgumentCount));
storePtr(callFrameRegister, &m_globalData->topCallFrame);
}
@@ -401,13 +404,13 @@ ALWAYS_INLINE bool JIT::isOperandConstantImmediateChar(unsigned src)
template <typename ClassType, typename StructureType> inline void JIT::emitAllocateBasicJSObject(StructureType structure, RegisterID result, RegisterID storagePtr)
{
- MarkedSpace::SizeClass* sizeClass = &m_globalData->heap.sizeClassForObject(sizeof(ClassType));
- loadPtr(&sizeClass->firstFreeCell, result);
+ MarkedAllocator* allocator = &m_globalData->heap.allocatorForObject(sizeof(ClassType));
+ loadPtr(&allocator->m_firstFreeCell, result);
addSlowCase(branchTestPtr(Zero, result));
// remove the object from the free list
loadPtr(Address(result), storagePtr);
- storePtr(storagePtr, &sizeClass->firstFreeCell);
+ storePtr(storagePtr, &allocator->m_firstFreeCell);
// initialize the object's structure
storePtr(structure, Address(result, JSCell::structureOffset()));
diff --git a/Source/JavaScriptCore/parser/Parser.cpp b/Source/JavaScriptCore/parser/Parser.cpp
index ce6519873..25ada5606 100644
--- a/Source/JavaScriptCore/parser/Parser.cpp
+++ b/Source/JavaScriptCore/parser/Parser.cpp
@@ -1240,6 +1240,8 @@ template <typename LexerType>
template <class TreeBuilder> TreeExpression Parser<LexerType>::parseObjectLiteral(TreeBuilder& context)
{
int startOffset = m_token.m_data.intValue;
+ unsigned oldLastLineNumber = m_lexer->lastLineNumber();
+ unsigned oldLineNumber = m_lexer->lineNumber();
consumeOrFailWithFlags(OPENBRACE, TreeBuilder::DontBuildStrings);
if (match(CLOSEBRACE)) {
@@ -1252,6 +1254,8 @@ template <class TreeBuilder> TreeExpression Parser<LexerType>::parseObjectLitera
if (!m_syntaxAlreadyValidated && context.getType(property) != PropertyNode::Constant) {
m_lexer->setOffset(startOffset);
next();
+ m_lexer->setLastLineNumber(oldLastLineNumber);
+ m_lexer->setLineNumber(oldLineNumber);
return parseStrictObjectLiteral(context);
}
TreePropertyList propertyList = context.createPropertyList(m_lexer->lastLineNumber(), property);
@@ -1266,6 +1270,8 @@ template <class TreeBuilder> TreeExpression Parser<LexerType>::parseObjectLitera
if (!m_syntaxAlreadyValidated && context.getType(property) != PropertyNode::Constant) {
m_lexer->setOffset(startOffset);
next();
+ m_lexer->setLastLineNumber(oldLastLineNumber);
+ m_lexer->setLineNumber(oldLineNumber);
return parseStrictObjectLiteral(context);
}
tail = context.createPropertyList(m_lexer->lastLineNumber(), property, tail);
diff --git a/Source/JavaScriptCore/runtime/ClassInfo.h b/Source/JavaScriptCore/runtime/ClassInfo.h
index 3d556d88c..9ebb33a74 100644
--- a/Source/JavaScriptCore/runtime/ClassInfo.h
+++ b/Source/JavaScriptCore/runtime/ClassInfo.h
@@ -66,12 +66,6 @@ namespace JSC {
typedef JSObject* (*ToThisObjectFunctionPtr)(JSCell*, ExecState*);
ToThisObjectFunctionPtr toThisObject;
- typedef void (*DefineGetterFunctionPtr)(JSObject*, ExecState*, const Identifier&, JSObject*, unsigned);
- DefineGetterFunctionPtr defineGetter;
-
- typedef void (*DefineSetterFunctionPtr)(JSObject*, ExecState*, const Identifier&, JSObject*, unsigned);
- DefineSetterFunctionPtr defineSetter;
-
typedef JSValue (*DefaultValueFunctionPtr)(const JSObject*, ExecState*, PreferredPrimitiveType);
DefaultValueFunctionPtr defaultValue;
@@ -128,8 +122,6 @@ struct MemberCheck##member { \
&ClassName::getOwnPropertySlot, \
&ClassName::getOwnPropertySlotByIndex, \
&ClassName::toThisObject, \
- &ClassName::defineGetter, \
- &ClassName::defineSetter, \
&ClassName::defaultValue, \
&ClassName::getOwnPropertyNames, \
&ClassName::getPropertyNames, \
diff --git a/Source/JavaScriptCore/runtime/Executable.cpp b/Source/JavaScriptCore/runtime/Executable.cpp
index c67c54cd2..bf49767ab 100644
--- a/Source/JavaScriptCore/runtime/Executable.cpp
+++ b/Source/JavaScriptCore/runtime/Executable.cpp
@@ -137,7 +137,7 @@ FunctionExecutable::FunctionExecutable(JSGlobalData& globalData, const Identifie
, m_forceUsesArguments(forceUsesArguments)
, m_parameters(parameters)
, m_name(name)
- , m_inferredName(inferredName)
+ , m_inferredName(inferredName.isNull() ? globalData.propertyNames->emptyIdentifier : inferredName)
, m_symbolTable(0)
{
}
@@ -148,7 +148,7 @@ FunctionExecutable::FunctionExecutable(ExecState* exec, const Identifier& name,
, m_forceUsesArguments(forceUsesArguments)
, m_parameters(parameters)
, m_name(name)
- , m_inferredName(inferredName)
+ , m_inferredName(inferredName.isNull() ? exec->globalData().propertyNames->emptyIdentifier : inferredName)
, m_symbolTable(0)
{
}
diff --git a/Source/JavaScriptCore/runtime/JSBoundFunction.cpp b/Source/JavaScriptCore/runtime/JSBoundFunction.cpp
index 88260ea27..8ebf8c638 100644
--- a/Source/JavaScriptCore/runtime/JSBoundFunction.cpp
+++ b/Source/JavaScriptCore/runtime/JSBoundFunction.cpp
@@ -26,6 +26,7 @@
#include "config.h"
#include "JSBoundFunction.h"
+#include "GetterSetter.h"
#include "JSGlobalObject.h"
namespace JSC {
@@ -111,8 +112,8 @@ void JSBoundFunction::finishCreation(ExecState* exec, NativeExecutable* executab
Base::finishCreation(exec, executable, length, name);
ASSERT(inherits(&s_info));
- initializeGetterSetterProperty(exec, exec->propertyNames().arguments, globalObject()->throwTypeErrorGetterSetter(exec), DontDelete | DontEnum | Accessor);
- initializeGetterSetterProperty(exec, exec->propertyNames().caller, globalObject()->throwTypeErrorGetterSetter(exec), DontDelete | DontEnum | Accessor);
+ putDirectAccessor(exec->globalData(), exec->propertyNames().arguments, globalObject()->throwTypeErrorGetterSetter(exec), DontDelete | DontEnum | Accessor);
+ putDirectAccessor(exec->globalData(), exec->propertyNames().caller, globalObject()->throwTypeErrorGetterSetter(exec), DontDelete | DontEnum | Accessor);
}
void JSBoundFunction::visitChildren(JSCell* cell, SlotVisitor& visitor)
diff --git a/Source/JavaScriptCore/runtime/JSCell.cpp b/Source/JavaScriptCore/runtime/JSCell.cpp
index 9dcd6364b..4703b681b 100644
--- a/Source/JavaScriptCore/runtime/JSCell.cpp
+++ b/Source/JavaScriptCore/runtime/JSCell.cpp
@@ -158,16 +158,6 @@ void slowValidateCell(JSCell* cell)
ASSERT_GC_OBJECT_LOOKS_VALID(cell);
}
-void JSCell::defineGetter(JSObject*, ExecState*, const Identifier&, JSObject*, unsigned)
-{
- ASSERT_NOT_REACHED();
-}
-
-void JSCell::defineSetter(JSObject*, ExecState*, const Identifier&, JSObject*, unsigned)
-{
- ASSERT_NOT_REACHED();
-}
-
JSValue JSCell::defaultValue(const JSObject*, ExecState*, PreferredPrimitiveType)
{
ASSERT_NOT_REACHED();
diff --git a/Source/JavaScriptCore/runtime/JSCell.h b/Source/JavaScriptCore/runtime/JSCell.h
index a36bb7d58..74833d12f 100644
--- a/Source/JavaScriptCore/runtime/JSCell.h
+++ b/Source/JavaScriptCore/runtime/JSCell.h
@@ -152,8 +152,6 @@ namespace JSC {
static bool getOwnPropertySlotByIndex(JSCell*, ExecState*, unsigned propertyName, PropertySlot&);
// Dummy implementations of override-able static functions for classes to put in their MethodTable
- static NO_RETURN_DUE_TO_ASSERT void defineGetter(JSObject*, ExecState*, const Identifier&, JSObject*, unsigned);
- static NO_RETURN_DUE_TO_ASSERT void defineSetter(JSObject*, ExecState*, const Identifier& propertyName, JSObject* setterFunction, unsigned attributes = 0);
static JSValue defaultValue(const JSObject*, ExecState*, PreferredPrimitiveType);
static NO_RETURN_DUE_TO_ASSERT void getOwnPropertyNames(JSObject*, ExecState*, PropertyNameArray&, EnumerationMode);
static NO_RETURN_DUE_TO_ASSERT void getPropertyNames(JSObject*, ExecState*, PropertyNameArray&, EnumerationMode);
diff --git a/Source/JavaScriptCore/runtime/JSFunction.cpp b/Source/JavaScriptCore/runtime/JSFunction.cpp
index 15718a176..72e1ce14f 100644
--- a/Source/JavaScriptCore/runtime/JSFunction.cpp
+++ b/Source/JavaScriptCore/runtime/JSFunction.cpp
@@ -30,6 +30,7 @@
#include "CallFrame.h"
#include "ExceptionHelpers.h"
#include "FunctionPrototype.h"
+#include "GetterSetter.h"
#include "JSArray.h"
#include "JSGlobalObject.h"
#include "JSNotAnObject.h"
@@ -219,7 +220,7 @@ bool JSFunction::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identif
if (thisObject->jsExecutable()->isStrictMode()) {
bool result = Base::getOwnPropertySlot(thisObject, exec, propertyName, slot);
if (!result) {
- thisObject->initializeGetterSetterProperty(exec, propertyName, thisObject->globalObject()->throwTypeErrorGetterSetter(exec), DontDelete | DontEnum | Accessor);
+ thisObject->putDirectAccessor(exec->globalData(), propertyName, thisObject->globalObject()->throwTypeErrorGetterSetter(exec), DontDelete | DontEnum | Accessor);
result = Base::getOwnPropertySlot(thisObject, exec, propertyName, slot);
ASSERT(result);
}
@@ -238,7 +239,7 @@ bool JSFunction::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identif
if (thisObject->jsExecutable()->isStrictMode()) {
bool result = Base::getOwnPropertySlot(thisObject, exec, propertyName, slot);
if (!result) {
- thisObject->initializeGetterSetterProperty(exec, propertyName, thisObject->globalObject()->throwTypeErrorGetterSetter(exec), DontDelete | DontEnum | Accessor);
+ thisObject->putDirectAccessor(exec->globalData(), propertyName, thisObject->globalObject()->throwTypeErrorGetterSetter(exec), DontDelete | DontEnum | Accessor);
result = Base::getOwnPropertySlot(thisObject, exec, propertyName, slot);
ASSERT(result);
}
@@ -267,7 +268,7 @@ bool JSFunction::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, con
if (thisObject->jsExecutable()->isStrictMode()) {
bool result = Base::getOwnPropertyDescriptor(thisObject, exec, propertyName, descriptor);
if (!result) {
- thisObject->initializeGetterSetterProperty(exec, propertyName, thisObject->globalObject()->throwTypeErrorGetterSetter(exec), DontDelete | DontEnum | Accessor);
+ thisObject->putDirectAccessor(exec->globalData(), propertyName, thisObject->globalObject()->throwTypeErrorGetterSetter(exec), DontDelete | DontEnum | Accessor);
result = Base::getOwnPropertyDescriptor(thisObject, exec, propertyName, descriptor);
ASSERT(result);
}
@@ -286,7 +287,7 @@ bool JSFunction::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, con
if (thisObject->jsExecutable()->isStrictMode()) {
bool result = Base::getOwnPropertyDescriptor(thisObject, exec, propertyName, descriptor);
if (!result) {
- thisObject->initializeGetterSetterProperty(exec, propertyName, thisObject->globalObject()->throwTypeErrorGetterSetter(exec), DontDelete | DontEnum | Accessor);
+ thisObject->putDirectAccessor(exec->globalData(), propertyName, thisObject->globalObject()->throwTypeErrorGetterSetter(exec), DontDelete | DontEnum | Accessor);
result = Base::getOwnPropertyDescriptor(thisObject, exec, propertyName, descriptor);
ASSERT(result);
}
@@ -369,7 +370,7 @@ UString getCalculatedDisplayName(CallFrame* callFrame, JSObject* object)
return function->calculatedDisplayName(callFrame);
if (InternalFunction* function = jsDynamicCast<InternalFunction*>(object))
return function->calculatedDisplayName(callFrame);
- return UString();
+ return callFrame->globalData().propertyNames->emptyIdentifier.ustring();
}
} // namespace JSC
diff --git a/Source/JavaScriptCore/runtime/JSGlobalObject.cpp b/Source/JavaScriptCore/runtime/JSGlobalObject.cpp
index f28139d27..e648fbe21 100644
--- a/Source/JavaScriptCore/runtime/JSGlobalObject.cpp
+++ b/Source/JavaScriptCore/runtime/JSGlobalObject.cpp
@@ -171,21 +171,16 @@ void JSGlobalObject::putDirectVirtual(JSObject* object, ExecState* exec, const I
}
}
-void JSGlobalObject::defineGetter(JSObject* object, ExecState* exec, const Identifier& propertyName, JSObject* getterFunc, unsigned attributes)
+bool JSGlobalObject::defineOwnProperty(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor, bool shouldThrow)
{
JSGlobalObject* thisObject = jsCast<JSGlobalObject*>(object);
PropertySlot slot;
- if (!thisObject->symbolTableGet(propertyName, slot))
- JSVariableObject::defineGetter(thisObject, exec, propertyName, getterFunc, attributes);
+ // silently ignore attempts to add accessors aliasing vars.
+ if (descriptor.isAccessorDescriptor() && thisObject->symbolTableGet(propertyName, slot))
+ return false;
+ return Base::defineOwnProperty(thisObject, exec, propertyName, descriptor, shouldThrow);
}
-void JSGlobalObject::defineSetter(JSObject* object, ExecState* exec, const Identifier& propertyName, JSObject* setterFunc, unsigned attributes)
-{
- JSGlobalObject* thisObject = jsCast<JSGlobalObject*>(object);
- PropertySlot slot;
- if (!thisObject->symbolTableGet(propertyName, slot))
- JSVariableObject::defineSetter(thisObject, exec, propertyName, setterFunc, attributes);
-}
static inline JSObject* lastInPrototypeChain(JSObject* object)
{
diff --git a/Source/JavaScriptCore/runtime/JSGlobalObject.h b/Source/JavaScriptCore/runtime/JSGlobalObject.h
index 70368307d..b67ccb764 100644
--- a/Source/JavaScriptCore/runtime/JSGlobalObject.h
+++ b/Source/JavaScriptCore/runtime/JSGlobalObject.h
@@ -206,6 +206,7 @@ namespace JSC {
JS_EXPORT_PRIVATE static void defineGetter(JSObject*, ExecState*, const Identifier& propertyName, JSObject* getterFunc, unsigned attributes);
JS_EXPORT_PRIVATE static void defineSetter(JSObject*, ExecState*, const Identifier& propertyName, JSObject* setterFunc, unsigned attributes);
+ JS_EXPORT_PRIVATE static bool defineOwnProperty(JSObject*, ExecState*, const Identifier& propertyName, PropertyDescriptor&, bool shouldThrow);
// We use this in the code generator as we perform symbol table
// lookups prior to initializing the properties
diff --git a/Source/JavaScriptCore/runtime/JSObject.cpp b/Source/JavaScriptCore/runtime/JSObject.cpp
index a443fda86..ba2d2a52a 100644
--- a/Source/JavaScriptCore/runtime/JSObject.cpp
+++ b/Source/JavaScriptCore/runtime/JSObject.cpp
@@ -361,106 +361,6 @@ const HashEntry* JSObject::findPropertyHashEntry(ExecState* exec, const Identifi
return 0;
}
-void JSObject::defineGetter(JSObject* thisObject, ExecState* exec, const Identifier& propertyName, JSObject* getterFunction, unsigned attributes)
-{
- if (propertyName == exec->propertyNames().underscoreProto) {
- // Defining a getter for __proto__ is silently ignored.
- return;
- }
-
- JSValue object = thisObject->getDirect(exec->globalData(), propertyName);
- if (object && object.isGetterSetter()) {
- ASSERT(thisObject->structure()->hasGetterSetterProperties());
- asGetterSetter(object)->setGetter(exec->globalData(), getterFunction);
- return;
- }
-
- JSGlobalData& globalData = exec->globalData();
- PutPropertySlot slot;
- GetterSetter* getterSetter = GetterSetter::create(exec);
- thisObject->putDirectInternal<PutModeDefineOwnProperty>(globalData, propertyName, getterSetter, attributes | Accessor, slot, 0);
-
- // putDirect will change our Structure if we add a new property. For
- // getters and setters, though, we also need to change our Structure
- // if we override an existing non-getter or non-setter.
- if (slot.type() != PutPropertySlot::NewProperty)
- thisObject->setStructure(exec->globalData(), Structure::attributeChangeTransition(globalData, thisObject->structure(), propertyName, attributes | Accessor));
-
- thisObject->structure()->setHasGetterSetterProperties(true);
- getterSetter->setGetter(globalData, getterFunction);
-}
-
-void JSObject::initializeGetterSetterProperty(ExecState* exec, const Identifier& propertyName, GetterSetter* getterSetter, unsigned attributes)
-{
- // Set an inital property on an object; the property must not already exist & the attribute flags must be set correctly.
- ASSERT(structure()->get(exec->globalData(), propertyName) == WTF::notFound);
- ASSERT(static_cast<bool>(attributes & Accessor));
-
- JSGlobalData& globalData = exec->globalData();
- PutPropertySlot slot;
- putDirectInternal<PutModeDefineOwnProperty>(globalData, propertyName, getterSetter, attributes, slot, 0);
-
- // putDirect will change our Structure if we add a new property. For
- // getters and setters, though, we also need to change our Structure
- // if we override an existing non-getter or non-setter.
- if (slot.type() != PutPropertySlot::NewProperty)
- setStructure(exec->globalData(), Structure::attributeChangeTransition(globalData, structure(), propertyName, attributes));
-
- structure()->setHasGetterSetterProperties(true);
-}
-
-void JSObject::defineSetter(JSObject* thisObject, ExecState* exec, const Identifier& propertyName, JSObject* setterFunction, unsigned attributes)
-{
- if (propertyName == exec->propertyNames().underscoreProto) {
- // Defining a setter for __proto__ is silently ignored.
- return;
- }
-
- JSValue object = thisObject->getDirect(exec->globalData(), propertyName);
- if (object && object.isGetterSetter()) {
- ASSERT(thisObject->structure()->hasGetterSetterProperties());
- asGetterSetter(object)->setSetter(exec->globalData(), setterFunction);
- return;
- }
-
- PutPropertySlot slot;
- GetterSetter* getterSetter = GetterSetter::create(exec);
- thisObject->putDirectInternal<PutModeDefineOwnProperty>(exec->globalData(), propertyName, getterSetter, attributes | Accessor, slot, 0);
-
- // putDirect will change our Structure if we add a new property. For
- // getters and setters, though, we also need to change our Structure
- // if we override an existing non-getter or non-setter.
- if (slot.type() != PutPropertySlot::NewProperty)
- thisObject->setStructure(exec->globalData(), Structure::attributeChangeTransition(exec->globalData(), thisObject->structure(), propertyName, attributes | Accessor));
-
- thisObject->structure()->setHasGetterSetterProperties(true);
- getterSetter->setSetter(exec->globalData(), setterFunction);
-}
-
-JSValue JSObject::lookupGetter(ExecState* exec, const Identifier& propertyName)
-{
- PropertyDescriptor descriptor;
- if (!getPropertyDescriptor(exec, propertyName, descriptor))
- return jsUndefined();
-
- if (!descriptor.getterPresent())
- return jsUndefined();
-
- return descriptor.getter();
-}
-
-JSValue JSObject::lookupSetter(ExecState* exec, const Identifier& propertyName)
-{
- PropertyDescriptor descriptor;
- if (!getPropertyDescriptor(exec, propertyName, descriptor))
- return jsUndefined();
-
- if (!descriptor.setterPresent())
- return jsUndefined();
-
- return descriptor.setter();
-}
-
bool JSObject::hasInstance(JSObject*, ExecState* exec, JSValue value, JSValue proto)
{
if (!value.isObject())
diff --git a/Source/JavaScriptCore/runtime/JSObject.h b/Source/JavaScriptCore/runtime/JSObject.h
index 433249c20..e9194fa01 100644
--- a/Source/JavaScriptCore/runtime/JSObject.h
+++ b/Source/JavaScriptCore/runtime/JSObject.h
@@ -192,13 +192,6 @@ namespace JSC {
void putDirectOffset(JSGlobalData& globalData, size_t offset, JSValue value) { propertyStorage()[offset].set(globalData, this, value); }
void putUndefinedAtDirectOffset(size_t offset) { propertyStorage()[offset].setUndefined(); }
- JS_EXPORT_PRIVATE void fillGetterPropertySlot(PropertySlot&, WriteBarrierBase<Unknown>* location);
- void initializeGetterSetterProperty(ExecState*, const Identifier&, GetterSetter*, unsigned attributes);
-
- JS_EXPORT_PRIVATE static void defineGetter(JSObject*, ExecState*, const Identifier& propertyName, JSObject* getterFunction, unsigned attributes = 0);
- JS_EXPORT_PRIVATE static void defineSetter(JSObject*, ExecState*, const Identifier& propertyName, JSObject* setterFunction, unsigned attributes = 0);
- JS_EXPORT_PRIVATE JSValue lookupGetter(ExecState*, const Identifier& propertyName);
- JS_EXPORT_PRIVATE JSValue lookupSetter(ExecState*, const Identifier& propertyName);
JS_EXPORT_PRIVATE static bool defineOwnProperty(JSObject*, ExecState*, const Identifier& propertyName, PropertyDescriptor&, bool shouldThrow);
bool isGlobalObject() const;
@@ -296,6 +289,7 @@ namespace JSC {
bool putDirectInternal(JSGlobalData&, const Identifier& propertyName, JSValue, unsigned attr, PutPropertySlot&, JSCell*);
bool inlineGetOwnPropertySlot(ExecState*, const Identifier& propertyName, PropertySlot&);
+ JS_EXPORT_PRIVATE void fillGetterPropertySlot(PropertySlot&, WriteBarrierBase<Unknown>* location);
const HashEntry* findPropertyHashEntry(ExecState*, const Identifier& propertyName) const;
Structure* createInheritorID(JSGlobalData&);
diff --git a/Source/JavaScriptCore/runtime/JSType.h b/Source/JavaScriptCore/runtime/JSType.h
index 84a27a7ea..880240e60 100644
--- a/Source/JavaScriptCore/runtime/JSType.h
+++ b/Source/JavaScriptCore/runtime/JSType.h
@@ -49,11 +49,12 @@ enum JSType {
ErrorInstanceType,
GlobalThisType,
- // VariableObjectType must come before all of the types of its subclasses and only its subclasses.
+ StaticScopeObjectType,
+ // VariableObjectType must be less than MOST of the types of its subclasses and only its subclasses.
+ // We use >=VariableObjectType checks to test for Global & Activation objects, but exclude StaticScopes.
VariableObjectType,
GlobalObjectType,
ActivationObjectType,
- StaticScopeObjectType,
};
} // namespace JSC
diff --git a/Source/JavaScriptCore/runtime/JSValue.cpp b/Source/JavaScriptCore/runtime/JSValue.cpp
index 6b803c316..72cf5a8d5 100644
--- a/Source/JavaScriptCore/runtime/JSValue.cpp
+++ b/Source/JavaScriptCore/runtime/JSValue.cpp
@@ -116,7 +116,6 @@ JSObject* JSValue::synthesizePrototype(ExecState* exec) const
return JSNotAnObject::create(exec);
}
-#ifndef NDEBUG
char* JSValue::description()
{
static const size_t size = 64;
@@ -152,7 +151,6 @@ char* JSValue::description()
return description;
}
-#endif
// This in the ToInt32 operation is defined in section 9.5 of the ECMA-262 spec.
// Note that this operation is identical to ToUInt32 other than to interpretation
diff --git a/Source/JavaScriptCore/runtime/JSValue.h b/Source/JavaScriptCore/runtime/JSValue.h
index 79e50fba0..b18c181f5 100644
--- a/Source/JavaScriptCore/runtime/JSValue.h
+++ b/Source/JavaScriptCore/runtime/JSValue.h
@@ -232,9 +232,7 @@ namespace JSC {
JSCell* asCell() const;
JS_EXPORT_PRIVATE bool isValidCallee();
-#ifndef NDEBUG
char* description();
-#endif
private:
template <class T> JSValue(WriteBarrierBase<T>);
diff --git a/Source/JavaScriptCore/runtime/ObjectPrototype.cpp b/Source/JavaScriptCore/runtime/ObjectPrototype.cpp
index 7ca7dae61..674bd7b7d 100644
--- a/Source/JavaScriptCore/runtime/ObjectPrototype.cpp
+++ b/Source/JavaScriptCore/runtime/ObjectPrototype.cpp
@@ -146,10 +146,17 @@ EncodedJSValue JSC_HOST_CALL objectProtoFuncDefineGetter(ExecState* exec)
if (exec->hadException())
return JSValue::encode(jsUndefined());
+ JSValue get = exec->argument(1);
CallData callData;
- if (getCallData(exec->argument(1), callData) == CallTypeNone)
+ if (getCallData(get, callData) == CallTypeNone)
return throwVMError(exec, createSyntaxError(exec, "invalid getter usage"));
- thisObject->methodTable()->defineGetter(thisObject, exec, Identifier(exec, exec->argument(0).toString(exec)->value(exec)), asObject(exec->argument(1)), 0);
+
+ PropertyDescriptor descriptor;
+ descriptor.setGetter(get);
+ descriptor.setEnumerable(true);
+ descriptor.setConfigurable(true);
+ thisObject->methodTable()->defineOwnProperty(thisObject, exec, Identifier(exec, exec->argument(0).toString(exec)->value(exec)), descriptor, false);
+
return JSValue::encode(jsUndefined());
}
@@ -159,10 +166,17 @@ EncodedJSValue JSC_HOST_CALL objectProtoFuncDefineSetter(ExecState* exec)
if (exec->hadException())
return JSValue::encode(jsUndefined());
+ JSValue set = exec->argument(1);
CallData callData;
- if (getCallData(exec->argument(1), callData) == CallTypeNone)
+ if (getCallData(set, callData) == CallTypeNone)
return throwVMError(exec, createSyntaxError(exec, "invalid setter usage"));
- thisObject->methodTable()->defineSetter(thisObject, exec, Identifier(exec, exec->argument(0).toString(exec)->value(exec)), asObject(exec->argument(1)), 0);
+
+ PropertyDescriptor descriptor;
+ descriptor.setSetter(set);
+ descriptor.setEnumerable(true);
+ descriptor.setConfigurable(true);
+ thisObject->methodTable()->defineOwnProperty(thisObject, exec, Identifier(exec, exec->argument(0).toString(exec)->value(exec)), descriptor, false);
+
return JSValue::encode(jsUndefined());
}
@@ -172,7 +186,12 @@ EncodedJSValue JSC_HOST_CALL objectProtoFuncLookupGetter(ExecState* exec)
if (exec->hadException())
return JSValue::encode(jsUndefined());
- return JSValue::encode(thisObject->lookupGetter(exec, Identifier(exec, exec->argument(0).toString(exec)->value(exec))));
+ PropertyDescriptor descriptor;
+ if (thisObject->getPropertyDescriptor(exec, Identifier(exec, exec->argument(0).toString(exec)->value(exec)), descriptor)
+ && descriptor.getterPresent())
+ return JSValue::encode(descriptor.getter());
+
+ return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL objectProtoFuncLookupSetter(ExecState* exec)
@@ -181,7 +200,12 @@ EncodedJSValue JSC_HOST_CALL objectProtoFuncLookupSetter(ExecState* exec)
if (exec->hadException())
return JSValue::encode(jsUndefined());
- return JSValue::encode(thisObject->lookupSetter(exec, Identifier(exec, exec->argument(0).toString(exec)->value(exec))));
+ PropertyDescriptor descriptor;
+ if (thisObject->getPropertyDescriptor(exec, Identifier(exec, exec->argument(0).toString(exec)->value(exec)), descriptor)
+ && descriptor.setterPresent())
+ return JSValue::encode(descriptor.setter());
+
+ return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL objectProtoFuncPropertyIsEnumerable(ExecState* exec)
diff --git a/Source/JavaScriptCore/runtime/WriteBarrier.h b/Source/JavaScriptCore/runtime/WriteBarrier.h
index a7bd7a100..6ac52b7c7 100644
--- a/Source/JavaScriptCore/runtime/WriteBarrier.h
+++ b/Source/JavaScriptCore/runtime/WriteBarrier.h
@@ -93,7 +93,7 @@ public:
{
if (m_cell)
validateCell(m_cell);
- return reinterpret_cast<T*>(m_cell);
+ return reinterpret_cast<T*>(static_cast<void*>(m_cell));
}
T* operator*() const
@@ -128,7 +128,7 @@ public:
}
#if ENABLE(GC_VALIDATION)
- T* unvalidatedGet() const { return reinterpret_cast<T*>(m_cell); }
+ T* unvalidatedGet() const { return reinterpret_cast<T*>(static_cast<void*>(m_cell)); }
#endif
private:
diff --git a/Source/JavaScriptCore/shell/CMakeLists.txt b/Source/JavaScriptCore/shell/CMakeLists.txt
index fa04b8598..44f02b93c 100644
--- a/Source/JavaScriptCore/shell/CMakeLists.txt
+++ b/Source/JavaScriptCore/shell/CMakeLists.txt
@@ -20,8 +20,8 @@ IF (JSC_LINK_FLAGS)
ADD_TARGET_PROPERTIES(${JSC_EXECUTABLE_NAME} LINK_FLAGS "${JSC_LINK_FLAGS}")
ENDIF ()
-IF (SHARED_CORE)
- SET_TARGET_PROPERTIES(${JSC_EXECUTABLE_NAME} PROPERTIES VERSION ${PROJECT_VERSION})
+IF ("${PORT}" STREQUAL "Efl")
+ SET_TARGET_PROPERTIES(${JSC_EXECUTABLE_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
ENDIF ()
IF (SHOULD_INSTALL_JS_SHELL)
diff --git a/Source/JavaScriptCore/tools/CodeProfiling.cpp b/Source/JavaScriptCore/tools/CodeProfiling.cpp
index f236484c9..d927a49f6 100644
--- a/Source/JavaScriptCore/tools/CodeProfiling.cpp
+++ b/Source/JavaScriptCore/tools/CodeProfiling.cpp
@@ -28,7 +28,10 @@
#include "CodeProfile.h"
#include "MetaAllocator.h"
-#include "signal.h"
+
+#if HAVE(SIGNAL_H)
+#include <signal.h>
+#endif
namespace JSC {
@@ -78,6 +81,7 @@ void CodeProfiling::sample(void* pc, void** framePointer)
void CodeProfiling::notifyAllocator(WTF::MetaAllocator* allocator)
{
+#if !OS(WINCE)
// Check for JSC_CODE_PROFILING.
const char* codeProfilingMode = getenv("JSC_CODE_PROFILING");
if (!codeProfilingMode)
@@ -104,6 +108,7 @@ void CodeProfiling::notifyAllocator(WTF::MetaAllocator* allocator)
ASSERT(!s_tracker);
s_tracker = new WTF::MetaAllocatorTracker();
allocator->trackAllocations(s_tracker);
+#endif
}
void* CodeProfiling::getOwnerUIDForPC(void* address)
diff --git a/Source/JavaScriptCore/wtf/BitVector.cpp b/Source/JavaScriptCore/wtf/BitVector.cpp
index 49dc21129..863a5703a 100644
--- a/Source/JavaScriptCore/wtf/BitVector.cpp
+++ b/Source/JavaScriptCore/wtf/BitVector.cpp
@@ -105,7 +105,6 @@ void BitVector::resizeOutOfLine(size_t numBits)
m_bitsOrPointer = bitwise_cast<uintptr_t>(newOutOfLineBits) >> 1;
}
-#ifndef NDEBUG
void BitVector::dump(FILE* out)
{
for (size_t i = 0; i < size(); ++i) {
@@ -115,6 +114,5 @@ void BitVector::dump(FILE* out)
fprintf(out, "-");
}
}
-#endif
} // namespace WTF
diff --git a/Source/JavaScriptCore/wtf/BitVector.h b/Source/JavaScriptCore/wtf/BitVector.h
index 109d3ffcf..335656c40 100644
--- a/Source/JavaScriptCore/wtf/BitVector.h
+++ b/Source/JavaScriptCore/wtf/BitVector.h
@@ -26,13 +26,10 @@
#ifndef BitVector_h
#define BitVector_h
+#include <stdio.h>
#include <wtf/Assertions.h>
#include <wtf/StdLibExtras.h>
-#ifndef NDEBUG
-#include <stdio.h>
-#endif
-
namespace WTF {
// This is a space-efficient, resizeable bitvector class. In the common case it
@@ -165,9 +162,7 @@ public:
clear(bit);
}
-#ifndef NDEBUG
void dump(FILE* out);
-#endif
private:
static unsigned bitsInPointer()
diff --git a/Source/JavaScriptCore/wtf/CurrentTime.cpp b/Source/JavaScriptCore/wtf/CurrentTime.cpp
index c8c77f54f..1ebd084d8 100644
--- a/Source/JavaScriptCore/wtf/CurrentTime.cpp
+++ b/Source/JavaScriptCore/wtf/CurrentTime.cpp
@@ -56,8 +56,6 @@ extern "C" time_t mktime(struct tm *t);
#endif
#endif
-#elif PLATFORM(GTK)
-#include <glib.h>
#elif PLATFORM(WX)
#include <wx/datetime.h>
#elif PLATFORM(EFL)
@@ -66,6 +64,10 @@ extern "C" time_t mktime(struct tm *t);
#include <sys/time.h>
#endif
+#if PLATFORM(GTK)
+#include <glib.h>
+#endif
+
#if PLATFORM(QT)
#include <QElapsedTimer>
#endif
diff --git a/Source/JavaScriptCore/wtf/FastAllocBase.h b/Source/JavaScriptCore/wtf/FastAllocBase.h
index 1edbed94d..b9ab0cab1 100644
--- a/Source/JavaScriptCore/wtf/FastAllocBase.h
+++ b/Source/JavaScriptCore/wtf/FastAllocBase.h
@@ -129,7 +129,7 @@ public: \
return location; \
} \
private: \
-typedef int ThisIsHereToForceASemicolonAfterThisMacro
+typedef int __thisIsHereToForceASemicolonAfterThisMacro
namespace WTF {
diff --git a/Source/JavaScriptCore/wtf/HashTable.h b/Source/JavaScriptCore/wtf/HashTable.h
index 44f914330..cbcc09817 100644
--- a/Source/JavaScriptCore/wtf/HashTable.h
+++ b/Source/JavaScriptCore/wtf/HashTable.h
@@ -478,7 +478,8 @@ namespace WTF {
return;
ASSERT(!HashTranslator::equal(KeyTraits::emptyValue(), key));
AlignedBuffer<sizeof(ValueType), WTF_ALIGN_OF(ValueType)> deletedValueBuffer;
- ValueType& deletedValue = *reinterpret_cast_ptr<ValueType*>(deletedValueBuffer.buffer);
+ ValueType* deletedValuePtr = reinterpret_cast_ptr<ValueType*>(deletedValueBuffer.buffer);
+ ValueType& deletedValue = *deletedValuePtr;
Traits::constructDeletedValue(deletedValue);
ASSERT(!HashTranslator::equal(Extractor::extract(deletedValue), key));
}
diff --git a/Source/JavaScriptCore/wtf/Platform.h b/Source/JavaScriptCore/wtf/Platform.h
index cecd5ddcd..e6d43dac3 100644
--- a/Source/JavaScriptCore/wtf/Platform.h
+++ b/Source/JavaScriptCore/wtf/Platform.h
@@ -859,10 +859,6 @@
#define ENABLE_GEOLOCATION 0
#endif
-#if !defined(ENABLE_GESTURE_RECOGNIZER)
-#define ENABLE_GESTURE_RECOGNIZER 0
-#endif
-
#if !defined(ENABLE_VIEWPORT)
#define ENABLE_VIEWPORT 0
#endif
@@ -1113,7 +1109,11 @@
since most ports try to support sub-project independence, adding new headers
to WTF causes many ports to break, and so this way we can address the build
breakages one port at a time. */
+#if PLATFORM(MAC) || PLATFORM(QT)
+#define WTF_USE_EXPORT_MACROS 1
+#else
#define WTF_USE_EXPORT_MACROS 0
+#endif
#if (PLATFORM(QT) && !OS(DARWIN)) || PLATFORM(GTK) || PLATFORM(EFL)
#define WTF_USE_UNIX_DOMAIN_SOCKETS 1
@@ -1137,6 +1137,10 @@
#define WTF_USE_AVFOUNDATION 1
#endif
+#if PLATFORM(MAC) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION)
+#define WTF_USE_COREMEDIA 1
+#endif
+
#if PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(EFL) || (PLATFORM(WIN) && !OS(WINCE) && !PLATFORM(WIN_CAIRO)) || PLATFORM(QT)
#define WTF_USE_REQUEST_ANIMATION_FRAME_TIMER 1
#endif
diff --git a/Source/JavaScriptCore/wtf/ThreadSpecific.h b/Source/JavaScriptCore/wtf/ThreadSpecific.h
index 7c75a83ee..242acc0d3 100644
--- a/Source/JavaScriptCore/wtf/ThreadSpecific.h
+++ b/Source/JavaScriptCore/wtf/ThreadSpecific.h
@@ -46,8 +46,6 @@
#if USE(PTHREADS)
#include <pthread.h>
-#elif PLATFORM(GTK)
-#include <glib.h>
#elif OS(WINDOWS)
#include <windows.h>
#endif
@@ -100,8 +98,6 @@ private:
#if USE(PTHREADS)
pthread_key_t m_key;
-#elif PLATFORM(GTK)
- GStaticPrivate m_key;
#elif OS(WINDOWS)
int m_index;
#endif
@@ -130,29 +126,6 @@ inline void ThreadSpecific<T>::set(T* ptr)
pthread_setspecific(m_key, new Data(ptr, this));
}
-#elif PLATFORM(GTK)
-
-template<typename T>
-inline ThreadSpecific<T>::ThreadSpecific()
-{
- g_static_private_init(&m_key);
-}
-
-template<typename T>
-inline T* ThreadSpecific<T>::get()
-{
- Data* data = static_cast<Data*>(g_static_private_get(&m_key));
- return data ? data->value : 0;
-}
-
-template<typename T>
-inline void ThreadSpecific<T>::set(T* ptr)
-{
- ASSERT(!get());
- Data* data = new Data(ptr, this);
- g_static_private_set(&m_key, data, destroy);
-}
-
#elif OS(WINDOWS)
// TLS_OUT_OF_INDEXES is not defined on WinCE.
@@ -218,9 +191,6 @@ inline void ThreadSpecific<T>::destroy(void* ptr)
// We want get() to keep working while data destructor works, because it can be called indirectly by the destructor.
// Some pthreads implementations zero out the pointer before calling destroy(), so we temporarily reset it.
pthread_setspecific(data->owner->m_key, ptr);
-#elif PLATFORM(GTK)
- // See comment as above
- g_static_private_set(&data->owner->m_key, data, 0);
#endif
data->value->~T();
@@ -228,8 +198,6 @@ inline void ThreadSpecific<T>::destroy(void* ptr)
#if USE(PTHREADS)
pthread_setspecific(data->owner->m_key, 0);
-#elif PLATFORM(GTK)
- g_static_private_set(&data->owner->m_key, 0, 0);
#elif OS(WINDOWS)
TlsSetValue(tlsKeys()[data->owner->m_index], 0);
#else
diff --git a/Source/JavaScriptCore/wtf/gobject/GlibUtilities.cpp b/Source/JavaScriptCore/wtf/gobject/GlibUtilities.cpp
index 6fcd806eb..1a2a8b1f1 100644
--- a/Source/JavaScriptCore/wtf/gobject/GlibUtilities.cpp
+++ b/Source/JavaScriptCore/wtf/gobject/GlibUtilities.cpp
@@ -20,8 +20,13 @@
#include "config.h"
#include "GlibUtilities.h"
+#if OS(WINDOWS)
+#include <windows.h>
+#include <wtf/text/WTFString.h>
+#else
#include <limits.h>
#include <unistd.h>
+#endif
#if OS(LINUX)
CString getCurrentExecutablePath()
@@ -41,4 +46,15 @@ CString getCurrentExecutablePath()
return CString();
return CString(readLinkBuffer, result);
}
+#elif OS(WINDOWS)
+CString getCurrentExecutablePath()
+{
+ static WCHAR buffer[MAX_PATH];
+ DWORD length = GetModuleFileNameW(0, buffer, MAX_PATH);
+ if (!length || (length == MAX_PATH && GetLastError() == ERROR_INSUFFICIENT_BUFFER))
+ return CString();
+
+ String path(buffer, length);
+ return path.utf8();
+}
#endif
diff --git a/Source/JavaScriptCore/yarr/YarrPattern.cpp b/Source/JavaScriptCore/yarr/YarrPattern.cpp
index 1043e405d..f0d10e624 100644
--- a/Source/JavaScriptCore/yarr/YarrPattern.cpp
+++ b/Source/JavaScriptCore/yarr/YarrPattern.cpp
@@ -476,14 +476,23 @@ public:
ASSERT(term.type > PatternTerm::TypeAssertionWordBoundary);
ASSERT((term.quantityCount == 1) && (term.quantityType == QuantifierFixedCount));
- // For any assertion with a zero minimum, not matching is valid and has no effect,
- // remove it. Otherwise, we need to match as least once, but there is no point
- // matching more than once, so remove the quantifier. It is not entirely clear
- // from the spec whether or not this behavior is correct, but I believe this
- // matches Firefox. :-/
if (term.type == PatternTerm::TypeParentheticalAssertion) {
+ // If an assertion is quantified with a minimum count of zero, it can simply be removed.
+ // This arises from the RepeatMatcher behaviour in the spec. Matching an assertion never
+ // results in any input being consumed, however the continuation passed to the assertion
+ // (called in steps, 8c and 9 of the RepeatMatcher definition, ES5.1 15.10.2.5) will
+ // reject all zero length matches (see step 2.1). A match from the continuation of the
+ // expression will still be accepted regardless (via steps 8a and 11) - the upshot of all
+ // this is that matches from the assertion are not required, and won't be accepted anyway,
+ // so no need to ever run it.
if (!min)
m_alternative->removeLastTerm();
+ // We never need to run an assertion more than once. Subsequent interations will be run
+ // with the same start index (since assertions are non-capturing) and the same captures
+ // (per step 4 of RepeatMatcher in ES5.1 15.10.2.5), and as such will always produce the
+ // same result and captures. If the first match succeeds then the subsequent (min - 1)
+ // matches will too. Any additional optional matches will fail (on the same basis as the
+ // minimum zero quantified assertions, above), but this will still result in a match.
return;
}