High Removed array
Jordi Baylina jordi@baylina.cat
Sat, 19 Sep 2020 18:36:35 +0200
1 files changed,
6 insertions(+),
2 deletions(-)
jump to
M
src/compiler.js
→
src/compiler.js
@@ -340,6 +340,7 @@ }
possibleConstraints[i] = ctx.constraints.length - i -1; } + let totalRemoved = 0; while (possibleConstraints.length >0) { if (possibleConstraints.length>1<<20) { nextPossibleConstraints = new BigArray();@@ -359,7 +360,7 @@ const c = ctx.constraints[possibleConstraints[i]];
if (!c) continue; // Limit of number of lelements removed per step - if (nRemoved>500000) { + if (nRemoved>5000000) { nextPossibleConstraints[possibleConstraints[i]] = true; continue; }@@ -409,7 +410,7 @@ delete lIdx[isolatedSignal];
const cts = Object.keys(sig2constraint[isolatedSignal]); for (let k=0; k<cts.length; k++) { - nextPossibleConstraints[cts[k]] = true; + if (ctx.constraints[cts[k]]) nextPossibleConstraints[cts[k]] = true; } } }@@ -464,6 +465,9 @@ possibleConstraints[i] = nextPossibleConstraints[nextPossibleConstraints.length -1 -i];
} */ possibleConstraints = nextPossibleConstraints; + + totalRemoved += nRemoved; + if (ctx.verbose) console.log(`Removed: ${totalRemoved} TotalConstraints: ${ctx.constraints.length}` ); }