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 #if V8_TARGET_ARCH_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 #ifdef DEBUG | 112 #ifdef DEBUG |
113 if (strlen(FLAG_stop_at) > 0 && | 113 if (strlen(FLAG_stop_at) > 0 && |
114 info->literal()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) { | 114 info->literal()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) { |
115 __ Debug("stop-at", __LINE__, BREAK); | 115 __ Debug("stop-at", __LINE__, BREAK); |
116 } | 116 } |
117 #endif | 117 #endif |
118 | 118 |
119 // Sloppy mode functions and builtins need to replace the receiver with the | 119 // Sloppy mode functions and builtins need to replace the receiver with the |
120 // global proxy when called as functions (without an explicit receiver | 120 // global proxy when called as functions (without an explicit receiver |
121 // object). | 121 // object). |
122 if (is_sloppy(info->language_mode()) && !info->is_native() && | 122 if (info->MustReplaceUndefinedReceiverWithGlobalProxy()) { |
123 info->MayUseThis() && info->scope()->has_this_declaration()) { | |
124 Label ok; | 123 Label ok; |
125 int receiver_offset = info->scope()->num_parameters() * kXRegSize; | 124 int receiver_offset = info->scope()->num_parameters() * kXRegSize; |
126 __ Peek(x10, receiver_offset); | 125 __ Peek(x10, receiver_offset); |
127 __ JumpIfNotRoot(x10, Heap::kUndefinedValueRootIndex, &ok); | 126 __ JumpIfNotRoot(x10, Heap::kUndefinedValueRootIndex, &ok); |
128 | 127 |
129 __ Ldr(x10, GlobalObjectMemOperand()); | 128 __ Ldr(x10, GlobalObjectMemOperand()); |
130 __ Ldr(x10, FieldMemOperand(x10, GlobalObject::kGlobalProxyOffset)); | 129 __ Ldr(x10, FieldMemOperand(x10, GlobalObject::kGlobalProxyOffset)); |
131 __ Poke(x10, receiver_offset); | 130 __ Poke(x10, receiver_offset); |
132 | 131 |
133 __ Bind(&ok); | 132 __ Bind(&ok); |
(...skipping 5233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5367 } | 5366 } |
5368 | 5367 |
5369 return INTERRUPT; | 5368 return INTERRUPT; |
5370 } | 5369 } |
5371 | 5370 |
5372 | 5371 |
5373 } // namespace internal | 5372 } // namespace internal |
5374 } // namespace v8 | 5373 } // namespace v8 |
5375 | 5374 |
5376 #endif // V8_TARGET_ARCH_ARM64 | 5375 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |