diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-09-11 19:54:20 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-09-11 19:54:20 +0200 |
commit | 88a04ac016f57c2d78e714682445dff2e7db4ade (patch) | |
tree | a48ca81ee3b29953121308168db22532d5b57fe2 /Source/JavaScriptCore/interpreter/Interpreter.cpp | |
parent | 284837daa07b29d6a63a748544a90b1f5842ac5c (diff) | |
download | qtwebkit-88a04ac016f57c2d78e714682445dff2e7db4ade.tar.gz |
Imported WebKit commit 42d95198c30c2d1a94a5081181aad0b2be7c316c (http://svn.webkit.org/repository/webkit/trunk@128206)
This includes the rewrite of the configure part of the build system which should fix the QtQuick2 detection
and allow for further simplifications in the future
Diffstat (limited to 'Source/JavaScriptCore/interpreter/Interpreter.cpp')
-rw-r--r-- | Source/JavaScriptCore/interpreter/Interpreter.cpp | 50 |
1 files changed, 15 insertions, 35 deletions
diff --git a/Source/JavaScriptCore/interpreter/Interpreter.cpp b/Source/JavaScriptCore/interpreter/Interpreter.cpp index 87b77d639..358a24096 100644 --- a/Source/JavaScriptCore/interpreter/Interpreter.cpp +++ b/Source/JavaScriptCore/interpreter/Interpreter.cpp @@ -4475,50 +4475,43 @@ skip_id_custom_self: goto vm_throw; } DEFINE_OPCODE(op_tear_off_activation) { - /* tear_off_activation activation(r) arguments(r) + /* tear_off_activation activation(r) Copy locals and named parameters from the register file to the heap. - Point the bindings in 'activation' and 'arguments' to this new backing - store. (Note that 'arguments' may not have been created. If created, - 'arguments' already holds a copy of any extra / unnamed parameters.) + Point the bindings in 'activation' to this new backing store. This opcode appears before op_ret in functions that require full scope chains. */ int activation = vPC[1].u.operand; - int arguments = vPC[2].u.operand; ASSERT(codeBlock->needsFullScopeChain()); JSValue activationValue = callFrame->r(activation).jsValue(); - if (activationValue) { + if (activationValue) asActivation(activationValue)->tearOff(*globalData); - if (JSValue argumentsValue = callFrame->r(unmodifiedArgumentsRegister(arguments)).jsValue()) - asArguments(argumentsValue)->didTearOffActivation(*globalData, asActivation(activationValue)); - } else if (JSValue argumentsValue = callFrame->r(unmodifiedArgumentsRegister(arguments)).jsValue()) { - if (!codeBlock->isStrictMode()) - asArguments(argumentsValue)->tearOff(callFrame); - } - vPC += OPCODE_LENGTH(op_tear_off_activation); NEXT_INSTRUCTION(); } DEFINE_OPCODE(op_tear_off_arguments) { - /* tear_off_arguments arguments(r) + /* tear_off_arguments arguments(r) activation(r) Copy named parameters from the register file to the heap. Point the - bindings in 'arguments' to this new backing store. (Note that - 'arguments' may not have been created. If created, 'arguments' already - holds a copy of any extra / unnamed parameters.) + bindings in 'arguments' to this new backing store. (If 'activation' + was also copied to the heap, 'arguments' will point to its storage.) This opcode appears before op_ret in functions that don't require full scope chains, but do use 'arguments'. */ - int src1 = vPC[1].u.operand; - ASSERT(!codeBlock->needsFullScopeChain() && codeBlock->ownerExecutable()->usesArguments()); - - if (JSValue arguments = callFrame->r(unmodifiedArgumentsRegister(src1)).jsValue()) - asArguments(arguments)->tearOff(callFrame); + int arguments = vPC[1].u.operand; + int activation = vPC[2].u.operand; + ASSERT(codeBlock->usesArguments()); + if (JSValue argumentsValue = callFrame->r(unmodifiedArgumentsRegister(arguments)).jsValue()) { + if (JSValue activationValue = callFrame->r(activation).jsValue()) + asArguments(argumentsValue)->didTearOffActivation(callFrame->globalData(), asActivation(activationValue)); + else + asArguments(argumentsValue)->tearOff(callFrame); + } vPC += OPCODE_LENGTH(op_tear_off_arguments); NEXT_INSTRUCTION(); @@ -5112,19 +5105,6 @@ JSValue Interpreter::retrieveArgumentsFromVMCode(CallFrame* callFrame, JSFunctio if (!functionCallFrame) return jsNull(); - CodeBlock* codeBlock = functionCallFrame->someCodeBlockForPossiblyInlinedCode(); - if (codeBlock->usesArguments()) { - ASSERT(codeBlock->codeType() == FunctionCode); - int argumentsRegister = codeBlock->argumentsRegister(); - int realArgumentsRegister = unmodifiedArgumentsRegister(argumentsRegister); - if (JSValue arguments = functionCallFrame->uncheckedR(argumentsRegister).jsValue()) - return arguments; - JSValue arguments = JSValue(Arguments::create(callFrame->globalData(), functionCallFrame)); - functionCallFrame->r(argumentsRegister) = arguments; - functionCallFrame->r(realArgumentsRegister) = arguments; - return arguments; - } - Arguments* arguments = Arguments::create(functionCallFrame->globalData(), functionCallFrame); arguments->tearOff(functionCallFrame); return JSValue(arguments); |