This patch implements the Tcl [dict] command as found
in Tcl 8.5. The implementation passes the dict
test-suite (except for a couple of tests which rely on
other 8.5isms that aren't in Jacl yet). There are still
some issues with the implementation. I think I've
eliminated all ref-counting crashes, but there are a
few memory leaks which need to be plugged (search for
TODO in the sources of TclDict.java/DictCmd.java). In
general, the patch needs much more testing, but I
thought I'd upload it now as I'm not sure when I'll
next be able to work on it.
Two files are attached: dict.tar.gz adds 3 files:
src/jacl/tcl/lang/{TclDict,DictCmd}.java are the actual
implementation, and tests/tcl/dict.test is the
test-suite, adapted slightly for Jacl (e.g. removing
uses of lset and unset -nocomplain etc). The dict.patch
makes some minor changes to Interp.java (registers the
"dict" command in the standard environment) and
TclObject.java (adding equals and hashCode methods for
easy storing in hashtables).
TclDict.java, DictCmd.java and dict.test
Patch to Interp.java and TclObject.java