Changeset 47620 in webkit for trunk/JavaScriptCore/runtime
- Timestamp:
- Aug 20, 2009, 9:21:01 PM (16 years ago)
- Location:
- trunk/JavaScriptCore/runtime
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/Arguments.h
r47412 r47620 116 116 { 117 117 function = callFrame->callee(); 118 119 CodeBlock* codeBlock = &function->executable()->generatedBytecode(); 120 int numParameters = codeBlock->m_numParameters; 118 119 int numParameters = function->executable()->parameterCount(); 121 120 argc = callFrame->argumentCount(); 122 121 123 122 if (argc <= numParameters) 124 argv = callFrame->registers() - RegisterFile::CallFrameHeaderSize - numParameters + 1; // + 1 to skip "this"123 argv = callFrame->registers() - RegisterFile::CallFrameHeaderSize - numParameters; 125 124 else 126 argv = callFrame->registers() - RegisterFile::CallFrameHeaderSize - numParameters - argc + 1; // + 1 to skip "this"125 argv = callFrame->registers() - RegisterFile::CallFrameHeaderSize - numParameters - argc; 127 126 128 127 argc -= 1; // - 1 to skip "this" 129 firstParameterIndex = -RegisterFile::CallFrameHeaderSize - numParameters + 1; // + 1 to skip "this"128 firstParameterIndex = -RegisterFile::CallFrameHeaderSize - numParameters; 130 129 } 131 130 -
trunk/JavaScriptCore/runtime/Executable.cpp
r47597 r47620 88 88 m_numParameters = m_codeBlock->m_numParameters; 89 89 ASSERT(m_numParameters); 90 m_numVariables = m_codeBlock->m_numVars; 90 91 91 92 body()->destroyData(); -
trunk/JavaScriptCore/runtime/Executable.h
r47597 r47620 202 202 , m_codeBlock(0) 203 203 , m_name(name) 204 , m_numVariables(0) 204 205 { 205 206 m_node = body; … … 228 229 bool usesArguments() const { return body()->usesArguments(); } 229 230 size_t parameterCount() const { return body()->parameterCount(); } 231 size_t variableCount() const { return m_numVariables; } 230 232 UString paramString() const { return body()->paramString(); } 231 233 … … 249 251 CodeBlock* m_codeBlock; 250 252 const Identifier& m_name; 253 size_t m_numVariables; 251 254 252 255 #if ENABLE(JIT) -
trunk/JavaScriptCore/runtime/JSActivation.cpp
r47412 r47620 58 58 return; 59 59 60 size_t numParametersMinusThis = d()->functionExecutable-> generatedBytecode().m_numParameters - 1;60 size_t numParametersMinusThis = d()->functionExecutable->parameterCount(); 61 61 62 62 size_t count = numParametersMinusThis; 63 63 markStack.appendValues(registerArray, count); 64 64 65 size_t numVars = d()->functionExecutable-> generatedBytecode().m_numVars;65 size_t numVars = d()->functionExecutable->variableCount(); 66 66 67 67 // Skip the call frame, which sits between the parameters and vars.
Note:
See TracChangeset
for help on using the changeset viewer.