pike.git / src / opcodes.c

version» Context lines:

pike.git/src/opcodes.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: opcodes.c,v 1.144 2003/04/27 17:52:42 mast Exp $ + || $Id: opcodes.c,v 1.145 2003/04/28 00:32:43 mast Exp $   */      #include "global.h"   #include <errno.h>   #include <math.h>   #include <ctype.h>   #include "interpret.h"   #include "svalue.h"   #include "array.h"   #include "stralloc.h"
pike.git/src/opcodes.c:23:   #include "fd_control.h"   #include "cyclic.h"   #include "builtin_functions.h"   #include "module_support.h"   #include "security.h"   #include "bignum.h"   #include "operators.h"      #define sp Pike_sp    - RCSID("$Id: opcodes.c,v 1.144 2003/04/27 17:52:42 mast Exp $"); + RCSID("$Id: opcodes.c,v 1.145 2003/04/28 00:32:43 mast 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))    Pike_error("Index permission denied.\n");   #endif
pike.git/src/opcodes.c:672:    {    struct array *a;    struct array *tmp=sp[-2].u.array;    DECLARE_CYCLIC();       if((a=(struct array *)BEGIN_CYCLIC(tmp,0)))    {    ref_push_array(a);    }else{    INT32 e; +  TYPE_FIELD types = 0;   #ifdef PIKE_DEBUG    struct svalue *save_sp=sp+1;   #endif    push_array(a=allocate_array(tmp->size));    SET_CYCLIC_RET(a);       for(e=0;e<a->size;e++)    {    push_svalue(tmp->item+e);    o_cast(itype, run_time_itype); -  array_set_index(a,e,sp-1); -  pop_stack(); +  stack_pop_to_no_free (ITEM(a) + e); +  types |= 1 << ITEM(a)[e].type;    } -  +  a->type_field = types;   #ifdef PIKE_DEBUG    if(save_sp!=sp)    Pike_fatal("o_cast left stack droppings.\n");   #endif    }    END_CYCLIC();    assign_svalue(sp-3,sp-1);    pop_stack();    }    pop_stack();
pike.git/src/opcodes.c:749: Inside #if defined(PIKE_NEW_MULTISETS)
   o_cast(itype, run_time_itype);    multiset_insert_2 (m, sp - 1, NULL, 0);    pop_stack();    } while ((nodepos = multiset_next (tmp, nodepos)) >= 0);    UNSET_ONERROR (uwp);    }      #else /* PIKE_NEW_MULTISETS */    INT32 e;    struct array *a; +  TYPE_FIELD types = 0;    push_multiset(m=allocate_multiset(a=allocate_array(tmp->size)));       SET_CYCLIC_RET(m);       for(e=0;e<a->size;e++)    {    push_svalue(tmp->item+e);    o_cast(itype, run_time_itype); -  array_set_index(a,e,sp-1); -  pop_stack(); +  stack_pop_to_no_free (ITEM(a) + e); +  types |= 1 << ITEM(a)[e].type;    } -  +  a->type_field = types;    order_multiset(m);   #endif      #ifdef PIKE_DEBUG    if(save_sp!=sp)    Pike_fatal("o_cast left stack droppings.\n");   #endif    }    END_CYCLIC();    assign_svalue(sp-3,sp-1);