@@ -1895,6 +1895,7 @@ TargetEntryInstr* PolymorphicInliner::BuildDecisionGraph() {
18951895 // Unshared. Graft the normal entry on after the check class
18961896 // instruction.
18971897 auto target = callee_entry->AsGraphEntry ()->normal_entry ();
1898+ ASSERT (cursor != nullptr );
18981899 cursor->LinkTo (target->next ());
18991900 target->ReplaceAsPredecessorWith (current_block);
19001901 // Unuse all inputs of the graph entry and the normal entry. They are
@@ -1955,6 +1956,7 @@ TargetEntryInstr* PolymorphicInliner::BuildDecisionGraph() {
19551956 new TargetEntryInstr (AllocateBlockId (), try_idx, DeoptId::kNone );
19561957 below_target->InheritDeoptTarget (zone (), call_);
19571958 current_block->AddDominatedBlock (below_target);
1959+ ASSERT (cursor != nullptr ); // read before overwrite
19581960 cursor = current_block = below_target;
19591961 *branch_top->true_successor_address () = below_target;
19601962
@@ -1972,9 +1974,9 @@ TargetEntryInstr* PolymorphicInliner::BuildDecisionGraph() {
19721974 }
19731975
19741976 branch->InheritDeoptTarget (zone (), call_);
1975- cursor = AppendInstruction (cursor, branch);
1977+ AppendInstruction (cursor, branch);
1978+ cursor = nullptr ;
19761979 current_block->set_last_instruction (branch);
1977- cursor = NULL ;
19781980
19791981 // 2. Handle a match by linking to the inlined body. There are three
19801982 // cases (unshared, shared first predecessor, and shared subsequent
@@ -3369,7 +3371,7 @@ bool FlowGraphInliner::TryReplaceInstanceCallWithInline(
33693371 }
33703372 // Replace all uses of this definition with the result.
33713373 if (call->HasUses ()) {
3372- ASSERT (result->HasSSATemp ());
3374+ ASSERT (result != nullptr && result ->HasSSATemp ());
33733375 call->ReplaceUsesWith (result);
33743376 }
33753377 // Finally insert the sequence other definition in place of this one in the
0 commit comments