| 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_ARM | 5 #if V8_TARGET_ARCH_ARM |
| 6 | 6 |
| 7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
| 8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 765 Split(eq, if_true, if_false, NULL); | 765 Split(eq, if_true, if_false, NULL); |
| 766 __ bind(&skip); | 766 __ bind(&skip); |
| 767 } | 767 } |
| 768 } | 768 } |
| 769 | 769 |
| 770 | 770 |
| 771 void FullCodeGenerator::EmitDebugCheckDeclarationContext(Variable* variable) { | 771 void FullCodeGenerator::EmitDebugCheckDeclarationContext(Variable* variable) { |
| 772 // The variable in the declaration always resides in the current function | 772 // The variable in the declaration always resides in the current function |
| 773 // context. | 773 // context. |
| 774 DCHECK_EQ(0, scope()->ContextChainLength(variable->scope())); | 774 DCHECK_EQ(0, scope()->ContextChainLength(variable->scope())); |
| 775 if (generate_debug_code_) { | 775 if (FLAG_debug_code) { |
| 776 // Check that we're not inside a with or catch context. | 776 // Check that we're not inside a with or catch context. |
| 777 __ ldr(r1, FieldMemOperand(cp, HeapObject::kMapOffset)); | 777 __ ldr(r1, FieldMemOperand(cp, HeapObject::kMapOffset)); |
| 778 __ CompareRoot(r1, Heap::kWithContextMapRootIndex); | 778 __ CompareRoot(r1, Heap::kWithContextMapRootIndex); |
| 779 __ Check(ne, kDeclarationInWithContext); | 779 __ Check(ne, kDeclarationInWithContext); |
| 780 __ CompareRoot(r1, Heap::kCatchContextMapRootIndex); | 780 __ CompareRoot(r1, Heap::kCatchContextMapRootIndex); |
| 781 __ Check(ne, kDeclarationInCatchContext); | 781 __ Check(ne, kDeclarationInCatchContext); |
| 782 } | 782 } |
| 783 } | 783 } |
| 784 | 784 |
| 785 | 785 |
| (...skipping 1665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2451 __ Push(var->name()); | 2451 __ Push(var->name()); |
| 2452 __ Push(r0); | 2452 __ Push(r0); |
| 2453 __ CallRuntime(is_strict(language_mode()) | 2453 __ CallRuntime(is_strict(language_mode()) |
| 2454 ? Runtime::kStoreLookupSlot_Strict | 2454 ? Runtime::kStoreLookupSlot_Strict |
| 2455 : Runtime::kStoreLookupSlot_Sloppy); | 2455 : Runtime::kStoreLookupSlot_Sloppy); |
| 2456 } else { | 2456 } else { |
| 2457 // Assignment to var or initializing assignment to let/const in harmony | 2457 // Assignment to var or initializing assignment to let/const in harmony |
| 2458 // mode. | 2458 // mode. |
| 2459 DCHECK((var->IsStackAllocated() || var->IsContextSlot())); | 2459 DCHECK((var->IsStackAllocated() || var->IsContextSlot())); |
| 2460 MemOperand location = VarOperand(var, r1); | 2460 MemOperand location = VarOperand(var, r1); |
| 2461 if (generate_debug_code_ && var->mode() == LET && op == Token::INIT) { | 2461 if (FLAG_debug_code && var->mode() == LET && op == Token::INIT) { |
| 2462 // Check for an uninitialized let binding. | 2462 // Check for an uninitialized let binding. |
| 2463 __ ldr(r2, location); | 2463 __ ldr(r2, location); |
| 2464 __ CompareRoot(r2, Heap::kTheHoleValueRootIndex); | 2464 __ CompareRoot(r2, Heap::kTheHoleValueRootIndex); |
| 2465 __ Check(eq, kLetBindingReInitialization); | 2465 __ Check(eq, kLetBindingReInitialization); |
| 2466 } | 2466 } |
| 2467 EmitStoreToStackLocalOrContextSlot(var, location); | 2467 EmitStoreToStackLocalOrContextSlot(var, location); |
| 2468 } | 2468 } |
| 2469 | 2469 |
| 2470 } else if (var->mode() == CONST_LEGACY && op == Token::INIT) { | 2470 } else if (var->mode() == CONST_LEGACY && op == Token::INIT) { |
| 2471 // Const initializers need a write barrier. | 2471 // Const initializers need a write barrier. |
| (...skipping 1857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4329 DCHECK(interrupt_address == | 4329 DCHECK(interrupt_address == |
| 4330 isolate->builtins()->OsrAfterStackCheck()->entry()); | 4330 isolate->builtins()->OsrAfterStackCheck()->entry()); |
| 4331 return OSR_AFTER_STACK_CHECK; | 4331 return OSR_AFTER_STACK_CHECK; |
| 4332 } | 4332 } |
| 4333 | 4333 |
| 4334 | 4334 |
| 4335 } // namespace internal | 4335 } // namespace internal |
| 4336 } // namespace v8 | 4336 } // namespace v8 |
| 4337 | 4337 |
| 4338 #endif // V8_TARGET_ARCH_ARM | 4338 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |