pike.git / src / language.yacc

version» Context lines:

pike.git/src/language.yacc:26:      %token F_BRANCH F_BRANCH_WHEN_ZERO F_BRANCH_WHEN_NON_ZERO   %token F_BRANCH_AND_POP_WHEN_ZERO F_BRANCH_AND_POP_WHEN_NON_ZERO   %token F_BRANCH_WHEN_LT F_BRANCH_WHEN_GT   %token F_BRANCH_WHEN_LE F_BRANCH_WHEN_GE   %token F_BRANCH_WHEN_EQ F_BRANCH_WHEN_NE   %token F_BRANCH_IF_LOCAL F_BRANCH_IF_NOT_LOCAL   %token F_BRANCH_IF_NOT_LOCAL_ARROW   %token F_INC_LOOP F_DEC_LOOP   %token F_INC_NEQ_LOOP F_DEC_NEQ_LOOP + %token F_RECUR F_TAIL_RECUR      %token F_LEXICAL_LOCAL F_LEXICAL_LOCAL_LVALUE      %token F_INDEX F_ARROW F_INDIRECT F_STRING_INDEX F_LOCAL_INDEX   %token F_LOCAL_LOCAL_INDEX F_LOCAL_ARROW F_GLOBAL_LOCAL_INDEX   %token F_POS_INT_INDEX F_NEG_INT_INDEX F_MAGIC_INDEX F_MAGIC_SET_INDEX   %token F_LTOSVAL F_LTOSVAL2   %token F_PUSH_ARRAY   %token F_RANGE F_COPY_VALUE   
pike.git/src/language.yacc:185:   %left F_LSH F_RSH   %left '+' '-'   %left '*' '%' '/'   %right F_NOT '~'   %nonassoc F_INC F_DEC      %{   /* This is the grammar definition of Pike. */      #include "global.h" - RCSID("$Id: language.yacc,v 1.180 2000/04/20 02:41:45 hubbe Exp $"); + RCSID("$Id: language.yacc,v 1.181 2000/04/25 09:32:46 hubbe Exp $");   #ifdef HAVE_MEMORY_H   #include <memory.h>   #endif      #include "interpret.h"   #include "array.h"   #include "object.h"   #include "stralloc.h"   #include "las.h"   #include "interpret.h"
pike.git/src/language.yacc:703:    push_finished_type(compiler_frame->variable[e].type);    }    push_type(T_FUNCTION);       {    struct pike_string *s=compiler_pop_type();    $<n>$=mkstrnode(s);    free_string(s);    }    -  if(compiler_pass==1) + /* if(compiler_pass==1) */    { -  $<number>5=define_function(check_node_hash($4)->u.sval.u.string, +  /* FIXME: +  * set current_function_number for local functions as well +  */ +  compiler_frame->current_function_number= +  define_function(check_node_hash($4)->u.sval.u.string,    check_node_hash($<n>$)->u.sval.u.string,    $1 & (~ID_EXTERN),    IDENTIFIER_PIKE_FUNCTION,    0);    }    }    block_or_semi    {    int e;    if($10)
pike.git/src/language.yacc:771:    if (check_args) {    /* Prepend the arg checking code. */    $10 = mknode(F_COMMA_EXPR, mknode(F_POP_VALUE, check_args, NULL), $10);    }       lex.current_line = save_line;   #ifdef PIKE_DEBUG    lex.current_file = save_file;   #endif /* PIKE_DEBUG */    -  f=dooptcode(check_node_hash($4)->u.sval.u.string, check_node_hash($10), -  check_node_hash($<n>9)->u.sval.u.string, $1); +  f=dooptcode(check_node_hash($4)->u.sval.u.string, +  check_node_hash($10), +  check_node_hash($<n>9)->u.sval.u.string, +  $1);   #ifdef PIKE_DEBUG    if(recoveries && sp-evaluator_stack < recoveries->sp)    fatal("Stack error (underflow)\n");    -  if(compiler_pass == 1 && f!=$<number>5) -  fatal("define_function screwed up! %d != %d\n",f,$<number>5); +  if(compiler_pass == 1 && f!=compiler_frame->current_function_number) +  fatal("define_function screwed up! %d != %d\n",f,compiler_frame->current_function_number);   #endif    }    pop_compiler_frame();    free_node($4);    free_node($8);    free_node($<n>9);    }    | modifiers type_or_error optional_stars F_IDENTIFIER push_compiler_frame0    error    {