ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Faster/Faster.xs
(Generate patch)

Comparing Faster/Faster.xs (file contents):
Revision 1.3 by root, Thu Mar 9 22:32:17 2006 UTC vs.
Revision 1.5 by root, Thu Mar 9 23:42:41 2006 UTC

3#include "XSUB.h" 3#include "XSUB.h"
4 4
5typedef CV *B__CV; 5typedef CV *B__CV;
6 6
7static OP *(*old_entersub)(pTHX); 7static OP *(*old_entersub)(pTHX);
8
9int count = 1;
10 8
11// this is, of course, a slower entersub 9// this is, of course, a slower entersub
12static OP * 10static OP *
13faster_entersub (pTHX) 11faster_entersub (pTHX)
14{ 12{
24 PL_op->op_ppaddr = old_entersub; 22 PL_op->op_ppaddr = old_entersub;
25 23
26 // only simple cv calls for now 24 // only simple cv calls for now
27 if (!PL_perldb && !PL_tainting 25 if (!PL_perldb && !PL_tainting
28 && SvTYPE (sv) == SVt_PVCV && !CvXSUB (sv) 26 && SvTYPE (sv) == SVt_PVCV && !CvXSUB (sv)
27 && CvSTART (sv) // must exist
29 && CvSTART (sv)->op_type != OP_NULL) // shield against compiling an already-compiled op 28 && CvSTART (sv)->op_type != OP_NULL) // shield against compiling an already-compiled op
30 { 29 {
31 SV *bsv = newSViv (PTR2IV (sv)); 30 SV *bsv = newSViv (PTR2IV (sv));
32 31
33 ENTER; 32 ENTER;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines