summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-05-23 21:36:06 +0100
committerNicholas Clark <nick@ccl4.org>2011-06-11 09:40:01 +0200
commitbc9a525687b7ccee10de7bc6f6a729645b1058dd (patch)
tree2221f1debd001579230e38ef1a3673cd26890cd6 /ext
parentccbcbb3d6584c01ff4c18f0e39e86d6eb181eb4d (diff)
downloadperl-bc9a525687b7ccee10de7bc6f6a729645b1058dd.tar.gz
Don't allow study on an FBM scalar, to give more flexibility in SV flag usage.
No real-world code would ever end up studying an FBM scalar, so this isn't a real pessimisation.
Diffstat (limited to 'ext')
-rw-r--r--ext/Devel-Peek/t/Peek.t26
1 files changed, 24 insertions, 2 deletions
diff --git a/ext/Devel-Peek/t/Peek.t b/ext/Devel-Peek/t/Peek.t
index ec54405c6d..7caccd047e 100644
--- a/ext/Devel-Peek/t/Peek.t
+++ b/ext/Devel-Peek/t/Peek.t
@@ -778,6 +778,10 @@ SKIP: {
or diag $@;
}
+# This is more a test of fbm_compile/pp_study (non) interaction than dumping
+# prowess, but short of duplicating all the gubbins of this file, I can't see
+# a way to make a better place for it:
+
use constant {
perl => 'rules',
beer => 'foamy',
@@ -789,7 +793,7 @@ unless ($Config{useithreads}) {
do_test('regular string constant', perl,
'SV = PV\\($ADDR\\) at $ADDR
- REFCNT = 3
+ REFCNT = 5
FLAGS = \\(PADMY,POK,READONLY,pPOK\\)
PV = $ADDR "rules"\\\0
CUR = 5
@@ -804,7 +808,25 @@ unless ($Config{useithreads}) {
do_test('string constant now an FBM', perl,
'SV = PVGV\\($ADDR\\) at $ADDR
- REFCNT = 3
+ REFCNT = 5
+ FLAGS = \\(PADMY,SMG,POK,READONLY,pPOK,VALID,EVALED\\)
+ PV = $ADDR "rules"\\\0
+ CUR = 5
+ LEN = \d+
+ MAGIC = $ADDR
+ MG_VIRTUAL = &PL_vtbl_bm
+ MG_TYPE = PERL_MAGIC_bm\\(B\\)
+ FLAGS = 0
+ RARE = \d+
+ PREVIOUS = 1
+ USEFUL = 100
+');
+
+ is(study perl, '', "Not allowed to study an FBM");
+
+ do_test('string constant still an FBM', perl,
+'SV = PVGV\\($ADDR\\) at $ADDR
+ REFCNT = 5
FLAGS = \\(PADMY,SMG,POK,READONLY,pPOK,VALID,EVALED\\)
PV = $ADDR "rules"\\\0
CUR = 5