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.225 2000/11/27 00:02:08 grubba Exp $"); + RCSID("$Id: las.c,v 1.226 2000/12/01 08:09:49 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"   #include "constants.h"   #include "mapping.h"   #include "multiset.h" - #include "error.h" + #include "pike_error.h"   #include "docode.h"   #include "main.h"   #include "pike_memory.h"   #include "operators.h"   #include "callback.h"   #include "pike_macros.h"   #include "peep.h"   #include "builtin_functions.h"   #include "cyclic.h"   #include "block_alloc.h"
pike.git/src/las.c:1444:    {    ptrdiff_t args=eval_low(n);    if(args==1) return;       if(args!=-1)    {    if(!args)    {    yyerror("Expected constant, got void expression");    }else{ -  yyerror("Possible internal error!!!"); +  yyerror("Possible internal Pike_error!!!");    pop_n_elems(DO_NOT_WARN(args-1));    return;    }    }    }       sprintf(fnord,"Expected constant, got something else (%d)",n->token);    yyerror(fnord);    push_int(0);    return;
pike.git/src/las.c:1616:    my_yyerror("Recursive module dependency in '%s'.",id->str);    pop_stack();    push_int(0);    }else{    SET_CYCLIC_RET(c+1);    ref_push_string(id);    {    struct svalue *save_sp = Pike_sp-2;    JMP_BUF recovery;    if (SETJMP(recovery)) { -  /* f_index() threw an error! +  /* f_index() threw an Pike_error!    * -  * FIXME: Report the error thrown. +  * FIXME: Report the Pike_error thrown.    */    if (Pike_sp > save_sp) {    pop_n_elems(Pike_sp - save_sp);    } else if (Pike_sp != save_sp) {    fatal("f_index() munged stack!\n");    }    push_int(0);    Pike_sp[-1].subtype = NUMBER_UNDEFINED;    } else {    f_index(2);
pike.git/src/las.c:2320:    while (src) {    *dst = malloc(sizeof(struct scope_info));    if (!*dst) {    src = ret->locals;    while(src) {    struct scope_info *tmp = src->next;    free(src);    src = tmp;    }    free(ret); -  error("Out of memory in copy_vars.\n"); +  Pike_error("Out of memory in copy_vars.\n");    return NULL; /* Make sure that the optimizer knows we exit here. */    }    MEMCPY(*dst, src, sizeof(struct scope_info));    src = src->next;    dst = &((*dst)->next);    *dst = NULL;    }    src = a->externals;    dst = &(ret->externals);    *dst = NULL;
pike.git/src/las.c:2347:    free(src);    src = tmp;    }    src = ret->externals;    while(src) {    struct scope_info *tmp = src->next;    free(src);    src = tmp;    }    free(ret); -  error("Out of memory in copy_vars.\n"); +  Pike_error("Out of memory in copy_vars.\n");    return NULL; /* Make sure that the optimizer knows we exit here. */    }    MEMCPY(*dst, src, sizeof(struct scope_info));    src = src->next;    dst = &((*dst)->next);    *dst = NULL;    }       ret->err = a->err;    ret->ext_flags = a->ext_flags;
pike.git/src/las.c:3524: Inside #if defined(SHARED_NODES) && !defined(IN_TPIKE)
   } else if (CDR(n)->token == F_ARRAY_LVALUE) {    find_usage(CDR(n), usage, switch_u, cont_u, break_u, catch_u);    }    find_usage(CAR(n), usage, switch_u, cont_u, break_u, catch_u);    return;       case F_SSCANF:    {    int i;    -  /* catch_usage is restored if sscanf throws an error. */ +  /* catch_usage is restored if sscanf throws an Pike_error. */    for (i=0; i < MAX_LOCAL; i++) {    usage[i] |= catch_u[i];    }    /* Only the first two arguments are evaluated. */    if (CAR(n)) {    find_usage(CDAR(n), usage, switch_u, cont_u, break_u, catch_u);    find_usage(CAAR(n), usage, switch_u, cont_u, break_u, catch_u);    }    return;    }
pike.git/src/las.c:3553: Inside #if defined(SHARED_NODES) && !defined(IN_TPIKE)
   for(i=0; i < MAX_LOCAL; i++) {    usage[i] |= catch_usage[i];    }    return;    }       case F_APPLY:    {    int i;    -  /* catch_usage is restored if the function throws an error. */ +  /* catch_usage is restored if the function throws an Pike_error. */    for (i=0; i < MAX_LOCAL; i++) {    usage[i] |= catch_u[i];    }    find_usage(CDR(n), usage, switch_u, cont_u, break_u, catch_u);    find_usage(CAR(n), usage, switch_u, cont_u, break_u, catch_u);    return;    }       case F_LVALUE_LIST:    find_usage(CDR(n), usage, switch_u, cont_u, break_u, catch_u);
pike.git/src/las.c:3808: Inside #if defined(SHARED_NODES) && !defined(IN_TPIKE)
   cdr = CDR(n);    ADD_NODE_REF(cdr);    }    return mknode(F_ASSIGN, low_localopt(CAR(n), usage, switch_u, cont_u,    break_u, catch_u), cdr);       case F_SSCANF:    {    int i;    -  /* catch_usage is restored if sscanf throws an error. */ +  /* catch_usage is restored if sscanf throws an Pike_error. */    for (i=0; i < MAX_LOCAL; i++) {    usage[i] |= catch_u[i];    }    /* Only the first two arguments are evaluated. */    if (CAR(n)) {    cdr = low_localopt(CDAR(n), usage, switch_u, cont_u, break_u, catch_u);    car = low_localopt(CAAR(n), usage, switch_u, cont_u, break_u, catch_u);       if (CDR(n)) {    ADD_NODE_REF(CDR(n));
pike.git/src/las.c:3845: Inside #if defined(SHARED_NODES) && !defined(IN_TPIKE)
   usage[i] |= catch_usage[i];    }    return mknode(F_CATCH, car, 0);    }    break;       case F_APPLY:    {    int i;    -  /* catch_usage is restored if the function throws an error. */ +  /* catch_usage is restored if the function throws an Pike_error. */    for (i=0; i < MAX_LOCAL; i++) {    usage[i] |= catch_u[i];    }    cdr = low_localopt(CDR(n), usage, switch_u, cont_u, break_u, catch_u);    car = low_localopt(CAR(n), usage, switch_u, cont_u, break_u, catch_u);    return mknode(F_APPLY, car, cdr);    }       case F_LVALUE_LIST:    cdr = low_localopt(CDR(n), usage, switch_u, cont_u, break_u, catch_u);
pike.git/src/las.c:4489:    /* This is how long we try to optimize before giving up... */    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(Pike_compiler->fake_object, jump))    { -  /* Generate error message */ +  /* Generate Pike_error message */    if(!Pike_compiler->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."); +  yyerror("Nonstandard Pike_error format.");    }    }    else if(throw_value.type == T_OBJECT)    {    ref_push_object(throw_value.u.object);    push_int(0);    f_index(2);    if(Pike_sp[-1].type != T_STRING) -  yyerror("Nonstandard error format."); +  yyerror("Nonstandard Pike_error format.");    else    yyerror(Pike_sp[-1].u.string->str);    pop_stack();    }    else    { -  yyerror("Nonstandard error format."); +  yyerror("Nonstandard Pike_error format.");    }    }    }else{    if(foo.yes)    pop_n_elems(Pike_sp-save_sp);    else    ret=Pike_sp-save_sp;    }       remove_callback(tmp_callback);