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 #include "src/arm64/lithium-codegen-arm64.h" | 7 #include "src/arm64/lithium-codegen-arm64.h" |
8 #include "src/arm64/lithium-gap-resolver-arm64.h" | 8 #include "src/arm64/lithium-gap-resolver-arm64.h" |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
675 } | 675 } |
676 RecordSafepoint(Safepoint::kNoLazyDeopt); | 676 RecordSafepoint(Safepoint::kNoLazyDeopt); |
677 // Context is returned in x0. It replaces the context passed to us. It's | 677 // Context is returned in x0. It replaces the context passed to us. It's |
678 // saved in the stack and kept live in cp. | 678 // saved in the stack and kept live in cp. |
679 __ Mov(cp, x0); | 679 __ Mov(cp, x0); |
680 __ Str(x0, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 680 __ Str(x0, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
681 // Copy any necessary parameters into the context. | 681 // Copy any necessary parameters into the context. |
682 int num_parameters = scope()->num_parameters(); | 682 int num_parameters = scope()->num_parameters(); |
683 int first_parameter = scope()->has_this_declaration() ? -1 : 0; | 683 int first_parameter = scope()->has_this_declaration() ? -1 : 0; |
684 for (int i = first_parameter; i < num_parameters; i++) { | 684 for (int i = first_parameter; i < num_parameters; i++) { |
685 Variable* var = (i == -1) ? scope()->receiver() : scope()->parameter(i); | 685 Variable* var = |
| 686 (i == -1) ? scope()->receiver() : scope()->parameter_var(i); |
686 if (var->IsContextSlot()) { | 687 if (var->IsContextSlot()) { |
687 Register value = x0; | 688 Register value = x0; |
688 Register scratch = x3; | 689 Register scratch = x3; |
689 | 690 |
690 int parameter_offset = StandardFrameConstants::kCallerSPOffset + | 691 int parameter_offset = StandardFrameConstants::kCallerSPOffset + |
691 (num_parameters - 1 - i) * kPointerSize; | 692 (num_parameters - 1 - i) * kPointerSize; |
692 // Load parameter from stack. | 693 // Load parameter from stack. |
693 __ Ldr(value, MemOperand(fp, parameter_offset)); | 694 __ Ldr(value, MemOperand(fp, parameter_offset)); |
694 // Store it in the context. | 695 // Store it in the context. |
695 MemOperand target = ContextMemOperand(cp, var->index()); | 696 MemOperand target = ContextMemOperand(cp, var->index()); |
(...skipping 5351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6047 Handle<ScopeInfo> scope_info = instr->scope_info(); | 6048 Handle<ScopeInfo> scope_info = instr->scope_info(); |
6048 __ Push(scope_info); | 6049 __ Push(scope_info); |
6049 __ Push(ToRegister(instr->function())); | 6050 __ Push(ToRegister(instr->function())); |
6050 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6051 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
6051 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6052 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6052 } | 6053 } |
6053 | 6054 |
6054 | 6055 |
6055 } // namespace internal | 6056 } // namespace internal |
6056 } // namespace v8 | 6057 } // namespace v8 |
OLD | NEW |