Branch: Tag:

2008-09-12

2008-09-12 13:30:44 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Scopes now survive soft casts.
Fixes performance issue noted in LysLysKOM 16774268.

Rev: src/pike_types.c:1.357

2:   || 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: pike_types.c,v 1.356 2008/09/12 11:15:07 grubba Exp $ + || $Id: pike_types.c,v 1.357 2008/09/12 13:30:44 grubba Exp $   */      #include "global.h"
5554:    tmp2 = soft_cast(soft_type, orig_type->cdr, flags));    break;    case T_SCOPE: +  if ((res = soft_cast(soft_type, orig_type->cdr, flags))) { +  type_stack_mark(); +  push_finished_type(res); +  push_scope_type(CAR_TO_INT(orig_type)); +  free_type(res); +  res = pop_unfinished_type(); +  } +  return res;    case T_ASSIGN:    case PIKE_T_NAME:    orig_type = orig_type->cdr;