src/core/org/luaj/vm2/compiler/FuncState.java:

Store Integers directly in h (instead of String): this.h.put(v, Integer.valueOf(idx)) -> this.h.put(v, new Integer(idx))
This commit is contained in:
Fabrice Ducos
2023-04-24 02:01:16 +02:00
parent 91735791f0
commit e54b0c3d57

View File

@@ -479,7 +479,7 @@ public class FuncState extends Constants {
return ((Integer) h.get(v)).intValue(); return ((Integer) h.get(v)).intValue();
} }
final int idx = this.nk; final int idx = this.nk;
this.h.put(v, Integer.valueOf(idx)); this.h.put(v, new Integer(idx));
final Prototype f = this.f; final Prototype f = this.f;
if (f.k == null || nk + 1 >= f.k.length) if (f.k == null || nk + 1 >= f.k.length)
f.k = realloc( f.k, nk*2 + 1 ); f.k = realloc( f.k, nk*2 + 1 );