This uses the existing mechanism for statically compiled C libraries,
to allow the user to export their own C libraries in a similar way.
User exported libraries can be added on top of statically compiled C
libraries or exist on their own (by setting SEXP_USE_STATIC_LIBS_EMPTY).
This is lighter-weight than building a full index->cursor table for
the string, adding a constant two words to the memory required to
store a string, as opposed to one word for every n characters. The
cached cursor is used for any string-ref operation requesting an index
after the most-recently-requested index, making potentially quadratic
repeated string-ref procedures run in linear time. In theory, it could
also use a heuristic to speed up moving backwards through the string
when it thinks that moving the old cursor backwards would be faster
than starting again at the start of the string. In practice, my
logging of when the cached cursor is actually reused during the Chibi
compilation and startup process shows that the most common case of
moving backwards is going back to the start of the string anyway.
Benchmarks to follow.
This restores third-party (ab)users of the Chibi macro system such
as in https://gist.github.com/baguette/2632464, while allowing us
to break those uses in more interesting ways.
It also keeps the core slightly smaller (both in C and Scheme)
and speeds up the macro expansion process.
Checks for invalid parameter names and duplicate parameters were
being performed on parameter lists, but these checks were not
considering any rest parameters. This means that
((lambda (x . x) x) 'foo 'bar) => foo
((lambda (x . 0) x) 'foo 'bar) => foo
((lambda (x . #t) x) 'foo 'bar) => foo
((lambda 0 'foo)) => foo
((lambda #t 'foo)) => foo
and so on. Now these all produce errors.
sexp_double_to_ratio_2, which converts without introducing
round-off errors the way sexp_double_to_ratio does when it
multiplies by 10.
Changed sexp_inexact_to_exact to use this new function when
a non-zero fractional part of the input exists.
Try to fix win32 port. Now it runs both on Win32/Win64.
Win64 port currently depends on 128bits arithmetic thus it does not run on
MSVC.
Makefile now have EXCLUDE_POSIX_LIBS knob to exclude posix related library
from build.
Introduce msys PLATFORM for Makefile.detect to use MSYS's POSIX
emulation layer. It is intended for linking against MSYS tools; it is
not for embedding to Win32 applications.