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 1229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1240 __ CallStub(&stub); | 1240 __ CallStub(&stub); |
1241 } else { | 1241 } else { |
1242 __ Push(info); | 1242 __ Push(info); |
1243 __ CallRuntime( | 1243 __ CallRuntime( |
1244 pretenure ? Runtime::kNewClosure_Tenured : Runtime::kNewClosure, 1); | 1244 pretenure ? Runtime::kNewClosure_Tenured : Runtime::kNewClosure, 1); |
1245 } | 1245 } |
1246 context()->Plug(v0); | 1246 context()->Plug(v0); |
1247 } | 1247 } |
1248 | 1248 |
1249 | 1249 |
1250 void FullCodeGenerator::EmitSetHomeObjectIfNeeded(Expression* initializer, | 1250 void FullCodeGenerator::EmitSetHomeObject(Expression* initializer, int offset, |
1251 int offset, | 1251 FeedbackVectorICSlot slot) { |
1252 FeedbackVectorICSlot slot) { | 1252 DCHECK(NeedsHomeObject(initializer)); |
1253 if (NeedsHomeObject(initializer)) { | 1253 __ ld(StoreDescriptor::ReceiverRegister(), MemOperand(sp)); |
1254 __ ld(StoreDescriptor::ReceiverRegister(), MemOperand(sp)); | 1254 __ li(StoreDescriptor::NameRegister(), |
1255 __ li(StoreDescriptor::NameRegister(), | 1255 Operand(isolate()->factory()->home_object_symbol())); |
1256 Operand(isolate()->factory()->home_object_symbol())); | 1256 __ ld(StoreDescriptor::ValueRegister(), |
1257 __ ld(StoreDescriptor::ValueRegister(), | 1257 MemOperand(sp, offset * kPointerSize)); |
1258 MemOperand(sp, offset * kPointerSize)); | 1258 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot); |
1259 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot); | 1259 CallStoreIC(); |
1260 CallStoreIC(); | |
1261 } | |
1262 } | 1260 } |
1263 | 1261 |
1264 | 1262 |
| 1263 void FullCodeGenerator::EmitSetHomeObjectAccumulator( |
| 1264 Expression* initializer, int offset, FeedbackVectorICSlot slot) { |
| 1265 DCHECK(NeedsHomeObject(initializer)); |
| 1266 __ Move(StoreDescriptor::ReceiverRegister(), v0); |
| 1267 __ li(StoreDescriptor::NameRegister(), |
| 1268 Operand(isolate()->factory()->home_object_symbol())); |
| 1269 __ ld(StoreDescriptor::ValueRegister(), |
| 1270 MemOperand(sp, offset * kPointerSize)); |
| 1271 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot); |
| 1272 CallStoreIC(); |
| 1273 } |
| 1274 |
| 1275 |
1265 void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy, | 1276 void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy, |
1266 TypeofMode typeof_mode, | 1277 TypeofMode typeof_mode, |
1267 Label* slow) { | 1278 Label* slow) { |
1268 Register current = cp; | 1279 Register current = cp; |
1269 Register next = a1; | 1280 Register next = a1; |
1270 Register temp = a2; | 1281 Register temp = a2; |
1271 | 1282 |
1272 Scope* s = scope(); | 1283 Scope* s = scope(); |
1273 while (s != NULL) { | 1284 while (s != NULL) { |
1274 if (s->num_heap_slots() > 0) { | 1285 if (s->num_heap_slots() > 0) { |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1521 | 1532 |
1522 // After this, registers are used as follows: | 1533 // After this, registers are used as follows: |
1523 // v0: Newly allocated regexp. | 1534 // v0: Newly allocated regexp. |
1524 // a5: Materialized regexp. | 1535 // a5: Materialized regexp. |
1525 // a2: temp. | 1536 // a2: temp. |
1526 __ CopyFields(v0, a5, a2.bit(), size / kPointerSize); | 1537 __ CopyFields(v0, a5, a2.bit(), size / kPointerSize); |
1527 context()->Plug(v0); | 1538 context()->Plug(v0); |
1528 } | 1539 } |
1529 | 1540 |
1530 | 1541 |
1531 void FullCodeGenerator::EmitAccessor(Expression* expression) { | 1542 void FullCodeGenerator::EmitAccessor(ObjectLiteralProperty* property) { |
| 1543 Expression* expression = (property == NULL) ? NULL : property->value(); |
1532 if (expression == NULL) { | 1544 if (expression == NULL) { |
1533 __ LoadRoot(a1, Heap::kNullValueRootIndex); | 1545 __ LoadRoot(a1, Heap::kNullValueRootIndex); |
1534 __ push(a1); | 1546 __ push(a1); |
1535 } else { | 1547 } else { |
1536 VisitForStackValue(expression); | 1548 VisitForStackValue(expression); |
| 1549 if (NeedsHomeObject(expression)) { |
| 1550 DCHECK(property->kind() == ObjectLiteral::Property::GETTER || |
| 1551 property->kind() == ObjectLiteral::Property::SETTER); |
| 1552 int offset = property->kind() == ObjectLiteral::Property::GETTER ? 2 : 3; |
| 1553 EmitSetHomeObject(expression, offset, property->GetSlot()); |
| 1554 } |
1537 } | 1555 } |
1538 } | 1556 } |
1539 | 1557 |
1540 | 1558 |
1541 void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { | 1559 void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { |
1542 Comment cmnt(masm_, "[ ObjectLiteral"); | 1560 Comment cmnt(masm_, "[ ObjectLiteral"); |
1543 | 1561 |
1544 Handle<FixedArray> constant_properties = expr->constant_properties(); | 1562 Handle<FixedArray> constant_properties = expr->constant_properties(); |
1545 __ ld(a3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 1563 __ ld(a3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
1546 __ ld(a3, FieldMemOperand(a3, JSFunction::kLiteralsOffset)); | 1564 __ ld(a3, FieldMemOperand(a3, JSFunction::kLiteralsOffset)); |
1547 __ li(a2, Operand(Smi::FromInt(expr->literal_index()))); | 1565 __ li(a2, Operand(Smi::FromInt(expr->literal_index()))); |
1548 __ li(a1, Operand(constant_properties)); | 1566 __ li(a1, Operand(constant_properties)); |
1549 __ li(a0, Operand(Smi::FromInt(expr->ComputeFlags()))); | 1567 __ li(a0, Operand(Smi::FromInt(expr->ComputeFlags()))); |
1550 if (MustCreateObjectLiteralWithRuntime(expr)) { | 1568 if (MustCreateObjectLiteralWithRuntime(expr)) { |
1551 __ Push(a3, a2, a1, a0); | 1569 __ Push(a3, a2, a1, a0); |
1552 __ CallRuntime(Runtime::kCreateObjectLiteral, 4); | 1570 __ CallRuntime(Runtime::kCreateObjectLiteral, 4); |
1553 } else { | 1571 } else { |
1554 FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); | 1572 FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); |
1555 __ CallStub(&stub); | 1573 __ CallStub(&stub); |
1556 } | 1574 } |
1557 PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); | 1575 PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); |
1558 | 1576 |
1559 // If result_saved is true the result is on top of the stack. If | 1577 // If result_saved is true the result is on top of the stack. If |
1560 // result_saved is false the result is in v0. | 1578 // result_saved is false the result is in v0. |
1561 bool result_saved = false; | 1579 bool result_saved = false; |
1562 | 1580 |
1563 AccessorTable accessor_table(zone()); | 1581 AccessorTable accessor_table(zone()); |
1564 int property_index = 0; | 1582 int property_index = 0; |
1565 // store_slot_index points to the vector IC slot for the next store IC used. | |
1566 // ObjectLiteral::ComputeFeedbackRequirements controls the allocation of slots | |
1567 // and must be updated if the number of store ICs emitted here changes. | |
1568 int store_slot_index = 0; | |
1569 for (; property_index < expr->properties()->length(); property_index++) { | 1583 for (; property_index < expr->properties()->length(); property_index++) { |
1570 ObjectLiteral::Property* property = expr->properties()->at(property_index); | 1584 ObjectLiteral::Property* property = expr->properties()->at(property_index); |
1571 if (property->is_computed_name()) break; | 1585 if (property->is_computed_name()) break; |
1572 if (property->IsCompileTimeValue()) continue; | 1586 if (property->IsCompileTimeValue()) continue; |
1573 | 1587 |
1574 Literal* key = property->key()->AsLiteral(); | 1588 Literal* key = property->key()->AsLiteral(); |
1575 Expression* value = property->value(); | 1589 Expression* value = property->value(); |
1576 if (!result_saved) { | 1590 if (!result_saved) { |
1577 __ push(v0); // Save result on stack. | 1591 __ push(v0); // Save result on stack. |
1578 result_saved = true; | 1592 result_saved = true; |
1579 } | 1593 } |
1580 switch (property->kind()) { | 1594 switch (property->kind()) { |
1581 case ObjectLiteral::Property::CONSTANT: | 1595 case ObjectLiteral::Property::CONSTANT: |
1582 UNREACHABLE(); | 1596 UNREACHABLE(); |
1583 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 1597 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
1584 DCHECK(!CompileTimeValue::IsCompileTimeValue(property->value())); | 1598 DCHECK(!CompileTimeValue::IsCompileTimeValue(property->value())); |
1585 // Fall through. | 1599 // Fall through. |
1586 case ObjectLiteral::Property::COMPUTED: | 1600 case ObjectLiteral::Property::COMPUTED: |
1587 // It is safe to use [[Put]] here because the boilerplate already | 1601 // It is safe to use [[Put]] here because the boilerplate already |
1588 // contains computed properties with an uninitialized value. | 1602 // contains computed properties with an uninitialized value. |
1589 if (key->value()->IsInternalizedString()) { | 1603 if (key->value()->IsInternalizedString()) { |
1590 if (property->emit_store()) { | 1604 if (property->emit_store()) { |
1591 VisitForAccumulatorValue(value); | 1605 VisitForAccumulatorValue(value); |
1592 __ mov(StoreDescriptor::ValueRegister(), result_register()); | 1606 __ mov(StoreDescriptor::ValueRegister(), result_register()); |
1593 DCHECK(StoreDescriptor::ValueRegister().is(a0)); | 1607 DCHECK(StoreDescriptor::ValueRegister().is(a0)); |
1594 __ li(StoreDescriptor::NameRegister(), Operand(key->value())); | 1608 __ li(StoreDescriptor::NameRegister(), Operand(key->value())); |
1595 __ ld(StoreDescriptor::ReceiverRegister(), MemOperand(sp)); | 1609 __ ld(StoreDescriptor::ReceiverRegister(), MemOperand(sp)); |
1596 if (FLAG_vector_stores) { | 1610 if (FLAG_vector_stores) { |
1597 EmitLoadStoreICSlot(expr->GetNthSlot(store_slot_index++)); | 1611 EmitLoadStoreICSlot(property->GetSlot(0)); |
1598 CallStoreIC(); | 1612 CallStoreIC(); |
1599 } else { | 1613 } else { |
1600 CallStoreIC(key->LiteralFeedbackId()); | 1614 CallStoreIC(key->LiteralFeedbackId()); |
1601 } | 1615 } |
1602 PrepareForBailoutForId(key->id(), NO_REGISTERS); | 1616 PrepareForBailoutForId(key->id(), NO_REGISTERS); |
1603 | 1617 |
1604 if (NeedsHomeObject(value)) { | 1618 if (NeedsHomeObject(value)) { |
1605 __ Move(StoreDescriptor::ReceiverRegister(), v0); | 1619 EmitSetHomeObjectAccumulator(value, 0, property->GetSlot(1)); |
1606 __ li(StoreDescriptor::NameRegister(), | |
1607 Operand(isolate()->factory()->home_object_symbol())); | |
1608 __ ld(StoreDescriptor::ValueRegister(), MemOperand(sp)); | |
1609 if (FLAG_vector_stores) { | |
1610 EmitLoadStoreICSlot(expr->GetNthSlot(store_slot_index++)); | |
1611 } | |
1612 CallStoreIC(); | |
1613 } | 1620 } |
1614 } else { | 1621 } else { |
1615 VisitForEffect(value); | 1622 VisitForEffect(value); |
1616 } | 1623 } |
1617 break; | 1624 break; |
1618 } | 1625 } |
1619 // Duplicate receiver on stack. | 1626 // Duplicate receiver on stack. |
1620 __ ld(a0, MemOperand(sp)); | 1627 __ ld(a0, MemOperand(sp)); |
1621 __ push(a0); | 1628 __ push(a0); |
1622 VisitForStackValue(key); | 1629 VisitForStackValue(key); |
1623 VisitForStackValue(value); | 1630 VisitForStackValue(value); |
1624 if (property->emit_store()) { | 1631 if (property->emit_store()) { |
1625 EmitSetHomeObjectIfNeeded( | 1632 if (NeedsHomeObject(value)) { |
1626 value, 2, expr->SlotForHomeObject(value, &store_slot_index)); | 1633 EmitSetHomeObject(value, 2, property->GetSlot()); |
| 1634 } |
1627 __ li(a0, Operand(Smi::FromInt(SLOPPY))); // PropertyAttributes. | 1635 __ li(a0, Operand(Smi::FromInt(SLOPPY))); // PropertyAttributes. |
1628 __ push(a0); | 1636 __ push(a0); |
1629 __ CallRuntime(Runtime::kSetProperty, 4); | 1637 __ CallRuntime(Runtime::kSetProperty, 4); |
1630 } else { | 1638 } else { |
1631 __ Drop(3); | 1639 __ Drop(3); |
1632 } | 1640 } |
1633 break; | 1641 break; |
1634 case ObjectLiteral::Property::PROTOTYPE: | 1642 case ObjectLiteral::Property::PROTOTYPE: |
1635 // Duplicate receiver on stack. | 1643 // Duplicate receiver on stack. |
1636 __ ld(a0, MemOperand(sp)); | 1644 __ ld(a0, MemOperand(sp)); |
1637 __ push(a0); | 1645 __ push(a0); |
1638 VisitForStackValue(value); | 1646 VisitForStackValue(value); |
1639 DCHECK(property->emit_store()); | 1647 DCHECK(property->emit_store()); |
1640 __ CallRuntime(Runtime::kInternalSetPrototype, 2); | 1648 __ CallRuntime(Runtime::kInternalSetPrototype, 2); |
1641 break; | 1649 break; |
1642 case ObjectLiteral::Property::GETTER: | 1650 case ObjectLiteral::Property::GETTER: |
1643 if (property->emit_store()) { | 1651 if (property->emit_store()) { |
1644 accessor_table.lookup(key)->second->getter = value; | 1652 accessor_table.lookup(key)->second->getter = property; |
1645 } | 1653 } |
1646 break; | 1654 break; |
1647 case ObjectLiteral::Property::SETTER: | 1655 case ObjectLiteral::Property::SETTER: |
1648 if (property->emit_store()) { | 1656 if (property->emit_store()) { |
1649 accessor_table.lookup(key)->second->setter = value; | 1657 accessor_table.lookup(key)->second->setter = property; |
1650 } | 1658 } |
1651 break; | 1659 break; |
1652 } | 1660 } |
1653 } | 1661 } |
1654 | 1662 |
1655 // Emit code to define accessors, using only a single call to the runtime for | 1663 // Emit code to define accessors, using only a single call to the runtime for |
1656 // each pair of corresponding getters and setters. | 1664 // each pair of corresponding getters and setters. |
1657 for (AccessorTable::Iterator it = accessor_table.begin(); | 1665 for (AccessorTable::Iterator it = accessor_table.begin(); |
1658 it != accessor_table.end(); | 1666 it != accessor_table.end(); |
1659 ++it) { | 1667 ++it) { |
1660 __ ld(a0, MemOperand(sp)); // Duplicate receiver. | 1668 __ ld(a0, MemOperand(sp)); // Duplicate receiver. |
1661 __ push(a0); | 1669 __ push(a0); |
1662 VisitForStackValue(it->first); | 1670 VisitForStackValue(it->first); |
1663 EmitAccessor(it->second->getter); | 1671 EmitAccessor(it->second->getter); |
1664 EmitSetHomeObjectIfNeeded( | |
1665 it->second->getter, 2, | |
1666 expr->SlotForHomeObject(it->second->getter, &store_slot_index)); | |
1667 EmitAccessor(it->second->setter); | 1672 EmitAccessor(it->second->setter); |
1668 EmitSetHomeObjectIfNeeded( | |
1669 it->second->setter, 3, | |
1670 expr->SlotForHomeObject(it->second->setter, &store_slot_index)); | |
1671 __ li(a0, Operand(Smi::FromInt(NONE))); | 1673 __ li(a0, Operand(Smi::FromInt(NONE))); |
1672 __ push(a0); | 1674 __ push(a0); |
1673 __ CallRuntime(Runtime::kDefineAccessorPropertyUnchecked, 5); | 1675 __ CallRuntime(Runtime::kDefineAccessorPropertyUnchecked, 5); |
1674 } | 1676 } |
1675 | 1677 |
1676 // Object literals have two parts. The "static" part on the left contains no | 1678 // Object literals have two parts. The "static" part on the left contains no |
1677 // computed property names, and so we can compute its map ahead of time; see | 1679 // computed property names, and so we can compute its map ahead of time; see |
1678 // runtime.cc::CreateObjectLiteralBoilerplate. The second "dynamic" part | 1680 // runtime.cc::CreateObjectLiteralBoilerplate. The second "dynamic" part |
1679 // starts with the first computed property name, and continues with all | 1681 // starts with the first computed property name, and continues with all |
1680 // properties to its right. All the code from above initializes the static | 1682 // properties to its right. All the code from above initializes the static |
(...skipping 14 matching lines...) Expand all Loading... |
1695 __ push(a0); | 1697 __ push(a0); |
1696 | 1698 |
1697 if (property->kind() == ObjectLiteral::Property::PROTOTYPE) { | 1699 if (property->kind() == ObjectLiteral::Property::PROTOTYPE) { |
1698 DCHECK(!property->is_computed_name()); | 1700 DCHECK(!property->is_computed_name()); |
1699 VisitForStackValue(value); | 1701 VisitForStackValue(value); |
1700 DCHECK(property->emit_store()); | 1702 DCHECK(property->emit_store()); |
1701 __ CallRuntime(Runtime::kInternalSetPrototype, 2); | 1703 __ CallRuntime(Runtime::kInternalSetPrototype, 2); |
1702 } else { | 1704 } else { |
1703 EmitPropertyKey(property, expr->GetIdForProperty(property_index)); | 1705 EmitPropertyKey(property, expr->GetIdForProperty(property_index)); |
1704 VisitForStackValue(value); | 1706 VisitForStackValue(value); |
1705 EmitSetHomeObjectIfNeeded( | 1707 if (NeedsHomeObject(value)) { |
1706 value, 2, expr->SlotForHomeObject(value, &store_slot_index)); | 1708 EmitSetHomeObject(value, 2, property->GetSlot()); |
| 1709 } |
1707 | 1710 |
1708 switch (property->kind()) { | 1711 switch (property->kind()) { |
1709 case ObjectLiteral::Property::CONSTANT: | 1712 case ObjectLiteral::Property::CONSTANT: |
1710 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 1713 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
1711 case ObjectLiteral::Property::COMPUTED: | 1714 case ObjectLiteral::Property::COMPUTED: |
1712 if (property->emit_store()) { | 1715 if (property->emit_store()) { |
1713 __ li(a0, Operand(Smi::FromInt(NONE))); | 1716 __ li(a0, Operand(Smi::FromInt(NONE))); |
1714 __ push(a0); | 1717 __ push(a0); |
1715 __ CallRuntime(Runtime::kDefineDataPropertyUnchecked, 4); | 1718 __ CallRuntime(Runtime::kDefineDataPropertyUnchecked, 4); |
1716 } else { | 1719 } else { |
(...skipping 25 matching lines...) Expand all Loading... |
1742 __ ld(a0, MemOperand(sp)); | 1745 __ ld(a0, MemOperand(sp)); |
1743 __ push(a0); | 1746 __ push(a0); |
1744 __ CallRuntime(Runtime::kToFastProperties, 1); | 1747 __ CallRuntime(Runtime::kToFastProperties, 1); |
1745 } | 1748 } |
1746 | 1749 |
1747 if (result_saved) { | 1750 if (result_saved) { |
1748 context()->PlugTOS(); | 1751 context()->PlugTOS(); |
1749 } else { | 1752 } else { |
1750 context()->Plug(v0); | 1753 context()->Plug(v0); |
1751 } | 1754 } |
1752 | |
1753 // Verify that compilation exactly consumed the number of store ic slots that | |
1754 // the ObjectLiteral node had to offer. | |
1755 DCHECK(!FLAG_vector_stores || store_slot_index == expr->slot_count()); | |
1756 } | 1755 } |
1757 | 1756 |
1758 | 1757 |
1759 void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { | 1758 void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { |
1760 Comment cmnt(masm_, "[ ArrayLiteral"); | 1759 Comment cmnt(masm_, "[ ArrayLiteral"); |
1761 | 1760 |
1762 expr->BuildConstantElements(isolate()); | 1761 expr->BuildConstantElements(isolate()); |
1763 | 1762 |
1764 Handle<FixedArray> constant_elements = expr->constant_elements(); | 1763 Handle<FixedArray> constant_elements = expr->constant_elements(); |
1765 bool has_fast_elements = | 1764 bool has_fast_elements = |
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2418 break; | 2417 break; |
2419 default: | 2418 default: |
2420 UNREACHABLE(); | 2419 UNREACHABLE(); |
2421 } | 2420 } |
2422 | 2421 |
2423 __ bind(&done); | 2422 __ bind(&done); |
2424 context()->Plug(v0); | 2423 context()->Plug(v0); |
2425 } | 2424 } |
2426 | 2425 |
2427 | 2426 |
2428 void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit, | 2427 void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) { |
2429 int* used_store_slots) { | |
2430 // Constructor is in v0. | 2428 // Constructor is in v0. |
2431 DCHECK(lit != NULL); | 2429 DCHECK(lit != NULL); |
2432 __ push(v0); | 2430 __ push(v0); |
2433 | 2431 |
2434 // No access check is needed here since the constructor is created by the | 2432 // No access check is needed here since the constructor is created by the |
2435 // class literal. | 2433 // class literal. |
2436 Register scratch = a1; | 2434 Register scratch = a1; |
2437 __ ld(scratch, | 2435 __ ld(scratch, |
2438 FieldMemOperand(v0, JSFunction::kPrototypeOrInitialMapOffset)); | 2436 FieldMemOperand(v0, JSFunction::kPrototypeOrInitialMapOffset)); |
2439 __ push(scratch); | 2437 __ push(scratch); |
(...skipping 13 matching lines...) Expand all Loading... |
2453 // The static prototype property is read only. We handle the non computed | 2451 // The static prototype property is read only. We handle the non computed |
2454 // property name case in the parser. Since this is the only case where we | 2452 // property name case in the parser. Since this is the only case where we |
2455 // need to check for an own read only property we special case this so we do | 2453 // need to check for an own read only property we special case this so we do |
2456 // not need to do this for every property. | 2454 // not need to do this for every property. |
2457 if (property->is_static() && property->is_computed_name()) { | 2455 if (property->is_static() && property->is_computed_name()) { |
2458 __ CallRuntime(Runtime::kThrowIfStaticPrototype, 1); | 2456 __ CallRuntime(Runtime::kThrowIfStaticPrototype, 1); |
2459 __ push(v0); | 2457 __ push(v0); |
2460 } | 2458 } |
2461 | 2459 |
2462 VisitForStackValue(value); | 2460 VisitForStackValue(value); |
2463 EmitSetHomeObjectIfNeeded(value, 2, | 2461 if (NeedsHomeObject(value)) { |
2464 lit->SlotForHomeObject(value, used_store_slots)); | 2462 EmitSetHomeObject(value, 2, property->GetSlot()); |
| 2463 } |
2465 | 2464 |
2466 switch (property->kind()) { | 2465 switch (property->kind()) { |
2467 case ObjectLiteral::Property::CONSTANT: | 2466 case ObjectLiteral::Property::CONSTANT: |
2468 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 2467 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
2469 case ObjectLiteral::Property::PROTOTYPE: | 2468 case ObjectLiteral::Property::PROTOTYPE: |
2470 UNREACHABLE(); | 2469 UNREACHABLE(); |
2471 case ObjectLiteral::Property::COMPUTED: | 2470 case ObjectLiteral::Property::COMPUTED: |
2472 __ CallRuntime(Runtime::kDefineClassMethod, 3); | 2471 __ CallRuntime(Runtime::kDefineClassMethod, 3); |
2473 break; | 2472 break; |
2474 | 2473 |
(...skipping 2864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5339 reinterpret_cast<uint64_t>( | 5338 reinterpret_cast<uint64_t>( |
5340 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5339 isolate->builtins()->OsrAfterStackCheck()->entry())); |
5341 return OSR_AFTER_STACK_CHECK; | 5340 return OSR_AFTER_STACK_CHECK; |
5342 } | 5341 } |
5343 | 5342 |
5344 | 5343 |
5345 } // namespace internal | 5344 } // namespace internal |
5346 } // namespace v8 | 5345 } // namespace v8 |
5347 | 5346 |
5348 #endif // V8_TARGET_ARCH_MIPS64 | 5347 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |