| 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 1754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1765 LocationSummary* summary = | 1765 LocationSummary* summary = |
| 1766 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 1766 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 1767 summary->set_in(0, Location::RequiresRegister()); | 1767 summary->set_in(0, Location::RequiresRegister()); |
| 1768 // By specifying same register as input, our simple register allocator can | 1768 // By specifying same register as input, our simple register allocator can |
| 1769 // generate better code. | 1769 // generate better code. |
| 1770 summary->set_out(Location::SameAsFirstInput()); | 1770 summary->set_out(Location::SameAsFirstInput()); |
| 1771 return summary; | 1771 return summary; |
| 1772 } | 1772 } |
| 1773 | 1773 |
| 1774 | 1774 |
| 1775 // When the parser is building an implicit static getter for optimization, |
| 1776 // it can generate a function body where deoptimization ids do not line up |
| 1777 // with the unoptimized code. |
| 1778 // |
| 1779 // This is safe only so long as LoadStaticFieldInstr cannot deoptimize. |
| 1775 void LoadStaticFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1780 void LoadStaticFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 1776 Register field = locs()->in(0).reg(); | 1781 Register field = locs()->in(0).reg(); |
| 1777 Register result = locs()->out().reg(); | 1782 Register result = locs()->out().reg(); |
| 1778 __ movl(result, FieldAddress(field, Field::value_offset())); | 1783 __ movl(result, FieldAddress(field, Field::value_offset())); |
| 1779 } | 1784 } |
| 1780 | 1785 |
| 1781 | 1786 |
| 1782 LocationSummary* StoreStaticFieldInstr::MakeLocationSummary() const { | 1787 LocationSummary* StoreStaticFieldInstr::MakeLocationSummary() const { |
| 1783 LocationSummary* locs = new LocationSummary(1, 1, LocationSummary::kNoCall); | 1788 LocationSummary* locs = new LocationSummary(1, 1, LocationSummary::kNoCall); |
| 1784 locs->set_in(0, value()->NeedsStoreBuffer() ? Location::WritableRegister() | 1789 locs->set_in(0, value()->NeedsStoreBuffer() ? Location::WritableRegister() |
| (...skipping 2974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4759 PcDescriptors::kOther, | 4764 PcDescriptors::kOther, |
| 4760 locs()); | 4765 locs()); |
| 4761 __ Drop(2); // Discard type arguments and receiver. | 4766 __ Drop(2); // Discard type arguments and receiver. |
| 4762 } | 4767 } |
| 4763 | 4768 |
| 4764 } // namespace dart | 4769 } // namespace dart |
| 4765 | 4770 |
| 4766 #undef __ | 4771 #undef __ |
| 4767 | 4772 |
| 4768 #endif // defined TARGET_ARCH_IA32 | 4773 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |