Branch: Tag:

2003-01-15

2003-01-15 19:03:26 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.284

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.283 2002/11/24 22:47:06 mast Exp $ + || $Id: interpret.c,v 1.284 2003/01/15 19:03:26 mast Exp $   */      #include "global.h" - RCSID("$Id: interpret.c,v 1.283 2002/11/24 22:47:06 mast Exp $"); + RCSID("$Id: interpret.c,v 1.284 2003/01/15 19:03:26 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 = (ptrdiff_t)arg2; +  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 = (ptrdiff_t)arg2; +        apply_low:   #undef SCOPE