Commit graph

1038 commits

Author SHA1 Message Date
Alex Shinn
75f67b5474 Setting interaction environment to load environment when running scripts.
This maintains backwards compatibility, and is convenient in many cases.
If you want to run a script which really does want an interaction-environment,
such as a repl or editor, you should reset the env to a fresh one.
2011-12-01 21:54:56 +09:00
Alex Shinn
5847e6b631 -m and -x are ignored when compiled without modules, -e, -p and -l disable env reinitializing 2011-12-01 21:38:12 +09:00
Alex Shinn
fcb58f75c4 test calling sexp_apply repeatedly from C 2011-12-01 21:30:49 +09:00
Alex Shinn
32a68effe0 Fixing bug off-by-one bug in sexp_apply - stack top was left one higher than on entry to hold the result.
This was never noticed before because other functions like eval cleanup the
top, and otherwise sexp_apply was never called directly from C code in a loop.
2011-12-01 08:43:39 +09:00
Alex Shinn
47ad791d5d Followup to previous patch - updating scripts to import (scheme), and tests to run with -xscheme. 2011-11-30 09:43:27 +09:00
Alex Shinn
64fdfc1c8c Scripts start with an env empty of everything but `import' following R7RS semantics.
We make an exception for this if any -m or -x options have been specified.
2011-11-30 09:39:05 +09:00
Alex Shinn
46008a0cc0 renaming quote in repl-import 2011-11-30 09:20:38 +09:00
Alex Shinn
ab5398bba0 fix reading numbers beginning with "." in srfi-38 2011-11-29 21:47:54 +09:00
Alex Shinn
b22b0bc7a4 Fix for letrec* - trailing non-procedure definitions cause earlier procedures to be treated as set!s.
Technically this is only needed if the non-proc defs reference the
earlier procedures, which leaves room for optimization later.
2011-11-29 08:33:30 +09:00
Alex Shinn
e3d1414dcc fix for (inexact->exact ratio) 2011-11-29 08:19:01 +09:00
Alex Shinn
f632037344 catching potential overflow in fixnum+fixnum cases in sexp_add similar to last change 2011-11-28 22:20:24 +09:00
Alex Shinn
d9b57ab6b1 handling overflow in the fixnum*fixnum case of sexp_mul, which is never reached directly from the vm 2011-11-28 13:12:46 +00:00
Alex Shinn
e7dbddadef non-standard extension - allowing empty expressions in case clauses 2011-11-28 20:51:34 +09:00
Alex Shinn
34c1b86137 Added tag 0.5.1 for changeset 740b67bb73c4 2011-11-28 08:37:57 +09:00
Alex Shinn
ca96a673dd updating version 2011-11-28 08:37:40 +09:00
Alex Shinn
5f63567db0 adding division tests and putting (scheme division) in the public domain 2011-11-28 08:37:06 +09:00
Alex Shinn
9ea9a4d26a adding tests copied from the draft r7rs standard 2011-11-27 22:42:58 +09:00
Alex Shinn
d091792ba6 including the new definition from the last patch 2011-11-27 22:42:22 +09:00
Alex Shinn
61a65ae219 implementing symbol->string in C to avoid outputting the escape syntax 2011-11-27 22:37:14 +09:00
Alex Shinn
a5fbdccbfc fixing numerator/denominator definitions on inexacts when ratios are supported 2011-11-27 22:25:03 +09:00
Alex Shinn
a8e721da94 quotient and remainder work on inexact integers 2011-11-27 22:20:13 +09:00
Alex Shinn
1d15785f23 making gcd and lcm n-ary 2011-11-27 21:55:32 +09:00
Alex Shinn
7b7c2aed8e inexact->exact can convert non-integers when exact ratios are supported 2011-11-27 21:50:49 +09:00
Alex Shinn
a4bd018480 map handles mismatched list lengths when the first list isn't the shortest 2011-11-27 21:43:58 +09:00
Alex Shinn
b84dba8425 infinities are not rational 2011-11-27 21:40:50 +09:00
Alex Shinn
a1057fa88e Complex normalization takes exactness into account. 2011-11-27 21:37:35 +09:00
Alex Shinn
3675f3a5ea forgot to cdr in list-set! 2011-11-27 21:32:31 +09:00
Alex Shinn
8345f7d74c pre-setting all values to void on reserve 2011-11-27 21:12:56 +09:00
Alex Shinn
6ec7cbf766 handling => in case 2011-11-27 21:07:25 +09:00
Alex Shinn
6f85c98d12 bytevector io fixes 2011-11-26 17:01:20 +09:00
Alex Shinn
c3fea1f765 smarter string-copy for utf8 2011-11-26 16:58:39 +09:00
Alex Shinn
8ca510bcb3 another fix to 1004 2011-11-26 16:32:33 +09:00
Alex Shinn
fd425fb1ec fix bug in previous patch - only use array length in sexp_c_string for explicit result params 2011-11-26 06:57:24 +00:00
Alex Shinn
e608bec866 using result length from fread; string-count optimized and safe for invalid strings. 2011-11-26 13:04:51 +09:00
Alex Shinn
1bc31ff9c1 write unsigned char values for bytevectors 2011-11-26 12:41:54 +09:00
Alex Shinn
8094d585b8 Fixing (scheme char) imports after earlier refactoring; adding definitions for finite? and nan?. 2011-11-26 11:35:32 +09:00
Alex Shinn
3e21d00b91 Added tag 0.5 for changeset 4fd25d8c8ac4 2011-11-24 10:50:33 +09:00
Alex Shinn
473d16e99b updating docs for new release 2011-11-24 10:49:55 +09:00
Alex Shinn
4d23c1e7c5 adding basic process and system tests, with some fixes 2011-11-24 10:11:12 +09:00
Alex Shinn
e1731fabf3 FFI struct types no longer use global variables (with improved type-inference as a bonus) 2011-11-24 01:20:47 +09:00
Alex Shinn
3468ee5145 don't use sexp_write_utf8_char in display if utf8 not supported 2011-11-23 13:16:29 +09:00
Alex Shinn
327be34719 don't try to make ports from NULL FILE*s 2011-11-23 10:47:36 +09:00
Alex Shinn
cd91d4aa72 fix to avoid maxing cpu when we want to wait on an fd 2011-11-22 21:15:05 +09:00
Alex Shinn
3b116b3189 fix to use max-connections arg, and changing bind and listen to return booleans 2011-11-22 20:15:59 +09:00
Alex Shinn
f19e55cf2a adding get-socket-option and set-socket-option! 2011-11-22 09:23:37 +09:00
Alex Shinn
bab0541548 forgot to call clearerr after ferror 2011-11-22 09:19:15 +09:00
Alex Shinn
da2795cfa5 Doing the right thing for value-result parameters. 2011-11-22 08:21:32 +09:00
Alex Shinn
bb53a03fb8 accept handles non-blocking correctly 2011-11-21 20:42:49 +09:00
Alex Shinn
71922c284a we can now block on fd's directly with no port 2011-11-21 20:41:53 +09:00
Alex Shinn
17b265e269 not setting errno in sexp_maybe_block_port 2011-11-21 20:41:06 +09:00