OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
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 1773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1784 | 1784 |
1785 if (property->kind() == ObjectLiteral::Property::PROTOTYPE) { | 1785 if (property->kind() == ObjectLiteral::Property::PROTOTYPE) { |
1786 DCHECK(!property->is_computed_name()); | 1786 DCHECK(!property->is_computed_name()); |
1787 VisitForStackValue(value); | 1787 VisitForStackValue(value); |
1788 if (property->emit_store()) { | 1788 if (property->emit_store()) { |
1789 __ CallRuntime(Runtime::kInternalSetPrototype, 2); | 1789 __ CallRuntime(Runtime::kInternalSetPrototype, 2); |
1790 } else { | 1790 } else { |
1791 __ Drop(2); | 1791 __ Drop(2); |
1792 } | 1792 } |
1793 } else { | 1793 } else { |
1794 EmitPropertyKey(property); | 1794 EmitPropertyKey(property, expr->GetIdForProperty(property_index)); |
1795 VisitForStackValue(value); | 1795 VisitForStackValue(value); |
1796 | 1796 |
1797 switch (property->kind()) { | 1797 switch (property->kind()) { |
1798 case ObjectLiteral::Property::CONSTANT: | 1798 case ObjectLiteral::Property::CONSTANT: |
1799 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 1799 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
1800 case ObjectLiteral::Property::COMPUTED: | 1800 case ObjectLiteral::Property::COMPUTED: |
1801 if (property->emit_store()) { | 1801 if (property->emit_store()) { |
1802 __ Mov(x0, Smi::FromInt(NONE)); | 1802 __ Mov(x0, Smi::FromInt(NONE)); |
1803 __ Push(x0); | 1803 __ Push(x0); |
1804 __ CallRuntime(Runtime::kDefineDataPropertyUnchecked, 4); | 1804 __ CallRuntime(Runtime::kDefineDataPropertyUnchecked, 4); |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2240 for (int i = 0; i < lit->properties()->length(); i++) { | 2240 for (int i = 0; i < lit->properties()->length(); i++) { |
2241 ObjectLiteral::Property* property = lit->properties()->at(i); | 2241 ObjectLiteral::Property* property = lit->properties()->at(i); |
2242 Expression* value = property->value(); | 2242 Expression* value = property->value(); |
2243 | 2243 |
2244 if (property->is_static()) { | 2244 if (property->is_static()) { |
2245 __ Peek(scratch, kPointerSize); // constructor | 2245 __ Peek(scratch, kPointerSize); // constructor |
2246 } else { | 2246 } else { |
2247 __ Peek(scratch, 0); // prototype | 2247 __ Peek(scratch, 0); // prototype |
2248 } | 2248 } |
2249 __ Push(scratch); | 2249 __ Push(scratch); |
2250 EmitPropertyKey(property); | 2250 EmitPropertyKey(property, lit->GetIdForProperty(i)); |
2251 VisitForStackValue(value); | 2251 VisitForStackValue(value); |
2252 EmitSetHomeObjectIfNeeded(value, 2); | 2252 EmitSetHomeObjectIfNeeded(value, 2); |
2253 | 2253 |
2254 switch (property->kind()) { | 2254 switch (property->kind()) { |
2255 case ObjectLiteral::Property::CONSTANT: | 2255 case ObjectLiteral::Property::CONSTANT: |
2256 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 2256 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
2257 case ObjectLiteral::Property::COMPUTED: | 2257 case ObjectLiteral::Property::COMPUTED: |
2258 case ObjectLiteral::Property::PROTOTYPE: | 2258 case ObjectLiteral::Property::PROTOTYPE: |
2259 __ CallRuntime(Runtime::kDefineClassMethod, 3); | 2259 __ CallRuntime(Runtime::kDefineClassMethod, 3); |
2260 break; | 2260 break; |
(...skipping 3130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5391 return previous_; | 5391 return previous_; |
5392 } | 5392 } |
5393 | 5393 |
5394 | 5394 |
5395 #undef __ | 5395 #undef __ |
5396 | 5396 |
5397 | 5397 |
5398 } } // namespace v8::internal | 5398 } } // namespace v8::internal |
5399 | 5399 |
5400 #endif // V8_TARGET_ARCH_ARM64 | 5400 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |