Commit Graph

21 Commits

Author SHA1 Message Date
JeffBezanson 57c066fcdf simplifying code by eliminating the hybrid stack/heap calling convention
other misc. cleanup
2009-07-20 04:57:17 +00:00
JeffBezanson 494e439510 using lisp value stack for call frames instead of the C stack
adding the ability to grow the value stack as needed

the net effect is that calls use much less space, and stack frames
can use all available heap space. the only downside is that C builtins
must be aware that the stack can change out from under them if they call
lisp code. currently the only example of this is table.foldl.

also fixing bug where exceptions failed to unwind the gc handle stack.
2009-07-03 18:43:15 +00:00
JeffBezanson 63edc82ba4 using global variables uniformly for print settings instead of passing
around one of them
fixing unwind-protect not to duplicate code
2009-05-05 04:01:06 +00:00
JeffBezanson 25812731cc eliminating interpreter. the bytecode VM is now fully bootstrapped.
making the empty vector a singleton
removing syntax environment stuff from core
reimplementing eval using the compiler
fixing a couple bugs in long argument lists
2009-04-21 00:56:05 +00:00
JeffBezanson 36a209cd5f making = a builtin
fixing = and eqv? to work properly on NaNs
fixing other comparison predicates to be consistent
2009-04-15 23:54:43 +00:00
JeffBezanson 672558d30f bytecode vm is now working, off by default
various bug fixes

language changes:
• constant symbols no longer shadow everything
• eval* removed
• vararg lists always allocated on entry, dotted argument
  lists not preserved

new applyn() entry point
2009-04-15 00:12:01 +00:00
JeffBezanson 4cb9685266 adding support for arbitrarily-long argument lists
argument lists are heap-allocated after a certain cutoff (currently 127)
2009-03-27 03:06:55 +00:00
JeffBezanson fe72c101e2 avoiding sprintf for error messages where possible
moving raise, logand, logior, logxor, and ash out of core
changing prog1 to a special form
2009-03-25 02:28:21 +00:00
JeffBezanson a9b0f7879b removing some unnecessary stuff
improving key-error
2009-03-23 20:44:19 +00:00
JeffBezanson 9023705d27 adding some error messages
adding io.seek, io.copyuntil
adding #\uHHHH hex character literal read syntax
2009-03-22 02:05:26 +00:00
JeffBezanson 17d81eb4e6 adding #b, #o, #d, #x numeric literals
accepting r6rs IEEE literals +-nan.0 and +-inf.0
printing distinguished -0.0, indicating float with .0f instead
of #float, double with .0 instead of #double

more renaming (? on predicates, ! on mutating operators)
changing T to #t :( all those #s are so ugly
2009-02-01 01:53:58 +00:00
JeffBezanson a55b46e9a6 switching to scheme #t, #f, and () values
porting code to sort out which NILs are false and which are
empty lists

switching to scheme-style special forms. however you feel about
scheme names vs. CL names, using both is silly.

mostly switching to scheme predicate names, with compatibility
aliases for now. adding set-constant! to make this efficient.

adding null?, eqv?, assq, assv, assoc, memq, memv, member

adding 2-argument form of if
allowing else as final cond condition

looking for init file in same directory as executable, so flisp
can be started from anywhere

renaming T to FL_T, since exporting a 1-character symbol is
not very nice

adding opaque type boilerplate example file

adding correctness checking for the pattern-lambda benchmark

bugfix in int2str
2009-01-29 01:04:23 +00:00
JeffBezanson 8197197ced misc. cleanup
adding without-delimited-continuations

adding skeleton for stream objects
2009-01-05 02:45:21 +00:00
JeffBezanson 8e4ba69a7b more efficient representation for small tables
adding tablep and table.clone

fixing bug with filename string in load
2008-12-22 06:36:50 +00:00
JeffBezanson dfacb4d897 making all builtins print readably; (builtin 'sym) function
hash table functions:
adding get,put,has,del,table.foldl,table.pairs,table.keys,table.values
2008-12-21 05:55:00 +00:00
JeffBezanson b5dda68eab adding support for finalization of values
enabling type-specific print and relocate behavior

allowing GC to be triggered by large buffer allocations

adding hash table constructor and print function

renamed some functions
2008-12-20 06:16:00 +00:00
JeffBezanson 6962211e76 changing representation of cvalue types so each type is
explicitly represented in an fltype_t struct, and symbolic
types are hash-consed. a lot of code is smaller and simpler
as a result. this should allow more features in less space
(both code and data) going forward.

changing \DDD and \x escape sequences to read bytes instead of
characters

re-fixing uint64 cast bug

adding Paul Hsieh's hash function, to be evaluated later
2008-12-11 04:04:17 +00:00
JeffBezanson a4bb09bcb2 adding equalhash.c
some cleanup

moving some library code around for size optimization

now using == instead of flt_equals for float comparison, mostly
for hash compatibility
2008-11-28 21:44:59 +00:00
JeffBezanson e7e5677d51 support reading hex float literals
better text representation of infs and nans

removing construction of low-level numeric types directly from strings

adding hash function corresponding to equal

better way to initialize builtins

moving advanced bitvector ops to separate compilation unit

rearranging hash table code so it can be specialized for different
comparison functions

one good way to bloat a piece of software is to add several
ASCII pictures of the mona lisa
2008-11-23 07:12:37 +00:00
JeffBezanson c89111f7cb refactored escape sequence handling a bit, added error for invalid hex
discarding rest of input line after a parse error
made compare() do less work for unordered comparison
added peekc and purge to ios
2008-11-06 04:04:04 +00:00
JeffBezanson 6f934a817b I decided it was rather random that set was the only function
that could access the current environment dynamically. It also
differed unnecessarily from common lisp set in this respect.

So now setq is a builtin special form that sets lexical or
global variables, and set is a function that sets global variables.

Rather than eliminate the power of the dynamic set, I extended it
by adding eval*, which evaluates its argument in the current
environment. The justification for this is that the interpreter
is already dynamic enough to allow it with no overhead, so the
ability might as well be exposed.

cleanup; removing some magic numbers

beginning hash tables
2008-09-06 22:19:51 +00:00