runs the script according to the R6RS semantics, then starts a
repl in an interaction environment made of everything visible
(imported and defined) in the script.
Use cases include:
* debugging a script.
* starting ikarus in some predefined environment, e.g.,
$ ikarus --r6rs-repl rnrs.ss
where rnrs.ss contains (import (rnrs))
Also, interaction-environment is made a parameter with an initial
value set prior to entering the repl.
- it now takes an optional environment (it was required)
- it no longer returns a second value (list of libraries)
- it's output is "pretty".
the old expand is now called core-expand.
syntax: (stale-when guard-expr e* ...) ;; in definition context
(stale-when guard-expr e e* ...) ;; in expression context
semantics:
When a stale-when form is encountered while expanding any code
(expressions, macros, macros in macros, etc.) in a library
body, the guard-expr is expanded (but not evaluated) and
serialized along with the library. When the library is later
reloaded from fasl and before it is installed, the guard-expr
is evaluated. If guard-expr returns true, the fasl content is
ignored and the library is recompiled afresh from source.
`(annotated-call ,annotation ,rator ,rands ...)
form for cases when there is an annotation attached to the procedure
call. The compiler just stripps it out and makes no use of it.
where id->label was prematurely interning identifiers in the
environment. Now, there is id->label/intern that does that and it's
only used when an identifier's type is resolved and not at other
times (like in free-id=? and bount-id=?).
It returns syntax-object wrapped with the marks and substitutions
that have been added to new-id since its introduction as base-id.
The new-id and base-id should be free-identifier=? and new-id
should have the same (or more) marks as base-id.
changed in order to allow large structures (e.g., libraries,
syntax objects, etc.) to print efficiently. This is done by only
traversing the parts of the structure that will actually be
printed, rather than traversing the whole data structure (which is
what write/display used to do). Pretty-print should be fixed in a
similar manner (TODO).
exported by the environment. Try
> (environment-symbols (environment '(rnrs)))
- Added an internal export mechanism so that identifiers can be
exported from within a library. The syntax is the same:
(export export-spec* ...)
when appears in a library's top level, adds the export specs to
the set of exported identifiers. So, one can do:
(library (A)
(export)
(import (ikarus))
(export a)
(define a 17))
When appearing in non-library definition context, the export form
is ignored.
indices (r6rs requirement).
- file-options are now represented as enum-sets (r6rs requirement)
- odd?, even?, lcm, remainder, etc., now accept inexact integers.
- (optimize-level [0,1,2]) and ikarus -O[0,1,2]
where -O0 = no optimizations
-O1 = using old optimizer
-O2 = using the new cp0 optimizer
defaults to -O1 for now.
- (cp0-size-limit n) which is the limit of the residual size for
each inlining attempt
- (cp0-effort-limit n) which is the limit on the effort expended
for each inlining attempt
- Rewrote the syntax-match macro to make use of the same technology
used in syntax-case itself resulting in reduced code size.
- Added (system-value <symbol>) which returns the system value.
E.g., (system-value 'car) => #<procedure car>
This is pretty much the same as
(eval <symbol> (environment '(ikarus)))
except that it does not involve compiling the expression or
consulting the library/expander systems.
- Fixed the fasl loader to make it understand complex numbers.
top-marked wrapped syntax objects were incorrectly combined.
E.g., it used to be that:
(syntax-case (datum->syntax #'foo #'(x y)) ()
[(x y) 'shouldntmatch] [_ 'ok])
yields shouldntmatch; it's now ok.