mirror of
https://github.com/janet-lang/janet
synced 2025-11-27 04:25:14 +00:00
Shrink the public interface by hiding internal state.
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
|
||||
#include <dst/dst.h>
|
||||
#include <dst/dstopcodes.h>
|
||||
#include "state.h"
|
||||
#include "fiber.h"
|
||||
#include "gc.h"
|
||||
#include "symcache.h"
|
||||
@@ -29,6 +30,10 @@
|
||||
/* VM state */
|
||||
DST_THREAD_LOCAL int dst_vm_stackn = 0;
|
||||
|
||||
/* Maybe collect garbage */
|
||||
#define dst_maybe_collect() do {\
|
||||
if (dst_vm_next_collection >= dst_vm_gc_interval) dst_collect(); } while (0)
|
||||
|
||||
/* Start running the VM from where it left off. */
|
||||
Dst dst_run(DstFiber *fiber) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user