diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-01-11 10:03:25 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-01-11 10:03:25 +0100 |
commit | d11f84f5b5cdc0d92a08af01b13472fdd5f9acb9 (patch) | |
tree | b318cf594dc1da2fa48224005945c9157f35bb41 /Source/JavaScriptCore/bytecompiler | |
parent | 6300a96eca9f152b379f1bcf3d9efdc5572d989a (diff) | |
download | qtwebkit-d11f84f5b5cdc0d92a08af01b13472fdd5f9acb9.tar.gz |
Imported WebKit commit 75bb2fc5882d2e1b3d5572c2961507996cbca5e3 (http://svn.webkit.org/repository/webkit/trunk@104681)
Diffstat (limited to 'Source/JavaScriptCore/bytecompiler')
-rw-r--r-- | Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp index dec5c826e..bfb1618a6 100644 --- a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp +++ b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp @@ -230,7 +230,7 @@ BytecodeGenerator::BytecodeGenerator(ProgramNode* programNode, ScopeChainNode* s // FIXME: Move code that modifies the global object to Interpreter::execute. - m_codeBlock->m_numParameters = 1; // Allocate space for "this" + m_codeBlock->setNumParameters(1); // Allocate space for "this" codeBlock->m_numCapturedVars = codeBlock->m_numVars; if (compilationKind == OptimizingCompilation) @@ -401,7 +401,7 @@ BytecodeGenerator::BytecodeGenerator(FunctionBodyNode* functionBody, ScopeChainN // Add "this" as a parameter int nextParameterIndex = CallFrame::thisArgumentOffset(); m_thisRegister.setIndex(nextParameterIndex--); - ++m_codeBlock->m_numParameters; + m_codeBlock->addParameter(); for (size_t i = 0; i < parameters.size(); ++i) addParameter(parameters[i], nextParameterIndex--); @@ -459,7 +459,7 @@ BytecodeGenerator::BytecodeGenerator(EvalNode* evalNode, ScopeChainNode* scopeCh emitOpcode(op_enter); codeBlock->setGlobalData(m_globalData); - m_codeBlock->m_numParameters = 1; // Allocate space for "this" + m_codeBlock->setNumParameters(1); const DeclarationStacks::FunctionStack& functionStack = evalNode->functionStack(); for (size_t i = 0; i < functionStack.size(); ++i) @@ -500,7 +500,7 @@ void BytecodeGenerator::addParameter(const Identifier& ident, int parameterIndex // To maintain the calling convention, we have to allocate unique space for // each parameter, even if the parameter doesn't make it into the symbol table. - ++m_codeBlock->m_numParameters; + m_codeBlock->addParameter(); } RegisterID* BytecodeGenerator::registerFor(const Identifier& ident) @@ -1869,7 +1869,7 @@ RegisterID* BytecodeGenerator::emitReturn(RegisterID* src) emitOpcode(op_tear_off_activation); instructions().append(m_activationRegister->index()); instructions().append(m_codeBlock->argumentsRegister()); - } else if (m_codeBlock->usesArguments() && m_codeBlock->m_numParameters != 1 && !m_codeBlock->isStrictMode()) { + } else if (m_codeBlock->usesArguments() && m_codeBlock->numParameters() != 1 && !m_codeBlock->isStrictMode()) { emitOpcode(op_tear_off_arguments); instructions().append(m_codeBlock->argumentsRegister()); } |