Commit graph

33 commits

Author SHA1 Message Date
Alex Shinn
a13e30ce7d Checking for negative values in make-vector. 2013-12-30 09:42:12 +09:00
Alex Shinn
fd9e9b5bf1 Replacing exact, inexact opcodes with primitive functions. 2013-09-08 17:48:38 +09:00
Alex Shinn
e464f30ba2 When write-char fails and no scheduler is loaded, wait 5ms to avoid busy looping. 2013-08-11 15:34:15 +09:00
Alex Shinn
13b540418e C-level string API redesign with cursor support.
s/sexp_string_length/sexp_string_size/
Make sexp_string_ref/sexp_string_set Unicode aware.
Provide cursor level alternatives for efficiency.
Document all of this.
2013-07-21 14:59:51 +09:00
Alex Shinn
fb858ac5fe Missing vm changes for non-raised FFI exceptions from a7ffc1f42a2b. 2013-05-31 23:29:07 +09:00
Alex Shinn
07c6e3765b Initialize record fields to void. 2013-04-05 20:20:03 +09:00
Alex Shinn
122d8b8a00 Properly handling +nan.0 and infinite comparisons. 2012-11-10 20:53:16 +09:00
Alex Shinn
f792329eed Raising an error for inexact->exact on non-finite numbers. 2012-11-09 23:05:25 +09:00
Alex Shinn
8ea2cc0071 Removing stray edit. 2012-11-05 08:16:28 +09:00
Alex Shinn
33326888f0 Making rationalize on inexact numbers agree with the standard.
I still think this is pointless though.
2012-11-04 21:39:55 +09:00
Alex Shinn
60c96d76a4 Checking for utf8 encoding exceptions in read/peek-char. 2012-10-13 21:59:38 +09:00
Alex Shinn
94ef945f8d fixing operator precedence bug in stack limit checks 2012-10-03 21:30:50 +09:00
Alex Shinn
ff74a8928f returning the result of the root thread when it terminates before the child 2012-09-17 16:54:17 +09:00
Alex Shinn
2154f78b13 also printing the root context when debugging threads 2012-09-17 15:26:51 +09:00
Alex Shinn
d56d6fd8c6 Printing error messages when child threads terminate by default. 2012-09-17 15:03:48 +09:00
Alex Shinn
eaf41d2ce8 typo in write-char opcode 2012-08-26 14:07:13 +09:00
Alex Shinn
b31b52909e add a sleep to avoid busy work when the scheduler isn't loaded and we block on an output port 2012-08-25 13:37:30 +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
9510e5b5c2 busy loop on EAGAIN when srfi-18 isn't loaded instead of returning EOF 2012-08-07 22:30:34 +09:00
Alex Shinn
275bf31b13 adding optional thread debugging output 2012-07-21 17:28:09 +09:00
Alex Shinn
57b2bc281d apply opcode is now tail-recursive - calling it in a non-tail position is an error 2012-07-18 21:34:53 +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
a5e4bb86ec making sure the exception procedure is valid before trying to lookup its source 2012-07-17 08:27:29 +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
065cdf5d5f checking type of exception procedure when propagating source info 2012-07-16 14:10:48 +09:00
Alex Shinn
c063dadd2e build fixes for global symbols and vm profiling 2012-07-10 22:42:31 +09:00
Alex Shinn
e54f400c57 additional checks for NULL source info 2012-07-09 20:05:53 +09:00
Alex Shinn
87fc698e6e Catching case when bytecode source is NULL. 2012-07-08 12:27:07 +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
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
08e4fead8b small fixes and warning removals for build tests 2012-06-20 21:39:52 -07:00
Alex Shinn
85a7efc003 automatically making sockets non-blocking on accept 2012-05-14 08:37:45 -04:00