Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions tests/compiler/assert-nonnull.untouched.wat
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@
local.get $1
call $~lib/array/Array<assert-nonnull/Foo>#__unchecked_get
local.set $2
i32.const 1
drop
i32.const 1
drop
Comment thread
dcodeIO marked this conversation as resolved.
Outdated
local.get $2
i32.eqz
if
Expand Down Expand Up @@ -175,6 +179,10 @@
local.get $1
call $~lib/array/Array<assert-nonnull/Foo | null>#__unchecked_get
local.set $2
i32.const 1
drop
i32.const 0
drop
Comment thread
dcodeIO marked this conversation as resolved.
Outdated
local.get $2
)
(func $assert-nonnull/testElem (; 11 ;) (param $0 i32) (result i32)
Expand Down
9 changes: 9 additions & 0 deletions tests/compiler/assert.untouched.wat
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
(module
(type $none_=>_none (func))
(memory $0 0)
(table $0 1 funcref)
(export "memory" (memory $0))
(start $start)
(func $start:assert (; 0 ;)
i32.const 0
drop
)
Comment thread
dcodeIO marked this conversation as resolved.
Outdated
(func $start (; 1 ;)
call $start:assert
)
)
8 changes: 4 additions & 4 deletions tests/compiler/binary.optimized.wat
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
i32.shl
end
local.set $1
loop $continue|0
loop $while-continue|0
local.get $2
i32.const 127
i32.gt_s
Expand All @@ -148,7 +148,7 @@
i32.const 1
i32.sub
local.set $2
br $continue|0
br $while-continue|0
end
end
local.get $1
Expand Down Expand Up @@ -475,7 +475,7 @@
i64.or
end
local.set $1
loop $continue|0
loop $while-continue|0
local.get $2
i64.const 1023
i64.gt_s
Expand All @@ -501,7 +501,7 @@
i64.const 1
i64.sub
local.set $2
br $continue|0
br $while-continue|0
end
end
local.get $1
Expand Down
52 changes: 27 additions & 25 deletions tests/compiler/binary.untouched.wat
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@
(local $42 i32)
(local $43 i64)
(local $44 i64)
i32.const 1
drop
block $~lib/util/math/pow_lut|inlined.0 (result f64)
local.get $0
local.set $3
Expand Down Expand Up @@ -955,6 +957,7 @@
(local $8 f32)
(local $9 i32)
(local $10 i32)
(local $11 i32)
local.get $0
i32.reinterpret_f32
local.set $2
Expand Down Expand Up @@ -1092,13 +1095,13 @@
i32.or
local.set $3
end
block $break|0
loop $continue|0
local.get $4
local.get $5
i32.gt_s
i32.eqz
br_if $break|0
loop $while-continue|0
local.get $4
local.get $5
i32.gt_s
local.set $10
local.get $10
if
local.get $2
local.get $3
i32.ge_u
Expand All @@ -1125,9 +1128,8 @@
i32.const 1
i32.sub
local.set $4
br $continue|0
br $while-continue|0
end
unreachable
end
local.get $2
local.get $3
Expand All @@ -1151,13 +1153,13 @@
i32.const 8
i32.shl
i32.clz
local.set $10
local.set $11
local.get $4
local.get $10
local.get $11
i32.sub
local.set $4
local.get $2
local.get $10
local.get $11
i32.shl
local.set $2
local.get $4
Expand Down Expand Up @@ -1742,7 +1744,8 @@
(local $7 i64)
(local $8 f64)
(local $9 i64)
(local $10 i64)
(local $10 i32)
(local $11 i64)
local.get $0
i64.reinterpret_f64
local.set $2
Expand Down Expand Up @@ -1884,13 +1887,13 @@
i64.or
local.set $3
end
block $break|0
loop $continue|0
local.get $4
local.get $5
i64.gt_s
i32.eqz
br_if $break|0
loop $while-continue|0
local.get $4
local.get $5
i64.gt_s
local.set $10
local.get $10
if
local.get $2
local.get $3
i64.ge_u
Expand All @@ -1917,9 +1920,8 @@
i64.const 1
i64.sub
local.set $4
br $continue|0
br $while-continue|0
end
unreachable
end
local.get $2
local.get $3
Expand All @@ -1943,13 +1945,13 @@
i64.const 11
i64.shl
i64.clz
local.set $10
local.set $11
local.get $4
local.get $10
local.get $11
i64.sub
local.set $4
local.get $2
local.get $10
local.get $11
i64.shl
local.set $2
local.get $4
Expand Down
42 changes: 19 additions & 23 deletions tests/compiler/builtins.optimized.wat
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
i32.ge_u
select
if
loop $continue|0
loop $do-continue|0
local.get $0
i64.load
local.get $1
Expand All @@ -103,20 +103,18 @@
local.tee $2
i32.const 4
i32.ge_u
br_if $continue|0
br_if $do-continue|0
end
end
end
loop $continue|1
block $break|1
local.get $2
local.tee $3
i32.const 1
i32.sub
local.set $2
local.get $3
i32.eqz
br_if $break|1
loop $while-continue|1
local.get $2
local.tee $3
i32.const 1
i32.sub
local.set $2
local.get $3
if
local.get $1
i32.load16_u
local.tee $3
Expand All @@ -129,18 +127,16 @@
local.get $3
i32.sub
return
else
local.get $0
i32.const 2
i32.add
local.set $0
local.get $1
i32.const 2
i32.add
local.set $1
br $continue|1
end
unreachable
local.get $0
i32.const 2
i32.add
local.set $0
local.get $1
i32.const 2
i32.add
local.set $1
br $while-continue|1
end
end
i32.const 0
Expand Down
52 changes: 28 additions & 24 deletions tests/compiler/builtins.untouched.wat
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
(local $7 i32)
(local $8 i32)
(local $9 i32)
(local $10 i32)
local.get $0
call $~lib/rt/stub/__retain
local.set $0
Expand All @@ -134,6 +135,8 @@
i32.shl
i32.add
local.set $6
i32.const 1
drop
local.get $4
i32.const 4
i32.ge_u
Expand All @@ -150,15 +153,15 @@
i32.const 0
end
if
block $break|0
loop $continue|0
block $do-break|0
loop $do-continue|0
local.get $5
i64.load
local.get $6
i64.load
i64.ne
if
br $break|0
br $do-break|0
end
local.get $5
i32.const 8
Expand All @@ -175,39 +178,41 @@
local.get $4
i32.const 4
i32.ge_u
br_if $continue|0
local.set $7
local.get $7
br_if $do-continue|0
end
end
end
block $break|1
loop $continue|1
local.get $4
local.tee $7
i32.const 1
i32.sub
local.set $4
local.get $7
i32.eqz
br_if $break|1
loop $while-continue|1
local.get $4
local.tee $7
i32.const 1
i32.sub
local.set $4
local.get $7
local.set $7
local.get $7
if
local.get $5
i32.load16_u
local.set $7
local.set $8
local.get $6
i32.load16_u
local.set $8
local.get $7
local.set $9
local.get $8
local.get $9
i32.ne
if
local.get $7
local.get $8
local.get $9
i32.sub
local.set $9
local.set $10
local.get $0
call $~lib/rt/stub/__release
local.get $2
call $~lib/rt/stub/__release
local.get $9
local.get $10
return
end
local.get $5
Expand All @@ -218,17 +223,16 @@
i32.const 2
i32.add
local.set $6
br $continue|1
br $while-continue|1
end
unreachable
end
i32.const 0
local.set $8
local.set $7
local.get $0
call $~lib/rt/stub/__release
local.get $2
call $~lib/rt/stub/__release
local.get $8
local.get $7
)
(func $~lib/string/String.__eq (; 7 ;) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
Expand Down
2 changes: 2 additions & 0 deletions tests/compiler/call-super.untouched.wat
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@
local.get $6
local.get $5
i32.store
i32.const 1
drop
local.get $6
i32.const 1
i32.store offset=4
Expand Down
2 changes: 2 additions & 0 deletions tests/compiler/comma.untouched.wat
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@
local.get $1
global.get $comma/a
i32.lt_s
local.set $0
local.get $0
if
nop
global.get $comma/a
Expand Down
Loading