diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-05-18 16:44:19 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-05-18 16:44:19 -0300 |
| commit | de74289049acf199d422feaf00605bb6e1fbaf72 (patch) | |
| tree | 701bd3d41b106730a7015e06ead4864b2e9046fa /lcode.c | |
| parent | 92b3deaffa642f331326d54a6b93d80240b3af60 (diff) | |
| download | lua-de74289049acf199d422feaf00605bb6e1fbaf72.tar.gz lua-de74289049acf199d422feaf00605bb6e1fbaf72.tar.bz2 lua-de74289049acf199d422feaf00605bb6e1fbaf72.zip | |
table field names for dedicated opcodes can be restricted to
small strings for slightly faster access
Diffstat (limited to 'lcode.c')
| -rw-r--r-- | lcode.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lcode.c,v 2.117 2017/04/26 17:46:52 roberto Exp roberto $ | 2 | ** $Id: lcode.c,v 2.118 2017/04/28 20:57:45 roberto Exp roberto $ |
| 3 | ** Code generator for Lua | 3 | ** Code generator for Lua |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -978,11 +978,11 @@ static void codenot (FuncState *fs, expdesc *e) { | |||
| 978 | 978 | ||
| 979 | 979 | ||
| 980 | /* | 980 | /* |
| 981 | ** Check whether expression 'e' is a literal string | 981 | ** Check whether expression 'e' is a small literal string |
| 982 | */ | 982 | */ |
| 983 | static int isKstr (FuncState *fs, expdesc *e) { | 983 | static int isKstr (FuncState *fs, expdesc *e) { |
| 984 | return (e->k == VK && !hasjumps(e) && e->u.info <= MAXARG_C && | 984 | return (e->k == VK && !hasjumps(e) && e->u.info <= MAXARG_C && |
| 985 | ttisstring(&fs->f->k[e->u.info])); | 985 | ttisshrstring(&fs->f->k[e->u.info])); |
| 986 | } | 986 | } |
| 987 | 987 | ||
| 988 | 988 | ||
