Skip to content

Commit cb62933

Browse files
committed
Improve
1 parent 1b22f20 commit cb62933

File tree

4 files changed

+4416
-5157
lines changed

4 files changed

+4416
-5157
lines changed

compiler/lib/generate.ml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,11 +1233,13 @@ let rec translate_expr ctx queue loc x e level : _ * J.statement_list =
12331233
let clo = compile_closure ctx cont in
12341234
let clo =
12351235
match clo with
1236-
| (st, J.N) :: rem ->
1236+
| (st, x) :: rem ->
12371237
let loc =
1238-
match source_location ctx (Before pc) with
1239-
| J.N -> J.U
1240-
| x -> x
1238+
match x, source_location ctx (Before pc) with
1239+
| (J.U | J.N), (J.U | J.N) -> J.U
1240+
| x, (J.U | J.N) -> x
1241+
| (J.U | J.N), x -> x
1242+
| _, x -> x
12411243
in
12421244
(st, loc) :: rem
12431245
| _ -> clo

0 commit comments

Comments
 (0)