diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-27 21:51:42 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-27 21:51:42 +0200 |
commit | be01689f43cf6882cf670d33df49ead1f570c53a (patch) | |
tree | 4bb2161d8983b38e3e7ed37b4a50303bfd5e2e85 /Source/JavaScriptCore/jit/JITOpcodes.cpp | |
parent | a89b2ebb8e192c5e8cea21079bda2ee2c0c7dddd (diff) | |
download | qtwebkit-be01689f43cf6882cf670d33df49ead1f570c53a.tar.gz |
Imported WebKit commit 8d6c5efc74f0222dfc7bcce8d845d4a2707ed9e6 (http://svn.webkit.org/repository/webkit/trunk@118629)
Diffstat (limited to 'Source/JavaScriptCore/jit/JITOpcodes.cpp')
-rw-r--r-- | Source/JavaScriptCore/jit/JITOpcodes.cpp | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/Source/JavaScriptCore/jit/JITOpcodes.cpp b/Source/JavaScriptCore/jit/JITOpcodes.cpp index d458f7fb5..aa2938cc2 100644 --- a/Source/JavaScriptCore/jit/JITOpcodes.cpp +++ b/Source/JavaScriptCore/jit/JITOpcodes.cpp @@ -1257,10 +1257,14 @@ void JIT::emit_op_init_lazy_reg(Instruction* currentInstruction) void JIT::emit_op_convert_this(Instruction* currentInstruction) { - emitGetVirtualRegister(currentInstruction[1].u.operand, regT0); + emitGetVirtualRegister(currentInstruction[1].u.operand, regT1); - emitJumpSlowCaseIfNotJSCell(regT0); - addSlowCase(branchPtr(Equal, Address(regT0, JSCell::classInfoOffset()), TrustedImmPtr(&JSString::s_info))); + emitJumpSlowCaseIfNotJSCell(regT1); + if (shouldEmitProfiling()) { + loadPtr(Address(regT1, JSCell::structureOffset()), regT0); + emitValueProfilingSite(); + } + addSlowCase(branchPtr(Equal, Address(regT1, JSCell::classInfoOffset()), TrustedImmPtr(&JSString::s_info))); } void JIT::emit_op_create_this(Instruction* currentInstruction) @@ -1315,15 +1319,21 @@ void JIT::emitSlow_op_convert_this(Instruction* currentInstruction, Vector<SlowC void* globalThis = m_codeBlock->globalObject()->globalScopeChain()->globalThis.get(); linkSlowCase(iter); - Jump isNotUndefined = branchPtr(NotEqual, regT0, TrustedImmPtr(JSValue::encode(jsUndefined()))); + if (shouldEmitProfiling()) + move(TrustedImmPtr(bitwise_cast<void*>(JSValue::encode(jsUndefined()))), regT0); + Jump isNotUndefined = branchPtr(NotEqual, regT1, TrustedImmPtr(JSValue::encode(jsUndefined()))); + emitValueProfilingSite(); move(TrustedImmPtr(globalThis), regT0); emitPutVirtualRegister(currentInstruction[1].u.operand, regT0); emitJumpSlowToHot(jump(), OPCODE_LENGTH(op_convert_this)); - isNotUndefined.link(this); linkSlowCase(iter); + if (shouldEmitProfiling()) + move(TrustedImmPtr(bitwise_cast<void*>(JSValue::encode(m_globalData->stringStructure.get()))), regT0); + isNotUndefined.link(this); + emitValueProfilingSite(); JITStubCall stubCall(this, cti_op_convert_this); - stubCall.addArgument(regT0); + stubCall.addArgument(regT1); stubCall.call(currentInstruction[1].u.operand); } |