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