isJumpTarget method
Return whether the given line is a jump target.
Implementation
bool isJumpTarget(int lineNum) {
for (int i = 0; i < code.length; i++) {
var op = code[i].op;
if ((op == tac.LineOp.gotoA ||
op == tac.LineOp.gotoAifB ||
op == tac.LineOp.gotoAifNotB ||
op == tac.LineOp.gotoAifTrulyB) &&
code[i].rhsA is ValNumber &&
(code[i].rhsA as ValNumber).intValue() == lineNum) {
return true;
}
}
for (int i = 0; i < jumpPoints.length; i++) {
if (jumpPoints[i].lineNum == lineNum) return true;
}
return false;
}