Jesse D. McDonald
ffb8e8f86d
Separate statistics for Gen-0 vs. Gen-1 garbage collection.
2012-07-14 13:43:17 -05:00
Jesse D. McDonald
632ac19adf
Make Gen-0 size semi-independent of Gen-1 minimum size.
2012-07-14 13:43:14 -05:00
Jesse D. McDonald
12b5976b66
Fix a bug which was cryptically preventing Gen-1 size from increasing.
2012-07-14 13:43:07 -05:00
Jesse D. McDonald
7fb083a5f9
Generational GC. Initial version, may be buggy.
2012-07-14 13:43:05 -05:00
Jesse D. McDonald
32952e9aa4
Add (empty) write barriers in preparation for more advanced GC.
2012-07-14 13:43:03 -05:00
Jesse D. McDonald
c1a0850bcf
Add builtin wrappers for the basic POSIX file APIs.
2012-07-14 13:41:00 -05:00
Jesse D. McDonald
6a12d967ef
If hard limit is exceeded, try to allocate more memory from the OS.
...
Reduce initial allocation to 1 MB now that it can by increased at runtime.
Also remove 'noreturn' attribute from the public API.
If out_of_memory() returns, GC will abort() internally.
2012-07-14 13:40:40 -05:00
Jesse D. McDonald
48eb22d15b
Update reader to fix corner-cases in the placeholder/back-reference system.
2012-07-14 13:40:16 -05:00
Jesse D. McDonald
c01f0838f1
Misc. reader improvements, plus ability to run *.rla directly.
...
Fix tree_replace() to handle recursive data structures.
Fix some other minor bugs in the reader and interpreter.
Implement comment-escapes in the string parser, for more readable input.
Allow input program files (*.rla) to be invoked directly, with arguments.
Add a simple string->number converter as a builtin function.
2012-07-14 13:38:48 -05:00
Jesse D. McDonald
449b0cf478
Implement fixed-function reader for getting data into the interpreter.
2012-07-14 13:38:44 -05:00
Jesse D. McDonald
56a67a263d
Add an 'undefined' value and a function to convert booleans into values.
2012-07-14 13:38:36 -05:00
Jesse D. McDonald
d80e0c1fd3
CLOCK_MONOTONIC and uint64_t aren't entirely portable.
2012-07-14 13:38:32 -05:00
Jesse D. McDonald
dc35896174
Need to parenthesize "n" in SPECIAL_VALUE macro for precedence.
...
This was causing the type tags to overlap with fixnums.
2012-07-14 13:38:26 -05:00
Jesse D. McDonald
0a2f13b523
Added built-in structure types and interpreter core (w/o bytecode).
...
Improved timing resolution by using clock_gettime() instead of clock().
Also gave project a name: Rosella. Play on 'Parrot' (Perl 6 VM).
2012-07-14 13:38:02 -05:00
Jesse D. McDonald
7bd6e616ff
Add support for weak boxes and wills/finalizers.
...
Also refactored some GC code into smaller functions.
Weak boxes and wills will be useful for implementing weak hash tables,
which in turn will be used to store dynamic parameters efficiently.
2012-07-14 13:37:41 -05:00
Jesse D. McDonald
0867f66767
Add structure type; allow GC to be disabled; unify object-moving code.
2012-07-14 13:37:37 -05:00
Jesse D. McDonald
f8e04f1b86
Add full support for remaining data type (box, vector, byte string).
...
Improve inline accessors for cases where value type is known.
Move GC stats into a single global structure to reduce proliferation of globals.
2012-07-14 13:37:31 -05:00
Jesse D. McDonald
8db40406a0
Refactor into a GC library (gc.c and gc.h) and a test program (gc_test.c).
...
Also, allocate GC memory ranges dynamically during startup (gc_init()) rather than statically.
2012-07-14 13:37:19 -05:00