From e46d3038679064aa078e48a939edece64c95fa61 Mon Sep 17 00:00:00 2001 From: jochen Date: Thu, 17 Jun 1999 11:05:08 +0000 Subject: [PATCH] fillDeclarables git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@853 379699f6-c40d-0410-875b-85095c16579e --- jode/jode/expr/Operator.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/jode/jode/expr/Operator.java b/jode/jode/expr/Operator.java index 3154417..0cd51dd 100644 --- a/jode/jode/expr/Operator.java +++ b/jode/jode/expr/Operator.java @@ -23,6 +23,12 @@ import jode.GlobalOptions; import jode.decompiler.TabbedPrintWriter; import jode.flow.VariableSet; +///#ifdef JDK12 +///import java.util.Set; +///#else +import jode.util.SimpleSet; +///#endif + public abstract class Operator extends Expression { public final static int ADD_OP = 1; public final static int SUB_OP = 2; @@ -169,6 +175,18 @@ public abstract class Operator extends Expression { subExpressions[i].fillInGenSet(in,gen); } +///#ifdef JDK12 +/// public void fillDeclarables(Set used) { +///#else + public void fillDeclarables(SimpleSet used) { +///#endif + if (this instanceof LocalVarOperator) { + used.add(((LocalVarOperator) this).getLocalInfo()); + } + for (int i=0; i< subExpressions.length; i++) + subExpressions[i].fillDeclarables(used); + } + /** * Checks if the value of the given expression can change, due to * side effects in this expression. If this returns false, the