pike.git / src / language.yacc

version» Context lines:

pike.git/src/language.yacc:880:    $9 = 0;    }    e = $<number>8 + $9 - 1;    if (Pike_compiler->varargs) {    /* NB: This is set when either __create__() or create() has varargs. */    push_finished_type(Pike_compiler->compiler_frame->variable[e].type);    e--;    if (Pike_compiler->compiler_frame->variable[e+1].type->type != T_ARRAY) {    yywarning("Varargs variable is not an array!! (Internal error)");    } else { -  pop_type_stack(T_ARRAY); +  if (pop_type_stack(T_ARRAY)) {    compiler_discard_top_type();    } -  +  }    }else{    push_type(T_VOID);    }    push_type(T_MANY);    for(; e >= $<number>8; e--)    {    push_finished_type(Pike_compiler->compiler_frame->variable[e].type);    if (Pike_compiler->compiler_frame->variable[e].def) {    push_type(T_VOID);    push_type(T_OR);
pike.git/src/language.yacc:1131:    {    /* Change "auto" return type to actual return type. */    push_finished_type(Pike_compiler->compiler_frame->current_return_type->car);       e = $<number>8 + $9 - 1;    if(Pike_compiler->varargs &&    (!$<number>8 || (Pike_compiler->num_create_args >= 0)))    {    push_finished_type(Pike_compiler->compiler_frame->variable[e].type);    e--; -  pop_type_stack(T_ARRAY); +  if (pop_type_stack(T_ARRAY)) {    compiler_discard_top_type(); -  +  }    }else{    push_type(T_VOID);    }    push_type(T_MANY);    for(; e>=0; e--)    {    push_finished_type(Pike_compiler->compiler_frame->variable[e].type);    push_type(T_FUNCTION);    }   
pike.git/src/language.yacc:2487:    Pike_compiler->varargs = 0;       if (Pike_compiler->compiler_pass == COMPILER_PASS_FIRST) {    /* Define a tentative prototype for the lambda. */    push_finished_type(mixed_type_string);    e=$5-1;    if($<number>$)    {    push_finished_type(Pike_compiler->compiler_frame->variable[e].type);    e--; -  pop_type_stack(T_ARRAY); +  if (pop_type_stack(T_ARRAY)) {    compiler_discard_top_type(); -  +  }    }else{    push_type(T_VOID);    }    Pike_compiler->varargs=0;    push_type(T_MANY);    for(; e>=0; e--) {    push_finished_type(Pike_compiler->compiler_frame->variable[e].type);    push_type(T_FUNCTION);    }    type=compiler_pop_type();
pike.git/src/language.yacc:2546:    } else {    /* Tentative return type. */    push_type(T_MIXED);    }       e=$5-1;    if($<number>6)    {    push_finished_type(Pike_compiler->compiler_frame->variable[e].type);    e--; -  pop_type_stack(T_ARRAY); +  if (pop_type_stack(T_ARRAY)) {    compiler_discard_top_type(); -  +  }    }else{    push_type(T_VOID);    }    Pike_compiler->varargs=0;    push_type(T_MANY);    for(; e>=0; e--) {    node *def = Pike_compiler->compiler_frame->variable[e].def;    push_finished_type(Pike_compiler->compiler_frame->variable[e].type);    if (def) {    push_type(T_VOID);
pike.git/src/language.yacc:2660:    struct identifier *i=0;       /***/    push_finished_type(Pike_compiler->compiler_frame->current_return_type);       e=$3-1;    if(Pike_compiler->varargs)    {    push_finished_type(Pike_compiler->compiler_frame->variable[e].type);    e--; -  pop_type_stack(T_ARRAY); +  if (pop_type_stack(T_ARRAY)) {    compiler_discard_top_type(); -  +  }    }else{    push_type(T_VOID);    }    push_type(T_MANY);    for(; e>=0; e--) {    push_finished_type(Pike_compiler->compiler_frame->variable[e].type);    if (Pike_compiler->compiler_frame->variable[e].def) {    push_type(T_VOID);    push_type(T_OR);    }
pike.git/src/language.yacc:2864:    LOCAL_VAR_IS_USED | LOCAL_VAR_USED_IN_SCOPE;    }       Pike_compiler->compiler_frame->lexical_scope |= SCOPE_SCOPE_USED;       e=$3-1;    if(Pike_compiler->varargs)    {    push_finished_type(Pike_compiler->compiler_frame->variable[e].type);    e--; -  pop_type_stack(T_ARRAY); +  if (pop_type_stack(T_ARRAY)) {    compiler_discard_top_type(); -  +  }    }else{    push_type(T_VOID);    }    push_type(T_MANY);    for(; e>=0; e--) {    push_finished_type(Pike_compiler->compiler_frame->variable[e].type);    if (Pike_compiler->compiler_frame->variable[e].def) {    push_type(T_VOID);    push_type(T_OR);    }
pike.git/src/language.yacc:3149:    node *n = NULL;    int e = $3;    struct pike_type *t;       type_stack_mark();    push_type(T_VOID);       if (Pike_compiler->num_create_args < 0) {    e--;    push_finished_type(Pike_compiler->compiler_frame->variable[e].type); -  pop_type_stack(T_ARRAY); +  if (pop_type_stack(T_ARRAY)) {    compiler_discard_top_type(); -  +  }       if (Pike_compiler->compiler_pass == COMPILER_PASS_LAST) {    /* FIXME: Should probably use some other flag. */    if ((runtime_options & RUNTIME_CHECK_TYPES) &&    (Pike_compiler->compiler_frame->variable[e].type !=    mixed_type_string)) {    node *local_node;       /* fprintf(stderr, "Creating soft cast node for local #%d\n", e);*/