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/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/debug/debug.h" | 10 #include "src/debug/debug.h" |
(...skipping 1221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1232 | 1232 |
1233 | 1233 |
1234 void FullCodeGenerator::EmitSetHomeObject(Expression* initializer, int offset, | 1234 void FullCodeGenerator::EmitSetHomeObject(Expression* initializer, int offset, |
1235 FeedbackVectorSlot slot) { | 1235 FeedbackVectorSlot slot) { |
1236 DCHECK(NeedsHomeObject(initializer)); | 1236 DCHECK(NeedsHomeObject(initializer)); |
1237 __ ldr(StoreDescriptor::ReceiverRegister(), MemOperand(sp)); | 1237 __ ldr(StoreDescriptor::ReceiverRegister(), MemOperand(sp)); |
1238 __ mov(StoreDescriptor::NameRegister(), | 1238 __ mov(StoreDescriptor::NameRegister(), |
1239 Operand(isolate()->factory()->home_object_symbol())); | 1239 Operand(isolate()->factory()->home_object_symbol())); |
1240 __ ldr(StoreDescriptor::ValueRegister(), | 1240 __ ldr(StoreDescriptor::ValueRegister(), |
1241 MemOperand(sp, offset * kPointerSize)); | 1241 MemOperand(sp, offset * kPointerSize)); |
1242 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot); | 1242 EmitLoadStoreICSlot(slot); |
1243 CallStoreIC(); | 1243 CallStoreIC(); |
1244 } | 1244 } |
1245 | 1245 |
1246 | 1246 |
1247 void FullCodeGenerator::EmitSetHomeObjectAccumulator(Expression* initializer, | 1247 void FullCodeGenerator::EmitSetHomeObjectAccumulator(Expression* initializer, |
1248 int offset, | 1248 int offset, |
1249 FeedbackVectorSlot slot) { | 1249 FeedbackVectorSlot slot) { |
1250 DCHECK(NeedsHomeObject(initializer)); | 1250 DCHECK(NeedsHomeObject(initializer)); |
1251 __ Move(StoreDescriptor::ReceiverRegister(), r0); | 1251 __ Move(StoreDescriptor::ReceiverRegister(), r0); |
1252 __ mov(StoreDescriptor::NameRegister(), | 1252 __ mov(StoreDescriptor::NameRegister(), |
1253 Operand(isolate()->factory()->home_object_symbol())); | 1253 Operand(isolate()->factory()->home_object_symbol())); |
1254 __ ldr(StoreDescriptor::ValueRegister(), | 1254 __ ldr(StoreDescriptor::ValueRegister(), |
1255 MemOperand(sp, offset * kPointerSize)); | 1255 MemOperand(sp, offset * kPointerSize)); |
1256 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot); | 1256 EmitLoadStoreICSlot(slot); |
1257 CallStoreIC(); | 1257 CallStoreIC(); |
1258 } | 1258 } |
1259 | 1259 |
1260 | 1260 |
1261 void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy, | 1261 void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy, |
1262 TypeofMode typeof_mode, | 1262 TypeofMode typeof_mode, |
1263 Label* slow) { | 1263 Label* slow) { |
1264 Register current = cp; | 1264 Register current = cp; |
1265 Register next = r1; | 1265 Register next = r1; |
1266 Register temp = r2; | 1266 Register temp = r2; |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1569 // Fall through. | 1569 // Fall through. |
1570 case ObjectLiteral::Property::COMPUTED: | 1570 case ObjectLiteral::Property::COMPUTED: |
1571 // It is safe to use [[Put]] here because the boilerplate already | 1571 // It is safe to use [[Put]] here because the boilerplate already |
1572 // contains computed properties with an uninitialized value. | 1572 // contains computed properties with an uninitialized value. |
1573 if (key->value()->IsInternalizedString()) { | 1573 if (key->value()->IsInternalizedString()) { |
1574 if (property->emit_store()) { | 1574 if (property->emit_store()) { |
1575 VisitForAccumulatorValue(value); | 1575 VisitForAccumulatorValue(value); |
1576 DCHECK(StoreDescriptor::ValueRegister().is(r0)); | 1576 DCHECK(StoreDescriptor::ValueRegister().is(r0)); |
1577 __ mov(StoreDescriptor::NameRegister(), Operand(key->value())); | 1577 __ mov(StoreDescriptor::NameRegister(), Operand(key->value())); |
1578 __ ldr(StoreDescriptor::ReceiverRegister(), MemOperand(sp)); | 1578 __ ldr(StoreDescriptor::ReceiverRegister(), MemOperand(sp)); |
1579 if (FLAG_vector_stores) { | 1579 EmitLoadStoreICSlot(property->GetSlot(0)); |
1580 EmitLoadStoreICSlot(property->GetSlot(0)); | 1580 CallStoreIC(); |
1581 CallStoreIC(); | |
1582 } else { | |
1583 CallStoreIC(key->LiteralFeedbackId()); | |
1584 } | |
1585 PrepareForBailoutForId(key->id(), NO_REGISTERS); | 1581 PrepareForBailoutForId(key->id(), NO_REGISTERS); |
1586 | 1582 |
1587 if (NeedsHomeObject(value)) { | 1583 if (NeedsHomeObject(value)) { |
1588 EmitSetHomeObjectAccumulator(value, 0, property->GetSlot(1)); | 1584 EmitSetHomeObjectAccumulator(value, 0, property->GetSlot(1)); |
1589 } | 1585 } |
1590 } else { | 1586 } else { |
1591 VisitForEffect(value); | 1587 VisitForEffect(value); |
1592 } | 1588 } |
1593 break; | 1589 break; |
1594 } | 1590 } |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1770 // is already set in the cloned array. | 1766 // is already set in the cloned array. |
1771 if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue; | 1767 if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue; |
1772 | 1768 |
1773 if (!result_saved) { | 1769 if (!result_saved) { |
1774 __ push(r0); | 1770 __ push(r0); |
1775 __ Push(Smi::FromInt(expr->literal_index())); | 1771 __ Push(Smi::FromInt(expr->literal_index())); |
1776 result_saved = true; | 1772 result_saved = true; |
1777 } | 1773 } |
1778 VisitForAccumulatorValue(subexpr); | 1774 VisitForAccumulatorValue(subexpr); |
1779 | 1775 |
1780 if (FLAG_vector_stores) { | 1776 __ mov(StoreDescriptor::NameRegister(), Operand(Smi::FromInt(array_index))); |
1781 __ mov(StoreDescriptor::NameRegister(), | 1777 __ ldr(StoreDescriptor::ReceiverRegister(), MemOperand(sp, kPointerSize)); |
1782 Operand(Smi::FromInt(array_index))); | 1778 EmitLoadStoreICSlot(expr->LiteralFeedbackSlot()); |
1783 __ ldr(StoreDescriptor::ReceiverRegister(), MemOperand(sp, kPointerSize)); | 1779 Handle<Code> ic = |
1784 EmitLoadStoreICSlot(expr->LiteralFeedbackSlot()); | 1780 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); |
1785 Handle<Code> ic = | 1781 CallIC(ic); |
1786 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); | |
1787 CallIC(ic); | |
1788 } else if (has_fast_elements) { | |
1789 int offset = FixedArray::kHeaderSize + (array_index * kPointerSize); | |
1790 __ ldr(r6, MemOperand(sp, kPointerSize)); // Copy of array literal. | |
1791 __ ldr(r1, FieldMemOperand(r6, JSObject::kElementsOffset)); | |
1792 __ str(result_register(), FieldMemOperand(r1, offset)); | |
1793 // Update the write barrier for the array store. | |
1794 __ RecordWriteField(r1, offset, result_register(), r2, | |
1795 kLRHasBeenSaved, kDontSaveFPRegs, | |
1796 EMIT_REMEMBERED_SET, INLINE_SMI_CHECK); | |
1797 } else { | |
1798 __ mov(r3, Operand(Smi::FromInt(array_index))); | |
1799 StoreArrayLiteralElementStub stub(isolate()); | |
1800 __ CallStub(&stub); | |
1801 } | |
1802 | 1782 |
1803 PrepareForBailoutForId(expr->GetIdForElement(array_index), NO_REGISTERS); | 1783 PrepareForBailoutForId(expr->GetIdForElement(array_index), NO_REGISTERS); |
1804 } | 1784 } |
1805 | 1785 |
1806 // In case the array literal contains spread expressions it has two parts. The | 1786 // In case the array literal contains spread expressions it has two parts. The |
1807 // first part is the "static" array which has a literal index is handled | 1787 // first part is the "static" array which has a literal index is handled |
1808 // above. The second part is the part after the first spread expression | 1788 // above. The second part is the part after the first spread expression |
1809 // (inclusive) and these elements gets appended to the array. Note that the | 1789 // (inclusive) and these elements gets appended to the array. Note that the |
1810 // number elements an iterable produces is unknown ahead of time. | 1790 // number elements an iterable produces is unknown ahead of time. |
1811 if (array_index < length && result_saved) { | 1791 if (array_index < length && result_saved) { |
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2502 EmitVariableAssignment(var, Token::ASSIGN, slot); | 2482 EmitVariableAssignment(var, Token::ASSIGN, slot); |
2503 break; | 2483 break; |
2504 } | 2484 } |
2505 case NAMED_PROPERTY: { | 2485 case NAMED_PROPERTY: { |
2506 __ push(r0); // Preserve value. | 2486 __ push(r0); // Preserve value. |
2507 VisitForAccumulatorValue(prop->obj()); | 2487 VisitForAccumulatorValue(prop->obj()); |
2508 __ Move(StoreDescriptor::ReceiverRegister(), r0); | 2488 __ Move(StoreDescriptor::ReceiverRegister(), r0); |
2509 __ pop(StoreDescriptor::ValueRegister()); // Restore value. | 2489 __ pop(StoreDescriptor::ValueRegister()); // Restore value. |
2510 __ mov(StoreDescriptor::NameRegister(), | 2490 __ mov(StoreDescriptor::NameRegister(), |
2511 Operand(prop->key()->AsLiteral()->value())); | 2491 Operand(prop->key()->AsLiteral()->value())); |
2512 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot); | 2492 EmitLoadStoreICSlot(slot); |
2513 CallStoreIC(); | 2493 CallStoreIC(); |
2514 break; | 2494 break; |
2515 } | 2495 } |
2516 case NAMED_SUPER_PROPERTY: { | 2496 case NAMED_SUPER_PROPERTY: { |
2517 __ Push(r0); | 2497 __ Push(r0); |
2518 VisitForStackValue(prop->obj()->AsSuperPropertyReference()->this_var()); | 2498 VisitForStackValue(prop->obj()->AsSuperPropertyReference()->this_var()); |
2519 VisitForAccumulatorValue( | 2499 VisitForAccumulatorValue( |
2520 prop->obj()->AsSuperPropertyReference()->home_object()); | 2500 prop->obj()->AsSuperPropertyReference()->home_object()); |
2521 // stack: value, this; r0: home_object | 2501 // stack: value, this; r0: home_object |
2522 Register scratch = r2; | 2502 Register scratch = r2; |
(...skipping 27 matching lines...) Expand all Loading... |
2550 EmitKeyedSuperPropertyStore(prop); | 2530 EmitKeyedSuperPropertyStore(prop); |
2551 break; | 2531 break; |
2552 } | 2532 } |
2553 case KEYED_PROPERTY: { | 2533 case KEYED_PROPERTY: { |
2554 __ push(r0); // Preserve value. | 2534 __ push(r0); // Preserve value. |
2555 VisitForStackValue(prop->obj()); | 2535 VisitForStackValue(prop->obj()); |
2556 VisitForAccumulatorValue(prop->key()); | 2536 VisitForAccumulatorValue(prop->key()); |
2557 __ Move(StoreDescriptor::NameRegister(), r0); | 2537 __ Move(StoreDescriptor::NameRegister(), r0); |
2558 __ Pop(StoreDescriptor::ValueRegister(), | 2538 __ Pop(StoreDescriptor::ValueRegister(), |
2559 StoreDescriptor::ReceiverRegister()); | 2539 StoreDescriptor::ReceiverRegister()); |
2560 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot); | 2540 EmitLoadStoreICSlot(slot); |
2561 Handle<Code> ic = | 2541 Handle<Code> ic = |
2562 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); | 2542 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); |
2563 CallIC(ic); | 2543 CallIC(ic); |
2564 break; | 2544 break; |
2565 } | 2545 } |
2566 } | 2546 } |
2567 context()->Plug(r0); | 2547 context()->Plug(r0); |
2568 } | 2548 } |
2569 | 2549 |
2570 | 2550 |
2571 void FullCodeGenerator::EmitStoreToStackLocalOrContextSlot( | 2551 void FullCodeGenerator::EmitStoreToStackLocalOrContextSlot( |
2572 Variable* var, MemOperand location) { | 2552 Variable* var, MemOperand location) { |
2573 __ str(result_register(), location); | 2553 __ str(result_register(), location); |
2574 if (var->IsContextSlot()) { | 2554 if (var->IsContextSlot()) { |
2575 // RecordWrite may destroy all its register arguments. | 2555 // RecordWrite may destroy all its register arguments. |
2576 __ mov(r3, result_register()); | 2556 __ mov(r3, result_register()); |
2577 int offset = Context::SlotOffset(var->index()); | 2557 int offset = Context::SlotOffset(var->index()); |
2578 __ RecordWriteContextSlot( | 2558 __ RecordWriteContextSlot( |
2579 r1, offset, r3, r2, kLRHasBeenSaved, kDontSaveFPRegs); | 2559 r1, offset, r3, r2, kLRHasBeenSaved, kDontSaveFPRegs); |
2580 } | 2560 } |
2581 } | 2561 } |
2582 | 2562 |
2583 | 2563 |
2584 void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op, | 2564 void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op, |
2585 FeedbackVectorSlot slot) { | 2565 FeedbackVectorSlot slot) { |
2586 if (var->IsUnallocated()) { | 2566 if (var->IsUnallocated()) { |
2587 // Global var, const, or let. | 2567 // Global var, const, or let. |
2588 __ mov(StoreDescriptor::NameRegister(), Operand(var->name())); | 2568 __ mov(StoreDescriptor::NameRegister(), Operand(var->name())); |
2589 __ ldr(StoreDescriptor::ReceiverRegister(), GlobalObjectOperand()); | 2569 __ ldr(StoreDescriptor::ReceiverRegister(), GlobalObjectOperand()); |
2590 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot); | 2570 EmitLoadStoreICSlot(slot); |
2591 CallStoreIC(); | 2571 CallStoreIC(); |
2592 | 2572 |
2593 } else if (var->mode() == LET && op != Token::INIT) { | 2573 } else if (var->mode() == LET && op != Token::INIT) { |
2594 // Non-initializing assignment to let variable needs a write barrier. | 2574 // Non-initializing assignment to let variable needs a write barrier. |
2595 DCHECK(!var->IsLookupSlot()); | 2575 DCHECK(!var->IsLookupSlot()); |
2596 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); | 2576 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); |
2597 Label assign; | 2577 Label assign; |
2598 MemOperand location = VarOperand(var, r1); | 2578 MemOperand location = VarOperand(var, r1); |
2599 __ ldr(r3, location); | 2579 __ ldr(r3, location); |
2600 __ CompareRoot(r3, Heap::kTheHoleValueRootIndex); | 2580 __ CompareRoot(r3, Heap::kTheHoleValueRootIndex); |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2689 | 2669 |
2690 void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) { | 2670 void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) { |
2691 // Assignment to a property, using a named store IC. | 2671 // Assignment to a property, using a named store IC. |
2692 Property* prop = expr->target()->AsProperty(); | 2672 Property* prop = expr->target()->AsProperty(); |
2693 DCHECK(prop != NULL); | 2673 DCHECK(prop != NULL); |
2694 DCHECK(prop->key()->IsLiteral()); | 2674 DCHECK(prop->key()->IsLiteral()); |
2695 | 2675 |
2696 __ mov(StoreDescriptor::NameRegister(), | 2676 __ mov(StoreDescriptor::NameRegister(), |
2697 Operand(prop->key()->AsLiteral()->value())); | 2677 Operand(prop->key()->AsLiteral()->value())); |
2698 __ pop(StoreDescriptor::ReceiverRegister()); | 2678 __ pop(StoreDescriptor::ReceiverRegister()); |
2699 if (FLAG_vector_stores) { | 2679 EmitLoadStoreICSlot(expr->AssignmentSlot()); |
2700 EmitLoadStoreICSlot(expr->AssignmentSlot()); | 2680 CallStoreIC(); |
2701 CallStoreIC(); | |
2702 } else { | |
2703 CallStoreIC(expr->AssignmentFeedbackId()); | |
2704 } | |
2705 | 2681 |
2706 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 2682 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
2707 context()->Plug(r0); | 2683 context()->Plug(r0); |
2708 } | 2684 } |
2709 | 2685 |
2710 | 2686 |
2711 void FullCodeGenerator::EmitNamedSuperPropertyStore(Property* prop) { | 2687 void FullCodeGenerator::EmitNamedSuperPropertyStore(Property* prop) { |
2712 // Assignment to named property of super. | 2688 // Assignment to named property of super. |
2713 // r0 : value | 2689 // r0 : value |
2714 // stack : receiver ('this'), home_object | 2690 // stack : receiver ('this'), home_object |
(...skipping 23 matching lines...) Expand all Loading... |
2738 } | 2714 } |
2739 | 2715 |
2740 | 2716 |
2741 void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) { | 2717 void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) { |
2742 // Assignment to a property, using a keyed store IC. | 2718 // Assignment to a property, using a keyed store IC. |
2743 __ Pop(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister()); | 2719 __ Pop(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister()); |
2744 DCHECK(StoreDescriptor::ValueRegister().is(r0)); | 2720 DCHECK(StoreDescriptor::ValueRegister().is(r0)); |
2745 | 2721 |
2746 Handle<Code> ic = | 2722 Handle<Code> ic = |
2747 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); | 2723 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); |
2748 if (FLAG_vector_stores) { | 2724 EmitLoadStoreICSlot(expr->AssignmentSlot()); |
2749 EmitLoadStoreICSlot(expr->AssignmentSlot()); | 2725 CallIC(ic); |
2750 CallIC(ic); | |
2751 } else { | |
2752 CallIC(ic, expr->AssignmentFeedbackId()); | |
2753 } | |
2754 | 2726 |
2755 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 2727 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
2756 context()->Plug(r0); | 2728 context()->Plug(r0); |
2757 } | 2729 } |
2758 | 2730 |
2759 | 2731 |
2760 void FullCodeGenerator::VisitProperty(Property* expr) { | 2732 void FullCodeGenerator::VisitProperty(Property* expr) { |
2761 Comment cmnt(masm_, "[ Property"); | 2733 Comment cmnt(masm_, "[ Property"); |
2762 SetExpressionPosition(expr); | 2734 SetExpressionPosition(expr); |
2763 | 2735 |
(...skipping 1826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4590 EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(), | 4562 EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(), |
4591 Token::ASSIGN, expr->CountSlot()); | 4563 Token::ASSIGN, expr->CountSlot()); |
4592 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 4564 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
4593 context()->Plug(r0); | 4565 context()->Plug(r0); |
4594 } | 4566 } |
4595 break; | 4567 break; |
4596 case NAMED_PROPERTY: { | 4568 case NAMED_PROPERTY: { |
4597 __ mov(StoreDescriptor::NameRegister(), | 4569 __ mov(StoreDescriptor::NameRegister(), |
4598 Operand(prop->key()->AsLiteral()->value())); | 4570 Operand(prop->key()->AsLiteral()->value())); |
4599 __ pop(StoreDescriptor::ReceiverRegister()); | 4571 __ pop(StoreDescriptor::ReceiverRegister()); |
4600 if (FLAG_vector_stores) { | 4572 EmitLoadStoreICSlot(expr->CountSlot()); |
4601 EmitLoadStoreICSlot(expr->CountSlot()); | 4573 CallStoreIC(); |
4602 CallStoreIC(); | |
4603 } else { | |
4604 CallStoreIC(expr->CountStoreFeedbackId()); | |
4605 } | |
4606 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 4574 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
4607 if (expr->is_postfix()) { | 4575 if (expr->is_postfix()) { |
4608 if (!context()->IsEffect()) { | 4576 if (!context()->IsEffect()) { |
4609 context()->PlugTOS(); | 4577 context()->PlugTOS(); |
4610 } | 4578 } |
4611 } else { | 4579 } else { |
4612 context()->Plug(r0); | 4580 context()->Plug(r0); |
4613 } | 4581 } |
4614 break; | 4582 break; |
4615 } | 4583 } |
(...skipping 17 matching lines...) Expand all Loading... |
4633 } else { | 4601 } else { |
4634 context()->Plug(r0); | 4602 context()->Plug(r0); |
4635 } | 4603 } |
4636 break; | 4604 break; |
4637 } | 4605 } |
4638 case KEYED_PROPERTY: { | 4606 case KEYED_PROPERTY: { |
4639 __ Pop(StoreDescriptor::ReceiverRegister(), | 4607 __ Pop(StoreDescriptor::ReceiverRegister(), |
4640 StoreDescriptor::NameRegister()); | 4608 StoreDescriptor::NameRegister()); |
4641 Handle<Code> ic = | 4609 Handle<Code> ic = |
4642 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); | 4610 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); |
4643 if (FLAG_vector_stores) { | 4611 EmitLoadStoreICSlot(expr->CountSlot()); |
4644 EmitLoadStoreICSlot(expr->CountSlot()); | 4612 CallIC(ic); |
4645 CallIC(ic); | |
4646 } else { | |
4647 CallIC(ic, expr->CountStoreFeedbackId()); | |
4648 } | |
4649 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 4613 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
4650 if (expr->is_postfix()) { | 4614 if (expr->is_postfix()) { |
4651 if (!context()->IsEffect()) { | 4615 if (!context()->IsEffect()) { |
4652 context()->PlugTOS(); | 4616 context()->PlugTOS(); |
4653 } | 4617 } |
4654 } else { | 4618 } else { |
4655 context()->Plug(r0); | 4619 context()->Plug(r0); |
4656 } | 4620 } |
4657 break; | 4621 break; |
4658 } | 4622 } |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4938 DCHECK(!result_register().is(r1)); | 4902 DCHECK(!result_register().is(r1)); |
4939 ExternalReference pending_message_obj = | 4903 ExternalReference pending_message_obj = |
4940 ExternalReference::address_of_pending_message_obj(isolate()); | 4904 ExternalReference::address_of_pending_message_obj(isolate()); |
4941 __ LoadRoot(r1, Heap::kTheHoleValueRootIndex); | 4905 __ LoadRoot(r1, Heap::kTheHoleValueRootIndex); |
4942 __ mov(ip, Operand(pending_message_obj)); | 4906 __ mov(ip, Operand(pending_message_obj)); |
4943 __ str(r1, MemOperand(ip)); | 4907 __ str(r1, MemOperand(ip)); |
4944 } | 4908 } |
4945 | 4909 |
4946 | 4910 |
4947 void FullCodeGenerator::EmitLoadStoreICSlot(FeedbackVectorSlot slot) { | 4911 void FullCodeGenerator::EmitLoadStoreICSlot(FeedbackVectorSlot slot) { |
4948 DCHECK(FLAG_vector_stores && !slot.IsInvalid()); | 4912 DCHECK(!slot.IsInvalid()); |
4949 __ mov(VectorStoreICTrampolineDescriptor::SlotRegister(), | 4913 __ mov(VectorStoreICTrampolineDescriptor::SlotRegister(), |
4950 Operand(SmiFromSlot(slot))); | 4914 Operand(SmiFromSlot(slot))); |
4951 } | 4915 } |
4952 | 4916 |
4953 | 4917 |
4954 #undef __ | 4918 #undef __ |
4955 | 4919 |
4956 | 4920 |
4957 static Address GetInterruptImmediateLoadAddress(Address pc) { | 4921 static Address GetInterruptImmediateLoadAddress(Address pc) { |
4958 Address load_address = pc - 2 * Assembler::kInstrSize; | 4922 Address load_address = pc - 2 * Assembler::kInstrSize; |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5090 DCHECK(interrupt_address == | 5054 DCHECK(interrupt_address == |
5091 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5055 isolate->builtins()->OsrAfterStackCheck()->entry()); |
5092 return OSR_AFTER_STACK_CHECK; | 5056 return OSR_AFTER_STACK_CHECK; |
5093 } | 5057 } |
5094 | 5058 |
5095 | 5059 |
5096 } // namespace internal | 5060 } // namespace internal |
5097 } // namespace v8 | 5061 } // namespace v8 |
5098 | 5062 |
5099 #endif // V8_TARGET_ARCH_ARM | 5063 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |