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

Unified Diff: runtime/vm/flow_graph_type_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 | « runtime/vm/flow_graph_type_propagator.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_type_propagator.cc
diff --git a/runtime/vm/flow_graph_type_propagator.cc b/runtime/vm/flow_graph_type_propagator.cc
index 0d646b873fe13ff5d5894b33226e08d522901908..2b7001f656104549b25930aefbf2c9124cc4f30f 100644
--- a/runtime/vm/flow_graph_type_propagator.cc
+++ b/runtime/vm/flow_graph_type_propagator.cc
@@ -149,7 +149,7 @@ void FlowGraphTypePropagator::PropagateRecursive(BlockEntryInstr* block) {
}
}
- HandleBranchOnStrictCompare(block);
+ HandleBranchOnNull(block);
for (intptr_t i = 0; i < block->dominated_blocks().length(); ++i) {
PropagateRecursive(block->dominated_blocks()[i]);
@@ -159,8 +159,7 @@ void FlowGraphTypePropagator::PropagateRecursive(BlockEntryInstr* block) {
}
-void FlowGraphTypePropagator::HandleBranchOnStrictCompare(
- BlockEntryInstr* block) {
+void FlowGraphTypePropagator::HandleBranchOnNull(BlockEntryInstr* block) {
BranchInstr* branch = block->last_instruction()->AsBranch();
if (branch == NULL) {
return;
@@ -319,9 +318,7 @@ void FlowGraphTypePropagator::VisitCheckClassId(CheckClassIdInstr* check) {
void FlowGraphTypePropagator::VisitGuardFieldClass(
GuardFieldClassInstr* guard) {
const intptr_t cid = guard->field().guarded_cid();
- if ((cid == kIllegalCid) ||
- (cid == kDynamicCid) ||
- !CheckClassInstr::IsImmutableClassId(cid)) {
+ if ((cid == kIllegalCid) || (cid == kDynamicCid)) {
return;
}
@@ -797,17 +794,13 @@ CompileType ConstantInstr::ComputeType() const {
return CompileType::Null();
}
- intptr_t cid = value().GetClassId();
- if (!CheckClassInstr::IsImmutableClassId(cid)) {
- cid = kDynamicCid;
- }
-
if (value().IsInstance()) {
- return CompileType::Create(cid,
+ return CompileType::Create(
+ value().GetClassId(),
AbstractType::ZoneHandle(Instance::Cast(value()).GetType()));
} else {
// Type info for non-instance objects.
- return CompileType::FromCid(cid);
+ return CompileType::FromCid(value().GetClassId());
}
}
@@ -981,9 +974,6 @@ CompileType LoadStaticFieldInstr::ComputeType() const {
cid = obj.GetClassId();
}
}
- if (!CheckClassInstr::IsImmutableClassId(cid)) {
- cid = kDynamicCid;
- }
return CompileType(is_nullable, cid, abstract_type);
}
« no previous file with comments | « runtime/vm/flow_graph_type_propagator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698