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/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 | 256 |
257 // Possibly allocate RestParameters | 257 // Possibly allocate RestParameters |
258 int rest_index; | 258 int rest_index; |
259 Variable* rest_param = scope()->rest_parameter(&rest_index); | 259 Variable* rest_param = scope()->rest_parameter(&rest_index); |
260 if (rest_param) { | 260 if (rest_param) { |
261 Comment cmnt(masm_, "[ Allocate rest parameter array"); | 261 Comment cmnt(masm_, "[ Allocate rest parameter array"); |
262 | 262 |
263 int num_parameters = info->scope()->num_parameters(); | 263 int num_parameters = info->scope()->num_parameters(); |
264 int offset = num_parameters * kPointerSize; | 264 int offset = num_parameters * kPointerSize; |
265 | 265 |
266 __ lea(edx, Operand(ebp, StandardFrameConstants::kCallerSPOffset + offset)); | 266 __ mov(RestParamAccessDescriptor::parameter_count(), |
267 __ push(edx); | 267 Immediate(Smi::FromInt(num_parameters))); |
268 __ push(Immediate(Smi::FromInt(num_parameters))); | 268 __ lea(RestParamAccessDescriptor::parameter_pointer(), |
269 __ push(Immediate(Smi::FromInt(rest_index))); | 269 Operand(ebp, StandardFrameConstants::kCallerSPOffset + offset)); |
270 __ push(Immediate(Smi::FromInt(language_mode()))); | 270 __ mov(RestParamAccessDescriptor::rest_parameter_index(), |
| 271 Immediate(Smi::FromInt(rest_index))); |
| 272 __ mov(RestParamAccessDescriptor::language_mode(), |
| 273 Immediate(Smi::FromInt(language_mode()))); |
271 function_in_register = false; | 274 function_in_register = false; |
272 | 275 |
273 RestParamAccessStub stub(isolate()); | 276 RestParamAccessStub stub(isolate()); |
274 __ CallStub(&stub); | 277 __ CallStub(&stub); |
275 SetVar(rest_param, eax, ebx, edx); | 278 SetVar(rest_param, eax, ebx, edx); |
276 } | 279 } |
277 | 280 |
278 Variable* arguments = scope()->arguments(); | 281 Variable* arguments = scope()->arguments(); |
279 if (arguments != NULL) { | 282 if (arguments != NULL) { |
280 // Function uses arguments object. | 283 // Function uses arguments object. |
(...skipping 4498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4779 Assembler::target_address_at(call_target_address, | 4782 Assembler::target_address_at(call_target_address, |
4780 unoptimized_code)); | 4783 unoptimized_code)); |
4781 return OSR_AFTER_STACK_CHECK; | 4784 return OSR_AFTER_STACK_CHECK; |
4782 } | 4785 } |
4783 | 4786 |
4784 | 4787 |
4785 } // namespace internal | 4788 } // namespace internal |
4786 } // namespace v8 | 4789 } // namespace v8 |
4787 | 4790 |
4788 #endif // V8_TARGET_ARCH_IA32 | 4791 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |