anchor.diff:          let cuspec = GenUnionSpec cenv.amap m eenv.tyenv c.TyconRef tyargs
           let idx = c.Index
           let avoidHelpers = entityRefInThisAssembly g.compilingFslib c.TyconRef
  -        GenDecisionTreeTest cenv eenv.cloc cgbuf e (Some (pop 1, Push [g.ilg.typ_Bool], Choice1Of2 (avoidHelpers, cuspec, idx))) eenv successTree failureTree targets sequel
  +        GenDecisionTreeTest cenv eenv.cloc cgbuf stackAtTargets e (Some (pop 1, Push [g.ilg.typ_Bool], Choice1Of2 (avoidHelpers, cuspec, idx))) eenv successTree failureTree targets repeatSP targetInfos sequel contf
   
         | _ ->
           let caseLabels = List.map (fun _ -> CG.GenerateDelayMark cgbuf "switch_case") cases
  
positive.code:                     CG.EmitInstr cgbuf (pop 1) Push0 (I_switch destinationLabels)
                  else
                    error(InternalError("non-dense integer matches not implemented in codegen - these should have been removed by the pattern match compiler", switchm))
                  GenDecisionTreeCases cgbuf stackAtTargets eenv defaultTargetOpt caseLabels cases
              | _ -> error(InternalError("these matches should never be needed", switchm))
  
  and GenDecisionTreeCases cgbuf stackAtTargets eenv defaultTargetOpt caseLabels cases =
      assert(cgbuf.GetCurrentStack() = stackAtTargets) // cgbuf stack should be unchanged over tests. [bug://1750].
  
      let defaultDecisions =
          match defaultTargetOpt with
          | Some defaultTarget -> [(None, eenv, defaultTarget)]
          | None -> []
  
      (caseLabels, cases)
      ||> List.map2 (fun caseLabel (TCase(_, caseTree)) -> (Some caseLabel, eenv, caseTree))
      |> List.append defaultDecisions
  
  // Used for the peephole optimization below
  and (|BoolExpr|_|) = function Expr.Const (Const.Bool b1, _, _) -> Some b1 | _ -> None
  
  and GenDecisionTreeTest cenv cloc cgbuf e tester eenv successTree failureTree targets sequel =
      let g = cenv.g
      match successTree, failureTree with
  
  
negative.code:        // we effectively lose an EndLocalScope for all dtrees that go to the same target
         // So we just pretend that the variable goes out of scope here.
         CG.SetMarkToHere cgbuf endScope
         GenDecisionTreeAndTargetsInner cenv cgbuf None stackAtTargets eenv rest targets repeatSP targetInfos sequel contf
  
      | TDSuccess(es, targetIdx) ->
          let targetInfos, genTargetInfoOpt = GenDecisionTreeSuccess cenv cgbuf inplabOpt stackAtTargets eenv es targetIdx targets repeatSP targetInfos sequel
          match genTargetInfoOpt with
          | Some (eenvAtTarget, spExprAtTarget, exprAtTarget, sequelAtTarget) ->
              GenLinearExpr cenv cgbuf eenvAtTarget spExprAtTarget exprAtTarget sequelAtTarget true (fun Fake -> contf targetInfos)
          | _ ->
              contf targetInfos
  
      | TDSwitch(e, cases, dflt, m) ->
         GenDecisionTreeSwitch cenv cgbuf inplabOpt stackAtTargets eenv e cases dflt m targets repeatSP targetInfos sequel contf
  
  and GetTarget (targets:_[]) n =
      if n >= targets.Length then failwith "GetTarget: target not found in decision tree"
  