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.17 1997/01/31 23:07:16 hubbe Exp $"); + RCSID("$Id: las.c,v 1.18 1997/02/07 01:06:12 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:463:    i->func.offset);    }else{    yyerror("Identifier is not a constant");    push_int(0);    }    break;       case F_LOCAL:    yyerror("Expected constant, got local variable");    push_int(0); +  break;       case F_GLOBAL:    yyerror("Expected constant, got global variable");    push_int(0); -  +  break;    }    }   }      node *index_node(node *n, struct pike_string * id)   {    node *ret;    JMP_BUF tmp;    if(SETJMP(tmp))    {    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);       yyerror("Couldn't index module."); -  push_svalue(0); +  push_int(0);    }else{    resolv_constant(n);    push_string(id);    reference_shared_string(id);    f_index(2);    }    UNSETJMP(tmp);    ret=mkconstantsvaluenode(sp-1);    pop_stack();    return ret;
pike.git/src/las.c:645:    }    b->line_number = n->line_number;    b->node_info = n->node_info;    b->tree_info = n->tree_info;    return b;   }         int is_const(node *n)   { +  if(!n) return 1;    return !(n->tree_info & (OPT_SIDE_EFFECT |    OPT_NOT_CONST |    OPT_ASSIGNMENT |    OPT_CASE |    OPT_CONTINUE |    OPT_BREAK |    OPT_RETURN    ));   }