Skip to content

Commit a661ff7

Browse files
committed
Update Binaryen to latest
1 parent 9744c31 commit a661ff7

35 files changed

+5059
-5424
lines changed

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
},
1313
"dependencies": {
1414
"@protobufjs/utf8": "^1.1.0",
15-
"binaryen": "55.0.0-nightly.20181122",
15+
"binaryen": "55.0.0-nightly.20181130",
1616
"glob": "^7.1.3",
1717
"long": "^4.0.0"
1818
},

tests/compiler/binary.optimized.wat

Lines changed: 70 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -74,35 +74,35 @@
7474
(local $2 i32)
7575
(local $3 i32)
7676
(local $4 i32)
77-
block $folding-inner0
77+
get_local $0
78+
i32.reinterpret/f32
79+
tee_local $1
80+
i32.const 23
81+
i32.shr_u
82+
i32.const 255
83+
i32.and
84+
set_local $2
85+
get_local $1
86+
i32.const -2147483648
87+
i32.and
88+
set_local $4
89+
get_local $2
90+
i32.const 255
91+
i32.eq
92+
tee_local $3
93+
i32.eqz
94+
if
95+
i32.const 0
96+
set_local $3
97+
end
98+
get_local $3
99+
if
78100
get_local $0
79-
i32.reinterpret/f32
80-
tee_local $1
81-
i32.const 23
82-
i32.shr_u
83-
i32.const 255
84-
i32.and
85-
set_local $2
86-
get_local $1
87-
i32.const -2147483648
88-
i32.and
89-
set_local $4
90-
get_local $2
91-
i32.const 255
92-
i32.eq
93-
tee_local $3
94-
i32.eqz
95-
if
96-
i32.const 0
97-
set_local $3
98-
end
99-
get_local $3
100-
if
101-
get_local $0
102-
get_local $0
103-
f32.div
104-
return
105-
end
101+
get_local $0
102+
f32.div
103+
return
104+
end
105+
block $folding-inner0
106106
get_local $1
107107
i32.const 1
108108
i32.shl
@@ -188,6 +188,7 @@
188188
tee_local $3
189189
i32.shl
190190
set_local $1
191+
get_local $4
191192
get_local $2
192193
get_local $3
193194
i32.sub
@@ -210,7 +211,6 @@
210211
i32.shr_u
211212
end
212213
tee_local $1
213-
get_local $4
214214
i32.or
215215
f32.reinterpret/i32
216216
return
@@ -225,35 +225,35 @@
225225
(local $3 i64)
226226
(local $4 i32)
227227
(local $5 i64)
228-
block $folding-inner0
228+
get_local $0
229+
i64.reinterpret/f64
230+
tee_local $1
231+
i64.const 52
232+
i64.shr_u
233+
i64.const 2047
234+
i64.and
235+
set_local $2
236+
get_local $1
237+
i64.const 63
238+
i64.shr_u
239+
set_local $5
240+
get_local $2
241+
i64.const 2047
242+
i64.eq
243+
tee_local $4
244+
i32.eqz
245+
if
246+
i32.const 0
247+
set_local $4
248+
end
249+
get_local $4
250+
if
229251
get_local $0
230-
i64.reinterpret/f64
231-
tee_local $1
232-
i64.const 52
233-
i64.shr_u
234-
i64.const 2047
235-
i64.and
236-
set_local $2
237-
get_local $1
238-
i64.const 63
239-
i64.shr_u
240-
set_local $5
241-
get_local $2
242-
i64.const 2047
243-
i64.eq
244-
tee_local $4
245-
i32.eqz
246-
if
247-
i32.const 0
248-
set_local $4
249-
end
250-
get_local $4
251-
if
252-
get_local $0
253-
get_local $0
254-
f64.div
255-
return
256-
end
252+
get_local $0
253+
f64.div
254+
return
255+
end
256+
block $folding-inner0
257257
get_local $1
258258
i64.const 1
259259
i64.shl
@@ -601,20 +601,20 @@
601601
get_global $binary/f
602602
call $~lib/math/NativeMathf.mod
603603
drop
604+
get_global $binary/f
605+
tee_local $0
606+
i32.reinterpret/f32
607+
i32.const 2147483647
608+
i32.and
609+
i32.const 2139095040
610+
i32.gt_s
611+
tee_local $1
612+
i32.eqz
613+
if
614+
i32.const 0
615+
set_local $1
616+
end
604617
block $__inlined_func$~lib/math/NativeMathf.pow
605-
get_global $binary/f
606-
tee_local $0
607-
i32.reinterpret/f32
608-
i32.const 2147483647
609-
i32.and
610-
i32.const 2139095040
611-
i32.gt_s
612-
tee_local $1
613-
i32.eqz
614-
if
615-
i32.const 0
616-
set_local $1
617-
end
618618
get_local $1
619619
br_if $__inlined_func$~lib/math/NativeMathf.pow
620620
end

tests/compiler/comma.optimized.wat

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,10 @@
130130
call $~lib/env/abort
131131
unreachable
132132
end
133-
block $break|0
134-
i32.const 0
135-
set_local $0
136-
loop $repeat|0
133+
i32.const 0
134+
set_local $0
135+
loop $repeat|0
136+
block $break|0
137137
get_local $0
138138
get_global $comma/a
139139
i32.ge_s
@@ -147,9 +147,7 @@
147147
i32.add
148148
set_local $0
149149
br $repeat|0
150-
unreachable
151150
end
152-
unreachable
153151
end
154152
get_local $0
155153
i32.const 1

tests/compiler/for.optimized.wat

Lines changed: 22 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
(func $start (; 1 ;) (type $v)
1414
(local $0 i32)
1515
(local $1 i32)
16-
block $break|0
17-
i32.const 0
18-
set_global $for/i
19-
loop $repeat|0
16+
i32.const 0
17+
set_global $for/i
18+
loop $repeat|0
19+
block $break|0
2020
get_global $for/i
2121
i32.const 10
2222
i32.ge_s
@@ -26,9 +26,7 @@
2626
i32.add
2727
set_global $for/i
2828
br $repeat|0
29-
unreachable
3029
end
31-
unreachable
3230
end
3331
get_global $for/i
3432
i32.const 10
@@ -41,8 +39,8 @@
4139
call $~lib/env/abort
4240
unreachable
4341
end
44-
block $break|1
45-
loop $repeat|1
42+
loop $repeat|1
43+
block $break|1
4644
get_local $0
4745
i32.const 10
4846
i32.ge_s
@@ -52,9 +50,7 @@
5250
i32.add
5351
set_local $0
5452
br $repeat|1
55-
unreachable
5653
end
57-
unreachable
5854
end
5955
loop $repeat|2
6056
get_global $for/i
@@ -99,10 +95,10 @@
9995
get_global $for/i
10096
br_if $repeat|4
10197
end
102-
block $break|5
103-
i32.const 0
104-
set_local $0
105-
loop $repeat|5
98+
i32.const 0
99+
set_local $0
100+
loop $repeat|5
101+
block $break|5
106102
get_local $0
107103
i32.const 10
108104
i32.ge_s
@@ -112,9 +108,7 @@
112108
i32.add
113109
set_local $0
114110
br $repeat|5
115-
unreachable
116111
end
117-
unreachable
118112
end
119113
get_local $0
120114
i32.const 10
@@ -127,23 +121,23 @@
127121
call $~lib/env/abort
128122
unreachable
129123
end
130-
block $break|6
131-
i32.const 0
132-
set_local $0
133-
loop $repeat|6
124+
i32.const 0
125+
set_local $0
126+
loop $repeat|6
127+
block $break|6
134128
get_local $0
135129
i32.const 10
136130
i32.ge_s
137131
br_if $break|6
138-
block $break|7
139-
i32.const 0
140-
set_local $1
141-
loop $repeat|7
132+
i32.const 0
133+
set_local $1
134+
loop $repeat|7
135+
block $break|7
136+
get_local $1
137+
i32.const 10
138+
i32.ge_s
139+
br_if $break|7
142140
block $continue|7
143-
get_local $1
144-
i32.const 10
145-
i32.ge_s
146-
br_if $break|7
147141
get_local $0
148142
get_local $1
149143
i32.eq
@@ -154,18 +148,14 @@
154148
i32.add
155149
set_local $1
156150
br $repeat|7
157-
unreachable
158151
end
159-
unreachable
160152
end
161153
get_local $0
162154
i32.const 1
163155
i32.add
164156
set_local $0
165157
br $repeat|6
166-
unreachable
167158
end
168-
unreachable
169159
end
170160
)
171161
(func $null (; 2 ;) (type $v)

tests/compiler/infer-type.optimized.wat

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424
loop $repeat|0
2525
get_local $0
2626
i32.const 10
27-
i32.ge_s
28-
i32.eqz
27+
i32.lt_s
2928
if
3029
get_local $0
3130
i32.const 1

0 commit comments

Comments
 (0)