#279 limit shimmer of singleton lists

open-postponed
miguel sofer
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

1 2 > >> (Page 1 of 2)
  • 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
     
1 2 > >> (Page 1 of 2)