diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-11-17 10:49:11 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-11-17 13:49:08 -0800 |
commit | 7cc6787e9dbebdd83799d997361188ab6dfe8ead (patch) | |
tree | 4995effc7d08b08a0cbf8f1fbc94b28e3eea3bd7 /mro.c | |
parent | 7dc8663964c66a698d31bbdc8e8abed69bddeec3 (diff) | |
download | perl-7cc6787e9dbebdd83799d997361188ab6dfe8ead.tar.gz |
8c34e50dc slowed down detruction with no DESTROY
I changed it to cache the DESTROY method in SvSTASH(stash), instead
of amagic tables, for the sake of speed. But I made no distinction
between ‘no cache’ and ‘no DESTROY method’. So classes with no
DESTROY method became as slow as perl 5.6.
To solve that, I’m using an adjusted pointer (following the example
of warnings.h) to mean ‘intentionally blank’.
I also fixed two instances of the DESTROY cache not being updated,
introduced by that commit.
Diffstat (limited to 'mro.c')
-rw-r--r-- | mro.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -578,6 +578,7 @@ Perl_mro_isa_changed_in(pTHX_ HV* stash) revmeta->cache_gen++; if(revmeta->mro_nextmethod) hv_clear(revmeta->mro_nextmethod); + if (!SvOBJECT(revstash)) SvSTASH(revstash) = NULL; (void) hv_store( @@ -1356,6 +1357,7 @@ Perl_mro_method_changed_in(pTHX_ HV *stash) mrometa->cache_gen++; if(mrometa->mro_nextmethod) hv_clear(mrometa->mro_nextmethod); + if (!SvOBJECT(revstash)) SvSTASH(revstash) = NULL; } } |