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

Side by Side Diff: runtime/vm/intermediate_language_mips.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_ia32.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | 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_MIPS. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS.
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
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 1641 matching lines...) Expand 10 before | Expand all | Expand 10 after
1652 } else { 1652 } else {
1653 Register value_reg = locs()->in(1).reg(); 1653 Register value_reg = locs()->in(1).reg();
1654 __ StoreIntoObjectNoBarrier(instance_reg, 1654 __ StoreIntoObjectNoBarrier(instance_reg,
1655 FieldAddress(instance_reg, field().Offset()), value_reg); 1655 FieldAddress(instance_reg, field().Offset()), value_reg);
1656 } 1656 }
1657 } 1657 }
1658 } 1658 }
1659 1659
1660 1660
1661 LocationSummary* LoadStaticFieldInstr::MakeLocationSummary() const { 1661 LocationSummary* LoadStaticFieldInstr::MakeLocationSummary() const {
1662 return LocationSummary::Make(0, 1662 const intptr_t kNumInputs = 1;
1663 Location::RequiresRegister(), 1663 const intptr_t kNumTemps = 0;
1664 LocationSummary::kNoCall); 1664 LocationSummary* summary =
1665 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
1666 summary->set_in(0, Location::RequiresRegister());
1667 summary->set_out(Location::RequiresRegister());
1668 return summary;
1665 } 1669 }
1666 1670
1667 1671
1668 void LoadStaticFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 1672 void LoadStaticFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
1669 __ TraceSimMsg("LoadStaticFieldInstr"); 1673 __ TraceSimMsg("LoadStaticFieldInstr");
1674 Register field = locs()->in(0).reg();
1670 Register result = locs()->out().reg(); 1675 Register result = locs()->out().reg();
1671 __ LoadObject(result, field()); 1676 __ lw(result, FieldAddress(field, Field::value_offset()));
1672 __ lw(result, Address(result, Field::value_offset() - kHeapObjectTag));
1673 } 1677 }
1674 1678
1675 1679
1676 LocationSummary* StoreStaticFieldInstr::MakeLocationSummary() const { 1680 LocationSummary* StoreStaticFieldInstr::MakeLocationSummary() const {
1677 LocationSummary* locs = new LocationSummary(1, 1, LocationSummary::kNoCall); 1681 LocationSummary* locs = new LocationSummary(1, 1, LocationSummary::kNoCall);
1678 locs->set_in(0, value()->NeedsStoreBuffer() ? Location::WritableRegister() 1682 locs->set_in(0, value()->NeedsStoreBuffer() ? Location::WritableRegister()
1679 : Location::RequiresRegister()); 1683 : Location::RequiresRegister());
1680 locs->set_temp(0, Location::RequiresRegister()); 1684 locs->set_temp(0, Location::RequiresRegister());
1681 return locs; 1685 return locs;
1682 } 1686 }
(...skipping 1619 matching lines...) Expand 10 before | Expand all | Expand 10 after
3302 compiler->GenerateCall(token_pos(), 3306 compiler->GenerateCall(token_pos(),
3303 &label, 3307 &label,
3304 PcDescriptors::kOther, 3308 PcDescriptors::kOther,
3305 locs()); 3309 locs());
3306 __ Drop(2); // Discard type arguments and receiver. 3310 __ Drop(2); // Discard type arguments and receiver.
3307 } 3311 }
3308 3312
3309 } // namespace dart 3313 } // namespace dart
3310 3314
3311 #endif // defined TARGET_ARCH_MIPS 3315 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_ia32.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698