[PATCH] D104945: [WebAssembly] Added initial type checker to MC Assembler

Derek Schuff via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 9 11:14:33 PDT 2021


dschuff accepted this revision.
dschuff added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp:1156
+      if (PopType(ErrorLoc, wasm::ValType::I32)) return true;
+      if (CheckSig(ErrorLoc, LastSig)) return true;
+    } else if (Name == "call" || Name == "return_call") {
----------------
aardappel wrote:
> dschuff wrote:
> > Is this right? function signatures for indirect calls aren't checked until runtime?
> I'm not sure what you're asking. For the assembler, the instruction specifies a signature inline, so it is checked against the stack at.. assembly time. For Wasm in general, the i32 on the stack can be any old integer, and thus, any function with any signature, so that is checked at runtime.
oh right, this checks the function as called, not as declared.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104945/new/

https://reviews.llvm.org/D104945



More information about the llvm-commits mailing list