diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-11 09:43:24 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-11 09:43:24 +0200 |
commit | 1b914638db989aaa98631a1c1e02c7b2d44805d8 (patch) | |
tree | 87f4fd2c7b38db320079a5de8877890d2ca3c485 /Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp | |
parent | 2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47 (diff) | |
download | qtwebkit-1b914638db989aaa98631a1c1e02c7b2d44805d8.tar.gz |
Imported WebKit commit 9a52e27980f47e8b0d8f8b7cc0fd7b5741bceb92 (http://svn.webkit.org/repository/webkit/trunk@116736)
New snapshot to include QDeclarative* -> QQml* build fixes
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp')
-rw-r--r-- | Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp index a46f8f262..08e7d966d 100644 --- a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp +++ b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp @@ -3053,32 +3053,17 @@ void SpeculativeJIT::compile(Node& node) // then we speculate because we want to get recompiled if it isn't (since // otherwise we'd start taking slow path a lot). - SpeculateCellOperand proto(this, node.child1()); + SpeculateCellOperand callee(this, node.child1()); GPRTemporary result(this); GPRTemporary scratch(this); - GPRReg protoGPR = proto.gpr(); + GPRReg calleeGPR = callee.gpr(); GPRReg resultGPR = result.gpr(); GPRReg scratchGPR = scratch.gpr(); - proto.use(); - + // Load the inheritorID. If the inheritorID is not set, go to slow path. + m_jit.loadPtr(MacroAssembler::Address(calleeGPR, JSFunction::offsetOfCachedInheritorID()), scratchGPR); MacroAssembler::JumpList slowPath; - - // Need to verify that the prototype is an object. If we have reason to believe - // that it's a FinalObject then we speculate on that directly. Otherwise we - // do the slow (structure-based) check. - if (at(node.child1()).shouldSpeculateFinalObject()) { - if (!isFinalObjectPrediction(m_state.forNode(node.child1()).m_type)) - speculationCheck(BadType, JSValueRegs(protoGPR), node.child1(), m_jit.branchPtr(MacroAssembler::NotEqual, MacroAssembler::Address(protoGPR, JSCell::classInfoOffset()), MacroAssembler::TrustedImmPtr(&JSFinalObject::s_info))); - } else { - m_jit.loadPtr(MacroAssembler::Address(protoGPR, JSCell::structureOffset()), scratchGPR); - slowPath.append(m_jit.branch8(MacroAssembler::Below, MacroAssembler::Address(scratchGPR, Structure::typeInfoTypeOffset()), MacroAssembler::TrustedImm32(ObjectType))); - } - - // Load the inheritorID (the Structure that objects who have protoGPR as the prototype - // use to refer to that prototype). If the inheritorID is not set, go to slow path. - m_jit.loadPtr(MacroAssembler::Address(protoGPR, JSObject::offsetOfInheritorID()), scratchGPR); slowPath.append(m_jit.branchTestPtr(MacroAssembler::Zero, scratchGPR)); emitAllocateJSFinalObject(scratchGPR, resultGPR, scratchGPR, slowPath); @@ -3088,15 +3073,12 @@ void SpeculativeJIT::compile(Node& node) slowPath.link(&m_jit); silentSpillAllRegisters(resultGPR); - if (node.codeOrigin.inlineCallFrame) - callOperation(operationCreateThisInlined, resultGPR, protoGPR, node.codeOrigin.inlineCallFrame->callee.get()); - else - callOperation(operationCreateThis, resultGPR, protoGPR); + callOperation(operationCreateThis, resultGPR, calleeGPR); silentFillAllRegisters(resultGPR); done.link(&m_jit); - cellResult(resultGPR, m_compileIndex, UseChildrenCalledExplicitly); + cellResult(resultGPR, m_compileIndex); break; } |