Changeset 43583 in webkit for trunk/JavaScriptCore/jit/JITStubs.cpp
- Timestamp:
- May 12, 2009, 1:27:28 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/jit/JITStubs.cpp
r43560 r43583 1586 1586 uint32_t argCount = 0; 1587 1587 if (!arguments) { 1588 argCount = (uint32_t)(callFrame[RegisterFile::ArgumentCount].u.i) - 1; 1588 int providedParams = callFrame[RegisterFile::ArgumentCount].u.i - 1; 1589 argCount = providedParams; 1589 1590 int32_t sizeDelta = argsOffset + argCount + RegisterFile::CallFrameHeaderSize; 1590 1591 Register* newEnd = callFrame->registers() + sizeDelta; … … 1593 1594 VM_THROW_EXCEPTION(); 1594 1595 } 1595 uint32_t expectedParams = asFunction(callFrame[RegisterFile::Callee].jsValue())->body()->parameterCount();1596 uint32_t inplaceArgs = min(argCount, expectedParams);1597 uint32_t i = 0;1596 int32_t expectedParams = asFunction(callFrame[RegisterFile::Callee].jsValue())->body()->parameterCount(); 1597 int32_t inplaceArgs = min(providedParams, expectedParams); 1598 int32_t i = 0; 1598 1599 Register* argStore = callFrame->registers() + argsOffset; 1599 1600 … … 1602 1603 argStore[i] = callFrame->registers()[i - RegisterFile::CallFrameHeaderSize - expectedParams]; 1603 1604 // Then we copy any additional arguments that may be further up the stack ('-1' to account for 'this') 1604 for (; i < argCount; i++)1605 argStore[i] = callFrame->registers()[i - RegisterFile::CallFrameHeaderSize - expectedParams - argCount- 1];1605 for (; i < providedParams; i++) 1606 argStore[i] = callFrame->registers()[i - RegisterFile::CallFrameHeaderSize - expectedParams - providedParams - 1]; 1606 1607 } else if (!arguments.isUndefinedOrNull()) { 1607 1608 if (!arguments.isObject()) {
Note:
See TracChangeset
for help on using the changeset viewer.