Changeset 14698 for dan

Show
Ignore:
Timestamp:
06/27/08 15:54:47 (5 months ago)
Author:
yappo
Message:

with から外れたら ppaddr を元に戻すのとベンチマークスクリプト追加

Location:
dan/perl/Object-with/branches/yappo
Files:
1 added
2 modified

Legend:

Unmodified
Added
Removed
  • dan/perl/Object-with/branches/yappo/lib/Object/with.pm

    r14697 r14698  
    3939        delete $TMP_METHOD_CACHE{$name}; 
    4040    } 
     41 
     42    _leave($code); 
    4143 
    4244    @ret; 
  • dan/perl/Object-with/branches/yappo/with.xs

    r14692 r14698  
    2727 
    2828 
    29 void with_walkoptree_simple(pTHX_ OP *o) { 
     29void with_walkoptree_simple(pTHX_ OP *o, int is_leave) { 
    3030  if (o->op_type == OP_ENTERSUB) { 
    31     o->op_ppaddr = with_entersub; 
     31    o->op_ppaddr = is_leave ? PL_ppaddr[PL_op->op_type] : with_entersub; 
    3232  } 
    3333 
     
    3535    OP * kid; 
    3636    for (kid = cUNOPo->op_first; kid; kid = kid->op_sibling) { 
    37       with_walkoptree_simple(aTHX_ kid); 
     37      with_walkoptree_simple(aTHX_ kid, is_leave); 
    3838    } 
    3939  } 
     
    5050        CV *code; 
    5151    CODE: 
    52         with_walkoptree_simple(aTHX_ CvROOT(code)); 
     52        with_walkoptree_simple(aTHX_ CvROOT(code), 0); 
     53 
     54void 
     55_leave(code) 
     56        CV *code; 
     57    CODE: 
     58        with_walkoptree_simple(aTHX_ CvROOT(code), 1);