diff options
Diffstat (limited to 'contrib/perl5/ext/B/ramblings')
-rw-r--r-- | contrib/perl5/ext/B/ramblings/flip-flop | 27 | ||||
-rw-r--r-- | contrib/perl5/ext/B/ramblings/runtime.porting | 9 |
2 files changed, 23 insertions, 13 deletions
diff --git a/contrib/perl5/ext/B/ramblings/flip-flop b/contrib/perl5/ext/B/ramblings/flip-flop index 183d541..e0cb8ff 100644 --- a/contrib/perl5/ext/B/ramblings/flip-flop +++ b/contrib/perl5/ext/B/ramblings/flip-flop @@ -1,21 +1,24 @@ PP(pp_range) { if (GIMME == G_ARRAY) - return cCONDOP->op_true; - return SvTRUEx(PAD_SV(op->op_targ)) ? cCONDOP->op_false : cCONDOP->op_true; + return NORMAL; + if (SvTRUEx(PAD_SV(PL_op->op_targ))) + return cLOGOP->op_other; + else + return NORMAL; } -pp_range is a CONDOP. -In array context, it just returns op_true. +pp_range is a LOGOP. +In array context, it just returns op_next. In scalar context it checks the truth of targ and returns -op_false if true, op_true if false. +op_other if true, op_next if false. flip is an UNOP. -It "looks after" its child which is always a pp_range CONDOP. -In array context, it just returns the child's op_false. +It "looks after" its child which is always a pp_range LOGOP. +In array context, it just returns the child's op_other. In scalar context, there are three possible outcomes: (1) set child's targ to 1, our targ to 1 and return op_next. - (2) set child's targ to 1, our targ to 0, sp-- and return child's op_false. + (2) set child's targ to 1, our targ to 0, sp-- and return child's op_other. (3) Blank targ and TOPs and return op_next. Case 1 happens for a "..." with a matching lineno... or true TOPs. Case 2 happens for a ".." with a matching lineno... or true TOPs. @@ -37,14 +40,14 @@ Case 3 happens for a non-matching lineno or false TOPs. /* range */ if (SvTRUE(curpad[op->op_targ])) - goto label(op_false); -/* op_true */ + goto label(op_other); +/* op_next */ ... /* flip */ -/* For "..." returns op_next. For ".." returns op_next or op_first->op_false */ +/* For "..." returns op_next. For ".." returns op_next or op_first->op_other */ /* end of basic block */ goto out; -label(range op_false): +label(range op_other): ... /* flop */ out: diff --git a/contrib/perl5/ext/B/ramblings/runtime.porting b/contrib/perl5/ext/B/ramblings/runtime.porting index 4699b25..d58b011 100644 --- a/contrib/perl5/ext/B/ramblings/runtime.porting +++ b/contrib/perl5/ext/B/ramblings/runtime.porting @@ -33,8 +33,10 @@ glob 5 2 do_readline readline 8 2 do_readline rcatline 8 2 regcmaybe 8 1 +regcreset 8 1 regcomp 8 9 pregcomp match 8 10 +qr 8 1 subst 8 10 substcont 8 7 trans 7 4 do_trans @@ -170,6 +172,7 @@ orassign 7 3 modifies flow of control method 8 5 entersub 10 7 leavesub 10 5 +leavesublv caller 2 8 warn 9 3 die 9 3 @@ -212,6 +215,7 @@ leavewrite 4 5 prtf 4 4 do_sprintf print 8 6 sysopen 8 2 +sysseek 8 2 sysread 8 4 syswrite 8 4 pp_send send 8 4 @@ -347,4 +351,7 @@ sgrent egrent getlogin syscall -
\ No newline at end of file +lock 6 1 +threadsv 6 2 unused if not USE_THREADS +setstate 1 1 currently unused anywhere +method_named 10 2 |