| 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_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 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 1748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1759 | 1759 |
| 1760 if (property->kind() == ObjectLiteral::Property::PROTOTYPE) { | 1760 if (property->kind() == ObjectLiteral::Property::PROTOTYPE) { |
| 1761 DCHECK(!property->is_computed_name()); | 1761 DCHECK(!property->is_computed_name()); |
| 1762 VisitForStackValue(value); | 1762 VisitForStackValue(value); |
| 1763 if (property->emit_store()) { | 1763 if (property->emit_store()) { |
| 1764 __ CallRuntime(Runtime::kInternalSetPrototype, 2); | 1764 __ CallRuntime(Runtime::kInternalSetPrototype, 2); |
| 1765 } else { | 1765 } else { |
| 1766 __ Drop(2); | 1766 __ Drop(2); |
| 1767 } | 1767 } |
| 1768 } else { | 1768 } else { |
| 1769 EmitPropertyKey(property); | 1769 EmitPropertyKey(property, expr->GetIdForProperty(property_index)); |
| 1770 VisitForStackValue(value); | 1770 VisitForStackValue(value); |
| 1771 | 1771 |
| 1772 switch (property->kind()) { | 1772 switch (property->kind()) { |
| 1773 case ObjectLiteral::Property::CONSTANT: | 1773 case ObjectLiteral::Property::CONSTANT: |
| 1774 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 1774 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
| 1775 case ObjectLiteral::Property::COMPUTED: | 1775 case ObjectLiteral::Property::COMPUTED: |
| 1776 if (property->emit_store()) { | 1776 if (property->emit_store()) { |
| 1777 __ Push(Smi::FromInt(NONE)); | 1777 __ Push(Smi::FromInt(NONE)); |
| 1778 __ CallRuntime(Runtime::kDefineDataPropertyUnchecked, 4); | 1778 __ CallRuntime(Runtime::kDefineDataPropertyUnchecked, 4); |
| 1779 } else { | 1779 } else { |
| (...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2455 | 2455 |
| 2456 for (int i = 0; i < lit->properties()->length(); i++) { | 2456 for (int i = 0; i < lit->properties()->length(); i++) { |
| 2457 ObjectLiteral::Property* property = lit->properties()->at(i); | 2457 ObjectLiteral::Property* property = lit->properties()->at(i); |
| 2458 Expression* value = property->value(); | 2458 Expression* value = property->value(); |
| 2459 | 2459 |
| 2460 if (property->is_static()) { | 2460 if (property->is_static()) { |
| 2461 __ Push(Operand(rsp, kPointerSize)); // constructor | 2461 __ Push(Operand(rsp, kPointerSize)); // constructor |
| 2462 } else { | 2462 } else { |
| 2463 __ Push(Operand(rsp, 0)); // prototype | 2463 __ Push(Operand(rsp, 0)); // prototype |
| 2464 } | 2464 } |
| 2465 EmitPropertyKey(property); | 2465 EmitPropertyKey(property, lit->GetIdForProperty(i)); |
| 2466 VisitForStackValue(value); | 2466 VisitForStackValue(value); |
| 2467 EmitSetHomeObjectIfNeeded(value, 2); | 2467 EmitSetHomeObjectIfNeeded(value, 2); |
| 2468 | 2468 |
| 2469 switch (property->kind()) { | 2469 switch (property->kind()) { |
| 2470 case ObjectLiteral::Property::CONSTANT: | 2470 case ObjectLiteral::Property::CONSTANT: |
| 2471 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 2471 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
| 2472 case ObjectLiteral::Property::COMPUTED: | 2472 case ObjectLiteral::Property::COMPUTED: |
| 2473 case ObjectLiteral::Property::PROTOTYPE: | 2473 case ObjectLiteral::Property::PROTOTYPE: |
| 2474 __ CallRuntime(Runtime::kDefineClassMethod, 3); | 2474 __ CallRuntime(Runtime::kDefineClassMethod, 3); |
| 2475 break; | 2475 break; |
| (...skipping 2827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5303 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5303 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
| 5304 Assembler::target_address_at(call_target_address, | 5304 Assembler::target_address_at(call_target_address, |
| 5305 unoptimized_code)); | 5305 unoptimized_code)); |
| 5306 return OSR_AFTER_STACK_CHECK; | 5306 return OSR_AFTER_STACK_CHECK; |
| 5307 } | 5307 } |
| 5308 | 5308 |
| 5309 | 5309 |
| 5310 } } // namespace v8::internal | 5310 } } // namespace v8::internal |
| 5311 | 5311 |
| 5312 #endif // V8_TARGET_ARCH_X64 | 5312 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |