mirror of
https://github.com/exoticorn/curlywas.git
synced 2026-01-20 11:46:43 +01:00
only emit global section when not empty
This commit is contained in:
@@ -112,7 +112,9 @@ pub fn emit(script: &ast::Script) -> Vec<u8> {
|
||||
}
|
||||
|
||||
module.section(&functions);
|
||||
module.section(&global_section);
|
||||
if !script.global_vars.is_empty() {
|
||||
module.section(&global_section);
|
||||
}
|
||||
module.section(&exports);
|
||||
module.section(&code);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user