lstVars = ((CatchAllStatement)stat).getVars();
private static void collectCatchVars(Statement stat, FlattenStatementsHelper flatthelper, Map<String, VarExprent> map) { List<VarExprent> lst = null; if (stat.type == Statement.TYPE_CATCHALL) { CatchAllStatement catchall = (CatchAllStatement)stat; if (!catchall.isFinally()) { lst = catchall.getVars(); } } else if (stat.type == Statement.TYPE_TRYCATCH) { lst = ((CatchStatement)stat).getVars(); } if (lst != null) { for (int i = 1; i < stat.getStats().size(); i++) { map.put(flatthelper.getMapDestinationNodes().get(stat.getStats().get(i).id)[0], lst.get(i - 1)); } } for (Statement st : stat.getStats()) { collectCatchVars(st, flatthelper, map); } }
private void setCatchMaps(Statement stat, DirectGraph dgraph, FlattenStatementsHelper flatthelper) { SFormsFastMapDirect map; switch (stat.type) { case Statement.TYPE_CATCHALL: case Statement.TYPE_TRYCATCH: List<VarExprent> lstVars; if (stat.type == Statement.TYPE_CATCHALL) { lstVars = ((CatchAllStatement)stat).getVars(); } else { lstVars = ((CatchStatement)stat).getVars(); } for (int i = 1; i < stat.getStats().size(); i++) { int varindex = lstVars.get(i - 1).getIndex(); int version = getNextFreeVersion(varindex); // == 1 map = new SFormsFastMapDirect(); setCurrentVar(map, varindex, version); extraVarVersions.put(dgraph.nodes.getWithKey(flatthelper.getMapDestinationNodes().get(stat.getStats().get(i).id)[0]).id, map); } } for (Statement st : stat.getStats()) { setCatchMaps(st, dgraph, flatthelper); } }
lstVars = ((CatchAllStatement)st).getVars();
private void setCatchMaps(Statement stat, DirectGraph dgraph, FlattenStatementsHelper flatthelper) { SFormsFastMapDirect map; switch (stat.type) { case Statement.TYPE_CATCHALL: case Statement.TYPE_TRYCATCH: List<VarExprent> lstVars; if (stat.type == Statement.TYPE_CATCHALL) { lstVars = ((CatchAllStatement)stat).getVars(); } else { lstVars = ((CatchStatement)stat).getVars(); } for (int i = 1; i < stat.getStats().size(); i++) { int varindex = lstVars.get(i - 1).getIndex(); int version = getNextFreeVersion(varindex, stat); // == 1 map = new SFormsFastMapDirect(); setCurrentVar(map, varindex, version); extraVarVersions.put(dgraph.nodes.getWithKey(flatthelper.getMapDestinationNodes().get(stat.getStats().get(i).id)[0]).id, map); //ssuversions.createOrGetNode(new VarVersionPair(varindex, version)); ssuversions.createNode(new VarVersionPair(varindex, version)); } } for (Statement st : stat.getStats()) { setCatchMaps(st, dgraph, flatthelper); } }
lstVars = ((CatchAllStatement)stat).getVars();
private static void collectCatchVars(Statement stat, FlattenStatementsHelper flatthelper, Map<String, VarExprent> map) { List<VarExprent> lst = null; if (stat.type == Statement.TYPE_CATCHALL) { CatchAllStatement catchall = (CatchAllStatement)stat; if (!catchall.isFinally()) { lst = catchall.getVars(); } } else if (stat.type == Statement.TYPE_TRYCATCH) { lst = ((CatchStatement)stat).getVars(); } if (lst != null) { for (int i = 1; i < stat.getStats().size(); i++) { map.put(flatthelper.getMapDestinationNodes().get(stat.getStats().get(i).id)[0], lst.get(i - 1)); } } for (Statement st : stat.getStats()) { collectCatchVars(st, flatthelper, map); } }
private void setCatchMaps(Statement stat, DirectGraph dgraph, FlattenStatementsHelper flatthelper) { SFormsFastMapDirect map; switch (stat.type) { case Statement.TYPE_CATCHALL: case Statement.TYPE_TRYCATCH: List<VarExprent> lstVars; if (stat.type == Statement.TYPE_CATCHALL) { lstVars = ((CatchAllStatement)stat).getVars(); } else { lstVars = ((CatchStatement)stat).getVars(); } for (int i = 1; i < stat.getStats().size(); i++) { int varindex = lstVars.get(i - 1).getIndex(); int version = getNextFreeVersion(varindex); // == 1 map = new SFormsFastMapDirect(); setCurrentVar(map, varindex, version); extraVarVersions.put(dgraph.nodes.getWithKey(flatthelper.getMapDestinationNodes().get(stat.getStats().get(i).id)[0]).id, map); startVars.add(new VarVersionPair(varindex, version)); } } for (Statement st : stat.getStats()) { setCatchMaps(st, dgraph, flatthelper); } }
lstVars = ((CatchAllStatement)st).getVars();
private void setCatchMaps(Statement stat, DirectGraph dgraph, FlattenStatementsHelper flatthelper) { SFormsFastMapDirect map; switch (stat.type) { case Statement.TYPE_CATCHALL: case Statement.TYPE_TRYCATCH: List<VarExprent> lstVars; if (stat.type == Statement.TYPE_CATCHALL) { lstVars = ((CatchAllStatement)stat).getVars(); } else { lstVars = ((CatchStatement)stat).getVars(); } for (int i = 1; i < stat.getStats().size(); i++) { int varindex = lstVars.get(i - 1).getIndex(); int version = getNextFreeVersion(varindex, stat); // == 1 map = new SFormsFastMapDirect(); setCurrentVar(map, varindex, version); extraVarVersions.put(dgraph.nodes.getWithKey(flatthelper.getMapDestinationNodes().get(stat.getStats().get(i).id)[0]).id, map); //ssuversions.createOrGetNode(new VarVersionPair(varindex, version)); ssuversions.createNode(new VarVersionPair(varindex, version)); } } for (Statement st : stat.getStats()) { setCatchMaps(st, dgraph, flatthelper); } }