From: Gerard Goossen Date: Mon, 10 Mar 2008 15:44:03 +0000 (+0100) Subject: Re: [PATCH] MAD fix p55 $[ X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=27aaedc17a97efc227bf59e642a1a074461e266d;p=p5sagit%2Fp5-mst-13.2.git Re: [PATCH] MAD fix p55 $[ Message-ID: <20080310144403.GC28994@ostwald> p4raw-id: //depot/perl@33467 --- diff --git a/mad/t/p55.t b/mad/t/p55.t index 770f6c5..e1f3523 100644 --- a/mad/t/p55.t +++ b/mad/t/p55.t @@ -64,10 +64,6 @@ use Test::Differences; our %failing = map { $_, 1 } qw| ../t/comp/require.t -../t/op/array.t -../t/op/local.t -../t/op/substr.t - ../t/comp/parser.t ../t/op/switch.t @@ -172,10 +168,10 @@ eval { require 5.005 } sub PerlIO::F_UTF8 () { 0x00008000 } # from perliol.h BEGIN { PerlIO::Layer->find("encoding",1);} ######## -# TODO from ../t/op/array.t +# from ../t/op/array.t $[ = 1 ######## -# TODO from t/comp/parser.t +# from t/comp/parser.t $x = 1 for ($[) = 0; ######## # from t/op/getppid.t diff --git a/op.c b/op.c index 8ea3fd8..db2a67b 100644 --- a/op.c +++ b/op.c @@ -4335,10 +4335,11 @@ Perl_newASSIGNOP(pTHX_ I32 flags, OP *left, I32 optype, OP *right) if (PL_eval_start) PL_eval_start = 0; else { - /* FIXME for MAD */ - op_free(o); - o = newSVOP(OP_CONST, 0, newSViv(CopARYBASE_get(&PL_compiling))); - o->op_private |= OPpCONST_ARYBASE; + if (!PL_madskills) { /* assignment to $[ is ignored when making a mad dump */ + op_free(o); + o = newSVOP(OP_CONST, 0, newSViv(CopARYBASE_get(&PL_compiling))); + o->op_private |= OPpCONST_ARYBASE; + } } } return o;