Strings are deferrable until step 6, so tests of string functionality at
step 4 should be marked as deferrable. A couple of tests just use
strings as convenient constants to return or print. In those cases,
replace the strings with integers rather than deferring the whole test.
The test makes more sense in step6.
Thanks to kanaka for the read-string suggestion.
Introduction of tail call optimization in step5 was making let* affect
the parent environment. This was partially fixed in later steps.
Introduction of macros in step8 was breaking the evaluation of an
empty list. This was fixed by step 9 but never backported.
- Update to support the new behavior of varargs and table.pack/unpack
in lua 5.2
- Bump up the stack overflow test since lua 5.2 seems to support much
larger stacks before overflow.
- Fix a latent issue in if forms where false in the 4th position would
result in nil returned. Add a new test to catch this in the future.
Add a step1 test to make sure that implementations are properly
throwing an error on unclosed strings.
Fix 47 implementations and update the guide to note the correct
behavior.
Fixes made to: ada, c, chuck, clojure, coffee, common-lisp, cpp,
crystal, d, dart, elm, erlang, es6, factor, fsharp, gnu-smalltalk,
groovy, guile, haxe, hy, js, livescript, matlab, miniMAL, nasm, nim,
objc, objpascal, ocaml, perl, perl6, php, plsql, ps, python, r,
rpython, ruby, scheme, swift3, tcl, ts, vb, vimscript, wasm, yorick.
Catchless try* test is an optional test. Not all implementations
support catchless try* but a number were fixed so they at least don't
crash on catchless try*.
The run-fn-for function was originally name run-fn and was hard-coded
to run for 3 seconds. I forgot to replace the 3 with the max-secs
variable. However, given that some implementations have less than
1 iteration per second, I'm just going to drop that division and
report the iterations per max-seconds so that for the slowest
implementations we have some relative comparison instead of all of
them just reporting 0.
Thanks to Tim Morgan for discovering this bug:
699f0ad23a
In Java the time-ms value was negative. This actually still works fine
because arithmetic comparison is still correct. So allow signed
time-ms results.
Concatenating multiple empty lists resulted in a return
which should be empty but was not checked.
(concat (list) (list))
-> ()
Test added to step 7 to catch, since this appeared in
self-hosting step 8 in the -> macro expansion.
Several implementations fail when unescaping "\\n" in their reader
module because string-wide replacements of the two chars '\' and 'n' by
a newline char will replace the last two chars.
- Strip linefeeds in run_argv_test.sh so that step6 arg test passes
for basic.
- Add gensym and convert or macro.
- Add gitignore entries for transpiled basic sources.
- Add conj/seq stubs so that step4 self-host loads (if non-step4
functions are commented out in core.mal)
- Bump up Z% value space by 256 spaces (1K)
- Remove old qb2cbm.sh
- Move apply logic in swap! to APPLY function in types and use that
for macroexpand
- Abort def! if error before updating the environment
- let* wasn't properly saving A2% for the final eval. Also, the
environment release check should be against the top-level EVAL env,
not the root repl env.
- (concat (list) ...) was broken so fix it to ignore empty lists that
aren't in the trailing position.
- nil, false and true in the reader were always being returned as
references (with an ref cnt) but we have the assumption that
references (14) are not ref cnt'd and are always part of a compound
type so fix the reader to just return the interned addresses.
Also:
- Add some step1 and step3 tests that were discovered during Basic
development.
- Move PR_MEMORY* to debug.in.bas
- Simplify Makefile deps
- Fix freeing in steps4-7 when error at deeper level
i.e. (prn (abc))
- add SLICE function to support concat implementation.
Add new mini test harness run_argv_test.sh to run the Mal interpreter
with different command-line arguments and test the stdout of that
process.
The main Makefile will automatically run the new harness whenever step 6
is tested (either directly or during REGRESS=1 of a more advanced step).
- tests/*: marked with deferable and optional runtest flags. Some
moving around of tests within different sections to more closely
align with the guide.
- runtest.py has --deferable/--no-deferable and
--optional/--no-optional to control whether tests marked as
deferable and optional are tested.
- Makefile: DEFERABLE and OPTIONAL top level flags to be passed to
runtest when running tests.
- Also, fix problems in java quoting revealed by step7 test changes.
- Remove most of the step5 excludes in the Makefile except for ones
which don't have TCO capability at all (or the implementation is too
slow): bash, make, mal, matlab.
- Make perf_EXCLUDES consistent with other excludes.
- Add a print-FOO target which prints the resolved value of Makefile
variable FOO. For example, `make print-IMPLS` to print the list of
implementations.