99 */
1010module "binaryen" ;
1111
12+ type Ref = usize ;
13+
1214export type Index = u32 ;
1315export type ExpressionId = i32 ;
1416export type FeatureFlags = u32 ;
1517export type Op = i32 ;
1618export type ExternalKind = u32 ;
1719export type SideEffects = u32 ;
1820export type ExpressionRunnerFlags = u32 ;
19- type Ref = usize ;
21+
2022export type StringRef = Ref ;
2123export type ArrayRef < T > = Ref ;
2224export type TypeRef = Ref ;
25+ export type HeapTypeRef = Ref ;
2326export type ModuleRef = Ref ;
2427export type LiteralRef = Ref ;
2528export type ExpressionRef = Ref ;
@@ -33,10 +36,35 @@ export type ElementSegmentRef = Ref;
3336export type RelooperRef = Ref ;
3437export type RelooperBlockRef = Ref ;
3538export type ExpressionRunnerRef = Ref ;
39+ export type BinaryenModuleAllocateAndWriteResultRef = Ref ;
3640
3741export declare function _BinaryenTypeCreate ( types : ArrayRef < TypeRef > , numTypes : u32 ) : TypeRef ;
3842export declare function _BinaryenTypeArity ( type : TypeRef ) : u32 ;
3943export declare function _BinaryenTypeExpand ( type : TypeRef , typesOut : ArrayRef < TypeRef > ) : void ;
44+ export declare function _BinaryenTypeGetHeapType ( type : TypeRef ) : HeapTypeRef ;
45+ export declare function _BinaryenTypeFromHeapType ( heapType : HeapTypeRef , nullable : bool ) : TypeRef ;
46+ export declare function _BinaryenTypeIsNullable ( type : TypeRef ) : bool ;
47+
48+ export declare function _BinaryenTypeFuncref ( ) : TypeRef ;
49+ export declare function _BinaryenTypeExternref ( ) : TypeRef ;
50+ export declare function _BinaryenTypeAnyref ( ) : TypeRef ;
51+ export declare function _BinaryenTypeEqref ( ) : TypeRef ;
52+ export declare function _BinaryenTypeI31ref ( ) : TypeRef ;
53+ export declare function _BinaryenTypeDataref ( ) : TypeRef ;
54+ export declare function _BinaryenTypeStringref ( ) : TypeRef ;
55+ export declare function _BinaryenTypeStringviewWTF8 ( ) : TypeRef ;
56+ export declare function _BinaryenTypeStringviewWTF16 ( ) : TypeRef ;
57+ export declare function _BinaryenTypeStringviewIter ( ) : TypeRef ;
58+
59+ export declare function _BinaryenHeapTypeFunc ( ) : HeapTypeRef ;
60+ export declare function _BinaryenHeapTypeAny ( ) : HeapTypeRef ;
61+ export declare function _BinaryenHeapTypeEq ( ) : HeapTypeRef ;
62+ export declare function _BinaryenHeapTypeI31 ( ) : HeapTypeRef ;
63+ export declare function _BinaryenHeapTypeData ( ) : HeapTypeRef ;
64+ export declare function _BinaryenHeapTypeString ( ) : HeapTypeRef ;
65+ export declare function _BinaryenHeapTypeStringviewWTF8 ( ) : HeapTypeRef ;
66+ export declare function _BinaryenHeapTypeStringviewWTF16 ( ) : HeapTypeRef ;
67+ export declare function _BinaryenHeapTypeStringviewIter ( ) : HeapTypeRef ;
4068
4169export declare function _BinaryenModuleCreate ( ) : ModuleRef ;
4270export declare function _BinaryenModuleDispose ( module : ModuleRef ) : void ;
@@ -594,7 +622,10 @@ export declare function _BinaryenModuleValidate(module: ModuleRef): i32;
594622export declare function _BinaryenModuleOptimize ( module : ModuleRef ) : void ;
595623export declare function _BinaryenModuleRunPasses ( module : ModuleRef , passes : ArrayRef < StringRef > , numPasses : Index ) : void ;
596624export declare function _BinaryenModuleAutoDrop ( module : ModuleRef ) : void ;
597- export declare function _BinaryenModuleAllocateAndWrite ( out : ArrayRef < u8 > , module : ModuleRef , sourceMapUrl : StringRef ) : void ;
625+ export declare function _BinaryenSizeofAllocateAndWriteResult ( ) : i32 ;
626+ export declare function _BinaryenModuleAllocateAndWrite ( resultOut : BinaryenModuleAllocateAndWriteResultRef , module : ModuleRef , sourceMapUrl : StringRef ) : void ;
627+ export declare function _BinaryenModuleAllocateAndWriteText ( module : ModuleRef ) : StringRef ;
628+ export declare function _BinaryenModuleAllocateAndWriteStackIR ( module : ModuleRef , optimize : bool ) : StringRef ;
598629export declare function _BinaryenModuleRead ( input : ArrayRef < u8 > , inputSize : usize ) : ModuleRef ;
599630export declare function _BinaryenModuleInterpret ( module : ModuleRef ) : void ;
600631export declare function _BinaryenModuleAddDebugInfoFileName ( module : ModuleRef , filename : StringRef ) : Index ;
0 commit comments