Skip to content

Update binaryen #1531

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Nov 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"url": "https://github.com/AssemblyScript/assemblyscript/issues"
},
"dependencies": {
"binaryen": "98.0.0-nightly.20201030",
"binaryen": "98.0.0-nightly.20201109",
"long": "^4.0.0",
"source-map-support": "^0.5.19",
"ts-node": "^6.2.0"
Expand Down
6 changes: 2 additions & 4 deletions tests/compiler/assert-nonnull.optimized.wat
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,9 @@
call $~lib/builtins/abort
unreachable
end
i32.const 0
local.get $0
i32.load offset=12
i32.ge_u
i32.eqz
if
i32.const 1184
i32.const 1248
Expand All @@ -104,10 +103,9 @@
local.get $0
)
(func $~lib/array/Array<assert-nonnull/Foo|null>#__get (param $0 i32) (result i32)
i32.const 0
local.get $0
i32.load offset=12
i32.ge_u
i32.eqz
if
i32.const 1184
i32.const 1248
Expand Down
159 changes: 78 additions & 81 deletions tests/compiler/builtins.optimized.wat
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
(type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32)))
(type $i32_i32_f64_f64_f64_f64_f64_=>_none (func (param i32 i32 f64 f64 f64 f64 f64)))
(type $i32_=>_i32 (func (param i32) (result i32)))
(type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32)))
(import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32)))
(import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64)))
(memory $0 1)
Expand Down Expand Up @@ -49,84 +48,10 @@
local.get $1
i32.add
)
(func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32)
(local $4 i32)
local.get $0
i32.const 7
i32.and
local.get $1
i32.const 7
i32.and
i32.or
i32.eqz
i32.const 0
local.get $2
i32.const 4
i32.ge_u
select
if
loop $do-continue|0
local.get $0
i64.load
local.get $1
i64.load
i64.eq
if
local.get $0
i32.const 8
i32.add
local.set $0
local.get $1
i32.const 8
i32.add
local.set $1
local.get $2
i32.const 4
i32.sub
local.tee $2
i32.const 4
i32.ge_u
br_if $do-continue|0
end
end
end
loop $while-continue|1
local.get $2
local.tee $3
i32.const 1
i32.sub
local.set $2
local.get $3
if
local.get $0
i32.load16_u
local.tee $3
local.get $1
i32.load16_u
local.tee $4
i32.ne
if
local.get $3
local.get $4
i32.sub
return
end
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
)
(func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
local.get $0
local.get $1
i32.eq
Expand Down Expand Up @@ -156,10 +81,82 @@
i32.shr_u
i32.ne
br_if $folding-inner0
local.get $0
local.get $1
local.get $2
call $~lib/util/string/compareImpl
block $__inlined_func$~lib/util/string/compareImpl (result i32)
local.get $0
local.tee $3
i32.const 7
i32.and
local.get $1
i32.const 7
i32.and
i32.or
i32.eqz
i32.const 0
local.get $2
local.tee $0
i32.const 4
i32.ge_u
select
if
loop $do-continue|0
local.get $3
i64.load
local.get $1
i64.load
i64.eq
if
local.get $3
i32.const 8
i32.add
local.set $3
local.get $1
i32.const 8
i32.add
local.set $1
local.get $0
i32.const 4
i32.sub
local.tee $0
i32.const 4
i32.ge_u
br_if $do-continue|0
end
end
end
loop $while-continue|1
local.get $0
local.tee $2
i32.const 1
i32.sub
local.set $0
local.get $2
if
local.get $3
i32.load16_u
local.tee $2
local.get $1
i32.load16_u
local.tee $4
i32.ne
if
local.get $2
local.get $4
i32.sub
br $__inlined_func$~lib/util/string/compareImpl
end
local.get $3
i32.const 2
i32.add
local.set $3
local.get $1
i32.const 2
i32.add
local.set $1
br $while-continue|1
end
end
i32.const 0
end
i32.eqz
return
end
Expand Down
4 changes: 2 additions & 2 deletions tests/compiler/call-super.optimized.wat
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@
i32.const 16
i32.shr_u
local.tee $3
local.get $5
local.get $3
i32.gt_s
local.get $5
i32.lt_s
select
memory.grow
i32.const 0
Expand Down
4 changes: 2 additions & 2 deletions tests/compiler/class-implements.optimized.wat
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@
i32.const 16
i32.shr_u
local.tee $2
local.get $4
local.get $2
i32.gt_s
local.get $4
i32.lt_s
select
memory.grow
i32.const 0
Expand Down
Loading