mirror of
https://github.com/janet-lang/janet
synced 2025-10-20 02:07:40 +00:00
Use make-image-dict and load-image-dict in thread/new
Rather than messing with janet_core_dictionary, we instead cache the core enevironment, and pull out the needed tables from there. This is more flexible, more correct, and also exposes janet_resolve_core, which can be easily used from the C API.
This commit is contained in:
@@ -32,8 +32,8 @@
|
||||
* be in it. However, thread local global variables for interpreter
|
||||
* state should allow easy multi-threading. */
|
||||
|
||||
/* The core dictionary is memoized */
|
||||
extern JANET_THREAD_LOCAL JanetTable *janet_vm_core_dictionary;
|
||||
/* Cache the core environment */
|
||||
extern JANET_THREAD_LOCAL JanetTable *janet_vm_core_env;
|
||||
|
||||
/* How many VM stacks have been entered */
|
||||
extern JANET_THREAD_LOCAL int janet_vm_stackn;
|
||||
|
Reference in New Issue
Block a user