From 609d378038b196468fed5cb4ae68b67743dfe63f Mon Sep 17 00:00:00 2001 From: Thomas Lively <7121787+tlively@users.noreply.github.com> Date: Wed, 3 Aug 2022 09:20:30 -0700 Subject: 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. --- src/wasm-binary.h | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'src/wasm-binary.h') 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 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 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); -- cgit v1.2.3