diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-06-03 16:31:49 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-06-03 16:31:49 -0700 |
commit | b6668d8ca5b08bdf69f057ecdc6ad8a588429761 (patch) | |
tree | 95f138f1c4e1681ee9d747ac57189b2cd438c51f /src/asm2wasm.h | |
parent | c8ec0cd6c053f9e68daf4ba4fdf8137957c1b236 (diff) | |
download | binaryen-b6668d8ca5b08bdf69f057ecdc6ad8a588429761.tar.gz binaryen-b6668d8ca5b08bdf69f057ecdc6ad8a588429761.tar.bz2 binaryen-b6668d8ca5b08bdf69f057ecdc6ad8a588429761.zip |
make call_indirect type a name, so that it is not a dependency on the module, which would break consistency and make some parallel passes tricky (#568)
Diffstat (limited to 'src/asm2wasm.h')
-rw-r--r-- | src/asm2wasm.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/asm2wasm.h b/src/asm2wasm.h index 5f6cee558..fa83a9cd2 100644 --- a/src/asm2wasm.h +++ b/src/asm2wasm.h @@ -1367,8 +1367,9 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { for (unsigned i = 0; i < args->size(); i++) { ret->operands.push_back(process(args[i])); } - ret->fullType = getFunctionType(astStackHelper.getParent(), ret->operands); - ret->type = ret->fullType->result; + auto* fullType = getFunctionType(astStackHelper.getParent(), ret->operands); + ret->fullType = fullType->name; + ret->type = fullType->result; callIndirects[ret] = target[1][1]->getIString(); // we need to fix this up later, when we know how asm function tables are layed out inside the wasm table. return ret; } else if (what == RETURN) { |