| 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 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 __ ld(StoreDescriptor::ReceiverRegister(), MemOperand(sp)); | 1236 __ ld(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 __ ld(StoreDescriptor::ValueRegister(), | 1239 __ ld(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 __ ld(StoreDescriptor::ValueRegister(), | 1253 __ ld(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 __ ld(StoreDescriptor::ReceiverRegister(), MemOperand(sp)); | 1576 __ ld(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 __ ld(StoreDescriptor::ReceiverRegister(), MemOperand(sp, kPointerSize)); |
| 1779 Operand(Smi::FromInt(array_index))); | 1775 __ mov(StoreDescriptor::ValueRegister(), result_register()); |
| 1780 __ ld(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 __ ld(a6, MemOperand(sp, kPointerSize)); // Copy of array literal. | |
| 1789 __ ld(a1, FieldMemOperand(a6, JSObject::kElementsOffset)); | |
| 1790 __ sd(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 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2496 EmitVariableAssignment(var, Token::ASSIGN, slot); | 2475 EmitVariableAssignment(var, Token::ASSIGN, slot); |
| 2497 break; | 2476 break; |
| 2498 } | 2477 } |
| 2499 case NAMED_PROPERTY: { | 2478 case NAMED_PROPERTY: { |
| 2500 __ push(result_register()); // Preserve value. | 2479 __ push(result_register()); // Preserve value. |
| 2501 VisitForAccumulatorValue(prop->obj()); | 2480 VisitForAccumulatorValue(prop->obj()); |
| 2502 __ mov(StoreDescriptor::ReceiverRegister(), result_register()); | 2481 __ mov(StoreDescriptor::ReceiverRegister(), result_register()); |
| 2503 __ pop(StoreDescriptor::ValueRegister()); // Restore value. | 2482 __ pop(StoreDescriptor::ValueRegister()); // Restore value. |
| 2504 __ li(StoreDescriptor::NameRegister(), | 2483 __ li(StoreDescriptor::NameRegister(), |
| 2505 Operand(prop->key()->AsLiteral()->value())); | 2484 Operand(prop->key()->AsLiteral()->value())); |
| 2506 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot); | 2485 EmitLoadStoreICSlot(slot); |
| 2507 CallStoreIC(); | 2486 CallStoreIC(); |
| 2508 break; | 2487 break; |
| 2509 } | 2488 } |
| 2510 case NAMED_SUPER_PROPERTY: { | 2489 case NAMED_SUPER_PROPERTY: { |
| 2511 __ Push(v0); | 2490 __ Push(v0); |
| 2512 VisitForStackValue(prop->obj()->AsSuperPropertyReference()->this_var()); | 2491 VisitForStackValue(prop->obj()->AsSuperPropertyReference()->this_var()); |
| 2513 VisitForAccumulatorValue( | 2492 VisitForAccumulatorValue( |
| 2514 prop->obj()->AsSuperPropertyReference()->home_object()); | 2493 prop->obj()->AsSuperPropertyReference()->home_object()); |
| 2515 // stack: value, this; v0: home_object | 2494 // stack: value, this; v0: home_object |
| 2516 Register scratch = a2; | 2495 Register scratch = a2; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 2544 EmitKeyedSuperPropertyStore(prop); | 2523 EmitKeyedSuperPropertyStore(prop); |
| 2545 break; | 2524 break; |
| 2546 } | 2525 } |
| 2547 case KEYED_PROPERTY: { | 2526 case KEYED_PROPERTY: { |
| 2548 __ push(result_register()); // Preserve value. | 2527 __ push(result_register()); // Preserve value. |
| 2549 VisitForStackValue(prop->obj()); | 2528 VisitForStackValue(prop->obj()); |
| 2550 VisitForAccumulatorValue(prop->key()); | 2529 VisitForAccumulatorValue(prop->key()); |
| 2551 __ Move(StoreDescriptor::NameRegister(), result_register()); | 2530 __ Move(StoreDescriptor::NameRegister(), result_register()); |
| 2552 __ Pop(StoreDescriptor::ValueRegister(), | 2531 __ Pop(StoreDescriptor::ValueRegister(), |
| 2553 StoreDescriptor::ReceiverRegister()); | 2532 StoreDescriptor::ReceiverRegister()); |
| 2554 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot); | 2533 EmitLoadStoreICSlot(slot); |
| 2555 Handle<Code> ic = | 2534 Handle<Code> ic = |
| 2556 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); | 2535 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); |
| 2557 CallIC(ic); | 2536 CallIC(ic); |
| 2558 break; | 2537 break; |
| 2559 } | 2538 } |
| 2560 } | 2539 } |
| 2561 context()->Plug(v0); | 2540 context()->Plug(v0); |
| 2562 } | 2541 } |
| 2563 | 2542 |
| 2564 | 2543 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 2575 } | 2554 } |
| 2576 | 2555 |
| 2577 | 2556 |
| 2578 void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op, | 2557 void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op, |
| 2579 FeedbackVectorSlot slot) { | 2558 FeedbackVectorSlot slot) { |
| 2580 if (var->IsUnallocated()) { | 2559 if (var->IsUnallocated()) { |
| 2581 // Global var, const, or let. | 2560 // Global var, const, or let. |
| 2582 __ mov(StoreDescriptor::ValueRegister(), result_register()); | 2561 __ mov(StoreDescriptor::ValueRegister(), result_register()); |
| 2583 __ li(StoreDescriptor::NameRegister(), Operand(var->name())); | 2562 __ li(StoreDescriptor::NameRegister(), Operand(var->name())); |
| 2584 __ ld(StoreDescriptor::ReceiverRegister(), GlobalObjectOperand()); | 2563 __ ld(StoreDescriptor::ReceiverRegister(), GlobalObjectOperand()); |
| 2585 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot); | 2564 EmitLoadStoreICSlot(slot); |
| 2586 CallStoreIC(); | 2565 CallStoreIC(); |
| 2587 | 2566 |
| 2588 } else if (var->mode() == LET && op != Token::INIT) { | 2567 } else if (var->mode() == LET && op != Token::INIT) { |
| 2589 // Non-initializing assignment to let variable needs a write barrier. | 2568 // Non-initializing assignment to let variable needs a write barrier. |
| 2590 DCHECK(!var->IsLookupSlot()); | 2569 DCHECK(!var->IsLookupSlot()); |
| 2591 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); | 2570 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); |
| 2592 Label assign; | 2571 Label assign; |
| 2593 MemOperand location = VarOperand(var, a1); | 2572 MemOperand location = VarOperand(var, a1); |
| 2594 __ ld(a3, location); | 2573 __ ld(a3, location); |
| 2595 __ LoadRoot(a4, Heap::kTheHoleValueRootIndex); | 2574 __ LoadRoot(a4, Heap::kTheHoleValueRootIndex); |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2687 void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) { | 2666 void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) { |
| 2688 // Assignment to a property, using a named store IC. | 2667 // Assignment to a property, using a named store IC. |
| 2689 Property* prop = expr->target()->AsProperty(); | 2668 Property* prop = expr->target()->AsProperty(); |
| 2690 DCHECK(prop != NULL); | 2669 DCHECK(prop != NULL); |
| 2691 DCHECK(prop->key()->IsLiteral()); | 2670 DCHECK(prop->key()->IsLiteral()); |
| 2692 | 2671 |
| 2693 __ mov(StoreDescriptor::ValueRegister(), result_register()); | 2672 __ mov(StoreDescriptor::ValueRegister(), result_register()); |
| 2694 __ li(StoreDescriptor::NameRegister(), | 2673 __ li(StoreDescriptor::NameRegister(), |
| 2695 Operand(prop->key()->AsLiteral()->value())); | 2674 Operand(prop->key()->AsLiteral()->value())); |
| 2696 __ pop(StoreDescriptor::ReceiverRegister()); | 2675 __ pop(StoreDescriptor::ReceiverRegister()); |
| 2697 if (FLAG_vector_stores) { | 2676 EmitLoadStoreICSlot(expr->AssignmentSlot()); |
| 2698 EmitLoadStoreICSlot(expr->AssignmentSlot()); | 2677 CallStoreIC(); |
| 2699 CallStoreIC(); | |
| 2700 } else { | |
| 2701 CallStoreIC(expr->AssignmentFeedbackId()); | |
| 2702 } | |
| 2703 | 2678 |
| 2704 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 2679 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
| 2705 context()->Plug(v0); | 2680 context()->Plug(v0); |
| 2706 } | 2681 } |
| 2707 | 2682 |
| 2708 | 2683 |
| 2709 void FullCodeGenerator::EmitNamedSuperPropertyStore(Property* prop) { | 2684 void FullCodeGenerator::EmitNamedSuperPropertyStore(Property* prop) { |
| 2710 // Assignment to named property of super. | 2685 // Assignment to named property of super. |
| 2711 // v0 : value | 2686 // v0 : value |
| 2712 // stack : receiver ('this'), home_object | 2687 // stack : receiver ('this'), home_object |
| (...skipping 29 matching lines...) Expand all Loading... |
| 2742 // The arguments are: | 2717 // The arguments are: |
| 2743 // - a0 is the value, | 2718 // - a0 is the value, |
| 2744 // - a1 is the key, | 2719 // - a1 is the key, |
| 2745 // - a2 is the receiver. | 2720 // - a2 is the receiver. |
| 2746 __ mov(StoreDescriptor::ValueRegister(), result_register()); | 2721 __ mov(StoreDescriptor::ValueRegister(), result_register()); |
| 2747 __ Pop(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister()); | 2722 __ Pop(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister()); |
| 2748 DCHECK(StoreDescriptor::ValueRegister().is(a0)); | 2723 DCHECK(StoreDescriptor::ValueRegister().is(a0)); |
| 2749 | 2724 |
| 2750 Handle<Code> ic = | 2725 Handle<Code> ic = |
| 2751 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); | 2726 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); |
| 2752 if (FLAG_vector_stores) { | 2727 EmitLoadStoreICSlot(expr->AssignmentSlot()); |
| 2753 EmitLoadStoreICSlot(expr->AssignmentSlot()); | 2728 CallIC(ic); |
| 2754 CallIC(ic); | |
| 2755 } else { | |
| 2756 CallIC(ic, expr->AssignmentFeedbackId()); | |
| 2757 } | |
| 2758 | 2729 |
| 2759 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 2730 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
| 2760 context()->Plug(v0); | 2731 context()->Plug(v0); |
| 2761 } | 2732 } |
| 2762 | 2733 |
| 2763 | 2734 |
| 2764 void FullCodeGenerator::VisitProperty(Property* expr) { | 2735 void FullCodeGenerator::VisitProperty(Property* expr) { |
| 2765 Comment cmnt(masm_, "[ Property"); | 2736 Comment cmnt(masm_, "[ Property"); |
| 2766 SetExpressionPosition(expr); | 2737 SetExpressionPosition(expr); |
| 2767 | 2738 |
| (...skipping 1849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4617 Token::ASSIGN, expr->CountSlot()); | 4588 Token::ASSIGN, expr->CountSlot()); |
| 4618 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 4589 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
| 4619 context()->Plug(v0); | 4590 context()->Plug(v0); |
| 4620 } | 4591 } |
| 4621 break; | 4592 break; |
| 4622 case NAMED_PROPERTY: { | 4593 case NAMED_PROPERTY: { |
| 4623 __ mov(StoreDescriptor::ValueRegister(), result_register()); | 4594 __ mov(StoreDescriptor::ValueRegister(), result_register()); |
| 4624 __ li(StoreDescriptor::NameRegister(), | 4595 __ li(StoreDescriptor::NameRegister(), |
| 4625 Operand(prop->key()->AsLiteral()->value())); | 4596 Operand(prop->key()->AsLiteral()->value())); |
| 4626 __ pop(StoreDescriptor::ReceiverRegister()); | 4597 __ pop(StoreDescriptor::ReceiverRegister()); |
| 4627 if (FLAG_vector_stores) { | 4598 EmitLoadStoreICSlot(expr->CountSlot()); |
| 4628 EmitLoadStoreICSlot(expr->CountSlot()); | 4599 CallStoreIC(); |
| 4629 CallStoreIC(); | |
| 4630 } else { | |
| 4631 CallStoreIC(expr->CountStoreFeedbackId()); | |
| 4632 } | |
| 4633 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 4600 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
| 4634 if (expr->is_postfix()) { | 4601 if (expr->is_postfix()) { |
| 4635 if (!context()->IsEffect()) { | 4602 if (!context()->IsEffect()) { |
| 4636 context()->PlugTOS(); | 4603 context()->PlugTOS(); |
| 4637 } | 4604 } |
| 4638 } else { | 4605 } else { |
| 4639 context()->Plug(v0); | 4606 context()->Plug(v0); |
| 4640 } | 4607 } |
| 4641 break; | 4608 break; |
| 4642 } | 4609 } |
| (...skipping 18 matching lines...) Expand all Loading... |
| 4661 context()->Plug(v0); | 4628 context()->Plug(v0); |
| 4662 } | 4629 } |
| 4663 break; | 4630 break; |
| 4664 } | 4631 } |
| 4665 case KEYED_PROPERTY: { | 4632 case KEYED_PROPERTY: { |
| 4666 __ mov(StoreDescriptor::ValueRegister(), result_register()); | 4633 __ mov(StoreDescriptor::ValueRegister(), result_register()); |
| 4667 __ Pop(StoreDescriptor::ReceiverRegister(), | 4634 __ Pop(StoreDescriptor::ReceiverRegister(), |
| 4668 StoreDescriptor::NameRegister()); | 4635 StoreDescriptor::NameRegister()); |
| 4669 Handle<Code> ic = | 4636 Handle<Code> ic = |
| 4670 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); | 4637 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); |
| 4671 if (FLAG_vector_stores) { | 4638 EmitLoadStoreICSlot(expr->CountSlot()); |
| 4672 EmitLoadStoreICSlot(expr->CountSlot()); | 4639 CallIC(ic); |
| 4673 CallIC(ic); | |
| 4674 } else { | |
| 4675 CallIC(ic, expr->CountStoreFeedbackId()); | |
| 4676 } | |
| 4677 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 4640 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
| 4678 if (expr->is_postfix()) { | 4641 if (expr->is_postfix()) { |
| 4679 if (!context()->IsEffect()) { | 4642 if (!context()->IsEffect()) { |
| 4680 context()->PlugTOS(); | 4643 context()->PlugTOS(); |
| 4681 } | 4644 } |
| 4682 } else { | 4645 } else { |
| 4683 context()->Plug(v0); | 4646 context()->Plug(v0); |
| 4684 } | 4647 } |
| 4685 break; | 4648 break; |
| 4686 } | 4649 } |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4970 DCHECK(!result_register().is(a1)); | 4933 DCHECK(!result_register().is(a1)); |
| 4971 ExternalReference pending_message_obj = | 4934 ExternalReference pending_message_obj = |
| 4972 ExternalReference::address_of_pending_message_obj(isolate()); | 4935 ExternalReference::address_of_pending_message_obj(isolate()); |
| 4973 __ LoadRoot(a1, Heap::kTheHoleValueRootIndex); | 4936 __ LoadRoot(a1, Heap::kTheHoleValueRootIndex); |
| 4974 __ li(at, Operand(pending_message_obj)); | 4937 __ li(at, Operand(pending_message_obj)); |
| 4975 __ sd(a1, MemOperand(at)); | 4938 __ sd(a1, MemOperand(at)); |
| 4976 } | 4939 } |
| 4977 | 4940 |
| 4978 | 4941 |
| 4979 void FullCodeGenerator::EmitLoadStoreICSlot(FeedbackVectorSlot slot) { | 4942 void FullCodeGenerator::EmitLoadStoreICSlot(FeedbackVectorSlot slot) { |
| 4980 DCHECK(FLAG_vector_stores && !slot.IsInvalid()); | 4943 DCHECK(!slot.IsInvalid()); |
| 4981 __ li(VectorStoreICTrampolineDescriptor::SlotRegister(), | 4944 __ li(VectorStoreICTrampolineDescriptor::SlotRegister(), |
| 4982 Operand(SmiFromSlot(slot))); | 4945 Operand(SmiFromSlot(slot))); |
| 4983 } | 4946 } |
| 4984 | 4947 |
| 4985 | 4948 |
| 4986 #undef __ | 4949 #undef __ |
| 4987 | 4950 |
| 4988 | 4951 |
| 4989 void BackEdgeTable::PatchAt(Code* unoptimized_code, | 4952 void BackEdgeTable::PatchAt(Code* unoptimized_code, |
| 4990 Address pc, | 4953 Address pc, |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5063 reinterpret_cast<uint64_t>( | 5026 reinterpret_cast<uint64_t>( |
| 5064 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5027 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 5065 return OSR_AFTER_STACK_CHECK; | 5028 return OSR_AFTER_STACK_CHECK; |
| 5066 } | 5029 } |
| 5067 | 5030 |
| 5068 | 5031 |
| 5069 } // namespace internal | 5032 } // namespace internal |
| 5070 } // namespace v8 | 5033 } // namespace v8 |
| 5071 | 5034 |
| 5072 #endif // V8_TARGET_ARCH_MIPS64 | 5035 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |