| 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-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 1628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1639 } else { | 1639 } else { |
| 1640 VisitForEffect(value); | 1640 VisitForEffect(value); |
| 1641 } | 1641 } |
| 1642 break; | 1642 break; |
| 1643 } | 1643 } |
| 1644 __ push(Operand(esp, 0)); // Duplicate receiver. | 1644 __ push(Operand(esp, 0)); // Duplicate receiver. |
| 1645 VisitForStackValue(key); | 1645 VisitForStackValue(key); |
| 1646 VisitForStackValue(value); | 1646 VisitForStackValue(value); |
| 1647 if (property->emit_store()) { | 1647 if (property->emit_store()) { |
| 1648 __ push(Immediate(Smi::FromInt(NONE))); // PropertyAttributes | 1648 __ push(Immediate(Smi::FromInt(NONE))); // PropertyAttributes |
| 1649 __ CallRuntime(Runtime::kSetProperty, 4); | 1649 __ CallRuntime(Runtime::kAddProperty, 4); |
| 1650 } else { | 1650 } else { |
| 1651 __ Drop(3); | 1651 __ Drop(3); |
| 1652 } | 1652 } |
| 1653 break; | 1653 break; |
| 1654 case ObjectLiteral::Property::PROTOTYPE: | 1654 case ObjectLiteral::Property::PROTOTYPE: |
| 1655 __ push(Operand(esp, 0)); // Duplicate receiver. | 1655 __ push(Operand(esp, 0)); // Duplicate receiver. |
| 1656 VisitForStackValue(value); | 1656 VisitForStackValue(value); |
| 1657 if (property->emit_store()) { | 1657 if (property->emit_store()) { |
| 1658 __ CallRuntime(Runtime::kSetPrototype, 2); | 1658 __ CallRuntime(Runtime::kSetPrototype, 2); |
| 1659 } else { | 1659 } else { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 1672 // Emit code to define accessors, using only a single call to the runtime for | 1672 // Emit code to define accessors, using only a single call to the runtime for |
| 1673 // each pair of corresponding getters and setters. | 1673 // each pair of corresponding getters and setters. |
| 1674 for (AccessorTable::Iterator it = accessor_table.begin(); | 1674 for (AccessorTable::Iterator it = accessor_table.begin(); |
| 1675 it != accessor_table.end(); | 1675 it != accessor_table.end(); |
| 1676 ++it) { | 1676 ++it) { |
| 1677 __ push(Operand(esp, 0)); // Duplicate receiver. | 1677 __ push(Operand(esp, 0)); // Duplicate receiver. |
| 1678 VisitForStackValue(it->first); | 1678 VisitForStackValue(it->first); |
| 1679 EmitAccessor(it->second->getter); | 1679 EmitAccessor(it->second->getter); |
| 1680 EmitAccessor(it->second->setter); | 1680 EmitAccessor(it->second->setter); |
| 1681 __ push(Immediate(Smi::FromInt(NONE))); | 1681 __ push(Immediate(Smi::FromInt(NONE))); |
| 1682 __ CallRuntime(Runtime::kDefineOrRedefineAccessorProperty, 5); | 1682 __ CallRuntime(Runtime::kDefineAccessorPropertyUnchecked, 5); |
| 1683 } | 1683 } |
| 1684 | 1684 |
| 1685 if (expr->has_function()) { | 1685 if (expr->has_function()) { |
| 1686 ASSERT(result_saved); | 1686 ASSERT(result_saved); |
| 1687 __ push(Operand(esp, 0)); | 1687 __ push(Operand(esp, 0)); |
| 1688 __ CallRuntime(Runtime::kToFastProperties, 1); | 1688 __ CallRuntime(Runtime::kToFastProperties, 1); |
| 1689 } | 1689 } |
| 1690 | 1690 |
| 1691 if (result_saved) { | 1691 if (result_saved) { |
| 1692 context()->PlugTOS(); | 1692 context()->PlugTOS(); |
| (...skipping 3099 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4792 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 4792 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
| 4793 Assembler::target_address_at(call_target_address, | 4793 Assembler::target_address_at(call_target_address, |
| 4794 unoptimized_code)); | 4794 unoptimized_code)); |
| 4795 return OSR_AFTER_STACK_CHECK; | 4795 return OSR_AFTER_STACK_CHECK; |
| 4796 } | 4796 } |
| 4797 | 4797 |
| 4798 | 4798 |
| 4799 } } // namespace v8::internal | 4799 } } // namespace v8::internal |
| 4800 | 4800 |
| 4801 #endif // V8_TARGET_ARCH_X87 | 4801 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |