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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_MIPS | 7 #if V8_TARGET_ARCH_MIPS |
8 | 8 |
9 // Note on Mips implementation: | 9 // Note on Mips implementation: |
10 // | 10 // |
(...skipping 2478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2489 __ Branch(&assign, ne, a3, Operand(t0)); | 2489 __ Branch(&assign, ne, a3, Operand(t0)); |
2490 __ li(a3, Operand(var->name())); | 2490 __ li(a3, Operand(var->name())); |
2491 __ push(a3); | 2491 __ push(a3); |
2492 __ CallRuntime(Runtime::kThrowReferenceError, 1); | 2492 __ CallRuntime(Runtime::kThrowReferenceError, 1); |
2493 // Perform the assignment. | 2493 // Perform the assignment. |
2494 __ bind(&assign); | 2494 __ bind(&assign); |
2495 EmitStoreToStackLocalOrContextSlot(var, location); | 2495 EmitStoreToStackLocalOrContextSlot(var, location); |
2496 | 2496 |
2497 } else if (!var->is_const_mode() || op == Token::INIT_CONST) { | 2497 } else if (!var->is_const_mode() || op == Token::INIT_CONST) { |
2498 if (var->IsLookupSlot()) { | 2498 if (var->IsLookupSlot()) { |
2499 ASSERT(op == Token::ASSIGN || op == Token::INIT_VAR || | |
2500 op == Token::ASSIGN_ADD); | |
2501 // Assignment to var. | 2499 // Assignment to var. |
2502 __ li(a1, Operand(var->name())); | 2500 __ li(a1, Operand(var->name())); |
2503 __ li(a0, Operand(Smi::FromInt(strict_mode()))); | 2501 __ li(a0, Operand(Smi::FromInt(strict_mode()))); |
2504 __ Push(v0, cp, a1, a0); // Value, context, name, strict mode. | 2502 __ Push(v0, cp, a1, a0); // Value, context, name, strict mode. |
2505 __ CallRuntime(Runtime::kStoreLookupSlot, 4); | 2503 __ CallRuntime(Runtime::kStoreLookupSlot, 4); |
2506 } else { | 2504 } else { |
2507 // Assignment to var or initializing assignment to let/const in harmony | 2505 // Assignment to var or initializing assignment to let/const in harmony |
2508 // mode. | 2506 // mode. |
2509 ASSERT((var->IsStackAllocated() || var->IsContextSlot())); | 2507 ASSERT((var->IsStackAllocated() || var->IsContextSlot())); |
2510 MemOperand location = VarOperand(var, a1); | 2508 MemOperand location = VarOperand(var, a1); |
(...skipping 2345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4856 Assembler::target_address_at(pc_immediate_load_address)) == | 4854 Assembler::target_address_at(pc_immediate_load_address)) == |
4857 reinterpret_cast<uint32_t>( | 4855 reinterpret_cast<uint32_t>( |
4858 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4856 isolate->builtins()->OsrAfterStackCheck()->entry())); |
4859 return OSR_AFTER_STACK_CHECK; | 4857 return OSR_AFTER_STACK_CHECK; |
4860 } | 4858 } |
4861 | 4859 |
4862 | 4860 |
4863 } } // namespace v8::internal | 4861 } } // namespace v8::internal |
4864 | 4862 |
4865 #endif // V8_TARGET_ARCH_MIPS | 4863 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |