| 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_MIPS | 7 #if V8_TARGET_ARCH_MIPS |
| 8 | 8 |
| 9 // Note on Mips implementation: | 9 // Note on Mips implementation: |
| 10 // | 10 // |
| (...skipping 1715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1726 __ CallRuntime(Runtime::kSetProperty, 4); | 1726 __ CallRuntime(Runtime::kSetProperty, 4); |
| 1727 } else { | 1727 } else { |
| 1728 __ Drop(3); | 1728 __ Drop(3); |
| 1729 } | 1729 } |
| 1730 break; | 1730 break; |
| 1731 case ObjectLiteral::Property::PROTOTYPE: | 1731 case ObjectLiteral::Property::PROTOTYPE: |
| 1732 // Duplicate receiver on stack. | 1732 // Duplicate receiver on stack. |
| 1733 __ lw(a0, MemOperand(sp)); | 1733 __ lw(a0, MemOperand(sp)); |
| 1734 __ push(a0); | 1734 __ push(a0); |
| 1735 VisitForStackValue(value); | 1735 VisitForStackValue(value); |
| 1736 if (property->emit_store()) { | 1736 DCHECK(property->emit_store()); |
| 1737 __ CallRuntime(Runtime::kInternalSetPrototype, 2); | 1737 __ CallRuntime(Runtime::kInternalSetPrototype, 2); |
| 1738 } else { | |
| 1739 __ Drop(2); | |
| 1740 } | |
| 1741 break; | 1738 break; |
| 1742 case ObjectLiteral::Property::GETTER: | 1739 case ObjectLiteral::Property::GETTER: |
| 1743 accessor_table.lookup(key)->second->getter = value; | 1740 accessor_table.lookup(key)->second->getter = value; |
| 1744 break; | 1741 break; |
| 1745 case ObjectLiteral::Property::SETTER: | 1742 case ObjectLiteral::Property::SETTER: |
| 1746 accessor_table.lookup(key)->second->setter = value; | 1743 accessor_table.lookup(key)->second->setter = value; |
| 1747 break; | 1744 break; |
| 1748 } | 1745 } |
| 1749 } | 1746 } |
| 1750 | 1747 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1782 __ push(v0); // Save result on the stack | 1779 __ push(v0); // Save result on the stack |
| 1783 result_saved = true; | 1780 result_saved = true; |
| 1784 } | 1781 } |
| 1785 | 1782 |
| 1786 __ lw(a0, MemOperand(sp)); // Duplicate receiver. | 1783 __ lw(a0, MemOperand(sp)); // Duplicate receiver. |
| 1787 __ push(a0); | 1784 __ push(a0); |
| 1788 | 1785 |
| 1789 if (property->kind() == ObjectLiteral::Property::PROTOTYPE) { | 1786 if (property->kind() == ObjectLiteral::Property::PROTOTYPE) { |
| 1790 DCHECK(!property->is_computed_name()); | 1787 DCHECK(!property->is_computed_name()); |
| 1791 VisitForStackValue(value); | 1788 VisitForStackValue(value); |
| 1792 if (property->emit_store()) { | 1789 DCHECK(property->emit_store()); |
| 1793 __ CallRuntime(Runtime::kInternalSetPrototype, 2); | 1790 __ CallRuntime(Runtime::kInternalSetPrototype, 2); |
| 1794 } else { | |
| 1795 __ Drop(2); | |
| 1796 } | |
| 1797 } else { | 1791 } else { |
| 1798 EmitPropertyKey(property); | 1792 EmitPropertyKey(property); |
| 1799 VisitForStackValue(value); | 1793 VisitForStackValue(value); |
| 1800 | 1794 |
| 1801 switch (property->kind()) { | 1795 switch (property->kind()) { |
| 1802 case ObjectLiteral::Property::CONSTANT: | 1796 case ObjectLiteral::Property::CONSTANT: |
| 1803 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 1797 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
| 1804 case ObjectLiteral::Property::COMPUTED: | 1798 case ObjectLiteral::Property::COMPUTED: |
| 1805 if (property->emit_store()) { | 1799 if (property->emit_store()) { |
| 1806 __ li(a0, Operand(Smi::FromInt(NONE))); | 1800 __ li(a0, Operand(Smi::FromInt(NONE))); |
| (...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2527 __ lw(scratch, MemOperand(sp, 0)); // prototype | 2521 __ lw(scratch, MemOperand(sp, 0)); // prototype |
| 2528 } | 2522 } |
| 2529 __ push(scratch); | 2523 __ push(scratch); |
| 2530 EmitPropertyKey(property); | 2524 EmitPropertyKey(property); |
| 2531 VisitForStackValue(value); | 2525 VisitForStackValue(value); |
| 2532 EmitSetHomeObjectIfNeeded(value, 2); | 2526 EmitSetHomeObjectIfNeeded(value, 2); |
| 2533 | 2527 |
| 2534 switch (property->kind()) { | 2528 switch (property->kind()) { |
| 2535 case ObjectLiteral::Property::CONSTANT: | 2529 case ObjectLiteral::Property::CONSTANT: |
| 2536 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 2530 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
| 2531 case ObjectLiteral::Property::PROTOTYPE: |
| 2532 UNREACHABLE(); |
| 2537 case ObjectLiteral::Property::COMPUTED: | 2533 case ObjectLiteral::Property::COMPUTED: |
| 2538 case ObjectLiteral::Property::PROTOTYPE: | |
| 2539 __ CallRuntime(Runtime::kDefineClassMethod, 3); | 2534 __ CallRuntime(Runtime::kDefineClassMethod, 3); |
| 2540 break; | 2535 break; |
| 2541 | 2536 |
| 2542 case ObjectLiteral::Property::GETTER: | 2537 case ObjectLiteral::Property::GETTER: |
| 2543 __ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 3); | 2538 __ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 3); |
| 2544 break; | 2539 break; |
| 2545 | 2540 |
| 2546 case ObjectLiteral::Property::SETTER: | 2541 case ObjectLiteral::Property::SETTER: |
| 2547 __ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 3); | 2542 __ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 3); |
| 2548 break; | 2543 break; |
| (...skipping 2799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5348 Assembler::target_address_at(pc_immediate_load_address)) == | 5343 Assembler::target_address_at(pc_immediate_load_address)) == |
| 5349 reinterpret_cast<uint32_t>( | 5344 reinterpret_cast<uint32_t>( |
| 5350 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5345 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 5351 return OSR_AFTER_STACK_CHECK; | 5346 return OSR_AFTER_STACK_CHECK; |
| 5352 } | 5347 } |
| 5353 | 5348 |
| 5354 | 5349 |
| 5355 } } // namespace v8::internal | 5350 } } // namespace v8::internal |
| 5356 | 5351 |
| 5357 #endif // V8_TARGET_ARCH_MIPS | 5352 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |