aboutsummaryrefslogtreecommitdiff
path: root/ldo.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-01-10 13:54:51 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-01-10 13:54:51 -0300
commit7ca3c40b50b385ead6b8bc4c54de97b61d11a12a (patch)
tree5c5998f39760b07e05135df56b8a828f2fb685c1 /ldo.c
parent8a3a49250ce4a7e46ec9e90810a61d9f97aece3d (diff)
downloadlua-7ca3c40b50b385ead6b8bc4c54de97b61d11a12a.tar.gz
lua-7ca3c40b50b385ead6b8bc4c54de97b61d11a12a.tar.bz2
lua-7ca3c40b50b385ead6b8bc4c54de97b61d11a12a.zip
Another way to compile goto's
The compilation of a goto or a label just create an entry and generate boilerplate code for the gotos. As we don't know yet whether it needs a CLOSE, we code a jump followed by a CLOSE, which is then dead code. When a block ends (and then we know for sure whether there are variables that need to be closed), we check the goto's against the labels of that block. When closing a goto against a label, if it needs a CLOSE, the compiler swaps the order of the jump and the CLOSE, making the CLOSE active.
Diffstat (limited to 'ldo.c')
0 files changed, 0 insertions, 0 deletions