Skip to content

Commit 3ade8a0

Browse files
committed
fix(wasm): ignore code section in generator
1 parent 1bc7657 commit 3ade8a0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/wasm/WebAssemblyGenerator.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,11 @@ class WebAssemblyGenerator extends Generator {
208208
generate(module) {
209209
const bin = module.originalSource().source();
210210

211+
// FIXME(sven): this module is parsed twice, we could preserve the AST
212+
// from wasm/WebAssemblyParser.js
211213
const ast = decode(bin, {
212-
ignoreDataSection: true
214+
ignoreDataSection: true,
215+
ignoreCodeSection: true
213216
});
214217

215218
const importedGlobals = getImportedGlobals(ast);

0 commit comments

Comments
 (0)