pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:1:   /*   || 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: program.c,v 1.501 2003/04/27 23:06:15 mast Exp $ + || $Id: program.c,v 1.502 2003/05/16 14:08:38 grubba Exp $   */      #include "global.h" - RCSID("$Id: program.c,v 1.501 2003/04/27 23:06:15 mast Exp $"); + RCSID("$Id: program.c,v 1.502 2003/05/16 14:08:38 grubba Exp $");   #include "program.h"   #include "object.h"   #include "dynamic_buffer.h"   #include "pike_types.h"   #include "stralloc.h"   #include "las.h"   #include "language.h"   #include "lex.h"   #include "pike_macros.h"   #include "fsort.h"
pike.git/src/program.c:1091:   /* fprintf(stderr,"index_module: %s\n",ident->str); */       {    JMP_BUF tmp;       if(SETJMP(tmp))    {    struct svalue thrown = throw_value;    throw_value.type = T_INT;    +  dmalloc_touch_svalue(&thrown); +     if (!ident->size_shift) {    my_yyerror("Couldn't index a module with '%s'.", ident->str);    } else {    yyerror("Couldn't index a module.");    }       push_svalue(&thrown);    low_safe_apply_handler("compile_exception", error_handler, compat_handler, 1);    if (SAFE_IS_ZERO(sp-1)) yy_describe_exception(&thrown);    pop_stack();
pike.git/src/program.c:1279:    if(Pike_compiler->compiler_pass==2) {    if (throw_value.type == T_STRING && !throw_value.u.string->size_shift) {    yyerror(throw_value.u.string->str);    free_svalue(&throw_value);    throw_value.type = T_INT;    }    else {    struct svalue thrown = throw_value;    throw_value.type = T_INT;    +  dmalloc_touch_svalue(&thrown); +     if (!ident->size_shift)    my_yyerror("Error resolving '%s'.", ident->str);    else    yyerror("Error resolving identifier.");       push_svalue(&thrown);    low_safe_apply_handler("compile_exception", error_handler, compat_handler, 1);    if (SAFE_IS_ZERO(sp-1)) yy_describe_exception(&thrown);    pop_stack();    free_svalue(&thrown);
pike.git/src/program.c:3585:    else {    pop_stack();    if (!s->size_shift)    my_yyerror("Couldn't find program: %s",s->str);    else    yyerror("Couldn't find program");    }    else {    struct svalue thrown = throw_value;    throw_value.type = T_INT; +  dmalloc_touch_svalue(&thrown); +     my_yyerror("Error finding program");    push_svalue(&thrown);    low_safe_apply_handler("compile_exception", error_handler, compat_handler, 1);    if (SAFE_IS_ZERO(sp-1)) yy_describe_exception(&thrown);    pop_stack();    free_svalue(&thrown);    }       return 0;   }
pike.git/src/program.c:4240:    struct pike_string *id;       tmp.type=T_PROGRAM;    tmp.subtype=0;    tmp.u.program=end_program();    if(!tmp.u.program)    Pike_fatal("Failed to initialize class '%s'\n",name);       id=make_shared_binary_string(name,namelen);    ret=add_constant(id, &tmp, flags); +  /* The following is not really true, but it helps encode_value()... */ +  Pike_compiler->new_program->flags |= +  tmp.u.program->flags & PROGRAM_HAS_C_METHODS;    free_string(id);    free_svalue(&tmp);    return ret;   }      /*    * define a new function    * if func isn't given, it is supposed to be a prototype.    */   INT32 define_function(struct pike_string *name,
pike.git/src/program.c:4751:   {    struct program_constant tmp;    unsigned int e;    JMP_BUF tmp2;       if(SETJMP(tmp2))    {    struct svalue zero, thrown = throw_value;    throw_value.type = T_INT;    +  dmalloc_touch_svalue(&thrown); +     yyerror("Couldn't store constant.");       push_svalue(&thrown);    low_safe_apply_handler("compile_exception", error_handler, compat_handler, 1);    if (SAFE_IS_ZERO(sp-1)) yy_describe_exception(&thrown);    pop_stack();    free_svalue(&thrown);       zero.type = T_INT;    zero.subtype = NUMBER_NUMBER;
pike.git/src/program.c:6067: Inside #if defined(PIKE_DEBUG)
   /* Initialize the placeholder. */   #ifdef PIKE_DEBUG    if (c->placeholder->prog != c->p)    Pike_fatal("Placeholder object got wrong program after second pass.\n");   #endif    if(SETJMP(rec))    {    struct svalue thrown = throw_value;    debug_malloc_touch(c->placeholder);    throw_value.type = T_INT; +  dmalloc_touch_svalue(&thrown); +     push_svalue(&thrown);    low_safe_apply_handler("compile_exception", error_handler, compat_handler, 1);    if (SAFE_IS_ZERO(sp-1)) yy_describe_exception(&thrown);    pop_stack();    free_svalue(&thrown);    zap_placeholder(c);    }else{    debug_malloc_touch(c->placeholder);    call_pike_initializers(c->placeholder,0);    }