1
0
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:
Calvin Rose
2018-03-31 16:40:36 -04:00
parent 507f9f9c57
commit 027b2a81c2
14 changed files with 68 additions and 24 deletions

View File

@@ -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) {