Commit graph

27 commits

Author SHA1 Message Date
Alex Shinn
565ed858fe fixing memory leak when redefining macros
(was generating a new env cell instead of overwriting the old one)
2010-06-23 22:04:38 +09:00
Alex Shinn
8b6b2e5e83 compressing environment structures
pack the next cell pointer into the source loc info
of the env cell instead of requiring a "backbone" list
2010-06-22 13:50:30 +00:00
foof
a24de22094 gc bug fixes, adding optional gc debugging utils 2010-06-21 14:42:36 +00:00
Alex Shinn
87d13c3a46 internal defines inside local scopes introduced byu let(rec)-syntax
are now analyzed within the correct syntactic scope.
fixes r5rs_pitfalls.scm 8.3.
2010-05-15 15:04:15 +09:00
Alex Shinn
aaf3f84c22 only warning when a non-procedure is found in an operator position 2010-05-15 14:42:19 +09:00
Alex Shinn
f8a3296372 moving apply to vm.c
copying lambda param lists on creation
2010-05-15 13:05:50 +09:00
Alex Shinn
53e538d5a3 initial refactoring of VM code to vm.c 2010-04-04 10:31:42 +09:00
Alex Shinn
6e554911e6 simplifying with sexp_assert_type macro 2010-04-04 10:28:09 +09:00
Alex Shinn
d5ddfe6a92 changing type_exception to use self and a type_id
this simplifies and reduces the number of different static strings.
specific error messages are still available with sexp_xtype_exception.
2010-04-04 10:10:17 +09:00
Alex Shinn
a89956fc16 new primitives API
Primitives now have a signature of prim(ctx, self, n, args ...)
instead of just prim(ctx, args ...).  This allows for variadic
primitives, should help clean up exception handling, and will
allow primitives generated from Scheme->C or JIT compilation.

The primitives sometimes used as utility functions from C such as
sexp_memq have been renamed with a "_op" suffix (e.g. sexp_memq_op)
and a macro sexp_memq has been provided filling in the self and n
args automatically.  The self is passed as NULL in these macros,
but will be probably replaced with a reference to the opcode later.
2010-03-24 19:58:50 +09:00
Alex Shinn
36043bb8da making sexp_make_procedure public 2010-03-24 01:27:09 +09:00
Alex Shinn
cc6f727add sexp_intern, sexp_read_from_string and sexp_eval_string now all take length parameters.
this is more flexible and will help if strings are changed to be non-null-terminated.
2010-03-23 20:52:47 +09:00
Alex Shinn
0a9085fbbd const qualifying char* inputs to various API functions 2010-03-22 15:14:30 +09:00
Alex Shinn
9897107d53 replacing SEXP_OPC_ACCESSOR with separate getter & setter opcode classes 2010-03-16 15:19:46 +09:00
Alex Shinn
2e9a09fc1e type checking env arg to eval (issue #44) 2010-03-13 18:31:30 +09:00
Alex Shinn
e15c49389c auto-closing gc'ed string ports to prevent memory leaks (issue #41).
also using a separate port field no_closep to indicate ports whose
underlying streams shouldn't be closed (stdin/stdout/stderr).
2010-03-10 21:39:20 +09:00
Alex Shinn
f866875e68 adding alignment bytcode patch for ARM 2010-03-09 20:28:32 +09:00
Alex Shinn
95e0b0bb31 adding type-checking on the remaining I/O opcodes 2010-03-09 19:08:58 +09:00
Alex Shinn
a630d84413 adding dll fixes for mingw 2010-03-04 12:35:18 +09:00
Alex Shinn
325007d2b9 Removing SEXP_OP_NEGATIVE and SEXP_OP_INVERSE - these are compiled
directly by generate_opcode_app now.  Zero arity cases now supported:
(-) => 0, (/) => 1, equivalent to the zero arity + and * cases.
2010-03-01 13:15:06 +09:00
Alex Shinn
fea1b696a4 adding patches for C++ 2010-02-27 23:57:54 +09:00
Alex Shinn
c14e32a0eb exposing sexp_free_vars 2010-02-25 23:59:40 +09:00
Alex Shinn
6fb2d4cf21 adding mechanism to statically include modules which use C code 2010-01-22 00:24:28 +09:00
Alex Shinn
1dba7fb8fd forgot to preserve some gc vars in the bignum lib 2009-12-30 03:49:21 +09:00
Alex Shinn
b77d102a70 fixing non-tail-call optimization in some conditional cases 2009-12-29 23:32:29 +09:00
Alex Shinn
e2d7291269 belatedly adding type checks on read/write/display 2009-12-29 20:12:09 +09:00
Alex Shinn
f785134851 updating plan9 mkfile to use features.h 2009-12-29 19:03:50 +09:00