Tcl TODOs
Milestones
The next *big* milestone is to be able to run tcl's test suite natively. That means being able to deal with all the commands in:
http://cvs.sourceforge.net/viewcvs.py/tcl/tcl/library/tcltest/tcltest.tcl?view=markup
This will require a lot of work. On the plus side, we'll be passing a lot more tests by then. =-)
- 0
-
Add the "unknown command" logic from the (commented out) tclcommand's interpret to the compiled version, and then remove the interpret :method.
- 1
-
Generate compiler-variants for several builtins, esp. those used by examples/bench.tcl
Modify the compiler for tclcommand to generate the inline version if it's available. (
proc
andexpr
should also be straightforward, as they already compile anyway.) [Completed: incr, break, continue, for, while]Note: compiled builtins always take two args: the register_num to begin using for the inlined code, and a single container pmc that contains the pre-parsed arguments. They return just like the compile methods in lib/tcl*.pir, that is, the register_num the result is in, and the inlinable code.
- 2
-
When an inline compiled version exists, use it, but IFF a global counter indicates no procs have been redifined. Update proc and rename to increment this counter whenever they are called.
- 3
-
Add compiled TclComment objects, which do nothing other than generate PIR comments with the same text.
- 4
-
It would be nice if
--pir
generated human readable output. As long as it's functionally equivalent, internally generated PIR need not be pretty.
Generic tasks
- pbc_merge
-
Take advantage of the new
pbc_merge
to combine the various .pbc files into a singleton. - Makefile deps
-
Should be more explicit about the PMC dependencies in the makefile. *something* is causing things to get rebuilt unecessarily each time "make tclsh" is run.
PIR tasks
- keyed access
-
tcl is not using Keys when getting from aggregates. It probably should, at least for language interoperability.
- implement default globals, etc.
-
global variables provided by tcl libary. tclvars.
global variables provided by tcl interpreter. tclsh
source per-user settings. tclsh
Design tasks
- provide a way to access existing library PIR from Tcl.
-
Perhaps via [namespace import]? Can fake it right now with [inline]
refactoring tasks
- [expr]
-
clean up the generated expr subs so that they use a unique id. (in add to being anon)
Add "is_const" global which checks to see if something is, in fact, constant. (which will allow us to then constant fold. Leo assures us that constant folding isn't necessary at the language level, but.)
TBD: ternary op
TBD: functions that take > 1 arg.
TBD: Argument type requirements - Currently works ONLY on bitand - esp need to get any that require int-only args, as we can now /generate/ floats, even if we cannot specify them. This is all supportable by MMD - we just need to specify the correct errors to throw.
Things we can't do yet (need parrot)
- [regexp], [regsub], -regexp
-
Don't have a tcl-style RE PGE class avaialable yet.
- [pwd], [cd] [#???]
-
Need this to run tcltest
- [interpinfo name] [#36277]
-
how to do this from inside parrot? Design issue: what's the right answer? if we're called as
parrot tcl.pbc foo.tcl
, do we report justparrot
, orparrot tcl.pbc
? - [after], [vwait]
-
pending the event system thunk.
4 POD Errors
The following errors were encountered while parsing the POD:
- Around line 20:
Expected text after =item, not a number
- Around line 34:
Expected text after =item, not a number
- Around line 40:
Expected text after =item, not a number
- Around line 45:
Expected text after =item, not a number