#279 limit shimmer of singleton lists

open-postponed
5
2007-04-24
2003-05-16
Don Porter
No

If a Tcl_Obj is a single value, we lose it's intrep
when converting to the "list" objType.

We can avoid loss of intrep by just making the
object into the first element of the objPtr
array of the List struct, so long as we're careful
about string reps that would be broken into
multiple elements.

Here's a patch that almost works. It makes
test append-4.8 fail. Comments?

Discussion

  • Don Porter

    Don Porter - 2003-05-16
     
    Attachments
  • Kevin B KENNY

    Kevin B KENNY - 2007-04-20
    • assigned_to: kennykb --> msofer
     
  • Kevin B KENNY

    Kevin B KENNY - 2007-04-20

    Logged In: YES
    user_id=99768
    Originator: NO

    Is this still an issue after so long? (I know that you have been in the code a good bit more recently than I have.)

    Don's patch no longer applies.

    Avoiding shimmer of singletons sounds like a good idea, if we can make it go.

     
  • miguel sofer

    miguel sofer - 2007-04-20

    Logged In: YES
    user_id=148712
    Originator: NO

    Attached a current patch with three shortcuts:
    - it avoids most work for empty strings
    - it avoids computing the string rep for numbers
    - it avoids losing the internal rep for singletons that do not have a string rep

    I am a bit mystified as to why the qualification about not having a string rep is necessary; without it, failures at: append-4.8, appendComp-4.8, opt-[3.1/3.2/5.1], safe-7.2

    File Added: listDiff

     
  • miguel sofer

    miguel sofer - 2007-04-20
    • assigned_to: msofer --> dgp
     
  • miguel sofer

    miguel sofer - 2007-04-20
     
    Attachments
  • miguel sofer

    miguel sofer - 2007-04-20

    Logged In: YES
    user_id=148712
    Originator: NO

    New patch after first comments
    File Added: listDiff

     
  • miguel sofer

    miguel sofer - 2007-04-20
     
    Attachments
  • miguel sofer

    miguel sofer - 2007-04-20

    Logged In: YES
    user_id=148712
    Originator: NO

    Mystery solved: a string that contains backslashes or braces needs full parsing. Updated patch, committed.
    File Added: listDiff2

     
  • miguel sofer

    miguel sofer - 2007-04-20
    • assigned_to: dgp --> msofer
    • status: open --> closed-accepted
     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2007-04-24
    • priority: 5 --> 8
    • status: closed-accepted --> open-accepted
     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2007-04-24

    Logged In: YES
    user_id=72656
    Originator: NO

    This patch causes Tk's border-1.1, bitmap-1.1 and cursor-1.1 to fail.

     
  • miguel sofer

    miguel sofer - 2007-04-24

    Logged In: YES
    user_id=148712
    Originator: NO

    * generic/tclListObj.c: reverting [Patch 738900] (committed on
    2007-04-20). Causes some Tk test breakage of unknown importance,
    but the impact of the patch itself is likely to be so small that
    it does not warrant investigation at this time.

     
  • miguel sofer

    miguel sofer - 2007-04-24
    • priority: 8 --> 5
    • status: open-accepted --> open-postponed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks