pike.git / src / interpret.c

version» Context lines:

pike.git/src/interpret.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: interpret.c,v 1.56 1997/12/22 17:35:23 hubbe Exp $"); + RCSID("$Id: interpret.c,v 1.57 1998/03/05 13:19:39 grubba Exp $");   #include "interpret.h"   #include "object.h"   #include "program.h"   #include "svalue.h"   #include "array.h"   #include "mapping.h"   #include "error.h"   #include "language.h"   #include "stralloc.h"   #include "constants.h"
pike.git/src/interpret.c:261:    mapping_insert(lval->u.mapping, lval+1, from);    break;       case T_MULTISET:    if(IS_ZERO(from))    multiset_delete(lval->u.multiset, lval+1);    else    multiset_insert(lval->u.multiset, lval+1);    break;    +  case T_VOID: +  error("Indexing a void.\n"); /* Grubba */ +  return(0); +     default:    if(IS_ZERO(lval))    error("Indexing the NULL value.\n"); /* Per */    else    error("Indexing a basic type.\n");    }   }      union anything *get_pointer_if_this_type(struct svalue *lval, TYPE_T t)   {
pike.git/src/interpret.c:292:    return object_get_item_ptr(lval->u.object,lval+1,t);       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;    +  case T_VOID: +  error("Indexing a void.\n"); /* Grubba */ +  return(0); +     default:    if(IS_ZERO(lval))    error("Indexing the NULL value.\n"); /* Per */    else    error("Indexing a basic type.\n");    return 0;    }   }      #ifdef DEBUG
pike.git/src/interpret.c:374:   #define DOJUMP() \    do { int tmp; tmp=EXTRACT_INT(pc); pc+=tmp; if(tmp < 0) fast_check_threads_etc(6); }while(0)      #define COMPARISMENT(ID,EXPR) \   CASE(ID); \   instr=EXPR; \   pop_n_elems(2); \   push_int(instr); \   break    + /* Example usage: +  * LOOP(F_INC_LOOP, ++, <, f_add(2), is_lt); +  */   #define LOOP(ID, OP1, OP2, OP3, OP4) \   CASE(ID) \   { \    union anything *i=get_pointer_if_this_type(sp-2, T_INT); \    if(i) \    { \    OP1 ( i->integer ); \    if(i->integer OP2 sp[-3].u.integer) \    { \    pc+=EXTRACT_INT(pc); \