Commit graph

629 commits

Author SHA1 Message Date
Alex Shinn
14c4d0b57d named let evaluates the initial bindings outside the scope of the loop
(fixes 8.2 in r5rs_pitfalls.scm)
2010-05-15 13:07:01 +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
73a4605a59 adding stty module 2010-05-13 00:46:19 +09:00
Alex Shinn
147686a452 increasing numeric output buffer size 2010-05-05 22:11:30 +09:00
Alex Shinn
aa0af80993 replacing sprintf with snprintf to handle numeric formatting overflow 2010-05-05 22:09:18 +09:00
Alex Shinn
758e423c1b fixing signedness bug in heap growing heuristics 2010-04-20 22:30:38 +09:00
Alex Shinn
4d64568736 fixing bug in lset-union (thanks to alexander shendi) 2010-04-20 21:12:24 +09:00
Alex Shinn
5c91226157 removing experimental x86.so from targets 2010-04-19 07:44:09 +09:00
Alex Shinn
340ab8404c off by one error on last patch 2010-04-15 22:34:43 +09:00
Alex Shinn
0299d42807 fixing bug reading SEXP_MIN_FIXNUM 2010-04-15 22:25:35 +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
8357b3afaa forgot to add the new self, n parameters in the new stubber 2010-04-03 11:42:33 +09:00
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
71821fc95a convertin plan9 functions to new API 2010-03-30 22:06:16 +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
74f7c5737c updating sexp_intern calls 2010-03-25 17:40:02 +09:00
Alex Shinn
061dacbf8e adding sexp_version and sexp_release to plan9 mkfile 2010-03-25 17:34:52 +09:00
Alex Shinn
9a3c863630 updating some individual opcodes to new API 2010-03-24 20:42:49 +09:00
Alex Shinn
ded9bbf0b6 updating libraries and genstubs to use new primitives API 2010-03-24 20:13:05 +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
adbf0d9370 Added tag stable for changeset b5e6d5afc88e 2010-03-23 17:08:00 +09:00
Alex Shinn
0e6c2ffde9 updating authors 2010-03-22 15:20:21 +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
bb3d44054e fixing syntax error with " .)" in source (issue #45) 2010-03-16 21:41:32 +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
ca1f6202ae adding (pointer void) support 2010-03-15 13:29:43 +09:00
Alex Shinn
a1566b79d0 repl creates a new env so new definitions don't show in the standard env 2010-03-14 21:11:28 +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
2e9a09fc1e type checking env arg to eval (issue #44) 2010-03-13 18:31:30 +09:00
Alex Shinn
4b2ed4cf48 verifying command-line option arguments are given when needed (issue #43) 2010-03-12 14:26:03 +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
d6c3b04e06 Adding AUTHORS file. 2010-03-09 20:47:10 +09:00
Alex Shinn
f866875e68 adding alignment bytcode patch for ARM 2010-03-09 20:28:32 +09:00
Alex Shinn
171966956f fixing bug in sexp_destroy_context
We need to grab a reference to the context heap before sweeping, in
case sweeping overwrites the heap reference.
2010-03-09 20:23:29 +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
3123d48da7 removing negative and inverse opcodes from disasm 2010-03-01 15:57:02 +09:00
Alex Shinn
e569fd1847 ignoring generated clibs.c 2010-03-01 15:55:41 +09:00
Alex Shinn
32de527a77 adding tests 2010-03-01 15:53:55 +09:00
Alex Shinn
5002f796d8 backing out the zero-arity option to - and / 2010-03-01 13:54:57 +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
e999b1a77a Need to wrap constant-folded results in a literal. 2010-03-01 12:55:24 +09:00