[PATCH] D111086: [WebAssembly] Remove WasmTagType
Heejin Ahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 4 14:21:30 PDT 2021
aheejin added inline comments.
================
Comment at: lld/wasm/InputFiles.cpp:499
ArrayRef<uint32_t> funcTypes = wasmObj->functionTypes();
+ ArrayRef<uint32_t> tagTypes = wasmObj->tagTypes();
ArrayRef<WasmSignature> types = wasmObj->types();
----------------
sbc100 wrote:
> Why have a separate `tagTypes()` method? Wouldn't be better just add `Type` o `Sig` to `struct WasmTag`?
It's not an inherently property of `Tag` and will become invalidate at linking time. This is the same as how we handle function types now; see one line above.
================
Comment at: llvm/include/llvm/BinaryFormat/Wasm.h:120
union {
uint32_t SigIndex;
WasmGlobalType Global;
----------------
sbc100 wrote:
> So is this element of the union is now be used for tags?
Yes. `Kind` above will be different so there will be no way we don't distinguish functions and tags.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111086/new/
https://reviews.llvm.org/D111086
More information about the llvm-commits
mailing list