From 7f5bb7ab4c4d44316dc191f17a3cbdf7fb2e6d31 Mon Sep 17 00:00:00 2001 From: Max Graey Date: Sat, 10 Oct 2020 01:01:00 +0300 Subject: Refactor naming convention for functions handling tuples (#3196) When there are two versions of a function, one handling tuples and the other handling non-tuple values, the previous naming convention was to have "Single" in the name of the non-tuple handling function. This PR simplifies the convention and shortens function names by making the names plural for the tuple-handling version and singular for the non-tuple-handling version. --- src/tools/wasm-reduce.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/tools/wasm-reduce.cpp') diff --git a/src/tools/wasm-reduce.cpp b/src/tools/wasm-reduce.cpp index 7a81007dc..bb2de0896 100644 --- a/src/tools/wasm-reduce.cpp +++ b/src/tools/wasm-reduce.cpp @@ -1031,14 +1031,14 @@ struct Reducer } if (curr->type.isTuple()) { Expression* n = - builder->makeConstantExpression(Literal::makeZero(curr->type)); + builder->makeConstantExpression(Literal::makeZeros(curr->type)); return tryToReplaceCurrent(n); } Const* c = builder->makeConst(int32_t(0)); if (tryToReplaceCurrent(c)) { return true; } - c->value = Literal::makeFromInt32(1, curr->type); + c->value = Literal::makeOne(curr->type); c->type = curr->type; return tryToReplaceCurrent(c); } -- cgit v1.2.3