| 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 1655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1666 EmitSetHomeObjectIfNeeded(value, 2); | 1666 EmitSetHomeObjectIfNeeded(value, 2); |
| 1667 __ push(Immediate(Smi::FromInt(SLOPPY))); // Strict mode | 1667 __ push(Immediate(Smi::FromInt(SLOPPY))); // Strict mode |
| 1668 __ CallRuntime(Runtime::kSetProperty, 4); | 1668 __ CallRuntime(Runtime::kSetProperty, 4); |
| 1669 } else { | 1669 } else { |
| 1670 __ Drop(3); | 1670 __ Drop(3); |
| 1671 } | 1671 } |
| 1672 break; | 1672 break; |
| 1673 case ObjectLiteral::Property::PROTOTYPE: | 1673 case ObjectLiteral::Property::PROTOTYPE: |
| 1674 __ push(Operand(esp, 0)); // Duplicate receiver. | 1674 __ push(Operand(esp, 0)); // Duplicate receiver. |
| 1675 VisitForStackValue(value); | 1675 VisitForStackValue(value); |
| 1676 if (property->emit_store()) { | 1676 DCHECK(property->emit_store()); |
| 1677 __ CallRuntime(Runtime::kInternalSetPrototype, 2); | 1677 __ CallRuntime(Runtime::kInternalSetPrototype, 2); |
| 1678 } else { | |
| 1679 __ Drop(2); | |
| 1680 } | |
| 1681 break; | 1678 break; |
| 1682 case ObjectLiteral::Property::GETTER: | 1679 case ObjectLiteral::Property::GETTER: |
| 1683 accessor_table.lookup(key)->second->getter = value; | 1680 accessor_table.lookup(key)->second->getter = value; |
| 1684 break; | 1681 break; |
| 1685 case ObjectLiteral::Property::SETTER: | 1682 case ObjectLiteral::Property::SETTER: |
| 1686 accessor_table.lookup(key)->second->setter = value; | 1683 accessor_table.lookup(key)->second->setter = value; |
| 1687 break; | 1684 break; |
| 1688 } | 1685 } |
| 1689 } | 1686 } |
| 1690 | 1687 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 1719 if (!result_saved) { | 1716 if (!result_saved) { |
| 1720 __ push(eax); // Save result on the stack | 1717 __ push(eax); // Save result on the stack |
| 1721 result_saved = true; | 1718 result_saved = true; |
| 1722 } | 1719 } |
| 1723 | 1720 |
| 1724 __ push(Operand(esp, 0)); // Duplicate receiver. | 1721 __ push(Operand(esp, 0)); // Duplicate receiver. |
| 1725 | 1722 |
| 1726 if (property->kind() == ObjectLiteral::Property::PROTOTYPE) { | 1723 if (property->kind() == ObjectLiteral::Property::PROTOTYPE) { |
| 1727 DCHECK(!property->is_computed_name()); | 1724 DCHECK(!property->is_computed_name()); |
| 1728 VisitForStackValue(value); | 1725 VisitForStackValue(value); |
| 1729 if (property->emit_store()) { | 1726 DCHECK(property->emit_store()); |
| 1730 __ CallRuntime(Runtime::kInternalSetPrototype, 2); | 1727 __ CallRuntime(Runtime::kInternalSetPrototype, 2); |
| 1731 } else { | |
| 1732 __ Drop(2); | |
| 1733 } | |
| 1734 } else { | 1728 } else { |
| 1735 EmitPropertyKey(property); | 1729 EmitPropertyKey(property); |
| 1736 VisitForStackValue(value); | 1730 VisitForStackValue(value); |
| 1737 | 1731 |
| 1738 switch (property->kind()) { | 1732 switch (property->kind()) { |
| 1739 case ObjectLiteral::Property::CONSTANT: | 1733 case ObjectLiteral::Property::CONSTANT: |
| 1740 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 1734 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
| 1741 case ObjectLiteral::Property::COMPUTED: | 1735 case ObjectLiteral::Property::COMPUTED: |
| 1742 if (property->emit_store()) { | 1736 if (property->emit_store()) { |
| 1743 __ push(Immediate(Smi::FromInt(NONE))); | 1737 __ push(Immediate(Smi::FromInt(NONE))); |
| (...skipping 3538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5282 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5276 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
| 5283 Assembler::target_address_at(call_target_address, | 5277 Assembler::target_address_at(call_target_address, |
| 5284 unoptimized_code)); | 5278 unoptimized_code)); |
| 5285 return OSR_AFTER_STACK_CHECK; | 5279 return OSR_AFTER_STACK_CHECK; |
| 5286 } | 5280 } |
| 5287 | 5281 |
| 5288 | 5282 |
| 5289 } } // namespace v8::internal | 5283 } } // namespace v8::internal |
| 5290 | 5284 |
| 5291 #endif // V8_TARGET_ARCH_IA32 | 5285 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |