From 0abc9ce8e9676c95f7ff572529eebf3018179dad Mon Sep 17 00:00:00 2001 From: Thomas Lively <7121787+tlively@users.noreply.github.com> Date: Tue, 10 Mar 2020 18:52:50 -0700 Subject: Update Precompute to handle tuples (#2687) This involves replacing `Literal::makeZero` with `Literal::makeZeroes` and `Literal::makeSingleZero` and updating `isConstantExpression` to handle constant tuples as well. Also makes `Literals` its own struct and adds convenience methods on it. --- src/dataflow/graph.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/dataflow') diff --git a/src/dataflow/graph.h b/src/dataflow/graph.h index 02679995b..6a984ad72 100644 --- a/src/dataflow/graph.h +++ b/src/dataflow/graph.h @@ -157,7 +157,9 @@ struct Graph : public UnifiedExpressionVisitor { return ret; } - Node* makeZero(wasm::Type type) { return makeConst(Literal::makeZero(type)); } + Node* makeZero(wasm::Type type) { + return makeConst(Literal::makeSingleZero(type)); + } // Add a new node to our list of owned nodes. Node* addNode(Node* node) { -- cgit v1.2.3