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.64 1998/01/30 20:04:32 hubbe Exp $"); + RCSID("$Id: interpret.c,v 1.65 1998/02/01 02:07:24 hubbe 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:1075:    *s=*sp;    }else{    assign_to_short_svalue((union anything *)GLOBAL_FROM_INT(tmp),    i->run_time_type,    sp-1);    pop_stack();    }    }    break;    + #ifdef F_ASSIGN_ARRAY +  CASE(F_ASSIGN_ARRAY); +  { +  struct svalue *base=*--mark_sp; +  INT32 e,args=(sp-base)>>1 +  if(sp[-1].type != T_ARRAY) +  error("Bad argument to multiple assign, not an array.\n"); +  if(sp[-1].u.array->size < args) +  error("Not enough elements in array for multiple assign.\n"); +  +  for(e=0;e<args;e++) +  assign_lvalue(base+e*2,sp[-1].u.array->item+e); +  +  pop_n_elems(sp-base); +  break; +  } + #endif +     /* Stack machine stuff */    CASE(F_POP_VALUE); pop_stack(); break;    CASE(F_POP_N_ELEMS); pop_n_elems(GET_ARG()); break;    CASE(F_MARK2); *(mark_sp++)=sp;    CASE(F_MARK); *(mark_sp++)=sp; break;       CASE(F_CLEAR_STRING_SUBTYPE);    if(sp[-1].type==T_STRING) sp[-1].subtype=0;    break;