OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 7 #if V8_TARGET_ARCH_PPC |
8 | 8 |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 1695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1706 __ CallRuntime(Runtime::kSetProperty, 4); | 1706 __ CallRuntime(Runtime::kSetProperty, 4); |
1707 } else { | 1707 } else { |
1708 __ Drop(3); | 1708 __ Drop(3); |
1709 } | 1709 } |
1710 break; | 1710 break; |
1711 case ObjectLiteral::Property::PROTOTYPE: | 1711 case ObjectLiteral::Property::PROTOTYPE: |
1712 // Duplicate receiver on stack. | 1712 // Duplicate receiver on stack. |
1713 __ LoadP(r3, MemOperand(sp)); | 1713 __ LoadP(r3, MemOperand(sp)); |
1714 __ push(r3); | 1714 __ push(r3); |
1715 VisitForStackValue(value); | 1715 VisitForStackValue(value); |
1716 if (property->emit_store()) { | 1716 DCHECK(property->emit_store()); |
1717 __ CallRuntime(Runtime::kInternalSetPrototype, 2); | 1717 __ CallRuntime(Runtime::kInternalSetPrototype, 2); |
1718 } else { | |
1719 __ Drop(2); | |
1720 } | |
1721 break; | 1718 break; |
1722 case ObjectLiteral::Property::GETTER: | 1719 case ObjectLiteral::Property::GETTER: |
1723 accessor_table.lookup(key)->second->getter = value; | 1720 accessor_table.lookup(key)->second->getter = value; |
1724 break; | 1721 break; |
1725 case ObjectLiteral::Property::SETTER: | 1722 case ObjectLiteral::Property::SETTER: |
1726 accessor_table.lookup(key)->second->setter = value; | 1723 accessor_table.lookup(key)->second->setter = value; |
1727 break; | 1724 break; |
1728 } | 1725 } |
1729 } | 1726 } |
1730 | 1727 |
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2521 } else { | 2518 } else { |
2522 __ LoadP(scratch, MemOperand(sp, 0)); // prototype | 2519 __ LoadP(scratch, MemOperand(sp, 0)); // prototype |
2523 } | 2520 } |
2524 __ push(scratch); | 2521 __ push(scratch); |
2525 VisitForStackValue(key); | 2522 VisitForStackValue(key); |
2526 VisitForStackValue(value); | 2523 VisitForStackValue(value); |
2527 | 2524 |
2528 switch (property->kind()) { | 2525 switch (property->kind()) { |
2529 case ObjectLiteral::Property::CONSTANT: | 2526 case ObjectLiteral::Property::CONSTANT: |
2530 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 2527 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
| 2528 case ObjectLiteral::Property::PROTOTYPE: |
| 2529 UNREACHABLE(); |
2531 case ObjectLiteral::Property::COMPUTED: | 2530 case ObjectLiteral::Property::COMPUTED: |
2532 case ObjectLiteral::Property::PROTOTYPE: | |
2533 __ CallRuntime(Runtime::kDefineClassMethod, 3); | 2531 __ CallRuntime(Runtime::kDefineClassMethod, 3); |
2534 break; | 2532 break; |
2535 | 2533 |
2536 case ObjectLiteral::Property::GETTER: | 2534 case ObjectLiteral::Property::GETTER: |
2537 __ CallRuntime(Runtime::kDefineClassGetter, 3); | 2535 __ CallRuntime(Runtime::kDefineClassGetter, 3); |
2538 break; | 2536 break; |
2539 | 2537 |
2540 case ObjectLiteral::Property::SETTER: | 2538 case ObjectLiteral::Property::SETTER: |
2541 __ CallRuntime(Runtime::kDefineClassSetter, 3); | 2539 __ CallRuntime(Runtime::kDefineClassSetter, 3); |
2542 break; | 2540 break; |
(...skipping 2739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5282 return ON_STACK_REPLACEMENT; | 5280 return ON_STACK_REPLACEMENT; |
5283 } | 5281 } |
5284 | 5282 |
5285 DCHECK(interrupt_address == | 5283 DCHECK(interrupt_address == |
5286 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5284 isolate->builtins()->OsrAfterStackCheck()->entry()); |
5287 return OSR_AFTER_STACK_CHECK; | 5285 return OSR_AFTER_STACK_CHECK; |
5288 } | 5286 } |
5289 } | 5287 } |
5290 } // namespace v8::internal | 5288 } // namespace v8::internal |
5291 #endif // V8_TARGET_ARCH_PPC | 5289 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |