cvsuser     04/11/27 16:47:11

  Modified:    languages/tcl TODO
  Log:
  did some
  
  Revision  Changes    Path
  1.15      +54 -165   parrot/languages/tcl/TODO
  
  Index: TODO
  ===================================================================
  RCS file: /cvs/public/parrot/languages/tcl/TODO,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- TODO      21 Nov 2004 21:15:00 -0000      1.14
  +++ TODO      28 Nov 2004 00:47:11 -0000      1.15
  @@ -2,20 +2,44 @@
   
   =over 4
   
  +=item submit prs' one in email, other is regarding fixedpmcarray (and 
other's) use of Perl* pmcs.
  +
  +=item underscore'd subs...
  +
  +are no longer required. Strip them out, as it will simplify processing.
  +
  +=item PMC based parser -
  +
  +Instead of the current PIR level parsing, we should instead use
  +a pmc - not only should this improve speed slightly, but will help
  +us implement the [parser] builtin.
  +
  +=item string to list 
  +
  +Should be moved to tcllist's set_string method. (but this requires first
  +moving the parser into a pmc.)
  +
  +=item given PGE
  +
  +[string match] [regexp] [regsub] [switch] [glob]
  +
  +=item migrate all these issues to RT.
  +
   =item tclword
   
   An object is probably too heavyweight for this. A PMC with a few overloaded
   methods is probably sufficient.
   
  -=item From Use-perl Journal
  +=item Insure that the right thing happens when shimmering between a list and 
a string.
   
  -Remove any dependence in Tcl's PIR on the Perl* PMCs.
  +For example, insure that:
   
  -Provide the ability to generate Tcl Lists from within Tcl
  -(that is, write [list]), and insure that the right thing happens when 
shimmering between a list and a string. For example, insure that:
  -puts '[string range [list 1 2 3] 0 2]'
  + puts '[string range [list 1 2 3] 0 2]'
  + 
   Actually generates
  -'1 2'
  +
  + '1 2'
  +
   which will have been shimmered from a TclList (returned by [list]) to a 
