| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
| 6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
| 7 | 7 |
| 8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 | 9 |
| 10 #include "lib/error.h" | 10 #include "lib/error.h" |
| (...skipping 1665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1676 : Location::RegisterOrConstant(value())); | 1676 : Location::RegisterOrConstant(value())); |
| 1677 return summary; | 1677 return summary; |
| 1678 } | 1678 } |
| 1679 | 1679 |
| 1680 | 1680 |
| 1681 void StoreInstanceFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1681 void StoreInstanceFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 1682 Register instance_reg = locs()->in(0).reg(); | 1682 Register instance_reg = locs()->in(0).reg(); |
| 1683 if (ShouldEmitStoreBarrier()) { | 1683 if (ShouldEmitStoreBarrier()) { |
| 1684 Register value_reg = locs()->in(1).reg(); | 1684 Register value_reg = locs()->in(1).reg(); |
| 1685 __ StoreIntoObject(instance_reg, | 1685 __ StoreIntoObject(instance_reg, |
| 1686 FieldAddress(instance_reg, field().Offset()), value_reg); | 1686 FieldAddress(instance_reg, field().Offset()), |
| 1687 value_reg, |
| 1688 CanValueBeSmi()); |
| 1687 } else { | 1689 } else { |
| 1688 if (locs()->in(1).IsConstant()) { | 1690 if (locs()->in(1).IsConstant()) { |
| 1689 __ StoreIntoObjectNoBarrier( | 1691 __ StoreIntoObjectNoBarrier( |
| 1690 instance_reg, | 1692 instance_reg, |
| 1691 FieldAddress(instance_reg, field().Offset()), | 1693 FieldAddress(instance_reg, field().Offset()), |
| 1692 locs()->in(1).constant()); | 1694 locs()->in(1).constant()); |
| 1693 } else { | 1695 } else { |
| 1694 Register value_reg = locs()->in(1).reg(); | 1696 Register value_reg = locs()->in(1).reg(); |
| 1695 __ StoreIntoObjectNoBarrier(instance_reg, | 1697 __ StoreIntoObjectNoBarrier(instance_reg, |
| 1696 FieldAddress(instance_reg, field().Offset()), value_reg); | 1698 FieldAddress(instance_reg, field().Offset()), value_reg); |
| (...skipping 2021 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3718 PcDescriptors::kOther, | 3720 PcDescriptors::kOther, |
| 3719 locs()); | 3721 locs()); |
| 3720 __ Drop(2); // Discard type arguments and receiver. | 3722 __ Drop(2); // Discard type arguments and receiver. |
| 3721 } | 3723 } |
| 3722 | 3724 |
| 3723 } // namespace dart | 3725 } // namespace dart |
| 3724 | 3726 |
| 3725 #undef __ | 3727 #undef __ |
| 3726 | 3728 |
| 3727 #endif // defined TARGET_ARCH_IA32 | 3729 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |