From 9e60cb553fdff09dcff192d96884d75a9998bb73 Mon Sep 17 00:00:00 2001 From: Zeev Suraski Date: Tue, 3 Feb 2004 12:17:09 +0000 Subject: Rewrote exception support. Fixes a few limitations and bugs in the old implementation, and allows exceptions to 'fire' much earlier than before. Instructions on how to use the new mechanism will follow on internals@ shortly... Note - this (most probably) breaks the current implementation of set_exception_handler() --- Zend/zend_opcode.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Zend/zend_opcode.c') diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c index 122711604f..05402af5ce 100644 --- a/Zend/zend_opcode.c +++ b/Zend/zend_opcode.c @@ -83,10 +83,12 @@ void init_op_array(zend_op_array *op_array, zend_uchar type, int initial_ops_siz op_array->scope = NULL; op_array->brk_cont_array = NULL; + op_array->try_catch_array = NULL; op_array->last_brk_cont = 0; op_array->current_brk_cont = -1; op_array->static_variables = NULL; + op_array->last_try_catch = 0; op_array->return_reference = 0; op_array->done_pass_two = 0; @@ -229,6 +231,9 @@ ZEND_API void destroy_op_array(zend_op_array *op_array TSRMLS_DC) if (op_array->brk_cont_array) { efree(op_array->brk_cont_array); } + if (op_array->try_catch_array) { + efree(op_array->try_catch_array); + } if (op_array->done_pass_two) { zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_op_array_dtor_handler, op_array TSRMLS_CC); } -- cgit v1.2.1