This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make dquote_static.c available to ext/re/
[perl5.git]
/
op.h
diff --git
a/op.h
b/op.h
index
04fc374
..
a29d516
100644
(file)
--- a/
op.h
+++ b/
op.h
@@
-54,7
+54,7
@@
typedef PERL_BITFIELD16 Optype;
#define BASEOP \
OP* op_next; \
OP* op_sibling; \
#define BASEOP \
OP* op_next; \
OP* op_sibling; \
- OP* (
CPERLscope(*op_ppaddr))(pTHX);
\
+ OP* (
*op_ppaddr)(pTHX);
\
MADPROP_IN_BASEOP \
PADOFFSET op_targ; \
PERL_BITFIELD16 op_type:9; \
MADPROP_IN_BASEOP \
PADOFFSET op_targ; \
PERL_BITFIELD16 op_type:9; \
@@
-142,6
+142,10
@@
Deprecated. Use C<GIMME_V> instead.
/* On OP_HELEM and OP_HSLICE, localization will be followed
by assignment, so do not wipe the target if it is special
(e.g. a glob or a magic SV) */
/* On OP_HELEM and OP_HSLICE, localization will be followed
by assignment, so do not wipe the target if it is special
(e.g. a glob or a magic SV) */
+ /* On OP_MATCH, OP_SUBST & OP_TRANS, the
+ operand of a logical or conditional
+ that was optimised away, so it should
+ not be bound via =~ */
/* old names; don't use in new code, but don't break them, either */
#define OPf_LIST OPf_WANT_LIST
/* old names; don't use in new code, but don't break them, either */
#define OPf_LIST OPf_WANT_LIST
@@
-360,43
+364,44
@@
struct pmop {
#define PM_SETRE(o,r) ((o)->op_pmregexp = (r))
#endif
#define PM_SETRE(o,r) ((o)->op_pmregexp = (r))
#endif
+/* Leave some space, so future bit allocations can go either in the shared or
+ * unshared area without affecting binary compatibility */
+#define PMf_BASE_SHIFT (_RXf_PMf_SHIFT_NEXT+7)
+
/* taint $1 etc. if target tainted */
/* taint $1 etc. if target tainted */
-#define PMf_RETAINT (1<<(
_RXf_PMf_SHIFT+1
))
+#define PMf_RETAINT (1<<(
PMf_BASE_SHIFT+0
))
/* match successfully only once per reset, with related flag RXf_USED in
* re->extflags holding state. This is used only for ?? matches, and only on
* OP_MATCH and OP_QR */
/* match successfully only once per reset, with related flag RXf_USED in
* re->extflags holding state. This is used only for ?? matches, and only on
* OP_MATCH and OP_QR */
-#define PMf_ONCE (1<<(
_RXf_PMf_SHIFT+2
))
+#define PMf_ONCE (1<<(
PMf_BASE_SHIFT+1
))
/* replacement contains variables */
/* replacement contains variables */
-#define PMf_MAYBE_CONST (1<<(
_RXf_PMf_SHIFT+3
))
+#define PMf_MAYBE_CONST (1<<(
PMf_BASE_SHIFT+2
))
/* PMf_ONCE has matched successfully. Not used under threading. */
/* PMf_ONCE has matched successfully. Not used under threading. */
-#define PMf_USED (1<<(
_RXf_PMf_SHIFT+4
))
+#define PMf_USED (1<<(
PMf_BASE_SHIFT+3
))
/* subst replacement is constant */
/* subst replacement is constant */
-#define PMf_CONST (1<<(
_RXf_PMf_SHIFT+5
))
+#define PMf_CONST (1<<(
PMf_BASE_SHIFT+4
))
/* keep 1st runtime pattern forever */
/* keep 1st runtime pattern forever */
-#define PMf_KEEP (1<<(
_RXf_PMf_SHIFT+6
))
-#define PMf_GLOBAL (1<<(
_RXf_PMf_SHIFT+7
)) /* pattern had a g modifier */
+#define PMf_KEEP (1<<(
PMf_BASE_SHIFT+5
))
+#define PMf_GLOBAL (1<<(
PMf_BASE_SHIFT+6
)) /* pattern had a g modifier */
/* don't reset pos() if //g fails */
/* don't reset pos() if //g fails */
-#define PMf_CONTINUE (1<<(
_RXf_PMf_SHIFT+8
))
+#define PMf_CONTINUE (1<<(
PMf_BASE_SHIFT+7
))
/* evaluating replacement as expr */
/* evaluating replacement as expr */
-#define PMf_EVAL (1<<(
_RXf_PMf_SHIFT+9
))
+#define PMf_EVAL (1<<(
PMf_BASE_SHIFT+8
))
/* Return substituted string instead of modifying it. */
/* Return substituted string instead of modifying it. */
-#define PMf_NONDESTRUCT (1<<(
_RXf_PMf_SHIFT+10
))
+#define PMf_NONDESTRUCT (1<<(
PMf_BASE_SHIFT+9
))
-#if
_RXf_PMf_SHIFT+10
> 31
+#if
PMf_BASE_SHIFT+9
> 31
# error Too many PMf_ bits used. See above and regnodes.h for any spare in middle
#endif
# error Too many PMf_ bits used. See above and regnodes.h for any spare in middle
#endif
-/* mask of bits that need to be transfered to re->extflags */
-#define PMf_COMPILETIME (PMf_MULTILINE|PMf_SINGLELINE|PMf_LOCALE|PMf_FOLD|PMf_EXTENDED|PMf_KEEPCOPY)
-
#ifdef USE_ITHREADS
# define PmopSTASHPV(o) \
#ifdef USE_ITHREADS
# define PmopSTASHPV(o) \
@@
-536,14
+541,13
@@
struct loop {
#define OA_FOLDCONST 2
#define OA_RETSCALAR 4
#define OA_TARGET 8
#define OA_FOLDCONST 2
#define OA_RETSCALAR 4
#define OA_TARGET 8
-#define OA_
RETINTEGER
16
+#define OA_
TARGLEX
16
#define OA_OTHERINT 32
#define OA_DANGEROUS 64
#define OA_DEFGV 128
#define OA_OTHERINT 32
#define OA_DANGEROUS 64
#define OA_DEFGV 128
-#define OA_TARGLEX 256
/* The next 4 bits encode op class information */
/* The next 4 bits encode op class information */
-#define OCSHIFT
9
+#define OCSHIFT
8
#define OA_CLASS_MASK (15 << OCSHIFT)
#define OA_CLASS_MASK (15 << OCSHIFT)
@@
-562,7
+566,7
@@
struct loop {
#define OA_FILESTATOP (12 << OCSHIFT)
#define OA_LOOPEXOP (13 << OCSHIFT)
#define OA_FILESTATOP (12 << OCSHIFT)
#define OA_LOOPEXOP (13 << OCSHIFT)
-#define OASHIFT 1
3
+#define OASHIFT 1
2
/* Remaining nybbles of PL_opargs */
#define OA_SCALAR 1
/* Remaining nybbles of PL_opargs */
#define OA_SCALAR 1
@@
-732,7
+736,7
@@
preprocessing token; the type of I<arg> depends on I<which>.
hk = INT2PTR(BHK *, SvIVX(sv)); \
\
if (BhkENTRY(hk, which)) \
hk = INT2PTR(BHK *, SvIVX(sv)); \
\
if (BhkENTRY(hk, which)) \
-
CALL_FPTR(BhkENTRY(hk, which)
)(aTHX_ arg); \
+
BhkENTRY(hk, which
)(aTHX_ arg); \
} \
} \
} STMT_END
} \
} \
} STMT_END