| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_ARM | 7 #if V8_TARGET_ARCH_ARM |
| 8 | 8 |
| 9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 MemOperand(r2, ConstructFrameConstants::kOriginalConstructorOffset)); | 267 MemOperand(r2, ConstructFrameConstants::kOriginalConstructorOffset)); |
| 268 __ b(&done); | 268 __ b(&done); |
| 269 | 269 |
| 270 __ bind(&non_construct_frame); | 270 __ bind(&non_construct_frame); |
| 271 __ LoadRoot(r0, Heap::kUndefinedValueRootIndex); | 271 __ LoadRoot(r0, Heap::kUndefinedValueRootIndex); |
| 272 __ bind(&done); | 272 __ bind(&done); |
| 273 | 273 |
| 274 SetVar(new_target_var, r0, r2, r3); | 274 SetVar(new_target_var, r0, r2, r3); |
| 275 } | 275 } |
| 276 | 276 |
| 277 // Possibly allocate RestParameters | |
| 278 int rest_index; | |
| 279 Variable* rest_param = scope()->rest_parameter(&rest_index); | |
| 280 if (rest_param) { | |
| 281 Comment cmnt(masm_, "[ Allocate rest parameter array"); | |
| 282 | |
| 283 int num_parameters = info->scope()->num_parameters(); | |
| 284 int offset = num_parameters * kPointerSize; | |
| 285 | |
| 286 __ add(r3, fp, Operand(StandardFrameConstants::kCallerSPOffset + offset)); | |
| 287 __ mov(r2, Operand(Smi::FromInt(num_parameters))); | |
| 288 __ mov(r1, Operand(Smi::FromInt(rest_index))); | |
| 289 __ mov(r0, Operand(Smi::FromInt(language_mode()))); | |
| 290 __ Push(r3, r2, r1, r0); | |
| 291 | |
| 292 RestParamAccessStub stub(isolate()); | |
| 293 __ CallStub(&stub); | |
| 294 | |
| 295 SetVar(rest_param, r0, r1, r2); | |
| 296 } | |
| 297 | 277 |
| 298 Variable* arguments = scope()->arguments(); | 278 Variable* arguments = scope()->arguments(); |
| 299 if (arguments != NULL) { | 279 if (arguments != NULL) { |
| 300 // Function uses arguments object. | 280 // Function uses arguments object. |
| 301 Comment cmnt(masm_, "[ Allocate arguments object"); | 281 Comment cmnt(masm_, "[ Allocate arguments object"); |
| 302 if (!function_in_register) { | 282 if (!function_in_register) { |
| 303 // Load this again, if it's used by the local context below. | 283 // Load this again, if it's used by the local context below. |
| 304 __ ldr(r3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 284 __ ldr(r3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
| 305 } else { | 285 } else { |
| 306 __ mov(r3, r1); | 286 __ mov(r3, r1); |
| (...skipping 5281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5588 DCHECK(interrupt_address == | 5568 DCHECK(interrupt_address == |
| 5589 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5569 isolate->builtins()->OsrAfterStackCheck()->entry()); |
| 5590 return OSR_AFTER_STACK_CHECK; | 5570 return OSR_AFTER_STACK_CHECK; |
| 5591 } | 5571 } |
| 5592 | 5572 |
| 5593 | 5573 |
| 5594 } // namespace internal | 5574 } // namespace internal |
| 5595 } // namespace v8 | 5575 } // namespace v8 |
| 5596 | 5576 |
| 5597 #endif // V8_TARGET_ARCH_ARM | 5577 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |