pike.git / src / las.c

version» Context lines:

pike.git/src/las.c:1137:    int e;    node *res = mkemptynode();    res->token = F_LOCAL;       f=Pike_compiler->compiler_frame;    for(e=0;e<depth;e++) f=f->previous;    copy_pike_type(res->type, f->variable[var].type);       res->node_info = OPT_NOT_CONST;    res->tree_info = res->node_info; +  if (res->type && (res->type->type == PIKE_T_AUTO)) { +  res->node_info |= OPT_TYPE_NOT_FIXED; +  }   #ifdef __CHECKER__    _CDR(res) = 0;   #endif    res->u.integer.a = var;    if (depth < 0) {    /* First appearance of this variable.    * Add initialization code.    */    res->node_info |= OPT_ASSIGNMENT;    res->u.integer.b = 0;
pike.git/src/las.c:4048:    copy_pike_type(n->type, void_type_string);    break;    }    if (n->token == F_ARG_LIST) {    n->type = or_pike_types(CAR(n)->type, CDR(n)->type, 0);    } else {    copy_pike_type(n->type, CDR(n)->type);    }    break;    +  case F_LOCAL: +  { +  struct compiler_frame *f = Pike_compiler->compiler_frame; +  int e; +  for (e = 0; f && (e < n->u.integer.b); e++) { +  f = f->previous; +  } +  if (f) { +  copy_pike_type(n->type, f->variable[n->u.integer.a].type); +  } else { +  copy_pike_type(n->type, mixed_type_string); +  } +  break; +  } +     case F_MAGIC_INDEX:    /* FIXME: Could have a stricter type for ::`->(). */    MAKE_CONSTANT_TYPE(n->type, tF_MAGIC_INDEX);    break;    case F_MAGIC_SET_INDEX:    /* FIXME: Could have a stricter type for ::`->=(). */    MAKE_CONSTANT_TYPE(n->type, tF_MAGIC_SET_INDEX);    break;    case F_MAGIC_INDICES:    MAKE_CONSTANT_TYPE(n->type, tF_MAGIC_INDICES);