On Wed, 9 Apr 2008, Will Coleda via RT wrote:

> On Fri Apr 04 22:28:31 2008, [EMAIL PROTECTED] wrote:
> > On Thursday 03 April 2008 11:22:16 Andy Dougherty wrote:
> > 
> > > parrot-andy/compilers/imcc/optimizer.c ---
> > > parrot-svn/compilers/imcc/optimizer.c     2008-03-31 15:14:39.000000000
> -0400
> > > +++ parrot-andy/compilers/imcc/optimizer.c        2008-04-03 
> > > 13:14:52.000000000
> > > -0400 @@ -976,8 +976,10 @@
> > >       * from the result
> > >       */
> > >      branched = eval_ins(interp, op, found, r);
> > > -    if (branched == -1)
> > > +    if (branched == -1) {
> > > +        *ok = 0; /* XXX Is this return value sensible? */
> > >           return NULL;
> > > +    }
> > 
> > Sadly, this part doesn't work because of the other call to this
> function.  
> > I've applied the rest of the patch with some tweaks as r26763.
> > 

> Andy, does this test pass for you now?

Yes, it should, since the initialization is now done in the calling 
function.  I'd be happier if the following comment-only patch were 
applied, so that next time someone tries to address the deeper problem 
there's at least a flag in the code about one of the question spots.

--- parrot-svn/compilers/imcc/optimizer.c       Mon Apr  7 09:26:28 2008
+++ parrot-andy/compilers/imcc/optimizer.c      Wed Apr  9 17:47:43 2008
@@ -980,8 +980,10 @@
      * from the result
      */
     branched = eval_ins(interp, op, found, r);
-    if (branched == -1)
-         return NULL;
+    if (branched == -1) {
+        /* XXX Deliberately not setting *ok. See [perl #43048] */
+        return NULL;
+    }
     /*
      * for math ops result is in I0/N0
      * if it was a branch with constant args, the result is

-- 
    Andy Dougherty              [EMAIL PROTECTED]

Reply via email to