@@ -1720,14 +1720,16 @@ declare module "assemblyscript/src/module" {
17201720 export type Index = number ;
17211721 export enum NativeType {
17221722 None = 0 ,
1723+ Unreachable = 1 ,
17231724 I32 = 2 ,
17241725 I64 = 3 ,
17251726 F32 = 4 ,
17261727 F64 = 5 ,
17271728 V128 = 6 ,
1728- Anyref = 7 ,
1729- Exnref = 8 ,
1730- Unreachable = 1 ,
1729+ Funcref = 7 ,
1730+ Anyref = 8 ,
1731+ Nullref = 9 ,
1732+ Exnref = 10 ,
17311733 Auto = - 1
17321734 }
17331735 export enum FeatureFlags {
@@ -1782,35 +1784,38 @@ declare module "assemblyscript/src/module" {
17821784 DataDrop = 35 ,
17831785 MemoryCopy = 36 ,
17841786 MemoryFill = 37 ,
1785- Try = 40 ,
1786- Throw = 41 ,
1787- Rethrow = 42 ,
1788- BrOnExn = 43 ,
17891787 Push = 38 ,
1790- Pop = 39
1788+ Pop = 39 ,
1789+ RefNull = 40 ,
1790+ RefIsNull = 41 ,
1791+ RefFunc = 42 ,
1792+ Try = 43 ,
1793+ Throw = 44 ,
1794+ Rethrow = 45 ,
1795+ BrOnExn = 46
17911796 }
17921797 export enum UnaryOp {
17931798 ClzI32 = 0 ,
1794- CtzI32 = 2 ,
1795- PopcntI32 = 4 ,
1796- NegF32 = 6 ,
1797- AbsF32 = 8 ,
1798- CeilF32 = 10 ,
1799- FloorF32 = 12 ,
1800- TruncF32 = 14 ,
1801- NearestF32 = 16 ,
1802- SqrtF32 = 18 ,
1803- EqzI32 = 20 ,
18041799 ClzI64 = 1 ,
1800+ CtzI32 = 2 ,
18051801 CtzI64 = 3 ,
1802+ PopcntI32 = 4 ,
18061803 PopcntI64 = 5 ,
1804+ NegF32 = 6 ,
18071805 NegF64 = 7 ,
1806+ AbsF32 = 8 ,
18081807 AbsF64 = 9 ,
1808+ CeilF32 = 10 ,
18091809 CeilF64 = 11 ,
1810+ FloorF32 = 12 ,
18101811 FloorF64 = 13 ,
1812+ TruncF32 = 14 ,
18111813 TruncF64 = 15 ,
1814+ NearestF32 = 16 ,
18121815 NearestF64 = 17 ,
1816+ SqrtF32 = 18 ,
18131817 SqrtF64 = 19 ,
1818+ EqzI32 = 20 ,
18141819 EqzI64 = 21 ,
18151820 ExtendI32 = 22 ,
18161821 ExtendU32 = 23 ,
@@ -1884,12 +1889,12 @@ declare module "assemblyscript/src/module" {
18841889 ConvertI64x2ToF64x2 = 91 ,
18851890 ConvertU64x2ToF64x2 = 92 ,
18861891 WidenLowI8x16ToI16x8 = 93 ,
1887- WidenLowU8x16ToU16x8 = 95 ,
18881892 WidenHighI8x16ToI16x8 = 94 ,
1893+ WidenLowU8x16ToU16x8 = 95 ,
18891894 WidenHighU8x16ToU16x8 = 96 ,
18901895 WidenLowI16x8ToI32x4 = 97 ,
1891- WidenLowU16x8ToU32x4 = 99 ,
18921896 WidenHighI16x8ToI32x4 = 98 ,
1897+ WidenLowU16x8ToU32x4 = 99 ,
18931898 WidenHighU16x8ToU32x4 = 100
18941899 }
18951900 export enum BinaryOp {
@@ -1973,43 +1978,43 @@ declare module "assemblyscript/src/module" {
19731978 NeI8x16 = 77 ,
19741979 LtI8x16 = 78 ,
19751980 LtU8x16 = 79 ,
1976- LeI8x16 = 82 ,
1977- LeU8x16 = 83 ,
19781981 GtI8x16 = 80 ,
19791982 GtU8x16 = 81 ,
1983+ LeI8x16 = 82 ,
1984+ LeU8x16 = 83 ,
19801985 GeI8x16 = 84 ,
19811986 GeU8x16 = 85 ,
19821987 EqI16x8 = 86 ,
19831988 NeI16x8 = 87 ,
19841989 LtI16x8 = 88 ,
19851990 LtU16x8 = 89 ,
1986- LeI16x8 = 92 ,
1987- LeU16x8 = 93 ,
19881991 GtI16x8 = 90 ,
19891992 GtU16x8 = 91 ,
1993+ LeI16x8 = 92 ,
1994+ LeU16x8 = 93 ,
19901995 GeI16x8 = 94 ,
19911996 GeU16x8 = 95 ,
19921997 EqI32x4 = 96 ,
19931998 NeI32x4 = 97 ,
19941999 LtI32x4 = 98 ,
19952000 LtU32x4 = 99 ,
1996- LeI32x4 = 102 ,
1997- LeU32x4 = 103 ,
19982001 GtI32x4 = 100 ,
19992002 GtU32x4 = 101 ,
2003+ LeI32x4 = 102 ,
2004+ LeU32x4 = 103 ,
20002005 GeI32x4 = 104 ,
20012006 GeU32x4 = 105 ,
20022007 EqF32x4 = 106 ,
20032008 NeF32x4 = 107 ,
20042009 LtF32x4 = 108 ,
2005- LeF32x4 = 110 ,
20062010 GtF32x4 = 109 ,
2011+ LeF32x4 = 110 ,
20072012 GeF32x4 = 111 ,
20082013 EqF64x2 = 112 ,
20092014 NeF64x2 = 113 ,
20102015 LtF64x2 = 114 ,
2011- LeF64x2 = 116 ,
20122016 GtF64x2 = 115 ,
2017+ LeF64x2 = 116 ,
20132018 GeF64x2 = 117 ,
20142019 AndV128 = 118 ,
20152020 OrV128 = 119 ,
@@ -2146,6 +2151,7 @@ declare module "assemblyscript/src/module" {
21462151 f32 ( value : number ) : ExpressionRef ;
21472152 f64 ( value : number ) : ExpressionRef ;
21482153 v128 ( bytes : Uint8Array ) : ExpressionRef ;
2154+ ref_null ( ) : ExpressionRef ;
21492155 unary ( op : UnaryOp , expr : ExpressionRef ) : ExpressionRef ;
21502156 binary ( op : BinaryOp , left : ExpressionRef , right : ExpressionRef ) : ExpressionRef ;
21512157 host ( op : HostOp , name ?: string | null , operands ?: ExpressionRef [ ] | null ) : ExpressionRef ;
@@ -2170,7 +2176,7 @@ declare module "assemblyscript/src/module" {
21702176 if ( condition : ExpressionRef , ifTrue : ExpressionRef , ifFalse ?: ExpressionRef ) : ExpressionRef ;
21712177 nop ( ) : ExpressionRef ;
21722178 return ( expression ?: ExpressionRef ) : ExpressionRef ;
2173- select ( ifTrue : ExpressionRef , ifFalse : ExpressionRef , condition : ExpressionRef ) : ExpressionRef ;
2179+ select ( ifTrue : ExpressionRef , ifFalse : ExpressionRef , condition : ExpressionRef , type ?: NativeType ) : ExpressionRef ;
21742180 switch ( names : string [ ] , defaultName : string | null , condition : ExpressionRef , value ?: ExpressionRef ) : ExpressionRef ;
21752181 call ( target : string , operands : ExpressionRef [ ] | null , returnType : NativeType , isReturn ?: boolean ) : ExpressionRef ;
21762182 return_call ( target : string , operands : ExpressionRef [ ] | null , returnType : NativeType ) : ExpressionRef ;
@@ -2191,6 +2197,8 @@ declare module "assemblyscript/src/module" {
21912197 simd_ternary ( op : SIMDTernaryOp , a : ExpressionRef , b : ExpressionRef , c : ExpressionRef ) : ExpressionRef ;
21922198 simd_shift ( op : SIMDShiftOp , vec : ExpressionRef , shift : ExpressionRef ) : ExpressionRef ;
21932199 simd_load ( op : SIMDLoadOp , ptr : ExpressionRef , offset : number , align : number ) : ExpressionRef ;
2200+ ref_is_null ( expr : ExpressionRef ) : ExpressionRef ;
2201+ ref_func ( name : string ) : ExpressionRef ;
21942202 addGlobal ( name : string , type : NativeType , mutable : boolean , initializer : ExpressionRef ) : GlobalRef ;
21952203 getGlobal ( name : string ) : GlobalRef ;
21962204 removeGlobal ( name : string ) : void ;
@@ -2372,12 +2380,10 @@ declare module "assemblyscript/src/types" {
23722380 F64 = 12 ,
23732381 /** A 128-bit vector. */
23742382 V128 = 13 ,
2375- /** A host reference. */
2383+ /** Any host reference. */
23762384 ANYREF = 14 ,
2377- /** An internal exception reference. */
2378- EXNREF = 15 ,
23792385 /** No return type. */
2380- VOID = 16
2386+ VOID = 15
23812387 }
23822388 /** Indicates capabilities of a type. */
23832389 export const enum TypeFlags {
@@ -2403,7 +2409,9 @@ declare module "assemblyscript/src/types" {
24032409 /** Is a nullable type. */
24042410 NULLABLE = 512 ,
24052411 /** Is a vector type. */
2406- VECTOR = 1024
2412+ VECTOR = 1024 ,
2413+ /** Is a host type. */
2414+ HOST = 2048
24072415 }
24082416 /** Represents a resolved type. */
24092417 export class Type {
@@ -2493,10 +2501,8 @@ declare module "assemblyscript/src/types" {
24932501 static readonly f64 : Type ;
24942502 /** A 128-bit vector. */
24952503 static readonly v128 : Type ;
2496- /** A host reference. */
2504+ /** Any host reference. */
24972505 static readonly anyref : Type ;
2498- /** An internal exception reference. */
2499- static readonly exnref : Type ;
25002506 /** No return type. */
25012507 static readonly void : Type ;
25022508 /** Alias of i32 indicating type inference of locals and globals with just an initializer. */
0 commit comments