Skip to content

Commit 99870c8

Browse files
authored
flambda-backend: Fix Translobj assertions for Flambda 2 (#112)
1 parent 5106317 commit 99870c8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lambda/translobj.ml

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ let transl_label_init_general f =
104104
expr, size
105105

106106
let transl_label_init_flambda f =
107-
assert(Config.flambda);
107+
assert(Config.flambda || Config.flambda2);
108108
let method_cache_id = Ident.create_local "method_cache" in
109109
method_cache := Lvar method_cache_id;
110110
(* Calling f (usually Translmod.transl_struct) requires the
@@ -123,7 +123,7 @@ let transl_label_init_flambda f =
123123
transl_label_init_general (fun () -> expr, size)
124124

125125
let transl_store_label_init glob size f arg =
126-
assert(not Config.flambda);
126+
assert(not (Config.flambda || Config.flambda2));
127127
assert(!Clflags.native_code);
128128
method_cache := Lprim(mod_field ~read_semantics:Reads_vary size,
129129
[Lprim(Pgetglobal glob, [], Loc_unknown)],

0 commit comments

Comments
 (0)