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

Unified Diff: runtime/vm/constant_propagator.cc

Issue 1149713002: With --noopt run unoptimized code through optimizer, more optimizations can be done later. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: m Created 5 years, 7 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/compiler.cc ('k') | runtime/vm/debugger.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/constant_propagator.cc
diff --git a/runtime/vm/constant_propagator.cc b/runtime/vm/constant_propagator.cc
index 35ee3ccd7f9d6537a569dfd3bf94af24a738e673..a1abaaded7d9d3a7295b80d34bc65707ad2cf8ff 100644
--- a/runtime/vm/constant_propagator.cc
+++ b/runtime/vm/constant_propagator.cc
@@ -702,10 +702,9 @@ void ConstantPropagator::VisitInitStaticField(InitStaticFieldInstr* instr) {
void ConstantPropagator::VisitLoadStaticField(LoadStaticFieldInstr* instr) {
const Field& field = instr->StaticField();
ASSERT(field.is_static());
- if (field.is_final()) {
- Instance& obj = Instance::Handle(I, field.value());
- ASSERT(obj.raw() != Object::sentinel().raw());
- ASSERT(obj.raw() != Object::transition_sentinel().raw());
+ Instance& obj = Instance::Handle(I, field.value());
+ if (field.is_final() && (obj.raw() != Object::sentinel().raw()) &&
+ (obj.raw() != Object::transition_sentinel().raw())) {
if (obj.IsSmi() || obj.IsOld()) {
SetValue(instr, obj);
return;
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/debugger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698