forked from xxq250/Nasal-Interpreter
⚡ optimize codes: store upvalue on stack & debugger now can output information of registers
This commit is contained in:
@@ -1386,6 +1386,8 @@ When `op_callb` is called, the stack frame is like this:
|
||||
+----------------------------+
|
||||
| old localr(vm_addr) | <- top[-1]
|
||||
+----------------------------+
|
||||
| old upvalr(vm_upval) | <- top[-2]
|
||||
+----------------------------+
|
||||
| local scope(nasal_ref) |
|
||||
| ... |
|
||||
+----------------------------+ <- local pointer stored in localr
|
||||
@@ -1403,6 +1405,8 @@ In `op_callb`'s progress, next step the stack frame is:
|
||||
+----------------------------+
|
||||
| old localr(vm_addr) |
|
||||
+----------------------------+
|
||||
| old upvalr(vm_upval) |
|
||||
+----------------------------+
|
||||
| local scope(nasal_ref) |
|
||||
| ... |
|
||||
+----------------------------+ <- local pointer stored in localr
|
||||
@@ -1435,6 +1439,8 @@ but where is the returned `local[1]` sent?
|
||||
+----------------------------+
|
||||
| old localr(vm_addr) |
|
||||
+----------------------------+
|
||||
| old upvalr(vm_upval) |
|
||||
+----------------------------+
|
||||
| local scope(nasal_ref) |
|
||||
| ... |
|
||||
+----------------------------+ <- local pointer stored in localr
|
||||
@@ -1453,6 +1459,8 @@ and the returned `local[1]` in fact is set to the top of the main stack by `op_c
|
||||
+----------------------------+
|
||||
| old localr(vm_addr) |
|
||||
+----------------------------+
|
||||
| old upvalr(vm_upval) |
|
||||
+----------------------------+
|
||||
| local scope(nasal_ref) |
|
||||
| ... |
|
||||
+----------------------------+ <- local pointer stored in localr
|
||||
|
||||
Reference in New Issue
Block a user