| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #if V8_TARGET_ARCH_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
| 6 | 6 |
| 7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
| 8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1133 // Return and remove the on-stack parameters. | 1133 // Return and remove the on-stack parameters. |
| 1134 __ bind(&done); | 1134 __ bind(&done); |
| 1135 __ ret(3 * kPointerSize); | 1135 __ ret(3 * kPointerSize); |
| 1136 | 1136 |
| 1137 // Do the runtime call to allocate the arguments object. | 1137 // Do the runtime call to allocate the arguments object. |
| 1138 __ bind(&runtime); | 1138 __ bind(&runtime); |
| 1139 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1); | 1139 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1); |
| 1140 } | 1140 } |
| 1141 | 1141 |
| 1142 | 1142 |
| 1143 void RestParamAccessStub::GenerateNew(MacroAssembler* masm) { | |
| 1144 // esp[0] : return address | |
| 1145 // esp[4] : language mode | |
| 1146 // esp[8] : index of rest parameter | |
| 1147 // esp[12] : number of parameters | |
| 1148 // esp[16] : receiver displacement | |
| 1149 | |
| 1150 // Check if the calling frame is an arguments adaptor frame. | |
| 1151 Label runtime; | |
| 1152 __ mov(edx, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); | |
| 1153 __ mov(ecx, Operand(edx, StandardFrameConstants::kContextOffset)); | |
| 1154 __ cmp(ecx, Immediate(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); | |
| 1155 __ j(not_equal, &runtime); | |
| 1156 | |
| 1157 // Patch the arguments.length and the parameters pointer. | |
| 1158 __ mov(ecx, Operand(edx, ArgumentsAdaptorFrameConstants::kLengthOffset)); | |
| 1159 __ mov(Operand(esp, 3 * kPointerSize), ecx); | |
| 1160 __ lea(edx, Operand(edx, ecx, times_2, | |
| 1161 StandardFrameConstants::kCallerSPOffset)); | |
| 1162 __ mov(Operand(esp, 4 * kPointerSize), edx); | |
| 1163 | |
| 1164 __ bind(&runtime); | |
| 1165 __ TailCallRuntime(Runtime::kNewRestParam, 4, 1); | |
| 1166 } | |
| 1167 | |
| 1168 | |
| 1169 void RegExpExecStub::Generate(MacroAssembler* masm) { | 1143 void RegExpExecStub::Generate(MacroAssembler* masm) { |
| 1170 // Just jump directly to runtime if native RegExp is not selected at compile | 1144 // Just jump directly to runtime if native RegExp is not selected at compile |
| 1171 // time or if regexp entry in generated code is turned off runtime switch or | 1145 // time or if regexp entry in generated code is turned off runtime switch or |
| 1172 // at compilation. | 1146 // at compilation. |
| 1173 #ifdef V8_INTERPRETED_REGEXP | 1147 #ifdef V8_INTERPRETED_REGEXP |
| 1174 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); | 1148 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); |
| 1175 #else // V8_INTERPRETED_REGEXP | 1149 #else // V8_INTERPRETED_REGEXP |
| 1176 | 1150 |
| 1177 // Stack frame on entry. | 1151 // Stack frame on entry. |
| 1178 // esp[0]: return address | 1152 // esp[0]: return address |
| (...skipping 4357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5536 Operand(ebp, 7 * kPointerSize), NULL); | 5510 Operand(ebp, 7 * kPointerSize), NULL); |
| 5537 } | 5511 } |
| 5538 | 5512 |
| 5539 | 5513 |
| 5540 #undef __ | 5514 #undef __ |
| 5541 | 5515 |
| 5542 } // namespace internal | 5516 } // namespace internal |
| 5543 } // namespace v8 | 5517 } // namespace v8 |
| 5544 | 5518 |
| 5545 #endif // V8_TARGET_ARCH_IA32 | 5519 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |