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