From dc6262b587c71c14e30d93e57ed812e36a79a33e Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 24 Sep 2012 13:09:44 +0200 Subject: Imported WebKit commit 6339232fec7f5d9984a33388aecfd2cbc7832053 (http://svn.webkit.org/repository/webkit/trunk@129343) New snapshot with build fixes for latest qtbase --- Source/JavaScriptCore/jit/JITCall.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'Source/JavaScriptCore/jit/JITCall.cpp') diff --git a/Source/JavaScriptCore/jit/JITCall.cpp b/Source/JavaScriptCore/jit/JITCall.cpp index f6ea71e17..b5f4f8278 100644 --- a/Source/JavaScriptCore/jit/JITCall.cpp +++ b/Source/JavaScriptCore/jit/JITCall.cpp @@ -66,7 +66,11 @@ void JIT::compileLoadVarargs(Instruction* instruction) JumpList slowCase; JumpList end; - if (m_codeBlock->usesArguments() && arguments == m_codeBlock->argumentsRegister()) { + bool canOptimize = m_codeBlock->usesArguments() + && arguments == m_codeBlock->argumentsRegister() + && !m_codeBlock->symbolTable()->slowArguments(); + + if (canOptimize) { emitGetVirtualRegister(arguments, regT0); slowCase.append(branchPtr(NotEqual, regT0, TrustedImmPtr(JSValue::encode(JSValue())))); @@ -103,7 +107,7 @@ void JIT::compileLoadVarargs(Instruction* instruction) end.append(jump()); } - if (m_codeBlock->usesArguments() && arguments == m_codeBlock->argumentsRegister()) + if (canOptimize) slowCase.link(this); JITStubCall stubCall(this, cti_op_load_varargs); @@ -112,7 +116,7 @@ void JIT::compileLoadVarargs(Instruction* instruction) stubCall.addArgument(Imm32(firstFreeRegister)); stubCall.call(regT1); - if (m_codeBlock->usesArguments() && arguments == m_codeBlock->argumentsRegister()) + if (canOptimize) end.link(this); } -- cgit v1.2.1