summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-10-28 17:34:01 +0100
committerNicholas Clark <nick@ccl4.org>2010-10-29 15:28:08 +0100
commita78b89ef05ee75c66a8837ab543c37972727335b (patch)
treeb61e07949014e1aff37234b20e01d6d855ac2123
parent086f9b42de23898bfafc9164a8ae344258663b3d (diff)
downloadperl-a78b89ef05ee75c66a8837ab543c37972727335b.tar.gz
Merge B::PMOP::pmflags into the common B::OP accessor XS code.
This saves about 800 bytes on this platform.
-rw-r--r--ext/B/B.xs11
1 files changed, 7 insertions, 4 deletions
diff --git a/ext/B/B.xs b/ext/B/B.xs
index 3faf596c15..87896e5fb6 100644
--- a/ext/B/B.xs
+++ b/ext/B/B.xs
@@ -834,6 +834,7 @@ threadsv_names()
#define OPp 0x00000
#define PADOFFSETp 0x10000
#define U8p 0x20000
+#define U32p 0x30000
#define OP_next_ix OPp | offsetof(struct op, op_next)
#define OP_sibling_ix OPp | offsetof(struct op, op_sibling)
@@ -854,6 +855,8 @@ threadsv_names()
#define OP_flags_ix U8p | offsetof(struct op, op_flags)
#define OP_private_ix U8p | offsetof(struct op, op_private)
+#define PMOP_pmflags_ix U32p | offsetof(struct pmop, op_pmflags)
+
MODULE = B PACKAGE = B::OP PREFIX = OP_
size_t
@@ -883,6 +886,7 @@ next(o)
B::LOOP::redoop = LOOP_redoop_ix
B::LOOP::nextop = LOOP_nextop_ix
B::LOOP::lastop = LOOP_lastop_ix
+ B::PMOP::pmflags = PMOP_pmflags_ix
PREINIT:
char *ptr;
SV *ret;
@@ -902,6 +906,9 @@ next(o)
case (U8)(U8p >> 16):
ret = sv_2mortal(newSVuv(*((U8*)ptr)));
break;
+ case (U8)(U32p >> 16):
+ ret = sv_2mortal(newSVuv(*((U32*)ptr)));
+ break;
}
ST(0) = ret;
XSRETURN(1);
@@ -1077,10 +1084,6 @@ PMOP_pmstash(o)
#endif
-U32
-PMOP_pmflags(o)
- B::PMOP o
-
#if PERL_VERSION < 9
U32