summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/jit/JITOpcodes.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-09-10 19:10:20 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-09-10 19:10:20 +0200
commit284837daa07b29d6a63a748544a90b1f5842ac5c (patch)
treeecd258180bde91fe741e0cfd2638beb3c6da7e8e /Source/JavaScriptCore/jit/JITOpcodes.cpp
parent2e2ba8ff45915f40ed3e014101269c175f2a89a0 (diff)
downloadqtwebkit-284837daa07b29d6a63a748544a90b1f5842ac5c.tar.gz
Imported WebKit commit 68645295d2e3e09af2c942f092556f06aa5f8b0d (http://svn.webkit.org/repository/webkit/trunk@128073)
New snapshot
Diffstat (limited to 'Source/JavaScriptCore/jit/JITOpcodes.cpp')
-rw-r--r--Source/JavaScriptCore/jit/JITOpcodes.cpp37
1 files changed, 18 insertions, 19 deletions
diff --git a/Source/JavaScriptCore/jit/JITOpcodes.cpp b/Source/JavaScriptCore/jit/JITOpcodes.cpp
index 8ebad61ff..9b7dc634f 100644
--- a/Source/JavaScriptCore/jit/JITOpcodes.cpp
+++ b/Source/JavaScriptCore/jit/JITOpcodes.cpp
@@ -75,7 +75,7 @@ PassRefPtr<ExecutableMemoryHandle> JIT::privateCompileCTIMachineTrampolines(JSGl
callSlowCase.append(emitJumpIfNotType(regT0, regT1, JSFunctionType));
// Finish canonical initialization before JS function call.
- loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_scopeChain)), regT1);
+ loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_scope)), regT1);
emitPutCellToCallFrameHeader(regT1, RegisterFile::ScopeChain);
// Also initialize ReturnPC for use by lazy linking and exceptions.
@@ -95,7 +95,7 @@ PassRefPtr<ExecutableMemoryHandle> JIT::privateCompileCTIMachineTrampolines(JSGl
constructSlowCase.append(emitJumpIfNotType(regT0, regT1, JSFunctionType));
// Finish canonical initialization before JS function call.
- loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_scopeChain)), regT1);
+ loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_scope)), regT1);
emitPutCellToCallFrameHeader(regT1, RegisterFile::ScopeChain);
// Also initialize ReturnPC for use by lazy linking and exeptions.
@@ -115,7 +115,7 @@ PassRefPtr<ExecutableMemoryHandle> JIT::privateCompileCTIMachineTrampolines(JSGl
callSlowCase.append(emitJumpIfNotType(regT0, regT1, JSFunctionType));
// Finish canonical initialization before JS function call.
- loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_scopeChain)), regT1);
+ loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_scope)), regT1);
emitPutCellToCallFrameHeader(regT1, RegisterFile::ScopeChain);
loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_executable)), regT2);
@@ -138,7 +138,7 @@ PassRefPtr<ExecutableMemoryHandle> JIT::privateCompileCTIMachineTrampolines(JSGl
constructSlowCase.append(emitJumpIfNotType(regT0, regT1, JSFunctionType));
// Finish canonical initialization before JS function call.
- loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_scopeChain)), regT1);
+ loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_scope)), regT1);
emitPutCellToCallFrameHeader(regT1, RegisterFile::ScopeChain);
loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_executable)), regT2);
@@ -1003,11 +1003,11 @@ void JIT::emit_op_next_pname(Instruction* currentInstruction)
end.link(this);
}
-void JIT::emit_op_push_scope(Instruction* currentInstruction)
+void JIT::emit_op_push_with_scope(Instruction* currentInstruction)
{
- JITStubCall stubCall(this, cti_op_push_scope);
+ JITStubCall stubCall(this, cti_op_push_with_scope);
stubCall.addArgument(currentInstruction[1].u.operand, regT2);
- stubCall.call(currentInstruction[1].u.operand);
+ stubCall.call();
}
void JIT::emit_op_pop_scope(Instruction*)
@@ -1072,12 +1072,13 @@ void JIT::emit_op_to_jsnumber(Instruction* currentInstruction)
emitPutVirtualRegister(currentInstruction[1].u.operand);
}
-void JIT::emit_op_push_new_scope(Instruction* currentInstruction)
+void JIT::emit_op_push_name_scope(Instruction* currentInstruction)
{
- JITStubCall stubCall(this, cti_op_push_new_scope);
- stubCall.addArgument(TrustedImmPtr(&m_codeBlock->identifier(currentInstruction[2].u.operand)));
- stubCall.addArgument(currentInstruction[3].u.operand, regT2);
- stubCall.call(currentInstruction[1].u.operand);
+ JITStubCall stubCall(this, cti_op_push_name_scope);
+ stubCall.addArgument(TrustedImmPtr(&m_codeBlock->identifier(currentInstruction[1].u.operand)));
+ stubCall.addArgument(currentInstruction[2].u.operand, regT2);
+ stubCall.addArgument(TrustedImm32(currentInstruction[3].u.operand));
+ stubCall.call();
}
void JIT::emit_op_catch(Instruction* currentInstruction)
@@ -1331,7 +1332,7 @@ void JIT::emit_op_profile_did_call(Instruction* currentInstruction)
void JIT::emitSlow_op_convert_this(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
{
- void* globalThis = m_codeBlock->globalObject()->globalScopeChain()->globalThis.get();
+ void* globalThis = m_codeBlock->globalObject()->globalThis();
linkSlowCase(iter);
if (shouldEmitProfiling())
@@ -1591,15 +1592,13 @@ void JIT::emit_op_resolve_global_dynamic(Instruction* currentInstruction)
Jump activationNotCreated;
if (checkTopLevel)
activationNotCreated = branchTestPtr(Zero, addressFor(m_codeBlock->activationRegister()));
- loadPtr(Address(regT0, OBJECT_OFFSETOF(ScopeChainNode, object)), regT1);
- addSlowCase(checkStructure(regT1, m_globalData->activationStructure.get()));
- loadPtr(Address(regT0, OBJECT_OFFSETOF(ScopeChainNode, next)), regT0);
+ addSlowCase(checkStructure(regT0, m_codeBlock->globalObject()->activationStructure()));
+ loadPtr(Address(regT0, JSScope::offsetOfNext()), regT0);
activationNotCreated.link(this);
}
while (skip--) {
- loadPtr(Address(regT0, OBJECT_OFFSETOF(ScopeChainNode, object)), regT1);
- addSlowCase(checkStructure(regT1, m_globalData->activationStructure.get()));
- loadPtr(Address(regT0, OBJECT_OFFSETOF(ScopeChainNode, next)), regT0);
+ addSlowCase(checkStructure(regT0, m_codeBlock->globalObject()->activationStructure()));
+ loadPtr(Address(regT0, JSScope::offsetOfNext()), regT0);
}
emit_op_resolve_global(currentInstruction, true);
}