diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-07-02 17:42:40 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-07-02 17:42:40 -0300 |
commit | 6a02bbe1e2f8ad1b98a077bd2aac44e776fd107c (patch) | |
tree | f9923894e45cf4fcfe40c69bd198cd263fcc5529 /lparser.h | |
parent | 7631c29b2f1d57866e2ab885aedc19c29e93a653 (diff) | |
download | lua-6a02bbe1e2f8ad1b98a077bd2aac44e776fd107c.tar.gz lua-6a02bbe1e2f8ad1b98a077bd2aac44e776fd107c.tar.bz2 lua-6a02bbe1e2f8ad1b98a077bd2aac44e776fd107c.zip |
better organization for fields in struct 'expdesc'
Diffstat (limited to 'lparser.h')
-rw-r--r-- | lparser.h | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lparser.h,v 1.62 2010/02/26 20:40:29 roberto Exp roberto $ | 2 | ** $Id: lparser.h,v 1.63 2010/03/12 19:14:06 roberto Exp roberto $ |
3 | ** Lua Parser | 3 | ** Lua Parser |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -25,8 +25,8 @@ typedef enum { | |||
25 | VKNUM, /* nval = numerical value */ | 25 | VKNUM, /* nval = numerical value */ |
26 | VLOCAL, /* info = local register */ | 26 | VLOCAL, /* info = local register */ |
27 | VUPVAL, /* info = index of upvalue in 'upvalues' */ | 27 | VUPVAL, /* info = index of upvalue in 'upvalues' */ |
28 | VINDEXED, /* info = table R/K; aux = index R/K */ | 28 | VINDEXED, /* t = table register; idx = index R/K */ |
29 | VINDEXEDUP, /* info = table upvalue; aux = R/K */ | 29 | VINDEXEDUP, /* t = table upvalue; idx = index R/K */ |
30 | VJMP, /* info = instruction pc */ | 30 | VJMP, /* info = instruction pc */ |
31 | VRELOCABLE, /* info = instruction pc */ | 31 | VRELOCABLE, /* info = instruction pc */ |
32 | VNONRELOC, /* info = result register */ | 32 | VNONRELOC, /* info = result register */ |
@@ -38,7 +38,11 @@ typedef enum { | |||
38 | typedef struct expdesc { | 38 | typedef struct expdesc { |
39 | expkind k; | 39 | expkind k; |
40 | union { | 40 | union { |
41 | struct { int info, aux; } s; | 41 | struct { |
42 | short idx; | ||
43 | lu_byte t; | ||
44 | } ind; /* for indexed variables */ | ||
45 | int info; | ||
42 | lua_Number nval; | 46 | lua_Number nval; |
43 | } u; | 47 | } u; |
44 | int t; /* patch list of `exit when true' */ | 48 | int t; /* patch list of `exit when true' */ |