Branch: Tag:

1997-01-16

1997-01-16 05:00:48 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

overloading for -> and [] implemented

Rev: src/docode.c:1.7
Rev: src/interpret.c:1.19
Rev: src/language.yacc:1.17
Rev: src/las.c:1.11
Rev: src/lex.c:1.10
Rev: src/object.c:1.8
Rev: src/peep.c:1.4
Rev: src/peep.in:1.2
Rev: src/program.c:1.12
Rev: src/program.h:1.6

4:   ||| See the files COPYING and DISCLAIMER for more information.   \*/   #include "global.h" - RCSID("$Id: interpret.c,v 1.18 1996/12/06 08:30:16 per Exp $"); + RCSID("$Id: interpret.c,v 1.19 1997/01/16 05:00:44 hubbe Exp $");   #include "interpret.h"   #include "object.h"   #include "program.h"
558:    CASE(F_STRING);    copy_shared_string(sp->u.string,fp->context.prog->strings[GET_ARG()]);    sp->type=T_STRING; +  sp->subtype=0;    sp++;    print_return_value();    break;    -  +  CASE(F_ARROW_STRING); +  copy_shared_string(sp->u.string,fp->context.prog->strings[GET_ARG()]); +  sp->type=T_STRING; +  sp->subtype=1; /* Magic */ +  sp++; +  print_return_value(); +  break; +     CASE(F_CONSTANT);    assign_svalue_no_free(sp++,fp->context.prog->constants+GET_ARG());    print_return_value();
784:    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; +     /* Jumps */    CASE(F_BRANCH);    DOJUMP();
1007:    print_return_value();    goto do_index;    +  CASE(F_ARROW);    CASE(F_STRING_INDEX);    copy_shared_string(sp->u.string,fp->context.prog->strings[GET_ARG()]);    sp->type=T_STRING;
1333:    JMP_BUF recovery;       sp-=args; +  free_svalue(& throw_value); +  throw_value.type=T_INT;    if(SETJMP(recovery))    { -  +  if(throw_value.type == T_ARRAY) +  {    ONERROR tmp;    SET_ONERROR(tmp,exit_on_error,"Error in handle_error in master object!");    assign_svalue_no_free(sp++, & throw_value);    APPLY_MASTER("handle_error", 1);    pop_stack();    UNSET_ONERROR(tmp); -  +  }       sp->u.integer = 0;    sp->subtype=NUMBER_NUMBER;