Skip to content

Commit da3a0b2

Browse files
committed
Revert "Hack to make binaryen eliminate redundant casts"
This reverts commit 25315fb4d3231ecd0fdc07c57adec59f3e697dc3. No longer useful with WebAssembly/binaryen#6507
1 parent 074be74 commit da3a0b2

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

compiler/lib/wasm/wa_gc_target.ml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -616,13 +616,7 @@ end
616616
module Memory = struct
617617
let wasm_cast ty e =
618618
let* e = e in
619-
match e with
620-
| W.LocalGet x ->
621-
return
622-
(W.RefCast
623-
( { nullable = false; typ = Type ty }
624-
, W.LocalTee (x, W.RefCast ({ nullable = false; typ = Type ty }, e)) ))
625-
| _ -> return (W.RefCast ({ nullable = false; typ = Type ty }, e))
619+
return (W.RefCast ({ nullable = false; typ = Type ty }, e))
626620

627621
let wasm_struct_get ty e i =
628622
let* e = e in

0 commit comments

Comments
 (0)