Commit graph

24 commits

Author SHA1 Message Date
Alex Shinn
461fec8e6d adding build-tests script to verify different build options. 2009-12-27 15:44:28 +09:00
Alex Shinn
5f7201ab04 immediate flonums now work on 64-bit machines.
we pack a 32-bit float so there's no funky rounding issues as
on 32-bit machines.  this reduces heap usage, and avoids
allocations during flonum arithmetic.
2009-12-27 13:37:25 +09:00
Alex Shinn
02a763007d moving disasm to (chibi disasm) module 2009-12-27 01:17:32 +09:00
Alex Shinn
3c2615e2a7 moving file-exists? to (chibi filesystem) 2009-12-27 00:45:28 +09:00
Alex Shinn
7eae77d0f9 converting make-exception to a primitive opcode instead of a foreign
function, since foreign functions will always raise any exception they
return (hence the double catch in issue #15).

also restoring the original exception handler when an exception is
raised in with-exception-handler, so that exceptions within the
handler itself don't cause an infinite loop.  this may change, as
with-exception-handler is meant to be a low-level tool on which to
build either guard or condition-case, but until then the restoring
is necessary.
2009-12-26 16:21:37 +09:00
Alex Shinn
a1941ff08a somewhat reluctantly adding dynamic-wind 2009-12-26 00:50:45 +09:00
Alex Shinn
ffdce3639b adding import-immutable to minimize heap usage 2009-12-20 16:08:19 +09:00
Alex Shinn
828c6cc35a adding support for module search paths
You want to use the CHIBI_MODULE_PATH environment variable now,
not CHIBI_MODULE_DIR, and can use : separators as expected.
The default main now also accepts -I<dir> and -A<dir> to prepend
or append module directories.

The default path is ".:./lib:$PREFIX/share/chibi".  The first
two may be removed in a future version.
2009-12-18 21:26:59 +09:00
Alex Shinn
6fe11ffcd1 Renaming all USE_ settings and all OP_, OPC_ and CORE_ enums
to have an SEXP_ prefix.  Now all values from the headers
are prefixed with either sexp_ or SEXP_, important for ease
of embedding.  "make USE_BOEHM=1" still works as an alias
for "make SEXP_USE_BOEHM=1".

Sorry if this patch breaks your code, it had to be done
sooner or later.
2009-12-18 15:58:23 +09:00
Alex Shinn
8785e85810 fixing arity of arithmetic comparators 2009-12-17 19:02:16 +09:00
Alex Shinn
ce9bc2edeb minor bignum bugfixes 2009-11-30 01:10:15 +09:00
Alex Shinn
8481f543a9 cleanup, making infinities optional, fixing build for plan9 2009-11-23 01:54:22 +09:00
Alex Shinn
3a47a903e8 disasm defaults to printing to (current-error-port) 2009-11-22 17:54:45 +09:00
Alex Shinn
3ecea4d666 adding define_foreign_opt to bind C functions with optional parameters
moving several opcodes to normal FFI functions, considering
doing the same for all I/O opcodes.
2009-11-16 04:04:23 +09:00
Alex Shinn
0581b41b1e adding hash-tables and a more friendly FFI 2009-11-16 00:52:16 +09:00
Alex Shinn
f53e4df208 adding support for runtime definition of new types 2009-11-10 21:50:59 +09:00
Alex Shinn
6afc9f964d stripping syntactic-closures in syntax-rules error messages 2009-11-03 12:57:38 +09:00
Alex Shinn
c4625e1c86 fixnum/integer naming cleanup
Replacing sexp_make_integer, sexp_integerp, etc. with sexp_make_fixnum,
sexp_fixnump, etc.  Defining the old names as variants handling either
fixnums or bignums, or just as aliases for the new terms when compiled
without bignum support.  sexp_make_integer needs to take a context now
in case it generates a bignum.
2009-11-02 23:39:42 +09:00
Alex Shinn
62c390d68e initial module system 2009-10-13 18:29:18 +09:00
Alex Shinn
d36e70f6bf fixing various numeric operations 2009-08-24 22:41:33 +09:00
Alex Shinn
df5b916640 adding initial 9p interface 2009-08-11 01:15:29 +09:00
Alex Shinn
1de49b46ce initial plan9 extensions 2009-07-17 01:58:04 +09:00
Alex Shinn
6d709264bd Cleanup for more pedantic C.
Notably no longer converting from function pointers <-> void*.

Remaining --pedantic warnings:

  * ISO C90 does not support 'long long'
  * ISO C90 does not support the 'z' printf length modifier
  * ISO C90 does not support flexible array members
  * ISO C90 forbids mixed declarations and code
  * ISO C90 forbids specifying subobject to initialize
  * anonymous variadic macros were introduced in C99
  * invalid use of structure with flexible array member

The first one is only used when optional bignums are enabled,
and I have no intention of supporting bignums on systems w/o
long long (although it's not guaranteed two words fit in a
long long - I need to fix this).

The 'z' modifier is necessary for long types (you'd get
warnings the other way without it).

The next 4 are intentional - they make the code cleaner,
and all of these extensions are supported by Plan 9.

The last one is tricky.  I think it refers to the fact
that not only am I using flexible array members, but I'm
using them as non-final alternates in a union.  I'll have
to double check the semantics of this.
2009-07-12 23:46:27 +09:00
Alex Shinn
b1c0ea895b committing initial bignum support, still needs more thorough testing.
can disable with USE_BIGNUMS=0 - the interactions between this and
USE_FLONUMS are messy, so they will likely be merged into a single
option in the near future (i.e. you either have only fixnums, or a
full range of numeric types).
adding rationals based on this would be easy and is a likely future
feature.  adding native support for complex numbers is unlikely.
2009-07-07 19:16:23 +09:00