OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 7 #if V8_TARGET_ARCH_PPC |
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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 #ifdef DEBUG | 116 #ifdef DEBUG |
117 if (strlen(FLAG_stop_at) > 0 && | 117 if (strlen(FLAG_stop_at) > 0 && |
118 info->function()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) { | 118 info->function()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) { |
119 __ stop("stop-at"); | 119 __ stop("stop-at"); |
120 } | 120 } |
121 #endif | 121 #endif |
122 | 122 |
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 (is_sloppy(info->language_mode()) && !info->is_native()) { | 126 if (is_sloppy(info->language_mode()) && !info->is_native() && |
| 127 info->MayUseThis()) { |
127 Label ok; | 128 Label ok; |
128 int receiver_offset = info->scope()->num_parameters() * kPointerSize; | 129 int receiver_offset = info->scope()->num_parameters() * kPointerSize; |
129 __ LoadP(r5, MemOperand(sp, receiver_offset), r0); | 130 __ LoadP(r5, MemOperand(sp, receiver_offset), r0); |
130 __ CompareRoot(r5, Heap::kUndefinedValueRootIndex); | 131 __ CompareRoot(r5, Heap::kUndefinedValueRootIndex); |
131 __ bne(&ok); | 132 __ bne(&ok); |
132 | 133 |
133 __ LoadP(r5, GlobalObjectOperand()); | 134 __ LoadP(r5, GlobalObjectOperand()); |
134 __ LoadP(r5, FieldMemOperand(r5, GlobalObject::kGlobalProxyOffset)); | 135 __ LoadP(r5, FieldMemOperand(r5, GlobalObject::kGlobalProxyOffset)); |
135 | 136 |
136 __ StoreP(r5, MemOperand(sp, receiver_offset), r0); | 137 __ StoreP(r5, MemOperand(sp, receiver_offset), r0); |
(...skipping 5311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5448 return ON_STACK_REPLACEMENT; | 5449 return ON_STACK_REPLACEMENT; |
5449 } | 5450 } |
5450 | 5451 |
5451 DCHECK(interrupt_address == | 5452 DCHECK(interrupt_address == |
5452 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5453 isolate->builtins()->OsrAfterStackCheck()->entry()); |
5453 return OSR_AFTER_STACK_CHECK; | 5454 return OSR_AFTER_STACK_CHECK; |
5454 } | 5455 } |
5455 } | 5456 } |
5456 } // namespace v8::internal | 5457 } // namespace v8::internal |
5457 #endif // V8_TARGET_ARCH_PPC | 5458 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |