diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-10-16 18:04:28 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-10-16 21:51:46 -0700 |
commit | 8771da69db30134352181c38401c7e50753a7ee8 (patch) | |
tree | 10c5d26ce8e3d86763deb53b5d0a1e68d860ea90 /pp_ctl.c | |
parent | 61c8799482f9e533904bfe832138c24064709f7d (diff) | |
download | perl-8771da69db30134352181c38401c7e50753a7ee8.tar.gz |
Used pad name lists for pad ids
I added pad IDs so that a pad could record which pad it closes over,
to avoid problems with closures closing over the wrong pad, resulting
in crashes or bizarre copies. These pad IDs were shared between
clones of the same pad.
In commit 9ef8d56, for efficiency I made clones of the same closure
share the same pad name list.
It has just occurred to be that each padlist containing the same pad
name list also has the same pad ID, so we can just use the pad name
list itself as the ID.
This makes padlists 32 bits smaller and eliminates PL_pad_generation
from the interpreter struct.
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -3273,7 +3273,8 @@ Perl_find_runcv_where(pTHX_ U8 cond, IV arg, U32 *db_seqp) switch (cond) { case FIND_RUNCV_padid_eq: if (!CvPADLIST(cv) - || CvPADLIST(cv)->xpadl_id != (U32)arg) continue; + || PadlistNAMES(CvPADLIST(cv)) != (PADNAMELIST *)arg) + continue; return cv; case FIND_RUNCV_level_eq: if (level++ != arg) continue; |