summaryrefslogtreecommitdiff
path: root/src/wasm/wasm.cpp
diff options
context:
space:
mode:
authorMax Graey <maxgraey@gmail.com>2020-10-10 01:01:00 +0300
committerGitHub <noreply@github.com>2020-10-09 15:01:00 -0700
commit7f5bb7ab4c4d44316dc191f17a3cbdf7fb2e6d31 (patch)
tree2d5721e7c670f9ca82987c18a7d0147179c64ad6 /src/wasm/wasm.cpp
parent788974a6bcdd00d5edc3ddaafc70107bc8c37c86 (diff)
downloadbinaryen-7f5bb7ab4c4d44316dc191f17a3cbdf7fb2e6d31.tar.gz
binaryen-7f5bb7ab4c4d44316dc191f17a3cbdf7fb2e6d31.tar.bz2
binaryen-7f5bb7ab4c4d44316dc191f17a3cbdf7fb2e6d31.zip
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.
Diffstat (limited to 'src/wasm/wasm.cpp')
-rw-r--r--src/wasm/wasm.cpp10
1 files changed, 5 insertions, 5 deletions
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<TupleMake>()) {
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)};
}
}