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_X87 | 7 #if V8_TARGET_ARCH_X87 |
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 1703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1714 | 1714 |
1715 if (property->kind() == ObjectLiteral::Property::PROTOTYPE) { | 1715 if (property->kind() == ObjectLiteral::Property::PROTOTYPE) { |
1716 DCHECK(!property->is_computed_name()); | 1716 DCHECK(!property->is_computed_name()); |
1717 VisitForStackValue(value); | 1717 VisitForStackValue(value); |
1718 if (property->emit_store()) { | 1718 if (property->emit_store()) { |
1719 __ CallRuntime(Runtime::kInternalSetPrototype, 2); | 1719 __ CallRuntime(Runtime::kInternalSetPrototype, 2); |
1720 } else { | 1720 } else { |
1721 __ Drop(2); | 1721 __ Drop(2); |
1722 } | 1722 } |
1723 } else { | 1723 } else { |
1724 EmitPropertyKey(property); | 1724 EmitPropertyKey(property, expr->GetIdForProperty(property_index)); |
1725 VisitForStackValue(value); | 1725 VisitForStackValue(value); |
1726 | 1726 |
1727 switch (property->kind()) { | 1727 switch (property->kind()) { |
1728 case ObjectLiteral::Property::CONSTANT: | 1728 case ObjectLiteral::Property::CONSTANT: |
1729 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 1729 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
1730 case ObjectLiteral::Property::COMPUTED: | 1730 case ObjectLiteral::Property::COMPUTED: |
1731 if (property->emit_store()) { | 1731 if (property->emit_store()) { |
1732 __ push(Immediate(Smi::FromInt(NONE))); | 1732 __ push(Immediate(Smi::FromInt(NONE))); |
1733 __ CallRuntime(Runtime::kDefineDataPropertyUnchecked, 4); | 1733 __ CallRuntime(Runtime::kDefineDataPropertyUnchecked, 4); |
1734 } else { | 1734 } else { |
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2443 | 2443 |
2444 for (int i = 0; i < lit->properties()->length(); i++) { | 2444 for (int i = 0; i < lit->properties()->length(); i++) { |
2445 ObjectLiteral::Property* property = lit->properties()->at(i); | 2445 ObjectLiteral::Property* property = lit->properties()->at(i); |
2446 Expression* value = property->value(); | 2446 Expression* value = property->value(); |
2447 | 2447 |
2448 if (property->is_static()) { | 2448 if (property->is_static()) { |
2449 __ push(Operand(esp, kPointerSize)); // constructor | 2449 __ push(Operand(esp, kPointerSize)); // constructor |
2450 } else { | 2450 } else { |
2451 __ push(Operand(esp, 0)); // prototype | 2451 __ push(Operand(esp, 0)); // prototype |
2452 } | 2452 } |
2453 EmitPropertyKey(property); | 2453 EmitPropertyKey(property, lit->GetIdForProperty(i)); |
2454 VisitForStackValue(value); | 2454 VisitForStackValue(value); |
2455 EmitSetHomeObjectIfNeeded(value, 2); | 2455 EmitSetHomeObjectIfNeeded(value, 2); |
2456 | 2456 |
2457 switch (property->kind()) { | 2457 switch (property->kind()) { |
2458 case ObjectLiteral::Property::CONSTANT: | 2458 case ObjectLiteral::Property::CONSTANT: |
2459 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 2459 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
2460 case ObjectLiteral::Property::PROTOTYPE: | 2460 case ObjectLiteral::Property::PROTOTYPE: |
2461 UNREACHABLE(); | 2461 UNREACHABLE(); |
2462 case ObjectLiteral::Property::COMPUTED: | 2462 case ObjectLiteral::Property::COMPUTED: |
2463 __ CallRuntime(Runtime::kDefineClassMethod, 3); | 2463 __ CallRuntime(Runtime::kDefineClassMethod, 3); |
(...skipping 2757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5221 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5221 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
5222 Assembler::target_address_at(call_target_address, | 5222 Assembler::target_address_at(call_target_address, |
5223 unoptimized_code)); | 5223 unoptimized_code)); |
5224 return OSR_AFTER_STACK_CHECK; | 5224 return OSR_AFTER_STACK_CHECK; |
5225 } | 5225 } |
5226 | 5226 |
5227 | 5227 |
5228 } } // namespace v8::internal | 5228 } } // namespace v8::internal |
5229 | 5229 |
5230 #endif // V8_TARGET_ARCH_X87 | 5230 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |