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.84 1998/05/24 08:44:30 hubbe Exp $"); + RCSID("$Id: interpret.c,v 1.85 1998/05/25 10:38:45 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:1577:    push_int(GET_ARG());    print_return_value();    goto do_index;       CASE(F_NEG_INT_INDEX);    push_int(-GET_ARG());    print_return_value();       CASE(F_INDEX);    do_index: -  o_index(); +  { +  struct svalue s; +  index_no_free(&s,sp-2,sp-1); +  pop_n_elems(2); +  *sp=s; +  sp++; +  }    print_return_value();    break;       CASE(F_CAST); f_cast(); break;       CASE(F_RANGE); o_range(); break;    CASE(F_COPY_VALUE);    {    struct svalue tmp;    copy_svalues_recursively_no_free(&tmp,sp-1,1,0);    free_svalue(sp-1);    sp[-1]=tmp;    }    break;    -  +  CASE(F_INDIRECT); +  { +  struct svalue s; +  lvalue_to_svalue_no_free(&s,sp-2); +  if(s.type != T_STRING) +  { +  pop_n_elems(2); +  *sp=s; +  sp++; +  }else{ +  struct object *o; +  o=low_clone(string_assignment_program); +  ((struct string_assignment_storage *)o->storage)->lval[0]=sp[-2]; +  ((struct string_assignment_storage *)o->storage)->lval[1]=sp[-1]; +  ((struct string_assignment_storage *)o->storage)->s=s.u.string; +  sp-=2; +  push_object(o); +  } +  } +  print_return_value(); +  break; +  +     CASE(F_SIZEOF);    instr=pike_sizeof(sp-1);    pop_stack();    push_int(instr);    break;       CASE(F_SIZEOF_LOCAL);    push_int(pike_sizeof(fp->locals+GET_ARG()));    break;