Updated Toy to 0.7.0
This commit is contained in:
2
Toy
2
Toy
Submodule Toy updated: bf64275aa9...3498baad9b
@@ -10,8 +10,10 @@
|
||||
//platform exports/imports
|
||||
#if defined(__linux__)
|
||||
#define CORE_API extern
|
||||
|
||||
#else
|
||||
#define CORE_API
|
||||
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
@@ -38,7 +38,7 @@ void initEngineNode(EngineNode* node, Interpreter* interpreter, void* tb, size_t
|
||||
continue;
|
||||
}
|
||||
|
||||
//if this variable is a function
|
||||
//if this variable is a function (this outmodes import and export)
|
||||
_entry* entry = &variablesPtr->entries[i];
|
||||
if (IS_FUNCTION(entry->value)) {
|
||||
//save a copy
|
||||
|
||||
@@ -127,8 +127,6 @@ static int nativeLoadRootNode(Interpreter* interpreter, LiteralArray* arguments)
|
||||
inner.depth = interpreter->depth + 1;
|
||||
inner.panic = false;
|
||||
initLiteralArray(&inner.stack);
|
||||
inner.exports = interpreter->exports;
|
||||
inner.exportTypes = interpreter->exportTypes;
|
||||
inner.hooks = interpreter->hooks;
|
||||
setInterpreterPrint(&inner, interpreter->printOutput);
|
||||
setInterpreterAssert(&inner, interpreter->assertOutput);
|
||||
|
||||
@@ -51,8 +51,6 @@ static int nativeLoadNode(Interpreter* interpreter, LiteralArray* arguments) {
|
||||
inner.depth = interpreter->depth + 1;
|
||||
inner.panic = false;
|
||||
initLiteralArray(&inner.stack);
|
||||
inner.exports = interpreter->exports;
|
||||
inner.exportTypes = interpreter->exportTypes;
|
||||
inner.hooks = interpreter->hooks;
|
||||
setInterpreterPrint(&inner, interpreter->printOutput);
|
||||
setInterpreterAssert(&inner, interpreter->assertOutput);
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
#include "lib_standard.h"
|
||||
|
||||
#include "toy_common.h"
|
||||
#include "memory.h"
|
||||
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
static int nativeClock(Interpreter* interpreter, LiteralArray* arguments) {
|
||||
//no arguments
|
||||
if (arguments->count != 0) {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
#include "lib_timer.h"
|
||||
|
||||
#include "toy_common.h"
|
||||
#include "memory.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
//GOD DAMN IT: https://stackoverflow.com/questions/15846762/timeval-subtract-explanation
|
||||
int timeval_subtract(struct timeval *result, struct timeval *x, struct timeval *y) {
|
||||
|
||||
Reference in New Issue
Block a user