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

Unified Diff: runtime/vm/flow_graph_builder.cc

Issue 10446019: - Port AssertBool and AssertAssigneable to new location template. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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/flow_graph_builder.h ('k') | runtime/vm/flow_graph_compiler_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_builder.cc
===================================================================
--- runtime/vm/flow_graph_builder.cc (revision 7960)
+++ runtime/vm/flow_graph_builder.cc (working copy)
@@ -594,6 +594,7 @@
instantiator = BuildInstantiator();
if (instantiator == NULL) {
// No instantiator when inside factory.
+ instantiator = BuildNullValue();
instantiator_type_arguments =
BuildInstantiatorTypeArguments(token_index, NULL);
} else {
@@ -614,6 +615,13 @@
}
+Value* EffectGraphVisitor::BuildNullValue() {
+ BindInstr* instr = new BindInstr(new ConstantVal(Object::ZoneHandle()));
+ AddInstruction(instr);
+ return new UseVal(instr);
+}
+
+
// Used for testing incoming arguments.
AssertAssignableComp* EffectGraphVisitor::BuildAssertAssignable(
intptr_t token_index,
@@ -623,7 +631,10 @@
// Build the type check computation.
Value* instantiator = NULL;
Value* instantiator_type_arguments = NULL;
- if (!dst_type.IsInstantiated()) {
+ if (dst_type.IsInstantiated()) {
+ instantiator = BuildNullValue();
+ instantiator_type_arguments = BuildNullValue();
+ } else {
BuildTypecheckArguments(token_index,
&instantiator,
&instantiator_type_arguments);
« no previous file with comments | « runtime/vm/flow_graph_builder.h ('k') | runtime/vm/flow_graph_compiler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698