| 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_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 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 1736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1747 const intptr_t kNumInputs = 1; | 1747 const intptr_t kNumInputs = 1; |
| 1748 const intptr_t kNumTemps = 0; | 1748 const intptr_t kNumTemps = 0; |
| 1749 LocationSummary* summary = | 1749 LocationSummary* summary = |
| 1750 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 1750 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 1751 summary->set_in(0, Location::RequiresRegister()); | 1751 summary->set_in(0, Location::RequiresRegister()); |
| 1752 summary->set_out(Location::RequiresRegister()); | 1752 summary->set_out(Location::RequiresRegister()); |
| 1753 return summary; | 1753 return summary; |
| 1754 } | 1754 } |
| 1755 | 1755 |
| 1756 | 1756 |
| 1757 // When the parser is building an implicit static getter for optimization, |
| 1758 // it can generate a function body where deoptimization ids do not line up |
| 1759 // with the unoptimized code. |
| 1760 // |
| 1761 // This is safe only so long as LoadStaticFieldInstr cannot deoptimize. |
| 1757 void LoadStaticFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1762 void LoadStaticFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 1758 Register field = locs()->in(0).reg(); | 1763 Register field = locs()->in(0).reg(); |
| 1759 Register result = locs()->out().reg(); | 1764 Register result = locs()->out().reg(); |
| 1760 __ movq(result, FieldAddress(field, Field::value_offset())); | 1765 __ movq(result, FieldAddress(field, Field::value_offset())); |
| 1761 } | 1766 } |
| 1762 | 1767 |
| 1763 | 1768 |
| 1764 LocationSummary* StoreStaticFieldInstr::MakeLocationSummary() const { | 1769 LocationSummary* StoreStaticFieldInstr::MakeLocationSummary() const { |
| 1765 LocationSummary* locs = new LocationSummary(1, 1, LocationSummary::kNoCall); | 1770 LocationSummary* locs = new LocationSummary(1, 1, LocationSummary::kNoCall); |
| 1766 locs->set_in(0, value()->NeedsStoreBuffer() ? Location::WritableRegister() | 1771 locs->set_in(0, value()->NeedsStoreBuffer() ? Location::WritableRegister() |
| (...skipping 2662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4429 PcDescriptors::kOther, | 4434 PcDescriptors::kOther, |
| 4430 locs()); | 4435 locs()); |
| 4431 __ Drop(2); // Discard type arguments and receiver. | 4436 __ Drop(2); // Discard type arguments and receiver. |
| 4432 } | 4437 } |
| 4433 | 4438 |
| 4434 } // namespace dart | 4439 } // namespace dart |
| 4435 | 4440 |
| 4436 #undef __ | 4441 #undef __ |
| 4437 | 4442 |
| 4438 #endif // defined TARGET_ARCH_X64 | 4443 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |