@@ -1720,14 +1720,16 @@ declare module "assemblyscript/src/module" {
1720
1720
export type Index = number ;
1721
1721
export enum NativeType {
1722
1722
None = 0 ,
1723
+ Unreachable = 1 ,
1723
1724
I32 = 2 ,
1724
1725
I64 = 3 ,
1725
1726
F32 = 4 ,
1726
1727
F64 = 5 ,
1727
1728
V128 = 6 ,
1728
- Anyref = 7 ,
1729
- Exnref = 8 ,
1730
- Unreachable = 1 ,
1729
+ Funcref = 7 ,
1730
+ Anyref = 8 ,
1731
+ Nullref = 9 ,
1732
+ Exnref = 10 ,
1731
1733
Auto = - 1
1732
1734
}
1733
1735
export enum FeatureFlags {
@@ -1782,35 +1784,38 @@ declare module "assemblyscript/src/module" {
1782
1784
DataDrop = 35 ,
1783
1785
MemoryCopy = 36 ,
1784
1786
MemoryFill = 37 ,
1785
- Try = 40 ,
1786
- Throw = 41 ,
1787
- Rethrow = 42 ,
1788
- BrOnExn = 43 ,
1789
1787
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
1791
1796
}
1792
1797
export enum UnaryOp {
1793
1798
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 ,
1804
1799
ClzI64 = 1 ,
1800
+ CtzI32 = 2 ,
1805
1801
CtzI64 = 3 ,
1802
+ PopcntI32 = 4 ,
1806
1803
PopcntI64 = 5 ,
1804
+ NegF32 = 6 ,
1807
1805
NegF64 = 7 ,
1806
+ AbsF32 = 8 ,
1808
1807
AbsF64 = 9 ,
1808
+ CeilF32 = 10 ,
1809
1809
CeilF64 = 11 ,
1810
+ FloorF32 = 12 ,
1810
1811
FloorF64 = 13 ,
1812
+ TruncF32 = 14 ,
1811
1813
TruncF64 = 15 ,
1814
+ NearestF32 = 16 ,
1812
1815
NearestF64 = 17 ,
1816
+ SqrtF32 = 18 ,
1813
1817
SqrtF64 = 19 ,
1818
+ EqzI32 = 20 ,
1814
1819
EqzI64 = 21 ,
1815
1820
ExtendI32 = 22 ,
1816
1821
ExtendU32 = 23 ,
@@ -1884,12 +1889,12 @@ declare module "assemblyscript/src/module" {
1884
1889
ConvertI64x2ToF64x2 = 91 ,
1885
1890
ConvertU64x2ToF64x2 = 92 ,
1886
1891
WidenLowI8x16ToI16x8 = 93 ,
1887
- WidenLowU8x16ToU16x8 = 95 ,
1888
1892
WidenHighI8x16ToI16x8 = 94 ,
1893
+ WidenLowU8x16ToU16x8 = 95 ,
1889
1894
WidenHighU8x16ToU16x8 = 96 ,
1890
1895
WidenLowI16x8ToI32x4 = 97 ,
1891
- WidenLowU16x8ToU32x4 = 99 ,
1892
1896
WidenHighI16x8ToI32x4 = 98 ,
1897
+ WidenLowU16x8ToU32x4 = 99 ,
1893
1898
WidenHighU16x8ToU32x4 = 100
1894
1899
}
1895
1900
export enum BinaryOp {
@@ -1973,43 +1978,43 @@ declare module "assemblyscript/src/module" {
1973
1978
NeI8x16 = 77 ,
1974
1979
LtI8x16 = 78 ,
1975
1980
LtU8x16 = 79 ,
1976
- LeI8x16 = 82 ,
1977
- LeU8x16 = 83 ,
1978
1981
GtI8x16 = 80 ,
1979
1982
GtU8x16 = 81 ,
1983
+ LeI8x16 = 82 ,
1984
+ LeU8x16 = 83 ,
1980
1985
GeI8x16 = 84 ,
1981
1986
GeU8x16 = 85 ,
1982
1987
EqI16x8 = 86 ,
1983
1988
NeI16x8 = 87 ,
1984
1989
LtI16x8 = 88 ,
1985
1990
LtU16x8 = 89 ,
1986
- LeI16x8 = 92 ,
1987
- LeU16x8 = 93 ,
1988
1991
GtI16x8 = 90 ,
1989
1992
GtU16x8 = 91 ,
1993
+ LeI16x8 = 92 ,
1994
+ LeU16x8 = 93 ,
1990
1995
GeI16x8 = 94 ,
1991
1996
GeU16x8 = 95 ,
1992
1997
EqI32x4 = 96 ,
1993
1998
NeI32x4 = 97 ,
1994
1999
LtI32x4 = 98 ,
1995
2000
LtU32x4 = 99 ,
1996
- LeI32x4 = 102 ,
1997
- LeU32x4 = 103 ,
1998
2001
GtI32x4 = 100 ,
1999
2002
GtU32x4 = 101 ,
2003
+ LeI32x4 = 102 ,
2004
+ LeU32x4 = 103 ,
2000
2005
GeI32x4 = 104 ,
2001
2006
GeU32x4 = 105 ,
2002
2007
EqF32x4 = 106 ,
2003
2008
NeF32x4 = 107 ,
2004
2009
LtF32x4 = 108 ,
2005
- LeF32x4 = 110 ,
2006
2010
GtF32x4 = 109 ,
2011
+ LeF32x4 = 110 ,
2007
2012
GeF32x4 = 111 ,
2008
2013
EqF64x2 = 112 ,
2009
2014
NeF64x2 = 113 ,
2010
2015
LtF64x2 = 114 ,
2011
- LeF64x2 = 116 ,
2012
2016
GtF64x2 = 115 ,
2017
+ LeF64x2 = 116 ,
2013
2018
GeF64x2 = 117 ,
2014
2019
AndV128 = 118 ,
2015
2020
OrV128 = 119 ,
@@ -2146,6 +2151,7 @@ declare module "assemblyscript/src/module" {
2146
2151
f32 ( value : number ) : ExpressionRef ;
2147
2152
f64 ( value : number ) : ExpressionRef ;
2148
2153
v128 ( bytes : Uint8Array ) : ExpressionRef ;
2154
+ ref_null ( ) : ExpressionRef ;
2149
2155
unary ( op : UnaryOp , expr : ExpressionRef ) : ExpressionRef ;
2150
2156
binary ( op : BinaryOp , left : ExpressionRef , right : ExpressionRef ) : ExpressionRef ;
2151
2157
host ( op : HostOp , name ?: string | null , operands ?: ExpressionRef [ ] | null ) : ExpressionRef ;
@@ -2170,7 +2176,7 @@ declare module "assemblyscript/src/module" {
2170
2176
if ( condition : ExpressionRef , ifTrue : ExpressionRef , ifFalse ?: ExpressionRef ) : ExpressionRef ;
2171
2177
nop ( ) : ExpressionRef ;
2172
2178
return ( expression ?: ExpressionRef ) : ExpressionRef ;
2173
- select ( ifTrue : ExpressionRef , ifFalse : ExpressionRef , condition : ExpressionRef ) : ExpressionRef ;
2179
+ select ( ifTrue : ExpressionRef , ifFalse : ExpressionRef , condition : ExpressionRef , type ?: NativeType ) : ExpressionRef ;
2174
2180
switch ( names : string [ ] , defaultName : string | null , condition : ExpressionRef , value ?: ExpressionRef ) : ExpressionRef ;
2175
2181
call ( target : string , operands : ExpressionRef [ ] | null , returnType : NativeType , isReturn ?: boolean ) : ExpressionRef ;
2176
2182
return_call ( target : string , operands : ExpressionRef [ ] | null , returnType : NativeType ) : ExpressionRef ;
@@ -2191,6 +2197,8 @@ declare module "assemblyscript/src/module" {
2191
2197
simd_ternary ( op : SIMDTernaryOp , a : ExpressionRef , b : ExpressionRef , c : ExpressionRef ) : ExpressionRef ;
2192
2198
simd_shift ( op : SIMDShiftOp , vec : ExpressionRef , shift : ExpressionRef ) : ExpressionRef ;
2193
2199
simd_load ( op : SIMDLoadOp , ptr : ExpressionRef , offset : number , align : number ) : ExpressionRef ;
2200
+ ref_is_null ( expr : ExpressionRef ) : ExpressionRef ;
2201
+ ref_func ( name : string ) : ExpressionRef ;
2194
2202
addGlobal ( name : string , type : NativeType , mutable : boolean , initializer : ExpressionRef ) : GlobalRef ;
2195
2203
getGlobal ( name : string ) : GlobalRef ;
2196
2204
removeGlobal ( name : string ) : void ;
@@ -2372,12 +2380,10 @@ declare module "assemblyscript/src/types" {
2372
2380
F64 = 12 ,
2373
2381
/** A 128-bit vector. */
2374
2382
V128 = 13 ,
2375
- /** A host reference. */
2383
+ /** Any host reference. */
2376
2384
ANYREF = 14 ,
2377
- /** An internal exception reference. */
2378
- EXNREF = 15 ,
2379
2385
/** No return type. */
2380
- VOID = 16
2386
+ VOID = 15
2381
2387
}
2382
2388
/** Indicates capabilities of a type. */
2383
2389
export const enum TypeFlags {
@@ -2403,7 +2409,9 @@ declare module "assemblyscript/src/types" {
2403
2409
/** Is a nullable type. */
2404
2410
NULLABLE = 512 ,
2405
2411
/** Is a vector type. */
2406
- VECTOR = 1024
2412
+ VECTOR = 1024 ,
2413
+ /** Is a host type. */
2414
+ HOST = 2048
2407
2415
}
2408
2416
/** Represents a resolved type. */
2409
2417
export class Type {
@@ -2493,10 +2501,8 @@ declare module "assemblyscript/src/types" {
2493
2501
static readonly f64 : Type ;
2494
2502
/** A 128-bit vector. */
2495
2503
static readonly v128 : Type ;
2496
- /** A host reference. */
2504
+ /** Any host reference. */
2497
2505
static readonly anyref : Type ;
2498
- /** An internal exception reference. */
2499
- static readonly exnref : Type ;
2500
2506
/** No return type. */
2501
2507
static readonly void : Type ;
2502
2508
/** Alias of i32 indicating type inference of locals and globals with just an initializer. */
0 commit comments