Tcl Source Code

View Ticket
Ticket UUID: 1571568
Title: [TIP 280] extended 'info frame'
Type: Patch Version: TIP Implementation
Submitter: andreas_kupries Created on: 2006-10-05 16:43:00
Subsystem: 07. Variables Assigned To: andreas_kupries
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2006-11-29 23:55:39
Resolution: Accepted Closed By: andreas_kupries
    Closed on: 2006-11-29 16:55:39
Implementation of 'info frame' going beyond #211.
Derived from the 'info linenum' of #86.
User Comments: andreas_kupries added on 2006-11-29 23:55:39:
Logged In: YES 
Originator: YES


nobody added on 2006-11-29 17:50:45:
Logged In: NO 

close this?

(Donal Fellows, stuck behind a strange proxy...)

andreas_kupries added on 2006-11-29 04:21:14:

File Added - 204834: 280_85.patch_final.diff.gz

Logged In: YES 
Originator: YES

Updated to Head for both branches, added documentation to 8.5 branch.

andreas_kupries added on 2006-11-29 04:20:05:

File Added - 204833: 280_84.patch_final.diff.gz

andreas_kupries added on 2006-11-25 03:28:41:

File Added - 204311: 280_85.patch_base5.diff.gz

andreas_kupries added on 2006-11-25 03:28:40:
Logged In: YES 
Originator: YES

Updated the patches to CVS head of 8.4/8.5 as of Nov 24.
Resolved the conflicts which occured for 8.5 due to code changes.
Fixed the line numbers in the info.test file.

andreas_kupries added on 2006-11-25 03:26:59:

File Added - 204310: 280_85.patch_base5.diff.gz

andreas_kupries added on 2006-11-25 03:26:28:

File Added - 204309: 280_84.patch_base9.diff.gz

andreas_kupries added on 2006-11-22 03:26:50:
Logged In: YES 
Originator: YES


The Tcl 8.5 patch is unconditional.

The Tcl 8.4 patch implements the functionality conditionally.
Define the CPP macro "TCL_TIP280" to activate the functionality.

ecky-l added on 2006-11-02 14:47:46:
Logged In: YES 

some tests for [info frame] still fail... Presumably due to
line movements in the test scripts. Otherwise it works fine
in 8.5a6, as far as I could see.

andreas_kupries added on 2006-10-31 03:26:24:

File Added - 200682: 280_85.patch_base4.diff.gz

andreas_kupries added on 2006-10-31 03:26:23:
Logged In: YES 

Next 8.5 (base4). Fixed crashes and test failures. This one
should be good for testing.

andreas_kupries added on 2006-10-28 07:35:32:

File Added - 200338: 280_85.patch_base3.diff.gz

Logged In: YES 

Next 8.5 (base3). New: Completed handling of 'apply' (aka
lambda). Interpreted dift for/with/filter-script, bcc dict
for, bcc switch. First handling of {expand}. NOTE!! This is
known to crash tests in compile.test, and basic.test (It
passes info.test). Patch has been added more to have it safe
somewhere else than on my machine, than for testing and use.

andreas_kupries added on 2006-10-27 06:20:48:

File Added - 200210: 280_85.patch_base2.diff.gz

Logged In: YES 
Originator: YES

Next 8.5 patch (base2). Updated test cases (tcltest
locations changed slightly), additional comments. Test cases
for {expand} added. Two of them known to fail, demonstrating
that {expand}{literal list} is not tracking line numbers
inside. Yet.

andreas_kupries added on 2006-10-27 01:40:17:

File Added - 200175: 280_85.patch_base1.diff.gz

Logged In: YES 

Next set of patches, base8 for 8.4, base1 for 8.5. Fixed a
bug in the new code handling interpreted switch, forgot a
qualifying condition when releasing data from the context.
DecrRefcount on a path tcl_obj which was no such, but a
bytecode*, this smashed its interphandle.

andreas_kupries added on 2006-10-27 01:36:30:

File Added - 200173: 280_84.patch_base8.diff.gz

andreas_kupries added on 2006-10-26 06:07:43:

File Added - 200049: 280_85.patch_base0.diff.gz

andreas_kupries added on 2006-10-26 06:07:42:
Logged In: YES 

First (base0) 8.5 patch. Fails 4 test cases, otherwise ok.
Equivalent to 8.4 base7 patch. This patch does not yet deal
with {expand} yet, nor compiled 'switch', nor 'dict for'
etc. I.e. 8.5 specific pieces have not been done yet.

dkf added on 2006-10-26 06:03:43:
Logged In: YES 

As the author of the [switch] compiler, I can say that yes,
it's doing things that are horrific. I learned the hard way
(through many crashes in testing) that tokens *must* refer
to the position of the token string within the overall
script or things go badly askew. The way I ended up doing
this is definitely a hack, but it is a safe one since any
time the compiler can't be sure, it just falls back to the
interpreted code (throwing up its hands in horror in the

andreas_kupries added on 2006-10-26 05:44:43:

File Added - 200048: 280_84.patch_base7.diff.gz

Logged In: YES 

Next 8.4 (base7). Implemented line tracking for 'switch',
additional tests for that, and ensured that dynamic procs
return type 'proc'. Switch is a bit of a beast with its
single and multi-word modes. In the single-word mode we have
to track lines inside the list holding the patterns and
branch scripts. Unavoidable even if the data is later not
used. In 8.5 modifying the script compile function is ...
difficult. A draft forward port has been done, but fails
parts of the testsuite ...

andreas_kupries added on 2006-10-24 07:07:55:
Logged In: YES 

It will be relevant for the 8.5 implementation. Should use
'memset', then set all the non empty fields.

msofer added on 2006-10-24 06:55:35:
Logged In: YES 

The comments reminds me: TclApplyObjCmd also does not
initialise procPtr->cmdPtr properly, the only non-trash
field is nsPtr. Not sure if this is relevant.

andreas_kupries added on 2006-10-24 06:42:44:

File Added - 199673: 280_84.patch_base6.diff.gz

Logged In: YES 

Next (base6). Fix bug in Proc setup and cleanup for
precompiled bytecode (tbcload). Setup assumed that 'line'
infomration was not NULL, but can happen, i.e. for
precompiled bc. Cleanup crashed because iPtr was assumed to
be valid. Is not for precompiled bc. This also exposed a bug
in tbcload, ExtractFromProcBody (file cmpRead, line 2567)
does not fully initialize the Proc structures it allocates.
Bogus non-NULL proc->iPtr cannot be checked for validity.
The 'cmdPtr' field is not initialized either. Working on
tbcload patch ...

andreas_kupries added on 2006-10-20 07:49:26:

File Added - 199041: 280_84.patch_base5.diff.gz

Logged In: YES 

Next (base5). Fixed the majority of the knownBug test cases,
i.e. 'if 1 $body' etc. Currently the only remaining knownBug
is the handling of cont. lines in {...}-words.

andreas_kupries added on 2006-10-20 04:30:55:

File Added - 199018: 280_84.patch_base4.diff.gz

Logged In: YES 

Next (base4). Moved the normalization from 'info frame' to
'source'. Otherwise the 'file' entry in the result can be
wrong for relative paths (pwd changed between the calls of
'source' and 'info frame'). Thanks to Don Porter for
pointing this out. Should have no impact on performance due
to 'source' already doing normalization for reading the
file, and the result of that getting cached. Also removed
some debugging cruft from compile.test ... File now
unchanged again.

andreas_kupries added on 2006-10-20 03:54:38:

File Added - 199005: 280_84.patch_base3.diff.gz

andreas_kupries added on 2006-10-20 03:54:37:
Logged In: YES 

Next patch (280 base3). normalized 'file' entry, bugfix in
use of path which seg.faulted when using 'info frame 0' at
the console of an interactive shell. Additional testcases,
mostly 'knownBug'.

andreas_kupries added on 2006-10-19 23:58:46:

File Added - 198967: 280_84.patch_base2.diff.gz

Logged In: YES 

Uploading new patch (280 base2). Fixed the use of newer gcc
features which crept in and break with older versions of
gcc, or other native compilers (c++ var decl in the middle
of a block, mixing macro usage with #ifdef).

andreas_kupries added on 2006-10-19 03:48:09:

File Added - 198830: 280_84.patch_base.diff.gz

Logged In: YES 

Uploading a new patch implementing the TIP in 8.4. changes:
TIP reference 86/211 -> 280, code is conditional
(TCL_TIP280),  bug fixes (mem leaks).

andreas_kupries added on 2006-10-05 23:43:00:

File Added - 196736: 211_84_base2.diff.gz