summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2017-10-19 18:18:37 -0700
committerFather Chrysostomos <sprout@cpan.org>2017-10-19 20:11:17 -0700
commit6eed25e2537643b77650cb3e4514ec9dc2e97d74 (patch)
tree7156d8590cfd744f067580c84fadde446330447c
parentf65cb320dfb0701e599232a87aa5fa6a69d79a29 (diff)
downloadperl-6eed25e2537643b77650cb3e4514ec9dc2e97d74.tar.gz
Temporarily revert CV-in-stash optimisation
This reverts two hunks from 6881372e19 to allow CPAN modules some time to conform to the optimisation.
-rw-r--r--op.c2
-rw-r--r--t/op/sub.t1
2 files changed, 2 insertions, 1 deletions
diff --git a/op.c b/op.c
index 4e45800876..95b7971a9c 100644
--- a/op.c
+++ b/op.c
@@ -8596,7 +8596,7 @@ Perl_newATTRSUB_x(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs,
sub is stored in. */
const I32 flags =
ec ? GV_NOADD_NOINIT
- : (IN_PERL_RUNTIME && PL_curstash != CopSTASH(PL_curcop))
+ : PL_curstash != CopSTASH(PL_curcop)
|| memchr(name, ':', namlen) || memchr(name, '\'', namlen)
? gv_fetch_flags
: GV_ADDMULTI | GV_NOINIT | GV_NOTQUAL;
diff --git a/t/op/sub.t b/t/op/sub.t
index f73abb455f..5c501b181e 100644
--- a/t/op/sub.t
+++ b/t/op/sub.t
@@ -423,6 +423,7 @@ is ref($main::{rt_129916}), 'CODE', 'simple sub stored as CV in stash (main::)';
sub foo { 42 }
}
{
+ local $TODO = "CV symbol table optimization only works in main:: [perl #129916]";
is ref($RT129916::{foo}), 'CODE', 'simple sub stored as CV in stash (non-main::)';
}