| 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 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2524 __ ld(scratch, MemOperand(sp, 0)); // prototype | 2518 __ ld(scratch, MemOperand(sp, 0)); // prototype |
| 2525 } | 2519 } |
| 2526 __ push(scratch); | 2520 __ push(scratch); |
| 2527 EmitPropertyKey(property); | 2521 EmitPropertyKey(property); |
| 2528 VisitForStackValue(value); | 2522 VisitForStackValue(value); |
| 2529 EmitSetHomeObjectIfNeeded(value, 2); | 2523 EmitSetHomeObjectIfNeeded(value, 2); |
| 2530 | 2524 |
| 2531 switch (property->kind()) { | 2525 switch (property->kind()) { |
| 2532 case ObjectLiteral::Property::CONSTANT: | 2526 case ObjectLiteral::Property::CONSTANT: |
| 2533 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 2527 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
| 2528 case ObjectLiteral::Property::PROTOTYPE: |
| 2529 UNREACHABLE(); |
| 2534 case ObjectLiteral::Property::COMPUTED: | 2530 case ObjectLiteral::Property::COMPUTED: |
| 2535 case ObjectLiteral::Property::PROTOTYPE: | |
| 2536 __ CallRuntime(Runtime::kDefineClassMethod, 3); | 2531 __ CallRuntime(Runtime::kDefineClassMethod, 3); |
| 2537 break; | 2532 break; |
| 2538 | 2533 |
| 2539 case ObjectLiteral::Property::GETTER: | 2534 case ObjectLiteral::Property::GETTER: |
| 2540 __ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 3); | 2535 __ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 3); |
| 2541 break; | 2536 break; |
| 2542 | 2537 |
| 2543 case ObjectLiteral::Property::SETTER: | 2538 case ObjectLiteral::Property::SETTER: |
| 2544 __ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 3); | 2539 __ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 3); |
| 2545 break; | 2540 break; |
| (...skipping 2806 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 |