- 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.
- combine some lines
- remove some unnecessary spaces and parens
- add string allocations to single routine in types
Also:
- remove blank lines in qb2cbm.sh output (does not save memory)
Also:
- command lines arguments are implemented by creating a file
".args.mal" that contains a list of arguments and that is loaded by
the run script (load-file) into -*ARGS*-. The rest is put in *ARGV*
and the first element is pulled out and used as the script name.
- fix string reading/printing using new REPLACE function
- add RE function to skip printing and to get back evaluated value
(result must be freed by caller). Needed for step6 to get first
argument pointer for scripting.
- Sync earlier steps
- add cons, first, rest to support parsing the command line.
- eval is implemented as standard function in core.in.mal
- fix println bug (using PR_STR rather than PR_STR_SEQ)
- change sequence printing to save the initial sequence type on the
stack and use that for the ending sequence delimeter. This way
sequences of one type can still use the tail of sequences of
a different type but still be considered the initial type.
- Add TCO recur to let*
- Release of all memory from recursive function and let* calls.
- Fix a number of cases of trying to release already freed memory.
- Print function in memory as 2 byte unit rather than two separate
memory locations.
Also:
- More/better detail in PR_MEMORY/PR_MEMORY_SUMMARY
- Fix *.prg image build (for running under Vice). Have to lower-case
everything since what C64/Vice shows as capitals are actually
lowercase.
Also:
- qb2cbm.sh: Add KEEP_REM level variable to tweak which REM/comments
are emitted/skipped.
- fix printer issue with recursive sequences after evaluation (with
refeerences in them)
- add stats target
This works with cbmbasic from https://github.com/mist64/cbmbasic. The
cbmbasic interpreter needs to be on the PATH.
The actually sources are *.in.bas which are "compiled" to *.bas using
the qb2cbm.sh. qb2cbm.sh translates from a QBasic-ish format to a line
numbered source with include files inlined (REM $INCLUDE: 'file.bas').
One additional advantage is that the *.in.bas versions can also be
indented and qb2cbm.sh will remove the indenting in the translated
code.