pike.git / src / builtin.cmod

version» Context lines:

pike.git/src/builtin.cmod:1:   /* -*- c -*-   || 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.cmod,v 1.181 2006/03/11 17:46:21 grubba Exp $ + || $Id: builtin.cmod,v 1.182 2006/03/22 19:08:39 grubba Exp $   */      #include "global.h"   #include "interpret.h"   #include "svalue.h"   #include "pike_macros.h"   #include "object.h"   #include "program.h"   #include "array.h"   #include "pike_error.h"
pike.git/src/builtin.cmod:1250:       static void fill_in_file_and_line()    {    struct pike_string *file = NULL;    assert (THIS->lineno == -1);       if (THIS->pc && THIS->prog) {    file = low_get_line(THIS->pc, THIS->prog, &THIS->lineno);    THIS->pc = NULL;    } -  else if (THIS->fun.type == PIKE_T_FUNCTION) +  else if (THIS->fun.type == PIKE_T_FUNCTION) {    file = low_get_function_line (THIS->fun.u.object, THIS->fun.subtype,    &THIS->lineno); -  else if (THIS->prog) +  } +  else if (THIS->prog) {    file = low_get_program_line (THIS->prog, &THIS->lineno); -  +  }       if (file) {    if (!THIS->filename) THIS->filename = file;    else free_string (file);    }       if (THIS->prog) {    free_program(THIS->prog);    THIS->prog = NULL;    }
pike.git/src/builtin.cmod:1514:       call_c_initializers(o);       size--;       res->item[size].u.object = o;    res->item[size].type = PIKE_T_OBJECT;    res->item[size].subtype = 0;       bf = OBJ2_BACKTRACE_FRAME(o); +  bf->pc = NULL;       if ((bf->prog = f->context.prog)) {    add_ref(bf->prog); -  bf->pc = f->pc; +     }       if ((bf->fun.u.object = f->current_object) &&    (bf->fun.u.object->prog)) {    add_ref(bf->fun.u.object);    bf->fun.subtype = f->fun;    bf->fun.type = PIKE_T_FUNCTION;    function = ID_FROM_INT(f->current_object->prog, f->fun); -  +  +  if (IDENTIFIER_IS_PIKE_FUNCTION(function->identifier_flags)) { +  /* We don't trust pc if we aren't in a Pike function... */ +  bf->pc = f->pc; +  }    } else {    bf->fun.u.integer = 0;    bf->fun.subtype = NUMBER_DESTRUCTED;    bf->fun.type = PIKE_T_INT;    }       if (f->locals) {    INT32 numargs = DO_NOT_WARN((INT32) MINIMUM(f->num_args,    stack_top - f->locals));    INT32 varargs = 0;