From 484563771dbca78e5323cc3f5129890aea03aed5 Mon Sep 17 00:00:00 2001 From: Thomas Lively <7121787+tlively@users.noreply.github.com> Date: Thu, 11 Mar 2021 13:53:19 -0800 Subject: Remove LUB calculation (#3669) Since correct LUB calculation for recursive types is complicated, stop depending on LUBs throughout the code base. This also fixes a validation bug in which the validator required blocks to be typed with the LUB of all the branch types, when in fact any upper bound should have been valid. In addition to fixing that bug, this PR simplifies the code for break handling by not storing redundant information about the arity of types. --- src/ir/stack-utils.h | 7 ------- 1 file changed, 7 deletions(-) (limited to 'src/ir/stack-utils.h') diff --git a/src/ir/stack-utils.h b/src/ir/stack-utils.h index aad13f7f0..0c05381db 100644 --- a/src/ir/stack-utils.h +++ b/src/ir/stack-utils.h @@ -166,13 +166,6 @@ struct StackSignature { // other stack signature. This corresponds to the `unreachable` instruction // being able to be given any stack signature. static bool isSubType(StackSignature a, StackSignature b); - - // Returns true iff `a` and `b` have a LUB, i.e. a minimal StackSignature that - // could type block contents of either type `a` or type `b`. - static bool haveLeastUpperBound(StackSignature a, StackSignature b); - - // Returns the LUB of `a` and `b`. Assumes that the LUB exists. - static StackSignature getLeastUpperBound(StackSignature a, StackSignature b); }; // Calculates stack machine data flow, associating the sources and destinations -- cgit v1.2.3