Commit graph

52 commits

Author SHA1 Message Date
Alex Shinn
0686b03258 Fixing source info tracking in \<newline> string escapes and multi-lined comments. 2013-05-28 21:29:34 +09:00
Alex Shinn
99d9203362 \<space><newline><space> should only skip one line 2013-05-28 21:24:21 +09:00
Alex Shinn
55df642dab Better initial defaults for equality bounds checking. 2013-01-26 23:42:22 +09:00
Alex Shinn
7d3d700300 adding type check to lookup-type 2013-01-19 01:30:49 +09:00
Alex Shinn
ec21e90e16 #; followed by non-datum tokens is an error 2013-01-14 19:36:25 +09:00
Alex Shinn
3c45fb564a Patch from Lorenzo fixing premature reclamation of fd's still in use. 2012-12-25 21:54:01 +09:00
Alex Shinn
b63537a8cc Signalling error on '(x . .) read syntax. 2012-12-15 10:26:11 +09:00
Alex Shinn
b4c2bbb625 delete-file raises a file-error on failure.
Other file operations continue to return #t/#f - may change this later.
2012-12-04 20:09:21 +09:00
Alex Shinn
f63d55aadb Adjusting check from last change - look for lists, not vectors. 2012-11-23 17:05:18 +09:00
Alex Shinn
3cefb4fce6 Adding extra check in port finalization before freeing the buffer.
Thanks again to Lorenzo.
2012-11-23 16:57:57 +09:00
Alex Shinn
9ed2f9a27a Fixing memory leak in string ports found by Lorenzo.
In the future this will be simplified by dropping support for
C string streams and never using malloc for buffers.
2012-11-23 11:17:08 +09:00
Alex Shinn
28f49d5252 Fixing potential buffer overflow. 2012-11-11 14:36:11 +09:00
Alex Shinn
4ffcba797c Supporting unicode characters in \x string escapes. 2012-11-11 14:13:35 +09:00
Alex Shinn
44c643c7cf Adding support for complex literals in exponential format. 2012-11-11 12:26:03 +09:00
Alex Shinn
c0fc89ece4 Supporting (partially) infinite complex numbers. 2012-10-31 23:41:53 +09:00
Alex Shinn
4f554499f8 char-ready? shouldn't block, should return #t on EOF 2012-10-21 18:10:45 +09:00
Alex Shinn
9aa03c0a09 Updating eqv? definition (from pre-bignum days) to latest R7RS definition. 2012-10-17 20:53:56 +09:00
Alex Shinn
74d0980b82 Adding file-error? and read-error? predicates. 2012-10-14 23:27:16 +09:00
Alex Shinn
03518e5bab don't write zero bytes on flush (more efficient and avoids sigpipe) 2012-09-25 22:46:12 +09:00
Alex Shinn
9da98bd68d Finalizing stream/fd backed ports will properly flush them.
However, don't try to flush string/custom ports which could result in alloc during gc.
2012-09-23 23:28:09 +09:00
Alex Shinn
00f71d9bd5 Writing nicer type names. 2012-09-17 18:00:36 +09:00
Alex Shinn
d56d6fd8c6 Printing error messages when child threads terminate by default. 2012-09-17 15:03:48 +09:00
Alex Shinn
ca0244f58e Resetting debug fp on normal return from apply.
Fixes #145.  "Returned" exceptions in the default
repl still print as if they were raised.
2012-08-19 22:58:05 +09:00
Alex Shinn
b40370be52 thread-join! now returns the result or raises the exception of the joined thread 2012-08-15 21:23:39 +09:00
Alex Shinn
fd87e62ec0 need to initialize thread timeout flag to false 2012-07-21 17:36:35 +09:00
Alex Shinn
016560e5fe Additional OOM checks - harder but still not impossible to segfault on OOM. 2012-07-17 23:40:16 +09:00
Alex Shinn
16b71a1f22 port predicates can be called on any object 2012-07-17 07:46:32 +09:00
Alex Shinn
6de7d5621d Keeping track of the maximum stack depth a procedure needs for accurate stack checks
(fixes bug #130).  Done in conjunction with code generation refactoring, so that context
objects temporarily use their specific slot instead of having space for useful fields
at runtime.
2012-07-16 16:23:54 +09:00
Alex Shinn
254f6dee05 propagating exceptions from index->offset translation in substring 2012-07-16 14:11:06 +09:00
Alex Shinn
afacac6127 handling complex negation with a zero real part 2012-07-11 23:03:43 +09:00
Alex Shinn
b101e5c585 Fixing some corner cases with mixed rational/complex notation. 2012-07-11 22:07:05 +09:00
Alex Shinn
d45ecf42ca allowing alternate exponent markers d, f, s, l 2012-07-11 21:55:10 +09:00
Alex Shinn
f895ace01b missed some bignum/ratio normalization cases 2012-07-10 23:56:51 +09:00
Alex Shinn
96d8c7d797 fixing #e prefix combined with non-finite flonums 2012-07-10 23:36:29 +09:00
Alex Shinn
2d62671df8 breaking down and adding polar notation 2012-07-10 23:19:57 +09:00
Alex Shinn
3e79138e21 Various fixes for better debug output.
* Associate file/line source info with corresponding bytecode offset.
  * Fixes for losing source info after macro expansion and simplification.
  * Fix for showing the source info of the calling procedure of an error.
2012-07-07 15:26:08 +09:00
Alex Shinn
4a8c8a3a75 Fix for string-concatenate on empty lists. 2012-07-07 14:17:02 +09:00
Alex Shinn
a18deb68cc Optional code refactoring.
Chibi uses a lot of #if conditioned code so that configuration
management can be done entirely with the C preprocessor.

Originally this also involved conditional includes of .c files
from other source files.  The alterative, which this change
switches to, is to compile and link all files, and for uneeded
files conditionally eliminate their entire bodies so they compile
to empty object files.

Pros for conditionally including all code into one large file:

  * Don't need to declare most functions (keeps .h files small).
  * Can keep most functions static/inlined (keeps objects small).
  * Don't need to even distribute uneeded files with the default
    Makefile (e.g. can prune opt/* from dist for minimal builds).

Pros for linking multiple possibly empty files:

  * Extensions and third-party libs probably want the exported
    declarations anyway.
  * Static analysis tools work better (e.g. flymake on what previously
    was an included file).
  * Can build each file in parallel (i.e. make -j for faster builds).
  * Can build and link in just the changed files, instead of
    having to recompile the whole thing.

For Chibi these are all minor points - it will be small
regardless, and will build fast regardless - but the arguments
for splitting seem stronger.  Note the new shared lib is about
1k larger, but that can be trimmed down later.
2012-06-21 23:04:07 -07:00
Alex Shinn
f9c640f180 non-string-stream get-output-string concatenated chunks in reverse
order for accumulated output longer than the buffer size (4096 chars)
2012-06-14 10:52:36 +09:00
Alex Shinn
a78919200f Fixing number literal syntax using exponents with an explicit '+'. 2012-06-14 10:22:26 +09:00
Alex Shinn
dc70094472 Allowing arbitrary length #\xNNNN char literals. 2012-06-10 17:50:42 +09:00
Alex Shinn
a979e6ffcf bugfix for reading non-ascii chars 2012-05-19 07:52:17 +09:00
Alex Shinn
7dd7d076dd file descriptors open as binary ports by default 2012-05-18 23:00:30 +09:00
Alex Shinn
658f3cecd5 Fixing string->number for (string->number "[a-f]" 16) case. 2012-05-14 06:41:28 +09:00
Alex Shinn
354ceb2113 Fixing check on valid file descriptors. 2012-05-13 09:39:04 -04:00
Alex Shinn
bc50ae0d34 FFI now accepts integers as unmanaged filenos for convenience.
Also some fixes for (chibi process).
2012-05-13 21:43:02 +09:00
Alex Shinn
ce80d45ff8 Adding custom port support for non-string-stream builds.
String-streams are now disabled by default.
2012-05-06 18:16:17 +09:00
Alex Shinn
cef6bb6794 Various fixes for non-string-streams non-blocking i/o.
Moving open-input/output-file-descriptor to core.
2012-05-06 14:02:31 +09:00
Alex Shinn
7c8203ed0a switching to first-class file descriptor type 2012-04-24 22:42:26 +09:00
Alex Shinn
a1f43475ba output-port? returns #t for input+output ports 2012-04-16 23:50:13 +09:00