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
commitcc1ec5fd7bf7637434334ebb09cc4b9df70ed219 (patch)
treeb560f377592bcf57b1f6a0a4a8f32ddccb72ba40 /XSUB.h
parent24d49c17ff0f21aad54a06ae1065494e6e626556 (diff)
downloadperl-cc1ec5fd7bf7637434334ebb09cc4b9df70ed219.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