| 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 #if V8_TARGET_ARCH_PPC | 5 #if V8_TARGET_ARCH_PPC |
| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 #ifdef DEBUG | 110 #ifdef DEBUG |
| 111 if (strlen(FLAG_stop_at) > 0 && | 111 if (strlen(FLAG_stop_at) > 0 && |
| 112 info->literal()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) { | 112 info->literal()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) { |
| 113 __ stop("stop-at"); | 113 __ stop("stop-at"); |
| 114 } | 114 } |
| 115 #endif | 115 #endif |
| 116 | 116 |
| 117 // Sloppy mode functions and builtins need to replace the receiver with the | 117 // Sloppy mode functions and builtins need to replace the receiver with the |
| 118 // global proxy when called as functions (without an explicit receiver | 118 // global proxy when called as functions (without an explicit receiver |
| 119 // object). | 119 // object). |
| 120 if (is_sloppy(info->language_mode()) && !info->is_native() && | 120 if (info->MustReplaceUndefinedReceiverWithGlobalProxy()) { |
| 121 info->MayUseThis() && info->scope()->has_this_declaration()) { | |
| 122 Label ok; | 121 Label ok; |
| 123 int receiver_offset = info->scope()->num_parameters() * kPointerSize; | 122 int receiver_offset = info->scope()->num_parameters() * kPointerSize; |
| 124 __ LoadP(r5, MemOperand(sp, receiver_offset), r0); | 123 __ LoadP(r5, MemOperand(sp, receiver_offset), r0); |
| 125 __ CompareRoot(r5, Heap::kUndefinedValueRootIndex); | 124 __ CompareRoot(r5, Heap::kUndefinedValueRootIndex); |
| 126 __ bne(&ok); | 125 __ bne(&ok); |
| 127 | 126 |
| 128 __ LoadP(r5, GlobalObjectOperand()); | 127 __ LoadP(r5, GlobalObjectOperand()); |
| 129 __ LoadP(r5, FieldMemOperand(r5, GlobalObject::kGlobalProxyOffset)); | 128 __ LoadP(r5, FieldMemOperand(r5, GlobalObject::kGlobalProxyOffset)); |
| 130 | 129 |
| 131 __ StoreP(r5, MemOperand(sp, receiver_offset), r0); | 130 __ StoreP(r5, MemOperand(sp, receiver_offset), r0); |
| (...skipping 5192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5324 return ON_STACK_REPLACEMENT; | 5323 return ON_STACK_REPLACEMENT; |
| 5325 } | 5324 } |
| 5326 | 5325 |
| 5327 DCHECK(interrupt_address == | 5326 DCHECK(interrupt_address == |
| 5328 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5327 isolate->builtins()->OsrAfterStackCheck()->entry()); |
| 5329 return OSR_AFTER_STACK_CHECK; | 5328 return OSR_AFTER_STACK_CHECK; |
| 5330 } | 5329 } |
| 5331 } // namespace internal | 5330 } // namespace internal |
| 5332 } // namespace v8 | 5331 } // namespace v8 |
| 5333 #endif // V8_TARGET_ARCH_PPC | 5332 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |