Chromium Code Reviews| 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 0501f6a944faa1ea535e2d1ad5a2cee2c6c317cb..3adebcb4664d4f32c1b0e84edd57d26abc72c6c7 100644 |
| --- a/runtime/vm/flow_graph_type_propagator.cc |
| +++ b/runtime/vm/flow_graph_type_propagator.cc |
| @@ -7,6 +7,7 @@ |
| #include "vm/cha.h" |
| #include "vm/bit_vector.h" |
| #include "vm/il_printer.h" |
| +#include "vm/regexp_assembler.h" |
| namespace dart { |
| @@ -714,6 +715,19 @@ CompileType ParameterInstr::ComputeType() const { |
| } |
| const Function& function = graph_entry->parsed_function().function(); |
| + if (function.IsIrregexpFunction()) { |
| + // In irregexp functions, types of input parameters are known and immutable. |
| + switch (index()) { |
| + case RegExpMacroAssembler::kParamStringIndex: |
| + return CompileType::FromCid(function.regexp_specialization()); |
| + case RegExpMacroAssembler::kParamStartOffsetIndex: |
| + return CompileType::FromCid(kSmiCid); |
| + default: UNREACHABLE(); |
|
srdjan
2014/09/22 22:34:07
Indent case (see other switch examples).
jgruber1
2014/09/23 10:58:46
Done.
|
| + } |
| + UNREACHABLE(); |
| + return CompileType::Dynamic(); |
| + } |
| + |
| LocalScope* scope = graph_entry->parsed_function().node_sequence()->scope(); |
| const AbstractType& type = scope->VariableAt(index())->type(); |
| @@ -1288,6 +1302,11 @@ CompileType MathMinMaxInstr::ComputeType() const { |
| } |
| +CompileType CaseInsensitiveCompareUC16Instr::ComputeType() const { |
| + return CompileType::FromCid(kSmiCid); |
| +} |
| + |
| + |
| CompileType UnboxDoubleInstr::ComputeType() const { |
| return CompileType::FromCid(kDoubleCid); |
| } |