1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-24 17:27:18 +00:00

Update state.h

This commit is contained in:
Calvin Rose 2018-05-14 09:55:34 -04:00
parent dafc121f4d
commit 80ae7e80e6

View File

@ -33,13 +33,18 @@ extern "C" {
/* The VM state. Rather than a struct that is passed
* around, the vm state is global for simplicity. If
* at some point a a global state object, or contenxt,
* at some point a a global state object, or context,
* is required to be passed around, this is waht would
* be in it. */
* be in it. However, thread local globals for interpreter
* state should allow easy multithreading. */
/* How many VM stacks have been entered */
extern DST_THREAD_LOCAL int dst_vm_stackn;
/* The current running fiber on the current thread.
* Set and unset by dst_run. */
extern DST_THREAD_LOCAL DstFiber *dst_vm_fiber;
/* Immutable value cache */
extern DST_THREAD_LOCAL const uint8_t **dst_vm_cache;
extern DST_THREAD_LOCAL uint32_t dst_vm_cache_capacity;