Skip to content

Commit

Permalink
Restore naming of flambda2 let bindings after primitives (#1500)
Browse files Browse the repository at this point in the history
This undoes an inadvertent change in PR #1465 that caused most variables
introduced during translation to flambda2 to be called `prim`.
  • Loading branch information
lukemaurer committed Jun 15, 2023
1 parent 99108e3 commit 3559b1e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion middle_end/flambda2/from_lambda/lambda_to_flambda.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1193,7 +1193,8 @@ let rec cps acc env ccenv (lam : L.lambda) (k : cps_continuation)
Misc.fatal_errorf "Wrong number of arguments for Lraise: %a"
Printlambda.primitive prim)
| _ ->
let id = Ident.create_local "prim" in
let name = Printlambda.name_of_primitive prim in
let id = Ident.create_local name in
let result_layout = L.primitive_result_layout prim in
(match result_layout with
| Pvalue _ | Punboxed_float | Punboxed_int _ -> ()
Expand Down

0 comments on commit 3559b1e

Please sign in to comment.