Experimental changes to janet_call to make it faster.

Remove setjmp and fiber creationg from janet_call. This
adds the constraint to janet_call can only be called when there
is already a current fiber.
This commit is contained in:
Calvin Rose committed 2019-02-01 11:56:25 -05:00
1 parent 19e59705b9
commit 8a3f512746
5 files changed
+56 -32

No files matched your search

+3 -1
View File
@@ -603,12 +603,14 @@ struct JanetFiber {
int32_t capacity;
int32_t maxstack; /* Arbitrary defined limit for stack overflow */
int32_t flags; /* Various flags */
jmp_buf buf; /* Handle errors */
};
/* Mark if a stack frame is a tail call for debugging */
#define JANET_STACKFRAME_TAILCALL 1
/* Mark if a stack frame is an entrance frame */
#define JANET_STACKFRAME_ENTRANCE 2
/* A stack frame on the fiber. Is stored along with the stack values. */
struct JanetStackFrame {
JanetFunction *func;