public boolean isEmpty() { return collinstr.isEmpty(); }
public void initSimpleCopy() { if (!stats.isEmpty()) { first = stats.get(0); } }
public void removeLast() { if (!collinstr.isEmpty()) { collinstr.remove(collinstr.size() - 1); } }
@Override public IMatchable findObject(MatchNode matchNode, int index) { int node_type = matchNode.getType(); if (node_type == MatchNode.MATCHNODE_STATEMENT && !this.stats.isEmpty()) { String position = (String)matchNode.getRuleValue(MatchProperties.STATEMENT_POSITION); if (position != null) { if (position.matches("-?\\d+")) { return this.stats.get((this.stats.size() + Integer.parseInt(position)) % this.stats.size()); // care for negative positions } } else if (index < this.stats.size()) { // use 'index' parameter return this.stats.get(index); } } else if (node_type == MatchNode.MATCHNODE_EXPRENT && this.exprents != null && !this.exprents.isEmpty()) { String position = (String)matchNode.getRuleValue(MatchProperties.EXPRENT_POSITION); if (position != null) { if (position.matches("-?\\d+")) { return this.exprents.get((this.exprents.size() + Integer.parseInt(position)) % this.exprents.size()); // care for negative positions } } else if (index < this.exprents.size()) { // use 'index' parameter return this.exprents.get(index); } } return null; }
while (true) { for (Statement st : stat.getStats()) { if ((st.getStats().isEmpty() || st.getExprents() != null) && st.type != Statement.TYPE_BASICBLOCK) { destroyAndFlattenStatement(st); continue outer;
public boolean isEmpty() { return collinstr.isEmpty(); }
public void initSimpleCopy() { if (!stats.isEmpty()) { first = stats.get(0); } }
public void removeLast() { if (!collinstr.isEmpty()) { collinstr.remove(collinstr.size() - 1); } }
public IMatchable findObject(MatchNode matchNode, int index) { int node_type = matchNode.getType(); if (node_type == MatchNode.MATCHNODE_STATEMENT && !this.stats.isEmpty()) { String position = (String)matchNode.getRuleValue(MatchProperties.STATEMENT_POSITION); if(position != null) { if(position.matches("-?\\d+")) { return this.stats.get((this.stats.size() + Integer.parseInt(position)) % this.stats.size()); // care for negative positions } } else if(index < this.stats.size()) { // use 'index' parameter return this.stats.get(index); } } else if(node_type == MatchNode.MATCHNODE_EXPRENT && this.exprents != null && !this.exprents.isEmpty()) { String position = (String)matchNode.getRuleValue(MatchProperties.EXPRENT_POSITION); if(position != null) { if(position.matches("-?\\d+")) { return this.exprents.get((this.exprents.size() + Integer.parseInt(position)) % this.exprents.size()); // care for negative positions } } else if(index < this.exprents.size()) { // use 'index' parameter return this.exprents.get(index); } } return null; }
while (true) { for (Statement st : stat.getStats()) { if ((st.getStats().isEmpty() || st.getExprents() != null) && st.type != Statement.TYPE_BASICBLOCK) { destroyAndFlattenStatement(st); continue outer;