pike.git / src / las.c

version» Context lines:

pike.git/src/las.c:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/   /**/   #include "global.h" - RCSID("$Id: las.c,v 1.263 2001/08/15 20:58:44 mast Exp $"); + RCSID("$Id: las.c,v 1.264 2001/08/16 00:36:47 mast Exp $");      #include "language.h"   #include "interpret.h"   #include "las.h"   #include "array.h"   #include "object.h"   #include "stralloc.h"   #include "dynamic_buffer.h"   #include "lex.h"   #include "pike_types.h"
pike.git/src/las.c:1739:    {    ptrdiff_t c;    DECLARE_CYCLIC();    c = (ptrdiff_t)BEGIN_CYCLIC(Pike_sp[-1].u.refs, id);    if(c>1)    {    my_yyerror("Recursive module dependency in '%s'.",id->str);    pop_stack();    push_int(0);    }else{ +  struct svalue thrown = {PIKE_T_UNKNOWN, 0, + #ifdef HAVE_UNION_INIT +  {0} /* Only to avoid warnings. */ + #endif +  }; +     SET_CYCLIC_RET(c+1);    ref_push_string(id);    {    struct svalue *save_sp = Pike_sp-2;    JMP_BUF recovery;    if (SETJMP(recovery)) { -  /* f_index() threw an error! -  * -  * FIXME: Report the error thrown. -  */ -  free_svalue(&throw_value); -  throw_value.type = T_INT; +  /* f_index() threw an error! */    if (Pike_sp > save_sp) {    pop_n_elems(Pike_sp - save_sp);    } else if (Pike_sp != save_sp) {    fatal("f_index() munged stack!\n");    } -  push_int(0); -  Pike_sp[-1].subtype = NUMBER_UNDEFINED; +  push_undefined(); +  thrown = throw_value; +  throw_value.type = T_INT;    } else {    f_index(2);    }    UNSETJMP(recovery);    }       if(Pike_sp[-1].type == T_INT &&    !Pike_sp[-1].u.integer &&    Pike_sp[-1].subtype==NUMBER_UNDEFINED)    {    if (node_name) {    my_yyerror("Index '%s' not present in module '%s'.",    id->str, node_name);    } else {    my_yyerror("Index '%s' not present in module.", id->str);    } -  +  +  if (thrown.type != PIKE_T_UNKNOWN) { +  push_svalue(&thrown); +  safe_apply_handler("compile_exception", error_handler, compat_handler, 1); +  if (IS_ZERO(sp-1)) yy_describe_exception(&thrown); +  pop_stack(); +  free_svalue(&thrown);    }    } -  +  }    END_CYCLIC();    }    }    }    UNSETJMP(tmp);    ret=mkconstantsvaluenode(Pike_sp-1);    pop_stack();    return ret;   }