| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
| 6 | 6 |
| 7 // Note on Mips implementation: | 7 // Note on Mips implementation: |
| 8 // | 8 // |
| 9 // The result_register() for mips is the 'v0' register, which is defined | 9 // The result_register() for mips is the 'v0' register, which is defined |
| 10 // by the ABI to contain function return values. However, the first | 10 // by the ABI to contain function return values. However, the first |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 #ifdef DEBUG | 121 #ifdef DEBUG |
| 122 if (strlen(FLAG_stop_at) > 0 && | 122 if (strlen(FLAG_stop_at) > 0 && |
| 123 info->literal()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) { | 123 info->literal()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) { |
| 124 __ stop("stop-at"); | 124 __ stop("stop-at"); |
| 125 } | 125 } |
| 126 #endif | 126 #endif |
| 127 | 127 |
| 128 // Sloppy mode functions and builtins need to replace the receiver with the | 128 // Sloppy mode functions and builtins need to replace the receiver with the |
| 129 // global proxy when called as functions (without an explicit receiver | 129 // global proxy when called as functions (without an explicit receiver |
| 130 // object). | 130 // object). |
| 131 if (is_sloppy(info->language_mode()) && !info->is_native() && | 131 if (info->MustReplaceUndefinedReceiverWithGlobalProxy()) { |
| 132 info->MayUseThis() && info->scope()->has_this_declaration()) { | |
| 133 Label ok; | 132 Label ok; |
| 134 int receiver_offset = info->scope()->num_parameters() * kPointerSize; | 133 int receiver_offset = info->scope()->num_parameters() * kPointerSize; |
| 135 __ lw(at, MemOperand(sp, receiver_offset)); | 134 __ lw(at, MemOperand(sp, receiver_offset)); |
| 136 __ LoadRoot(a2, Heap::kUndefinedValueRootIndex); | 135 __ LoadRoot(a2, Heap::kUndefinedValueRootIndex); |
| 137 __ Branch(&ok, ne, a2, Operand(at)); | 136 __ Branch(&ok, ne, a2, Operand(at)); |
| 138 | 137 |
| 139 __ lw(a2, GlobalObjectOperand()); | 138 __ lw(a2, GlobalObjectOperand()); |
| 140 __ lw(a2, FieldMemOperand(a2, GlobalObject::kGlobalProxyOffset)); | 139 __ lw(a2, FieldMemOperand(a2, GlobalObject::kGlobalProxyOffset)); |
| 141 | 140 |
| 142 __ sw(a2, MemOperand(sp, receiver_offset)); | 141 __ sw(a2, MemOperand(sp, receiver_offset)); |
| (...skipping 5201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5344 reinterpret_cast<uint32_t>( | 5343 reinterpret_cast<uint32_t>( |
| 5345 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5344 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 5346 return OSR_AFTER_STACK_CHECK; | 5345 return OSR_AFTER_STACK_CHECK; |
| 5347 } | 5346 } |
| 5348 | 5347 |
| 5349 | 5348 |
| 5350 } // namespace internal | 5349 } // namespace internal |
| 5351 } // namespace v8 | 5350 } // namespace v8 |
| 5352 | 5351 |
| 5353 #endif // V8_TARGET_ARCH_MIPS | 5352 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |