chore: invoke inferCtorSummaries from IR compiler

This commit is contained in:
Leonardo de Moura 2019-10-07 13:10:54 -07:00
parent 3f62957c8f
commit f8bf68a9af
2 changed files with 4 additions and 1 deletions

View file

@ -18,6 +18,7 @@ import Init.Lean.Compiler.IR.Boxing
import Init.Lean.Compiler.IR.RC
import Init.Lean.Compiler.IR.ExpandResetReuse
import Init.Lean.Compiler.IR.UnboxResult
import Init.Lean.Compiler.IR.UnreachBranches
import Init.Lean.Compiler.IR.EmitC
namespace Lean
@ -27,6 +28,7 @@ private def compileAux (decls : Array Decl) : CompilerM Unit :=
do
logDecls `init decls;
checkDecls decls;
inferCtorSummaries decls;
let decls := decls.map Decl.pushProj;
logDecls `push_proj decls;
let decls := decls.map Decl.insertResetReuse;

View file

@ -222,8 +222,9 @@ def inferStep : M Bool :=
do ctx ← read;
ctx.decls.size.mfold (fun idx modified => do
match ctx.decls.get! idx with
| Decl.fdecl _ ys _ b => do
| Decl.fdecl fid ys _ b => do
s ← get;
-- dbgTrace (">> " ++ toString fid) $ fun _ =>
let currVals := s.funVals.get! idx;
adaptReader (fun (ctx : InterpContext) => { currFnIdx := idx, .. ctx }) $ do
ys.mfor $ fun y => updateVarAssignment y.x top;