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_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
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 __ ld(at, MemOperand(sp, receiver_offset)); | 134 __ ld(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 __ ld(a2, GlobalObjectOperand()); | 138 __ ld(a2, GlobalObjectOperand()); |
140 __ ld(a2, FieldMemOperand(a2, GlobalObject::kGlobalProxyOffset)); | 139 __ ld(a2, FieldMemOperand(a2, GlobalObject::kGlobalProxyOffset)); |
141 | 140 |
142 __ sd(a2, MemOperand(sp, receiver_offset)); | 141 __ sd(a2, MemOperand(sp, receiver_offset)); |
(...skipping 5207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5350 reinterpret_cast<uint64_t>( | 5349 reinterpret_cast<uint64_t>( |
5351 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5350 isolate->builtins()->OsrAfterStackCheck()->entry())); |
5352 return OSR_AFTER_STACK_CHECK; | 5351 return OSR_AFTER_STACK_CHECK; |
5353 } | 5352 } |
5354 | 5353 |
5355 | 5354 |
5356 } // namespace internal | 5355 } // namespace internal |
5357 } // namespace v8 | 5356 } // namespace v8 |
5358 | 5357 |
5359 #endif // V8_TARGET_ARCH_MIPS64 | 5358 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |