Alex Shinn
9f239534b4
rewriting string->number in C to fix the error catching problem (should return #f)
...
this calls sexp_read_number directly passing the base, so the
C implementation is shorter than the Scheme implementation,
much faster, and as an opcode generates smaller bytecode per use.
2010-04-03 11:31:11 +09:00
Alex Shinn
f1040180f4
moving ctype.h and stdio.h includes after u.h include for plan9 (issue 47)
2010-03-30 22:07:37 +09:00
Alex Shinn
a7794e8189
only conditionally defining _GNU_SOURCE to avoid warning (issue 48)
2010-03-30 22:03:30 +09:00
Alex Shinn
9a3c863630
updating some individual opcodes to new API
2010-03-24 20:42:49 +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
135d53a8f0
forgot to include eval.h
2010-03-23 20:53:12 +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
87e80f85c0
also making core form names const char*
2010-03-22 15:19:48 +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
9604d91440
reordering some immediates
2010-03-15 16:38:17 +09:00
Alex Shinn
725316ad3c
initial sexp_copy_context - need utils to dump/load initial image
2010-03-13 23:19:52 +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
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
20da1b8909
fixing string-ref for 8-bit values (need to separate strings from byte-vectors)
2010-02-26 00:04:46 +09:00
Alex Shinn
c14e32a0eb
exposing sexp_free_vars
2010-02-25 23:59:40 +09:00
Alex Shinn
670a4ae67b
adding option to mmap heaps instead of mallocing them
2010-02-25 23:58:57 +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
562ec60926
adding extended io utils, including custom ports, with high-level
...
custom port constructors such as concatenated and filtered ports.
2010-01-02 20:14:32 +09:00
Alex Shinn
d954819775
adding (chibi io) w/ interface to fgets, fread, fwrite, etc.
2009-12-31 00:24:19 +09:00