summaryrefslogtreecommitdiff
path: root/pad.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-03-08 13:40:48 +0000
committerNicholas Clark <nick@ccl4.org>2006-03-08 13:40:48 +0000
commit1dba731d9f7b0a03b8cecb69b9d80500a283425e (patch)
tree8ef86d80db20e147b6170a449e303a7b1c1c194d /pad.c
parent69f571849d518b6e7953b40abe5d05d244a0d6f9 (diff)
downloadperl-1dba731d9f7b0a03b8cecb69b9d80500a283425e.tar.gz
Add MAD changes to pad code (new function Perl_pad_peg)
p4raw-id: //depot/perl@27419
Diffstat (limited to 'pad.c')
-rw-r--r--pad.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/pad.c b/pad.c
index 10c82c5dc0..4a24216d4c 100644
--- a/pad.c
+++ b/pad.c
@@ -113,7 +113,12 @@ to be generated in evals, such as
#define PAD_MAX 999999999
-
+#ifdef PERL_MAD
+void pad_peg(const char* s) {
+ static int pegcnt;
+ pegcnt++;
+}
+#endif
/*
=for apidoc pad_new
@@ -233,6 +238,7 @@ Perl_pad_undef(pTHX_ CV* cv)
I32 ix;
const PADLIST * const padlist = CvPADLIST(cv);
+ pad_peg("pad_undef");
if (!padlist)
return;
if (SvIS_FREED(padlist)) /* may be during global destruction */
@@ -468,6 +474,7 @@ Perl_pad_add_anon(pTHX_ SV* sv, OPCODE op_type)
dVAR;
PADOFFSET ix;
SV* const name = newSV(0);
+ pad_peg("add_anon");
sv_upgrade(name, SVt_PVNV);
sv_setpvn(name, "&", 1);
SvIV_set(name, -1);
@@ -584,6 +591,7 @@ Perl_pad_findmy(pTHX_ const char *name)
const AV *nameav;
SV **name_svp;
+ pad_peg("pad_findmy");
offset = pad_findlex(name, PL_compcv, PL_cop_seqmax, 1,
NULL, &out_sv, &out_flags);
if (offset != NOT_IN_PAD)