diff --git a/src/interpret.c b/src/interpret.c index 99e849e9ded921f0ec35fe0f46d370450e8fb65f..6adc487f847ed9dd6ba81f4b6a0c8e330e28ac58 100644 --- a/src/interpret.c +++ b/src/interpret.c @@ -5,7 +5,7 @@ \*/ /**/ #include "global.h" -RCSID("$Id: interpret.c,v 1.134 2000/01/07 04:33:55 mast Exp $"); +RCSID("$Id: interpret.c,v 1.135 2000/01/22 22:13:08 grubba Exp $"); #include "interpret.h" #include "object.h" #include "program.h" @@ -745,6 +745,13 @@ void mega_apply2(enum apply_type type, INT32 args, void *arg1, void *arg2) break; }else{ o=s->u.object; + if(o->prog == pike_trampoline_program) + { + fun=((struct pike_trampoline *)(o->storage))->func; + scope=((struct pike_trampoline *)(o->storage))->frame; + o=scope->current_object; + goto apply_low_with_scope; + } fun=s->subtype; goto apply_low; } diff --git a/src/interpreter.h b/src/interpreter.h index d763cb74299b1a354e85050198c00b14b5f96466..9736ce7f1727135cd0dcbb62b298b7048d4dbb88 100644 --- a/src/interpreter.h +++ b/src/interpreter.h @@ -184,6 +184,9 @@ static int eval_instruction(unsigned char *pc) add_ref( ((struct pike_trampoline *)(o->storage))->frame=fp ); ((struct pike_trampoline *)(o->storage))->func=GET_ARG()+fp->context.identifier_level; push_object(o); + /* Make it look like a function. */ + sp[-1].subtype = pike_trampoline_program->lfuns[LFUN_CALL]; + sp[-1].type = T_FUNCTION; print_return_value(); break; }