pike.git / src / las.c

version» Context lines:

pike.git/src/las.c:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| 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.154 1999/12/29 19:20:32 grubba Exp $"); + RCSID("$Id: las.c,v 1.155 1999/12/30 21:36:02 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:3664:    }    }       new_program->num_program=jump;       return ret;   }      static node *eval(node *n)   { +  node *new;    int args;    extern struct svalue *sp;    if(!is_const(n) || n->token==':')    return n;       args=eval_low(n);       switch(args)    {    case -1:
pike.git/src/las.c:3690:    n=0;    break;       case 1:    if(catch_level && IS_ZERO(sp-1))    {    pop_stack();    return n;    }    if (n->token != F_SOFT_CAST) { -  free_node(n); -  n=mksvaluenode(sp-1); +  new = mksvaluenode(sp-1);    } else { -  node *nn = n; -  n = mksoftcastnode(n->type, mksvaluenode(sp-1)); -  free_node(nn); +  new = mksoftcastnode(n->type, mksvaluenode(sp-1));    } -  +  if (n->type && (!new->type || pike_types_le(n->type,new->type))) { +  if (new->type) free_string(new->type); +  copy_shared_string(new->type,n->type); +  } +  free_node(n); +  n = new;    pop_stack();    break;       default:    if (n->token != F_SOFT_CAST) {    free_node(n);    n=NULL;    while(args--)    {    n=mknode(F_ARG_LIST,mksvaluenode(sp-1),n);