| 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 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 758 Split(eq, a0, Operand(a4), if_true, if_false, NULL); | 758 Split(eq, a0, Operand(a4), if_true, if_false, NULL); |
| 759 __ bind(&skip); | 759 __ bind(&skip); |
| 760 } | 760 } |
| 761 } | 761 } |
| 762 | 762 |
| 763 | 763 |
| 764 void FullCodeGenerator::EmitDebugCheckDeclarationContext(Variable* variable) { | 764 void FullCodeGenerator::EmitDebugCheckDeclarationContext(Variable* variable) { |
| 765 // The variable in the declaration always resides in the current function | 765 // The variable in the declaration always resides in the current function |
| 766 // context. | 766 // context. |
| 767 DCHECK_EQ(0, scope()->ContextChainLength(variable->scope())); | 767 DCHECK_EQ(0, scope()->ContextChainLength(variable->scope())); |
| 768 if (generate_debug_code_) { | 768 if (FLAG_debug_code) { |
| 769 // Check that we're not inside a with or catch context. | 769 // Check that we're not inside a with or catch context. |
| 770 __ ld(a1, FieldMemOperand(cp, HeapObject::kMapOffset)); | 770 __ ld(a1, FieldMemOperand(cp, HeapObject::kMapOffset)); |
| 771 __ LoadRoot(a4, Heap::kWithContextMapRootIndex); | 771 __ LoadRoot(a4, Heap::kWithContextMapRootIndex); |
| 772 __ Check(ne, kDeclarationInWithContext, | 772 __ Check(ne, kDeclarationInWithContext, |
| 773 a1, Operand(a4)); | 773 a1, Operand(a4)); |
| 774 __ LoadRoot(a4, Heap::kCatchContextMapRootIndex); | 774 __ LoadRoot(a4, Heap::kCatchContextMapRootIndex); |
| 775 __ Check(ne, kDeclarationInCatchContext, | 775 __ Check(ne, kDeclarationInCatchContext, |
| 776 a1, Operand(a4)); | 776 a1, Operand(a4)); |
| 777 } | 777 } |
| 778 } | 778 } |
| (...skipping 1665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2444 __ Push(var->name()); | 2444 __ Push(var->name()); |
| 2445 __ Push(v0); | 2445 __ Push(v0); |
| 2446 __ CallRuntime(is_strict(language_mode()) | 2446 __ CallRuntime(is_strict(language_mode()) |
| 2447 ? Runtime::kStoreLookupSlot_Strict | 2447 ? Runtime::kStoreLookupSlot_Strict |
| 2448 : Runtime::kStoreLookupSlot_Sloppy); | 2448 : Runtime::kStoreLookupSlot_Sloppy); |
| 2449 } else { | 2449 } else { |
| 2450 // Assignment to var or initializing assignment to let/const in harmony | 2450 // Assignment to var or initializing assignment to let/const in harmony |
| 2451 // mode. | 2451 // mode. |
| 2452 DCHECK((var->IsStackAllocated() || var->IsContextSlot())); | 2452 DCHECK((var->IsStackAllocated() || var->IsContextSlot())); |
| 2453 MemOperand location = VarOperand(var, a1); | 2453 MemOperand location = VarOperand(var, a1); |
| 2454 if (generate_debug_code_ && var->mode() == LET && op == Token::INIT) { | 2454 if (FLAG_debug_code && var->mode() == LET && op == Token::INIT) { |
| 2455 // Check for an uninitialized let binding. | 2455 // Check for an uninitialized let binding. |
| 2456 __ ld(a2, location); | 2456 __ ld(a2, location); |
| 2457 __ LoadRoot(a4, Heap::kTheHoleValueRootIndex); | 2457 __ LoadRoot(a4, Heap::kTheHoleValueRootIndex); |
| 2458 __ Check(eq, kLetBindingReInitialization, a2, Operand(a4)); | 2458 __ Check(eq, kLetBindingReInitialization, a2, Operand(a4)); |
| 2459 } | 2459 } |
| 2460 EmitStoreToStackLocalOrContextSlot(var, location); | 2460 EmitStoreToStackLocalOrContextSlot(var, location); |
| 2461 } | 2461 } |
| 2462 | 2462 |
| 2463 } else if (var->mode() == CONST_LEGACY && op == Token::INIT) { | 2463 } else if (var->mode() == CONST_LEGACY && op == Token::INIT) { |
| 2464 // Const initializers need a write barrier. | 2464 // Const initializers need a write barrier. |
| (...skipping 1816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4281 reinterpret_cast<uint64_t>( | 4281 reinterpret_cast<uint64_t>( |
| 4282 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4282 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 4283 return OSR_AFTER_STACK_CHECK; | 4283 return OSR_AFTER_STACK_CHECK; |
| 4284 } | 4284 } |
| 4285 | 4285 |
| 4286 | 4286 |
| 4287 } // namespace internal | 4287 } // namespace internal |
| 4288 } // namespace v8 | 4288 } // namespace v8 |
| 4289 | 4289 |
| 4290 #endif // V8_TARGET_ARCH_MIPS64 | 4290 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |