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.442 2009/11/20 10:58:09 grubba Exp $ + || $Id: las.c,v 1.443 2010/04/15 16:54:55 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:3463:    case F_ARROW:    if (!CAR(n) || (CAR(n)->type == void_type_string)) {    yyerror("Indexing a void expression.");    /* The optimizer converts this to an expression returning 0. */    copy_pike_type(n->type, zero_type_string);    } else if (CDR(n)) {    int valid;    type_a=CAR(n)->type;    type_b=CDR(n)->type;    if((valid = check_indexing(type_a, type_b, n)) <= 0) -  if(!Pike_compiler->catch_level) +  if(!Pike_compiler->catch_level) {    yytype_report((!valid)?REPORT_ERROR:REPORT_WARNING, -  NULL, 0, NULL, NULL, 0, type_b, +  NULL, 0, NULL, NULL, 0, type_a,    0, "Indexing on illegal type."); -  +  ref_push_type_value(type_b); +  low_yyreport((!valid)?REPORT_ERROR:REPORT_WARNING, NULL, 0, +  type_check_system_string, 1, +  "Index : %O."); +  }    n->type = index_type(type_a, type_b, n);    } else {    copy_pike_type(n->type, mixed_type_string);    }    break;       case F_RANGE:    if (!CAR(n)) {    /* Unlikely to occur, and if it does, it has probably    * already been complained about.
pike.git/src/las.c:5327: Inside #if defined(PIKE_USE_MACHINE_CODE) and #if defined(VALGRIND_DISCARD_TRANSLATIONS)
     #ifdef VALGRIND_DISCARD_TRANSLATIONS    /* We won't use this machine code any more... */    VALGRIND_DISCARD_TRANSLATIONS(prog->program + num_program,    (prog->num_program - num_program)*sizeof(PIKE_OPCODE_T));   #endif /* VALGRIND_DISCARD_TRANSLATIONS */   #endif /* PIKE_USE_MACHINE_CODE */       prog->num_program = num_program;    + #ifdef PIKE_DEBUG +  if(l_flag > 3 && n) +  { +  fprintf(stderr,"Evaluation ==> %d\n", ret); +  } + #endif +     return ret;   }      static node *eval(node *n)   {    node *new;    ptrdiff_t args;       if(!is_const(n) || n->node_info & OPT_FLAG_NODE)    return n;