Commit graph

271 commits

Author SHA1 Message Date
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
Alex Shinn
366e0ee726 adding heap-stats module (hackers only, not built by default) 2009-12-14 14:34:46 +09:00
Alex Shinn
f1263dcc19 adding trailing newline 2009-12-14 13:57:40 +09:00
Alex Shinn
420ab008ff fixing maximum heap heuristic 2009-12-14 13:56:32 +09:00
Alex Shinn
99d8c585f9 adding srfi-33 support (needs testing) 2009-12-14 13:46:04 +09:00
Alex Shinn
e03cef72b3 warning on importing undefined variables 2009-12-13 19:29:35 +09:00
Alex Shinn
178cf109bd fixing segfault when applying a first-class opcode to the wrong # of arguments 2009-12-13 16:59:20 +09:00
Alex Shinn
d6e279eccd forgot these changes 2009-12-12 18:47:26 +09:00
Alex Shinn
2ddafc2239 recovering gracefully from out-of-stack-space errors 2009-12-12 17:29:54 +09:00
Alex Shinn
f4bb578d4d adding uri module from hato 2009-12-12 17:23:32 +09:00
Alex Shinn
3f2a9c9630 adding abstract pathname module
this is for use with uri's - it doesn't access the filesystem
or resolve symlinks, that functionality will be provided in
another module.
2009-12-12 17:00:57 +09:00
Alex Shinn
3d02285732 using ER let-keyword-form, removing match dependency 2009-12-12 16:58:31 +09:00
Alex Shinn
d2e094e4c1 simplifying code 2009-12-12 16:51:50 +09:00
Alex Shinn
2a424658b0 adding extra lambda accessors to ast lib 2009-12-12 16:30:06 +09:00
Alex Shinn
0da9a79bd1 compressing bytecode literal references 2009-12-12 16:29:15 +09:00
Alex Shinn
9539a2d9a2 converting TODO to org-mode, fleshing out 2009-12-12 16:27:36 +09:00
Alex Shinn
7a526b4f1a adding support for only/except/rename/prefix in import forms
(import also now supports multiple arguments)
2009-12-12 16:04:08 +09:00
Alex Shinn
e5163d7e3b expanding internal defines in lambdas 2009-12-12 16:02:38 +09:00
Alex Shinn
a1622ad408 marking generated .c files as "PRECIOUS" so they don't get automatically deleted 2009-12-12 16:01:50 +09:00
Derick Eddington
7050da677d fixing let* internal define 2009-12-07 16:16:01 -08:00
Derick Eddington
14c99c4729 fixing identifier comparison bugs 2009-12-06 21:34:30 -08:00
Alex Shinn
f969364176 adding initial macroexpand utility
This expands an expression and gives you an sexp representation
of the resulting ast, renaming symbols when there are conflicts.
It doesn't guarantee the minimum number of renames (neither in
terms of renamed bindings nor renamed instances) but tries to be
minimal and does guarantee no renames if there are no conflicts.

This is just for debugging purposes - chibi itself directly
uses the AST without renaming or doing anything like this.
2009-12-06 23:17:37 +09:00
Alex Shinn
bb804f8062 fixing path of loop.scm 2009-12-06 17:42:16 +09:00
Alex Shinn
0efd491c24 fixing nested let-syntax hygiene, simplifying error handling
also providing better errors in some cases, and exiting with
a non-zero status on script errors
2009-12-06 17:40:50 +09:00
Alex Shinn
01f21cc905 adding initial ast module 2009-12-05 19:05:41 +09:00
Alex Shinn
d67e8b46aa makefile fixes from derick eddington 2009-12-05 18:54:04 +09:00
Alex Shinn
9ed0d705c6 adding type checking to disasm
Fixes issue #8:
http://code.google.com/p/chibi-scheme/issues/detail?id=8

Note disasm is likely to be moved out of the core soon.
2009-12-05 18:13:01 +09:00
Alex Shinn
fa879e183c removing errx on failed heap allocation 2009-12-05 18:07:41 +09:00
Alex Shinn
35776a2bc3 removing small maximum heap size from testing 2009-12-05 17:39:27 +09:00
Alex Shinn
035aa7005c no longer exit(2)ing on OOM, pre-allocating a global OOM exception 2009-12-05 17:34:27 +09:00
Alex Shinn
5d2f5912ce adding parent links to cpointers to prevent freeing shared structures 2009-12-05 17:17:55 +09:00
Alex Shinn
6bd1bd3687 adding directory-files to posix module 2009-12-02 03:51:39 +09:00