diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2021-11-22 17:32:08 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-22 17:32:08 -0800 |
commit | 37999167bb333dd0b12d744af8e633897e65cff8 (patch) | |
tree | 4f70902c55b8fcd58c3793368c489111f519da30 /src/wasm-interpreter.h | |
parent | 962ecc84cd12bce59d0b2f969aa71ecafbe38ca6 (diff) | |
download | binaryen-37999167bb333dd0b12d744af8e633897e65cff8.tar.gz binaryen-37999167bb333dd0b12d744af8e633897e65cff8.tar.bz2 binaryen-37999167bb333dd0b12d744af8e633897e65cff8.zip |
Change from storing Signature to HeapType on CallIndirect (#4352)
With nominal function types, this change makes it so that we preserve the
identity of the function type used with call_indirect instructions rather than
recreating a function heap type, which may or may not be the same as the
originally parsed heap type, from the function signature during module writing.
This will simplify the type system implementation by removing the need to store
a "canonical" nominal heap type for each unique signature. We previously
depended on those canonical types to avoid creating multiple duplicate function
types during module writing, but now we aren't creating any new function types
at all.
Diffstat (limited to 'src/wasm-interpreter.h')
-rw-r--r-- | src/wasm-interpreter.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wasm-interpreter.h b/src/wasm-interpreter.h index 7eb13c002..caccef654 100644 --- a/src/wasm-interpreter.h +++ b/src/wasm-interpreter.h @@ -2313,7 +2313,7 @@ public: virtual Literals callImport(Function* import, LiteralList& arguments) = 0; virtual Literals callTable(Name tableName, Index index, - Signature sig, + HeapType sig, LiteralList& arguments, Type result, SubType& instance) = 0; @@ -2770,7 +2770,7 @@ private: auto info = instance.getTableInterfaceInfo(curr->table); Flow ret = info.interface->callTable( - info.name, index, curr->sig, arguments, type, *instance.self()); + info.name, index, curr->heapType, arguments, type, *instance.self()); // TODO: make this a proper tail call (return first) if (curr->isReturn) { |