Closed Bug 1825094 Opened 2 years ago Closed 2 years ago

Audit the linking of GC modules for subtyping and equality

Categories

(Core :: JavaScript: WebAssembly, task, P3)

task

Tracking

()

RESOLVED WONTFIX

People

(Reporter: rhunt, Unassigned)

References

Details

When we link two modules that have GC types, we need to be very careful to support subtyping of module definitions. I don't know what the final spec will permit, so we may need to look at this later.

Some examples:

  1. Can a provided table's type be a subtype of the import table type? [1] Right now it's strict equality. Probably not because tables are mutable.
  2. Can a provided tag's params be a subtype of the import tag params? [2]. I think this could be relaxed.
  3. ditto for functions [4] and globals [3]

[1] https://searchfox.org/mozilla-central/rev/f9beb753a84aa297713d1565dcd0c5e3c66e4174/js/src/wasm/WasmJS.cpp#461
[2] https://searchfox.org/mozilla-central/rev/f9beb753a84aa297713d1565dcd0c5e3c66e4174/js/src/wasm/WasmJS.cpp#491
[3] https://searchfox.org/mozilla-central/rev/f9beb753a84aa297713d1565dcd0c5e3c66e4174/js/src/wasm/WasmJS.cpp#521
[4] https://searchfox.org/mozilla-central/rev/f9beb753a84aa297713d1565dcd0c5e3c66e4174/js/src/wasm/WasmModule.cpp#558

This is being done in the spec-test work.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.