Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: runtime/vm/intermediate_language_x64.cc

Issue 15973010: Split LoadStatic into two instructions: load static filed, load value. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/intermediate_language_mips.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1725 matching lines...) Expand 10 before | Expand all | Expand 10 after
1736 } else { 1736 } else {
1737 Register value_reg = locs()->in(1).reg(); 1737 Register value_reg = locs()->in(1).reg();
1738 __ StoreIntoObjectNoBarrier(instance_reg, 1738 __ StoreIntoObjectNoBarrier(instance_reg,
1739 FieldAddress(instance_reg, field().Offset()), value_reg); 1739 FieldAddress(instance_reg, field().Offset()), value_reg);
1740 } 1740 }
1741 } 1741 }
1742 } 1742 }
1743 1743
1744 1744
1745 LocationSummary* LoadStaticFieldInstr::MakeLocationSummary() const { 1745 LocationSummary* LoadStaticFieldInstr::MakeLocationSummary() const {
1746 return LocationSummary::Make(0, 1746 const intptr_t kNumInputs = 1;
1747 Location::RequiresRegister(), 1747 const intptr_t kNumTemps = 0;
1748 LocationSummary::kNoCall); 1748 LocationSummary* summary =
1749 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
1750 summary->set_in(0, Location::RequiresRegister());
1751 summary->set_out(Location::RequiresRegister());
1752 return summary;
1749 } 1753 }
1750 1754
1751 1755
1752 void LoadStaticFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 1756 void LoadStaticFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
1757 Register field = locs()->in(0).reg();
1753 Register result = locs()->out().reg(); 1758 Register result = locs()->out().reg();
1754 __ LoadObject(result, field()); 1759 __ movq(result, FieldAddress(field, Field::value_offset()));
1755 __ movq(result, FieldAddress(result, Field::value_offset()));
1756 } 1760 }
1757 1761
1758 1762
1759 LocationSummary* StoreStaticFieldInstr::MakeLocationSummary() const { 1763 LocationSummary* StoreStaticFieldInstr::MakeLocationSummary() const {
1760 LocationSummary* locs = new LocationSummary(1, 1, LocationSummary::kNoCall); 1764 LocationSummary* locs = new LocationSummary(1, 1, LocationSummary::kNoCall);
1761 locs->set_in(0, value()->NeedsStoreBuffer() ? Location::WritableRegister() 1765 locs->set_in(0, value()->NeedsStoreBuffer() ? Location::WritableRegister()
1762 : Location::RequiresRegister()); 1766 : Location::RequiresRegister());
1763 locs->set_temp(0, Location::RequiresRegister()); 1767 locs->set_temp(0, Location::RequiresRegister());
1764 return locs; 1768 return locs;
1765 } 1769 }
(...skipping 2643 matching lines...) Expand 10 before | Expand all | Expand 10 after
4409 PcDescriptors::kOther, 4413 PcDescriptors::kOther,
4410 locs()); 4414 locs());
4411 __ Drop(2); // Discard type arguments and receiver. 4415 __ Drop(2); // Discard type arguments and receiver.
4412 } 4416 }
4413 4417
4414 } // namespace dart 4418 } // namespace dart
4415 4419
4416 #undef __ 4420 #undef __
4417 4421
4418 #endif // defined TARGET_ARCH_X64 4422 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698