Commit Graph

75 Commits

Author SHA1 Message Date
JeffBezanson 332235231c changing semantics to respect lexical scope more strictly; now
anything can be shadowed by closer nested variables
fixing bugs in let-syntax and expanding optional arg default values
improving expansion algorithm on internal define
some small optimizations to the compiler
maintaining interpreter for bootstrapping
2009-08-12 04:56:32 +00:00
JeffBezanson db94d6ef1f adding offset and count arguments to io.write
making io.write output chars as utf8;
  suddenly switching to UTF32 was not intuitive
adding stream argument to newline (R6RS)
adding several more scheme compatibility procedures
2009-08-09 04:04:31 +00:00
JeffBezanson 3fbd5e7da6 adding functions io.copy, io.readall, time.fromstring
adding srfi-6 (string ports) functions
removing unnecessary behavior of sometimes printing int32s and int64s in
  hexadecimal
2009-08-08 23:43:12 +00:00
JeffBezanson 302ddec770 adding read and print support for named characters, e.g. #\space
printing infs and nans in R6RS format
making closure print syntax more compact; fn instead of function
adding more c[ad]+r functions
2009-08-08 21:44:14 +00:00
JeffBezanson 1a6d9d391f adding with-bindings, with-output-to-file, with-output-to
simplifying printing. now based on standard function write,
  removing io.print and io.princ
using same top level exception handler for scripts as repl
2009-08-08 00:29:55 +00:00
JeffBezanson c6a977063e better error checking for formal argument lists
some cosmetic error improvements
adding more tests
2009-08-03 05:00:44 +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 eceeddf6d2 adding support for optional arguments
error checking formal argument lists
making filter preserve the order of elements in the input list
2009-07-27 03:34:33 +00:00
JeffBezanson c61dc10002 adding some combined instructions and teaching the compiler to emit them:
brn, brnn, brne, cadr
2009-07-24 04:20:09 +00:00
JeffBezanson 88d08edecc adding io.pos, io.readlines, read-all
fixing a small ios bug
2009-07-22 03:50:57 +00:00
JeffBezanson 66c671bfee making long argument lists more efficient 2009-07-22 02:10:20 +00:00
JeffBezanson 0278b152b8 fixing a case where tail position was not properly observed 2009-07-21 03:42:15 +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 642d1e1bd4 rewriting some primitives to take advantage of the full language; they
do not need to be written in terms of the base language any more
moving handling of internal define and multiple-body-lambda to the
  compiler where it belongs. macroexpand now only handles syntax.
2009-07-18 02:16:18 +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 2d4a0ae30e adding functions max and min
fixing make-system-image to save aliases of builtins
2009-07-08 19:07:56 +00:00
JeffBezanson 3793cf676c implementing stack traces
some cleanup
2009-07-06 03:56:48 +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 b5897e0ad1 adding maxstack calculation and stack overflow protection
making append benchmark more useful by measuring interpreter
  speed instead of the builtin
2009-06-27 23:07:22 +00:00
JeffBezanson 8decdc4ae4 making append a builtin
making branch destinations relative so we can access the code
  using *ip instead of code[ip]
doing the same to bp (argument access)
small improvement to map, builtin->instruction
better profiling
2009-06-15 02:25:21 +00:00
JeffBezanson 27a3e413d3 adding opcodes loada0, loada1, loadc00, loadc01
adding offset and count arguments to dump
2009-06-08 03:22:32 +00:00
JeffBezanson 17752decf4 implementing support for lambdas with up to 2^32-1 required arguments
using copy-list to implement append2
fixing bug in op_vargc when nrequired==MAX_ARGS
making fetching of multibyte numbers from bytecode portable
some cleanup in compiler
2009-06-06 21:15:54 +00:00
JeffBezanson 91a6ae6490 adding string.width 2009-05-31 22:09:26 +00:00
JeffBezanson e365cb1d33 adding divide by 0 check in div 2009-05-14 02:53:04 +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 3dbaa358f9 making 3rd argument to string.sub optional
some renaming
removing 1/Instructions table
2009-05-07 02:10:52 +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 de19e4f401 adding return special form
eliminating some unnecessary top-level bindings
adding opcodes add2, sub2, neg
2009-04-26 22:19:32 +00:00
JeffBezanson 909b91ffcc fixing printing of invalid UTF-8 2009-04-23 00:22:03 +00:00
JeffBezanson 5ab7a7c1e1 adding new "translucent" function type for byte-compiled lambdas 2009-04-19 22:22:17 +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 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 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 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 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 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 40cff81550 more reorganization of LLT
adding io.readuntil, io.readline
improvements to ios_readprep
2009-03-03 03:16:30 +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 923c7d5495 fixing bug reading negative constants with #b,o,d,x
adding string.trim
2009-02-28 01:59:01 +00:00
JeffBezanson 115b2843fb adding copy and string.count 2009-02-24 04:12:33 +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 3aad0bd6be fixing some bugs in lerror and read
making memory errors non-consing (duh)
cleaning up main() a bit
adding case macro, moving other stuff around a bit
2009-02-20 05:11:05 +00:00
JeffBezanson 0c0471e856 moving implementation of startup, repl, load, and top-level
exception handler into system.lsp

adding several iostream functions

adding support for internal define
2009-02-19 03:31:40 +00:00
JeffBezanson 79e12b2dcb adding io.print and io.princ
misc. touch-ups
2009-02-09 05:38:40 +00:00
JeffBezanson 1097597437 file stream creation and io.read 2009-02-09 03:22:31 +00:00
JeffBezanson 2c1bb59486 adding integer? and number->string
a bit more renaming
2009-02-01 05:41:43 +00:00