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

Unified Diff: runtime/vm/intermediate_language.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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/intermediate_language.cc
===================================================================
--- runtime/vm/intermediate_language.cc (revision 24013)
+++ runtime/vm/intermediate_language.cc (working copy)
@@ -173,7 +173,7 @@
EffectSet LoadStaticFieldInstr::Dependencies() const {
- return field().is_final() ? EffectSet::None() : EffectSet::All();
+ return StaticField().is_final() ? EffectSet::None() : EffectSet::All();
}
@@ -181,12 +181,19 @@
LoadStaticFieldInstr* other_load = other->AsLoadStaticField();
ASSERT(other_load != NULL);
// Assert that the field is initialized.
- ASSERT(field().value() != Object::sentinel().raw());
- ASSERT(field().value() != Object::transition_sentinel().raw());
- return field().raw() == other_load->field().raw();
+ ASSERT(StaticField().value() != Object::sentinel().raw());
+ ASSERT(StaticField().value() != Object::transition_sentinel().raw());
+ return StaticField().raw() == other_load->StaticField().raw();
}
+const Field& LoadStaticFieldInstr::StaticField() const {
+ Field& field = Field::Handle();
+ field ^= field_value()->BoundConstant().raw();
+ return field;
+}
+
+
EffectSet LoadIndexedInstr::Dependencies() const {
return EffectSet::All();
}

Powered by Google App Engine
This is Rietveld 408576698