| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
| 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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 __ B(&done); | 274 __ B(&done); |
| 275 | 275 |
| 276 __ Bind(&non_construct_frame); | 276 __ Bind(&non_construct_frame); |
| 277 __ LoadRoot(x0, Heap::kUndefinedValueRootIndex); | 277 __ LoadRoot(x0, Heap::kUndefinedValueRootIndex); |
| 278 | 278 |
| 279 __ Bind(&done); | 279 __ Bind(&done); |
| 280 | 280 |
| 281 SetVar(new_target_var, x0, x2, x3); | 281 SetVar(new_target_var, x0, x2, x3); |
| 282 } | 282 } |
| 283 | 283 |
| 284 // Possibly allocate RestParameters | |
| 285 int rest_index; | |
| 286 Variable* rest_param = scope()->rest_parameter(&rest_index); | |
| 287 if (rest_param) { | |
| 288 Comment cmnt(masm_, "[ Allocate rest parameter array"); | |
| 289 | |
| 290 int num_parameters = info->scope()->num_parameters(); | |
| 291 int offset = num_parameters * kPointerSize; | |
| 292 | |
| 293 __ Add(x3, fp, StandardFrameConstants::kCallerSPOffset + offset); | |
| 294 __ Mov(x2, Smi::FromInt(num_parameters)); | |
| 295 __ Mov(x1, Smi::FromInt(rest_index)); | |
| 296 __ Mov(x0, Smi::FromInt(language_mode())); | |
| 297 __ Push(x3, x2, x1, x0); | |
| 298 | |
| 299 RestParamAccessStub stub(isolate()); | |
| 300 __ CallStub(&stub); | |
| 301 | |
| 302 SetVar(rest_param, x0, x1, x2); | |
| 303 } | |
| 304 | 284 |
| 305 Variable* arguments = scope()->arguments(); | 285 Variable* arguments = scope()->arguments(); |
| 306 if (arguments != NULL) { | 286 if (arguments != NULL) { |
| 307 // Function uses arguments object. | 287 // Function uses arguments object. |
| 308 Comment cmnt(masm_, "[ Allocate arguments object"); | 288 Comment cmnt(masm_, "[ Allocate arguments object"); |
| 309 if (!function_in_register_x1) { | 289 if (!function_in_register_x1) { |
| 310 // Load this again, if it's used by the local context below. | 290 // Load this again, if it's used by the local context below. |
| 311 __ Ldr(x3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 291 __ Ldr(x3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
| 312 } else { | 292 } else { |
| 313 __ Mov(x3, x1); | 293 __ Mov(x3, x1); |
| (...skipping 5256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5570 } | 5550 } |
| 5571 | 5551 |
| 5572 return INTERRUPT; | 5552 return INTERRUPT; |
| 5573 } | 5553 } |
| 5574 | 5554 |
| 5575 | 5555 |
| 5576 } // namespace internal | 5556 } // namespace internal |
| 5577 } // namespace v8 | 5557 } // namespace v8 |
| 5578 | 5558 |
| 5579 #endif // V8_TARGET_ARCH_ARM64 | 5559 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |