9
9
*/
10
10
module "binaryen" ;
11
11
12
+ type Ref = usize ;
13
+
12
14
export type Index = u32 ;
13
15
export type ExpressionId = i32 ;
14
16
export type FeatureFlags = u32 ;
15
17
export type Op = i32 ;
16
18
export type ExternalKind = u32 ;
17
19
export type SideEffects = u32 ;
18
20
export type ExpressionRunnerFlags = u32 ;
19
- type Ref = usize ;
21
+
20
22
export type StringRef = Ref ;
21
23
export type ArrayRef < T > = Ref ;
22
24
export type TypeRef = Ref ;
25
+ export type HeapTypeRef = Ref ;
23
26
export type ModuleRef = Ref ;
24
27
export type LiteralRef = Ref ;
25
28
export type ExpressionRef = Ref ;
@@ -33,10 +36,35 @@ export type ElementSegmentRef = Ref;
33
36
export type RelooperRef = Ref ;
34
37
export type RelooperBlockRef = Ref ;
35
38
export type ExpressionRunnerRef = Ref ;
39
+ export type BinaryenModuleAllocateAndWriteResultRef = Ref ;
36
40
37
41
export declare function _BinaryenTypeCreate ( types : ArrayRef < TypeRef > , numTypes : u32 ) : TypeRef ;
38
42
export declare function _BinaryenTypeArity ( type : TypeRef ) : u32 ;
39
43
export 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 ;
40
68
41
69
export declare function _BinaryenModuleCreate ( ) : ModuleRef ;
42
70
export declare function _BinaryenModuleDispose ( module : ModuleRef ) : void ;
@@ -594,7 +622,10 @@ export declare function _BinaryenModuleValidate(module: ModuleRef): i32;
594
622
export declare function _BinaryenModuleOptimize ( module : ModuleRef ) : void ;
595
623
export declare function _BinaryenModuleRunPasses ( module : ModuleRef , passes : ArrayRef < StringRef > , numPasses : Index ) : void ;
596
624
export 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 ;
598
629
export declare function _BinaryenModuleRead ( input : ArrayRef < u8 > , inputSize : usize ) : ModuleRef ;
599
630
export declare function _BinaryenModuleInterpret ( module : ModuleRef ) : void ;
600
631
export declare function _BinaryenModuleAddDebugInfoFileName ( module : ModuleRef , filename : StringRef ) : Index ;
0 commit comments