Skip to content

Commit 106ba77

Browse files
committed
Restore naming of flambda2 let bindings after primitives
This undoes an inadvertent change in PR ocaml-flambda#1465 that caused most variables introduced during translation to flambda2 to be called `prim`.
1 parent dc604da commit 106ba77

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

middle_end/flambda2/from_lambda/lambda_to_flambda.ml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1193,7 +1193,8 @@ let rec cps acc env ccenv (lam : L.lambda) (k : cps_continuation)
11931193
Misc.fatal_errorf "Wrong number of arguments for Lraise: %a"
11941194
Printlambda.primitive prim)
11951195
| _ ->
1196-
let id = Ident.create_local "prim" in
1196+
let name = Printlambda.name_of_primitive prim in
1197+
let id = Ident.create_local name in
11971198
let result_layout = L.primitive_result_layout prim in
11981199
(match result_layout with
11991200
| Pvalue _ | Punboxed_float | Punboxed_int _ -> ()

0 commit comments

Comments
 (0)