OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 5 #if V8_TARGET_ARCH_PPC |
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 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1197 | 1197 |
1198 | 1198 |
1199 void FullCodeGenerator::EmitSetHomeObject(Expression* initializer, int offset, | 1199 void FullCodeGenerator::EmitSetHomeObject(Expression* initializer, int offset, |
1200 FeedbackVectorSlot slot) { | 1200 FeedbackVectorSlot slot) { |
1201 DCHECK(NeedsHomeObject(initializer)); | 1201 DCHECK(NeedsHomeObject(initializer)); |
1202 __ LoadP(StoreDescriptor::ReceiverRegister(), MemOperand(sp)); | 1202 __ LoadP(StoreDescriptor::ReceiverRegister(), MemOperand(sp)); |
1203 __ mov(StoreDescriptor::NameRegister(), | 1203 __ mov(StoreDescriptor::NameRegister(), |
1204 Operand(isolate()->factory()->home_object_symbol())); | 1204 Operand(isolate()->factory()->home_object_symbol())); |
1205 __ LoadP(StoreDescriptor::ValueRegister(), | 1205 __ LoadP(StoreDescriptor::ValueRegister(), |
1206 MemOperand(sp, offset * kPointerSize)); | 1206 MemOperand(sp, offset * kPointerSize)); |
1207 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot); | 1207 EmitLoadStoreICSlot(slot); |
1208 CallStoreIC(); | 1208 CallStoreIC(); |
1209 } | 1209 } |
1210 | 1210 |
1211 | 1211 |
1212 void FullCodeGenerator::EmitSetHomeObjectAccumulator(Expression* initializer, | 1212 void FullCodeGenerator::EmitSetHomeObjectAccumulator(Expression* initializer, |
1213 int offset, | 1213 int offset, |
1214 FeedbackVectorSlot slot) { | 1214 FeedbackVectorSlot slot) { |
1215 DCHECK(NeedsHomeObject(initializer)); | 1215 DCHECK(NeedsHomeObject(initializer)); |
1216 __ Move(StoreDescriptor::ReceiverRegister(), r3); | 1216 __ Move(StoreDescriptor::ReceiverRegister(), r3); |
1217 __ mov(StoreDescriptor::NameRegister(), | 1217 __ mov(StoreDescriptor::NameRegister(), |
1218 Operand(isolate()->factory()->home_object_symbol())); | 1218 Operand(isolate()->factory()->home_object_symbol())); |
1219 __ LoadP(StoreDescriptor::ValueRegister(), | 1219 __ LoadP(StoreDescriptor::ValueRegister(), |
1220 MemOperand(sp, offset * kPointerSize)); | 1220 MemOperand(sp, offset * kPointerSize)); |
1221 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot); | 1221 EmitLoadStoreICSlot(slot); |
1222 CallStoreIC(); | 1222 CallStoreIC(); |
1223 } | 1223 } |
1224 | 1224 |
1225 | 1225 |
1226 void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy, | 1226 void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy, |
1227 TypeofMode typeof_mode, | 1227 TypeofMode typeof_mode, |
1228 Label* slow) { | 1228 Label* slow) { |
1229 Register current = cp; | 1229 Register current = cp; |
1230 Register next = r4; | 1230 Register next = r4; |
1231 Register temp = r5; | 1231 Register temp = r5; |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1534 // Fall through. | 1534 // Fall through. |
1535 case ObjectLiteral::Property::COMPUTED: | 1535 case ObjectLiteral::Property::COMPUTED: |
1536 // It is safe to use [[Put]] here because the boilerplate already | 1536 // It is safe to use [[Put]] here because the boilerplate already |
1537 // contains computed properties with an uninitialized value. | 1537 // contains computed properties with an uninitialized value. |
1538 if (key->value()->IsInternalizedString()) { | 1538 if (key->value()->IsInternalizedString()) { |
1539 if (property->emit_store()) { | 1539 if (property->emit_store()) { |
1540 VisitForAccumulatorValue(value); | 1540 VisitForAccumulatorValue(value); |
1541 DCHECK(StoreDescriptor::ValueRegister().is(r3)); | 1541 DCHECK(StoreDescriptor::ValueRegister().is(r3)); |
1542 __ mov(StoreDescriptor::NameRegister(), Operand(key->value())); | 1542 __ mov(StoreDescriptor::NameRegister(), Operand(key->value())); |
1543 __ LoadP(StoreDescriptor::ReceiverRegister(), MemOperand(sp)); | 1543 __ LoadP(StoreDescriptor::ReceiverRegister(), MemOperand(sp)); |
1544 if (FLAG_vector_stores) { | 1544 EmitLoadStoreICSlot(property->GetSlot(0)); |
1545 EmitLoadStoreICSlot(property->GetSlot(0)); | 1545 CallStoreIC(); |
1546 CallStoreIC(); | |
1547 } else { | |
1548 CallStoreIC(key->LiteralFeedbackId()); | |
1549 } | |
1550 PrepareForBailoutForId(key->id(), NO_REGISTERS); | 1546 PrepareForBailoutForId(key->id(), NO_REGISTERS); |
1551 | 1547 |
1552 if (NeedsHomeObject(value)) { | 1548 if (NeedsHomeObject(value)) { |
1553 EmitSetHomeObjectAccumulator(value, 0, property->GetSlot(1)); | 1549 EmitSetHomeObjectAccumulator(value, 0, property->GetSlot(1)); |
1554 } | 1550 } |
1555 } else { | 1551 } else { |
1556 VisitForEffect(value); | 1552 VisitForEffect(value); |
1557 } | 1553 } |
1558 break; | 1554 break; |
1559 } | 1555 } |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1732 // is already set in the cloned array. | 1728 // is already set in the cloned array. |
1733 if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue; | 1729 if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue; |
1734 | 1730 |
1735 if (!result_saved) { | 1731 if (!result_saved) { |
1736 __ push(r3); | 1732 __ push(r3); |
1737 __ Push(Smi::FromInt(expr->literal_index())); | 1733 __ Push(Smi::FromInt(expr->literal_index())); |
1738 result_saved = true; | 1734 result_saved = true; |
1739 } | 1735 } |
1740 VisitForAccumulatorValue(subexpr); | 1736 VisitForAccumulatorValue(subexpr); |
1741 | 1737 |
1742 if (FLAG_vector_stores) { | 1738 __ LoadSmiLiteral(StoreDescriptor::NameRegister(), |
1743 __ LoadSmiLiteral(StoreDescriptor::NameRegister(), | 1739 Smi::FromInt(array_index)); |
1744 Smi::FromInt(array_index)); | 1740 __ LoadP(StoreDescriptor::ReceiverRegister(), MemOperand(sp, kPointerSize)); |
1745 __ LoadP(StoreDescriptor::ReceiverRegister(), | 1741 EmitLoadStoreICSlot(expr->LiteralFeedbackSlot()); |
1746 MemOperand(sp, kPointerSize)); | 1742 Handle<Code> ic = |
1747 EmitLoadStoreICSlot(expr->LiteralFeedbackSlot()); | 1743 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); |
1748 Handle<Code> ic = | 1744 CallIC(ic); |
1749 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); | |
1750 CallIC(ic); | |
1751 } else if (has_fast_elements) { | |
1752 int offset = FixedArray::kHeaderSize + (array_index * kPointerSize); | |
1753 __ LoadP(r8, MemOperand(sp, kPointerSize)); // Copy of array literal. | |
1754 __ LoadP(r4, FieldMemOperand(r8, JSObject::kElementsOffset)); | |
1755 __ StoreP(result_register(), FieldMemOperand(r4, offset), r0); | |
1756 // Update the write barrier for the array store. | |
1757 __ RecordWriteField(r4, offset, result_register(), r5, kLRHasBeenSaved, | |
1758 kDontSaveFPRegs, EMIT_REMEMBERED_SET, | |
1759 INLINE_SMI_CHECK); | |
1760 } else { | |
1761 __ LoadSmiLiteral(r6, Smi::FromInt(array_index)); | |
1762 StoreArrayLiteralElementStub stub(isolate()); | |
1763 __ CallStub(&stub); | |
1764 } | |
1765 | 1745 |
1766 PrepareForBailoutForId(expr->GetIdForElement(array_index), NO_REGISTERS); | 1746 PrepareForBailoutForId(expr->GetIdForElement(array_index), NO_REGISTERS); |
1767 } | 1747 } |
1768 | 1748 |
1769 // In case the array literal contains spread expressions it has two parts. The | 1749 // In case the array literal contains spread expressions it has two parts. The |
1770 // first part is the "static" array which has a literal index is handled | 1750 // first part is the "static" array which has a literal index is handled |
1771 // above. The second part is the part after the first spread expression | 1751 // above. The second part is the part after the first spread expression |
1772 // (inclusive) and these elements gets appended to the array. Note that the | 1752 // (inclusive) and these elements gets appended to the array. Note that the |
1773 // number elements an iterable produces is unknown ahead of time. | 1753 // number elements an iterable produces is unknown ahead of time. |
1774 if (array_index < length && result_saved) { | 1754 if (array_index < length && result_saved) { |
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2504 EmitVariableAssignment(var, Token::ASSIGN, slot); | 2484 EmitVariableAssignment(var, Token::ASSIGN, slot); |
2505 break; | 2485 break; |
2506 } | 2486 } |
2507 case NAMED_PROPERTY: { | 2487 case NAMED_PROPERTY: { |
2508 __ push(r3); // Preserve value. | 2488 __ push(r3); // Preserve value. |
2509 VisitForAccumulatorValue(prop->obj()); | 2489 VisitForAccumulatorValue(prop->obj()); |
2510 __ Move(StoreDescriptor::ReceiverRegister(), r3); | 2490 __ Move(StoreDescriptor::ReceiverRegister(), r3); |
2511 __ pop(StoreDescriptor::ValueRegister()); // Restore value. | 2491 __ pop(StoreDescriptor::ValueRegister()); // Restore value. |
2512 __ mov(StoreDescriptor::NameRegister(), | 2492 __ mov(StoreDescriptor::NameRegister(), |
2513 Operand(prop->key()->AsLiteral()->value())); | 2493 Operand(prop->key()->AsLiteral()->value())); |
2514 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot); | 2494 EmitLoadStoreICSlot(slot); |
2515 CallStoreIC(); | 2495 CallStoreIC(); |
2516 break; | 2496 break; |
2517 } | 2497 } |
2518 case NAMED_SUPER_PROPERTY: { | 2498 case NAMED_SUPER_PROPERTY: { |
2519 __ Push(r3); | 2499 __ Push(r3); |
2520 VisitForStackValue(prop->obj()->AsSuperPropertyReference()->this_var()); | 2500 VisitForStackValue(prop->obj()->AsSuperPropertyReference()->this_var()); |
2521 VisitForAccumulatorValue( | 2501 VisitForAccumulatorValue( |
2522 prop->obj()->AsSuperPropertyReference()->home_object()); | 2502 prop->obj()->AsSuperPropertyReference()->home_object()); |
2523 // stack: value, this; r3: home_object | 2503 // stack: value, this; r3: home_object |
2524 Register scratch = r5; | 2504 Register scratch = r5; |
(...skipping 27 matching lines...) Expand all Loading... |
2552 EmitKeyedSuperPropertyStore(prop); | 2532 EmitKeyedSuperPropertyStore(prop); |
2553 break; | 2533 break; |
2554 } | 2534 } |
2555 case KEYED_PROPERTY: { | 2535 case KEYED_PROPERTY: { |
2556 __ push(r3); // Preserve value. | 2536 __ push(r3); // Preserve value. |
2557 VisitForStackValue(prop->obj()); | 2537 VisitForStackValue(prop->obj()); |
2558 VisitForAccumulatorValue(prop->key()); | 2538 VisitForAccumulatorValue(prop->key()); |
2559 __ Move(StoreDescriptor::NameRegister(), r3); | 2539 __ Move(StoreDescriptor::NameRegister(), r3); |
2560 __ Pop(StoreDescriptor::ValueRegister(), | 2540 __ Pop(StoreDescriptor::ValueRegister(), |
2561 StoreDescriptor::ReceiverRegister()); | 2541 StoreDescriptor::ReceiverRegister()); |
2562 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot); | 2542 EmitLoadStoreICSlot(slot); |
2563 Handle<Code> ic = | 2543 Handle<Code> ic = |
2564 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); | 2544 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); |
2565 CallIC(ic); | 2545 CallIC(ic); |
2566 break; | 2546 break; |
2567 } | 2547 } |
2568 } | 2548 } |
2569 context()->Plug(r3); | 2549 context()->Plug(r3); |
2570 } | 2550 } |
2571 | 2551 |
2572 | 2552 |
2573 void FullCodeGenerator::EmitStoreToStackLocalOrContextSlot( | 2553 void FullCodeGenerator::EmitStoreToStackLocalOrContextSlot( |
2574 Variable* var, MemOperand location) { | 2554 Variable* var, MemOperand location) { |
2575 __ StoreP(result_register(), location, r0); | 2555 __ StoreP(result_register(), location, r0); |
2576 if (var->IsContextSlot()) { | 2556 if (var->IsContextSlot()) { |
2577 // RecordWrite may destroy all its register arguments. | 2557 // RecordWrite may destroy all its register arguments. |
2578 __ mr(r6, result_register()); | 2558 __ mr(r6, result_register()); |
2579 int offset = Context::SlotOffset(var->index()); | 2559 int offset = Context::SlotOffset(var->index()); |
2580 __ RecordWriteContextSlot(r4, offset, r6, r5, kLRHasBeenSaved, | 2560 __ RecordWriteContextSlot(r4, offset, r6, r5, kLRHasBeenSaved, |
2581 kDontSaveFPRegs); | 2561 kDontSaveFPRegs); |
2582 } | 2562 } |
2583 } | 2563 } |
2584 | 2564 |
2585 | 2565 |
2586 void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op, | 2566 void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op, |
2587 FeedbackVectorSlot slot) { | 2567 FeedbackVectorSlot slot) { |
2588 if (var->IsUnallocated()) { | 2568 if (var->IsUnallocated()) { |
2589 // Global var, const, or let. | 2569 // Global var, const, or let. |
2590 __ mov(StoreDescriptor::NameRegister(), Operand(var->name())); | 2570 __ mov(StoreDescriptor::NameRegister(), Operand(var->name())); |
2591 __ LoadP(StoreDescriptor::ReceiverRegister(), GlobalObjectOperand()); | 2571 __ LoadP(StoreDescriptor::ReceiverRegister(), GlobalObjectOperand()); |
2592 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot); | 2572 EmitLoadStoreICSlot(slot); |
2593 CallStoreIC(); | 2573 CallStoreIC(); |
2594 | 2574 |
2595 } else if (var->mode() == LET && op != Token::INIT) { | 2575 } else if (var->mode() == LET && op != Token::INIT) { |
2596 // Non-initializing assignment to let variable needs a write barrier. | 2576 // Non-initializing assignment to let variable needs a write barrier. |
2597 DCHECK(!var->IsLookupSlot()); | 2577 DCHECK(!var->IsLookupSlot()); |
2598 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); | 2578 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); |
2599 Label assign; | 2579 Label assign; |
2600 MemOperand location = VarOperand(var, r4); | 2580 MemOperand location = VarOperand(var, r4); |
2601 __ LoadP(r6, location); | 2581 __ LoadP(r6, location); |
2602 __ CompareRoot(r6, Heap::kTheHoleValueRootIndex); | 2582 __ CompareRoot(r6, Heap::kTheHoleValueRootIndex); |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2690 | 2670 |
2691 void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) { | 2671 void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) { |
2692 // Assignment to a property, using a named store IC. | 2672 // Assignment to a property, using a named store IC. |
2693 Property* prop = expr->target()->AsProperty(); | 2673 Property* prop = expr->target()->AsProperty(); |
2694 DCHECK(prop != NULL); | 2674 DCHECK(prop != NULL); |
2695 DCHECK(prop->key()->IsLiteral()); | 2675 DCHECK(prop->key()->IsLiteral()); |
2696 | 2676 |
2697 __ mov(StoreDescriptor::NameRegister(), | 2677 __ mov(StoreDescriptor::NameRegister(), |
2698 Operand(prop->key()->AsLiteral()->value())); | 2678 Operand(prop->key()->AsLiteral()->value())); |
2699 __ pop(StoreDescriptor::ReceiverRegister()); | 2679 __ pop(StoreDescriptor::ReceiverRegister()); |
2700 if (FLAG_vector_stores) { | 2680 EmitLoadStoreICSlot(expr->AssignmentSlot()); |
2701 EmitLoadStoreICSlot(expr->AssignmentSlot()); | 2681 CallStoreIC(); |
2702 CallStoreIC(); | |
2703 } else { | |
2704 CallStoreIC(expr->AssignmentFeedbackId()); | |
2705 } | |
2706 | 2682 |
2707 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 2683 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
2708 context()->Plug(r3); | 2684 context()->Plug(r3); |
2709 } | 2685 } |
2710 | 2686 |
2711 | 2687 |
2712 void FullCodeGenerator::EmitNamedSuperPropertyStore(Property* prop) { | 2688 void FullCodeGenerator::EmitNamedSuperPropertyStore(Property* prop) { |
2713 // Assignment to named property of super. | 2689 // Assignment to named property of super. |
2714 // r3 : value | 2690 // r3 : value |
2715 // stack : receiver ('this'), home_object | 2691 // stack : receiver ('this'), home_object |
(...skipping 23 matching lines...) Expand all Loading... |
2739 } | 2715 } |
2740 | 2716 |
2741 | 2717 |
2742 void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) { | 2718 void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) { |
2743 // Assignment to a property, using a keyed store IC. | 2719 // Assignment to a property, using a keyed store IC. |
2744 __ Pop(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister()); | 2720 __ Pop(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister()); |
2745 DCHECK(StoreDescriptor::ValueRegister().is(r3)); | 2721 DCHECK(StoreDescriptor::ValueRegister().is(r3)); |
2746 | 2722 |
2747 Handle<Code> ic = | 2723 Handle<Code> ic = |
2748 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); | 2724 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); |
2749 if (FLAG_vector_stores) { | 2725 EmitLoadStoreICSlot(expr->AssignmentSlot()); |
2750 EmitLoadStoreICSlot(expr->AssignmentSlot()); | 2726 CallIC(ic); |
2751 CallIC(ic); | |
2752 } else { | |
2753 CallIC(ic, expr->AssignmentFeedbackId()); | |
2754 } | |
2755 | 2727 |
2756 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 2728 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
2757 context()->Plug(r3); | 2729 context()->Plug(r3); |
2758 } | 2730 } |
2759 | 2731 |
2760 | 2732 |
2761 void FullCodeGenerator::VisitProperty(Property* expr) { | 2733 void FullCodeGenerator::VisitProperty(Property* expr) { |
2762 Comment cmnt(masm_, "[ Property"); | 2734 Comment cmnt(masm_, "[ Property"); |
2763 SetExpressionPosition(expr); | 2735 SetExpressionPosition(expr); |
2764 | 2736 |
(...skipping 1845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4610 EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(), | 4582 EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(), |
4611 Token::ASSIGN, expr->CountSlot()); | 4583 Token::ASSIGN, expr->CountSlot()); |
4612 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 4584 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
4613 context()->Plug(r3); | 4585 context()->Plug(r3); |
4614 } | 4586 } |
4615 break; | 4587 break; |
4616 case NAMED_PROPERTY: { | 4588 case NAMED_PROPERTY: { |
4617 __ mov(StoreDescriptor::NameRegister(), | 4589 __ mov(StoreDescriptor::NameRegister(), |
4618 Operand(prop->key()->AsLiteral()->value())); | 4590 Operand(prop->key()->AsLiteral()->value())); |
4619 __ pop(StoreDescriptor::ReceiverRegister()); | 4591 __ pop(StoreDescriptor::ReceiverRegister()); |
4620 if (FLAG_vector_stores) { | 4592 EmitLoadStoreICSlot(expr->CountSlot()); |
4621 EmitLoadStoreICSlot(expr->CountSlot()); | 4593 CallStoreIC(); |
4622 CallStoreIC(); | |
4623 } else { | |
4624 CallStoreIC(expr->CountStoreFeedbackId()); | |
4625 } | |
4626 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 4594 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
4627 if (expr->is_postfix()) { | 4595 if (expr->is_postfix()) { |
4628 if (!context()->IsEffect()) { | 4596 if (!context()->IsEffect()) { |
4629 context()->PlugTOS(); | 4597 context()->PlugTOS(); |
4630 } | 4598 } |
4631 } else { | 4599 } else { |
4632 context()->Plug(r3); | 4600 context()->Plug(r3); |
4633 } | 4601 } |
4634 break; | 4602 break; |
4635 } | 4603 } |
(...skipping 17 matching lines...) Expand all Loading... |
4653 } else { | 4621 } else { |
4654 context()->Plug(r3); | 4622 context()->Plug(r3); |
4655 } | 4623 } |
4656 break; | 4624 break; |
4657 } | 4625 } |
4658 case KEYED_PROPERTY: { | 4626 case KEYED_PROPERTY: { |
4659 __ Pop(StoreDescriptor::ReceiverRegister(), | 4627 __ Pop(StoreDescriptor::ReceiverRegister(), |
4660 StoreDescriptor::NameRegister()); | 4628 StoreDescriptor::NameRegister()); |
4661 Handle<Code> ic = | 4629 Handle<Code> ic = |
4662 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); | 4630 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); |
4663 if (FLAG_vector_stores) { | 4631 EmitLoadStoreICSlot(expr->CountSlot()); |
4664 EmitLoadStoreICSlot(expr->CountSlot()); | 4632 CallIC(ic); |
4665 CallIC(ic); | |
4666 } else { | |
4667 CallIC(ic, expr->CountStoreFeedbackId()); | |
4668 } | |
4669 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 4633 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
4670 if (expr->is_postfix()) { | 4634 if (expr->is_postfix()) { |
4671 if (!context()->IsEffect()) { | 4635 if (!context()->IsEffect()) { |
4672 context()->PlugTOS(); | 4636 context()->PlugTOS(); |
4673 } | 4637 } |
4674 } else { | 4638 } else { |
4675 context()->Plug(r3); | 4639 context()->Plug(r3); |
4676 } | 4640 } |
4677 break; | 4641 break; |
4678 } | 4642 } |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4961 DCHECK(!result_register().is(r4)); | 4925 DCHECK(!result_register().is(r4)); |
4962 ExternalReference pending_message_obj = | 4926 ExternalReference pending_message_obj = |
4963 ExternalReference::address_of_pending_message_obj(isolate()); | 4927 ExternalReference::address_of_pending_message_obj(isolate()); |
4964 __ LoadRoot(r4, Heap::kTheHoleValueRootIndex); | 4928 __ LoadRoot(r4, Heap::kTheHoleValueRootIndex); |
4965 __ mov(ip, Operand(pending_message_obj)); | 4929 __ mov(ip, Operand(pending_message_obj)); |
4966 __ StoreP(r4, MemOperand(ip)); | 4930 __ StoreP(r4, MemOperand(ip)); |
4967 } | 4931 } |
4968 | 4932 |
4969 | 4933 |
4970 void FullCodeGenerator::EmitLoadStoreICSlot(FeedbackVectorSlot slot) { | 4934 void FullCodeGenerator::EmitLoadStoreICSlot(FeedbackVectorSlot slot) { |
4971 DCHECK(FLAG_vector_stores && !slot.IsInvalid()); | 4935 DCHECK(!slot.IsInvalid()); |
4972 __ mov(VectorStoreICTrampolineDescriptor::SlotRegister(), | 4936 __ mov(VectorStoreICTrampolineDescriptor::SlotRegister(), |
4973 Operand(SmiFromSlot(slot))); | 4937 Operand(SmiFromSlot(slot))); |
4974 } | 4938 } |
4975 | 4939 |
4976 | 4940 |
4977 #undef __ | 4941 #undef __ |
4978 | 4942 |
4979 | 4943 |
4980 void BackEdgeTable::PatchAt(Code* unoptimized_code, Address pc, | 4944 void BackEdgeTable::PatchAt(Code* unoptimized_code, Address pc, |
4981 BackEdgeState target_state, | 4945 BackEdgeState target_state, |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5041 return ON_STACK_REPLACEMENT; | 5005 return ON_STACK_REPLACEMENT; |
5042 } | 5006 } |
5043 | 5007 |
5044 DCHECK(interrupt_address == | 5008 DCHECK(interrupt_address == |
5045 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5009 isolate->builtins()->OsrAfterStackCheck()->entry()); |
5046 return OSR_AFTER_STACK_CHECK; | 5010 return OSR_AFTER_STACK_CHECK; |
5047 } | 5011 } |
5048 } // namespace internal | 5012 } // namespace internal |
5049 } // namespace v8 | 5013 } // namespace v8 |
5050 #endif // V8_TARGET_ARCH_PPC | 5014 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |