Skip to content

Instantly share code, notes, and snippets.

@lqd
Created July 5, 2016 13:00
Show Gist options
  • Save lqd/66ccd33cfd3013bdf0fd399e3109dc13 to your computer and use it in GitHub Desktop.
Save lqd/66ccd33cfd3013bdf0fd399e3109dc13 to your computer and use it in GitHub Desktop.
The previous "valid" wast file, when ran through the optimizer now doesn't pass validation
[wasm-validator error in function $impls::_impl_Ord_for_i32_::cmp] 2 != 1: store value type must match, on
(i32.store
(i32.const 0)
(set_local $0
(if
(i32.eq
(get_local $0)
(get_local $1)
)
(i64.const 0)
(select
(i64.const -1)
(i64.const 1)
(i32.lt_s
(get_local $0)
(get_local $1)
)
)
)
)
)
[wasm-validator error in function $impls::_impl_PartialOrd_for_()_::partial_cmp] 2 != 1: store value type must match, on
(i32.store offset=8
(i32.load
(i32.const 0)
)
(i64.const 0)
)
[wasm-validator error in function $impls::_impl_Ord_for_u8_::cmp] 2 != 1: store value type must match, on
(i32.store
(i32.const 0)
(set_local $0
(if
(i32.eq
(get_local $0)
(get_local $1)
)
(i64.const 0)
(select
(i64.const -1)
(i64.const 1)
(i32.lt_s
(get_local $0)
(get_local $1)
)
)
)
)
)
[wasm-validator error in function $impls::_impl_Ord_for_()_::cmp] 2 != 1: store value type must match, on
(i32.store
(i32.const 0)
(set_local $0
(i64.const 0)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment