From 1c40ff9faafed620aa0458b397bcbfbe19e0f663 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 17 Dec 2024 11:23:22 -0300 Subject: Scanner and parser use different tables for constants Moreover, each function being parsed has its own table. The code is cleaner when each table is used for one specific purpose: The scanner uses its table to anchor and unify strings, mapping strings to themselves; the parser uses it to reuse constants in the code, mapping constants to their indices in the constant table. A different table for each task avoids false collisions. --- ltable.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'ltable.h') diff --git a/ltable.h b/ltable.h index e4aa98f0..ca21e692 100644 --- a/ltable.h +++ b/ltable.h @@ -154,8 +154,6 @@ LUAI_FUNC lu_byte luaH_getint (Table *t, lua_Integer key, TValue *res); /* Special get for metamethods */ LUAI_FUNC const TValue *luaH_Hgetshortstr (Table *t, TString *key); -LUAI_FUNC TString *luaH_getstrkey (Table *t, TString *key); - LUAI_FUNC int luaH_psetint (Table *t, lua_Integer key, TValue *val); LUAI_FUNC int luaH_psetshortstr (Table *t, TString *key, TValue *val); LUAI_FUNC int luaH_psetstr (Table *t, TString *key, TValue *val); -- cgit v1.2.3-55-g6feb