Branch: Tag:

2004-10-11

2004-10-11 16:41:49 by Martin Stjernholm <mast@lysator.liu.se>

Show the error when the compile time replace() optimizer fails.

Rev: src/builtin_functions.c:1.469
Rev: src/language.yacc:1.317
Rev: src/las.c:1.326
Rev: src/program.c:1.493
Rev: src/program.h:1.182

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: builtin_functions.c,v 1.468 2004/07/08 08:38:04 grubba Exp $ + || $Id: builtin_functions.c,v 1.469 2004/10/11 16:41:48 mast Exp $   */      #include "global.h" - RCSID("$Id: builtin_functions.c,v 1.468 2004/07/08 08:38:04 grubba Exp $"); + RCSID("$Id: builtin_functions.c,v 1.469 2004/10/11 16:41:48 mast Exp $");   #include "interpret.h"   #include "svalue.h"   #include "pike_macros.h"
3138:    struct svalue *save_sp = Pike_sp;    JMP_BUF tmp;    if (SETJMP(tmp)) { +  struct svalue thrown = throw_value; +  throw_value.type = T_INT;    yywarning("Optimizer failure in replace().");    pop_n_elems(Pike_sp - save_sp); -  free_svalue(&throw_value); -  throw_value.type = T_INT; +  yy_describe_exception (&thrown, 1); +  free_svalue(&thrown);    } else {    extern struct program *multi_string_replace_program;    INT16 lfun;