summaryrefslogtreecommitdiff
path: root/src/tools/fuzzing.h
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/tools/fuzzing.h
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/tools/fuzzing.h')
-rw-r--r--src/tools/fuzzing.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tools/fuzzing.h b/src/tools/fuzzing.h
index 475747056..ec22d306a 100644
--- a/src/tools/fuzzing.h
+++ b/src/tools/fuzzing.h
@@ -1573,10 +1573,10 @@ private:
// +- 1
switch (upTo(5)) {
case 0:
- value = value.add(Literal::makeFromInt32(-1, type));
+ value = value.add(Literal::makeNegOne(type));
break;
case 1:
- value = value.add(Literal::makeFromInt32(1, type));
+ value = value.add(Literal::makeOne(type));
break;
default: {
}
@@ -1595,7 +1595,7 @@ private:
}
// Flip sign.
if (oneIn(2)) {
- value = value.mul(Literal::makeFromInt32(-1, type));
+ value = value.mul(Literal::makeNegOne(type));
}
return value;
};