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/wasm/wasm.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/wasm/wasm.cpp') diff --git a/src/wasm/wasm.cpp b/src/wasm/wasm.cpp index dce6ac7de..2052afa89 100644 --- a/src/wasm/wasm.cpp +++ b/src/wasm/wasm.cpp @@ -239,11 +239,11 @@ const char* getExpressionName(Expression* curr) { WASM_UNREACHABLE("invalid expr id"); } -Literal getSingleLiteralFromConstExpression(Expression* curr) { - // TODO: Do we need this function given that Properties::getSingleLiteral +Literal getLiteralFromConstExpression(Expression* curr) { + // TODO: Do we need this function given that Properties::getLiteral // (currently) does the same? assert(Properties::isConstantExpression(curr)); - return Properties::getSingleLiteral(curr); + return Properties::getLiteral(curr); } Literals getLiteralsFromConstExpression(Expression* curr) { @@ -252,11 +252,11 @@ Literals getLiteralsFromConstExpression(Expression* curr) { if (auto* t = curr->dynCast()) { Literals values; for (auto* operand : t->operands) { - values.push_back(getSingleLiteralFromConstExpression(operand)); + values.push_back(getLiteralFromConstExpression(operand)); } return values; } else { - return {getSingleLiteralFromConstExpression(curr)}; + return {getLiteralFromConstExpression(curr)}; } } -- cgit v1.2.3