This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Comment the code with how filetest operators interact with the Perl stack.
authorNicholas Clark <nick@ccl4.org>
Fri, 27 Jul 2012 14:38:01 +0000 (16:38 +0200)
committerNicholas Clark <nick@ccl4.org>
Sat, 28 Jul 2012 07:56:58 +0000 (09:56 +0200)
pp_sys.c

index ee46f47..1cb0403 100644 (file)
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -2901,6 +2901,13 @@ PP(pp_stat)
     RETURN;
 }
 
+/* All filetest ops avoid manipulating the perl stack pointer in their main
+   bodies (since commit d2c4d2d1e22d3125), and return using either
+   S_ft_return_false() or S_ft_return_true().  These two helper functions are
+   the only two which manipulate the perl stack.  To ensure that no stack
+   manipulation macros are used, the filetest ops avoid defining a local copy
+   of the stack pointer with dSP.  */
+
 /* If the next filetest is stacked up with this one
    (PL_op->op_private & OPpFT_STACKING), we leave
    the original argument on the stack for success,