FIX discard unused signals

This commit is contained in:
Jordi Baylina
2020-11-21 23:01:57 +01:00
parent 42162b10c1
commit 6c48e9ba01
2 changed files with 22 additions and 11 deletions

View File

@@ -428,10 +428,17 @@ function execAssignement(ctx, ast) {
}
// Skip if an out is assigned directly to an input.
if ((!isIn)||(!isOut)) {
sDest.e = sIdx;
} else {
if (utils.isDefined(sSrc.v)) sDest.v = sSrc.v;
if (!(isIn&&isOut)) {
if (isIn) {
sDest.e = sIdx;
} else if (isOut) {
sSrc.e = dIdx;
} else {
sDest.e = sIdx;
}
if (!isOut) {
if (utils.isDefined(sSrc.v)) sDest.v = sSrc.v;
}
}
}
}