Tcl Source Code

View Ticket
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.
Ticket UUID: 1698093
Title: tighter mem handling in tebc
Type: Patch Version: None
Submitter: msofer Created on: 2007-04-11 03:11:12
Subsystem: 47. Bytecode Compiler Assigned To: msofer
Priority: 5 Medium Severity:
Status: Open Last Modified: 2008-06-13 17:44:49
Resolution: None Closed By:
    Closed on:
Description:
The enclosed patch causes that only the depth of the catch ranges be computed: this allows for tighter mem handling in tebc, which needs to alloc memory for each catch nesting level.

OTOH:

(1) the nesting level of loops is an interesting datum for stats and debugging, and it gets lost

(2) the mem required for each catch nesting level is just sizeof(Tcl_Obj *) - nothing. So overestimating it as now is cheap. Also, bodies with very deep nesting of loop bodies should be very rare.

This is a RFC.
User Comments: dkf added on 2007-04-11 16:00:52:
Logged In: YES 
user_id=79902
Originator: NO

I'm not 100% sure that the comment is maximally informative :-) but the technical content of the patch looks reasonable.

I am left wondering whether it would be possible to have some way of detecting the type of exception range at compile time, allowing for some streamlining of the compiler as well as TEBC.

msofer added on 2007-04-11 10:34:18:
File Deleted - 224480: 



File Added - 224481: exceptDiff4

Logged In: YES 
user_id=148712
Originator: YES

File Added: exceptDiff4

msofer added on 2007-04-11 10:29:21:
File Deleted - 224477:

msofer added on 2007-04-11 10:29:20:
File Added - 224480: exceptDiff3

Logged In: YES 
user_id=148712
Originator: YES

Sorry, wrong patch - corrected now.
File Added: exceptDiff3

msofer added on 2007-04-11 10:13:09:
Logged In: YES 
user_id=148712
Originator: YES

Forget for now - segfaults :(

msofer added on 2007-04-11 10:11:15:
File Added - 224477: exceptDiff2

Attachments: