Closed
Bug 1977692
Opened 4 months ago
Closed 4 months ago
ToWebAssemblyValue for i31ref should permit -0
Categories
(Core :: JavaScript: WebAssembly, task, P3)
Core
JavaScript: WebAssembly
Tracking
()
RESOLVED
FIXED
143 Branch
| Tracking | Status | |
|---|---|---|
| firefox143 | --- | fixed |
People
(Reporter: rhunt, Assigned: bvisness)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
See [1] step 6.4: Else if v is a Number and v is equal to ? ToInt32(v) and ℝ(v) < 2^30 and ℝ(v) ⩾ -2^30
ToInt32(-0) [2] will return +0, and -0 == 0, so we should succeed in the conversion to i31ref. The result should be ref.i31 0.
We have tests of the opposite that should be updated [3].
[1] https://webassembly.github.io/gc/js-api/index.html#towebassemblyvalue
[2] https://tc39.es/ecma262/multipage/abstract-operations.html#sec-toint32
[3] https://searchfox.org/mozilla-central/rev/4e4c6befbae5dccbe4c718d6871f75c16d97f82d/js/src/jit-test/tests/wasm/gc/i31ref.js#9
| Assignee | ||
Updated•4 months ago
|
Assignee: nobody → bvisness
Status: NEW → ASSIGNED
| Assignee | ||
Comment 1•4 months ago
|
||
This required changing the C++ conversion path (deep in
ToWebAssemblyValue) and the JIT entry path.
Pushed by bvisness@mozilla.com:
https://github.com/mozilla-firefox/firefox/commit/1289cf86f685
https://hg.mozilla.org/integration/autoland/rev/d78ccee4066d
Allow -0 to convert to i31ref. r=rhunt
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
status-firefox143:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 143 Branch
Updated•3 months ago
|
QA Whiteboard: [qa-triage-done-c144/b143]
You need to log in
before you can comment on or make changes to this bug.
Description
•