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

Unified Diff: runtime/vm/intermediate_language_mips.cc

Issue 179443004: VM: Replace StoreVMField with StoreInstanceField. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/intermediate_language_ia32.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_mips.cc
===================================================================
--- runtime/vm/intermediate_language_mips.cc (revision 33058)
+++ runtime/vm/intermediate_language_mips.cc (working copy)
@@ -1692,7 +1692,8 @@
const intptr_t kNumTemps = 0;
LocationSummary* summary =
new LocationSummary(kNumInputs, kNumTemps,
- (field().guarded_cid() == kIllegalCid) || (is_initialization_)
+ !field().IsNull() &&
+ ((field().guarded_cid() == kIllegalCid) || is_initialization_)
? LocationSummary::kCallOnSlowPath
: LocationSummary::kNoCall);
@@ -1750,10 +1751,10 @@
__ Bind(slow_path->exit_label());
__ mov(temp2, temp);
__ StoreIntoObject(instance_reg,
- FieldAddress(instance_reg, field().Offset()),
+ FieldAddress(instance_reg, offset_in_bytes_),
temp2);
} else {
- __ lw(temp, FieldAddress(instance_reg, field().Offset()));
+ __ lw(temp, FieldAddress(instance_reg, offset_in_bytes_));
}
switch (cid) {
case kDoubleCid:
@@ -1798,7 +1799,7 @@
__ Bind(&store_double);
Label copy_double;
- __ lw(temp, FieldAddress(instance_reg, field().Offset()));
+ __ lw(temp, FieldAddress(instance_reg, offset_in_bytes_));
__ BranchNotEqual(temp, reinterpret_cast<int32_t>(Object::null()),
&copy_double);
@@ -1813,7 +1814,7 @@
__ Bind(slow_path->exit_label());
__ mov(temp2, temp);
__ StoreIntoObject(instance_reg,
- FieldAddress(instance_reg, field().Offset()),
+ FieldAddress(instance_reg, offset_in_bytes_),
temp2);
__ Bind(&copy_double);
@@ -1831,19 +1832,19 @@
if (ShouldEmitStoreBarrier()) {
Register value_reg = locs()->in(1).reg();
__ StoreIntoObject(instance_reg,
- FieldAddress(instance_reg, field().Offset()),
+ FieldAddress(instance_reg, offset_in_bytes_),
value_reg,
CanValueBeSmi());
} else {
if (locs()->in(1).IsConstant()) {
__ StoreIntoObjectNoBarrier(
instance_reg,
- FieldAddress(instance_reg, field().Offset()),
+ FieldAddress(instance_reg, offset_in_bytes_),
locs()->in(1).constant());
} else {
Register value_reg = locs()->in(1).reg();
__ StoreIntoObjectNoBarrier(instance_reg,
- FieldAddress(instance_reg, field().Offset()), value_reg);
+ FieldAddress(instance_reg, offset_in_bytes_), value_reg);
}
}
__ Bind(&skip_store);
@@ -4167,32 +4168,6 @@
}
-LocationSummary* StoreVMFieldInstr::MakeLocationSummary(bool opt) const {
- const intptr_t kNumInputs = 2;
- const intptr_t kNumTemps = 0;
- LocationSummary* locs =
- new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
- locs->set_in(0, value()->NeedsStoreBuffer() ? Location::WritableRegister()
- : Location::RequiresRegister());
- locs->set_in(1, Location::RequiresRegister());
- return locs;
-}
-
-
-void StoreVMFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
- Register value_reg = locs()->in(0).reg();
- Register dest_reg = locs()->in(1).reg();
-
- if (value()->NeedsStoreBuffer()) {
- __ StoreIntoObject(dest_reg,
- FieldAddress(dest_reg, offset_in_bytes()), value_reg);
- } else {
- __ StoreIntoObjectNoBarrier(dest_reg,
- FieldAddress(dest_reg, offset_in_bytes()), value_reg);
- }
-}
-
-
LocationSummary* AllocateObjectInstr::MakeLocationSummary(bool opt) const {
return MakeCallSummary();
}
« 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