Remove entries for tables with no elements
This commit is contained in:
parent
cdefb2f06a
commit
bdfede0b93
@ -11,6 +11,10 @@ struct Visit {
|
||||
|
||||
impl Visitor for Visit {
|
||||
fn visit_br_table(&mut self, table: &BrTable) {
|
||||
if table.data().is_empty() {
|
||||
return;
|
||||
}
|
||||
|
||||
let id = table as *const _ as usize;
|
||||
let len = self.id_map.len() + 1;
|
||||
|
||||
|
@ -20,10 +20,15 @@ impl Visitor for Visit {
|
||||
}
|
||||
|
||||
fn visit_br_table(&mut self, table: &BrTable) {
|
||||
self.has_branch = true;
|
||||
|
||||
if table.data().is_empty() {
|
||||
return;
|
||||
}
|
||||
|
||||
let id = table as *const _ as usize;
|
||||
let len = self.br_map.len() + 1;
|
||||
|
||||
self.has_branch = true;
|
||||
self.br_map.insert(id, len);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user