-
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Shaw Summa <[email protected]>
- Loading branch information
Showing
28 changed files
with
258 additions
and
231 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule mimalloc
updated
11 files
+ − | bin/mimalloc-redirect.dll | |
+ − | bin/mimalloc-redirect.lib | |
+ − | bin/mimalloc-redirect32.dll | |
+ − | bin/mimalloc-redirect32.lib | |
+4 −3 | src/arena-abandon.c | |
+5 −1 | src/bitmap.h | |
+3 −2 | src/free.c | |
+3 −2 | src/heap.c | |
+4 −0 | src/init.c | |
+16 −4 | src/prim/prim.c | |
+40 −19 | src/prim/windows/prim.c |
Submodule tree-sitter
updated
225 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
|
||
#include <stdarg.h> | ||
#include "build.h" | ||
|
||
#define VM_MACRO_SELECT(_0, _1, _2, NAME, ...) NAME | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
|
||
#include "lib.h" | ||
#include "errors.h" | ||
#include "io.h" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,50 @@ | ||
|
||
#include "lib.h" | ||
#include "vm.h" | ||
|
||
#if defined(__TINYC__) | ||
void *end; | ||
#if VM_MALLOC_MI | ||
#include "../vendor/mimalloc/include/mimalloc.h" | ||
|
||
void *vm_malloc(size_t x) { | ||
return mi_malloc(x); | ||
} | ||
|
||
void *vm_calloc(size_t x) { | ||
return mi_calloc(x, 1); | ||
} | ||
|
||
void *vm_realloc(void *x, size_t y) { | ||
return mi_realloc(x, y); | ||
} | ||
|
||
void vm_free(const void *x) { | ||
mi_free((void *) (x)); | ||
} | ||
|
||
char *vm_strdup(const char *x) { | ||
return mi_strdup(x); | ||
} | ||
#endif | ||
|
||
#if VM_MALLOC_SYS | ||
#include <stdlib.h> | ||
|
||
void *vm_malloc(size_t x) { | ||
return malloc(x); | ||
} | ||
|
||
void *vm_calloc(size_t x) { | ||
return calloc(x, 1); | ||
} | ||
|
||
void *vm_realloc(void *x, size_t y) { | ||
return realloc(x, y); | ||
} | ||
|
||
void vm_free(const void *x) { | ||
free((void *) (x)); | ||
} | ||
|
||
char *vm_strdup(const char *x) { | ||
return strdup(x); | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
|
||
#include "vm.h" | ||
|
||
static inline bool vm_obj_is_nil(vm_obj_t o) { | ||
return nanbox_is_empty(o); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.