File: userland.js

package info (click to toggle)
node-webassemblyjs 1.11.4%2Bdfsg%2B~cs10.11.17-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 8,328 kB
  • sloc: javascript: 29,410; makefile: 85; sh: 42; ansic: 16
file content (57 lines) | stat: -rw-r--r-- 997 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// @flow
/* eslint no-unused-vars: off */

interface CompiledModule {
  _ir: IR;
  _ast: Program; // FIXME(sven): do we still need the AST here?

  exports: Array<CompiledModuleExportDescr>;
  imports: Array<CompiledModuleImportDescr>;
}

interface Instance {
  exports: any;
  executeStartFunc: (ir: IR, offset: number) => void;
}

type CompiledModuleExportDescr = {
  name: string,
  kind: string,
};

type CompiledModuleImportDescr = {
  module: string,
  name: string,
  kind: string,
};

type MemoryDescriptor = {
  initial: number,
  maximum?: ?number,
};

interface MemoryInstance {
  buffer: ArrayBuffer;
}

type TableDescriptor = {
  element: string,
  initial: number,
  maximum?: number,
};

type ImportObject =
  | Object
  | {
      _internalInstanceOptions: InternalInstanceOptions,
    };

type InstansitatedInstanceAndModule = {
  instance: Instance,
  module: CompiledModule,
};

type InternalInstanceOptions = {
  checkForI64InSignature: boolean,
  returnStackLocal: boolean,
};