OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
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 1721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1732 break; | 1732 break; |
1733 case ObjectLiteral::Property::PROTOTYPE: | 1733 case ObjectLiteral::Property::PROTOTYPE: |
1734 DCHECK(property->emit_store()); | 1734 DCHECK(property->emit_store()); |
1735 // Duplicate receiver on stack. | 1735 // Duplicate receiver on stack. |
1736 __ Peek(x0, 0); | 1736 __ Peek(x0, 0); |
1737 __ Push(x0); | 1737 __ Push(x0); |
1738 VisitForStackValue(value); | 1738 VisitForStackValue(value); |
1739 __ CallRuntime(Runtime::kInternalSetPrototype, 2); | 1739 __ CallRuntime(Runtime::kInternalSetPrototype, 2); |
1740 break; | 1740 break; |
1741 case ObjectLiteral::Property::GETTER: | 1741 case ObjectLiteral::Property::GETTER: |
1742 accessor_table.lookup(key)->second->getter = value; | 1742 if (property->emit_store()) { |
| 1743 accessor_table.lookup(key)->second->getter = value; |
| 1744 } |
1743 break; | 1745 break; |
1744 case ObjectLiteral::Property::SETTER: | 1746 case ObjectLiteral::Property::SETTER: |
1745 accessor_table.lookup(key)->second->setter = value; | 1747 if (property->emit_store()) { |
| 1748 accessor_table.lookup(key)->second->setter = value; |
| 1749 } |
1746 break; | 1750 break; |
1747 } | 1751 } |
1748 } | 1752 } |
1749 | 1753 |
1750 // Emit code to define accessors, using only a single call to the runtime for | 1754 // Emit code to define accessors, using only a single call to the runtime for |
1751 // each pair of corresponding getters and setters. | 1755 // each pair of corresponding getters and setters. |
1752 for (AccessorTable::Iterator it = accessor_table.begin(); | 1756 for (AccessorTable::Iterator it = accessor_table.begin(); |
1753 it != accessor_table.end(); | 1757 it != accessor_table.end(); |
1754 ++it) { | 1758 ++it) { |
1755 __ Peek(x10, 0); // Duplicate receiver. | 1759 __ Peek(x10, 0); // Duplicate receiver. |
(...skipping 3653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5409 return previous_; | 5413 return previous_; |
5410 } | 5414 } |
5411 | 5415 |
5412 | 5416 |
5413 #undef __ | 5417 #undef __ |
5414 | 5418 |
5415 | 5419 |
5416 } } // namespace v8::internal | 5420 } } // namespace v8::internal |
5417 | 5421 |
5418 #endif // V8_TARGET_ARCH_ARM64 | 5422 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |