| 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_ARM. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. |
| 6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
| 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 1686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1697 } else { | 1697 } else { |
| 1698 Register value_reg = locs()->in(1).reg(); | 1698 Register value_reg = locs()->in(1).reg(); |
| 1699 __ StoreIntoObjectNoBarrier(instance_reg, | 1699 __ StoreIntoObjectNoBarrier(instance_reg, |
| 1700 FieldAddress(instance_reg, field().Offset()), value_reg); | 1700 FieldAddress(instance_reg, field().Offset()), value_reg); |
| 1701 } | 1701 } |
| 1702 } | 1702 } |
| 1703 } | 1703 } |
| 1704 | 1704 |
| 1705 | 1705 |
| 1706 LocationSummary* LoadStaticFieldInstr::MakeLocationSummary() const { | 1706 LocationSummary* LoadStaticFieldInstr::MakeLocationSummary() const { |
| 1707 return LocationSummary::Make(0, | 1707 const intptr_t kNumInputs = 1; |
| 1708 Location::RequiresRegister(), | 1708 const intptr_t kNumTemps = 0; |
| 1709 LocationSummary::kNoCall); | 1709 LocationSummary* summary = |
| 1710 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 1711 summary->set_in(0, Location::RequiresRegister()); |
| 1712 summary->set_out(Location::RequiresRegister()); |
| 1713 return summary; |
| 1710 } | 1714 } |
| 1711 | 1715 |
| 1712 | 1716 |
| 1713 void LoadStaticFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1717 void LoadStaticFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 1718 Register field = locs()->in(0).reg(); |
| 1714 Register result = locs()->out().reg(); | 1719 Register result = locs()->out().reg(); |
| 1715 __ LoadObject(result, field()); | |
| 1716 __ LoadFromOffset(kLoadWord, result, | 1720 __ LoadFromOffset(kLoadWord, result, |
| 1717 result, Field::value_offset() - kHeapObjectTag); | 1721 field, Field::value_offset() - kHeapObjectTag); |
| 1718 } | 1722 } |
| 1719 | 1723 |
| 1720 | 1724 |
| 1721 LocationSummary* StoreStaticFieldInstr::MakeLocationSummary() const { | 1725 LocationSummary* StoreStaticFieldInstr::MakeLocationSummary() const { |
| 1722 LocationSummary* locs = new LocationSummary(1, 1, LocationSummary::kNoCall); | 1726 LocationSummary* locs = new LocationSummary(1, 1, LocationSummary::kNoCall); |
| 1723 locs->set_in(0, value()->NeedsStoreBuffer() ? Location::WritableRegister() | 1727 locs->set_in(0, value()->NeedsStoreBuffer() ? Location::WritableRegister() |
| 1724 : Location::RequiresRegister()); | 1728 : Location::RequiresRegister()); |
| 1725 locs->set_temp(0, Location::RequiresRegister()); | 1729 locs->set_temp(0, Location::RequiresRegister()); |
| 1726 return locs; | 1730 return locs; |
| 1727 } | 1731 } |
| (...skipping 1877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3605 compiler->GenerateCall(token_pos(), | 3609 compiler->GenerateCall(token_pos(), |
| 3606 &label, | 3610 &label, |
| 3607 PcDescriptors::kOther, | 3611 PcDescriptors::kOther, |
| 3608 locs()); | 3612 locs()); |
| 3609 __ Drop(2); // Discard type arguments and receiver. | 3613 __ Drop(2); // Discard type arguments and receiver. |
| 3610 } | 3614 } |
| 3611 | 3615 |
| 3612 } // namespace dart | 3616 } // namespace dart |
| 3613 | 3617 |
| 3614 #endif // defined TARGET_ARCH_ARM | 3618 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |