summaryrefslogtreecommitdiff
path: root/src/ir/properties.cpp
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2021-09-09 16:43:49 -0700
committerGitHub <noreply@github.com>2021-09-09 23:43:49 +0000
commit7ecc77a11a7844e4b8142fad0a718d4f8f4d193b (patch)
tree23876c2e4a247b97ae2496afc26c3fc0fe2f9356 /src/ir/properties.cpp
parent0bc719505457acc1a92894b3995ce233fb0cdb20 (diff)
downloadbinaryen-7ecc77a11a7844e4b8142fad0a718d4f8f4d193b.tar.gz
binaryen-7ecc77a11a7844e4b8142fad0a718d4f8f4d193b.tar.bz2
binaryen-7ecc77a11a7844e4b8142fad0a718d4f8f4d193b.zip
Rename isIntrinsicallyNondeterministic() to isGenerative() (#4092)
Diffstat (limited to 'src/ir/properties.cpp')
-rw-r--r--src/ir/properties.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/ir/properties.cpp b/src/ir/properties.cpp
index 889ece57b..fa4f299b3 100644
--- a/src/ir/properties.cpp
+++ b/src/ir/properties.cpp
@@ -21,20 +21,20 @@ namespace wasm {
namespace Properties {
-bool isIntrinsicallyNondeterministic(Expression* curr, FeatureSet features) {
- // Practically no wasm instructions are intrinsically nondeterministic.
- // Exceptions occur only in GC atm.
+bool isGenerative(Expression* curr, FeatureSet features) {
+ // Practically no wasm instructions are generative. Exceptions occur only in
+ // GC atm.
if (!features.hasGC()) {
return false;
}
struct Scanner : public PostWalker<Scanner> {
- bool deterministic = true;
- void visitStructNew(StructNew* curr) { deterministic = false; }
- void visitArrayNew(ArrayNew* curr) { deterministic = false; }
+ bool generative = false;
+ void visitStructNew(StructNew* curr) { generative = true; }
+ void visitArrayNew(ArrayNew* curr) { generative = true; }
} scanner;
scanner.walk(curr);
- return !scanner.deterministic;
+ return scanner.generative;
}
} // namespace Properties