| 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 1677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1688 } else { | 1688 } else { |
| 1689 Register value_reg = locs()->in(1).reg(); | 1689 Register value_reg = locs()->in(1).reg(); |
| 1690 __ StoreIntoObjectNoBarrier(instance_reg, | 1690 __ StoreIntoObjectNoBarrier(instance_reg, |
| 1691 FieldAddress(instance_reg, field().Offset()), value_reg); | 1691 FieldAddress(instance_reg, field().Offset()), value_reg); |
| 1692 } | 1692 } |
| 1693 } | 1693 } |
| 1694 } | 1694 } |
| 1695 | 1695 |
| 1696 | 1696 |
| 1697 LocationSummary* LoadStaticFieldInstr::MakeLocationSummary() const { | 1697 LocationSummary* LoadStaticFieldInstr::MakeLocationSummary() const { |
| 1698 return LocationSummary::Make(0, | 1698 const intptr_t kNumInputs = 1; |
| 1699 Location::RequiresRegister(), | 1699 const intptr_t kNumTemps = 0; |
| 1700 LocationSummary::kNoCall); | 1700 LocationSummary* summary = |
| 1701 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 1702 summary->set_in(0, Location::RequiresRegister()); |
| 1703 summary->set_out(Location::RequiresRegister()); |
| 1704 return summary; |
| 1701 } | 1705 } |
| 1702 | 1706 |
| 1703 | 1707 |
| 1704 void LoadStaticFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1708 void LoadStaticFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 1709 Register field = locs()->in(0).reg(); |
| 1705 Register result = locs()->out().reg(); | 1710 Register result = locs()->out().reg(); |
| 1706 __ LoadObject(result, field()); | |
| 1707 __ LoadFromOffset(kLoadWord, result, | 1711 __ LoadFromOffset(kLoadWord, result, |
| 1708 result, Field::value_offset() - kHeapObjectTag); | 1712 field, Field::value_offset() - kHeapObjectTag); |
| 1709 } | 1713 } |
| 1710 | 1714 |
| 1711 | 1715 |
| 1712 LocationSummary* StoreStaticFieldInstr::MakeLocationSummary() const { | 1716 LocationSummary* StoreStaticFieldInstr::MakeLocationSummary() const { |
| 1713 LocationSummary* locs = new LocationSummary(1, 1, LocationSummary::kNoCall); | 1717 LocationSummary* locs = new LocationSummary(1, 1, LocationSummary::kNoCall); |
| 1714 locs->set_in(0, value()->NeedsStoreBuffer() ? Location::WritableRegister() | 1718 locs->set_in(0, value()->NeedsStoreBuffer() ? Location::WritableRegister() |
| 1715 : Location::RequiresRegister()); | 1719 : Location::RequiresRegister()); |
| 1716 locs->set_temp(0, Location::RequiresRegister()); | 1720 locs->set_temp(0, Location::RequiresRegister()); |
| 1717 return locs; | 1721 return locs; |
| 1718 } | 1722 } |
| (...skipping 1860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3579 compiler->GenerateCall(token_pos(), | 3583 compiler->GenerateCall(token_pos(), |
| 3580 &label, | 3584 &label, |
| 3581 PcDescriptors::kOther, | 3585 PcDescriptors::kOther, |
| 3582 locs()); | 3586 locs()); |
| 3583 __ Drop(2); // Discard type arguments and receiver. | 3587 __ Drop(2); // Discard type arguments and receiver. |
| 3584 } | 3588 } |
| 3585 | 3589 |
| 3586 } // namespace dart | 3590 } // namespace dart |
| 3587 | 3591 |
| 3588 #endif // defined TARGET_ARCH_ARM | 3592 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |