Skip to content
This repository was archived by the owner on Dec 22, 2021. It is now read-only.
This repository was archived by the owner on Dec 22, 2021. It is now read-only.

Simd values in WASM - JS inteface #9

@arunetm-zz

Description

@arunetm-zz

SIMD values may appear in WASM-JS interface at the function interfaces and as globals. Without SIMD.js its not clear how these be represented in JS.

Should the calls in/out of JS with simd arg/ret throw immediately like its done for i64 WebAssembly/design#923? A similar situation arises for imported globals as well.

  1. For module imports
    If the signature contains an simd value (as argument or result), the host function immediately throws a TypeError when called.

  2. For global imports
    If the global_type of the import is a simd value, throw a WebAssembly.LinkError

  3. For exported globals
    If global is a simd value, throw a WebAssembly.LinkError.

  4. WebAssembly Exported Functions have a [[Call]](this, argValues) method defined as:
    Let sig be the function type of the function's [[Closure]].
    If sig contains an simd value (as argument or result), a TypeError is thrown.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions