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,
};
|