summaryrefslogtreecommitdiff
path: root/op.h
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2011-12-07 11:29:27 +0000
committerDavid Mitchell <davem@iabyn.com>2012-06-13 13:32:46 +0100
commit2a92a97368adae0667f9a98890bb48727ed74e54 (patch)
tree7574572be9929ef6633dad50b46aa91c89d7d1ea /op.h
parent6f635923850b5cd9fcb7399e6455299f0371c5ff (diff)
downloadperl-2a92a97368adae0667f9a98890bb48727ed74e54.tar.gz
add PMf_IS_QR flag
This indicates that a particular PMOP is in fact OP_QR. We should of course be able to tell this from op_type, but the regex-compiling API only gets passed op_flags. This then allows us to fix a bug where we were deciding during compilation whether to hang on to the code_blocks based on whether the PMOP was PMf_HAS_CV rather than PMf_IS_QR; the latter implies the former, but not the other way round.
Diffstat (limited to 'op.h')
-rw-r--r--op.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/op.h b/op.h
index 06437d475f..b7e8614c99 100644
--- a/op.h
+++ b/op.h
@@ -441,7 +441,12 @@ struct pmop {
* code within another sub, with different pad etc */
#define PMf_CODELIST_PRIVATE (1<<(PMf_BASE_SHIFT+11))
-#if PMf_BASE_SHIFT+11 > 31
+/* the PMOP is a QR (we should be able to detect that from the op type,
+ * but the regex compilation API passes just the pm flags, not the op
+ * itself */
+#define PMf_IS_QR (1<<(PMf_BASE_SHIFT+12))
+
+#if PMf_BASE_SHIFT+12 > 31
# error Too many PMf_ bits used. See above and regnodes.h for any spare in middle
#endif