summaryrefslogtreecommitdiff
path: root/XSUB.h
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-12-28 20:23:17 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-12-28 20:23:17 +0000
commitb26a54d078afd95fdb1f671f519e49b10272f657 (patch)
treeb560f377592bcf57b1f6a0a4a8f32ddccb72ba40 /XSUB.h
parent39eb404022bff33467711717d8de9566914a79f1 (diff)
downloadperl-b26a54d078afd95fdb1f671f519e49b10272f657.tar.gz
optimize XSUBs to use targets if the -nooptimize xsubpp option is
not supplied (variant of patch suggested by Ilya Zakharevich) p4raw-id: //depot/perl@4731
Diffstat (limited to 'XSUB.h')
-rw-r--r--XSUB.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/XSUB.h b/XSUB.h
index e9b6dc3d45..53ff98df60 100644
--- a/XSUB.h
+++ b/XSUB.h
@@ -17,6 +17,9 @@
#define dXSTARG SV * targ = ((PL_op->op_private & OPpENTERSUB_HASTARG) \
? PAD_SV(PL_op->op_targ) : sv_newmortal())
+/* Should be used before final PUSHi etc. if not in PPCODE section. */
+#define XSprePUSH (sp = PL_stack_base + ax - 1)
+
#define XSANY CvXSUBANY(cv)
#define dXSI32 I32 ix = XSANY.any_i32