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

Unified Diff: runtime/vm/constant_propagator.cc

Issue 1093873002: Revert "Type and constant propagator should guard against mutable class ids." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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 | « no previous file | runtime/vm/dart_api_impl_test.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 0736da7ec9338fde331e20f62c61c2d82d7d2cb0..67dc17b350b507004c16acfaad8e8b6a759c3446 100644
--- a/runtime/vm/constant_propagator.cc
+++ b/runtime/vm/constant_propagator.cc
@@ -788,14 +788,10 @@ void ConstantPropagator::VisitLoadClassId(LoadClassIdInstr* instr) {
SetValue(instr, Smi::ZoneHandle(Z, Smi::New(cid)));
return;
}
-
const Object& object = instr->object()->definition()->constant_value();
if (IsConstant(object)) {
- cid = object.GetClassId();
- if (CheckClassInstr::IsImmutableClassId(cid)) {
- SetValue(instr, Smi::ZoneHandle(Z, Smi::New(cid)));
- return;
- }
+ SetValue(instr, Smi::ZoneHandle(Z, Smi::New(object.GetClassId())));
+ return;
}
SetValue(instr, non_constant_);
}
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698