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.45 1997/08/30 18:35:34 grubba Exp $"); + RCSID("$Id: interpret.c,v 1.46 1997/09/09 03:36:11 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:741:    CASE(F_GLOBAL_LVALUE)    {    struct identifier *i;    INT32 tmp=GET_ARG() + fp->context.identifier_level;       if(!fp->current_object->prog)    error("Cannot access global variables in destructed object.\n");       i=ID_FROM_INT(fp->current_object->prog, tmp);    -  if(!IDENTIFIER_IS_VARIABLE(i->flags)) +  if(!IDENTIFIER_IS_VARIABLE(i->identifier_flags))    error("Cannot re-assign functions or constants.\n");       if(i->run_time_type == T_MIXED)    {    sp[0].type=T_LVALUE;    sp[0].u.lval=(struct svalue *)GLOBAL_FROM_INT(tmp);    }else{    sp[0].type=T_SHORT_LVALUE;    sp[0].u.short_lval= (union anything *)GLOBAL_FROM_INT(tmp);    sp[0].subtype=i->run_time_type;
pike.git/src/interpret.c:797:    break;       CASE(F_ASSIGN_GLOBAL)    {    struct identifier *i;    INT32 tmp=GET_ARG() + fp->context.identifier_level;    if(!fp->current_object->prog)    error("Cannot access global variables in destructed object.\n");       i=ID_FROM_INT(fp->current_object->prog, tmp); -  if(!IDENTIFIER_IS_VARIABLE(i->flags)) +  if(!IDENTIFIER_IS_VARIABLE(i->identifier_flags))    error("Cannot assign functions or constants.\n");    if(i->run_time_type == T_MIXED)    {    assign_svalue((struct svalue *)GLOBAL_FROM_INT(tmp), sp-1);    }else{    assign_to_short_svalue((union anything *)GLOBAL_FROM_INT(tmp),    i->run_time_type,    sp-1);    }    }    break;       CASE(F_ASSIGN_GLOBAL_AND_POP)    {    struct identifier *i;    INT32 tmp=GET_ARG() + fp->context.identifier_level;    if(!fp->current_object->prog)    error("Cannot access global variables in destructed object.\n");       i=ID_FROM_INT(fp->current_object->prog, tmp); -  if(!IDENTIFIER_IS_VARIABLE(i->flags)) +  if(!IDENTIFIER_IS_VARIABLE(i->identifier_flags))    error("Cannot assign functions or constants.\n");       if(i->run_time_type == T_MIXED)    {    struct svalue *s=(struct svalue *)GLOBAL_FROM_INT(tmp);    free_svalue(s);    sp--;    *s=*sp;    }else{    assign_to_short_svalue((union anything *)GLOBAL_FROM_INT(tmp),
pike.git/src/interpret.c:1355:       fp = &new_frame;      #ifdef PROFILING    function->num_calls++;   #endif /* PROFILING */       if(function->func.offset == -1)    error("Calling undefined function '%s'.\n",function->name->str);    -  if(function->flags & IDENTIFIER_C_FUNCTION) +  if(function->identifier_flags & IDENTIFIER_C_FUNCTION)    {    fp->num_args=args;    new_frame.num_locals=args;    (*function->func.c_fun)(args);    }else{    int num_args;    int num_locals;    unsigned char *pc;    pc=new_frame.context.prog->program + function->func.offset;   
pike.git/src/interpret.c:1377:    num_args=EXTRACT_UCHAR(pc++);       /* adjust arguments on stack */    if(args < num_args) /* push zeros */    {    clear_svalues(sp, num_args-args);    sp += num_args-args;    args += num_args-args;    }    -  if(function->flags & IDENTIFIER_VARARGS) +  if(function->identifier_flags & IDENTIFIER_VARARGS)    {    f_aggregate(args - num_args); /* make array */    args = num_args+1;    }else{    if(args > num_args)    {    /* pop excessive */    pop_n_elems(args - num_args);    args=num_args;    }