Skip to content

Fix reference-types test failure #2136

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 2 commits into from
Nov 16, 2021
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
15 changes: 1 addition & 14 deletions tests/compiler/features/reference-types.optimized.wat
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
(import "reference-types" "somethingNull" (func $features/reference-types/somethingNull (result externref)))
(import "reference-types" "external" (func $features/reference-types/external (param externref) (result externref)))
(global $features/reference-types/funcGlobal (mut funcref) (ref.null func))
(global $features/reference-types/funcGlobalInit (mut funcref) (ref.null func))
(global $features/reference-types/externGlobal (mut externref) (ref.null extern))
(global $features/reference-types/anyGlobal (mut anyref) (ref.null any))
(memory $0 1)
Expand Down Expand Up @@ -114,8 +113,6 @@
end
ref.null func
global.set $features/reference-types/funcGlobal
ref.null func
global.set $features/reference-types/funcGlobalInit
global.get $features/reference-types/externGlobal
ref.is_null
i32.eqz
Expand Down Expand Up @@ -144,17 +141,7 @@
global.set $features/reference-types/anyGlobal
ref.func $features/reference-types/someFunc
global.set $features/reference-types/funcGlobal
global.get $features/reference-types/funcGlobalInit
ref.is_null
if
i32.const 0
i32.const 1056
i32.const 108
i32.const 1
call $~lib/builtins/abort
unreachable
end
global.get $features/reference-types/funcGlobal
ref.func $features/reference-types/someFunc
global.set $features/reference-types/anyGlobal
)
)
2 changes: 1 addition & 1 deletion tests/compiler/features/reference-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ testLocal<anyref>();

function someFunc(): void {}
funcGlobal = someFunc;
assert(funcGlobalInit);
assert(funcGlobal);
var otherFuncGlobal: funcref = someFunc;
assert(otherFuncGlobal);
{
Expand Down
2 changes: 1 addition & 1 deletion tests/compiler/features/reference-types.untouched.wat
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@
call $features/reference-types/testLocal<anyref>
ref.func $features/reference-types/someFunc
global.set $features/reference-types/funcGlobal
global.get $features/reference-types/funcGlobalInit
global.get $features/reference-types/funcGlobal
ref.is_null
if
i32.const 0
Expand Down