Skip to content

Commit 8dad829

Browse files
committed
op.c: assorted minor comment fixes
1 parent d03bc0c commit 8dad829

File tree

1 file changed

+27
-28
lines changed

1 file changed

+27
-28
lines changed

op.c

+27-28
Original file line numberDiff line numberDiff line change
@@ -1467,7 +1467,7 @@ S_find_and_forget_pmops(pTHX_ OP *o)
14671467
o = o->op_sibparent; /* process next sibling */
14681468
break;
14691469
}
1470-
o = o->op_sibparent; /*try parent's next sibling */
1470+
o = o->op_sibparent; /* try parent's next sibling */
14711471
}
14721472
}
14731473
}
@@ -2101,15 +2101,15 @@ Perl_scalar(pTHX_ OP *o)
21012101
if (OpHAS_SIBLING(o))
21022102
next_kid = o->op_sibparent;
21032103
else {
2104-
o = o->op_sibparent; /*try parent's next sibling */
2104+
o = o->op_sibparent; /* try parent's next sibling */
21052105
switch (o->op_type) {
21062106
case OP_SCOPE:
21072107
case OP_LINESEQ:
21082108
case OP_LIST:
21092109
case OP_LEAVE:
21102110
case OP_LEAVETRY:
21112111
/* should really restore PL_curcop to its old value, but
2112-
* setting it to PL_compiling is better than do nothing */
2112+
* setting it to PL_compiling is better than doing nothing */
21132113
PL_curcop = &PL_compiling;
21142114
}
21152115
}
@@ -2262,7 +2262,7 @@ Perl_scalarvoid(pTHX_ OP *arg)
22622262
if ((op_parent(o)->op_type == OP_ONCE) &&
22632263
(op_parent(o)->op_next == o)
22642264
){
2265-
/* An already set "state" OP has been encounted
2265+
/* An already set "state" OP has been encountered
22662266
* and there's no point pushing anything to the
22672267
* stack in void context. */
22682268
op_parent(o)->op_next = o->op_next;
@@ -2312,8 +2312,8 @@ Perl_scalarvoid(pTHX_ OP *arg)
23122312
else {
23132313
if (ckWARN(WARN_VOID)) {
23142314
NV nv;
2315-
/* don't warn on optimised away booleans, eg
2316-
* use constant Foo, 5; Foo || print; */
2315+
/* don't warn on optimised-away booleans, e.g.
2316+
* use constant Foo => 5; Foo || print; */
23172317
if (cSVOPo->op_private & OPpCONST_SHORTCIRCUIT)
23182318
useless = NULL;
23192319
/* the constants 0 and 1 are permitted as they are
@@ -2503,7 +2503,7 @@ Perl_scalarvoid(pTHX_ OP *arg)
25032503
if (OpHAS_SIBLING(o))
25042504
next_kid = o->op_sibparent;
25052505
else
2506-
o = o->op_sibparent; /*try parent's next sibling */
2506+
o = o->op_sibparent; /* try parent's next sibling */
25072507
}
25082508
o = next_kid;
25092509
}
@@ -2544,7 +2544,7 @@ Perl_list(pTHX_ OP *o)
25442544
}
25452545

25462546
if ((o->op_private & OPpTARGET_MY)
2547-
&& (PL_opargs[o->op_type] & OA_TARGLEX))/* OPp share the meaning */
2547+
&& (PL_opargs[o->op_type] & OA_TARGLEX)) /* OPp share the meaning */
25482548
{
25492549
goto do_next; /* As if inside SASSIGN */
25502550
}
@@ -2563,7 +2563,7 @@ Perl_list(pTHX_ OP *o)
25632563
&& SvIVX(kSVOP_sv) == 1)
25642564
{
25652565
op_null(o); /* repeat */
2566-
op_null(cUNOPx(cBINOPo->op_first)->op_first);/* pushmark */
2566+
op_null(cUNOPx(cBINOPo->op_first)->op_first); /* pushmark */
25672567
/* const (rhs): */
25682568
op_free(op_sibling_splice(o, cBINOPo->op_first, 1, NULL));
25692569
}
@@ -2647,15 +2647,15 @@ Perl_list(pTHX_ OP *o)
26472647
if (OpHAS_SIBLING(o))
26482648
next_kid = o->op_sibparent;
26492649
else {
2650-
o = o->op_sibparent; /*try parent's next sibling */
2650+
o = o->op_sibparent; /* try parent's next sibling */
26512651
switch (o->op_type) {
26522652
case OP_SCOPE:
26532653
case OP_LINESEQ:
26542654
case OP_LIST:
26552655
case OP_LEAVE:
26562656
case OP_LEAVETRY:
26572657
/* should really restore PL_curcop to its old value, but
2658-
* setting it to PL_compiling is better than do nothing */
2658+
* setting it to PL_compiling is better than doing nothing */
26592659
PL_curcop = &PL_compiling;
26602660
}
26612661
}
@@ -2715,9 +2715,9 @@ S_modkids(pTHX_ OP *o, I32 type)
27152715
}
27162716

27172717

2718-
/* for a helem/hslice/kvslice, if its a fixed hash, croak on invalid
2718+
/* For a helem/hslice/kvslice, if it's a fixed hash, croak on invalid
27192719
* const fields. Also, convert CONST keys to HEK-in-SVs.
2720-
* rop is the op that retrieves the hash;
2720+
* rop is the op that retrieves the hash
27212721
* key_op is the first key
27222722
* real if false, only check (and possibly croak); don't update op
27232723
*/
@@ -2895,7 +2895,7 @@ S_vivifies(const OPCODE type)
28952895
* \($x,$y) = (...)
28962896
* o would be the list ($x,$y) and type would be OP_AASSIGN.
28972897
* It may descend and apply this to children too, for example in
2898-
* \( $cond ? $x, $y) = (...)
2898+
* \( $cond ? $x : $y, $z) = (...)
28992899
*/
29002900

29012901
static void
@@ -2998,7 +2998,7 @@ S_lvref(pTHX_ OP *o, I32 type)
29982998

29992999
/* the code formerly only recursed into the first child of
30003000
* a non ex-list OP_NULL. if we ever encounter such a null op with
3001-
* more than one child, need to decide whether its ok to process
3001+
* more than one child, need to decide whether it's ok to process
30023002
* *all* its kids or not */
30033003
assert(o->op_targ == OP_LIST
30043004
|| !(OpHAS_SIBLING(cBINOPo->op_first)));
@@ -3036,7 +3036,7 @@ S_lvref(pTHX_ OP *o, I32 type)
30363036
o = o->op_sibparent;
30373037
break;
30383038
}
3039-
o = o->op_sibparent; /*try parent's next sibling */
3039+
o = o->op_sibparent; /* try parent's next sibling */
30403040
}
30413041
} /* while */
30423042
}
@@ -3593,14 +3593,14 @@ Perl_op_lvalue_flags(pTHX_ OP *o, I32 type, U32 flags)
35933593
&& S_vivifies(next_kid->op_type))
35943594
)
35953595
) {
3596-
/*try parent's next sibling */
3596+
/* try parent's next sibling */
35973597
o = parent;
35983598
next_kid = NULL;
35993599
}
36003600
}
36013601
}
36023602
else
3603-
o = o->op_sibparent; /*try parent's next sibling */
3603+
o = o->op_sibparent; /* try parent's next sibling */
36043604

36053605
}
36063606
o = next_kid;
@@ -3834,7 +3834,7 @@ Perl_doref(pTHX_ OP *o, I32 type, bool set_op_ref)
38343834
break;
38353835
continue;
38363836
}
3837-
o = o->op_sibparent; /*try parent's next sibling */
3837+
o = o->op_sibparent; /* try parent's next sibling */
38383838
}
38393839
} /* while */
38403840
}
@@ -5630,7 +5630,7 @@ Perl_newNULLLIST(pTHX)
56305630
return newOP(OP_STUB, 0);
56315631
}
56325632

5633-
/* promote o and any siblings to be a list if its not already; i.e.
5633+
/* Promote o and any siblings to be a list if it's not already; i.e.
56345634
*
56355635
* o - A - B
56365636
*
@@ -5640,7 +5640,7 @@ Perl_newNULLLIST(pTHX)
56405640
* |
56415641
* pushmark - o - A - B
56425642
*
5643-
* If nullit it true, the list op is nulled.
5643+
* If nullit is true, the list op is nulled.
56445644
*/
56455645

56465646
static OP *
@@ -7743,7 +7743,7 @@ Perl_pmruntime(pTHX_ OP *o, OP *expr, OP *repl, UV flags, I32 floor)
77437743
* outer CV (the one whose slab holds the pm op). The
77447744
* inner CV (which holds expr) will be freed later, once
77457745
* all the entries on the parse stack have been popped on
7746-
* return from this function. Which is why its safe to
7746+
* return from this function. Which is why it's safe to
77477747
* call op_free(expr) below.
77487748
*/
77497749
LEAVE_SCOPE(floor);
@@ -8258,8 +8258,7 @@ Perl_utilize(pTHX_ int aver, I32 floor, OP *version, OP *idop, OP *arg)
82588258
newSTATEOP(0, NULL, imop) ));
82598259

82608260
if (use_version) {
8261-
/* Enable the
8262-
* feature bundle that corresponds to the required version. */
8261+
/* Enable the feature bundle that corresponds to the required version. */
82638262
use_version = sv_2mortal(new_version(use_version));
82648263
S_enable_feature_bundle(aTHX_ use_version);
82658264

@@ -8537,7 +8536,7 @@ Perl_newSLICEOP(pTHX_ I32 flags, OP *subscript, OP *listval)
85378536
#define ASSIGN_LIST 1
85388537
#define ASSIGN_REF 2
85398538

8540-
/* given the optree o on the LHS of an assignment, determine whether its:
8539+
/* given the optree o on the LHS of an assignment, determine whether it's:
85418540
* ASSIGN_SCALAR $x = ...
85428541
* ASSIGN_LIST ($x) = ...
85438542
* ASSIGN_REF \$x = ...
@@ -9935,7 +9934,7 @@ Perl_newFOROP(pTHX_ I32 flags, OP *sv, OP *expr, OP *block, OP *cont)
99359934
NewOp(1234,tmp,1,LOOP);
99369935
Copy(loop,tmp,1,LISTOP);
99379936
assert(loop->op_last->op_sibparent == (OP*)loop);
9938-
OpLASTSIB_set(loop->op_last, (OP*)tmp); /*point back to new parent */
9937+
OpLASTSIB_set(loop->op_last, (OP*)tmp); /* point back to new parent */
99399938
S_op_destroy(aTHX_ (OP*)loop);
99409939
loop = tmp;
99419940
}
@@ -9947,7 +9946,7 @@ Perl_newFOROP(pTHX_ I32 flags, OP *sv, OP *expr, OP *block, OP *cont)
99479946
}
99489947
loop->op_targ = padoff;
99499948
if (parens)
9950-
/* hint to deparser that this: for my (...) ... */
9949+
/* hint to deparser that this is: for my (...) ... */
99519950
loop->op_flags |= OPf_PARENS;
99529951
iter = newOP(OP_ITER, (U32)iterpflags << 8);
99539952
iter->op_targ = how_many_more;
@@ -12673,7 +12672,7 @@ Perl_ck_trycatch(pTHX_ OP *o)
1267312672
* terms of its ->op_next pointers.
1267412673
*
1267512674
* This way, if the tryblock dies, its retop points at the OP_CATCH, but
12676-
* if it does not then its leavetry skips over that and continues
12675+
* if it does not, then its leavetry skips over that and continues
1267712676
* execution past it.
1267812677
*/
1267912678

0 commit comments

Comments
 (0)