pike.git / src / las.c

version» Context lines:

pike.git/src/las.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: las.c,v 1.427 2008/07/13 14:43:28 grubba Exp $ + || $Id: las.c,v 1.428 2008/07/14 21:44:25 grubba Exp $   */      #include "global.h"   #include "interpret.h"   #include "las.h"   #include "array.h"   #include "object.h"   #include "stralloc.h"   #include "dynamic_buffer.h"   #include "lex.h"
pike.git/src/las.c:352:    free_type(b);    }    return a;    }    return b;   }      int check_tailrecursion(void)   {    int e; +  if (Pike_compiler->compiler_frame->lexical_scope & SCOPE_SCOPE_USED)) { +  /* There might be a lambda around that has references to the old context +  * in which case we can't reuse it with a tail-recursive call. +  */ +  return 0; +  }    if(debug_options & NO_TAILRECURSION) return 0;    for(e=0;e<Pike_compiler->compiler_frame->max_number_of_locals;e++)    {    if(!pike_type_allow_premature_toss(    Pike_compiler->compiler_frame->variable[e].type))    return 0;    }    return 1;   }   
pike.git/src/las.c:3946:       case F_SWITCH:    if (!CAR(n) || (CAR(n)->type == void_type_string)) {    yyerror("switch(): Conditional expression is void.");    } else if(!match_types(CAR(n)->type, mixed_type_string))    yyerror("Bad switch expression.");    copy_pike_type(n->type, void_type_string);    break;       case F_CONSTANT: -  n->type = get_type_of_svalue(& n->u.sval); +  n->type = get_type_of_svalue(&n->u.sval);    break;       case F_FOREACH:    if (!CAR(n) || (CAR(n)->token != F_VAL_LVAL)) {    yyerror("foreach(): No expression to loop over.");    } else {    if (!CAAR(n) || pike_types_le(CAAR(n)->type, void_type_string)) {    yyerror("foreach(): Looping over a void expression.");    } else {    if(CDAR(n) && CDAR(n)->token == ':')