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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 11028140: Inlining of calls with optional parameters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update Created 8 years, 2 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
« runtime/vm/flow_graph_inliner.cc ('K') | « runtime/vm/flow_graph_inliner.cc ('k') | 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 c2e4657ee54d11afc55faddf96c0ddddc77337cd..949e89107fa7a011f1747cb560cfdd3590f872ac 100644
--- a/runtime/vm/intermediate_language.cc
+++ b/runtime/vm/intermediate_language.cc
@@ -177,10 +177,13 @@ GraphEntryInstr::GraphEntryInstr(TargetEntryInstr* normal_entry)
ConstantInstr* GraphEntryInstr::constant_null() {
- ASSERT(initial_definitions_.length() > 0 &&
- initial_definitions_[0]->IsConstant() &&
- initial_definitions_[0]->AsConstant()->value().IsNull());
- return initial_definitions_[0]->AsConstant();
+ ASSERT(initial_definitions_.length() > 0);
+ for (intptr_t i = 0; i < initial_definitions_.length(); ++i) {
+ ConstantInstr* defn = initial_definitions_[i]->AsConstant();
+ if (defn != NULL && defn->value().IsNull()) return defn;
+ }
+ UNREACHABLE();
+ return NULL;
}
« runtime/vm/flow_graph_inliner.cc ('K') | « runtime/vm/flow_graph_inliner.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698