From de74289049acf199d422feaf00605bb6e1fbaf72 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 18 May 2017 16:44:19 -0300 Subject: table field names for dedicated opcodes can be restricted to small strings for slightly faster access --- lcode.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lcode.c') diff --git a/lcode.c b/lcode.c index a154c339..2d396000 100644 --- a/lcode.c +++ b/lcode.c @@ -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])); } -- cgit v1.2.3-55-g6feb