src/core/org/luaj/vm2/compiler/LexState.java

Store Integers directly in RESERVED (instead of String): Integer.valueOf(FIRST_RESERVED+i) -> new Integer(FIRST_RESERVED+i)
This commit is contained in:
Fabrice Ducos
2023-04-24 02:02:28 +02:00
parent e54b0c3d57
commit 12ef701595

View File

@@ -170,7 +170,7 @@ public class LexState extends Constants {
static {
for ( int i=0; i<NUM_RESERVED; i++ ) {
LuaString ts = (LuaString) LuaValue.valueOf( luaX_tokens[i] );
RESERVED.put(ts, Integer.valueOf(FIRST_RESERVED+i));
RESERVED.put(ts, new Integer(FIRST_RESERVED+i));
}
}