use of lucee.transformer.bytecode.statement.FlowControlContinue in project Lucee by lucee.
the class ASMUtil method getAncestorFCStatement.
private static FlowControl getAncestorFCStatement(Statement stat, List<FlowControlFinal> finallyLabels, int flowType, String label) {
Statement parent = stat;
FlowControlFinal fcf;
while (true) {
parent = parent.getParent();
if (parent == null)
return null;
if (((flowType == FlowControl.RETRY && parent instanceof FlowControlRetry) || (flowType == FlowControl.CONTINUE && parent instanceof FlowControlContinue) || (flowType == FlowControl.BREAK && parent instanceof FlowControlBreak)) && labelMatch((FlowControl) parent, label)) {
if (parent instanceof ScriptBody) {
List<FlowControlFinal> _finallyLabels = finallyLabels == null ? null : new ArrayList<FlowControlFinal>();
FlowControl scriptBodyParent = getAncestorFCStatement(parent, _finallyLabels, flowType, label);
if (scriptBodyParent != null) {
if (finallyLabels != null) {
Iterator<FlowControlFinal> it = _finallyLabels.iterator();
while (it.hasNext()) {
finallyLabels.add(it.next());
}
}
return scriptBodyParent;
}
return (FlowControl) parent;
}
return (FlowControl) parent;
}
// only if not last
if (finallyLabels != null) {
fcf = parent.getFlowControlFinal();
if (fcf != null) {
finallyLabels.add(fcf);
}
}
}
}
Aggregations