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 #if V8_TARGET_ARCH_PPC | 5 #if V8_TARGET_ARCH_PPC |
6 | 6 |
7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 1590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1601 EmitSetHomeObject(value, 2, property->GetSlot()); | 1601 EmitSetHomeObject(value, 2, property->GetSlot()); |
1602 } | 1602 } |
1603 | 1603 |
1604 switch (property->kind()) { | 1604 switch (property->kind()) { |
1605 case ObjectLiteral::Property::CONSTANT: | 1605 case ObjectLiteral::Property::CONSTANT: |
1606 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 1606 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
1607 case ObjectLiteral::Property::COMPUTED: | 1607 case ObjectLiteral::Property::COMPUTED: |
1608 if (property->emit_store()) { | 1608 if (property->emit_store()) { |
1609 __ LoadSmiLiteral(r3, Smi::FromInt(NONE)); | 1609 __ LoadSmiLiteral(r3, Smi::FromInt(NONE)); |
1610 __ push(r3); | 1610 __ push(r3); |
1611 __ CallRuntime(Runtime::kDefineDataPropertyUnchecked); | 1611 __ Push(Smi::FromInt(property->NeedsSetFunctionName())); |
| 1612 __ CallRuntime(Runtime::kDefineDataPropertyInLiteral); |
1612 } else { | 1613 } else { |
1613 __ Drop(3); | 1614 __ Drop(3); |
1614 } | 1615 } |
1615 break; | 1616 break; |
1616 | 1617 |
1617 case ObjectLiteral::Property::PROTOTYPE: | 1618 case ObjectLiteral::Property::PROTOTYPE: |
1618 UNREACHABLE(); | 1619 UNREACHABLE(); |
1619 break; | 1620 break; |
1620 | 1621 |
1621 case ObjectLiteral::Property::GETTER: | 1622 case ObjectLiteral::Property::GETTER: |
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2381 if (NeedsHomeObject(value)) { | 2382 if (NeedsHomeObject(value)) { |
2382 EmitSetHomeObject(value, 2, property->GetSlot()); | 2383 EmitSetHomeObject(value, 2, property->GetSlot()); |
2383 } | 2384 } |
2384 | 2385 |
2385 switch (property->kind()) { | 2386 switch (property->kind()) { |
2386 case ObjectLiteral::Property::CONSTANT: | 2387 case ObjectLiteral::Property::CONSTANT: |
2387 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 2388 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
2388 case ObjectLiteral::Property::PROTOTYPE: | 2389 case ObjectLiteral::Property::PROTOTYPE: |
2389 UNREACHABLE(); | 2390 UNREACHABLE(); |
2390 case ObjectLiteral::Property::COMPUTED: | 2391 case ObjectLiteral::Property::COMPUTED: |
2391 __ CallRuntime(Runtime::kDefineClassMethod); | 2392 __ mov(r3, Operand(Smi::FromInt(DONT_ENUM))); |
| 2393 __ push(r3); |
| 2394 __ Push(Smi::FromInt(property->NeedsSetFunctionName())); |
| 2395 __ CallRuntime(Runtime::kDefineDataPropertyInLiteral); |
2392 break; | 2396 break; |
2393 | 2397 |
2394 case ObjectLiteral::Property::GETTER: | 2398 case ObjectLiteral::Property::GETTER: |
2395 __ mov(r3, Operand(Smi::FromInt(DONT_ENUM))); | 2399 __ mov(r3, Operand(Smi::FromInt(DONT_ENUM))); |
2396 __ push(r3); | 2400 __ push(r3); |
2397 __ CallRuntime(Runtime::kDefineGetterPropertyUnchecked); | 2401 __ CallRuntime(Runtime::kDefineGetterPropertyUnchecked); |
2398 break; | 2402 break; |
2399 | 2403 |
2400 case ObjectLiteral::Property::SETTER: | 2404 case ObjectLiteral::Property::SETTER: |
2401 __ mov(r3, Operand(Smi::FromInt(DONT_ENUM))); | 2405 __ mov(r3, Operand(Smi::FromInt(DONT_ENUM))); |
(...skipping 2365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4767 return ON_STACK_REPLACEMENT; | 4771 return ON_STACK_REPLACEMENT; |
4768 } | 4772 } |
4769 | 4773 |
4770 DCHECK(interrupt_address == | 4774 DCHECK(interrupt_address == |
4771 isolate->builtins()->OsrAfterStackCheck()->entry()); | 4775 isolate->builtins()->OsrAfterStackCheck()->entry()); |
4772 return OSR_AFTER_STACK_CHECK; | 4776 return OSR_AFTER_STACK_CHECK; |
4773 } | 4777 } |
4774 } // namespace internal | 4778 } // namespace internal |
4775 } // namespace v8 | 4779 } // namespace v8 |
4776 #endif // V8_TARGET_ARCH_PPC | 4780 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |