reorganized files

This commit is contained in:
Francesco Cozzuto
2021-12-01 14:43:11 +01:00
parent a7cdb0943d
commit fb9b22fa46
6 changed files with 22 additions and 22 deletions
+2
View File
@@ -14,6 +14,8 @@
* $ noja -f <file> -o <file>
*/
Object *Object_NewBuiltinsMap(Runtime *runtime, Heap *heap, Error *err);
typedef enum { RUN, HELP, PARSE, VERSION, DISASSEMBLY } Action;
typedef struct {
@@ -2,8 +2,8 @@
#include <string.h>
#include <assert.h>
#include <stdlib.h>
#include "runtime.h"
#include "../utils/defs.h"
#include "runtime/runtime.h"
#include "utils/defs.h"
static Object *select_(Object *self, Object *key, Heap *heap, Error *err);
static int count(Object *self);
@@ -1,8 +1,5 @@
// NOTE: This data structure doesn't strictly depend on
// the runtime, so it could be moved to src/objects.
#include "../utils/defs.h"
#include "../objects/objects.h"
#include "objects.h"
typedef struct ClosureObject ClosureObject;
+1
View File
@@ -86,6 +86,7 @@ Object* Object_Prev (Object *iter, Heap *heap, Error *err);
Object* Object_NewMap(int num, Heap *heap, Error *error);
Object* Object_NewList(int capacity, Heap *heap, Error *error);
Object* Object_NewNone(Heap *heap, Error *error);
Object* Object_NewClosure(Object *parent, Object *new_map, Heap *heap, Error *error);
Object* Object_FromInt (long long int val, Heap *heap, Error *error);
Object* Object_FromBool (_Bool val, Heap *heap, Error *error);
-2
View File
@@ -25,8 +25,6 @@ void Snapshot_Print(Snapshot *snapshot, FILE *fp);
Object *run(Runtime *runtime, Error *error, Executable *exe, int index, Object *closure, Object **argv, int argc);
Object *Object_NewClosure(Object *parent, Object *new_map, Heap *heap, Error *error);
Object *Object_NewBuiltinsMap(Runtime *runtime, Heap *heap, Error *err);
Object* Object_FromNativeFunction(Runtime *runtime, Object *(*callback)(Runtime*, Object**, unsigned int, Error*), int argc, Heap *heap, Error *error);
Object *Object_FromNojaFunction(Runtime *runtime, Executable *exe, int index, int argc, Object *closure, Heap *heap, Error *error);
#endif