Branch: Tag:

2004-08-25

2004-08-25 12:00:08 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Bugfix.
Now uses the return value from low_asm_opt().

Rev: src/peep.c:1.102

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: peep.c,v 1.101 2004/08/25 09:36:47 grubba Exp $ + || $Id: peep.c,v 1.102 2004/08/25 12:00:08 grubba Exp $   */      #include "global.h"
25:   #include "interpret.h"   #include "pikecode.h"    - RCSID("$Id: peep.c,v 1.101 2004/08/25 09:36:47 grubba Exp $"); + RCSID("$Id: peep.c,v 1.102 2004/08/25 12:00:08 grubba Exp $");    - static void asm_opt(void); + static int asm_opt(void);      dynamic_buffer instrbuf;   
146:      /**** Bytecode Generator *****/    - static int relabel; -  +    INT32 assemble(int store_linenumbers)   {    INT32 entry_point;
163: Inside #if defined(PIKE_DEBUG)
   int synch_depth = 0;    size_t fun_start = Pike_compiler->new_program->num_program;   #endif +  int relabel; +  int reoptimize = relabel = !(debug_options & NO_PEEP_OPTIMIZING);       c=(p_instr *)instrbuf.s.str;    length=instrbuf.s.len / sizeof(p_instr);
292:    jumps = labels + max_label + 2;    uses = jumps + max_label + 2;    -  int reoptimize = relabel = !(debug_options & NO_PEEP_OPTIMIZING); -  +     while(relabel)    {    /* First do the relabel pass. */
380:    }    }    -  relabel = 0; -  +     if(!reoptimize) break;       /* Then do the optimize pass. */    -  asm_opt(); +  relabel = asm_opt();       reoptimize = 0;   
973:    va_end(arglist);       DO_OPTIMIZATION_POSTQUEL(q); -  -  relabel = 1; +    }      #include "peep_engine.c"    - static void asm_opt(void) + static int asm_opt(void)   { -  +  int relabel = 0; +    #ifdef PIKE_DEBUG    if(a_flag > 3)    {
1026:    }   #endif    -  low_asm_opt(); +  relabel |= low_asm_opt();    advance();    }   
1054: Inside #if defined(PIKE_DEBUG)
   }    }   #endif +  +  return relabel;   }