diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2022-08-03 09:20:30 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-03 09:20:30 -0700 |
commit | 609d378038b196468fed5cb4ae68b67743dfe63f (patch) | |
tree | 0c3f46db0ad8eae4a67ab5d13913d06bab7efe5c /src/wasm-binary.h | |
parent | 3d3350d789d909445c8d8d03545c50bc0ae416ef (diff) | |
download | binaryen-609d378038b196468fed5cb4ae68b67743dfe63f.tar.gz binaryen-609d378038b196468fed5cb4ae68b67743dfe63f.tar.bz2 binaryen-609d378038b196468fed5cb4ae68b67743dfe63f.zip |
Remove support for parsing `let` (#4864)
It has been removed from the typed function references proposal, so we no longer
need to support it. Maintaining the test for `let` was difficult because
Binaryen could not emit either text or binary that actually used it.
Diffstat (limited to 'src/wasm-binary.h')
-rw-r--r-- | src/wasm-binary.h | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/src/wasm-binary.h b/src/wasm-binary.h index a866881f5..200252da7 100644 --- a/src/wasm-binary.h +++ b/src/wasm-binary.h @@ -1085,7 +1085,6 @@ enum ASTNodes { CallRef = 0x14, RetCallRef = 0x15, - Let = 0x17, // gc opcodes @@ -1585,29 +1584,6 @@ public: std::vector<Expression*> expressionStack; - // Each let block in the binary adds new locals to the bottom of the index - // space. That is, all previously-existing indexes are bumped to higher - // indexes. getAbsoluteLocalIndex does this computation. - // Note that we must track not just the number of locals added in each let, - // but also the absolute index from which they were allocated, as binaryen - // will add new locals as it goes for things like stacky code and tuples (so - // there isn't a simple way to get to the absolute index from a relative one). - // Hence each entry here is a pair of the number of items, and the absolute - // index they begin at. - struct LetData { - // How many items are defined in this let. - Index num; - // The absolute index from which they are allocated from. That is, if num is - // 5 and absoluteStart is 10, then we use indexes 10-14. - Index absoluteStart; - }; - std::vector<LetData> letStack; - - // Given a relative index of a local (the one used in the wasm binary), get - // the absolute one which takes into account lets, and is the one used in - // Binaryen IR. - Index getAbsoluteLocalIndex(Index index); - // Control flow structure parsing: these have not just the normal binary // data for an instruction, but also some bytes later on like "end" or "else". // We must be aware of the connection between those things, for debug info. @@ -1774,8 +1750,6 @@ public: void visitRethrow(Rethrow* curr); void visitCallRef(CallRef* curr); void visitRefAs(RefAs* curr, uint8_t code); - // Let is lowered into a block. - void visitLet(Block* curr); [[noreturn]] void throwError(std::string text); |