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 1269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1280 context()->Plug(v0); | 1280 context()->Plug(v0); |
1281 break; | 1281 break; |
1282 } | 1282 } |
1283 | 1283 |
1284 case VariableLocation::PARAMETER: | 1284 case VariableLocation::PARAMETER: |
1285 case VariableLocation::LOCAL: | 1285 case VariableLocation::LOCAL: |
1286 case VariableLocation::CONTEXT: { | 1286 case VariableLocation::CONTEXT: { |
1287 DCHECK_EQ(NOT_INSIDE_TYPEOF, typeof_mode); | 1287 DCHECK_EQ(NOT_INSIDE_TYPEOF, typeof_mode); |
1288 Comment cmnt(masm_, var->IsContextSlot() ? "[ Context variable" | 1288 Comment cmnt(masm_, var->IsContextSlot() ? "[ Context variable" |
1289 : "[ Stack variable"); | 1289 : "[ Stack variable"); |
1290 if (NeedsHoleCheckForLoad(proxy)) { | 1290 if (proxy->needs_hole_check()) { |
1291 // Throw a reference error when using an uninitialized let/const | 1291 // Throw a reference error when using an uninitialized let/const |
1292 // binding in harmony mode. | 1292 // binding in harmony mode. |
1293 Label done; | 1293 Label done; |
1294 GetVar(v0, var); | 1294 GetVar(v0, var); |
1295 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); | 1295 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); |
1296 __ subu(at, v0, at); // Sub as compare: at == 0 on eq. | 1296 __ subu(at, v0, at); // Sub as compare: at == 0 on eq. |
1297 __ Branch(&done, ne, at, Operand(zero_reg)); | 1297 __ Branch(&done, ne, at, Operand(zero_reg)); |
1298 __ li(a0, Operand(var->name())); | 1298 __ li(a0, Operand(var->name())); |
1299 __ push(a0); | 1299 __ push(a0); |
1300 __ CallRuntime(Runtime::kThrowReferenceError); | 1300 __ CallRuntime(Runtime::kThrowReferenceError); |
(...skipping 2369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3670 reinterpret_cast<uint32_t>( | 3670 reinterpret_cast<uint32_t>( |
3671 isolate->builtins()->OnStackReplacement()->entry())); | 3671 isolate->builtins()->OnStackReplacement()->entry())); |
3672 return ON_STACK_REPLACEMENT; | 3672 return ON_STACK_REPLACEMENT; |
3673 } | 3673 } |
3674 | 3674 |
3675 | 3675 |
3676 } // namespace internal | 3676 } // namespace internal |
3677 } // namespace v8 | 3677 } // namespace v8 |
3678 | 3678 |
3679 #endif // V8_TARGET_ARCH_MIPS | 3679 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |