Skip to content
Tcl Source Code History Of Ticket 1237040fffffffff
Login

History Of Ticket 1237040fffffffff

Artifacts Associated With Ticket 1237040fffffffff

  1. Ticket change [3437de7041] (rid 106723) by dkf on 2005-07-12 23:54:53:

    1. assignee initialized to: "msofer"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      This is a first hack at compiling the [dict] command.
      It passes the test suite cleanly for me (clock.test is
      a pretty good workout of many of the features that are
      compiled.)
      
      
    4. foundin initialized to: "None"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "dkf"
    9. subsystem initialized to: "47. Bytecode Compiler"
    10. title initialized to: "dict compiler"
    11. type initialized to: "Patch"
  2. Ticket change [c9edfd3496] (rid 122372) by dkf on 2005-07-13 06:54:53:

    1. icomment:
      
      
      File Added - 141861: bccDict.diff
      
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  3. Ticket change [68bd518a60] (rid 103119) by dgp on 2005-07-14 04:12:56:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      On line 2774 of the patched
      tclCompCmds.c, shouldn't
      
      (wordTokenPtr[0].type == TCL_TOKEN_SIMPLE_WORD)
      
      be
      
      (wordTokenPtr[1].type == TCL_TOKEN_SIMPLE_WORD)
      
      ?
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  4. Ticket change [aaf568cb42] (rid 101012) by dgp on 2005-07-14 04:15:51:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      I'm a bit surprised to see
      TclCompileDictCmd use
      repeated strncmp() calls
      for subcommand parsing.
      
      Wouldn't it make more sense
      to copy TclCompileStringCmd()'s
      technique of using Tcl_GetIndexFromObj() ?
      
      If not, does it make sense to do the
      reverse, and have the [string] subcommands
      parsed as the [dict] ones are?
      
      I think it would be best not to use two
      different techniques in the same
      source code file without a really
      good reason.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  5. Ticket change [919af75b50] (rid 120642) by dgp on 2005-07-14 04:24:27:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      On the subcommand parsing
      topic, I note that the [string]
      compiler accepts unique prefixes
      of subcommands for compiling
      ([string comp] for example).  Will
      have to consider whether the
      [dict] compiler will copy that.
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  6. Ticket change [173a141f04] (rid 122453) by dgp on 2005-07-14 04:26:42:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      I note that the direct evaluation
      implementation of [dict] does
      accept unique prefixes, so it seems
      strange that the [dict] compiler
      refuses to compile them.  That
      suggests to me that copying
      the [string] compiler routine is
      the way to go.
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  7. Ticket change [1d2e357aff] (rid 90756) by dgp on 2005-07-14 04:31:56:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      This is true about pre-existing code
      as well, but might as well mention it:
      
      The variable name "nameChars" is
      misleading as the value it holds is
      a number of bytes, not a number of
      characters.  Would be a good idea
      to change them all.
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  8. Ticket change [6955e6be8a] (rid 103230) by dgp on 2005-07-14 04:47:18:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      I don't see the value of the
      TclLooksLikeInt() call in
      the compile of [dict incr].
      It tells us approximately whether
      we have an int value, by at
      least rejecting string that
      do not "look" right.
      
      If it passes, we move on to
      an actual Tcl_GetIntFromObj()
      call which tells us for sure whether
      we have an int value.
      
      I don't see the point of a half-test
      right before the real test.  I suppose
      it could help us fail faster, but is
      that really important?  The check
      also makes us succeed slower,
      and success ought to be the normal
      mode.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  9. Ticket change [d4b7f0f410] (rid 123499) by dkf on 2005-07-14 21:00:07:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      1: wordTokenPtr[0].type is correct (but better written as
      wTP->type). I didn't write the way tokens operate...
      2: I hadn't thought of doing that, but it's not a major
      issue. I do worry about having a table of subcommands in two
      locations though.
      3: I'm trying to ensure that the compilation works, and
      extending coverage to all possible prefixes is a low-value
      issue, since it is Good Practice to not rely on prefixes at all.
      4: I'm not going to do anything about this in this patch.
      5: It's a cargo-cultist copying from the [incr] compiler.
      i.e. yet another thing to fix outside the context of this
      patch :-)
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  10. Ticket change [1e7955ca7d] (rid 90984) by dkf on 2005-07-14 21:04:40:

    1. icomment:
      
      
      File Deleted - 141861: 
      
      
      
      File Added - 142041: bccDict_2.diff
      
      Logged In: YES 
      user_id=79902
      
      Here's an updated patch that includes compilation of [dict
      append] and [dict lappend] as well.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  11. Add attachment "bccDict_2.diff" [b4b0cde237] (rid 125089) by dkf on 2005-07-14 21:04:40.

  12. Ticket change [926a8add95] (rid 120757) by dgp on 2005-07-15 00:54:16:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      line 5076 of tclExecute.c
      dynamically allocates a
      Tcl_DictSearch.  Any reason
      not to use an automatic variable
      instead?
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  13. Ticket change [f99e051cf7] (rid 91736) by dgp on 2005-07-15 11:22:41:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      Um, ignore my last comment.
      
      Clearly nested [dict for] commands
      will compile to a stream of bytecode
      that would execute in many iterations
      through TEBC, but not nested TEBC
      calls.  Dynamic allocation is correct.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  14. Ticket change [eb53c4a636] (rid 103530) by dkf on 2005-07-15 17:46:26:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      By automatic variable, do you mean a local temporary Var or
      a C variable or what?
      
      Storing the Tcl_DictSearch in the bytecode structure won't
      work because of recursion. Putting the value in a
      (stack-allocated) C variable could work, but it'd be tricky
      to get right because you can nest iterations (and we really
      want to reduce the amount of stack space required for TEBC
      anyway) which means you'd have to keep an array (or list) of
      them; you could do it, but it'd be a lot of work to get
      right (not that we couldn't do this in the future, of
      course, but it would break the TDK compiler if we did it
      whereas my current solution remains compatible on this front
      at least). The easiest way is to store the iterator context
      in a Var, since they're handled right anway, which is what I
      do. :^)
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  15. Ticket change [51805e1ec9] (rid 126151) by dkf on 2005-08-28 19:42:54:

    1. status changed to: "Closed"
  16. Ticket change [3ba352d13c] (rid 112780) by dkf on 2005-08-28 19:42:55:

    1. assignee changed to: "dkf"
    2. icomment:
      Logged In: YES 
      user_id=79902
      
      the dict compiler has been in the HEAD for a while now
      
      
    3. login: "dkf"
    4. mimetype: "text/plain"
    5. resolution changed to: "Accepted"
    6. username: "dkf"
  17. Ticket change [f4f3fa20c6] (rid 130016) by dkf on 2005-08-28 19:42:57:

    1. closedate changed to: "2005-08-28T12:42:57"
    2. closer changed to: "dkf"