summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/jit/JITOpcodes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/jit/JITOpcodes.cpp')
-rw-r--r--Source/JavaScriptCore/jit/JITOpcodes.cpp22
1 files changed, 2 insertions, 20 deletions
diff --git a/Source/JavaScriptCore/jit/JITOpcodes.cpp b/Source/JavaScriptCore/jit/JITOpcodes.cpp
index d68f4109d..f43e98c45 100644
--- a/Source/JavaScriptCore/jit/JITOpcodes.cpp
+++ b/Source/JavaScriptCore/jit/JITOpcodes.cpp
@@ -1263,42 +1263,24 @@ void JIT::emit_op_convert_this(Instruction* currentInstruction)
addSlowCase(branchPtr(Equal, Address(regT0, JSCell::classInfoOffset()), TrustedImmPtr(&JSString::s_info)));
}
-void JIT::emit_op_get_callee(Instruction* currentInstruction)
-{
- unsigned result = currentInstruction[1].u.operand;
- emitGetFromCallFrameHeaderPtr(RegisterFile::Callee, regT0);
- emitPutVirtualRegister(result);
-}
-
void JIT::emit_op_create_this(Instruction* currentInstruction)
{
- emitGetVirtualRegister(currentInstruction[2].u.operand, regT2);
- emitJumpSlowCaseIfNotJSCell(regT2, currentInstruction[2].u.operand);
- loadPtr(Address(regT2, JSCell::structureOffset()), regT1);
- addSlowCase(emitJumpIfNotObject(regT1));
-
- // now we know that the prototype is an object, but we don't know if it's got an
- // inheritor ID
-
- loadPtr(Address(regT2, JSObject::offsetOfInheritorID()), regT2);
+ emitGetFromCallFrameHeaderPtr(RegisterFile::Callee, regT0);
+ loadPtr(Address(regT0, JSFunction::offsetOfCachedInheritorID()), regT2);
addSlowCase(branchTestPtr(Zero, regT2));
// now regT2 contains the inheritorID, which is the structure that the newly
// allocated object will have.
emitAllocateJSFinalObject(regT2, regT0, regT1);
-
emitPutVirtualRegister(currentInstruction[1].u.operand);
}
void JIT::emitSlow_op_create_this(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
{
- linkSlowCaseIfNotJSCell(iter, currentInstruction[2].u.operand); // not a cell
- linkSlowCase(iter); // not an object
linkSlowCase(iter); // doesn't have an inheritor ID
linkSlowCase(iter); // allocation failed
JITStubCall stubCall(this, cti_op_create_this);
- stubCall.addArgument(currentInstruction[2].u.operand, regT1);
stubCall.call(currentInstruction[1].u.operand);
}