Branch: Tag:

2002-09-23

2002-09-23 20:12:59 by Martin Stjernholm <mast@lysator.liu.se>

Replaced the F_THROW_ZERO opcode used at normal exit from catch blocks with
F_EXIT_CATCH, which uses the newer escape catch feature. This avoids a
longjmp at the normal exit of every catch block.

Also changed the return value for normal catch block exits to be UNDEFINED
and not zero.

Rev: src/docode.c:1.147
Rev: src/interpret_functions.h:1.108

1:   /* -  * $Id: interpret_functions.h,v 1.107 2002/09/20 12:31:36 marcus Exp $ +  * $Id: interpret_functions.h,v 1.108 2002/09/23 20:12:59 mast Exp $    *    * Opcode definitions for the interpreter.    */
1168:    INTER_ESCAPE_CATCH;   });    - OPCODE0(F_THROW_ZERO, "throw(0)", 0, { -  push_int(0); -  f_throw(1); + OPCODE0_RETURN(F_EXIT_CATCH, "exit catch", 0, { +  push_undefined(); +  Pike_fp->pc = PROG_COUNTER; +  INTER_ESCAPE_CATCH;   });      OPCODE1(F_SWITCH, "switch", 0, {