Message-Id: <
199806190227.WAA07371@monk.mps.ohio-state.edu>
Subject: Re: Ilya's patches
p4raw-id: //depot/perl@1169
#define inplace pPerl->Perl_inplace
#undef last_in_gv
#define last_in_gv pPerl->Perl_last_in_gv
+#undef last_proto
+#define last_proto pPerl->Perl_last_proto
#undef last_lop
#define last_lop pPerl->Perl_last_lop
#undef last_lop_op
#define incgv (curinterp->Iincgv)
#define initav (curinterp->Iinitav)
#define inplace (curinterp->Iinplace)
+#define last_proto (curinterp->Ilast_proto)
#define lastfd (curinterp->Ilastfd)
#define lastgotoprobe (curinterp->Ilastgotoprobe)
#define lastscream (curinterp->Ilastscream)
#define Iincgv incgv
#define Iinitav initav
#define Iinplace inplace
+#define Ilast_proto last_proto
#define Ilastfd lastfd
#define Ilastgotoprobe lastgotoprobe
#define Ilastscream lastscream
#define incgv Perl_incgv
#define initav Perl_initav
#define inplace Perl_inplace
+#define last_proto Perl_last_proto
#define lastfd Perl_lastfd
#define lastgotoprobe Perl_lastgotoprobe
#define lastscream Perl_lastscream
inplace
sys_intern
last_in_gv
+last_proto
lastfd
lastgotoprobe
lastscream
/* internal state */
PERLVAR(Itainting, bool) /* doing taint checks */
PERLVARI(Iop_mask, char *, NULL) /* masked operations for safe evals */
+PERLVAR(Ilast_proto, char *) /* Prototype of last sub seen. */
/* trace state */
PERLVAR(Idlevel, I32)
oldoldbufptr < bufptr &&
(oldoldbufptr == last_lop || oldoldbufptr == last_uni) &&
/* NO SKIPSPACE BEFORE HERE! */
- (expect == XREF ||
- ((opargs[last_lop_op] >> OASHIFT)& 7) == OA_FILEREF) )
+ (expect == XREF
+ || ((opargs[last_lop_op] >> OASHIFT)& 7) == OA_FILEREF
+ || (last_lop_op == OP_ENTERSUB
+ && last_proto
+ && last_proto[last_proto[0] == ';' ? 1 : 0] == '*')) )
{
bool immediate_paren = *s == '(';
/* Is there a prototype? */
if (SvPOK(cv)) {
STRLEN len;
- char *proto = SvPV((SV*)cv, len);
+ last_proto = SvPV((SV*)cv, len);
if (!len)
TERM(FUNC0SUB);
- if (strEQ(proto, "$"))
+ if (strEQ(last_proto, "$"))
OPERATOR(UNIOPSUB);
- if (*proto == '&' && *s == '{') {
+ if (*last_proto == '&' && *s == '{') {
sv_setpv(subname,"__ANON__");
PREBLOCK(LSTOPSUB);
}
- }
+ } else
+ last_proto = NULL;
nextval[nexttoke].opval = yylval.opval;
expect = XTERM;
force_next(WORD);