Changeset 104630 in webkit for trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp
- Timestamp:
- Jan 10, 2012, 2:08:47 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp
r104338 r104630 371 371 { 372 372 // This ensures enough space for the worst case scenario of zero arguments passed by the caller. 373 if (!registerFile->grow(callFrame->registers() + registerOffset + newCodeBlock-> m_numParameters+ newCodeBlock->m_numCalleeRegisters))373 if (!registerFile->grow(callFrame->registers() + registerOffset + newCodeBlock->numParameters() + newCodeBlock->m_numCalleeRegisters)) 374 374 return 0; 375 375 376 if (argumentCountIncludingThis >= newCodeBlock-> m_numParameters) {376 if (argumentCountIncludingThis >= newCodeBlock->numParameters()) { 377 377 Register* newCallFrame = callFrame->registers() + registerOffset; 378 378 return CallFrame::create(newCallFrame); … … 380 380 381 381 // Too few arguments -- copy arguments, then fill in missing arguments with undefined. 382 size_t delta = newCodeBlock-> m_numParameters- argumentCountIncludingThis;382 size_t delta = newCodeBlock->numParameters() - argumentCountIncludingThis; 383 383 CallFrame* newCallFrame = CallFrame::create(callFrame->registers() + registerOffset + delta); 384 384 … … 603 603 JSValue v; 604 604 605 it = callFrame->registers() - RegisterFile::CallFrameHeaderSize - codeBlock-> m_numParameters;605 it = callFrame->registers() - RegisterFile::CallFrameHeaderSize - codeBlock->numParameters(); 606 606 v = (*it).jsValue(); 607 607 #if USE(JSVALUE32_64) … … 610 610 printf("[this] | %10p | %-16s %p \n", it, v.description(), JSValue::encode(v)); ++it; 611 611 #endif 612 end = it + max(codeBlock-> m_numParameters- 1, 0); // - 1 to skip "this"612 end = it + max(codeBlock->numParameters() - 1, 0); // - 1 to skip "this" 613 613 if (it != end) { 614 614 do { … … 986 986 987 987 Register* oldEnd = m_registerFile.end(); 988 Register* newEnd = oldEnd + codeBlock-> m_numParameters+ RegisterFile::CallFrameHeaderSize + codeBlock->m_numCalleeRegisters;988 Register* newEnd = oldEnd + codeBlock->numParameters() + RegisterFile::CallFrameHeaderSize + codeBlock->m_numCalleeRegisters; 989 989 if (!m_registerFile.grow(newEnd)) 990 990 return checkedReturn(throwStackOverflowError(callFrame)); 991 991 992 CallFrame* newCallFrame = CallFrame::create(oldEnd + codeBlock-> m_numParameters+ RegisterFile::CallFrameHeaderSize);993 ASSERT(codeBlock-> m_numParameters== 1); // 1 parameter for 'this'.994 newCallFrame->init(codeBlock, 0, scopeChain, CallFrame::noCaller(), codeBlock-> m_numParameters, 0);992 CallFrame* newCallFrame = CallFrame::create(oldEnd + codeBlock->numParameters() + RegisterFile::CallFrameHeaderSize); 993 ASSERT(codeBlock->numParameters() == 1); // 1 parameter for 'this'. 994 newCallFrame->init(codeBlock, 0, scopeChain, CallFrame::noCaller(), codeBlock->numParameters(), 0); 995 995 newCallFrame->setThisValue(thisObj); 996 996 TopCallFrameSetter topCallFrame(callFrame->globalData(), newCallFrame); … … 1257 1257 newCallFrame->init(codeBlock, 0, scopeChain, callFrame->addHostCallFrameFlag(), argumentCountIncludingThis, function); 1258 1258 scopeChain->globalData->topCallFrame = newCallFrame; 1259 CallFrameClosure result = { callFrame, newCallFrame, function, functionExecutable, scopeChain->globalData, oldEnd, scopeChain, codeBlock-> m_numParameters, argumentCountIncludingThis };1259 CallFrameClosure result = { callFrame, newCallFrame, function, functionExecutable, scopeChain->globalData, oldEnd, scopeChain, codeBlock->numParameters(), argumentCountIncludingThis }; 1260 1260 return result; 1261 1261 } … … 1368 1368 CallFrame* newCallFrame = CallFrame::create(m_registerFile.begin() + globalRegisterOffset); 1369 1369 1370 ASSERT(codeBlock-> m_numParameters== 1); // 1 parameter for 'this'.1371 newCallFrame->init(codeBlock, 0, scopeChain, callFrame->addHostCallFrameFlag(), codeBlock-> m_numParameters, 0);1370 ASSERT(codeBlock->numParameters() == 1); // 1 parameter for 'this'. 1371 newCallFrame->init(codeBlock, 0, scopeChain, callFrame->addHostCallFrameFlag(), codeBlock->numParameters(), 0); 1372 1372 newCallFrame->setThisValue(thisValue); 1373 1373
Note:
See TracChangeset
for help on using the changeset viewer.