diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2021-02-09 14:00:05 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2021-02-09 14:00:05 -0300 |
commit | 4e47f81188d37e29027158b76271d02a781242e2 (patch) | |
tree | c360912d1901acf8371390cc1f716278e5d91bb4 /lstate.h | |
parent | c63e5d212bc5dec1b1c749e3f07b42cd83081826 (diff) | |
download | lua-4e47f81188d37e29027158b76271d02a781242e2.tar.gz lua-4e47f81188d37e29027158b76271d02a781242e2.tar.bz2 lua-4e47f81188d37e29027158b76271d02a781242e2.zip |
New implementation for to-be-closed variables
To-be-closed variables are linked in their own list, embedded into the
stack elements. (Due to alignment, this information does not change
the size of the stack elements in most architectures.) This new list
does not produce garbage and avoids memory errors when creating tbc
variables.
Diffstat (limited to 'lstate.h')
-rw-r--r-- | lstate.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -307,6 +307,7 @@ struct lua_State { | |||
307 | StkId stack_last; /* end of stack (last element + 1) */ | 307 | StkId stack_last; /* end of stack (last element + 1) */ |
308 | StkId stack; /* stack base */ | 308 | StkId stack; /* stack base */ |
309 | UpVal *openupval; /* list of open upvalues in this stack */ | 309 | UpVal *openupval; /* list of open upvalues in this stack */ |
310 | StkId tbclist; /* list of to-be-closed variables */ | ||
310 | GCObject *gclist; | 311 | GCObject *gclist; |
311 | struct lua_State *twups; /* list of threads with open upvalues */ | 312 | struct lua_State *twups; /* list of threads with open upvalues */ |
312 | struct lua_longjmp *errorJmp; /* current error recover point */ | 313 | struct lua_longjmp *errorJmp; /* current error recover point */ |
@@ -318,7 +319,6 @@ struct lua_State { | |||
318 | int basehookcount; | 319 | int basehookcount; |
319 | int hookcount; | 320 | int hookcount; |
320 | volatile l_signalT hookmask; | 321 | volatile l_signalT hookmask; |
321 | StkId ptbc; /* pending to-be-closed variable */ | ||
322 | }; | 322 | }; |
323 | 323 | ||
324 | 324 | ||