aboutsummaryrefslogtreecommitdiff
path: root/test/ufuzz
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2021-04-24 00:17:30 +0100
committerGitHub <noreply@github.com>2021-04-24 07:17:30 +0800
commit9b8deff64d957b2804082572340cdd8175eff731 (patch)
treed3019c1d4375f1e29585f3d505e7d20f37008767 /test/ufuzz
parentf46209b7e5ecb33d9596fb946975be5f65c0b727 (diff)
downloadtracifyjs-9b8deff64d957b2804082572340cdd8175eff731.tar.gz
tracifyjs-9b8deff64d957b2804082572340cdd8175eff731.zip
enhance `pure_getters`, `reduce_vars` & `unused` (#4863)
Diffstat (limited to 'test/ufuzz')
-rw-r--r--test/ufuzz/index.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/ufuzz/index.js b/test/ufuzz/index.js
index 7210c6b2..b3650fa5 100644
--- a/test/ufuzz/index.js
+++ b/test/ufuzz/index.js
@@ -445,9 +445,9 @@ function addTrailingComma(list) {
function createParams(was_async, was_generator, noDuplicate) {
var save_async = async;
- if (was_async) async = true;
+ if (!async) async = was_async;
var save_generator = generator;
- if (was_generator) generator = true;
+ if (!generator) generator = was_generator;
var len = unique_vars.length;
var params = [];
for (var n = rng(4); --n >= 0;) {
@@ -569,9 +569,9 @@ function createAssignmentPairs(recurmax, stmtDepth, canThrow, nameLenBefore, was
function createName() {
unique_vars.push("a", "b", "c", "undefined", "NaN", "Infinity");
var save_async = async;
- if (was_async) async = true;
+ if (!async) async = was_async;
var save_generator = generator;
- if (was_generator) generator = true;
+ if (!generator) generator = was_generator;
var name = createVarName(MANDATORY);
generator = save_generator;
async = save_async;