From 8ec8a0bbfb039852b60f121fb23c439228b9fe36 Mon Sep 17 00:00:00 2001 From: Thomas Lively <7121787+tlively@users.noreply.github.com> Date: Fri, 11 Sep 2020 13:34:01 -0700 Subject: Update Pop text format to handle tuples (#3116) Previously Pops were printed as ({type}.pop), and if the popped type was a tuple, something like ((i32, i64).pop) would get printed. However, the parser didn't support pops of anything besides single basic types. This PR changes the text format to be (pop *) and adds support for parsing pops of tuples of basic types. The text format change is designed to make parsing simpler. This change is necessary for writing Poppy IR tests (see #3059) that contain break or return instructions that consume multiple values, since in Poppy IR that requires tuple-typed pops. --- src/wasm-s-parser.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/wasm-s-parser.h') diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h index d77062e33..a4559012d 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -217,7 +217,7 @@ private: Expression* makeMemoryCopy(Element& s); Expression* makeMemoryFill(Element& s); Expression* makePush(Element& s); - Expression* makePop(Type type); + Expression* makePop(Element& s); Expression* makeIf(Element& s); Expression* makeMaybeBlock(Element& s, size_t i, Type type); Expression* makeLoop(Element& s); -- cgit v1.2.3