This commit is contained in:
parent
26bbbafc0a
commit
e39da85f61
@ -17,7 +17,7 @@
|
||||
import java.util.Collections;
|
||||
-import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
+import java.util.LinkedHashMap;
|
||||
+import java.util.TreeMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@ -26,19 +26,19 @@
|
||||
copy.clazzScope = clazzScope;
|
||||
if (declaredVariables.size() > 0) {
|
||||
- copy.declaredVariables = new HashMap<String, Variable>();
|
||||
+ copy.declaredVariables = new LinkedHashMap<String, Variable>();
|
||||
+ copy.declaredVariables = new TreeMap<String, Variable>();
|
||||
copy.declaredVariables.putAll(declaredVariables);
|
||||
}
|
||||
copy.inStaticContext = inStaticContext;
|
||||
copy.parent = parent;
|
||||
if (referencedClassVariables.size() > 0) {
|
||||
- copy.referencedClassVariables = new HashMap<String, Variable>();
|
||||
+ copy.referencedClassVariables = new LinkedHashMap<String, Variable>();
|
||||
+ copy.referencedClassVariables = new TreeMap<String, Variable>();
|
||||
copy.referencedClassVariables.putAll(referencedClassVariables);
|
||||
}
|
||||
if (referencedLocalVariables.size() > 0) {
|
||||
- copy.referencedLocalVariables = new HashMap<String, Variable>();
|
||||
+ copy.referencedLocalVariables = new LinkedHashMap<String, Variable>();
|
||||
+ copy.referencedLocalVariables = new TreeMap<String, Variable>();
|
||||
copy.referencedLocalVariables.putAll(referencedLocalVariables);
|
||||
}
|
||||
copy.resolvesDynamic = resolvesDynamic;
|
||||
@ -47,7 +47,7 @@
|
||||
public void putDeclaredVariable(Variable var) {
|
||||
if (declaredVariables == Collections.EMPTY_MAP)
|
||||
- declaredVariables = new HashMap<String, Variable>();
|
||||
+ declaredVariables = new LinkedHashMap<String, Variable>();
|
||||
+ declaredVariables = new TreeMap<String, Variable>();
|
||||
declaredVariables.put(var.getName(), var);
|
||||
}
|
||||
|
||||
@ -56,14 +56,14 @@
|
||||
public void putReferencedLocalVariable(Variable var) {
|
||||
if (referencedLocalVariables == Collections.EMPTY_MAP)
|
||||
- referencedLocalVariables = new HashMap<String, Variable>();
|
||||
+ referencedLocalVariables = new LinkedHashMap<String, Variable>();
|
||||
+ referencedLocalVariables = new TreeMap<String, Variable>();
|
||||
referencedLocalVariables.put(var.getName(), var);
|
||||
}
|
||||
|
||||
public void putReferencedClassVariable(Variable var) {
|
||||
if (referencedClassVariables == Collections.EMPTY_MAP)
|
||||
- referencedClassVariables = new HashMap<String, Variable>();
|
||||
+ referencedClassVariables = new LinkedHashMap<String, Variable>();
|
||||
+ referencedClassVariables = new TreeMap<String, Variable>();
|
||||
referencedClassVariables.put(var.getName(), var);
|
||||
}
|
||||
|
||||
@ -74,7 +74,7 @@
|
||||
private Map<Class<? extends ASTTransformation>, ASTTransformation> transformInstances;
|
||||
private static CompilationUnit compUnit;
|
||||
- private static Set<String> globalTransformNames = new HashSet<String>();
|
||||
+ private static Set<String> globalTransformNames = new LinkedHashSet<String>();
|
||||
+ private static Set<String> globalTransformNames = new TreeSet<String>();
|
||||
|
||||
private ASTTransformationVisitor(CompilePhase phase) {
|
||||
this.phase = phase;
|
||||
@ -85,7 +85,7 @@
|
||||
|
||||
import java.util.Arrays;
|
||||
-import java.util.HashSet;
|
||||
+import java.util.LinkedHashSet;
|
||||
+import java.util.TreeSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
@ -94,7 +94,7 @@
|
||||
|
||||
final LinkedList<Set<String>> varStack = new LinkedList<Set<String>>();
|
||||
- Set<String> names = new HashSet<String>();
|
||||
+ Set<String> names = new LinkedHashSet<String>();
|
||||
+ Set<String> names = new TreeSet<String>();
|
||||
for (FieldNode field : parent.getFields()) {
|
||||
names.add(field.getName());
|
||||
}
|
||||
@ -103,7 +103,7 @@
|
||||
|
||||
private void addVariablesToStack(Parameter[] params) {
|
||||
- Set<String> names = new HashSet<String>();
|
||||
+ Set<String> names = new LinkedHashSet<String>();
|
||||
+ Set<String> names = new TreeSet<String>();
|
||||
names.addAll(varStack.getLast());
|
||||
for (Parameter param : params) {
|
||||
names.add(param.getName());
|
||||
@ -112,7 +112,7 @@
|
||||
@Override
|
||||
public void visitBlockStatement(BlockStatement block) {
|
||||
- Set<String> names = new HashSet<String>();
|
||||
+ Set<String> names = new LinkedHashSet<String>();
|
||||
+ Set<String> names = new TreeSet<String>();
|
||||
names.addAll(varStack.getLast());
|
||||
varStack.add(names);
|
||||
super.visitBlockStatement(block);
|
||||
|
Loading…
x
Reference in New Issue
Block a user