@@ -3,7 +3,7 @@ use std::collections::{HashMap, HashSet};
3
3
use wast:: {
4
4
core:: {
5
5
Expression , Func , FuncKind , FunctionType , HeapType , InlineExport , Instruction , ItemKind ,
6
- Local , ModuleField , ModuleKind , RefType , TypeUse , ValType ,
6
+ Local , ModuleField , ModuleKind , RefType , TypeUse , ValType , InnerTypeKind ,
7
7
} ,
8
8
token:: { Id , Index , NameAnnotation } ,
9
9
Wat ,
@@ -114,7 +114,7 @@ pub fn stub_wasi_functions(
114
114
println ! ( "Stubbing function {}::{}" , i. module, i. field) ;
115
115
let typ = & types[ type_index] ;
116
116
let ty = TypeUse :: new_with_index ( Index :: Num ( type_index as u32 , typ. span ) ) ;
117
- let wast:: core:: TypeDef :: Func ( func_typ) = & typ. def else {
117
+ let wast:: core:: TypeDef { kind : InnerTypeKind :: Func ( func_typ) , .. } = & typ. def else {
118
118
continue ;
119
119
} ;
120
120
let id = static_id ( i. item . id ) ;
@@ -136,24 +136,15 @@ pub fn stub_wasi_functions(
136
136
ValType :: Ref ( r) => ValType :: Ref ( RefType {
137
137
nullable : r. nullable ,
138
138
heap : match r. heap {
139
- HeapType :: Func => HeapType :: Func ,
140
- HeapType :: Extern => HeapType :: Extern ,
141
- HeapType :: Any => HeapType :: Any ,
142
- HeapType :: Eq => HeapType :: Eq ,
143
- HeapType :: Struct => HeapType :: Struct ,
144
- HeapType :: Array => HeapType :: Array ,
145
- HeapType :: I31 => HeapType :: I31 ,
146
- HeapType :: NoFunc => HeapType :: NoFunc ,
147
- HeapType :: NoExtern => HeapType :: NoExtern ,
148
- HeapType :: None => HeapType :: None ,
149
- HeapType :: Index ( index) => {
150
- HeapType :: Index ( match index {
139
+ HeapType :: Concrete ( index) => {
140
+ HeapType :: Concrete ( match index {
151
141
Index :: Num ( n, s) => Index :: Num ( n, s) ,
152
142
Index :: Id ( id) => {
153
143
Index :: Id ( static_id ( Some ( id) ) . unwrap ( ) )
154
144
}
155
145
} )
156
146
}
147
+ HeapType :: Abstract { shared, ty } => HeapType :: Abstract { shared, ty } ,
157
148
} ,
158
149
} ) ,
159
150
} ,
@@ -253,6 +244,8 @@ pub fn stub_wasi_functions(
253
244
locals : locals. into_boxed_slice ( ) ,
254
245
expression : Expression {
255
246
instrs : instructions. into_boxed_slice ( ) ,
247
+ branch_hints : Box :: new ( [ ] ) ,
248
+ instr_spans : None ,
256
249
} ,
257
250
} ,
258
251
ty,
0 commit comments