Branch: Tag:

2003-09-05

2003-09-05 15:53:38 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Fixed bug in foreach range optimization.

Rev: src/docode.c:1.167

2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: docode.c,v 1.166 2003/09/05 15:19:20 mast Exp $ + || $Id: docode.c,v 1.167 2003/09/05 15:53:38 grubba Exp $   */      #include "global.h" - RCSID("$Id: docode.c,v 1.166 2003/09/05 15:19:20 mast Exp $"); + RCSID("$Id: docode.c,v 1.167 2003/09/05 15:53:38 grubba Exp $");   #include "las.h"   #include "program.h"   #include "pike_types.h"
1282:    node **a2=my_get_arg(&_CAR(arr),1);    if(a1 && a2 && a2[0]->token==F_CONSTANT &&    a2[0]->u.sval.type==T_INT && -  /* FIXME: The following can never be true! */ -  a2[0]->u.sval.type==0x7fffffff && +  a2[0]->u.sval.u.integer==0x7fffffff &&    a1[0]->type == int_type_string)    { -  +  /* Optimize foreach(x[start..],y). */    do_docode(CAR(arr),DO_NOT_COPY_TOPLEVEL);    do_docode(*a1,DO_NOT_COPY);    goto foreach_arg_pushed;