pike.git / src / opcodes.c

version» Context lines:

pike.git/src/opcodes.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"   #include <math.h>   #include <ctype.h>   #include "interpret.h"   #include "svalue.h"   #include "array.h"   #include "stralloc.h"   #include "mapping.h"   #include "multiset.h"   #include "opcodes.h"
pike.git/src/opcodes.c:17:   #include "error.h"   #include "pike_types.h"   #include "pike_memory.h"   #include "fd_control.h"   #include "cyclic.h"   #include "builtin_functions.h"   #include "module_support.h"   #include "security.h"   #include "bignum.h"    - RCSID("$Id: opcodes.c,v 1.49 1999/10/24 01:08:38 noring Exp $"); + RCSID("$Id: opcodes.c,v 1.50 1999/10/24 14:07:12 grubba Exp $");      void index_no_free(struct svalue *to,struct svalue *what,struct svalue *ind)   {    INT32 i;      #ifdef PIKE_SECURITY    if(what->type <= MAX_COMPLEX)    if(!CHECK_DATA_SECURITY(what->u.array, SECURITY_BIT_INDEX))    error("Index permission denied.\n");   #endif
pike.git/src/opcodes.c:105:    error("Indexing a basic type.\n");    }   }      void o_index(void)   {    struct svalue s;    index_no_free(&s,sp-2,sp-1);    pop_n_elems(2);    *sp=s; +  dmalloc_touch_svalue(sp);    sp++;   }      void o_cast(struct pike_string *type, INT32 run_time_type)   {    INT32 i;       if(run_time_type != sp[-1].type)    {    if(run_time_type == T_MIXED)
pike.git/src/opcodes.c:130:    s=describe_type(type);    push_string(s);    if(!sp[-2].u.object->prog)    error("Cast called on destructed object.\n");    if(FIND_LFUN(sp[-2].u.object->prog,LFUN_CAST) == -1)    error("No cast method in object.\n");    apply_lfun(sp[-2].u.object, LFUN_CAST, 1);    free_svalue(sp-2);    sp[-2]=sp[-1];    sp--; +  dmalloc_touch_svalue(sp);    }else       switch(run_time_type)    {    default:    error("Cannot perform cast to that type.\n");       case T_MIXED:    return;       case T_MAPPING:    switch(sp[-1].type)    {    case T_ARRAY:    {    f_transpose(1);    sp--; -  +  dmalloc_touch_svalue(sp);    push_array_items(sp->u.array);    f_mkmapping(2);    break;    }       default:    error("Cannot cast %s to mapping.\n",get_name_of_type(sp[-1].type));    }    break;   
pike.git/src/opcodes.c:571:   #endif    o_cast(sp[-2].u.string,    compile_type_to_runtime_type(sp[-2].u.string));   #ifdef PIKE_DEBUG    if(save_sp != sp)    fatal("Internal error: o_cast() left droppings on stack.\n");   #endif    free_svalue(sp-2);    sp[-2]=sp[-1];    sp--; +  dmalloc_touch_svalue(sp);   }         /*    flags:    *    operators:    %d    %s    %f