Cast to bool by comparing to zero (#343)

This commit is contained in:
Daniel Wirtz
2018-11-23 15:20:52 +01:00
committed by GitHub
parent b723ff3e88
commit c30c62e383
38 changed files with 1072 additions and 1023 deletions

View File

@ -358,8 +358,6 @@
call $~lib/internal/arraybuffer/allocateUnsafe
set_local $2
get_local $1
i32.const 1
i32.and
i32.eqz
if
get_local $2
@ -756,12 +754,11 @@
(local $1 i32)
call $~lib/set/Set<i8>#constructor
set_local $1
block $break|0
loop $repeat|0
get_local $0
i32.const 100
i32.ge_s
br_if $break|0
loop $repeat|0
get_local $0
i32.const 100
i32.lt_s
if
get_local $1
get_local $0
call $~lib/set/Set<i8>#has
@ -794,9 +791,7 @@
unreachable
end
unreachable
unreachable
end
unreachable
end
get_local $1
i32.load offset=20
@ -1295,12 +1290,11 @@
(local $1 i32)
call $~lib/set/Set<i8>#constructor
set_local $1
block $break|0
loop $repeat|0
get_local $0
i32.const 100
i32.ge_u
br_if $break|0
loop $repeat|0
get_local $0
i32.const 100
i32.lt_u
if
get_local $1
get_local $0
call $~lib/set/Set<u8>#has
@ -1333,9 +1327,7 @@
unreachable
end
unreachable
unreachable
end
unreachable
end
get_local $1
i32.load offset=20
@ -1922,12 +1914,11 @@
(local $1 i32)
call $~lib/set/Set<i8>#constructor
set_local $1
block $break|0
loop $repeat|0
get_local $0
i32.const 100
i32.ge_s
br_if $break|0
loop $repeat|0
get_local $0
i32.const 100
i32.lt_s
if
get_local $1
get_local $0
call $~lib/set/Set<i16>#has
@ -1960,9 +1951,7 @@
unreachable
end
unreachable
unreachable
end
unreachable
end
get_local $1
i32.load offset=20
@ -2498,12 +2487,11 @@
(local $1 i32)
call $~lib/set/Set<i8>#constructor
set_local $1
block $break|0
loop $repeat|0
get_local $0
i32.const 100
i32.ge_u
br_if $break|0
loop $repeat|0
get_local $0
i32.const 100
i32.lt_u
if
get_local $1
get_local $0
call $~lib/set/Set<u16>#has
@ -2536,9 +2524,7 @@
unreachable
end
unreachable
unreachable
end
unreachable
end
get_local $1
i32.load offset=20
@ -3093,12 +3079,11 @@
(local $1 i32)
call $~lib/set/Set<i8>#constructor
set_local $1
block $break|0
loop $repeat|0
get_local $0
i32.const 100
i32.ge_s
br_if $break|0
loop $repeat|0
get_local $0
i32.const 100
i32.lt_s
if
get_local $1
get_local $0
call $~lib/set/Set<i32>#has
@ -3131,9 +3116,7 @@
unreachable
end
unreachable
unreachable
end
unreachable
end
get_local $1
i32.load offset=20
@ -3352,12 +3335,11 @@
(local $1 i32)
call $~lib/set/Set<i8>#constructor
set_local $1
block $break|0
loop $repeat|0
get_local $0
i32.const 100
i32.ge_u
br_if $break|0
loop $repeat|0
get_local $0
i32.const 100
i32.lt_u
if
get_local $1
get_local $0
call $~lib/set/Set<i32>#has
@ -3390,9 +3372,7 @@
unreachable
end
unreachable
unreachable
end
unreachable
end
get_local $1
i32.load offset=20
@ -4033,12 +4013,11 @@
(local $1 i32)
call $~lib/set/Set<i64>#constructor
set_local $1
block $break|0
loop $repeat|0
get_local $0
i64.const 100
i64.ge_s
br_if $break|0
loop $repeat|0
get_local $0
i64.const 100
i64.lt_s
if
get_local $1
get_local $0
call $~lib/set/Set<i64>#has
@ -4071,9 +4050,7 @@
unreachable
end
unreachable
unreachable
end
unreachable
end
get_local $1
i32.load offset=20
@ -4292,12 +4269,11 @@
(local $1 i32)
call $~lib/set/Set<i64>#constructor
set_local $1
block $break|0
loop $repeat|0
get_local $0
i64.const 100
i64.ge_u
br_if $break|0
loop $repeat|0
get_local $0
i64.const 100
i64.lt_u
if
get_local $1
get_local $0
call $~lib/set/Set<i64>#has
@ -4330,9 +4306,7 @@
unreachable
end
unreachable
unreachable
end
unreachable
end
get_local $1
i32.load offset=20
@ -4862,13 +4836,11 @@
(local $1 i32)
call $~lib/set/Set<i8>#constructor
set_local $1
block $break|0
loop $repeat|0
get_local $0
f32.const 100
f32.lt
i32.eqz
br_if $break|0
loop $repeat|0
get_local $0
f32.const 100
f32.lt
if
get_local $1
get_local $0
call $~lib/set/Set<f32>#has
@ -4901,9 +4873,7 @@
unreachable
end
unreachable
unreachable
end
unreachable
end
get_local $1
i32.load offset=20
@ -5436,13 +5406,11 @@
(local $1 i32)
call $~lib/set/Set<i64>#constructor
set_local $1
block $break|0
loop $repeat|0
get_local $0
f64.const 100
f64.lt
i32.eqz
br_if $break|0
loop $repeat|0
get_local $0
f64.const 100
f64.lt
if
get_local $1
get_local $0
call $~lib/set/Set<f64>#has
@ -5475,9 +5443,7 @@
unreachable
end
unreachable
unreachable
end
unreachable
end
get_local $1
i32.load offset=20