Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/mit/lua/dist/src lua: apply upstream bugfix for "Lu...



details:   https://anonhg.NetBSD.org/src/rev/95cd3529b968
branches:  trunk
changeset: 374295:95cd3529b968
user:      nikita <nikita%NetBSD.org@localhost>
date:      Mon Apr 17 19:17:49 2023 +0000

description:
lua: apply upstream bugfix for "Lua can generate wrong code when _ENV is <const>."

diffstat:

 external/mit/lua/dist/src/lparser.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (17 lines):

diff -r 16af994063c7 -r 95cd3529b968 external/mit/lua/dist/src/lparser.c
--- a/external/mit/lua/dist/src/lparser.c       Mon Apr 17 19:16:38 2023 +0000
+++ b/external/mit/lua/dist/src/lparser.c       Mon Apr 17 19:17:49 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lparser.c,v 1.12 2023/04/16 20:46:17 nikita Exp $      */
+/*     $NetBSD: lparser.c,v 1.13 2023/04/17 19:17:49 nikita Exp $      */
 
 /*
 ** Id: lparser.c 
@@ -472,6 +472,7 @@ static void singlevar (LexState *ls, exp
     expdesc key;
     singlevaraux(fs, ls->envn, var, 1);  /* get environment variable */
     lua_assert(var->k != VVOID);  /* this one must exist */
+    luaK_exp2anyregup(fs, var);  /* but could be a constant */
     codestring(&key, varname);  /* key is variable name */
     luaK_indexed(fs, var, &key);  /* env[varname] */
   }



Home | Main Index | Thread Index | Old Index