Commit graph

9 commits

Author SHA1 Message Date
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