pike.git / src / interpret.c

version» Context lines:

pike.git/src/interpret.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: interpret.c,v 1.399 2008/05/11 22:44:00 mast Exp $ + || $Id: interpret.c,v 1.400 2008/05/12 16:33:07 grubba Exp $   */      #include "global.h"   #include "interpret.h"   #include "object.h"   #include "program.h"   #include "svalue.h"   #include "array.h"   #include "mapping.h"   #include "pike_error.h"
pike.git/src/interpret.c:397:    {    to->u.integer=1;    to->subtype=NUMBER_NUMBER;    }else{    to->u.integer=0;    to->subtype=NUMBER_UNDEFINED;    }    break;       default: +  fprintf(stderr, "TOSVAL: lval->type: %d (%s)\n", +  lval->type, get_name_of_type(lval->type));    if(SAFE_IS_ZERO(lval))    index_error(0,0,0,lval,lval+1,"Indexing the NULL value.\n");    else    index_error(0,0,0,lval,lval+1,"Indexing a basic type.\n");    }   }      PMOD_EXPORT void assign_lvalue(struct svalue *lval,struct svalue *from)   {   #ifdef PIKE_SECURITY
pike.git/src/interpret.c:461:    break;       case T_MULTISET:    if(UNSAFE_IS_ZERO(from))    multiset_delete(lval->u.multiset, lval+1);    else    multiset_insert(lval->u.multiset, lval+1);    break;       default: +  fprintf(stderr, "ASSIGN: lval->type: %d (%s)\n", +  lval->type, get_name_of_type(lval->type));    if(SAFE_IS_ZERO(lval))    index_error(0,0,0,lval,lval+1,"Indexing the NULL value.\n");    else    index_error(0,0,0,lval,lval+1,"Indexing a basic type.\n");    }   }      /* On error callback. lvalue is followed by value to assign. */   static void o_assign_lvalue(struct svalue *lvalue)   {
pike.git/src/interpret.c:505:       case T_ARRAY:    return array_get_item_ptr(lval->u.array,lval+1,t);       case T_MAPPING:    return mapping_get_item_ptr(lval->u.mapping,lval+1,t);       case T_MULTISET: return 0;       default: +  fprintf(stderr, "GETPTR: lval->type: %d (%s)\n", +  lval->type, get_name_of_type(lval->type));    if(SAFE_IS_ZERO(lval))    index_error(0,0,0,lval,lval+1,"Indexing the NULL value.\n");    else    index_error(0,0,0,lval,lval+1,"Indexing a basic type.\n");    return 0;    }   }      #ifdef PIKE_DEBUG   
pike.git/src/interpret.c:583:    = {-4711, -4711, -4711, -4711, (size_t) -4711, -4711, NULL, NULL, NULL}   #endif   ;      /* Find the lexical scope @[depth] levels out.    *    * @[loc]:    * Input:    * struct object *o // object to start from.    * struct inherit *inherit // inherit in o->prog. -  * int parent_identifier // identifier in o to start from. +  * (int parent_identifier) // identifier in o to start from. +  * // Only if depth == 0.    *    * Output:    * struct object *o // object containing the scope.    * struct inherit *inherit // inherit in o->prog being the scope.    * int parent_identifier // identifier in o from the inherit.    */   PMOD_EXPORT void find_external_context(struct external_variable_context *loc,    int depth)   {    struct program *p;
pike.git/src/interpret.c:2660: Inside #if defined(PIKE_DEBUG)
   "(%ld entries on stack, stack_size is %ld entries)\n",    PTRDIFF_T_TO_LONG(Pike_sp - Pike_interpreter.evaluator_stack),    PTRDIFF_T_TO_LONG(Pike_stack_size));       if(Pike_mark_sp > &(Pike_interpreter.mark_stack[Pike_stack_size]))    Pike_fatal("Mark stack overflow.\n");       if(Pike_mark_sp < Pike_interpreter.mark_stack)    Pike_fatal("Mark stack underflow.\n");    -  for(s=Pike_interpreter.evaluator_stack;s<Pike_sp;s++) check_svalue(s); +  for(s=Pike_interpreter.evaluator_stack;s<Pike_sp;s++) { +  /* NOTE: Freed svalues are allowed on the stack. */ +  if (s->type != PIKE_T_FREE) check_svalue(s); +  }       s=Pike_interpreter.evaluator_stack;    for(m=Pike_interpreter.mark_stack;m<Pike_mark_sp;m++)    {    if(*m < s)    Pike_fatal("Mark stack failure.\n");       s=*m;    }