File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -574,8 +574,8 @@ def inferStep : InterpM Bool := do
574574 let ctx ← read
575575 for h : idx in *...ctx.decls.size do
576576 let decl := ctx.decls[idx]
577- -- if !decl.safe then
578- -- continue
577+ if !decl.safe then
578+ continue
579579
580580 let currentVal ← getFunVal idx
581581 withReader (fun ctx => { ctx with currFnIdx := idx }) do
@@ -663,8 +663,7 @@ def Decl.elimDeadBranches (decls : Array Decl) : CompilerM (Array Decl) := do
663663 the constructor that we inferred for them. For more information
664664 refer to the docstring of `Decl.safe`.
665665 -/
666- .bot
667- --if decls[ i ] !.safe then .bot else .top
666+ if decls[i]!.safe then .bot else .top
668667 let mut funVals := decls.size.fold (init := .empty) fun i _ p => p.push (initialVal i)
669668 let ctx := { decls }
670669 let mut state := { assignments, funVals }
@@ -677,8 +676,7 @@ def Decl.elimDeadBranches (decls : Array Decl) : CompilerM (Array Decl) := do
677676 decls.size.fold (init := e) fun i _ env =>
678677 addFunctionSummary env decls[i].name funVals[i]!
679678
680- --decls.mapIdxM fun i decl => if decl.safe then elimDead assignments[ i ] ! decl else return decl
681- decls.mapIdxM fun i decl => elimDead assignments[i]! decl
679+ decls.mapIdxM fun i decl => if decl.safe then elimDead assignments[i]! decl else return decl
682680
683681def elimDeadBranches : Pass :=
684682 { name := `elimDeadBranches, run := Decl.elimDeadBranches, phase := .mono }
You can’t perform that action at this time.
0 commit comments