diff options
-rw-r--r-- | src/notes | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/src/notes b/src/notes deleted file mode 100644 index ade61bf..0000000 --- a/src/notes +++ /dev/null @@ -1,28 +0,0 @@ -// Main thread combines a thread state and the global state -typedef struct LG { - lua_State l; - global_State g; -} LG; - -lua_State: - &{Value; int tt} stack, stack_last, base, top - GCObject* next - byte tt # type == THREAD - -Lua's stack vs globals: https://lucasklassmann.com/blog/2019-02-02-how-to-embeddeding-lua-in-c/#exposing-a-simple-variable -More info on the stack: https://www.lua.org/pil/24.2.html - - - -# T[k] = v - -## Approach 1: - -- initial { ... T ... } - push k - push v - settable index(T) - -- final { ... T ... } - -## Approach 2 (if k is a string): - push v - setfield index(T), k |