Commit Graph

23 Commits

Author SHA1 Message Date
Jesse D. McDonald 03c3dec091 Extend reader with placeholders for immutable values and structures.
This means that such values can once again contain references (#=nnn).
2012-07-14 13:47:15 -05:00
Jesse D. McDonald b3fd7bf6fc Adjust initial allocations to improve memory efficiency.
Also convert existing .rls (Rosella Source) files to module syntax.
2012-07-14 13:45:20 -05:00
Jesse D. McDonald 0a6d2f3f73 Control printing of GC stats with GC_STATS env. var rather than #if 0/1. 2012-07-14 13:43:16 -05:00
Jesse D. McDonald 7a651dc9d1 Update main app to use new gc_init() prototype w/ separate Gen-0 size. 2012-07-14 13:43:15 -05:00
Jesse D. McDonald 7f55142d72 Fix several significant bugs in the generational collector.
No known issues remaining at this time.
2012-07-14 13:43:10 -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 da93d60cfd Adjust build script to capitalize HAVE_MOD_* macros. 2012-07-14 13:43:01 -05:00
Jesse D. McDonald ca8d68c023 Add automatic dependency tracking to the build rules.
Move optional extension modules (e.g. mod_io.c) into mods/ subdir.
Fix missing #include in reader.c.
2012-07-14 13:42:30 -05:00
Jesse D. McDonald ec306ef31f Adjust indirect form (#i"path") to be relative to the current file. 2012-07-14 13:42:16 -05:00
Jesse D. McDonald 6254044280 Add #i"pathname" syntax for reading values from modular input files. 2012-07-14 13:42:14 -05:00
Jesse D. McDonald 912a620c5a Add some error-handling to cat.rla. Add support for #! lines.
Also fix an off-by-one error in the column counter and suppress GC stats.
2012-07-14 13:41:52 -05:00
Jesse D. McDonald ce3c4f1ce9 Increase block size in cat.rla. Print GC stats to stderr. 2012-07-14 13:41:49 -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 88ebc7ca77 Print results individually, on separate lines, rather than as a list. 2012-07-14 13:40:34 -05:00
Jesse D. McDonald c1ac1323bf Check for errors when opening program file.
Add a debug assertion in the reader to catch bugs like the last one.
2012-07-14 13:40:29 -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 53b1cc213b Skip reader test by default to allow profiling. 2012-07-14 13:38:47 -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 d1dcb77503 Update printer to display 'undefined' values as "#<undefined>". 2012-07-14 13:38:37 -05:00
Jesse D. McDonald 4136b74e1b If (any) option is given, run GC test forever. Otherwise just run it once. 2012-07-14 13:38:20 -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