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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 24094004: Do not eliminate GuardFieldInstr when guarding list length. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.cc
diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
index 43dc0943c4faba4f2909f9ff7789f30af82d5458..355949f992e3a698b150147940a5154e3f13c51f 100644
--- a/runtime/vm/intermediate_language.cc
+++ b/runtime/vm/intermediate_language.cc
@@ -1579,6 +1579,11 @@ Instruction* GuardFieldInstr::Canonicalize(FlowGraph* flow_graph) {
return NULL; // Nothing to guard.
}
+ if (field().guarded_list_length() != Field::kNoFixedLength) {
+ // We are still guarding the list length.
+ return this;
+ }
+
if (field().is_nullable() && value()->Type()->IsNull()) {
return NULL;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698