File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ impl<'m> Module<'m> {
64
64
// Only keep the sections (i.e. skip the header).
65
65
binary : & binary[ 8 ..] ,
66
66
types : Vec :: new ( ) ,
67
- side_table : & [ ] , // TODO(dev/fast-interp): Parse from binary.
67
+ side_table : SideTableView :: default ( ) ,
68
68
} ;
69
69
if let Some ( mut parser) = module. section ( SectionId :: Type ) {
70
70
for _ in 0 .. parser. parse_vec ( ) . into_ok ( ) {
@@ -183,10 +183,7 @@ impl<'m> Module<'m> {
183
183
184
184
pub ( crate ) fn func ( & self , x : FuncIdx ) -> ( Parser < ' m > , & ' m [ BranchTableEntry ] ) {
185
185
let metadata = Box :: leak ( Box :: new ( self . side_table . metadata ( x as usize ) ) ) ;
186
- (
187
- unsafe { Parser :: new ( & self . binary [ metadata. parser_range ( ) . clone ( ) ] ) } ,
188
- metadata. branch_table ( ) ,
189
- )
186
+ ( unsafe { Parser :: new ( & self . binary [ metadata. parser_range ( ) ] ) } , metadata. branch_table ( ) )
190
187
}
191
188
192
189
pub ( crate ) fn data ( & self , x : DataIdx ) -> Parser < ' m > {
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ impl<'m> Metadata<'m> {
71
71
unsafe {
72
72
core:: slice:: from_raw_parts (
73
73
self . 0 [ 10 ..] . as_ptr ( ) as * const BranchTableEntry ,
74
- self . 0 . len ( ) / entry_size - 1 ,
74
+ ( self . 0 . len ( ) - 10 ) / entry_size ,
75
75
)
76
76
}
77
77
}
You can’t perform that action at this time.
0 commit comments