summaryrefslogtreecommitdiff
path: root/src/ir/properties.cpp
diff options
context:
space:
mode:
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