diff options
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp')
-rw-r--r-- | Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp index a1ac899a2..0435df930 100644 --- a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp +++ b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp @@ -3289,18 +3289,20 @@ void SpeculativeJIT::compile(Node& node) SpeculateCellOperand callee(this, node.child1()); GPRTemporary result(this); + GPRTemporary structure(this); GPRTemporary scratch(this); GPRReg calleeGPR = callee.gpr(); GPRReg resultGPR = result.gpr(); + GPRReg structureGPR = structure.gpr(); GPRReg scratchGPR = scratch.gpr(); // Load the inheritorID. If the inheritorID is not set, go to slow path. - m_jit.loadPtr(MacroAssembler::Address(calleeGPR, JSFunction::offsetOfCachedInheritorID()), scratchGPR); + m_jit.loadPtr(MacroAssembler::Address(calleeGPR, JSFunction::offsetOfCachedInheritorID()), structureGPR); MacroAssembler::JumpList slowPath; - slowPath.append(m_jit.branchTestPtr(MacroAssembler::Zero, scratchGPR)); + slowPath.append(m_jit.branchTestPtr(MacroAssembler::Zero, structureGPR)); - emitAllocateJSFinalObject(scratchGPR, resultGPR, scratchGPR, slowPath); + emitAllocateJSFinalObject(structureGPR, resultGPR, scratchGPR, slowPath); addSlowPathGenerator(slowPathCall(slowPath, this, operationCreateThis, resultGPR, calleeGPR)); @@ -3972,43 +3974,40 @@ void SpeculativeJIT::compile(Node& node) cellResult(resultGPR, m_compileIndex); break; } - + case TearOffActivation: { ASSERT(!node.codeOrigin.inlineCallFrame); JSValueOperand activationValue(this, node.child1()); - JSValueOperand argumentsValue(this, node.child2()); GPRReg activationValueGPR = activationValue.gpr(); - GPRReg argumentsValueGPR = argumentsValue.gpr(); - - JITCompiler::JumpList created; - created.append(m_jit.branchTestPtr(JITCompiler::NonZero, activationValueGPR)); - created.append(m_jit.branchTestPtr(JITCompiler::NonZero, argumentsValueGPR)); + + JITCompiler::Jump created = m_jit.branchTestPtr(JITCompiler::NonZero, activationValueGPR); addSlowPathGenerator( slowPathCall( - created, this, operationTearOffActivation, NoResult, activationValueGPR, - static_cast<int32_t>(node.unmodifiedArgumentsRegister()))); + created, this, operationTearOffActivation, NoResult, activationValueGPR)); noResult(m_compileIndex); break; } - + case TearOffArguments: { - JSValueOperand argumentsValue(this, node.child1()); - GPRReg argumentsValueGPR = argumentsValue.gpr(); - - JITCompiler::Jump created = m_jit.branchTestPtr(JITCompiler::NonZero, argumentsValueGPR); - + JSValueOperand unmodifiedArgumentsValue(this, node.child1()); + JSValueOperand activationValue(this, node.child2()); + GPRReg unmodifiedArgumentsValueGPR = unmodifiedArgumentsValue.gpr(); + GPRReg activationValueGPR = activationValue.gpr(); + + JITCompiler::Jump created = m_jit.branchTestPtr(JITCompiler::NonZero, unmodifiedArgumentsValueGPR); + if (node.codeOrigin.inlineCallFrame) { addSlowPathGenerator( slowPathCall( created, this, operationTearOffInlinedArguments, NoResult, - argumentsValueGPR, node.codeOrigin.inlineCallFrame)); + unmodifiedArgumentsValueGPR, activationValueGPR, node.codeOrigin.inlineCallFrame)); } else { addSlowPathGenerator( slowPathCall( - created, this, operationTearOffArguments, NoResult, argumentsValueGPR)); + created, this, operationTearOffArguments, NoResult, unmodifiedArgumentsValueGPR, activationValueGPR)); } noResult(m_compileIndex); |