Skip to content
Snippets Groups Projects
Commit cfe01405 authored by Jan Gruteser's avatar Jan Gruteser
Browse files

remove unused fields in PrimedVariablesFinder

parent 01917b5b
No related branches found
No related tags found
No related merge requests found
......@@ -339,13 +339,10 @@ public class BOperation extends BuiltInOPs implements ASTConstants, ToolGlobals,
class PrimedVariablesFinder extends AbstractASTVisitor {
private final Set<SymbolNode> all;
private final Set<SymbolNode> twiceUsedVariables;
private final Hashtable<SemanticNode, Set<SymbolNode>> table;
private Set<SymbolNode> currentSet;
public PrimedVariablesFinder(List<ExprOrOpArgNode> list) {
this.all = new HashSet<>();
this.twiceUsedVariables = new HashSet<>();
this.table = new Hashtable<>();
for (ExprOrOpArgNode exprOrOpArgNode : list) {
findPrimedVariables(exprOrOpArgNode);
......@@ -353,9 +350,7 @@ class PrimedVariablesFinder extends AbstractASTVisitor {
}
public void findPrimedVariables(ExprOrOpArgNode n) {
currentSet = new HashSet<>();
this.visitExprOrOpArgNode(n);
table.put(n, currentSet);
}
public void visitBuiltInNode(OpApplNode n) {
......@@ -364,8 +359,6 @@ class PrimedVariablesFinder extends AbstractASTVisitor {
OpApplNode varNode = (OpApplNode) n.getArgs()[0];
SymbolNode var = varNode.getOperator();
currentSet.add(var);
if (all.contains(var)) {
twiceUsedVariables.add(var);
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment