Commit graph

602 commits

Author SHA1 Message Date
Alex Shinn
1fda388db9 fixing vm <, >, = comparator cases when both flonums and bignums are disabled 2009-12-28 00:06:46 +09:00
Alex Shinn
17e4f63f94 fixing a simple offby1 error in intern previously hidden by the
prevalence of huffman-coded symbols.
2009-12-27 23:19:19 +09:00
Alex Shinn
667e8959e0 port size should be size_t 2009-12-27 22:37:55 +09:00
Alex Shinn
f2fb277eab forgot the return value 2009-12-27 16:39:32 +09:00
Alex Shinn
84404ac54a adding sexp_load_standard_parameters to fix -q option to main 2009-12-27 16:38:37 +09:00
Alex Shinn
6fa8474c42 don't check for bits over 32 on 32-bit machines in integer_log2
(removes shift width warning)
2009-12-27 16:15:28 +09:00
Alex Shinn
482e0d79a9 #t and #f are case-insensitive tokens 2009-12-27 16:08:27 +09:00
Alex Shinn
461fec8e6d adding build-tests script to verify different build options. 2009-12-27 15:44:28 +09:00
Alex Shinn
5f7201ab04 immediate flonums now work on 64-bit machines.
we pack a 32-bit float so there's no funky rounding issues as
on 32-bit machines.  this reduces heap usage, and avoids
allocations during flonum arithmetic.
2009-12-27 13:37:25 +09:00
Alex Shinn
f645ecbb54 updating the sexp_allocated_bytes signature to use the context for
context-local types
2009-12-27 13:34:53 +09:00
Alex Shinn
b1b14fb750 removing opt/debug.c from the eval.o dependencies 2009-12-27 07:29:44 +09:00
Alex Shinn
02a763007d moving disasm to (chibi disasm) module 2009-12-27 01:17:32 +09:00
Alex Shinn
3c2615e2a7 moving file-exists? to (chibi filesystem) 2009-12-27 00:45:28 +09:00
Alex Shinn
23411056c2 resetting current-exception-handler after handler is done 2009-12-27 00:28:20 +09:00
Alex Shinn
2534e81d5b adding initial host system module 2009-12-26 23:48:43 +09:00
Alex Shinn
e9d6f1857a types are now context-group local by default. 2009-12-26 23:46:54 +09:00
Alex Shinn
7eae77d0f9 converting make-exception to a primitive opcode instead of a foreign
function, since foreign functions will always raise any exception they
return (hence the double catch in issue #15).

also restoring the original exception handler when an exception is
raised in with-exception-handler, so that exceptions within the
handler itself don't cause an infinite loop.  this may change, as
with-exception-handler is meant to be a low-level tool on which to
build either guard or condition-case, but until then the restoring
is necessary.
2009-12-26 16:21:37 +09:00
Alex Shinn
55710f48be DIR isn't a struct 2009-12-26 09:09:04 +09:00
Alex Shinn
e82b500b61 adding explicit type-casts when using sexp_cpointer_value,
not all compilers will allow implicit conversions from void*.
also removing Linux-specific stime and utime from siginfo_t.
2009-12-26 09:01:45 +09:00
Alex Shinn
8596e1812a recursive evals now share the same stack.
since in a minimal chibi heap the stack accounts for a large
amount of the space, this makes a big difference - you can
now load (chibi match) in a 2MB heap on a 64-bit system and
it won't grow the heap.
2009-12-26 08:25:57 +09:00
Alex Shinn
7392e082cc adding srfi-46 support 2009-12-26 08:07:28 +09:00
Alex Shinn
05ee7c6725 adding (... ...) escapes and SRFI-46 ellipse specifiers to syntax-rules 2009-12-26 02:07:18 +09:00
Alex Shinn
fea2428eb6 auto-expanding hash-tables 2009-12-26 01:48:12 +09:00
Alex Shinn
09b7b7de69 can't have a null timeval in settimeofday 2009-12-26 01:10:27 +09:00
Alex Shinn
a1941ff08a somewhat reluctantly adding dynamic-wind 2009-12-26 00:50:45 +09:00
Alex Shinn
4e5889a6f4 forgot to add signal.c used by process.stub 2009-12-25 23:32:38 +09:00
Alex Shinn
77f2990f28 factoring (chibi posix) into filesystem, process and time modules.
the time module is garbage, because libc time handling is garbage.
the signal handling is still experimental, use at your own risk.
still need a host module for user/group and other host information.
2009-12-25 21:11:56 +09:00
Alex Shinn
bfbc9313ed fixing import bug (was ignoring exports list except when using
only/except/rename/prefix modifiers)
2009-12-24 14:53:30 +09:00
Alex Shinn
cb1859c683 allowing link on input parameters for use with functions like readdir 2009-12-22 22:55:46 +09:00
Alex Shinn
6da435d21c at great pains, the stubber can generate (ugly) code for getcwd 2009-12-22 22:33:53 +09:00
Alex Shinn
e93c1b1483 adding heap-dump utility for outputting the contents of the heap 2009-12-21 16:17:37 +09:00
Alex Shinn
ffdce3639b adding import-immutable to minimize heap usage 2009-12-20 16:08:19 +09:00
Alex Shinn
c895db6c48 config env doesn't copy the core env, it just links to it as a parent 2009-12-20 13:27:30 +09:00
Alex Shinn
427eb51ad6 removing unneeded make-syntactic-closure from rsc-macro-transformer 2009-12-18 23:34:24 +09:00
Alex Shinn
69166bb523 moving init.scm and config.scm to the module directory 2009-12-18 21:31:03 +09:00
Alex Shinn
828c6cc35a adding support for module search paths
You want to use the CHIBI_MODULE_PATH environment variable now,
not CHIBI_MODULE_DIR, and can use : separators as expected.
The default main now also accepts -I<dir> and -A<dir> to prepend
or append module directories.

The default path is ".:./lib:$PREFIX/share/chibi".  The first
two may be removed in a future version.
2009-12-18 21:26:59 +09:00
Alex Shinn
b0bcf1a0e6 oops, broke module loading with that last patch :) 2009-12-18 17:58:02 +09:00
Alex Shinn
d978e750aa moving library initialization logic from main.c to eval.c.
main is just minimal option parsing plus a simple repl now.
still need to switch to using a module path instead of a
single module dir.
2009-12-18 17:31:10 +09:00
Alex Shinn
6fe11ffcd1 Renaming all USE_ settings and all OP_, OPC_ and CORE_ enums
to have an SEXP_ prefix.  Now all values from the headers
are prefixed with either sexp_ or SEXP_, important for ease
of embedding.  "make USE_BOEHM=1" still works as an alias
for "make SEXP_USE_BOEHM=1".

Sorry if this patch breaks your code, it had to be done
sooner or later.
2009-12-18 15:58:23 +09:00
Alex Shinn
9c77070888 fixing srfi-27 support for systems with posix rand_r but not random_r 2009-12-18 14:43:28 +09:00
Alex Shinn
2583b692d5 disasm now recursively prints lets and local lambdas 2009-12-18 14:16:10 +09:00
Alex Shinn
6b3b13dec6 adding cases in simplify to optimize let bindings over literals
and non-mutated identifiers.  helps a lot with the default
syntax-rules constructions - in particular reduces the number of
bytecode allocations for (chibi match) from 2397 to 1872.
2009-12-18 11:37:37 +09:00
Alex Shinn
8785e85810 fixing arity of arithmetic comparators 2009-12-17 19:02:16 +09:00
Alex Shinn
2baae2cc3b adding initial optimization pass
this includes constant folding, dead-code elimination,
and empty let reduction
2009-12-17 16:41:49 +09:00
Alex Shinn
3861a5b599 adding optimization plugin infrastructure 2009-12-17 16:27:55 +09:00
Alex Shinn
e4a792bdc4 don't stop making if an individual lib fails to build 2009-12-17 15:57:26 +09:00
Alex Shinn
2b49406e93 oops, wrong signature for er-macro-transformer on the srfi-0 patch 2009-12-17 15:54:35 +09:00
Alex Shinn
9d44cbd99a adding SRFI-0 cond-expand 2009-12-16 20:15:45 +09:00
Alex Shinn
e0c4d1d5bf fixing define splicing for let-syntax (issue #13) 2009-12-16 18:39:11 +09:00
Alex Shinn
c6b0c2319c adding srfi-27 2009-12-16 17:43:56 +09:00