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-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 // Sloppy mode functions and builtins need to replace the receiver with the | 123 // Sloppy mode functions and builtins need to replace the receiver with the |
124 // global proxy when called as functions (without an explicit receiver | 124 // global proxy when called as functions (without an explicit receiver |
125 // object). | 125 // object). |
126 if (info->strict_mode() == SLOPPY && !info->is_native()) { | 126 if (info->strict_mode() == SLOPPY && !info->is_native()) { |
127 Label ok; | 127 Label ok; |
128 int receiver_offset = info->scope()->num_parameters() * kXRegSize; | 128 int receiver_offset = info->scope()->num_parameters() * kXRegSize; |
129 __ Peek(x10, receiver_offset); | 129 __ Peek(x10, receiver_offset); |
130 __ JumpIfNotRoot(x10, Heap::kUndefinedValueRootIndex, &ok); | 130 __ JumpIfNotRoot(x10, Heap::kUndefinedValueRootIndex, &ok); |
131 | 131 |
132 __ Ldr(x10, GlobalObjectMemOperand()); | 132 __ Ldr(x10, GlobalObjectMemOperand()); |
133 __ Ldr(x10, FieldMemOperand(x10, GlobalObject::kGlobalReceiverOffset)); | 133 __ Ldr(x10, FieldMemOperand(x10, GlobalObject::kGlobalProxyOffset)); |
134 __ Poke(x10, receiver_offset); | 134 __ Poke(x10, receiver_offset); |
135 | 135 |
136 __ Bind(&ok); | 136 __ Bind(&ok); |
137 } | 137 } |
138 | 138 |
139 | 139 |
140 // Open a frame scope to indicate that there is a frame on the stack. | 140 // Open a frame scope to indicate that there is a frame on the stack. |
141 // The MANUAL indicates that the scope shouldn't actually generate code | 141 // The MANUAL indicates that the scope shouldn't actually generate code |
142 // to set up the frame because we do it manually below. | 142 // to set up the frame because we do it manually below. |
143 FrameScope frame_scope(masm_, StackFrame::MANUAL); | 143 FrameScope frame_scope(masm_, StackFrame::MANUAL); |
(...skipping 4755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4899 return previous_; | 4899 return previous_; |
4900 } | 4900 } |
4901 | 4901 |
4902 | 4902 |
4903 #undef __ | 4903 #undef __ |
4904 | 4904 |
4905 | 4905 |
4906 } } // namespace v8::internal | 4906 } } // namespace v8::internal |
4907 | 4907 |
4908 #endif // V8_TARGET_ARCH_ARM64 | 4908 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |