summaryrefslogtreecommitdiff
path: root/peep.c
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2022-10-28 13:22:14 +0200
committerYves Orton <demerphq@gmail.com>2022-11-01 09:46:16 +0100
commit3972099975574c30f8d639f22f1c7e0482a11aea (patch)
tree3fd82eabe242df642dbf8c0f8e7254de9fe3d383 /peep.c
parent281a99cbeb48c64deb57a01ba6b1d40c087c8ca7 (diff)
downloadperl-3972099975574c30f8d639f22f1c7e0482a11aea.tar.gz
peep.c - add a comment/question to a comment
We optimize away certain nextstate ops, but it isn't clear if it is possible for the ops to be there to switch hints or feature flags. Tony thinks its fine however. So I have added the commentary to the comment for future readers.
Diffstat (limited to 'peep.c')
-rw-r--r--peep.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/peep.c b/peep.c
index 0e3a81f019..a743de91d7 100644
--- a/peep.c
+++ b/peep.c
@@ -3032,7 +3032,11 @@ Perl_rpeep(pTHX_ OP *o)
/* Two NEXTSTATEs in a row serve no purpose. Except if they happen
to carry two labels. For now, take the easier option, and skip
- this optimisation if the first NEXTSTATE has a label. */
+ this optimisation if the first NEXTSTATE has a label.
+ Yves asked what about if they have different hints or features?
+ Tony thinks that as we remove the first of the pair it should
+ be fine.
+ */
if (!CopLABEL((COP*)o) && !PERLDB_NOOPT) {
OP *nextop = o->op_next;
while (nextop) {