| 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 1644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1655 EmitSetHomeObjectIfNeeded(value, 2); | 1655 EmitSetHomeObjectIfNeeded(value, 2); |
| 1656 __ push(Immediate(Smi::FromInt(SLOPPY))); // Strict mode | 1656 __ push(Immediate(Smi::FromInt(SLOPPY))); // Strict mode |
| 1657 __ CallRuntime(Runtime::kSetProperty, 4); | 1657 __ CallRuntime(Runtime::kSetProperty, 4); |
| 1658 } else { | 1658 } else { |
| 1659 __ Drop(3); | 1659 __ Drop(3); |
| 1660 } | 1660 } |
| 1661 break; | 1661 break; |
| 1662 case ObjectLiteral::Property::PROTOTYPE: | 1662 case ObjectLiteral::Property::PROTOTYPE: |
| 1663 __ push(Operand(esp, 0)); // Duplicate receiver. | 1663 __ push(Operand(esp, 0)); // Duplicate receiver. |
| 1664 VisitForStackValue(value); | 1664 VisitForStackValue(value); |
| 1665 if (property->emit_store()) { | 1665 DCHECK(property->emit_store()); |
| 1666 __ CallRuntime(Runtime::kInternalSetPrototype, 2); | 1666 __ CallRuntime(Runtime::kInternalSetPrototype, 2); |
| 1667 } else { | |
| 1668 __ Drop(2); | |
| 1669 } | |
| 1670 break; | 1667 break; |
| 1671 case ObjectLiteral::Property::GETTER: | 1668 case ObjectLiteral::Property::GETTER: |
| 1672 accessor_table.lookup(key)->second->getter = value; | 1669 accessor_table.lookup(key)->second->getter = value; |
| 1673 break; | 1670 break; |
| 1674 case ObjectLiteral::Property::SETTER: | 1671 case ObjectLiteral::Property::SETTER: |
| 1675 accessor_table.lookup(key)->second->setter = value; | 1672 accessor_table.lookup(key)->second->setter = value; |
| 1676 break; | 1673 break; |
| 1677 } | 1674 } |
| 1678 } | 1675 } |
| 1679 | 1676 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 1708 if (!result_saved) { | 1705 if (!result_saved) { |
| 1709 __ push(eax); // Save result on the stack | 1706 __ push(eax); // Save result on the stack |
| 1710 result_saved = true; | 1707 result_saved = true; |
| 1711 } | 1708 } |
| 1712 | 1709 |
| 1713 __ push(Operand(esp, 0)); // Duplicate receiver. | 1710 __ push(Operand(esp, 0)); // Duplicate receiver. |
| 1714 | 1711 |
| 1715 if (property->kind() == ObjectLiteral::Property::PROTOTYPE) { | 1712 if (property->kind() == ObjectLiteral::Property::PROTOTYPE) { |
| 1716 DCHECK(!property->is_computed_name()); | 1713 DCHECK(!property->is_computed_name()); |
| 1717 VisitForStackValue(value); | 1714 VisitForStackValue(value); |
| 1718 if (property->emit_store()) { | 1715 DCHECK(property->emit_store()); |
| 1719 __ CallRuntime(Runtime::kInternalSetPrototype, 2); | 1716 __ CallRuntime(Runtime::kInternalSetPrototype, 2); |
| 1720 } else { | |
| 1721 __ Drop(2); | |
| 1722 } | |
| 1723 } else { | 1717 } else { |
| 1724 EmitPropertyKey(property); | 1718 EmitPropertyKey(property); |
| 1725 VisitForStackValue(value); | 1719 VisitForStackValue(value); |
| 1726 | 1720 |
| 1727 switch (property->kind()) { | 1721 switch (property->kind()) { |
| 1728 case ObjectLiteral::Property::CONSTANT: | 1722 case ObjectLiteral::Property::CONSTANT: |
| 1729 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 1723 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
| 1730 case ObjectLiteral::Property::COMPUTED: | 1724 case ObjectLiteral::Property::COMPUTED: |
| 1731 if (property->emit_store()) { | 1725 if (property->emit_store()) { |
| 1732 __ push(Immediate(Smi::FromInt(NONE))); | 1726 __ push(Immediate(Smi::FromInt(NONE))); |
| (...skipping 3488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5221 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5215 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
| 5222 Assembler::target_address_at(call_target_address, | 5216 Assembler::target_address_at(call_target_address, |
| 5223 unoptimized_code)); | 5217 unoptimized_code)); |
| 5224 return OSR_AFTER_STACK_CHECK; | 5218 return OSR_AFTER_STACK_CHECK; |
| 5225 } | 5219 } |
| 5226 | 5220 |
| 5227 | 5221 |
| 5228 } } // namespace v8::internal | 5222 } } // namespace v8::internal |
| 5229 | 5223 |
| 5230 #endif // V8_TARGET_ARCH_X87 | 5224 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |