From: Nicholas Clark Date: Wed, 8 Mar 2006 23:33:05 +0000 (+0000) Subject: Make MAD at least compile and link once more. Although it's now failing X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=991291971c0fe19bdc39018b7d7361ccc75bdbcf;p=p5sagit%2Fp5-mst-13.2.git Make MAD at least compile and link once more. Although it's now failing 6 regression tests. p4raw-id: //depot/perl@27429 --- diff --git a/op.c b/op.c index 618f06b..dd85eaf 100644 --- a/op.c +++ b/op.c @@ -2356,7 +2356,7 @@ TOKEN * Perl_newTOKEN(pTHX_ I32 optype, YYSTYPE lval, MADPROP* madprop) { TOKEN *tk; - Newz(1101, tk, 1, TOKEN); + Newxz(tk, 1, TOKEN); tk->tk_type = (OPCODE)optype; tk->tk_type = 12345; tk->tk_lval = lval; @@ -2485,7 +2485,8 @@ Perl_op_getmad(pTHX_ OP* from, OP* o, char slot) } } else { - PerlIO_printf(PerlIO_stderr(), "DESTROYING op = %0x\n", from); + PerlIO_printf(PerlIO_stderr(), + "DESTROYING op = %0"UVxf"\n", PTR2UV(from)); op_free(from); } } @@ -2547,7 +2548,7 @@ MADPROP * Perl_newMADPROP(pTHX_ char key, char type, void* val, I32 vlen) { MADPROP *mp; - Newz(1101, mp, 1, MADPROP); + Newxz(mp, 1, MADPROP); mp->mad_next = 0; mp->mad_key = key; mp->mad_vlen = vlen; @@ -4878,10 +4879,8 @@ void #endif Perl_newMYSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block) { -#ifdef PERL_MAD - /* FIXME for MAD - shouldn't this be done at the return statement? And - given that the return statement is never reached, surely this currently - is a leak? */ +#if 0 + /* This would be the return value, but the return cannot be reached. */ OP* pegop = newOP(OP_NULL, 0); #endif @@ -4897,7 +4896,7 @@ Perl_newMYSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block) SAVEFREEOP(block); Perl_croak(aTHX_ "\"my sub\" not yet implemented"); #ifdef PERL_MAD - return pegop; + NORETURN_FUNCTION_END; #endif } @@ -5084,7 +5083,7 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block) /* Need to do a C * before we clobber PL_compcv. */ - if (cv && !(block + if (cv && (!block #ifdef PERL_MAD || block->op_type == OP_NULL #endif diff --git a/perly.c b/perly.c index 18f8606..03d0599 100644 --- a/perly.c +++ b/perly.c @@ -297,8 +297,8 @@ Perl_yyparse (pTHX) int yylen; #ifdef PERL_MAD - if (PL_madskills) - return madparse(); + /*if (PL_madskills) + return madparse();*/ #endif YYDPRINTF ((Perl_debug_log, "Starting parse\n")); @@ -409,7 +409,7 @@ Perl_yyparse (pTHX) if (yychar == YYEMPTY) { YYDPRINTF ((Perl_debug_log, "Reading a token: ")); #ifdef PERL_MAD - yychar = PL_madskills ? madlex() : yylex(); + yychar = /*PL_madskills ? madlex() :*/ yylex(); #else yychar = yylex(); #endif