Closed Bug 1876148 Opened 2 years ago Closed 2 years ago

Update js-string-builtins implementation for recent changes

Categories

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

task

Tracking

()

RESOLVED FIXED
125 Branch
Tracking Status
firefox125 --- fixed

People

(Reporter: rhunt, Assigned: rhunt)

References

(Blocks 1 open bug)

Details

Attachments

(5 external files)

https://github.com/WebAssembly/js-string-builtins/pull/14
https://github.com/WebAssembly/js-string-builtins/pull/20

^ landed in the last two weeks with some naming and type signature tweaks.

We need to be able to have a type signature such as:
(func (param (ref (array i16))))
In our builtin methods to support JS-string-builtins.

This commit:

  • Adds wasm::StaticTypeDefs for process-lifetime wasm::TypeDef*
  • Adds wasm::BuiltinModuleFuncs for process-lifetime BuiltinModuleFunc
  • Change GenerateBuiltinModules.py to accept type syntax
    • For generating SymbolicAddressSignature, we just need a MIRType
    • For BuiltinModuleFunc, we generate a ValType
  • The signature for JS-string-builtin methods that need types are fixed

These were missing in the initial implementation.

Depends on D199387

This is difficult to test because all strings are limited to less than
2GiB of characters, and negative indices are not valid, so any difference
between unsigned and signed will trap either way.

The one case I can think of, I added a test for.

Depends on D199389

WebAssembly.validate can take feature options, like enabling
js-string-builtins. This is useful for feature detection.

The test is extended to use it.

Depends on D199390

Pushed by rhunt@eqrion.net: https://hg.mozilla.org/integration/autoland/rev/b31c3404c4c1 wasm: Let builtin module funcs reference type definitions in signature. r=yury https://hg.mozilla.org/integration/autoland/rev/1f676c723bba wasm: Add js-string-builtin cast and test builtins. r=yury https://hg.mozilla.org/integration/autoland/rev/f810b05292bc wasm: Update names for latest js-string-builtin changes. r=yury https://hg.mozilla.org/integration/autoland/rev/29c12bdc7e54 wasm: js-string-builtin arguments are unsigned. r=yury https://hg.mozilla.org/integration/autoland/rev/88c1141d96c6 wasm: Validate accepts feature options. r=yury
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: