mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-25 12:41:50 +00:00
Shortcut f32/f64/i64 conversions to bool
This commit is contained in:
@ -31,9 +31,8 @@
|
||||
unreachable
|
||||
end
|
||||
get_global $bool/I
|
||||
i32.wrap/i64
|
||||
i32.const 0
|
||||
i32.ne
|
||||
i64.const 0
|
||||
i64.ne
|
||||
i32.const 1
|
||||
i32.ne
|
||||
if
|
||||
@ -58,9 +57,8 @@
|
||||
unreachable
|
||||
end
|
||||
get_global $bool/U
|
||||
i32.wrap/i64
|
||||
i32.const 0
|
||||
i32.ne
|
||||
i64.const 0
|
||||
i64.ne
|
||||
i32.const 1
|
||||
i32.ne
|
||||
if
|
||||
@ -72,9 +70,8 @@
|
||||
unreachable
|
||||
end
|
||||
get_global $bool/f
|
||||
i32.trunc_u/f32
|
||||
i32.const 0
|
||||
i32.ne
|
||||
f32.const 0
|
||||
f32.ne
|
||||
i32.const 1
|
||||
i32.ne
|
||||
if
|
||||
@ -86,9 +83,8 @@
|
||||
unreachable
|
||||
end
|
||||
get_global $bool/F
|
||||
i32.trunc_u/f64
|
||||
i32.const 0
|
||||
i32.ne
|
||||
f64.const 0
|
||||
f64.ne
|
||||
i32.const 1
|
||||
i32.ne
|
||||
if
|
||||
|
Reference in New Issue
Block a user