| 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_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
| 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 1714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1725 | 1725 |
| 1726 if (property->kind() == ObjectLiteral::Property::PROTOTYPE) { | 1726 if (property->kind() == ObjectLiteral::Property::PROTOTYPE) { |
| 1727 DCHECK(!property->is_computed_name()); | 1727 DCHECK(!property->is_computed_name()); |
| 1728 VisitForStackValue(value); | 1728 VisitForStackValue(value); |
| 1729 if (property->emit_store()) { | 1729 if (property->emit_store()) { |
| 1730 __ CallRuntime(Runtime::kInternalSetPrototype, 2); | 1730 __ CallRuntime(Runtime::kInternalSetPrototype, 2); |
| 1731 } else { | 1731 } else { |
| 1732 __ Drop(2); | 1732 __ Drop(2); |
| 1733 } | 1733 } |
| 1734 } else { | 1734 } else { |
| 1735 EmitPropertyKey(property); | 1735 EmitPropertyKey(property, expr->GetIdForProperty(property_index)); |
| 1736 VisitForStackValue(value); | 1736 VisitForStackValue(value); |
| 1737 | 1737 |
| 1738 switch (property->kind()) { | 1738 switch (property->kind()) { |
| 1739 case ObjectLiteral::Property::CONSTANT: | 1739 case ObjectLiteral::Property::CONSTANT: |
| 1740 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 1740 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
| 1741 case ObjectLiteral::Property::COMPUTED: | 1741 case ObjectLiteral::Property::COMPUTED: |
| 1742 if (property->emit_store()) { | 1742 if (property->emit_store()) { |
| 1743 __ push(Immediate(Smi::FromInt(NONE))); | 1743 __ push(Immediate(Smi::FromInt(NONE))); |
| 1744 __ CallRuntime(Runtime::kDefineDataPropertyUnchecked, 4); | 1744 __ CallRuntime(Runtime::kDefineDataPropertyUnchecked, 4); |
| 1745 } else { | 1745 } else { |
| (...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2456 | 2456 |
| 2457 for (int i = 0; i < lit->properties()->length(); i++) { | 2457 for (int i = 0; i < lit->properties()->length(); i++) { |
| 2458 ObjectLiteral::Property* property = lit->properties()->at(i); | 2458 ObjectLiteral::Property* property = lit->properties()->at(i); |
| 2459 Expression* value = property->value(); | 2459 Expression* value = property->value(); |
| 2460 | 2460 |
| 2461 if (property->is_static()) { | 2461 if (property->is_static()) { |
| 2462 __ push(Operand(esp, kPointerSize)); // constructor | 2462 __ push(Operand(esp, kPointerSize)); // constructor |
| 2463 } else { | 2463 } else { |
| 2464 __ push(Operand(esp, 0)); // prototype | 2464 __ push(Operand(esp, 0)); // prototype |
| 2465 } | 2465 } |
| 2466 EmitPropertyKey(property); | 2466 EmitPropertyKey(property, lit->GetIdForProperty(i)); |
| 2467 VisitForStackValue(value); | 2467 VisitForStackValue(value); |
| 2468 EmitSetHomeObjectIfNeeded(value, 2); | 2468 EmitSetHomeObjectIfNeeded(value, 2); |
| 2469 | 2469 |
| 2470 switch (property->kind()) { | 2470 switch (property->kind()) { |
| 2471 case ObjectLiteral::Property::CONSTANT: | 2471 case ObjectLiteral::Property::CONSTANT: |
| 2472 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 2472 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
| 2473 case ObjectLiteral::Property::PROTOTYPE: | 2473 case ObjectLiteral::Property::PROTOTYPE: |
| 2474 UNREACHABLE(); | 2474 UNREACHABLE(); |
| 2475 case ObjectLiteral::Property::COMPUTED: | 2475 case ObjectLiteral::Property::COMPUTED: |
| 2476 __ CallRuntime(Runtime::kDefineClassMethod, 3); | 2476 __ CallRuntime(Runtime::kDefineClassMethod, 3); |
| (...skipping 2806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5283 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5283 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
| 5284 Assembler::target_address_at(call_target_address, | 5284 Assembler::target_address_at(call_target_address, |
| 5285 unoptimized_code)); | 5285 unoptimized_code)); |
| 5286 return OSR_AFTER_STACK_CHECK; | 5286 return OSR_AFTER_STACK_CHECK; |
| 5287 } | 5287 } |
| 5288 | 5288 |
| 5289 | 5289 |
| 5290 } } // namespace v8::internal | 5290 } } // namespace v8::internal |
| 5291 | 5291 |
| 5292 #endif // V8_TARGET_ARCH_IA32 | 5292 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |