pike.git / src / las.c

version» Context lines:

pike.git/src/las.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: las.c,v 1.52 1998/02/24 23:01:29 hubbe Exp $"); + RCSID("$Id: las.c,v 1.53 1998/02/27 08:39:20 hubbe Exp $");      #include "language.h"   #include "interpret.h"   #include "las.h"   #include "array.h"   #include "object.h"   #include "stralloc.h"   #include "dynamic_buffer.h"   #include "lex.h"   #include "pike_types.h"
pike.git/src/las.c:1398:    break;       case F_ASSIGN:    if(CAR(n) && CDR(n) &&    !match_types(CDR(n)->type,CAR(n)->type))    my_yyerror("Bad type in assignment.");    copy_shared_string(n->type, CDR(n)->type);    break;       case F_INDEX: -  type_a=CAR(n)->type; -  type_b=CDR(n)->type; -  if(!check_indexing(type_a, type_b, n)) -  my_yyerror("Indexing on illegal type."); -  n->type=index_type(type_a,n); -  break; -  +     case F_ARROW:    type_a=CAR(n)->type;    type_b=CDR(n)->type;    if(!check_indexing(type_a, type_b, n)) -  +  if(!catch_level)    my_yyerror("Indexing on illegal type.");    n->type=index_type(type_a,n);    break;       case F_APPLY:    {    struct pike_string *s;    struct pike_string *f;    INT32 max_args,args;    push_type(T_MIXED); /* match any return type, even void */
pike.git/src/las.c:1472:    break;    }    break;       default:    name="unknown function";    }       if(max_args < args)    { -  my_yyerror("Too many arguments to %s. (%d %d)\n",name,max_args,args); +  my_yyerror("Too many arguments to %s.\n",name);    }    else if(max_correct_args == args)    {    my_yyerror("To few arguments to %s.\n",name);    }else{    my_yyerror("Bad argument %d to %s.",    max_correct_args+1, name);    }    copy_shared_string(n->type, mixed_type_string);    }
pike.git/src/las.c:2100:    foo.counter=10000;    foo.yes=0;       tmp_callback=add_to_callback(&evaluator_callbacks,    check_evaluation_time,    (void *)&foo,0);       if(apply_low_safe_and_stupid(fake_object, jump))    {    /* Generate error message */ +  if(!catch_level) +  {    if(throw_value.type == T_ARRAY && throw_value.u.array->size)    {    union anything *a;    a=low_array_get_item_ptr(throw_value.u.array, 0, T_STRING);    if(a)    {    yyerror(a->string->str);    }else{    yyerror("Nonstandard error format.");    }    }else{    yyerror("Nonstandard error format.");    } -  +  }    }else{    if(foo.yes)    pop_n_elems(sp-save_sp);    else    ret=sp-save_sp;    }       remove_callback(tmp_callback);    }   
pike.git/src/las.c:2155:    return n;    args=eval_low(n);       switch(args)    {    case -1:    return n;    break;       case 0: +  if(catch_level) return n;    free_node(n);    n=0;    break;       case 1: -  +  if(catch_level && IS_ZERO(sp-1)) +  { +  pop_stack(); +  return n; +  }    free_node(n);    n=mksvaluenode(sp-1);    pop_stack();    break;       default:    free_node(n);    n=NULL;    while(args--)    {