From: Vishal Bhatia Date: Sun, 20 Jun 1999 17:17:17 +0000 (-0700) Subject: Minor bug fix in pp_require X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cd2dd2fd24b15028d265200a1345a2bbcef5a4d9;p=p5sagit%2Fp5-mst-13.2.git Minor bug fix in pp_require Message-ID: p4raw-id: //depot/perl@3630 --- diff --git a/ext/B/B/CC.pm b/ext/B/B/CC.pm index eb67bcf..b909d44 100644 --- a/ext/B/B/CC.pm +++ b/ext/B/B/CC.pm @@ -1105,6 +1105,7 @@ sub doeval { write_back_stack(); my $sym = loadop($op); my $ppaddr = $op->ppaddr; + #runtime(qq/printf("$ppaddr type eval\n");/); runtime("PP_EVAL($ppaddr, ($sym)->op_next);"); $know_op = 1; invalidate_lexicals(REGISTER|TEMPORARY); @@ -1112,9 +1113,24 @@ sub doeval { } sub pp_entereval { doeval(@_) } -sub pp_require { doeval(@_) } sub pp_dofile { doeval(@_) } +#pp_require is protected by pp_entertry, so no protection for it. +sub pp_require { + my $op = shift; + $curcop->write_back; + write_back_lexicals(REGISTER|TEMPORARY); + write_back_stack(); + my $sym = doop($op); + runtime("while (PL_op != ($sym)->op_next && PL_op != (OP*)0 ){"); + runtime("PL_op = (*PL_op->op_ppaddr)(ARGS);"); + runtime("SPAGAIN;}"); + $know_op = 1; + invalidate_lexicals(REGISTER|TEMPORARY); + return $op->next; +} + + sub pp_entertry { my $op = shift; $curcop->write_back;