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 #if V8_TARGET_ARCH_ARM | 5 #if V8_TARGET_ARCH_ARM |
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 1631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1642 VisitForStackValue(value); | 1642 VisitForStackValue(value); |
1643 if (NeedsHomeObject(value)) { | 1643 if (NeedsHomeObject(value)) { |
1644 EmitSetHomeObject(value, 2, property->GetSlot()); | 1644 EmitSetHomeObject(value, 2, property->GetSlot()); |
1645 } | 1645 } |
1646 | 1646 |
1647 switch (property->kind()) { | 1647 switch (property->kind()) { |
1648 case ObjectLiteral::Property::CONSTANT: | 1648 case ObjectLiteral::Property::CONSTANT: |
1649 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 1649 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
1650 case ObjectLiteral::Property::COMPUTED: | 1650 case ObjectLiteral::Property::COMPUTED: |
1651 if (property->emit_store()) { | 1651 if (property->emit_store()) { |
1652 __ mov(r0, Operand(Smi::FromInt(NONE))); | 1652 __ mov(r0, Operand(Smi::FromInt(NONE))); |
adamk
2016/02/02 23:57:30
Let me know if you'd like me to change these to th
Toon Verwaest
2016/02/03 10:47:23
The Push cleanup sounds nice. As you prefer.
adamk
2016/02/03 19:04:59
Added the cleanup (within this switch statement, a
| |
1653 __ push(r0); | 1653 __ push(r0); |
1654 __ CallRuntime(Runtime::kDefineDataPropertyUnchecked); | 1654 __ Push(Smi::FromInt(property->NeedsSetFunctionName())); |
1655 __ CallRuntime(Runtime::kDefineDataPropertyInLiteral); | |
1655 } else { | 1656 } else { |
1656 __ Drop(3); | 1657 __ Drop(3); |
1657 } | 1658 } |
1658 break; | 1659 break; |
1659 | 1660 |
1660 case ObjectLiteral::Property::PROTOTYPE: | 1661 case ObjectLiteral::Property::PROTOTYPE: |
1661 UNREACHABLE(); | 1662 UNREACHABLE(); |
1662 break; | 1663 break; |
1663 | 1664 |
1664 case ObjectLiteral::Property::GETTER: | 1665 case ObjectLiteral::Property::GETTER: |
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2386 if (NeedsHomeObject(value)) { | 2387 if (NeedsHomeObject(value)) { |
2387 EmitSetHomeObject(value, 2, property->GetSlot()); | 2388 EmitSetHomeObject(value, 2, property->GetSlot()); |
2388 } | 2389 } |
2389 | 2390 |
2390 switch (property->kind()) { | 2391 switch (property->kind()) { |
2391 case ObjectLiteral::Property::CONSTANT: | 2392 case ObjectLiteral::Property::CONSTANT: |
2392 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 2393 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
2393 case ObjectLiteral::Property::PROTOTYPE: | 2394 case ObjectLiteral::Property::PROTOTYPE: |
2394 UNREACHABLE(); | 2395 UNREACHABLE(); |
2395 case ObjectLiteral::Property::COMPUTED: | 2396 case ObjectLiteral::Property::COMPUTED: |
2396 __ CallRuntime(Runtime::kDefineClassMethod); | 2397 __ mov(r0, Operand(Smi::FromInt(DONT_ENUM))); |
2398 __ push(r0); | |
2399 __ Push(Smi::FromInt(property->NeedsSetFunctionName())); | |
2400 __ CallRuntime(Runtime::kDefineDataPropertyInLiteral); | |
2397 break; | 2401 break; |
2398 | 2402 |
2399 case ObjectLiteral::Property::GETTER: | 2403 case ObjectLiteral::Property::GETTER: |
2400 __ mov(r0, Operand(Smi::FromInt(DONT_ENUM))); | 2404 __ mov(r0, Operand(Smi::FromInt(DONT_ENUM))); |
2401 __ push(r0); | 2405 __ push(r0); |
2402 __ CallRuntime(Runtime::kDefineGetterPropertyUnchecked); | 2406 __ CallRuntime(Runtime::kDefineGetterPropertyUnchecked); |
2403 break; | 2407 break; |
2404 | 2408 |
2405 case ObjectLiteral::Property::SETTER: | 2409 case ObjectLiteral::Property::SETTER: |
2406 __ mov(r0, Operand(Smi::FromInt(DONT_ENUM))); | 2410 __ mov(r0, Operand(Smi::FromInt(DONT_ENUM))); |
(...skipping 2439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4846 DCHECK(interrupt_address == | 4850 DCHECK(interrupt_address == |
4847 isolate->builtins()->OsrAfterStackCheck()->entry()); | 4851 isolate->builtins()->OsrAfterStackCheck()->entry()); |
4848 return OSR_AFTER_STACK_CHECK; | 4852 return OSR_AFTER_STACK_CHECK; |
4849 } | 4853 } |
4850 | 4854 |
4851 | 4855 |
4852 } // namespace internal | 4856 } // namespace internal |
4853 } // namespace v8 | 4857 } // namespace v8 |
4854 | 4858 |
4855 #endif // V8_TARGET_ARCH_ARM | 4859 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |