Skip to content

Commit

Permalink
Bug 1739683 - Add gczeal test for Wasm instance call safepoint issue.…
Browse files Browse the repository at this point in the history
… r=lth

Differential Revision: https://phabricator.services.mozilla.com/D130528
  • Loading branch information
takikawa committed Jan 8, 2024
1 parent dd0e82b commit 6268b9e
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions js/src/jit-test/tests/wasm/ref-types/stackmaps5.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Test for Bug 1739683. Tests that stackmaps are properly associated with
// an Ion call to a builtin Wasm instance method.

gczeal(2, 1); // Collect on every allocation.

let exports = wasmEvalText(
`(module
(table $tab (export "tab") 5 externref)
(elem declare funcref (ref.func $g))
(func $g)
(func $f (export "f") (param externref) (result)
(ref.func $g) ;; force a collection via allocation in instance call
(ref.is_null)
(if
(then)
(else (i32.const 0) (local.get 0) (table.set $tab)))
)
)`,
{}
).exports;
exports.f("foo");

0 comments on commit 6268b9e

Please sign in to comment.