Skip to content

Commit b9416af

Browse files
committed
WIP
1 parent 0456359 commit b9416af

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

compiler/lib-wasm/gc_target.ml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,13 +1045,15 @@ module Constant = struct
10451045
if b then return c else store_in_global c
10461046
| Const_named name -> store_in_global ~name c
10471047
| Mutated ->
1048+
let* typ = Type.string_type in
10481049
let name = Code.Var.fresh_n "const" in
1050+
let* placeholder = array_placeholder typ in
10491051
let* () =
10501052
register_global
10511053
~constant:true
10521054
name
1053-
{ mut = true; typ = Type.value }
1054-
(W.RefI31 (Const (I32 0l)))
1055+
{ mut = true; typ = Ref { nullable = false; typ = Type typ } }
1056+
placeholder
10551057
in
10561058
let* () = register_init_code (instr (W.GlobalSet (name, c))) in
10571059
return (W.GlobalGet name)
@@ -1111,6 +1113,7 @@ module Closure = struct
11111113
id
11121114
in
11131115
info.id <- Some env_type_id;
1116+
(*
11141117
Format.eprintf
11151118
"%a@."
11161119
(Format.pp_print_list
@@ -1132,6 +1135,7 @@ module Closure = struct
11321135
"%s"
11331136
(Option.value ~default:"???" (Code.Var.get_name v))))))
11341137
env_type;
1138+
*)
11351139
match info.Closure_conversion.functions with
11361140
| [] -> assert false
11371141
| [ _ ] ->

0 commit comments

Comments
 (0)