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 #if V8_TARGET_ARCH_X64 | 5 #if V8_TARGET_ARCH_X64 |
6 | 6 |
7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 1499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1510 __ CallRuntime(Runtime::kSetProperty); | 1510 __ CallRuntime(Runtime::kSetProperty); |
1511 } else { | 1511 } else { |
1512 __ Drop(3); | 1512 __ Drop(3); |
1513 } | 1513 } |
1514 break; | 1514 break; |
1515 case ObjectLiteral::Property::PROTOTYPE: | 1515 case ObjectLiteral::Property::PROTOTYPE: |
1516 __ Push(Operand(rsp, 0)); // Duplicate receiver. | 1516 __ Push(Operand(rsp, 0)); // Duplicate receiver. |
1517 VisitForStackValue(value); | 1517 VisitForStackValue(value); |
1518 DCHECK(property->emit_store()); | 1518 DCHECK(property->emit_store()); |
1519 __ CallRuntime(Runtime::kInternalSetPrototype); | 1519 __ CallRuntime(Runtime::kInternalSetPrototype); |
| 1520 PrepareForBailoutForId(expr->GetIdForPropertySet(property_index), |
| 1521 NO_REGISTERS); |
1520 break; | 1522 break; |
1521 case ObjectLiteral::Property::GETTER: | 1523 case ObjectLiteral::Property::GETTER: |
1522 if (property->emit_store()) { | 1524 if (property->emit_store()) { |
1523 accessor_table.lookup(key)->second->getter = property; | 1525 accessor_table.lookup(key)->second->getter = property; |
1524 } | 1526 } |
1525 break; | 1527 break; |
1526 case ObjectLiteral::Property::SETTER: | 1528 case ObjectLiteral::Property::SETTER: |
1527 if (property->emit_store()) { | 1529 if (property->emit_store()) { |
1528 accessor_table.lookup(key)->second->setter = property; | 1530 accessor_table.lookup(key)->second->setter = property; |
1529 } | 1531 } |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1562 result_saved = true; | 1564 result_saved = true; |
1563 } | 1565 } |
1564 | 1566 |
1565 __ Push(Operand(rsp, 0)); // Duplicate receiver. | 1567 __ Push(Operand(rsp, 0)); // Duplicate receiver. |
1566 | 1568 |
1567 if (property->kind() == ObjectLiteral::Property::PROTOTYPE) { | 1569 if (property->kind() == ObjectLiteral::Property::PROTOTYPE) { |
1568 DCHECK(!property->is_computed_name()); | 1570 DCHECK(!property->is_computed_name()); |
1569 VisitForStackValue(value); | 1571 VisitForStackValue(value); |
1570 DCHECK(property->emit_store()); | 1572 DCHECK(property->emit_store()); |
1571 __ CallRuntime(Runtime::kInternalSetPrototype); | 1573 __ CallRuntime(Runtime::kInternalSetPrototype); |
| 1574 PrepareForBailoutForId(expr->GetIdForPropertySet(property_index), |
| 1575 NO_REGISTERS); |
1572 } else { | 1576 } else { |
1573 EmitPropertyKey(property, expr->GetIdForProperty(property_index)); | 1577 EmitPropertyKey(property, expr->GetIdForPropertyName(property_index)); |
1574 VisitForStackValue(value); | 1578 VisitForStackValue(value); |
1575 if (NeedsHomeObject(value)) { | 1579 if (NeedsHomeObject(value)) { |
1576 EmitSetHomeObject(value, 2, property->GetSlot()); | 1580 EmitSetHomeObject(value, 2, property->GetSlot()); |
1577 } | 1581 } |
1578 | 1582 |
1579 switch (property->kind()) { | 1583 switch (property->kind()) { |
1580 case ObjectLiteral::Property::CONSTANT: | 1584 case ObjectLiteral::Property::CONSTANT: |
1581 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 1585 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
1582 case ObjectLiteral::Property::COMPUTED: | 1586 case ObjectLiteral::Property::COMPUTED: |
1583 if (property->emit_store()) { | 1587 if (property->emit_store()) { |
(...skipping 3208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4792 Assembler::target_address_at(call_target_address, | 4796 Assembler::target_address_at(call_target_address, |
4793 unoptimized_code)); | 4797 unoptimized_code)); |
4794 return OSR_AFTER_STACK_CHECK; | 4798 return OSR_AFTER_STACK_CHECK; |
4795 } | 4799 } |
4796 | 4800 |
4797 | 4801 |
4798 } // namespace internal | 4802 } // namespace internal |
4799 } // namespace v8 | 4803 } // namespace v8 |
4800 | 4804 |
4801 #endif // V8_TARGET_ARCH_X64 | 4805 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |