Branch: Tag:

2002-05-10

2002-05-10 22:38:33 by Martin Stjernholm <mast@lysator.liu.se>

pike_frame.pc now always contains the return address whenever a
pike call has been made.

Rev: src/builtin.cmod:1.87

1:   /* -*- c -*- -  * $Id: builtin.cmod,v 1.86 2002/04/28 02:08:30 mast Exp $ +  * $Id: builtin.cmod,v 1.87 2002/05/10 22:38:33 mast Exp $    */      #include "global.h"
1193:    if ((bf->prog = f->context.prog)) {    add_ref(bf->prog);    if (f->pc) { -  if (of && of->flags & PIKE_FRAME_RETURN_INTERNAL) -  /* If the called frame has PIKE_FRAME_RETURN_INTERNAL set -  * then the pc to continue at is stored in f->pc. */ +  /* f->pc is the return address (i.e the next opcode) when +  * inside a call, otherwise it points to the current +  * opcode. */ +  if (of)    bf->pc = f->pc - 1;    else    bf->pc = f->pc;