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 1699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1710 __ Drop(3); | 1710 __ Drop(3); |
1711 } | 1711 } |
1712 break; | 1712 break; |
1713 case ObjectLiteral::Property::PROTOTYPE: | 1713 case ObjectLiteral::Property::PROTOTYPE: |
1714 __ Push(Operand(rsp, 0)); // Duplicate receiver. | 1714 __ Push(Operand(rsp, 0)); // Duplicate receiver. |
1715 VisitForStackValue(value); | 1715 VisitForStackValue(value); |
1716 DCHECK(property->emit_store()); | 1716 DCHECK(property->emit_store()); |
1717 __ CallRuntime(Runtime::kInternalSetPrototype, 2); | 1717 __ CallRuntime(Runtime::kInternalSetPrototype, 2); |
1718 break; | 1718 break; |
1719 case ObjectLiteral::Property::GETTER: | 1719 case ObjectLiteral::Property::GETTER: |
1720 accessor_table.lookup(key)->second->getter = value; | 1720 if (property->emit_store()) { |
| 1721 accessor_table.lookup(key)->second->getter = value; |
| 1722 } |
1721 break; | 1723 break; |
1722 case ObjectLiteral::Property::SETTER: | 1724 case ObjectLiteral::Property::SETTER: |
1723 accessor_table.lookup(key)->second->setter = value; | 1725 if (property->emit_store()) { |
| 1726 accessor_table.lookup(key)->second->setter = value; |
| 1727 } |
1724 break; | 1728 break; |
1725 } | 1729 } |
1726 } | 1730 } |
1727 | 1731 |
1728 // Emit code to define accessors, using only a single call to the runtime for | 1732 // Emit code to define accessors, using only a single call to the runtime for |
1729 // each pair of corresponding getters and setters. | 1733 // each pair of corresponding getters and setters. |
1730 for (AccessorTable::Iterator it = accessor_table.begin(); | 1734 for (AccessorTable::Iterator it = accessor_table.begin(); |
1731 it != accessor_table.end(); | 1735 it != accessor_table.end(); |
1732 ++it) { | 1736 ++it) { |
1733 __ Push(Operand(rsp, 0)); // Duplicate receiver. | 1737 __ Push(Operand(rsp, 0)); // Duplicate receiver. |
(...skipping 3584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5318 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5322 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
5319 Assembler::target_address_at(call_target_address, | 5323 Assembler::target_address_at(call_target_address, |
5320 unoptimized_code)); | 5324 unoptimized_code)); |
5321 return OSR_AFTER_STACK_CHECK; | 5325 return OSR_AFTER_STACK_CHECK; |
5322 } | 5326 } |
5323 | 5327 |
5324 | 5328 |
5325 } } // namespace v8::internal | 5329 } } // namespace v8::internal |
5326 | 5330 |
5327 #endif // V8_TARGET_ARCH_X64 | 5331 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |