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_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
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 1220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1231 | 1231 |
1232 | 1232 |
1233 void FullCodeGenerator::EmitSetHomeObject(Expression* initializer, int offset, | 1233 void FullCodeGenerator::EmitSetHomeObject(Expression* initializer, int offset, |
1234 FeedbackVectorSlot slot) { | 1234 FeedbackVectorSlot slot) { |
1235 DCHECK(NeedsHomeObject(initializer)); | 1235 DCHECK(NeedsHomeObject(initializer)); |
1236 __ lw(StoreDescriptor::ReceiverRegister(), MemOperand(sp)); | 1236 __ lw(StoreDescriptor::ReceiverRegister(), MemOperand(sp)); |
1237 __ li(StoreDescriptor::NameRegister(), | 1237 __ li(StoreDescriptor::NameRegister(), |
1238 Operand(isolate()->factory()->home_object_symbol())); | 1238 Operand(isolate()->factory()->home_object_symbol())); |
1239 __ lw(StoreDescriptor::ValueRegister(), | 1239 __ lw(StoreDescriptor::ValueRegister(), |
1240 MemOperand(sp, offset * kPointerSize)); | 1240 MemOperand(sp, offset * kPointerSize)); |
1241 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot); | 1241 EmitLoadStoreICSlot(slot); |
1242 CallStoreIC(); | 1242 CallStoreIC(); |
1243 } | 1243 } |
1244 | 1244 |
1245 | 1245 |
1246 void FullCodeGenerator::EmitSetHomeObjectAccumulator(Expression* initializer, | 1246 void FullCodeGenerator::EmitSetHomeObjectAccumulator(Expression* initializer, |
1247 int offset, | 1247 int offset, |
1248 FeedbackVectorSlot slot) { | 1248 FeedbackVectorSlot slot) { |
1249 DCHECK(NeedsHomeObject(initializer)); | 1249 DCHECK(NeedsHomeObject(initializer)); |
1250 __ Move(StoreDescriptor::ReceiverRegister(), v0); | 1250 __ Move(StoreDescriptor::ReceiverRegister(), v0); |
1251 __ li(StoreDescriptor::NameRegister(), | 1251 __ li(StoreDescriptor::NameRegister(), |
1252 Operand(isolate()->factory()->home_object_symbol())); | 1252 Operand(isolate()->factory()->home_object_symbol())); |
1253 __ lw(StoreDescriptor::ValueRegister(), | 1253 __ lw(StoreDescriptor::ValueRegister(), |
1254 MemOperand(sp, offset * kPointerSize)); | 1254 MemOperand(sp, offset * kPointerSize)); |
1255 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot); | 1255 EmitLoadStoreICSlot(slot); |
1256 CallStoreIC(); | 1256 CallStoreIC(); |
1257 } | 1257 } |
1258 | 1258 |
1259 | 1259 |
1260 void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy, | 1260 void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy, |
1261 TypeofMode typeof_mode, | 1261 TypeofMode typeof_mode, |
1262 Label* slow) { | 1262 Label* slow) { |
1263 Register current = cp; | 1263 Register current = cp; |
1264 Register next = a1; | 1264 Register next = a1; |
1265 Register temp = a2; | 1265 Register temp = a2; |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1567 case ObjectLiteral::Property::COMPUTED: | 1567 case ObjectLiteral::Property::COMPUTED: |
1568 // It is safe to use [[Put]] here because the boilerplate already | 1568 // It is safe to use [[Put]] here because the boilerplate already |
1569 // contains computed properties with an uninitialized value. | 1569 // contains computed properties with an uninitialized value. |
1570 if (key->value()->IsInternalizedString()) { | 1570 if (key->value()->IsInternalizedString()) { |
1571 if (property->emit_store()) { | 1571 if (property->emit_store()) { |
1572 VisitForAccumulatorValue(value); | 1572 VisitForAccumulatorValue(value); |
1573 __ mov(StoreDescriptor::ValueRegister(), result_register()); | 1573 __ mov(StoreDescriptor::ValueRegister(), result_register()); |
1574 DCHECK(StoreDescriptor::ValueRegister().is(a0)); | 1574 DCHECK(StoreDescriptor::ValueRegister().is(a0)); |
1575 __ li(StoreDescriptor::NameRegister(), Operand(key->value())); | 1575 __ li(StoreDescriptor::NameRegister(), Operand(key->value())); |
1576 __ lw(StoreDescriptor::ReceiverRegister(), MemOperand(sp)); | 1576 __ lw(StoreDescriptor::ReceiverRegister(), MemOperand(sp)); |
1577 if (FLAG_vector_stores) { | 1577 EmitLoadStoreICSlot(property->GetSlot(0)); |
1578 EmitLoadStoreICSlot(property->GetSlot(0)); | 1578 CallStoreIC(); |
1579 CallStoreIC(); | |
1580 } else { | |
1581 CallStoreIC(key->LiteralFeedbackId()); | |
1582 } | |
1583 PrepareForBailoutForId(key->id(), NO_REGISTERS); | 1579 PrepareForBailoutForId(key->id(), NO_REGISTERS); |
1584 | 1580 |
1585 if (NeedsHomeObject(value)) { | 1581 if (NeedsHomeObject(value)) { |
1586 EmitSetHomeObjectAccumulator(value, 0, property->GetSlot(1)); | 1582 EmitSetHomeObjectAccumulator(value, 0, property->GetSlot(1)); |
1587 } | 1583 } |
1588 } else { | 1584 } else { |
1589 VisitForEffect(value); | 1585 VisitForEffect(value); |
1590 } | 1586 } |
1591 break; | 1587 break; |
1592 } | 1588 } |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1767 if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue; | 1763 if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue; |
1768 | 1764 |
1769 if (!result_saved) { | 1765 if (!result_saved) { |
1770 __ push(v0); // array literal | 1766 __ push(v0); // array literal |
1771 __ Push(Smi::FromInt(expr->literal_index())); | 1767 __ Push(Smi::FromInt(expr->literal_index())); |
1772 result_saved = true; | 1768 result_saved = true; |
1773 } | 1769 } |
1774 | 1770 |
1775 VisitForAccumulatorValue(subexpr); | 1771 VisitForAccumulatorValue(subexpr); |
1776 | 1772 |
1777 if (FLAG_vector_stores) { | 1773 __ li(StoreDescriptor::NameRegister(), Operand(Smi::FromInt(array_index))); |
1778 __ li(StoreDescriptor::NameRegister(), | 1774 __ lw(StoreDescriptor::ReceiverRegister(), MemOperand(sp, kPointerSize)); |
1779 Operand(Smi::FromInt(array_index))); | 1775 __ mov(StoreDescriptor::ValueRegister(), result_register()); |
1780 __ lw(StoreDescriptor::ReceiverRegister(), MemOperand(sp, kPointerSize)); | 1776 EmitLoadStoreICSlot(expr->LiteralFeedbackSlot()); |
1781 __ mov(StoreDescriptor::ValueRegister(), result_register()); | 1777 Handle<Code> ic = |
1782 EmitLoadStoreICSlot(expr->LiteralFeedbackSlot()); | 1778 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); |
1783 Handle<Code> ic = | 1779 CallIC(ic); |
1784 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); | |
1785 CallIC(ic); | |
1786 } else if (has_fast_elements) { | |
1787 int offset = FixedArray::kHeaderSize + (array_index * kPointerSize); | |
1788 __ lw(t2, MemOperand(sp, kPointerSize)); // Copy of array literal. | |
1789 __ lw(a1, FieldMemOperand(t2, JSObject::kElementsOffset)); | |
1790 __ sw(result_register(), FieldMemOperand(a1, offset)); | |
1791 // Update the write barrier for the array store. | |
1792 __ RecordWriteField(a1, offset, result_register(), a2, | |
1793 kRAHasBeenSaved, kDontSaveFPRegs, | |
1794 EMIT_REMEMBERED_SET, INLINE_SMI_CHECK); | |
1795 } else { | |
1796 __ li(a3, Operand(Smi::FromInt(array_index))); | |
1797 __ mov(a0, result_register()); | |
1798 StoreArrayLiteralElementStub stub(isolate()); | |
1799 __ CallStub(&stub); | |
1800 } | |
1801 | 1780 |
1802 PrepareForBailoutForId(expr->GetIdForElement(array_index), NO_REGISTERS); | 1781 PrepareForBailoutForId(expr->GetIdForElement(array_index), NO_REGISTERS); |
1803 } | 1782 } |
1804 | 1783 |
1805 // In case the array literal contains spread expressions it has two parts. The | 1784 // In case the array literal contains spread expressions it has two parts. The |
1806 // first part is the "static" array which has a literal index is handled | 1785 // first part is the "static" array which has a literal index is handled |
1807 // above. The second part is the part after the first spread expression | 1786 // above. The second part is the part after the first spread expression |
1808 // (inclusive) and these elements gets appended to the array. Note that the | 1787 // (inclusive) and these elements gets appended to the array. Note that the |
1809 // number elements an iterable produces is unknown ahead of time. | 1788 // number elements an iterable produces is unknown ahead of time. |
1810 if (array_index < length && result_saved) { | 1789 if (array_index < length && result_saved) { |
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2495 EmitVariableAssignment(var, Token::ASSIGN, slot); | 2474 EmitVariableAssignment(var, Token::ASSIGN, slot); |
2496 break; | 2475 break; |
2497 } | 2476 } |
2498 case NAMED_PROPERTY: { | 2477 case NAMED_PROPERTY: { |
2499 __ push(result_register()); // Preserve value. | 2478 __ push(result_register()); // Preserve value. |
2500 VisitForAccumulatorValue(prop->obj()); | 2479 VisitForAccumulatorValue(prop->obj()); |
2501 __ mov(StoreDescriptor::ReceiverRegister(), result_register()); | 2480 __ mov(StoreDescriptor::ReceiverRegister(), result_register()); |
2502 __ pop(StoreDescriptor::ValueRegister()); // Restore value. | 2481 __ pop(StoreDescriptor::ValueRegister()); // Restore value. |
2503 __ li(StoreDescriptor::NameRegister(), | 2482 __ li(StoreDescriptor::NameRegister(), |
2504 Operand(prop->key()->AsLiteral()->value())); | 2483 Operand(prop->key()->AsLiteral()->value())); |
2505 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot); | 2484 EmitLoadStoreICSlot(slot); |
2506 CallStoreIC(); | 2485 CallStoreIC(); |
2507 break; | 2486 break; |
2508 } | 2487 } |
2509 case NAMED_SUPER_PROPERTY: { | 2488 case NAMED_SUPER_PROPERTY: { |
2510 __ Push(v0); | 2489 __ Push(v0); |
2511 VisitForStackValue(prop->obj()->AsSuperPropertyReference()->this_var()); | 2490 VisitForStackValue(prop->obj()->AsSuperPropertyReference()->this_var()); |
2512 VisitForAccumulatorValue( | 2491 VisitForAccumulatorValue( |
2513 prop->obj()->AsSuperPropertyReference()->home_object()); | 2492 prop->obj()->AsSuperPropertyReference()->home_object()); |
2514 // stack: value, this; v0: home_object | 2493 // stack: value, this; v0: home_object |
2515 Register scratch = a2; | 2494 Register scratch = a2; |
(...skipping 27 matching lines...) Expand all Loading... |
2543 EmitKeyedSuperPropertyStore(prop); | 2522 EmitKeyedSuperPropertyStore(prop); |
2544 break; | 2523 break; |
2545 } | 2524 } |
2546 case KEYED_PROPERTY: { | 2525 case KEYED_PROPERTY: { |
2547 __ push(result_register()); // Preserve value. | 2526 __ push(result_register()); // Preserve value. |
2548 VisitForStackValue(prop->obj()); | 2527 VisitForStackValue(prop->obj()); |
2549 VisitForAccumulatorValue(prop->key()); | 2528 VisitForAccumulatorValue(prop->key()); |
2550 __ mov(StoreDescriptor::NameRegister(), result_register()); | 2529 __ mov(StoreDescriptor::NameRegister(), result_register()); |
2551 __ Pop(StoreDescriptor::ValueRegister(), | 2530 __ Pop(StoreDescriptor::ValueRegister(), |
2552 StoreDescriptor::ReceiverRegister()); | 2531 StoreDescriptor::ReceiverRegister()); |
2553 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot); | 2532 EmitLoadStoreICSlot(slot); |
2554 Handle<Code> ic = | 2533 Handle<Code> ic = |
2555 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); | 2534 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); |
2556 CallIC(ic); | 2535 CallIC(ic); |
2557 break; | 2536 break; |
2558 } | 2537 } |
2559 } | 2538 } |
2560 context()->Plug(v0); | 2539 context()->Plug(v0); |
2561 } | 2540 } |
2562 | 2541 |
2563 | 2542 |
(...skipping 10 matching lines...) Expand all Loading... |
2574 } | 2553 } |
2575 | 2554 |
2576 | 2555 |
2577 void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op, | 2556 void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op, |
2578 FeedbackVectorSlot slot) { | 2557 FeedbackVectorSlot slot) { |
2579 if (var->IsUnallocated()) { | 2558 if (var->IsUnallocated()) { |
2580 // Global var, const, or let. | 2559 // Global var, const, or let. |
2581 __ mov(StoreDescriptor::ValueRegister(), result_register()); | 2560 __ mov(StoreDescriptor::ValueRegister(), result_register()); |
2582 __ li(StoreDescriptor::NameRegister(), Operand(var->name())); | 2561 __ li(StoreDescriptor::NameRegister(), Operand(var->name())); |
2583 __ lw(StoreDescriptor::ReceiverRegister(), GlobalObjectOperand()); | 2562 __ lw(StoreDescriptor::ReceiverRegister(), GlobalObjectOperand()); |
2584 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot); | 2563 EmitLoadStoreICSlot(slot); |
2585 CallStoreIC(); | 2564 CallStoreIC(); |
2586 | 2565 |
2587 } else if (var->mode() == LET && op != Token::INIT) { | 2566 } else if (var->mode() == LET && op != Token::INIT) { |
2588 // Non-initializing assignment to let variable needs a write barrier. | 2567 // Non-initializing assignment to let variable needs a write barrier. |
2589 DCHECK(!var->IsLookupSlot()); | 2568 DCHECK(!var->IsLookupSlot()); |
2590 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); | 2569 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); |
2591 Label assign; | 2570 Label assign; |
2592 MemOperand location = VarOperand(var, a1); | 2571 MemOperand location = VarOperand(var, a1); |
2593 __ lw(a3, location); | 2572 __ lw(a3, location); |
2594 __ LoadRoot(t0, Heap::kTheHoleValueRootIndex); | 2573 __ LoadRoot(t0, Heap::kTheHoleValueRootIndex); |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2682 void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) { | 2661 void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) { |
2683 // Assignment to a property, using a named store IC. | 2662 // Assignment to a property, using a named store IC. |
2684 Property* prop = expr->target()->AsProperty(); | 2663 Property* prop = expr->target()->AsProperty(); |
2685 DCHECK(prop != NULL); | 2664 DCHECK(prop != NULL); |
2686 DCHECK(prop->key()->IsLiteral()); | 2665 DCHECK(prop->key()->IsLiteral()); |
2687 | 2666 |
2688 __ mov(StoreDescriptor::ValueRegister(), result_register()); | 2667 __ mov(StoreDescriptor::ValueRegister(), result_register()); |
2689 __ li(StoreDescriptor::NameRegister(), | 2668 __ li(StoreDescriptor::NameRegister(), |
2690 Operand(prop->key()->AsLiteral()->value())); | 2669 Operand(prop->key()->AsLiteral()->value())); |
2691 __ pop(StoreDescriptor::ReceiverRegister()); | 2670 __ pop(StoreDescriptor::ReceiverRegister()); |
2692 if (FLAG_vector_stores) { | 2671 EmitLoadStoreICSlot(expr->AssignmentSlot()); |
2693 EmitLoadStoreICSlot(expr->AssignmentSlot()); | 2672 CallStoreIC(); |
2694 CallStoreIC(); | |
2695 } else { | |
2696 CallStoreIC(expr->AssignmentFeedbackId()); | |
2697 } | |
2698 | 2673 |
2699 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 2674 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
2700 context()->Plug(v0); | 2675 context()->Plug(v0); |
2701 } | 2676 } |
2702 | 2677 |
2703 | 2678 |
2704 void FullCodeGenerator::EmitNamedSuperPropertyStore(Property* prop) { | 2679 void FullCodeGenerator::EmitNamedSuperPropertyStore(Property* prop) { |
2705 // Assignment to named property of super. | 2680 // Assignment to named property of super. |
2706 // v0 : value | 2681 // v0 : value |
2707 // stack : receiver ('this'), home_object | 2682 // stack : receiver ('this'), home_object |
(...skipping 29 matching lines...) Expand all Loading... |
2737 // The arguments are: | 2712 // The arguments are: |
2738 // - a0 is the value, | 2713 // - a0 is the value, |
2739 // - a1 is the key, | 2714 // - a1 is the key, |
2740 // - a2 is the receiver. | 2715 // - a2 is the receiver. |
2741 __ mov(StoreDescriptor::ValueRegister(), result_register()); | 2716 __ mov(StoreDescriptor::ValueRegister(), result_register()); |
2742 __ Pop(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister()); | 2717 __ Pop(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister()); |
2743 DCHECK(StoreDescriptor::ValueRegister().is(a0)); | 2718 DCHECK(StoreDescriptor::ValueRegister().is(a0)); |
2744 | 2719 |
2745 Handle<Code> ic = | 2720 Handle<Code> ic = |
2746 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); | 2721 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); |
2747 if (FLAG_vector_stores) { | 2722 EmitLoadStoreICSlot(expr->AssignmentSlot()); |
2748 EmitLoadStoreICSlot(expr->AssignmentSlot()); | 2723 CallIC(ic); |
2749 CallIC(ic); | |
2750 } else { | |
2751 CallIC(ic, expr->AssignmentFeedbackId()); | |
2752 } | |
2753 | 2724 |
2754 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 2725 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
2755 context()->Plug(v0); | 2726 context()->Plug(v0); |
2756 } | 2727 } |
2757 | 2728 |
2758 | 2729 |
2759 void FullCodeGenerator::VisitProperty(Property* expr) { | 2730 void FullCodeGenerator::VisitProperty(Property* expr) { |
2760 Comment cmnt(masm_, "[ Property"); | 2731 Comment cmnt(masm_, "[ Property"); |
2761 SetExpressionPosition(expr); | 2732 SetExpressionPosition(expr); |
2762 | 2733 |
(...skipping 1850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4613 Token::ASSIGN, expr->CountSlot()); | 4584 Token::ASSIGN, expr->CountSlot()); |
4614 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 4585 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
4615 context()->Plug(v0); | 4586 context()->Plug(v0); |
4616 } | 4587 } |
4617 break; | 4588 break; |
4618 case NAMED_PROPERTY: { | 4589 case NAMED_PROPERTY: { |
4619 __ mov(StoreDescriptor::ValueRegister(), result_register()); | 4590 __ mov(StoreDescriptor::ValueRegister(), result_register()); |
4620 __ li(StoreDescriptor::NameRegister(), | 4591 __ li(StoreDescriptor::NameRegister(), |
4621 Operand(prop->key()->AsLiteral()->value())); | 4592 Operand(prop->key()->AsLiteral()->value())); |
4622 __ pop(StoreDescriptor::ReceiverRegister()); | 4593 __ pop(StoreDescriptor::ReceiverRegister()); |
4623 if (FLAG_vector_stores) { | 4594 EmitLoadStoreICSlot(expr->CountSlot()); |
4624 EmitLoadStoreICSlot(expr->CountSlot()); | 4595 CallStoreIC(); |
4625 CallStoreIC(); | |
4626 } else { | |
4627 CallStoreIC(expr->CountStoreFeedbackId()); | |
4628 } | |
4629 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 4596 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
4630 if (expr->is_postfix()) { | 4597 if (expr->is_postfix()) { |
4631 if (!context()->IsEffect()) { | 4598 if (!context()->IsEffect()) { |
4632 context()->PlugTOS(); | 4599 context()->PlugTOS(); |
4633 } | 4600 } |
4634 } else { | 4601 } else { |
4635 context()->Plug(v0); | 4602 context()->Plug(v0); |
4636 } | 4603 } |
4637 break; | 4604 break; |
4638 } | 4605 } |
(...skipping 18 matching lines...) Expand all Loading... |
4657 context()->Plug(v0); | 4624 context()->Plug(v0); |
4658 } | 4625 } |
4659 break; | 4626 break; |
4660 } | 4627 } |
4661 case KEYED_PROPERTY: { | 4628 case KEYED_PROPERTY: { |
4662 __ mov(StoreDescriptor::ValueRegister(), result_register()); | 4629 __ mov(StoreDescriptor::ValueRegister(), result_register()); |
4663 __ Pop(StoreDescriptor::ReceiverRegister(), | 4630 __ Pop(StoreDescriptor::ReceiverRegister(), |
4664 StoreDescriptor::NameRegister()); | 4631 StoreDescriptor::NameRegister()); |
4665 Handle<Code> ic = | 4632 Handle<Code> ic = |
4666 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); | 4633 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); |
4667 if (FLAG_vector_stores) { | 4634 EmitLoadStoreICSlot(expr->CountSlot()); |
4668 EmitLoadStoreICSlot(expr->CountSlot()); | 4635 CallIC(ic); |
4669 CallIC(ic); | |
4670 } else { | |
4671 CallIC(ic, expr->CountStoreFeedbackId()); | |
4672 } | |
4673 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 4636 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
4674 if (expr->is_postfix()) { | 4637 if (expr->is_postfix()) { |
4675 if (!context()->IsEffect()) { | 4638 if (!context()->IsEffect()) { |
4676 context()->PlugTOS(); | 4639 context()->PlugTOS(); |
4677 } | 4640 } |
4678 } else { | 4641 } else { |
4679 context()->Plug(v0); | 4642 context()->Plug(v0); |
4680 } | 4643 } |
4681 break; | 4644 break; |
4682 } | 4645 } |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4966 DCHECK(!result_register().is(a1)); | 4929 DCHECK(!result_register().is(a1)); |
4967 ExternalReference pending_message_obj = | 4930 ExternalReference pending_message_obj = |
4968 ExternalReference::address_of_pending_message_obj(isolate()); | 4931 ExternalReference::address_of_pending_message_obj(isolate()); |
4969 __ LoadRoot(a1, Heap::kTheHoleValueRootIndex); | 4932 __ LoadRoot(a1, Heap::kTheHoleValueRootIndex); |
4970 __ li(at, Operand(pending_message_obj)); | 4933 __ li(at, Operand(pending_message_obj)); |
4971 __ sw(a1, MemOperand(at)); | 4934 __ sw(a1, MemOperand(at)); |
4972 } | 4935 } |
4973 | 4936 |
4974 | 4937 |
4975 void FullCodeGenerator::EmitLoadStoreICSlot(FeedbackVectorSlot slot) { | 4938 void FullCodeGenerator::EmitLoadStoreICSlot(FeedbackVectorSlot slot) { |
4976 DCHECK(FLAG_vector_stores && !slot.IsInvalid()); | 4939 DCHECK(!slot.IsInvalid()); |
4977 __ li(VectorStoreICTrampolineDescriptor::SlotRegister(), | 4940 __ li(VectorStoreICTrampolineDescriptor::SlotRegister(), |
4978 Operand(SmiFromSlot(slot))); | 4941 Operand(SmiFromSlot(slot))); |
4979 } | 4942 } |
4980 | 4943 |
4981 | 4944 |
4982 #undef __ | 4945 #undef __ |
4983 | 4946 |
4984 | 4947 |
4985 void BackEdgeTable::PatchAt(Code* unoptimized_code, | 4948 void BackEdgeTable::PatchAt(Code* unoptimized_code, |
4986 Address pc, | 4949 Address pc, |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5055 reinterpret_cast<uint32_t>( | 5018 reinterpret_cast<uint32_t>( |
5056 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5019 isolate->builtins()->OsrAfterStackCheck()->entry())); |
5057 return OSR_AFTER_STACK_CHECK; | 5020 return OSR_AFTER_STACK_CHECK; |
5058 } | 5021 } |
5059 | 5022 |
5060 | 5023 |
5061 } // namespace internal | 5024 } // namespace internal |
5062 } // namespace v8 | 5025 } // namespace v8 |
5063 | 5026 |
5064 #endif // V8_TARGET_ARCH_MIPS | 5027 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |