gecko-dev/js
Ryan Hunt b40ac20343 Bug 1720514 - wasm: Add framework for intrinsics with basic i8vecmul. r=jseward
This commit implements a framework for creating 'intrinsics' which are
natively implemented functions that are exposable as wasm functions
that can be called or linked against. A simple 8-bit vector product for
flexible vectors is implemented as a proof of concept.

The basic API is:
```
let module = wasmIntrinsicI8VecMul(); // WebAssembly.Module
let memory = new WebAssembly.Module({ initial: pageSize });
let instance = new WebAssembly.Instance(module,
  { "": { memory } });
instance.exports.i8vecmul(dest, src1, src2, len);
```

The implementation is mainly done through `CompileIntrisicModule` which
manually builds a ModuleEnvironment with an imported memory, and a single
exported function which is of the bytecode form:
```
(func (params ...)
  local.get 0
  ...
  local.get n
  private_intrinsic_opcode
)
```
The private_intrinsic_opcode is implemented as an instance call. An
additional heap base parameter is added which allows quick bounds
checking, similar to Instance::memory32Copy.

A followup will implement the intrinsic for the firefox
translations project.

Differential Revision: https://phabricator.services.mozilla.com/D119919
2021-07-20 19:05:59 +00:00
..
ductwork/debugger
examples
public Bug 1717914 - wasm: Add IndexType, decode, validate, and construct. r=lth 2021-07-16 20:58:09 +00:00
src Bug 1720514 - wasm: Add framework for intrinsics with basic i8vecmul. r=jseward 2021-07-20 19:05:59 +00:00
xpconnect Bug 1676024: Websockets triggered by extensions should not be subject to a page's CSP. r=ckerschb,mixedpuppy 2021-07-20 14:11:13 +00:00
app.mozbuild
ffi.configure Bug 1694884 - Fail configure when using --*-system-* options with a bootstrapped sysroot. r=firefox-build-system-reviewers,mhentges 2021-07-16 20:51:27 +00:00
moz.build Bug 1708739 - Move WeakMap APIs to new public header r=yulia 2021-05-01 12:10:14 +00:00
moz.configure Bug 1717914 - wasm: Add feature flags for Memory64. r=lth 2021-07-16 20:58:09 +00:00
sub.configure