Browse Source

Use IdentityHashMap for parameter Info

kindlich 6 years ago
parent
commit
33f3e6406a
No known key found for this signature in database

+ 2
- 1
JavaShared/src/main/java/org/openzen/zenscript/javashared/JavaCompiledModule.java View File

6
 package org.openzen.zenscript.javashared;
6
 package org.openzen.zenscript.javashared;
7
 
7
 
8
 import java.util.HashMap;
8
 import java.util.HashMap;
9
+import java.util.IdentityHashMap;
9
 import java.util.Map;
10
 import java.util.Map;
10
 import org.openzen.zenscript.codemodel.FunctionParameter;
11
 import org.openzen.zenscript.codemodel.FunctionParameter;
11
 import org.openzen.zenscript.codemodel.HighLevelDefinition;
12
 import org.openzen.zenscript.codemodel.HighLevelDefinition;
34
 	private final Map<IDefinitionMember, JavaField> fields = new HashMap<>();
35
 	private final Map<IDefinitionMember, JavaField> fields = new HashMap<>();
35
 	private final Map<IDefinitionMember, JavaMethod> methods = new HashMap<>();
36
 	private final Map<IDefinitionMember, JavaMethod> methods = new HashMap<>();
36
 	private final Map<TypeParameter, JavaTypeParameterInfo> typeParameters = new HashMap<>();
37
 	private final Map<TypeParameter, JavaTypeParameterInfo> typeParameters = new HashMap<>();
37
-	private final Map<FunctionParameter, JavaParameterInfo> parameters = new HashMap<>();
38
+	private final Map<FunctionParameter, JavaParameterInfo> parameters = new IdentityHashMap<>();
38
 	private final Map<VariantDefinition.Option, JavaVariantOption> variantOptions = new HashMap<>();
39
 	private final Map<VariantDefinition.Option, JavaVariantOption> variantOptions = new HashMap<>();
39
 	
40
 	
40
 	public JavaCompiledModule(Module module, FunctionParameter[] scriptParameters) {
41
 	public JavaCompiledModule(Module module, FunctionParameter[] scriptParameters) {

Loading…
Cancel
Save