feat: remove unnecessary normalizeIds steps

This commit is contained in:
Leonardo de Moura 2019-10-09 15:24:07 -07:00
parent feb9b66a30
commit dd69b3b46e
3 changed files with 1 additions and 3 deletions

View file

@ -308,7 +308,6 @@ end Borrow
def inferBorrow (decls : Array Decl) : CompilerM (Array Decl) :=
do env ← getEnv;
let decls := decls.map Decl.normalizeIds;
let paramMap := Borrow.infer env decls;
pure (Borrow.applyParamMap decls paramMap)

View file

@ -624,7 +624,7 @@ do env ← getEnv;
| _ => pure ()
def emitDecl (d : Decl) : M Unit :=
let d := d.normalizeIds;
let d := d.normalizeIds; -- ensure we don't have gaps in the variable indices
catch
(emitDeclAux d)
(fun err => throw (err ++ "\ncompiling:\n" ++ toString d))

View file

@ -275,7 +275,6 @@ partial def searchAndExpand : FnBody → Array FnBody → M FnBody
else searchAndExpand b.body (push bs b)
def main (d : Decl) : Decl :=
let d := d.normalizeIds;
match d with
| (Decl.fdecl f xs t b) =>
let m := mkProjMap d;