@@ -390,6 +390,7 @@ impl EngineOrModuleTypeIndex {
390
390
pub enum WasmHeapType {
391
391
// External types.
392
392
Extern ,
393
+ NoExtern ,
393
394
394
395
// Function types.
395
396
Func ,
@@ -398,6 +399,7 @@ pub enum WasmHeapType {
398
399
399
400
// Internal types.
400
401
Any ,
402
+ Eq ,
401
403
I31 ,
402
404
Array ,
403
405
ConcreteArray ( EngineOrModuleTypeIndex ) ,
@@ -421,10 +423,12 @@ impl fmt::Display for WasmHeapType {
421
423
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
422
424
match self {
423
425
Self :: Extern => write ! ( f, "extern" ) ,
426
+ Self :: NoExtern => write ! ( f, "noextern" ) ,
424
427
Self :: Func => write ! ( f, "func" ) ,
425
428
Self :: ConcreteFunc ( i) => write ! ( f, "func {i}" ) ,
426
429
Self :: NoFunc => write ! ( f, "nofunc" ) ,
427
430
Self :: Any => write ! ( f, "any" ) ,
431
+ Self :: Eq => write ! ( f, "eq" ) ,
428
432
Self :: I31 => write ! ( f, "i31" ) ,
429
433
Self :: Array => write ! ( f, "array" ) ,
430
434
Self :: ConcreteArray ( i) => write ! ( f, "array {i}" ) ,
@@ -489,13 +493,14 @@ impl WasmHeapType {
489
493
#[ inline]
490
494
pub fn top ( & self ) -> WasmHeapTopType {
491
495
match self {
492
- WasmHeapType :: Extern => WasmHeapTopType :: Extern ,
496
+ WasmHeapType :: Extern | WasmHeapType :: NoExtern => WasmHeapTopType :: Extern ,
493
497
494
498
WasmHeapType :: Func | WasmHeapType :: ConcreteFunc ( _) | WasmHeapType :: NoFunc => {
495
499
WasmHeapTopType :: Func
496
500
}
497
501
498
502
WasmHeapType :: Any
503
+ | WasmHeapType :: Eq
499
504
| WasmHeapType :: I31
500
505
| WasmHeapType :: Array
501
506
| WasmHeapType :: ConcreteArray ( _)
@@ -1541,19 +1546,18 @@ pub trait TypeConvert {
1541
1546
fn convert_heap_type ( & self , ty : wasmparser:: HeapType ) -> WasmHeapType {
1542
1547
match ty {
1543
1548
wasmparser:: HeapType :: Extern => WasmHeapType :: Extern ,
1549
+ wasmparser:: HeapType :: NoExtern => WasmHeapType :: NoExtern ,
1544
1550
wasmparser:: HeapType :: Func => WasmHeapType :: Func ,
1545
1551
wasmparser:: HeapType :: NoFunc => WasmHeapType :: NoFunc ,
1546
1552
wasmparser:: HeapType :: Concrete ( i) => self . lookup_heap_type ( i) ,
1547
1553
wasmparser:: HeapType :: Any => WasmHeapType :: Any ,
1554
+ wasmparser:: HeapType :: Eq => WasmHeapType :: Eq ,
1548
1555
wasmparser:: HeapType :: I31 => WasmHeapType :: I31 ,
1549
1556
wasmparser:: HeapType :: Array => WasmHeapType :: Array ,
1550
1557
wasmparser:: HeapType :: Struct => WasmHeapType :: Struct ,
1551
1558
wasmparser:: HeapType :: None => WasmHeapType :: None ,
1552
1559
1553
- wasmparser:: HeapType :: Exn
1554
- | wasmparser:: HeapType :: NoExn
1555
- | wasmparser:: HeapType :: NoExtern
1556
- | wasmparser:: HeapType :: Eq => {
1560
+ wasmparser:: HeapType :: Exn | wasmparser:: HeapType :: NoExn => {
1557
1561
unimplemented ! ( "unsupported heap type {ty:?}" ) ;
1558
1562
}
1559
1563
}
0 commit comments