Skip to content

Commit 364c37c

Browse files
committed
WAT output: no longer emit 'pop' instructions
This instruction is not standard and the Binaryen parser no longer needs it.
1 parent 090b7b2 commit 364c37c

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

compiler/lib/wasm/wa_wat_output.ml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
open! Stdlib
2020
open Wa_ast
2121

22-
let target = `Binaryen (*`Reference*)
23-
2422
let assign_names ?(reversed = true) f names =
2523
let used = ref StringSet.empty in
2624
let counts = Hashtbl.create 101 in
@@ -394,10 +392,7 @@ let expression_or_instructions ctx st in_function =
394392
]
395393
| MemoryGrow (_, e) -> [ List (Atom "memory.grow" :: expression e) ]
396394
| Seq (l, e) -> instructions l @ expression e
397-
| Pop ty -> (
398-
match target with
399-
| `Binaryen -> [ List [ Atom "pop"; value_type st ty ] ]
400-
| `Reference -> [])
395+
| Pop _ -> []
401396
| RefFunc symb ->
402397
if in_function then reference_function ctx symb;
403398
[ List [ Atom "ref.func"; index st.func_names symb ] ]

0 commit comments

Comments
 (0)