|
Lines 160-166
CallFrame* sizeFrameForVarargs(CallFrame
Source/JavaScriptCore/interpreter/Interpreter.cpp_sec1
|
| 160 |
unsigned argumentCountIncludingThis = callFrame->argumentCountIncludingThis(); |
160 |
unsigned argumentCountIncludingThis = callFrame->argumentCountIncludingThis(); |
| 161 |
unsigned paddedCalleeFrameOffset = WTF::roundUpToMultipleOf(stackAlignmentRegisters(), -firstFreeRegister + argumentCountIncludingThis + JSStack::CallFrameHeaderSize + 1); |
161 |
unsigned paddedCalleeFrameOffset = WTF::roundUpToMultipleOf(stackAlignmentRegisters(), -firstFreeRegister + argumentCountIncludingThis + JSStack::CallFrameHeaderSize + 1); |
| 162 |
CallFrame* newCallFrame = CallFrame::create(callFrame->registers() - paddedCalleeFrameOffset); |
162 |
CallFrame* newCallFrame = CallFrame::create(callFrame->registers() - paddedCalleeFrameOffset); |
| 163 |
if (argumentCountIncludingThis > Arguments::MaxArguments + 1 || !stack->grow(newCallFrame->registers())) { |
163 |
if (argumentCountIncludingThis > Arguments::MaxArguments + 1 || !stack->ensureCapacityFor(newCallFrame->registers())) { |
| 164 |
callFrame->vm().throwException(callFrame, createStackOverflowError(callFrame)); |
164 |
callFrame->vm().throwException(callFrame, createStackOverflowError(callFrame)); |
| 165 |
return 0; |
165 |
return 0; |
| 166 |
} |
166 |
} |
|
Lines 171-177
CallFrame* sizeFrameForVarargs(CallFrame
Source/JavaScriptCore/interpreter/Interpreter.cpp_sec2
|
| 171 |
unsigned argumentCountIncludingThis = 1; |
171 |
unsigned argumentCountIncludingThis = 1; |
| 172 |
unsigned paddedCalleeFrameOffset = WTF::roundUpToMultipleOf(stackAlignmentRegisters(), -firstFreeRegister + argumentCountIncludingThis + JSStack::CallFrameHeaderSize + 1); |
172 |
unsigned paddedCalleeFrameOffset = WTF::roundUpToMultipleOf(stackAlignmentRegisters(), -firstFreeRegister + argumentCountIncludingThis + JSStack::CallFrameHeaderSize + 1); |
| 173 |
CallFrame* newCallFrame = CallFrame::create(callFrame->registers() - paddedCalleeFrameOffset); |
173 |
CallFrame* newCallFrame = CallFrame::create(callFrame->registers() - paddedCalleeFrameOffset); |
| 174 |
if (!stack->grow(newCallFrame->registers())) { |
174 |
if (!stack->ensureCapacityFor(newCallFrame->registers())) { |
| 175 |
callFrame->vm().throwException(callFrame, createStackOverflowError(callFrame)); |
175 |
callFrame->vm().throwException(callFrame, createStackOverflowError(callFrame)); |
| 176 |
return 0; |
176 |
return 0; |
| 177 |
} |
177 |
} |
|
Lines 188-194
CallFrame* sizeFrameForVarargs(CallFrame
Source/JavaScriptCore/interpreter/Interpreter.cpp_sec3
|
| 188 |
unsigned argCount = argsObject->length(callFrame); |
188 |
unsigned argCount = argsObject->length(callFrame); |
| 189 |
unsigned paddedCalleeFrameOffset = WTF::roundUpToMultipleOf(stackAlignmentRegisters(), -firstFreeRegister + CallFrame::offsetFor(argCount + 1)); |
189 |
unsigned paddedCalleeFrameOffset = WTF::roundUpToMultipleOf(stackAlignmentRegisters(), -firstFreeRegister + CallFrame::offsetFor(argCount + 1)); |
| 190 |
CallFrame* newCallFrame = CallFrame::create(callFrame->registers() - paddedCalleeFrameOffset); |
190 |
CallFrame* newCallFrame = CallFrame::create(callFrame->registers() - paddedCalleeFrameOffset); |
| 191 |
if (argCount > Arguments::MaxArguments || !stack->grow(newCallFrame->registers())) { |
191 |
if (argCount > Arguments::MaxArguments || !stack->ensureCapacityFor(newCallFrame->registers())) { |
| 192 |
callFrame->vm().throwException(callFrame, createStackOverflowError(callFrame)); |
192 |
callFrame->vm().throwException(callFrame, createStackOverflowError(callFrame)); |
| 193 |
return 0; |
193 |
return 0; |
| 194 |
} |
194 |
} |
|
Lines 200-206
CallFrame* sizeFrameForVarargs(CallFrame
Source/JavaScriptCore/interpreter/Interpreter.cpp_sec4
|
| 200 |
unsigned argCount = array->length(); |
200 |
unsigned argCount = array->length(); |
| 201 |
unsigned paddedCalleeFrameOffset = WTF::roundUpToMultipleOf(stackAlignmentRegisters(), -firstFreeRegister + CallFrame::offsetFor(argCount + 1)); |
201 |
unsigned paddedCalleeFrameOffset = WTF::roundUpToMultipleOf(stackAlignmentRegisters(), -firstFreeRegister + CallFrame::offsetFor(argCount + 1)); |
| 202 |
CallFrame* newCallFrame = CallFrame::create(callFrame->registers() - paddedCalleeFrameOffset); |
202 |
CallFrame* newCallFrame = CallFrame::create(callFrame->registers() - paddedCalleeFrameOffset); |
| 203 |
if (argCount > Arguments::MaxArguments || !stack->grow(newCallFrame->registers())) { |
203 |
if (argCount > Arguments::MaxArguments || !stack->ensureCapacityFor(newCallFrame->registers())) { |
| 204 |
callFrame->vm().throwException(callFrame, createStackOverflowError(callFrame)); |
204 |
callFrame->vm().throwException(callFrame, createStackOverflowError(callFrame)); |
| 205 |
return 0; |
205 |
return 0; |
| 206 |
} |
206 |
} |
|
Lines 211-217
CallFrame* sizeFrameForVarargs(CallFrame
Source/JavaScriptCore/interpreter/Interpreter.cpp_sec5
|
| 211 |
unsigned argCount = argObject->get(callFrame, callFrame->propertyNames().length).toUInt32(callFrame); |
211 |
unsigned argCount = argObject->get(callFrame, callFrame->propertyNames().length).toUInt32(callFrame); |
| 212 |
unsigned paddedCalleeFrameOffset = WTF::roundUpToMultipleOf(stackAlignmentRegisters(), -firstFreeRegister + CallFrame::offsetFor(argCount + 1)); |
212 |
unsigned paddedCalleeFrameOffset = WTF::roundUpToMultipleOf(stackAlignmentRegisters(), -firstFreeRegister + CallFrame::offsetFor(argCount + 1)); |
| 213 |
CallFrame* newCallFrame = CallFrame::create(callFrame->registers() - paddedCalleeFrameOffset); |
213 |
CallFrame* newCallFrame = CallFrame::create(callFrame->registers() - paddedCalleeFrameOffset); |
| 214 |
if (argCount > Arguments::MaxArguments || !stack->grow(newCallFrame->registers())) { |
214 |
if (argCount > Arguments::MaxArguments || !stack->ensureCapacityFor(newCallFrame->registers())) { |
| 215 |
callFrame->vm().throwException(callFrame, createStackOverflowError(callFrame)); |
215 |
callFrame->vm().throwException(callFrame, createStackOverflowError(callFrame)); |
| 216 |
return 0; |
216 |
return 0; |
| 217 |
} |
217 |
} |