Commit Graph

61 Commits

Author SHA1 Message Date
JeffBezanson 15c8cb327d finishing initial implementation of keyword arguments
fixing up interpreter so it can be used for bootstrapping again
removing let/copyenv optimization because it really didn't seem to help much
2009-08-02 04:06:07 +00:00
JeffBezanson ecfd81148f changing optional args to allow default values to be computed from
preceding arguments
tidying some stuff with keywords
2009-07-28 04:16:20 +00:00
JeffBezanson 57c066fcdf simplifying code by eliminating the hybrid stack/heap calling convention
other misc. cleanup
2009-07-20 04:57:17 +00:00
JeffBezanson 2c304edf42 changing boot file format; the old one did not preserve sharing
between top-level functions
making colon at the end also valid for keywords
adding keyword? predicate
fixing bug in map
adding functions to emulate values and call-with-values
adding receive macro
improving equal? on closures
adding lambda-lifting optimization to the compiler
2009-07-17 01:30:26 +00:00
JeffBezanson c19aaeabd6 keeping track of function names, printing nice stack traces
changing default bootstrap process to use VM instead of interpreter
fixing bug where only a fixnum could index a vector
merging equal.c into the main compilation unit
2009-07-10 04:17:39 +00:00
JeffBezanson 3793cf676c implementing stack traces
some cleanup
2009-07-06 03:56:48 +00:00
JeffBezanson c42ee12d4c allowing multiple expressions in lambda
making cond a macro
increasing size limit for cvalues on the managed heap, and inline
  allocated hashtables
2009-05-29 04:38:50 +00:00
JeffBezanson c2026ba77c adding gc handles, making evaluator stack static
this provides a better interface and could only help performance
starting to add some useful library code
2009-05-19 02:54:56 +00:00
JeffBezanson 77e37368c9 fixing trace and untrace
replacing function->vector with function:code, function:vals, and
  function:env
2009-05-13 01:13:40 +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 264df1f90b improving closure representation
some performance tweaks
2009-04-28 04:10:18 +00:00
JeffBezanson 0dc4c16276 making procedure? a builtin
fixing type error trying to apply #t, #f, nil
2009-04-24 20:43:56 +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 5ab7a7c1e1 adding new "translucent" function type for byte-compiled lambdas 2009-04-19 22:22:17 +00:00
JeffBezanson aa62ae9e96 allowing (copy x) and other byte stream functions only on plain-old-data types
adding plain-old-data? predicate
adding string.join
2009-04-19 16:48:09 +00:00
JeffBezanson 2ed581e62d adding top-level-value and set-top-level-value!, using them instead of
set and eval where appropriate
adding separate integer? and integer-valued? predicates
2009-04-17 14:41:15 +00:00
JeffBezanson 86b7738c89 cleaning up implementation of apply() entry point
removing use of interpreter in computed calls to builtins
2009-04-17 03:40:52 +00:00
JeffBezanson ad4a086790 converting for to a special form
adding loadi8 instruction
cleaning up numeric comparison, reducing repeated code
2009-04-16 03:05:38 +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 debf3fd517 moving (length) out of core
changing another recursive call to goto
adding special cases in compiler for 0 and 1 argument versions of some
  vararg builtins
beginning implementation of bytecode interpreter
2009-04-09 04:04:27 +00:00
JeffBezanson e119a66bcd moving lognot out of core
fixing type check in ash
2009-04-02 03:53:38 +00:00
JeffBezanson 43e8d1fbf0 adding the ability to heap-allocate extentions to the value stack,
so recursion depth is limited only by the process stack limit.

reorganizing evaluator so the same code is used for evaluating
and pushing arguments for both builtin functions and lambdas.
for now this is slower, but it was done in preparation for
Things To Come.

adding list-head

implementing the calling convention for long argument lists in
bytecode compiler. arguments are broken down into a nest of
list and nconc calls.
also implementing vararg builtins.
2009-04-01 04:31:49 +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 8f93c9dfc6 adding string->number 2009-03-23 19:49:08 +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 5edb75af2c making nconc, assq, and memq builtins
some small optimizations to string.map, string.trim,
string.inc, string.dec, aref
2009-03-17 03:29:17 +00:00
JeffBezanson 5681745bc3 adding apply1, using it in trycatch (avoids consing)
allowing left bit shift to overflow to larger types
fixing bug in number->string on uint64
fixing bug in rand.uint64
2009-03-13 22:26:44 +00:00
JeffBezanson bfa30fb095 allowing logand, logior, logxor to accept any number of arguments
adding negative?, positive?, zero?, even?, odd?, for-each
adding *linefeed*, terpri
2009-03-12 02:47:34 +00:00
JeffBezanson d81e6c2d57 adding ash function
making more functions static
removing list_nth, using vectors for enums instead
making more operators return fixnums where possible
2009-03-11 19:16:40 +00:00
JeffBezanson fdfaacfbe5 adding io.putc, io.tostring!, string.map, print-to-string
fixing bug in ios, not initializing readonly flag
updating string and sizeof to use new strstream functions
removing some redundant numeric type init functions
2009-03-05 03:48:17 +00:00
JeffBezanson 2cf5187ca9 adding dump, memstream, io.read, and io.write
more renaming
allowing iostreams to be read-only
fixing bug allowing arrays with 0-size elements
2009-03-02 04:26:16 +00:00
JeffBezanson c1610f0a9f changing load to expand each expression before evaluating
improve performance by reloading system.lsp with this loader
other misc. changes
2009-02-26 18:15:38 +00:00
JeffBezanson 6c56120669 better solution for allowing an input stream to be relocated while
reading from it
improving prettyprinting of lists of short strings
2009-02-24 02:21:16 +00:00
JeffBezanson 1097597437 file stream creation and io.read 2009-02-09 03:22:31 +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 808d92dfb6 some micro-optimizations 2009-01-16 14:12:35 +00:00
JeffBezanson d8132ad204 adding CPRIM type, smaller representation for primitives
bug fixes in opaque type handling
2009-01-02 23:00:21 +00:00
JeffBezanson 9716ee3452 making list a builtin
increasing default heapsize, giving better performance

adding hexdump and int2str functions to llt
2008-12-31 04:45:08 +00:00
JeffBezanson dc50df083c adding branch probability annotations
wrote a CPS transformer that can be used to provide coroutines

misc. cleanup
2008-12-28 08:01:18 +00:00
JeffBezanson b99d8715ce generic aref/aset for all arrays
(string v) now works on any value, by printing to a string

some bug fixes in ios
2008-12-27 06:02:53 +00:00
JeffBezanson 830e1c986c renaming 'char' type to 'byte' to avoid confusion
wchar will be used for all individual characters

adding string.find function

fixing bug in #sym(...) if sym was undefined
2008-12-24 04:43:36 +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 120522c212 updating bitvector functions to use int64s in more places, since
after all that's the whole point of bitvectors

some prettyprinting tweaks

more uniform way to handle forwarding pointers. fix forwarding
of gensyms

:keyword symbols
2008-10-31 02:50:00 +00:00