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 1665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1676 __ Drop(3); | 1676 __ Drop(3); |
1677 } | 1677 } |
1678 break; | 1678 break; |
1679 case ObjectLiteral::Property::PROTOTYPE: | 1679 case ObjectLiteral::Property::PROTOTYPE: |
1680 __ push(Operand(esp, 0)); // Duplicate receiver. | 1680 __ push(Operand(esp, 0)); // Duplicate receiver. |
1681 VisitForStackValue(value); | 1681 VisitForStackValue(value); |
1682 DCHECK(property->emit_store()); | 1682 DCHECK(property->emit_store()); |
1683 __ CallRuntime(Runtime::kInternalSetPrototype, 2); | 1683 __ CallRuntime(Runtime::kInternalSetPrototype, 2); |
1684 break; | 1684 break; |
1685 case ObjectLiteral::Property::GETTER: | 1685 case ObjectLiteral::Property::GETTER: |
1686 accessor_table.lookup(key)->second->getter = value; | 1686 if (property->emit_store()) { |
| 1687 accessor_table.lookup(key)->second->getter = value; |
| 1688 } |
1687 break; | 1689 break; |
1688 case ObjectLiteral::Property::SETTER: | 1690 case ObjectLiteral::Property::SETTER: |
1689 accessor_table.lookup(key)->second->setter = value; | 1691 if (property->emit_store()) { |
| 1692 accessor_table.lookup(key)->second->setter = value; |
| 1693 } |
1690 break; | 1694 break; |
1691 } | 1695 } |
1692 } | 1696 } |
1693 | 1697 |
1694 // Emit code to define accessors, using only a single call to the runtime for | 1698 // Emit code to define accessors, using only a single call to the runtime for |
1695 // each pair of corresponding getters and setters. | 1699 // each pair of corresponding getters and setters. |
1696 for (AccessorTable::Iterator it = accessor_table.begin(); | 1700 for (AccessorTable::Iterator it = accessor_table.begin(); |
1697 it != accessor_table.end(); | 1701 it != accessor_table.end(); |
1698 ++it) { | 1702 ++it) { |
1699 __ push(Operand(esp, 0)); // Duplicate receiver. | 1703 __ push(Operand(esp, 0)); // Duplicate receiver. |
(...skipping 3595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5295 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5299 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
5296 Assembler::target_address_at(call_target_address, | 5300 Assembler::target_address_at(call_target_address, |
5297 unoptimized_code)); | 5301 unoptimized_code)); |
5298 return OSR_AFTER_STACK_CHECK; | 5302 return OSR_AFTER_STACK_CHECK; |
5299 } | 5303 } |
5300 | 5304 |
5301 | 5305 |
5302 } } // namespace v8::internal | 5306 } } // namespace v8::internal |
5303 | 5307 |
5304 #endif // V8_TARGET_ARCH_IA32 | 5308 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |