| Index: runtime/vm/intrinsifier.cc
|
| diff --git a/runtime/vm/intrinsifier.cc b/runtime/vm/intrinsifier.cc
|
| index 9c6d9eef36ee37b4b50dd56d17d2dfc69e98fcc3..318642af0bfdf61234826a388b7d4f2ced16029b 100644
|
| --- a/runtime/vm/intrinsifier.cc
|
| +++ b/runtime/vm/intrinsifier.cc
|
| @@ -285,7 +285,14 @@ static intptr_t CidForRepresentation(Representation rep) {
|
| class BlockBuilder : public ValueObject {
|
| public:
|
| BlockBuilder(FlowGraph* flow_graph, TargetEntryInstr* entry)
|
| - : flow_graph_(flow_graph), entry_(entry), current_(entry) {}
|
| + : flow_graph_(flow_graph),
|
| + entry_(entry),
|
| + current_(entry),
|
| + fall_through_env_(new Environment(0,
|
| + 0,
|
| + Thread::kNoDeoptId,
|
| + flow_graph->parsed_function(),
|
| + NULL)) {}
|
|
|
| Definition* AddToInitialDefinitions(Definition* def) {
|
| def->set_ssa_temp_index(flow_graph_->alloc_ssa_temp_index());
|
| @@ -295,11 +302,17 @@ class BlockBuilder : public ValueObject {
|
|
|
| Definition* AddDefinition(Definition* def) {
|
| def->set_ssa_temp_index(flow_graph_->alloc_ssa_temp_index());
|
| - current_ = current_->AppendInstruction(def);
|
| + AddInstruction(def);
|
| return def;
|
| }
|
|
|
| Instruction* AddInstruction(Instruction* instr) {
|
| + if (instr->ComputeCanDeoptimize()) {
|
| + // Since we use the presence of an environment to determine if an
|
| + // instructions can deoptimize, we need an empty enviroment for
|
| + // instructions that "deoptimize" to the intrinsic fall-through code.
|
| + instr->SetEnvironment(fall_through_env_);
|
| + }
|
| current_ = current_->AppendInstruction(instr);
|
| return instr;
|
| }
|
| @@ -360,6 +373,7 @@ class BlockBuilder : public ValueObject {
|
| FlowGraph* flow_graph_;
|
| BlockEntryInstr* entry_;
|
| Instruction* current_;
|
| + Environment* fall_through_env_;
|
| };
|
|
|
|
|
|
|