Branch: Tag:

2003-01-15

2003-01-15 19:01:11 by Martin Stjernholm <mast@lysator.liu.se>

Before invoking the trampoline magic, check properly that it's the `()
lfun in the trampoline object that is to be called.

Rev: src/interpret.c:1.288

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: interpret.c,v 1.287 2003/01/09 15:21:26 grubba Exp $ + || $Id: interpret.c,v 1.288 2003/01/15 19:01:11 mast Exp $   */      #include "global.h" - RCSID("$Id: interpret.c,v 1.287 2003/01/09 15:21:26 grubba Exp $"); + RCSID("$Id: interpret.c,v 1.288 2003/01/15 19:01:11 mast Exp $");   #include "interpret.h"   #include "object.h"   #include "program.h"
1293:    }else{    type=APPLY_SVALUE;    o=s->u.object; -  if(o->prog == pike_trampoline_program) +  if(o->prog == pike_trampoline_program && +  s->subtype == QUICK_FIND_LFUN(pike_trampoline_program, LFUN_CALL))    {    fun=((struct pike_trampoline *)(o->storage))->func;    scope=((struct pike_trampoline *)(o->storage))->frame;
1358:       case APPLY_LOW:    o = (struct object *)arg1; -  if(o->prog == pike_trampoline_program) +  fun = ((char *)arg2) - (char *)0; +  if(o->prog == pike_trampoline_program && +  fun == QUICK_FIND_LFUN(pike_trampoline_program, LFUN_CALL))    {    fun=((struct pike_trampoline *)(o->storage))->func;    scope=((struct pike_trampoline *)(o->storage))->frame;    o=scope->current_object;    goto apply_low_with_scope;    } -  fun = ((char *)arg2) - (char *)0; +        apply_low:   #undef SCOPE