Chromium Code Reviews| Index: runtime/vm/flow_graph_builder.cc |
| =================================================================== |
| --- runtime/vm/flow_graph_builder.cc (revision 7952) |
| +++ runtime/vm/flow_graph_builder.cc (working copy) |
| @@ -581,6 +581,7 @@ |
| } |
| +// instantiator_type_arguments are on TOS, instantiator is at TOS + 1. |
|
regis
2012/05/24 19:56:18
extra space
srdjan
2012/05/24 20:24:44
That comment has been removed, forgot to upload. :
|
| void EffectGraphVisitor::BuildTypecheckArguments( |
| intptr_t token_index, |
| Value** instantiator_result, |
| @@ -594,6 +595,7 @@ |
| instantiator = BuildInstantiator(); |
| if (instantiator == NULL) { |
| // No instantiator when inside factory. |
| + instantiator = BuildNullValue(); |
| instantiator_type_arguments = |
| BuildInstantiatorTypeArguments(token_index, NULL); |
| } else { |
| @@ -614,6 +616,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 +632,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); |