diff options
author | Alon Zakai <azakai@google.com> | 2021-09-09 16:43:49 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-09 23:43:49 +0000 |
commit | 7ecc77a11a7844e4b8142fad0a718d4f8f4d193b (patch) | |
tree | 23876c2e4a247b97ae2496afc26c3fc0fe2f9356 /src/ir/properties.cpp | |
parent | 0bc719505457acc1a92894b3995ce233fb0cdb20 (diff) | |
download | binaryen-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.cpp | 14 |
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 |