Administrative Issues ^

For all my prodding on top level parrot issues, tcl really has no roadmap, either. If you're at all interested in working on this project, let me know, and I'll work on clarifying.

interactive tclsh

simple interactive mode now exists.

 o Should catch any real_exceptions thrown.
 o respect tcl_prompt1, tcl_prompt2 (Depends on true global support)
 o deal with incomplete input
 o give invalid commands to the system.
[interpinfo name]

how to do this from inside parrot? [ there's a RT ticket for this now, someone should put the # here.]

migrate all these issues to RT.

TODO tests would also suffice, where possible -- For those of you who know tcl, this would be a great place to contribute code - tests based on the latest Tcl man pages will *really* help.

update docs/*

add pod to all .imc

Programming Issues ^

C-level tasks ^

List to String

The current list to string logic in dynclasses/tcllist.pmc is missing logic to properly escape string elements.

string to list

Should be moved to tcllist's set_string method.

tclword

An object is probably too heavyweight for this. A PMC with a few overloaded methods is probably sufficient.

Use PMCs to handle numifying

not the pir routines we now have. Verify that [expr 2a + 2b] behaves appropriately when doing this. Include proper numification of octal and hex.

PIR-level tasks ^

globals vs. lexicals

Right now, globals are done with lexicals. get_var/set_var needs to be updated to check the call_level - if we're at 0, then use a global. [global] and [upvar] will need attention once this is done.

implement default globals, etc.

global variables provided by tcl libary. tclvars.

global variables provided by tcl interpreter. tclsh

source per-user settings. tclsh

misc

hex & unicode escapes are not currently supported in dynclasses/tclparser.pmc's parse. - I have a version of this in my sandbox, but it requires more work from parrot guts.

unimplemented commands/subcommands

[after] [array get] [array names] [array unset] [array statistics] [array anymore] [array donesearch] [array nextelement] [array startsearch] [bgerror] [binary] [case] [clock] [close] [cd] [dde] [encoding] [eof] [exec] [fblocked] [fconfigure] [fcopy] [file] [fileevent] [flush] [gets] [glob] [http] [info] [interp] [library] [lindex] [load] [lreplace] [lsearch] [lset] [lsort] [memory] [msgcat] [namespace] [open] [package] [pid] [pwd] [read] [registry] [regexp] [regsub] [resource] [safe] [scan] [seek] [socket] [subst] [string replace] [string tolower] [string totitle] [string toupper] [string trim] [string trimleft] [string trimright] [string compare] [string equal] [string last] [string bytelength] [string is] [string map] [string wordstart] [string wordend] [switch] [tcltest] [tell] [update] [variable] [vwait]

Tests ^

standards

Any future tests, write more like t/tcl_var_subst.t. Eventually cleanup tests so they're consistent.

Add tests for...

tclword.imc, PMCs, the macros, expr's precedence and parens, [puts]'s ability to write to other channels, the compreg compiler.

[uplevel] [upvar] [lrange] [inline] [string repeat]

pass any test in the tcl test suite ^_^

Uncategorized Issues ^

Remove Perl*

Mostly done. All that seems to be left is PerlUndef. Much was already converted to the internal types. PerlUndef removal will probably result (finally) in the use of null checks where it's being used for that, and TclObject where it's being used for shimmering.

Left in:

./lib/commands/inline.imc ./lib/commands/open.imc ./lib/commands/source.imc ./lib/expression.imc ./lib/get_var.imc ./lib/tclword.imc

tail call optimizations

tail call optimizations - there are several cases where I could use this and save myself a call. Possible to do right now with PASM - wait for PIR support before welding in.

provide a way to access existing library PIR from Tcl.

TclWord

implement is_const to allow for some optimizations in the compiler. (which isn't written yet.) when adding words, default to true, but if at any point we add a variable or a command, invalidate that. (mostly done!)

Move TclWord namespace into _Tcl::Word, less clutter?

multiple level lists

compiler vs. interpreter

it should be possible to further extend our interpreter this to make an actual compiler, where the compiler emits PIR.

And once we have the pir_code, we can either emit the necessary PIR (ala parrot's -o option) or we can compile and run it.

Caveat: how to support -o with user defined procs - right now, proc is defining the sub on the fly, where, with a compiler, we may want to defer compilation, and simply be able to extract the generated PIR.

expr

Clean up [expr]. MUUUUCH room for improvement there. [expr] is the source of most of our abysmal performance in bench.tcl.

the expr AST could use a rework. Be nice if it just passed around something invokable.

clean up expr so that it's not passing around type indicators. - just use PMCs everywhere. (Though we may still need to have CONST vs. VARIABLE types.)

The type indicator is also used to disambiguate operators and function calls from operands. We can easily remove it for operands, but how to cleanly remove this for operators?

TBD: strings, floats as operands - (many of the math funcs return floats but you can't specify them, and not everything takes them (try, for example, [expr sin(1) + sin(1)] vs [expr sin(1) * sin(1)].)

TBD: blocks, commands, and strings as operands

TBD: logical binary ops & ternary op (need deferred evaluation) ; unary ops; ops that work on strings only.

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.

misc

complete [error] (need global var support)


parrot