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 as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/   /**/   #include "global.h" - RCSID("$Id: las.c,v 1.281 2002/02/06 17:23:24 grubba Exp $"); + RCSID("$Id: las.c,v 1.282 2002/03/02 18:47:38 mast 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:245:    case F_CAST:    if(n->type == void_type_string)    return 0;    else    return count_args(CAR(n));       case F_SOFT_CAST:    return count_args(CAR(n));       case F_CASE: +  case F_CASE_RANGE:    case F_FOR:    case F_DO:    case F_LOOP:    case F_INC_LOOP:    case F_DEC_LOOP:    case F_DEC_NEQ_LOOP:    case F_INC_NEQ_LOOP:    case F_BREAK:    case F_RETURN:    case F_CONTINUE:
pike.git/src/las.c:1033:    case F_BREAK:    res->node_info |= OPT_BREAK;    break;       case F_CONTINUE:    res->node_info |= OPT_CONTINUE;    break;       case F_DEFAULT:    case F_CASE: +  case F_CASE_RANGE:    res->node_info |= OPT_CASE;    break;       case F_INC_LOOP:    case F_INC_NEQ_LOOP:    case F_DEC_LOOP:    case F_DEC_NEQ_LOOP:    res->node_info |= OPT_ASSIGNMENT;    if (a) {    res->tree_info |= a->tree_info;
pike.git/src/las.c:3774:    yytype_error("Return type mismatch.",    Pike_compiler->compiler_frame->current_return_type,    CAR(n)->type,    YYTE_IS_WARNING);    }    }    }    copy_pike_type(n->type, void_type_string);    break;    -  case F_CASE: +  case F_CASE_RANGE:    if (CDR(n) && CAR(n) && !TEST_COMPAT(0,6)) {    /* case 1 .. 2: */    if (!match_types(CAR(n)->type, CDR(n)->type)) {    if (!match_types(CAR(n)->type, int_type_string) ||    !match_types(CDR(n)->type, int_type_string)) {    yytype_error("Type mismatch in case range.",    CAR(n)->type, CDR(n)->type, 0);    }    } else if ((lex.pragmas & ID_STRICT_TYPES) &&    (CAR(n)->type != CDR(n)->type)) {
pike.git/src/las.c:3803:    } else if (!pike_types_le(CAR(n)->type, CDR(n)->type)) {    if (!(CDR(n)->type == zero_type_string) ||    !(pike_types_le(CAR(n)->type, int_type_string))) {    yytype_error("Type mismatch in case range.",    CDR(n)->type, CAR(n)->type, YYTE_IS_WARNING);    }    }    }    }    /* FALL_THROUGH */ +  case F_CASE:    case F_INC_LOOP:    case F_DEC_LOOP:    case F_DEC_NEQ_LOOP:    case F_INC_NEQ_LOOP:    case F_LOOP:    case F_CONTINUE:    case F_BREAK:    case F_DEFAULT:    case F_POP_VALUE:    copy_pike_type(n->type, void_type_string);
pike.git/src/las.c:4216: Inside #if defined(SHARED_NODES) && !defined(IN_TPIKE)
   case F_CONTINUE:    MEMCPY(usage, cont_u, MAX_LOCAL);    return;       case F_BREAK:    MEMCPY(usage, break_u, MAX_LOCAL);    return;       case F_DEFAULT:    case F_CASE: +  case F_CASE_RANGE:    {    int 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);    for(i = 0; i < MAX_LOCAL; i++) {    switch_u[i] |= usage[i];    }    return;    }
pike.git/src/las.c:4527: Inside #if defined(SHARED_NODES) && !defined(IN_TPIKE)
   ADD_NODE_REF(n);    return n;       case F_BREAK:    MEMCPY(usage, break_u, MAX_LOCAL);    ADD_NODE_REF(n);    return n;       case F_DEFAULT:    case F_CASE: +  case F_CASE_RANGE:    {    int 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);    for(i = 0; i < MAX_LOCAL; i++) {    switch_u[i] |= usage[i];    }    return mknode(n->token, car, cdr);    }