pike.git / src / opcodes.c

version» Context lines:

pike.git/src/opcodes.c:15:   #include "opcodes.h"   #include "object.h"   #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"    - RCSID("$Id: opcodes.c,v 1.23 1998/05/15 01:29:28 hubbe Exp $"); + RCSID("$Id: opcodes.c,v 1.24 1998/05/16 10:58:31 hubbe Exp $");      void index_no_free(struct svalue *to,struct svalue *what,struct svalue *ind)   {    INT32 i;    switch(what->type)    {    case T_ARRAY:    simple_array_index_no_free(to,what->u.array,ind);    break;   
pike.git/src/opcodes.c:292:    fatal("Internal error: Cast failed (run_time_type = %d, sp[-1].type = %d.)\n",run_time_type,sp[-1].type);   #endif       switch(run_time_type)    {    case T_ARRAY:    {    struct pike_string *itype;    INT32 run_time_itype;    -  push_string(itype=index_type(sp[-2].u.string,0)); +  push_string(itype=index_type(type,0));    run_time_itype=compile_type_to_runtime_type(itype);       if(run_time_itype != T_MIXED)    {    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,i;    struct pike_string *s; -  + #ifdef 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();    } -  + #ifdef DEBUG +  if(save_sp!=sp) +  fatal("o_cast left stack droppings.\n"); + #endif    END_CYCLIC();    }    assign_svalue(sp-3,sp-1);    pop_stack();    }    pop_stack();    }    }   }