Skip to content

Commit

Permalink
Wasm: do not generate JavaScript strings for predefined exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
vouillon committed Sep 23, 2024
1 parent b283056 commit 4522e92
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion compiler/lib/parse_bytecode.ml
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,11 @@ let register_global ?(force = false) g i loc rem =
| None -> []
| Some name ->
Code.Var.name (access_global g i) name;
[ Pc (NativeString (Native_string.of_string name)) ]
[ Pc
(match Config.target () with
| `JavaScript -> NativeString (Native_string.of_string name)
| `Wasm -> String name)
]
in
( Let
( Var.fresh ()
Expand Down

0 comments on commit 4522e92

Please sign in to comment.