Branch: Tag:

1997-06-25

1997-06-25 22:47:56 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

Compiler hacked

Rev: bin/mktestsuite:1.4.2.1
Rev: lib/master.pike:1.43.2.2
Rev: src/ChangeLog:1.97.2.2
Rev: src/Makefile.in:1.28.2.1
Rev: src/backend.c:1.10.2.3
Rev: src/builtin_functions.c:1.36.2.1
Rev: src/builtin_functions.h:1.3.2.1
Rev: src/compilation.h:1.3.2.1
Rev: src/cpp.c:1.1.2.1
Rev: src/docode.c:1.16.2.1
Rev: src/docode.h:1.2.2.1
Rev: src/interpret.c:1.42.2.1
Rev: src/interpret.h:1.11.2.1
Rev: src/language.yacc:1.42.2.2
Rev: src/las.c:1.32.2.1
Rev: src/las.h:1.6.2.1
Rev: src/lex.c:1.21.2.2
Rev: src/lex.h:1.4.2.1
Rev: src/main.c:1.21.2.1
Rev: src/modules/files/file.c:1.37.2.3
Rev: src/object.c:1.17.2.2
Rev: src/object.h:1.9.2.2
Rev: src/peep.c:1.10.2.1
Rev: src/pike_types.c:1.21.2.1
Rev: src/program.c:1.33.2.2
Rev: src/program.h:1.14.2.2
Rev: src/program_areas.h:1.1.2.1
Rev: src/stralloc.c:1.14.2.1
Rev: src/stralloc.h:1.7.2.1
Rev: src/stuff.c:1.2.2.1
Rev: src/stuff.h:1.1.1.1.2.1
Rev: src/svalue.c:1.12.2.1
Rev: src/testsuite.in:1.40.2.2
Rev: src/version.c:1.15.2.1

4:   ||| See the files COPYING and DISCLAIMER for more information.   \*/   #include "global.h" - RCSID("$Id: interpret.c,v 1.42 1997/04/16 03:09:11 hubbe Exp $"); + RCSID("$Id: interpret.c,v 1.42.2.1 1997/06/25 22:46:37 hubbe Exp $");   #include "interpret.h"   #include "object.h"   #include "program.h"
614:    print_return_value();    break;    +     CASE(F_MARK_AND_LOCAL); *(mark_sp++)=sp;    CASE(F_LOCAL);    assign_svalue_no_free(sp++,fp->locals+GET_ARG());
1340:    if(function->func.offset == -1)    error("Calling undefined function '%s'.\n",function->name->str);    -  if(function->flags & IDENTIFIER_C_FUNCTION) +  switch(function->flags & (IDENTIFIER_FUNCTION | IDENTIFIER_CONSTANT))    { -  +  case IDENTIFIER_C_FUNCTION:    fp->num_args=args;    new_frame.num_locals=args;    (*function->func.c_fun)(args); -  +  break; +  +  case IDENTIFIER_CONSTANT: +  { +  struct svalue *s=fp->context.prog->constants+function->func.offset; +  if(s->type == T_PROGRAM) +  { +  struct object *tmp=parent_clone_object(s->u.program,o,args); +  push_object(tmp);    }else{ -  +  error("Calling strange value!\n"); +  } +  break; +  } +  +  case IDENTIFIER_PIKE_FUNCTION: +  {    int num_args;    int num_locals;    unsigned char *pc;
1388: Inside #if defined(DEBUG)
   if(sp<evaluator_stack)    fatal("Stack error (also simple).\n");   #endif +  break;    }    -  +  } +     if(sp - new_frame.locals > 1)    {    pop_n_elems(sp - new_frame.locals -1);
1495:    if(!o->prog)    error("Apply on destructed object.\n");    -  apply_low(o, o->prog->lfuns[fun], args); +  apply_low(o, FIND_LFUN(o->prog,fun), args);   }      void apply_shared(struct object *o,