From d6a599dbc9d824a462b2b206316e102bf8136446 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 11 Jul 2012 13:45:28 +0200 Subject: Imported WebKit commit 8ff1f22783a32de82fee915abd55bd1b298f2644 (http://svn.webkit.org/repository/webkit/trunk@122325) New snapshot that should work with the latest Qt build system changes --- Source/JavaScriptCore/jit/JITOpcodes.cpp | 44 ++++---------------------------- 1 file changed, 5 insertions(+), 39 deletions(-) (limited to 'Source/JavaScriptCore/jit/JITOpcodes.cpp') diff --git a/Source/JavaScriptCore/jit/JITOpcodes.cpp b/Source/JavaScriptCore/jit/JITOpcodes.cpp index 2e448dd52..c0af6f9e9 100644 --- a/Source/JavaScriptCore/jit/JITOpcodes.cpp +++ b/Source/JavaScriptCore/jit/JITOpcodes.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 Apple Inc. All rights reserved. + * Copyright (C) 2009, 2012 Apple Inc. All rights reserved. * Copyright (C) 2010 Patrick Gansterer * * Redistribution and use in source and binary forms, with or without @@ -701,9 +701,8 @@ void JIT::emit_op_resolve_global(Instruction* currentInstruction, bool) // Load cached property // Assume that the global object always uses external storage. - loadPtr(Address(regT0, OBJECT_OFFSETOF(JSGlobalObject, m_propertyStorage)), regT0); load32(Address(regT2, OBJECT_OFFSETOF(GlobalResolveInfo, offset)), regT1); - loadPtr(BaseIndex(regT0, regT1, ScalePtr), regT0); + compileGetDirectOffset(regT0, regT0, regT1, regT0, KnownNotFinal); emitValueProfilingSite(); emitPutVirtualRegister(currentInstruction[1].u.operand); } @@ -1618,11 +1617,9 @@ void JIT::emit_op_new_func(Instruction* currentInstruction) #endif } - FunctionExecutable* executable = m_codeBlock->functionDecl(currentInstruction[2].u.operand); - emitGetFromCallFrameHeaderPtr(RegisterFile::ScopeChain, regT2); - emitAllocateJSFunction(executable, regT2, regT0, regT1); - - emitStoreCell(dst, regT0); + JITStubCall stubCall(this, cti_op_new_func); + stubCall.addArgument(TrustedImmPtr(m_codeBlock->functionDecl(currentInstruction[2].u.operand))); + stubCall.call(dst); if (currentInstruction[3].u.operand) { #if USE(JSVALUE32_64) @@ -1634,44 +1631,13 @@ void JIT::emit_op_new_func(Instruction* currentInstruction) } } -void JIT::emitSlow_op_new_func(Instruction* currentInstruction, Vector::iterator& iter) -{ - linkSlowCase(iter); - JITStubCall stubCall(this, cti_op_new_func); - stubCall.addArgument(TrustedImmPtr(m_codeBlock->functionDecl(currentInstruction[2].u.operand))); - stubCall.call(currentInstruction[1].u.operand); -} - void JIT::emit_op_new_func_exp(Instruction* currentInstruction) { - FunctionExecutable* executable = m_codeBlock->functionExpr(currentInstruction[2].u.operand); - - // We only inline the allocation of a anonymous function expressions - // If we want to be able to allocate a named function expression, we would - // need to be able to do inline allocation of a JSStaticScopeObject. - if (executable->name().isNull()) { - emitGetFromCallFrameHeaderPtr(RegisterFile::ScopeChain, regT2); - emitAllocateJSFunction(executable, regT2, regT0, regT1); - emitStoreCell(currentInstruction[1].u.operand, regT0); - return; - } - JITStubCall stubCall(this, cti_op_new_func_exp); stubCall.addArgument(TrustedImmPtr(m_codeBlock->functionExpr(currentInstruction[2].u.operand))); stubCall.call(currentInstruction[1].u.operand); } -void JIT::emitSlow_op_new_func_exp(Instruction* currentInstruction, Vector::iterator& iter) -{ - FunctionExecutable* executable = m_codeBlock->functionExpr(currentInstruction[2].u.operand); - if (!executable->name().isNull()) - return; - linkSlowCase(iter); - JITStubCall stubCall(this, cti_op_new_func_exp); - stubCall.addArgument(TrustedImmPtr(executable)); - stubCall.call(currentInstruction[1].u.operand); -} - void JIT::emit_op_new_array(Instruction* currentInstruction) { int length = currentInstruction[3].u.operand; -- cgit v1.2.1