Menu

#503 tighter mem handling in tebc

open
5
2008-06-13
2007-04-11
No

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.

Discussion

  • miguel sofer

    miguel sofer - 2007-04-11
    • assigned_to: dkf --> msofer
     
  • miguel sofer

    miguel sofer - 2007-04-11

    Logged In: YES
    user_id=148712
    Originator: YES

    Forget for now - segfaults :(

     
  • miguel sofer

    miguel sofer - 2007-04-11
    • assigned_to: msofer --> dkf
     
  • miguel sofer

    miguel sofer - 2007-04-11

    Logged In: YES
    user_id=148712
    Originator: YES

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

     
  • miguel sofer

    miguel sofer - 2007-04-11
     
  • miguel sofer

    miguel sofer - 2007-04-11

    Logged In: YES
    user_id=148712
    Originator: YES

    File Added: exceptDiff4

     
  • Donal K. Fellows

    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.

     
  • Donal K. Fellows

    • assigned_to: dkf --> msofer