Skip to content

It's not clear in JS.md what values processing the Elements list creates during instantiation #907

@saambarati

Description

@saambarati

For example, lets consider the following JS program:

module = new WebAssembly.Module({
    ;; single function (at index 0)
    ;; export function at index 0 as "foo"
    ;; import a table
    ;; elements section with a single element:
    ;;      element = { offset 0, function indices: [0] }
    (all of this is in the binary of course)
});

let table = new WebAssembly.Table({element: "anyfunc", initial: 1});
let instance = new WebAssembly.Instance(module,  {import: {table}});

instance.exports.foo === table.get(0) // What is this? true or false?
  • Are the Web Assembly Function objects that get stored into table supposed to be exactly the same object that gets stored into the exports dictionary?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions