Commit graph

17 commits

Author SHA1 Message Date
Alex Shinn
b638b9f1b4 Hygiene change. Removing syntactic closure flattening to
support unhygienic insertion.  Breaks the previous assumption
that syntactic closures were never nested.
2014-01-12 19:29:11 +09:00
Alex Shinn
86d9957ae9 Making sexp_make_primitive_env available from Scheme.
Adding the (chibi primitive) module to access this directly.
2013-09-29 11:05:54 +09:00
Alex Shinn
fd9e9b5bf1 Replacing exact, inexact opcodes with primitive functions. 2013-09-08 17:48:38 +09:00
Alex Shinn
d32cc99cc1 Adding set-current-environment! and using it in the pure-Scheme load.
This is necessary if the loaded file uses import.
2013-09-02 21:05:42 +09:00
Alex Shinn
a6e71e47b8 Adding port-fileno. 2013-08-18 17:45:23 +09:00
Alex Shinn
1736a8306b Adding set-port-line! and using it in the pure Scheme load to preserve source info. 2013-06-02 10:44:10 +09:00
Alex Shinn
a49f14d011 Adding currently immutable (current-module-path). 2013-05-31 23:39:56 +09:00
Alex Shinn
9ed486dbe3 Adding sexp_maybe_wrap_error utility to pass exceptions from the FFI without raising.
Fixes issue #156.
2013-05-29 23:37:30 +09:00
Alex Shinn
63a365f214 Factoring out generate opcode and exporting it. 2013-04-07 20:09:39 +09:00
Alex Shinn
f4b42132a3 Making sexp_env_cell_define available. 2013-04-07 17:08:56 +09:00
Alex Shinn
a61cebb1e9 Thread parameters are still needed when threads are disabled. 2013-02-27 09:04:56 +09:00
Alex Shinn
93ba0926a7 Build fixes for plan9. Moving individual object files out of opt/ since plan9 mkfiles have issues with these. 2012-08-16 16:04:02 +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
c063dadd2e build fixes for global symbols and vm profiling 2012-07-10 22:42:31 +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
85a7efc003 automatically making sockets non-blocking on accept 2012-05-14 08:37:45 -04:00