TclString
   
   =item From leo - cleanup of tcl objects.
  @@ -33,7 +57,7 @@
   These changes are necessary to make a PMC compliant with incremental GC.
   Please grep through the docs and the sources for DOD_WRITE_BARRIER.
   
  -=item REMOVE Perl*
  +=item 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
  @@ -54,10 +78,6 @@
   possible macro get_var, also. and whatever's left in expression.imc
   (__expr_get_*)
   
  -=item Why do we still have tcl.imc_template?
  -
  -if we keep it, should be generating lib/tcllib.imc anyway, not tcl.imc. 
  -
   =item Freeze/Thaw of TclWord would ...
   
   allow us to build a braindead compile
  @@ -70,33 +90,14 @@
   and save myself a call. Possible to do right now with PASM - wait for
   PIR support before welding in.
   
  -=item string manipulation
  -
  -Look around and see if we can avoid doing as many substr's, particularly
  -in __parse. (every substring we don't actually need takes up more
  -resources. better to just index things until we're sure we need
  -the substring.
  -
   =item provide a way to access existing library PIR from Tcl.
   
   =item add benchmarks?
   
  -=item Dynamic Tcl PMCs, build, switch.
  -
  -We are currently using Perl* pmcs in a few more places. In some cases,
  -we need Resizable PMCs, and the core versions are not fully implemented.
  -
  -When converting to Tcl*, be sure to take advantage of morphing. Right now,
  -we're kind of avoiding morphing. (like, having separate new PerlInt and 
  -PerlString conditionally depending on the code path.) (fixed in string)
  -
  -We need to go through and eliminate all references to Perl:
  -(This is done for PerlInt, PerlString. Get rid of PerlHash, PerlArray)
  -
   =item cross language compatibility 
   
  -We need to also make sure that we /take/ any PMC and try to do the right
  -thing. Don't /require/ that someone pass in a TclString when a PerlString
  +We need to make sure that we I<take> any PMC and try to do the right
  +thing. Don't I<require> that someone pass in a TclString when a PerlString
   will work fine, thanks. This is now a bigger issue when using the [list] ops.
   if someone passes in a fixed list and we need to resize it... what do we do?
   
  @@ -126,17 +127,13 @@
   
   =item TclWord
   
  -implement C<is_const> to allow for some optimizations in the compiler.
  +implement C<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?
   
  -=item (LOW) PIR varnames
  -
  -Bitten by overuse of generic IMC vars like $I0 - should reduce their usage as
  -much as possible to simplify upkeep.
  -
   =item [[list]] proc
   
   doesn't handle varargs.
  @@ -167,6 +164,7 @@
   
    ??/??/??: 8-12 x slower, single call
    05/14/04: 500 calls in a loop slows us down to 60x!
  + 11/22/04: 500 calls in a loop: only 10x slower!
   
   =item Tests
   
  @@ -175,88 +173,31 @@
   
   =item Add tests for...
   
  -tclword, [concat], [join]
  +tclword.imc tcl*.pmc
  +[concat] [join] [list] [llength] [lappend] [linsert] [lrepeat]
  +[lrange] [array set]
  +the macros?
  +expr's precedence and parens
  +[puts]'s ability to write to other channels.
   
  -=item 
  +=item update docs/* 
   
  -update docs/* - with the parser/interpreter split, things are different.
  +with the parser/interpreter split, things are different.
   (And, hopefully, easier.)
   
  -=item TCL Pmcs
  -
  -Then, we can simplify anything that is dealing with numbers to just pass
  -around the Numbers.
  -
  -Then, we need to verify that things like [expr 2a + 2b] fail to produce 4.
  -(That is, Tcl is pickier about numifying than Perl)
  -
  -=item Dynamic PMCs
  +=item Use PMCs to handle numifying
   
  -get new TCL pmcs to work dynamically, not just statically. This is actually
  -a big PITA, because of the inter-related PMCs.
  -
  -(write tests for them)
  +not the pir routines we now have. Verify that [expr 2a + 2b] behaves
  +appropriately when doing this. Include proper numififcation of octal and
  +hex
   
   =item test suite patches
   
   need to patch testall so that it's not so cranky about people
   who don't play nice with the new tests...
   
  -=item Tcl PMCs
  -
  -NB: All this code was backed out (of tcl.imc, the dynclasses are still 
  -checked in) because of the issues with DYN Tcl PMCS!
  -
  -TclLists now correctly promote natives to their respective types.
  -Now, fix TclArrays to do the same. (look for references to undef(),
  -replace with pmc_new(interp,enum_class_TclString) - we'll use the
  -TclString in the same way they use undef, to auto-morph to the right
  -value. Lazy, but effective.
  -
  -Find the bits of code where we were specifically creating a TclString
  -before inserting it into a TclList, and remove them - should be
  -able to just add the string and have it JFW at this point.
  -
  -=item TCL_Object
  -
  -To simplfy the conversion code, We're going to pass around tcl_object
  -pmc's instead of strings, both as return values from procedures and
  -builtins, and pass them in to the strings as well. This will let us
  -get rid of all the conversion code that's everywhere, and just DTRT.
  -
  -For now, get working with our current repetoire, strings, arrays, 
  -and ints. Once we have arrays working in this method, adding in lists
  -I<should> be a piece of cake. beg borrow and steal from the PerlScalar
  -implementation, as that does much the same thing we need to.
  -
  -Ok. Strings, Ints and Floats should inter_convert without a problem.
  -There are Arrays and Lists also, which are NOT part of the TclObject
  -Hierarchy. Lists still don't autoconvert to strings, though they should
  -not sure how to autoconvert a string to a list... perhaps it should
  -happen automatically on keyed access (which right now does a substr)
  -
  -Ok. All references to any Perl types (other than PerlUndef, which bears
  -investigation before we rip it out. - Probably used mainly on hash 
  -lookups - should ditch it and go with "return NULL;" in the pmcdef, and
  -then use isnull rather than our current PerlUndef check in IMC)
  -
  -Now, go through all the commands, ops, and functions to cleanup how
  -we handle these objects - remember that TclList and TclArray are NOT
  -currently descended from tclobject, and this may bollux some things up.
  -
  -=item SArray vs. PerlArray/TclList
  -
  -investigate using SArray vs. TclList for speed. (many times we don't
  -know how many slots we're going to need ahead of time, though.) - looks like
  -we might be able to use them for the expression stuff that we are passing
  -around.... which, now that we have real Tcl PMCs, can probably go away
  -
  -(most uses of PerlArray are gone, now that we are using foldup)
  -
   =item unfinished commands
   
  -[array set] - written - write tests.
  -
   [array statistics] - useless?
   
   [array anymore], [array donesearch] [array nextelement], [array startsearch]
  @@ -271,33 +212,15 @@
   [string bytelength], [string compare], [sring is], [string map],
   [string match], [string wordstart], [string wordend]
   
  -=item channels
  -
  -keep track of channels, include stdin, stdout, stderr - keep in a
  -global hash of name to ParrotIO pmcs. Tie in with "puts" and other
  -chanel based commands. (some progress made here.)
  -
   =item given [list]
   
   [foreach]
   
  -=item given REs
  -
  -"string match" (it's glob-style, but easy to do given REs)
  -
   =item given [string match]
   
   The following items require [string match] to be implemented: [array get],
   [array names], [array unset]
   
  -=item given Unicode
  -
  -Need unicode support for \u escapes, and for "string wordend",
  -"string wordstart", "string is", "string bytelength", 
  -
  -This now works in parrot, modulo support for actually, oh, printing things
  -out.
  -
   =item given arrays
   
   [string map]
  @@ -319,11 +242,6 @@
   from operands. We can easily remove it for operands, but how to cleanly
   remove this for operators? 
   
  -TBD: big rethunk.
  -
  -TBD: octal, hex. (there's no way to convert programmatically from an
  -octal or hex string in parrot to a int?)
  -
   TBD: strings, floats as operaands - (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)].)
  @@ -340,14 +258,6 @@
   even if we cannot specify them. {This probably requires switching to Tcl*
   PMCs and putting the logic in there hidden under MMD}
   
  -(aside - expression needs better error handling support, and perhaps
  -a rethunk on how we're passing data around - FYI, if we're going to be using
  -PerlInt, PerlNum, etc, we need to make sure they stringify as tcl
  -expects them to - a PerlNum of 5 -> "5" instead of "5.0", e.g.)
  -
  -cmd_expr.t should check prededence, parens, etc, as well as all the
  -defined ops and functions.
  -
   =item misc
   
   tclsh normally does some extra processing that we aren't doing, namely
  @@ -362,7 +272,7 @@
   
   =item misc
   
  -octal, hex, and unicode escapes are not supported. (Not sure parrot is
  +octal and hex escapes are not supported. (Not sure parrot is
   ready for this yet)
   
   =item tests 
  @@ -377,17 +287,6 @@
   If the return type of the outermost script is not OK, return the
   I<appropriate> code to the system.
   
  -=item misc
  -
  -list variables - stringToList already exists (had to write it for "proc"s
  -argument handling.) - need to write listToString, need to be able to save
  -Lists as variables.  - This should now be possible, with the addition of the
  -Tcl* PMCs.
  -
  -Expressions are a bit harder because we need an additional
  -bit of information. (is this an op, an operand, or "a chunk that is yet to
  -be evaluated)
  -
   =item missing procs
   
   Here's a list of commands from the 7.3 Ousterhout book that have yet to be
  @@ -402,15 +301,11 @@
       support in parrot. Well, upvar, anyway. implementing uplevel
       may require a rethunk. 
   
  -  switch  {regexp regsub "string match"}
  -
  -  linsert, lreplace, lrange, lsearch, lsort, split, foreach, scan
  +  lreplace, lsearch, lsort, foreach, scan
   
     cd, file, pwd, pid, glob
   
  -  seek, tell, open, close, eof, flush, read, gets
  -
  -  open, close
  +  seek, tell, open, close, eof, flush (use pioctl?), read, gets, close
   
     info, exec {use exec/spawn opcodes.}
   
  @@ -418,19 +313,17 @@
   
     unknown, history [ only in interactive mode ]
   
  -  regexp, regsub
  - 
     * isn't a recent distro of tcl
     
     And, here are more from a more recent tcl in no order.
   
     after bgerror binary case clock dde
  -  encoding fblocked fconfigure fcopy fileevent filename
  -  http interp {setup our current single interp as an object?}
  +  encoding fblocked fconfigure (use pioctl?) fcopy fileevent filename
  +  http interp {setup our current single parser/interp as an pmc?}
     library lindex load lset memory
     msgcat namespace package packagens
     pkgMkIndex re_syntax registry resource
  -  safe socket subst tcltest
  +  safe socket subst (use our parser?) tcltest
     update variable vwait
    
     also see "man n tclvars"
  @@ -463,10 +356,6 @@
   open, global, uplevel (GAH), regsub (GAH), fconfigure (GAH), file (GAH)
   exec (GAH)
   
  -=item test macros?
  -
  -     is_space
  -
   =back 4
   
   =cut
  
  
  

Reply via email to