feat: remove unnecessary normalizeIds steps
This commit is contained in:
parent
feb9b66a30
commit
dd69b3b46e
3 changed files with 1 additions and 3 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue