1
0
mirror of https://github.com/lua/lua synced 2026-06-08 15:34:49 +00:00

table field names for dedicated opcodes can be restricted to

small strings for slightly faster access
This commit is contained in:
Roberto Ierusalimschy
2017-05-18 16:44:19 -03:00
parent 92b3deaffa
commit de74289049
2 changed files with 8 additions and 8 deletions
+3 -3
View File
@@ -1,5 +1,5 @@
/*
** $Id: lcode.c,v 2.117 2017/04/26 17:46:52 roberto Exp roberto $
** $Id: lcode.c,v 2.118 2017/04/28 20:57:45 roberto Exp roberto $
** Code generator for Lua
** See Copyright Notice in lua.h
*/
@@ -978,11 +978,11 @@ static void codenot (FuncState *fs, expdesc *e) {
/*
** Check whether expression 'e' is a literal string
** Check whether expression 'e' is a small literal string
*/
static int isKstr (FuncState *fs, expdesc *e) {
return (e->k == VK && !hasjumps(e) && e->u.info <= MAXARG_C &&
ttisstring(&fs->f->k[e->u.info]));
ttisshrstring(&fs->f->k[e->u.info]));
}