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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
8 | 8 |
9 // Note on Mips implementation: | 9 // Note on Mips implementation: |
10 // | 10 // |
(...skipping 1231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1242 PrepareForBailoutForId(stmt->FilterId(), TOS_REG); | 1242 PrepareForBailoutForId(stmt->FilterId(), TOS_REG); |
1243 __ mov(a3, result_register()); | 1243 __ mov(a3, result_register()); |
1244 __ Branch(loop_statement.continue_label(), eq, a3, Operand(zero_reg)); | 1244 __ Branch(loop_statement.continue_label(), eq, a3, Operand(zero_reg)); |
1245 | 1245 |
1246 // Update the 'each' property or variable from the possibly filtered | 1246 // Update the 'each' property or variable from the possibly filtered |
1247 // entry in register a3. | 1247 // entry in register a3. |
1248 __ bind(&update_each); | 1248 __ bind(&update_each); |
1249 __ mov(result_register(), a3); | 1249 __ mov(result_register(), a3); |
1250 // Perform the assignment as if via '='. | 1250 // Perform the assignment as if via '='. |
1251 { EffectContext context(this); | 1251 { EffectContext context(this); |
1252 EmitAssignment(stmt->each()); | 1252 EmitAssignment(stmt->each(), stmt->EachFeedbackSlot()); |
1253 PrepareForBailoutForId(stmt->AssignmentId(), NO_REGISTERS); | 1253 PrepareForBailoutForId(stmt->AssignmentId(), NO_REGISTERS); |
1254 } | 1254 } |
1255 | 1255 |
1256 // Generate code for the body of the loop. | 1256 // Generate code for the body of the loop. |
1257 Visit(stmt->body()); | 1257 Visit(stmt->body()); |
1258 | 1258 |
1259 // Generate code for the going to the next element by incrementing | 1259 // Generate code for the going to the next element by incrementing |
1260 // the index (smi) stored on top of the stack. | 1260 // the index (smi) stored on top of the stack. |
1261 __ bind(loop_statement.continue_label()); | 1261 __ bind(loop_statement.continue_label()); |
1262 __ pop(a0); | 1262 __ pop(a0); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1324 CallLoadIC(NOT_CONTEXTUAL); | 1324 CallLoadIC(NOT_CONTEXTUAL); |
1325 | 1325 |
1326 Label done; | 1326 Label done; |
1327 __ Branch(&done, ne, v0, Operand(isolate()->factory()->undefined_value())); | 1327 __ Branch(&done, ne, v0, Operand(isolate()->factory()->undefined_value())); |
1328 __ CallRuntime(Runtime::kThrowNonMethodError, 0); | 1328 __ CallRuntime(Runtime::kThrowNonMethodError, 0); |
1329 __ bind(&done); | 1329 __ bind(&done); |
1330 } | 1330 } |
1331 | 1331 |
1332 | 1332 |
1333 void FullCodeGenerator::EmitSetHomeObjectIfNeeded(Expression* initializer, | 1333 void FullCodeGenerator::EmitSetHomeObjectIfNeeded(Expression* initializer, |
1334 int offset) { | 1334 int offset, |
| 1335 FeedbackVectorICSlot slot) { |
1335 if (NeedsHomeObject(initializer)) { | 1336 if (NeedsHomeObject(initializer)) { |
1336 __ ld(StoreDescriptor::ReceiverRegister(), MemOperand(sp)); | 1337 __ ld(StoreDescriptor::ReceiverRegister(), MemOperand(sp)); |
1337 __ li(StoreDescriptor::NameRegister(), | 1338 __ li(StoreDescriptor::NameRegister(), |
1338 Operand(isolate()->factory()->home_object_symbol())); | 1339 Operand(isolate()->factory()->home_object_symbol())); |
1339 __ ld(StoreDescriptor::ValueRegister(), | 1340 __ ld(StoreDescriptor::ValueRegister(), |
1340 MemOperand(sp, offset * kPointerSize)); | 1341 MemOperand(sp, offset * kPointerSize)); |
| 1342 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot); |
1341 CallStoreIC(); | 1343 CallStoreIC(); |
1342 } | 1344 } |
1343 } | 1345 } |
1344 | 1346 |
1345 | 1347 |
1346 void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy, | 1348 void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy, |
1347 TypeofState typeof_state, | 1349 TypeofState typeof_state, |
1348 Label* slow) { | 1350 Label* slow) { |
1349 Register current = cp; | 1351 Register current = cp; |
1350 Register next = a1; | 1352 Register next = a1; |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1655 __ CallStub(&stub); | 1657 __ CallStub(&stub); |
1656 } | 1658 } |
1657 PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); | 1659 PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); |
1658 | 1660 |
1659 // If result_saved is true the result is on top of the stack. If | 1661 // If result_saved is true the result is on top of the stack. If |
1660 // result_saved is false the result is in v0. | 1662 // result_saved is false the result is in v0. |
1661 bool result_saved = false; | 1663 bool result_saved = false; |
1662 | 1664 |
1663 AccessorTable accessor_table(zone()); | 1665 AccessorTable accessor_table(zone()); |
1664 int property_index = 0; | 1666 int property_index = 0; |
| 1667 int store_slot_index = 0; |
1665 for (; property_index < expr->properties()->length(); property_index++) { | 1668 for (; property_index < expr->properties()->length(); property_index++) { |
1666 ObjectLiteral::Property* property = expr->properties()->at(property_index); | 1669 ObjectLiteral::Property* property = expr->properties()->at(property_index); |
1667 if (property->is_computed_name()) break; | 1670 if (property->is_computed_name()) break; |
1668 if (property->IsCompileTimeValue()) continue; | 1671 if (property->IsCompileTimeValue()) continue; |
1669 | 1672 |
1670 Literal* key = property->key()->AsLiteral(); | 1673 Literal* key = property->key()->AsLiteral(); |
1671 Expression* value = property->value(); | 1674 Expression* value = property->value(); |
1672 if (!result_saved) { | 1675 if (!result_saved) { |
1673 __ push(v0); // Save result on stack. | 1676 __ push(v0); // Save result on stack. |
1674 result_saved = true; | 1677 result_saved = true; |
1675 } | 1678 } |
1676 switch (property->kind()) { | 1679 switch (property->kind()) { |
1677 case ObjectLiteral::Property::CONSTANT: | 1680 case ObjectLiteral::Property::CONSTANT: |
1678 UNREACHABLE(); | 1681 UNREACHABLE(); |
1679 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 1682 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
1680 DCHECK(!CompileTimeValue::IsCompileTimeValue(property->value())); | 1683 DCHECK(!CompileTimeValue::IsCompileTimeValue(property->value())); |
1681 // Fall through. | 1684 // Fall through. |
1682 case ObjectLiteral::Property::COMPUTED: | 1685 case ObjectLiteral::Property::COMPUTED: |
1683 // It is safe to use [[Put]] here because the boilerplate already | 1686 // It is safe to use [[Put]] here because the boilerplate already |
1684 // contains computed properties with an uninitialized value. | 1687 // contains computed properties with an uninitialized value. |
1685 if (key->value()->IsInternalizedString()) { | 1688 if (key->value()->IsInternalizedString()) { |
1686 if (property->emit_store()) { | 1689 if (property->emit_store()) { |
1687 VisitForAccumulatorValue(value); | 1690 VisitForAccumulatorValue(value); |
1688 __ mov(StoreDescriptor::ValueRegister(), result_register()); | 1691 __ mov(StoreDescriptor::ValueRegister(), result_register()); |
1689 DCHECK(StoreDescriptor::ValueRegister().is(a0)); | 1692 DCHECK(StoreDescriptor::ValueRegister().is(a0)); |
1690 __ li(StoreDescriptor::NameRegister(), Operand(key->value())); | 1693 __ li(StoreDescriptor::NameRegister(), Operand(key->value())); |
1691 __ ld(StoreDescriptor::ReceiverRegister(), MemOperand(sp)); | 1694 __ ld(StoreDescriptor::ReceiverRegister(), MemOperand(sp)); |
1692 CallStoreIC(key->LiteralFeedbackId()); | 1695 if (FLAG_vector_stores) { |
| 1696 EmitLoadStoreICSlot(expr->GetNthSlot(store_slot_index++)); |
| 1697 CallStoreIC(); |
| 1698 } else { |
| 1699 CallStoreIC(key->LiteralFeedbackId()); |
| 1700 } |
1693 PrepareForBailoutForId(key->id(), NO_REGISTERS); | 1701 PrepareForBailoutForId(key->id(), NO_REGISTERS); |
1694 | 1702 |
1695 if (NeedsHomeObject(value)) { | 1703 if (NeedsHomeObject(value)) { |
1696 __ Move(StoreDescriptor::ReceiverRegister(), v0); | 1704 __ Move(StoreDescriptor::ReceiverRegister(), v0); |
1697 __ li(StoreDescriptor::NameRegister(), | 1705 __ li(StoreDescriptor::NameRegister(), |
1698 Operand(isolate()->factory()->home_object_symbol())); | 1706 Operand(isolate()->factory()->home_object_symbol())); |
1699 __ ld(StoreDescriptor::ValueRegister(), MemOperand(sp)); | 1707 __ ld(StoreDescriptor::ValueRegister(), MemOperand(sp)); |
| 1708 if (FLAG_vector_stores) { |
| 1709 EmitLoadStoreICSlot(expr->GetNthSlot(store_slot_index++)); |
| 1710 } |
1700 CallStoreIC(); | 1711 CallStoreIC(); |
1701 } | 1712 } |
1702 } else { | 1713 } else { |
1703 VisitForEffect(value); | 1714 VisitForEffect(value); |
1704 } | 1715 } |
1705 break; | 1716 break; |
1706 } | 1717 } |
1707 // Duplicate receiver on stack. | 1718 // Duplicate receiver on stack. |
1708 __ ld(a0, MemOperand(sp)); | 1719 __ ld(a0, MemOperand(sp)); |
1709 __ push(a0); | 1720 __ push(a0); |
1710 VisitForStackValue(key); | 1721 VisitForStackValue(key); |
1711 VisitForStackValue(value); | 1722 VisitForStackValue(value); |
1712 if (property->emit_store()) { | 1723 if (property->emit_store()) { |
1713 EmitSetHomeObjectIfNeeded(value, 2); | 1724 EmitSetHomeObjectIfNeeded( |
| 1725 value, 2, expr->SlotForHomeObject(value, &store_slot_index)); |
1714 __ li(a0, Operand(Smi::FromInt(SLOPPY))); // PropertyAttributes. | 1726 __ li(a0, Operand(Smi::FromInt(SLOPPY))); // PropertyAttributes. |
1715 __ push(a0); | 1727 __ push(a0); |
1716 __ CallRuntime(Runtime::kSetProperty, 4); | 1728 __ CallRuntime(Runtime::kSetProperty, 4); |
1717 } else { | 1729 } else { |
1718 __ Drop(3); | 1730 __ Drop(3); |
1719 } | 1731 } |
1720 break; | 1732 break; |
1721 case ObjectLiteral::Property::PROTOTYPE: | 1733 case ObjectLiteral::Property::PROTOTYPE: |
1722 // Duplicate receiver on stack. | 1734 // Duplicate receiver on stack. |
1723 __ ld(a0, MemOperand(sp)); | 1735 __ ld(a0, MemOperand(sp)); |
(...skipping 17 matching lines...) Expand all Loading... |
1741 | 1753 |
1742 // Emit code to define accessors, using only a single call to the runtime for | 1754 // Emit code to define accessors, using only a single call to the runtime for |
1743 // each pair of corresponding getters and setters. | 1755 // each pair of corresponding getters and setters. |
1744 for (AccessorTable::Iterator it = accessor_table.begin(); | 1756 for (AccessorTable::Iterator it = accessor_table.begin(); |
1745 it != accessor_table.end(); | 1757 it != accessor_table.end(); |
1746 ++it) { | 1758 ++it) { |
1747 __ ld(a0, MemOperand(sp)); // Duplicate receiver. | 1759 __ ld(a0, MemOperand(sp)); // Duplicate receiver. |
1748 __ push(a0); | 1760 __ push(a0); |
1749 VisitForStackValue(it->first); | 1761 VisitForStackValue(it->first); |
1750 EmitAccessor(it->second->getter); | 1762 EmitAccessor(it->second->getter); |
1751 EmitSetHomeObjectIfNeeded(it->second->getter, 2); | 1763 EmitSetHomeObjectIfNeeded( |
| 1764 it->second->getter, 2, |
| 1765 expr->SlotForHomeObject(it->second->getter, &store_slot_index)); |
1752 EmitAccessor(it->second->setter); | 1766 EmitAccessor(it->second->setter); |
1753 EmitSetHomeObjectIfNeeded(it->second->setter, 3); | 1767 EmitSetHomeObjectIfNeeded( |
| 1768 it->second->setter, 3, |
| 1769 expr->SlotForHomeObject(it->second->setter, &store_slot_index)); |
1754 __ li(a0, Operand(Smi::FromInt(NONE))); | 1770 __ li(a0, Operand(Smi::FromInt(NONE))); |
1755 __ push(a0); | 1771 __ push(a0); |
1756 __ CallRuntime(Runtime::kDefineAccessorPropertyUnchecked, 5); | 1772 __ CallRuntime(Runtime::kDefineAccessorPropertyUnchecked, 5); |
1757 } | 1773 } |
1758 | 1774 |
1759 // Object literals have two parts. The "static" part on the left contains no | 1775 // Object literals have two parts. The "static" part on the left contains no |
1760 // computed property names, and so we can compute its map ahead of time; see | 1776 // computed property names, and so we can compute its map ahead of time; see |
1761 // runtime.cc::CreateObjectLiteralBoilerplate. The second "dynamic" part | 1777 // runtime.cc::CreateObjectLiteralBoilerplate. The second "dynamic" part |
1762 // starts with the first computed property name, and continues with all | 1778 // starts with the first computed property name, and continues with all |
1763 // properties to its right. All the code from above initializes the static | 1779 // properties to its right. All the code from above initializes the static |
(...skipping 14 matching lines...) Expand all Loading... |
1778 __ push(a0); | 1794 __ push(a0); |
1779 | 1795 |
1780 if (property->kind() == ObjectLiteral::Property::PROTOTYPE) { | 1796 if (property->kind() == ObjectLiteral::Property::PROTOTYPE) { |
1781 DCHECK(!property->is_computed_name()); | 1797 DCHECK(!property->is_computed_name()); |
1782 VisitForStackValue(value); | 1798 VisitForStackValue(value); |
1783 DCHECK(property->emit_store()); | 1799 DCHECK(property->emit_store()); |
1784 __ CallRuntime(Runtime::kInternalSetPrototype, 2); | 1800 __ CallRuntime(Runtime::kInternalSetPrototype, 2); |
1785 } else { | 1801 } else { |
1786 EmitPropertyKey(property, expr->GetIdForProperty(property_index)); | 1802 EmitPropertyKey(property, expr->GetIdForProperty(property_index)); |
1787 VisitForStackValue(value); | 1803 VisitForStackValue(value); |
1788 EmitSetHomeObjectIfNeeded(value, 2); | 1804 EmitSetHomeObjectIfNeeded( |
| 1805 value, 2, expr->SlotForHomeObject(value, &store_slot_index)); |
1789 | 1806 |
1790 switch (property->kind()) { | 1807 switch (property->kind()) { |
1791 case ObjectLiteral::Property::CONSTANT: | 1808 case ObjectLiteral::Property::CONSTANT: |
1792 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 1809 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
1793 case ObjectLiteral::Property::COMPUTED: | 1810 case ObjectLiteral::Property::COMPUTED: |
1794 if (property->emit_store()) { | 1811 if (property->emit_store()) { |
1795 __ li(a0, Operand(Smi::FromInt(NONE))); | 1812 __ li(a0, Operand(Smi::FromInt(NONE))); |
1796 __ push(a0); | 1813 __ push(a0); |
1797 __ CallRuntime(Runtime::kDefineDataPropertyUnchecked, 4); | 1814 __ CallRuntime(Runtime::kDefineDataPropertyUnchecked, 4); |
1798 } else { | 1815 } else { |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1940 } | 1957 } |
1941 } | 1958 } |
1942 | 1959 |
1943 | 1960 |
1944 void FullCodeGenerator::VisitAssignment(Assignment* expr) { | 1961 void FullCodeGenerator::VisitAssignment(Assignment* expr) { |
1945 DCHECK(expr->target()->IsValidReferenceExpression()); | 1962 DCHECK(expr->target()->IsValidReferenceExpression()); |
1946 | 1963 |
1947 Comment cmnt(masm_, "[ Assignment"); | 1964 Comment cmnt(masm_, "[ Assignment"); |
1948 | 1965 |
1949 Property* property = expr->target()->AsProperty(); | 1966 Property* property = expr->target()->AsProperty(); |
1950 LhsKind assign_type = GetAssignType(property); | 1967 LhsKind assign_type = Property::GetAssignType(property); |
1951 | 1968 |
1952 // Evaluate LHS expression. | 1969 // Evaluate LHS expression. |
1953 switch (assign_type) { | 1970 switch (assign_type) { |
1954 case VARIABLE: | 1971 case VARIABLE: |
1955 // Nothing to do here. | 1972 // Nothing to do here. |
1956 break; | 1973 break; |
1957 case NAMED_PROPERTY: | 1974 case NAMED_PROPERTY: |
1958 if (expr->is_compound()) { | 1975 if (expr->is_compound()) { |
1959 // We need the receiver both on the stack and in the register. | 1976 // We need the receiver both on the stack and in the register. |
1960 VisitForStackValue(property->obj()); | 1977 VisitForStackValue(property->obj()); |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2051 VisitForAccumulatorValue(expr->value()); | 2068 VisitForAccumulatorValue(expr->value()); |
2052 } | 2069 } |
2053 | 2070 |
2054 // Record source position before possible IC call. | 2071 // Record source position before possible IC call. |
2055 SetSourcePosition(expr->position()); | 2072 SetSourcePosition(expr->position()); |
2056 | 2073 |
2057 // Store the value. | 2074 // Store the value. |
2058 switch (assign_type) { | 2075 switch (assign_type) { |
2059 case VARIABLE: | 2076 case VARIABLE: |
2060 EmitVariableAssignment(expr->target()->AsVariableProxy()->var(), | 2077 EmitVariableAssignment(expr->target()->AsVariableProxy()->var(), |
2061 expr->op()); | 2078 expr->op(), expr->AssignmentSlot()); |
2062 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 2079 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
2063 context()->Plug(v0); | 2080 context()->Plug(v0); |
2064 break; | 2081 break; |
2065 case NAMED_PROPERTY: | 2082 case NAMED_PROPERTY: |
2066 EmitNamedPropertyAssignment(expr); | 2083 EmitNamedPropertyAssignment(expr); |
2067 break; | 2084 break; |
2068 case NAMED_SUPER_PROPERTY: | 2085 case NAMED_SUPER_PROPERTY: |
2069 EmitNamedSuperPropertyStore(property); | 2086 EmitNamedSuperPropertyStore(property); |
2070 context()->Plug(v0); | 2087 context()->Plug(v0); |
2071 break; | 2088 break; |
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2576 __ pop(a1); | 2593 __ pop(a1); |
2577 Handle<Code> code = CodeFactory::BinaryOpIC( | 2594 Handle<Code> code = CodeFactory::BinaryOpIC( |
2578 isolate(), op, language_mode()).code(); | 2595 isolate(), op, language_mode()).code(); |
2579 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code. | 2596 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code. |
2580 CallIC(code, expr->BinaryOperationFeedbackId()); | 2597 CallIC(code, expr->BinaryOperationFeedbackId()); |
2581 patch_site.EmitPatchInfo(); | 2598 patch_site.EmitPatchInfo(); |
2582 context()->Plug(v0); | 2599 context()->Plug(v0); |
2583 } | 2600 } |
2584 | 2601 |
2585 | 2602 |
2586 void FullCodeGenerator::EmitAssignment(Expression* expr) { | 2603 void FullCodeGenerator::EmitAssignment(Expression* expr, |
| 2604 FeedbackVectorICSlot slot) { |
2587 DCHECK(expr->IsValidReferenceExpression()); | 2605 DCHECK(expr->IsValidReferenceExpression()); |
2588 | 2606 |
2589 Property* prop = expr->AsProperty(); | 2607 Property* prop = expr->AsProperty(); |
2590 LhsKind assign_type = GetAssignType(prop); | 2608 LhsKind assign_type = Property::GetAssignType(prop); |
2591 | 2609 |
2592 switch (assign_type) { | 2610 switch (assign_type) { |
2593 case VARIABLE: { | 2611 case VARIABLE: { |
2594 Variable* var = expr->AsVariableProxy()->var(); | 2612 Variable* var = expr->AsVariableProxy()->var(); |
2595 EffectContext context(this); | 2613 EffectContext context(this); |
2596 EmitVariableAssignment(var, Token::ASSIGN); | 2614 EmitVariableAssignment(var, Token::ASSIGN, slot); |
2597 break; | 2615 break; |
2598 } | 2616 } |
2599 case NAMED_PROPERTY: { | 2617 case NAMED_PROPERTY: { |
2600 __ push(result_register()); // Preserve value. | 2618 __ push(result_register()); // Preserve value. |
2601 VisitForAccumulatorValue(prop->obj()); | 2619 VisitForAccumulatorValue(prop->obj()); |
2602 __ mov(StoreDescriptor::ReceiverRegister(), result_register()); | 2620 __ mov(StoreDescriptor::ReceiverRegister(), result_register()); |
2603 __ pop(StoreDescriptor::ValueRegister()); // Restore value. | 2621 __ pop(StoreDescriptor::ValueRegister()); // Restore value. |
2604 __ li(StoreDescriptor::NameRegister(), | 2622 __ li(StoreDescriptor::NameRegister(), |
2605 Operand(prop->key()->AsLiteral()->value())); | 2623 Operand(prop->key()->AsLiteral()->value())); |
| 2624 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot); |
2606 CallStoreIC(); | 2625 CallStoreIC(); |
2607 break; | 2626 break; |
2608 } | 2627 } |
2609 case NAMED_SUPER_PROPERTY: { | 2628 case NAMED_SUPER_PROPERTY: { |
2610 __ Push(v0); | 2629 __ Push(v0); |
2611 VisitForStackValue(prop->obj()->AsSuperReference()->this_var()); | 2630 VisitForStackValue(prop->obj()->AsSuperReference()->this_var()); |
2612 EmitLoadHomeObject(prop->obj()->AsSuperReference()); | 2631 EmitLoadHomeObject(prop->obj()->AsSuperReference()); |
2613 // stack: value, this; v0: home_object | 2632 // stack: value, this; v0: home_object |
2614 Register scratch = a2; | 2633 Register scratch = a2; |
2615 Register scratch2 = a3; | 2634 Register scratch2 = a3; |
(...skipping 26 matching lines...) Expand all Loading... |
2642 EmitKeyedSuperPropertyStore(prop); | 2661 EmitKeyedSuperPropertyStore(prop); |
2643 break; | 2662 break; |
2644 } | 2663 } |
2645 case KEYED_PROPERTY: { | 2664 case KEYED_PROPERTY: { |
2646 __ push(result_register()); // Preserve value. | 2665 __ push(result_register()); // Preserve value. |
2647 VisitForStackValue(prop->obj()); | 2666 VisitForStackValue(prop->obj()); |
2648 VisitForAccumulatorValue(prop->key()); | 2667 VisitForAccumulatorValue(prop->key()); |
2649 __ Move(StoreDescriptor::NameRegister(), result_register()); | 2668 __ Move(StoreDescriptor::NameRegister(), result_register()); |
2650 __ Pop(StoreDescriptor::ValueRegister(), | 2669 __ Pop(StoreDescriptor::ValueRegister(), |
2651 StoreDescriptor::ReceiverRegister()); | 2670 StoreDescriptor::ReceiverRegister()); |
| 2671 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot); |
2652 Handle<Code> ic = | 2672 Handle<Code> ic = |
2653 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); | 2673 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); |
2654 CallIC(ic); | 2674 CallIC(ic); |
2655 break; | 2675 break; |
2656 } | 2676 } |
2657 } | 2677 } |
2658 context()->Plug(v0); | 2678 context()->Plug(v0); |
2659 } | 2679 } |
2660 | 2680 |
2661 | 2681 |
2662 void FullCodeGenerator::EmitStoreToStackLocalOrContextSlot( | 2682 void FullCodeGenerator::EmitStoreToStackLocalOrContextSlot( |
2663 Variable* var, MemOperand location) { | 2683 Variable* var, MemOperand location) { |
2664 __ sd(result_register(), location); | 2684 __ sd(result_register(), location); |
2665 if (var->IsContextSlot()) { | 2685 if (var->IsContextSlot()) { |
2666 // RecordWrite may destroy all its register arguments. | 2686 // RecordWrite may destroy all its register arguments. |
2667 __ Move(a3, result_register()); | 2687 __ Move(a3, result_register()); |
2668 int offset = Context::SlotOffset(var->index()); | 2688 int offset = Context::SlotOffset(var->index()); |
2669 __ RecordWriteContextSlot( | 2689 __ RecordWriteContextSlot( |
2670 a1, offset, a3, a2, kRAHasBeenSaved, kDontSaveFPRegs); | 2690 a1, offset, a3, a2, kRAHasBeenSaved, kDontSaveFPRegs); |
2671 } | 2691 } |
2672 } | 2692 } |
2673 | 2693 |
2674 | 2694 |
2675 void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op) { | 2695 void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op, |
| 2696 FeedbackVectorICSlot slot) { |
2676 if (var->IsUnallocated()) { | 2697 if (var->IsUnallocated()) { |
2677 // Global var, const, or let. | 2698 // Global var, const, or let. |
2678 __ mov(StoreDescriptor::ValueRegister(), result_register()); | 2699 __ mov(StoreDescriptor::ValueRegister(), result_register()); |
2679 __ li(StoreDescriptor::NameRegister(), Operand(var->name())); | 2700 __ li(StoreDescriptor::NameRegister(), Operand(var->name())); |
2680 __ ld(StoreDescriptor::ReceiverRegister(), GlobalObjectOperand()); | 2701 __ ld(StoreDescriptor::ReceiverRegister(), GlobalObjectOperand()); |
| 2702 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot); |
2681 CallStoreIC(); | 2703 CallStoreIC(); |
2682 | 2704 |
2683 } else if (var->mode() == LET && op != Token::INIT_LET) { | 2705 } else if (var->mode() == LET && op != Token::INIT_LET) { |
2684 // Non-initializing assignment to let variable needs a write barrier. | 2706 // Non-initializing assignment to let variable needs a write barrier. |
2685 DCHECK(!var->IsLookupSlot()); | 2707 DCHECK(!var->IsLookupSlot()); |
2686 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); | 2708 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); |
2687 Label assign; | 2709 Label assign; |
2688 MemOperand location = VarOperand(var, a1); | 2710 MemOperand location = VarOperand(var, a1); |
2689 __ ld(a3, location); | 2711 __ ld(a3, location); |
2690 __ LoadRoot(a4, Heap::kTheHoleValueRootIndex); | 2712 __ LoadRoot(a4, Heap::kTheHoleValueRootIndex); |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2769 Property* prop = expr->target()->AsProperty(); | 2791 Property* prop = expr->target()->AsProperty(); |
2770 DCHECK(prop != NULL); | 2792 DCHECK(prop != NULL); |
2771 DCHECK(prop->key()->IsLiteral()); | 2793 DCHECK(prop->key()->IsLiteral()); |
2772 | 2794 |
2773 // Record source code position before IC call. | 2795 // Record source code position before IC call. |
2774 SetSourcePosition(expr->position()); | 2796 SetSourcePosition(expr->position()); |
2775 __ mov(StoreDescriptor::ValueRegister(), result_register()); | 2797 __ mov(StoreDescriptor::ValueRegister(), result_register()); |
2776 __ li(StoreDescriptor::NameRegister(), | 2798 __ li(StoreDescriptor::NameRegister(), |
2777 Operand(prop->key()->AsLiteral()->value())); | 2799 Operand(prop->key()->AsLiteral()->value())); |
2778 __ pop(StoreDescriptor::ReceiverRegister()); | 2800 __ pop(StoreDescriptor::ReceiverRegister()); |
2779 CallStoreIC(expr->AssignmentFeedbackId()); | 2801 if (FLAG_vector_stores) { |
| 2802 EmitLoadStoreICSlot(expr->AssignmentSlot()); |
| 2803 CallStoreIC(); |
| 2804 } else { |
| 2805 CallStoreIC(expr->AssignmentFeedbackId()); |
| 2806 } |
2780 | 2807 |
2781 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 2808 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
2782 context()->Plug(v0); | 2809 context()->Plug(v0); |
2783 } | 2810 } |
2784 | 2811 |
2785 | 2812 |
2786 void FullCodeGenerator::EmitNamedSuperPropertyStore(Property* prop) { | 2813 void FullCodeGenerator::EmitNamedSuperPropertyStore(Property* prop) { |
2787 // Assignment to named property of super. | 2814 // Assignment to named property of super. |
2788 // v0 : value | 2815 // v0 : value |
2789 // stack : receiver ('this'), home_object | 2816 // stack : receiver ('this'), home_object |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2822 // The arguments are: | 2849 // The arguments are: |
2823 // - a0 is the value, | 2850 // - a0 is the value, |
2824 // - a1 is the key, | 2851 // - a1 is the key, |
2825 // - a2 is the receiver. | 2852 // - a2 is the receiver. |
2826 __ mov(StoreDescriptor::ValueRegister(), result_register()); | 2853 __ mov(StoreDescriptor::ValueRegister(), result_register()); |
2827 __ Pop(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister()); | 2854 __ Pop(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister()); |
2828 DCHECK(StoreDescriptor::ValueRegister().is(a0)); | 2855 DCHECK(StoreDescriptor::ValueRegister().is(a0)); |
2829 | 2856 |
2830 Handle<Code> ic = | 2857 Handle<Code> ic = |
2831 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); | 2858 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); |
2832 CallIC(ic, expr->AssignmentFeedbackId()); | 2859 if (FLAG_vector_stores) { |
| 2860 EmitLoadStoreICSlot(expr->AssignmentSlot()); |
| 2861 CallIC(ic); |
| 2862 } else { |
| 2863 CallIC(ic, expr->AssignmentFeedbackId()); |
| 2864 } |
2833 | 2865 |
2834 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 2866 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
2835 context()->Plug(v0); | 2867 context()->Plug(v0); |
2836 } | 2868 } |
2837 | 2869 |
2838 | 2870 |
2839 void FullCodeGenerator::VisitProperty(Property* expr) { | 2871 void FullCodeGenerator::VisitProperty(Property* expr) { |
2840 Comment cmnt(masm_, "[ Property"); | 2872 Comment cmnt(masm_, "[ Property"); |
2841 Expression* key = expr->key(); | 2873 Expression* key = expr->key(); |
2842 | 2874 |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3061 | 3093 |
3062 | 3094 |
3063 void FullCodeGenerator::EmitLoadSuperConstructor() { | 3095 void FullCodeGenerator::EmitLoadSuperConstructor() { |
3064 __ ld(a0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 3096 __ ld(a0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
3065 __ Push(a0); | 3097 __ Push(a0); |
3066 __ CallRuntime(Runtime::kGetPrototype, 1); | 3098 __ CallRuntime(Runtime::kGetPrototype, 1); |
3067 } | 3099 } |
3068 | 3100 |
3069 | 3101 |
3070 void FullCodeGenerator::EmitInitializeThisAfterSuper( | 3102 void FullCodeGenerator::EmitInitializeThisAfterSuper( |
3071 SuperReference* super_ref) { | 3103 SuperReference* super_ref, FeedbackVectorICSlot slot) { |
3072 Variable* this_var = super_ref->this_var()->var(); | 3104 Variable* this_var = super_ref->this_var()->var(); |
3073 GetVar(a1, this_var); | 3105 GetVar(a1, this_var); |
3074 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); | 3106 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); |
3075 Label uninitialized_this; | 3107 Label uninitialized_this; |
3076 __ Branch(&uninitialized_this, eq, a1, Operand(at)); | 3108 __ Branch(&uninitialized_this, eq, a1, Operand(at)); |
3077 __ li(a0, Operand(this_var->name())); | 3109 __ li(a0, Operand(this_var->name())); |
3078 __ Push(a0); | 3110 __ Push(a0); |
3079 __ CallRuntime(Runtime::kThrowReferenceError, 1); | 3111 __ CallRuntime(Runtime::kThrowReferenceError, 1); |
3080 __ bind(&uninitialized_this); | 3112 __ bind(&uninitialized_this); |
3081 | 3113 |
3082 EmitVariableAssignment(this_var, Token::INIT_CONST); | 3114 EmitVariableAssignment(this_var, Token::INIT_CONST, slot); |
3083 } | 3115 } |
3084 | 3116 |
3085 | 3117 |
3086 void FullCodeGenerator::VisitCall(Call* expr) { | 3118 void FullCodeGenerator::VisitCall(Call* expr) { |
3087 #ifdef DEBUG | 3119 #ifdef DEBUG |
3088 // We want to verify that RecordJSReturnSite gets called on all paths | 3120 // We want to verify that RecordJSReturnSite gets called on all paths |
3089 // through this function. Avoid early returns. | 3121 // through this function. Avoid early returns. |
3090 expr->return_is_recorded_ = false; | 3122 expr->return_is_recorded_ = false; |
3091 #endif | 3123 #endif |
3092 | 3124 |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3297 __ li(a2, FeedbackVector()); | 3329 __ li(a2, FeedbackVector()); |
3298 __ li(a3, Operand(SmiFromSlot(expr->CallFeedbackSlot()))); | 3330 __ li(a3, Operand(SmiFromSlot(expr->CallFeedbackSlot()))); |
3299 | 3331 |
3300 CallConstructStub stub(isolate(), SUPER_CALL_RECORD_TARGET); | 3332 CallConstructStub stub(isolate(), SUPER_CALL_RECORD_TARGET); |
3301 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); | 3333 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); |
3302 | 3334 |
3303 __ Drop(1); | 3335 __ Drop(1); |
3304 | 3336 |
3305 RecordJSReturnSite(expr); | 3337 RecordJSReturnSite(expr); |
3306 | 3338 |
3307 EmitInitializeThisAfterSuper(expr->expression()->AsSuperReference()); | 3339 EmitInitializeThisAfterSuper(expr->expression()->AsSuperReference(), |
| 3340 expr->CallFeedbackICSlot()); |
3308 context()->Plug(v0); | 3341 context()->Plug(v0); |
3309 } | 3342 } |
3310 | 3343 |
3311 | 3344 |
3312 void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) { | 3345 void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) { |
3313 ZoneList<Expression*>* args = expr->arguments(); | 3346 ZoneList<Expression*>* args = expr->arguments(); |
3314 DCHECK(args->length() == 1); | 3347 DCHECK(args->length() == 1); |
3315 | 3348 |
3316 VisitForAccumulatorValue(args->at(0)); | 3349 VisitForAccumulatorValue(args->at(0)); |
3317 | 3350 |
(...skipping 1304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4622 // Push NewTarget | 4655 // Push NewTarget |
4623 DCHECK(args->at(2)->IsVariableProxy()); | 4656 DCHECK(args->at(2)->IsVariableProxy()); |
4624 VisitForStackValue(args->at(2)); | 4657 VisitForStackValue(args->at(2)); |
4625 | 4658 |
4626 EmitCallJSRuntimeFunction(call); | 4659 EmitCallJSRuntimeFunction(call); |
4627 | 4660 |
4628 // Restore context register. | 4661 // Restore context register. |
4629 __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 4662 __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
4630 context()->DropAndPlug(1, v0); | 4663 context()->DropAndPlug(1, v0); |
4631 | 4664 |
| 4665 // TODO(mvstanton): with FLAG_vector_stores this needs a slot id. |
4632 EmitInitializeThisAfterSuper(super_reference); | 4666 EmitInitializeThisAfterSuper(super_reference); |
4633 } | 4667 } |
4634 | 4668 |
4635 | 4669 |
4636 void FullCodeGenerator::EmitLoadJSRuntimeFunction(CallRuntime* expr) { | 4670 void FullCodeGenerator::EmitLoadJSRuntimeFunction(CallRuntime* expr) { |
4637 // Push the builtins object as the receiver. | 4671 // Push the builtins object as the receiver. |
4638 Register receiver = LoadDescriptor::ReceiverRegister(); | 4672 Register receiver = LoadDescriptor::ReceiverRegister(); |
4639 __ ld(receiver, GlobalObjectOperand()); | 4673 __ ld(receiver, GlobalObjectOperand()); |
4640 __ ld(receiver, FieldMemOperand(receiver, GlobalObject::kBuiltinsOffset)); | 4674 __ ld(receiver, FieldMemOperand(receiver, GlobalObject::kBuiltinsOffset)); |
4641 __ push(receiver); | 4675 __ push(receiver); |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4823 } | 4857 } |
4824 | 4858 |
4825 | 4859 |
4826 void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { | 4860 void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
4827 DCHECK(expr->expression()->IsValidReferenceExpression()); | 4861 DCHECK(expr->expression()->IsValidReferenceExpression()); |
4828 | 4862 |
4829 Comment cmnt(masm_, "[ CountOperation"); | 4863 Comment cmnt(masm_, "[ CountOperation"); |
4830 SetSourcePosition(expr->position()); | 4864 SetSourcePosition(expr->position()); |
4831 | 4865 |
4832 Property* prop = expr->expression()->AsProperty(); | 4866 Property* prop = expr->expression()->AsProperty(); |
4833 LhsKind assign_type = GetAssignType(prop); | 4867 LhsKind assign_type = Property::GetAssignType(prop); |
4834 | 4868 |
4835 // Evaluate expression and get value. | 4869 // Evaluate expression and get value. |
4836 if (assign_type == VARIABLE) { | 4870 if (assign_type == VARIABLE) { |
4837 DCHECK(expr->expression()->AsVariableProxy()->var() != NULL); | 4871 DCHECK(expr->expression()->AsVariableProxy()->var() != NULL); |
4838 AccumulatorValueContext context(this); | 4872 AccumulatorValueContext context(this); |
4839 EmitVariableLoad(expr->expression()->AsVariableProxy()); | 4873 EmitVariableLoad(expr->expression()->AsVariableProxy()); |
4840 } else { | 4874 } else { |
4841 // Reserve space for result of postfix operation. | 4875 // Reserve space for result of postfix operation. |
4842 if (expr->is_postfix() && !context()->IsEffect()) { | 4876 if (expr->is_postfix() && !context()->IsEffect()) { |
4843 __ li(at, Operand(Smi::FromInt(0))); | 4877 __ li(at, Operand(Smi::FromInt(0))); |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4988 CallIC(code, expr->CountBinOpFeedbackId()); | 5022 CallIC(code, expr->CountBinOpFeedbackId()); |
4989 patch_site.EmitPatchInfo(); | 5023 patch_site.EmitPatchInfo(); |
4990 __ bind(&done); | 5024 __ bind(&done); |
4991 | 5025 |
4992 // Store the value returned in v0. | 5026 // Store the value returned in v0. |
4993 switch (assign_type) { | 5027 switch (assign_type) { |
4994 case VARIABLE: | 5028 case VARIABLE: |
4995 if (expr->is_postfix()) { | 5029 if (expr->is_postfix()) { |
4996 { EffectContext context(this); | 5030 { EffectContext context(this); |
4997 EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(), | 5031 EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(), |
4998 Token::ASSIGN); | 5032 Token::ASSIGN, expr->CountSlot()); |
4999 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 5033 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
5000 context.Plug(v0); | 5034 context.Plug(v0); |
5001 } | 5035 } |
5002 // For all contexts except EffectConstant we have the result on | 5036 // For all contexts except EffectConstant we have the result on |
5003 // top of the stack. | 5037 // top of the stack. |
5004 if (!context()->IsEffect()) { | 5038 if (!context()->IsEffect()) { |
5005 context()->PlugTOS(); | 5039 context()->PlugTOS(); |
5006 } | 5040 } |
5007 } else { | 5041 } else { |
5008 EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(), | 5042 EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(), |
5009 Token::ASSIGN); | 5043 Token::ASSIGN); |
5010 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 5044 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
5011 context()->Plug(v0); | 5045 context()->Plug(v0); |
5012 } | 5046 } |
5013 break; | 5047 break; |
5014 case NAMED_PROPERTY: { | 5048 case NAMED_PROPERTY: { |
5015 __ mov(StoreDescriptor::ValueRegister(), result_register()); | 5049 __ mov(StoreDescriptor::ValueRegister(), result_register()); |
5016 __ li(StoreDescriptor::NameRegister(), | 5050 __ li(StoreDescriptor::NameRegister(), |
5017 Operand(prop->key()->AsLiteral()->value())); | 5051 Operand(prop->key()->AsLiteral()->value())); |
5018 __ pop(StoreDescriptor::ReceiverRegister()); | 5052 __ pop(StoreDescriptor::ReceiverRegister()); |
5019 CallStoreIC(expr->CountStoreFeedbackId()); | 5053 if (FLAG_vector_stores) { |
| 5054 EmitLoadStoreICSlot(expr->CountSlot()); |
| 5055 CallStoreIC(); |
| 5056 } else { |
| 5057 CallStoreIC(expr->CountStoreFeedbackId()); |
| 5058 } |
5020 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 5059 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
5021 if (expr->is_postfix()) { | 5060 if (expr->is_postfix()) { |
5022 if (!context()->IsEffect()) { | 5061 if (!context()->IsEffect()) { |
5023 context()->PlugTOS(); | 5062 context()->PlugTOS(); |
5024 } | 5063 } |
5025 } else { | 5064 } else { |
5026 context()->Plug(v0); | 5065 context()->Plug(v0); |
5027 } | 5066 } |
5028 break; | 5067 break; |
5029 } | 5068 } |
(...skipping 18 matching lines...) Expand all Loading... |
5048 context()->Plug(v0); | 5087 context()->Plug(v0); |
5049 } | 5088 } |
5050 break; | 5089 break; |
5051 } | 5090 } |
5052 case KEYED_PROPERTY: { | 5091 case KEYED_PROPERTY: { |
5053 __ mov(StoreDescriptor::ValueRegister(), result_register()); | 5092 __ mov(StoreDescriptor::ValueRegister(), result_register()); |
5054 __ Pop(StoreDescriptor::ReceiverRegister(), | 5093 __ Pop(StoreDescriptor::ReceiverRegister(), |
5055 StoreDescriptor::NameRegister()); | 5094 StoreDescriptor::NameRegister()); |
5056 Handle<Code> ic = | 5095 Handle<Code> ic = |
5057 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); | 5096 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); |
5058 CallIC(ic, expr->CountStoreFeedbackId()); | 5097 if (FLAG_vector_stores) { |
| 5098 EmitLoadStoreICSlot(expr->CountSlot()); |
| 5099 CallIC(ic); |
| 5100 } else { |
| 5101 CallIC(ic, expr->CountStoreFeedbackId()); |
| 5102 } |
5059 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 5103 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
5060 if (expr->is_postfix()) { | 5104 if (expr->is_postfix()) { |
5061 if (!context()->IsEffect()) { | 5105 if (!context()->IsEffect()) { |
5062 context()->PlugTOS(); | 5106 context()->PlugTOS(); |
5063 } | 5107 } |
5064 } else { | 5108 } else { |
5065 context()->Plug(v0); | 5109 context()->Plug(v0); |
5066 } | 5110 } |
5067 break; | 5111 break; |
5068 } | 5112 } |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5380 void FullCodeGenerator::ClearPendingMessage() { | 5424 void FullCodeGenerator::ClearPendingMessage() { |
5381 DCHECK(!result_register().is(a1)); | 5425 DCHECK(!result_register().is(a1)); |
5382 ExternalReference pending_message_obj = | 5426 ExternalReference pending_message_obj = |
5383 ExternalReference::address_of_pending_message_obj(isolate()); | 5427 ExternalReference::address_of_pending_message_obj(isolate()); |
5384 __ LoadRoot(a1, Heap::kTheHoleValueRootIndex); | 5428 __ LoadRoot(a1, Heap::kTheHoleValueRootIndex); |
5385 __ li(at, Operand(pending_message_obj)); | 5429 __ li(at, Operand(pending_message_obj)); |
5386 __ sd(a1, MemOperand(at)); | 5430 __ sd(a1, MemOperand(at)); |
5387 } | 5431 } |
5388 | 5432 |
5389 | 5433 |
| 5434 void FullCodeGenerator::EmitLoadStoreICSlot(FeedbackVectorICSlot slot) { |
| 5435 DCHECK(FLAG_vector_stores && !slot.IsInvalid()); |
| 5436 __ li(VectorStoreICTrampolineDescriptor::SlotRegister(), |
| 5437 Operand(SmiFromSlot(slot))); |
| 5438 } |
| 5439 |
| 5440 |
5390 #undef __ | 5441 #undef __ |
5391 | 5442 |
5392 | 5443 |
5393 void BackEdgeTable::PatchAt(Code* unoptimized_code, | 5444 void BackEdgeTable::PatchAt(Code* unoptimized_code, |
5394 Address pc, | 5445 Address pc, |
5395 BackEdgeState target_state, | 5446 BackEdgeState target_state, |
5396 Code* replacement_code) { | 5447 Code* replacement_code) { |
5397 static const int kInstrSize = Assembler::kInstrSize; | 5448 static const int kInstrSize = Assembler::kInstrSize; |
5398 Address branch_address = pc - 8 * kInstrSize; | 5449 Address branch_address = pc - 8 * kInstrSize; |
5399 CodePatcher patcher(branch_address, 1); | 5450 CodePatcher patcher(branch_address, 1); |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5466 Assembler::target_address_at(pc_immediate_load_address)) == | 5517 Assembler::target_address_at(pc_immediate_load_address)) == |
5467 reinterpret_cast<uint64_t>( | 5518 reinterpret_cast<uint64_t>( |
5468 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5519 isolate->builtins()->OsrAfterStackCheck()->entry())); |
5469 return OSR_AFTER_STACK_CHECK; | 5520 return OSR_AFTER_STACK_CHECK; |
5470 } | 5521 } |
5471 | 5522 |
5472 | 5523 |
5473 } } // namespace v8::internal | 5524 } } // namespace v8::internal |
5474 | 5525 |
5475 #endif // V8_TARGET_ARCH_MIPS64 | 5526 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |