#define LINKLIST(o) ((o)->op_next ? (o)->op_next : linklist((OP*)o))
-OP *
+static OP *
S_linklist(pTHX_ OP *o)
{
OP *first;
return o->op_next;
}
-OP *
+static OP *
S_scalarkids(pTHX_ OP *o)
{
if (o && o->op_flags & OPf_KIDS) {
return scalar(o);
}
-/* This is used in S_doeval in pp_ctl.c */
OP *
Perl_scalar(pTHX_ OP *o)
{
return o;
}
-/* This is used in S_doeval in pp_ctl.c */
OP *
Perl_scalarvoid(pTHX_ OP *o)
{
return o;
}
-OP *
+static OP *
S_listkids(pTHX_ OP *o)
{
if (o && o->op_flags & OPf_KIDS) {
return o;
}
-/* This is used in S_doeval in pp_ctl.c */
OP *
Perl_list(pTHX_ OP *o)
{
return o;
}
-OP *
+static OP *
S_scalarseq(pTHX_ OP *o)
{
dVAR;
}
}
-OP *
-Perl_refkids(pTHX_ OP *o, I32 type)
+static OP *
+S_refkids(pTHX_ OP *o, I32 type)
{
if (o && o->op_flags & OPf_KIDS) {
OP *kid;
return o;
}
-/* This is used in perly.y */
OP *
Perl_sawparens(pTHX_ OP *o)
{
return o;
}
-OP *
-Perl_fold_constants(pTHX_ register OP *o)
+static OP *
+S_fold_constants(pTHX_ register OP *o)
{
dVAR;
register OP * VOL curop;
return o;
}
-OP *
-Perl_gen_constant_list(pTHX_ register OP *o)
+static OP *
+S_gen_constant_list(pTHX_ register OP *o)
{
dVAR;
register OP *curop;
return newOP(OP_STUB, 0);
}
-OP *
-Perl_force_list(pTHX_ OP *o)
+static OP *
+S_force_list(pTHX_ OP *o)
{
if (!o || o->op_type != OP_LIST)
o = newLISTOP(OP_LIST, 0, o, NULL);
return 0;
}
-OP *
-Perl_pmtrans(pTHX_ OP *o, OP *expr, OP *repl)
+static OP *
+S_pmtrans(pTHX_ OP *o, OP *expr, OP *repl)
{
dVAR;
SV * const tstr = ((SVOP*)expr)->op_sv;
} else {
for (; kid; kid = kid->op_sibling)
if ((kid->op_type == OP_NULL)
- && (kid->op_flags & OPf_SPECIAL)) {
+ && ((kid->op_flags & (OPf_SPECIAL|OPf_KIDS)) == (OPf_SPECIAL|OPf_KIDS))) {
/* This is a do block */
- OP *op = cUNOPx(kid)->op_first;
- assert(op && (op->op_type == OP_LEAVE) && (op->op_flags & OPf_KIDS));
- op = cUNOPx(op)->op_first;
- assert(op->op_type == OP_ENTER && !(op->op_flags & OPf_SPECIAL));
- /* Force the use of the caller's context */
- op->op_flags |= OPf_SPECIAL;
+ OP *op = kUNOP->op_first;
+ if (op->op_type == OP_LEAVE && op->op_flags & OPf_KIDS) {
+ op = cUNOPx(op)->op_first;
+ assert(op->op_type == OP_ENTER && !(op->op_flags & OPf_SPECIAL));
+ /* Force the use of the caller's context */
+ op->op_flags |= OPf_SPECIAL;
+ }
}
}