diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-10-29 14:26:48 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-10-29 14:26:48 -0300 |
commit | a006514ea138a29b6031058d9002b48a572b5dd6 (patch) | |
tree | b289a8af0c0497f2555784a0cf666659ceab0236 /lcode.h | |
parent | 6e9b719694bffb8de711f182d405ec37d32ae0b1 (diff) | |
download | lua-a006514ea138a29b6031058d9002b48a572b5dd6.tar.gz lua-a006514ea138a29b6031058d9002b48a572b5dd6.tar.bz2 lua-a006514ea138a29b6031058d9002b48a572b5dd6.zip |
Big revamp in the implmentation of labels/gotos
Added restriction that, when a label is created, there cannot be
another label with the same name visible. That allows backward goto's
to be resolved when they are read. Backward goto's get a close if
they jump out of the scope of some variable; labels get a close only
if previous goto to it jumps out of the scope of some upvalue.
Diffstat (limited to 'lcode.h')
-rw-r--r-- | lcode.h | 3 |
1 files changed, 0 insertions, 3 deletions
@@ -78,10 +78,7 @@ LUAI_FUNC void luaK_setoneret (FuncState *fs, expdesc *e); | |||
78 | LUAI_FUNC int luaK_jump (FuncState *fs); | 78 | LUAI_FUNC int luaK_jump (FuncState *fs); |
79 | LUAI_FUNC void luaK_ret (FuncState *fs, int first, int nret); | 79 | LUAI_FUNC void luaK_ret (FuncState *fs, int first, int nret); |
80 | LUAI_FUNC void luaK_patchlist (FuncState *fs, int list, int target); | 80 | LUAI_FUNC void luaK_patchlist (FuncState *fs, int list, int target); |
81 | LUAI_FUNC void luaK_patchgoto (FuncState *fs, int list, int target, | ||
82 | int hasclose); | ||
83 | LUAI_FUNC void luaK_patchtohere (FuncState *fs, int list); | 81 | LUAI_FUNC void luaK_patchtohere (FuncState *fs, int list); |
84 | LUAI_FUNC void luaK_patchclose (FuncState *fs, int list); | ||
85 | LUAI_FUNC void luaK_concat (FuncState *fs, int *l1, int l2); | 82 | LUAI_FUNC void luaK_concat (FuncState *fs, int *l1, int l2); |
86 | LUAI_FUNC int luaK_getlabel (FuncState *fs); | 83 | LUAI_FUNC int luaK_getlabel (FuncState *fs); |
87 | LUAI_FUNC void luaK_prefix (FuncState *fs, UnOpr op, expdesc *v, int line); | 84 | LUAI_FUNC void luaK_prefix (FuncState *fs, UnOpr op, expdesc *v, int line); |