Can we change the commit address to [EMAIL PROTECTED]?
I like to filter my mail with the Qmail Delivered-To: directive so it help 
if the mailing list name would be different.
Andi

At 07:26 PM 2/13/2002 +0000, Andi Gutmans wrote:
>andi            Wed Feb 13 14:26:07 2002 EDT
>
>   Modified files:
>     /ZendEngine2        zend_compile.c zend_compile.h zend_language_parser.y
>   Log:
>   @ Allow a series of consecutive catch() statements (Andi, Zend Engine)
>   <?php
>         class MyException1 {
>
>         }
>
>         class MyException2 {
>
>         }
>
>         try {
>                 throw new MyException2();
>         } catch (MyException1 $m) {
>                 print "Caught MyException1";
>         } catch (MyException2 $m) {
>                 print "Caught MyException2";
>         }
>
>
>Index: ZendEngine2/zend_compile.c
>diff -u ZendEngine2/zend_compile.c:1.268 ZendEngine2/zend_compile.c:1.269
>--- ZendEngine2/zend_compile.c:1.268    Thu Feb  7 09:08:43 2002
>+++ ZendEngine2/zend_compile.c  Wed Feb 13 14:26:07 2002
>@@ -1255,7 +1255,7 @@
>         }
>  }
>
>-void zend_do_begin_catch(znode *try_token, znode *catch_class, znode 
>*catch_var TSRMLS_DC)
>+void zend_do_begin_catch(znode *try_token, znode *catch_class, znode 
>*catch_var, zend_bool first_catch TSRMLS_DC)
>  {
>         long catch_op_number = get_next_op_number(CG(active_op_array));
>         zend_op *opline;
>@@ -1266,11 +1266,12 @@
>         SET_UNUSED(opline->op1); /* FIXME: Define IS_CLASS or something 
> like that */
>         opline->op2 = *catch_var;
>
>-       zend_llist_apply_with_argument(CG(throw_list), 
>(llist_apply_with_arg_func_t) throw_list_applier, &CG(catch_begin) TSRMLS_CC);
>-       zend_llist_destroy(CG(throw_list));
>-       efree(CG(throw_list));
>-       CG(throw_list) = (void *) try_token->throw_list;
>-
>+       if (first_catch) {
>+               zend_llist_apply_with_argument(CG(throw_list), 
>(llist_apply_with_arg_func_t) throw_list_applier, &CG(catch_begin) TSRMLS_CC);
>+               zend_llist_destroy(CG(throw_list));
>+               efree(CG(throw_list));
>+               CG(throw_list) = (void *) try_token->throw_list;
>+       }
>         try_token->u.opline_num = catch_op_number;
>  }
>
>Index: ZendEngine2/zend_compile.h
>diff -u ZendEngine2/zend_compile.h:1.165 ZendEngine2/zend_compile.h:1.166
>--- ZendEngine2/zend_compile.h:1.165    Sun Feb 10 07:54:02 2002
>+++ ZendEngine2/zend_compile.h  Wed Feb 13 14:26:07 2002
>@@ -279,7 +279,7 @@
>  void zend_do_return(znode *expr, int do_end_vparse TSRMLS_DC);
>
>  void zend_do_try(znode *try_token TSRMLS_DC);
>-void zend_do_begin_catch(znode *try_token, znode *catch_class, znode 
>*catch_var TSRMLS_DC);
>+void zend_do_begin_catch(znode *try_token, znode *catch_class, znode 
>*catch_var, zend_bool first_catch TSRMLS_DC);
>  void zend_do_end_catch(znode *try_token TSRMLS_DC);
>  void zend_do_throw(znode *expr TSRMLS_DC);
>
>Index: ZendEngine2/zend_language_parser.y
>diff -u ZendEngine2/zend_language_parser.y:1.46 
>ZendEngine2/zend_language_parser.y:1.47
>--- ZendEngine2/zend_language_parser.y:1.46     Sun Jan 20 15:42:15 2002
>+++ ZendEngine2/zend_language_parser.y  Wed Feb 13 14:26:07 2002
>@@ -206,10 +206,16 @@
>         |       T_DECLARE { zend_do_declare_begin(TSRMLS_C); } '(' 
> declare_list ')' declare_statement { zend_do_declare_end(TSRMLS_C); }
>         |       ';'             /* empty statement */
>         |       T_TRY { zend_do_try(&$1 TSRMLS_CC); } '{' 
> inner_statement_list '}'
>-                       T_CATCH '(' catch_class_entry T_VARIABLE ')' { 
>zend_do_begin_catch(&$1, &$8, &$9 TSRMLS_CC); } '{' inner_statement_list 
>'}' { zend_do_end_catch(&$1 TSRMLS_CC); }
>+                       catches
>         |       T_THROW expr ';' { zend_do_throw(&$2 TSRMLS_CC); }
>         |       T_DELETE  cvar  ';' { 
> zend_do_end_variable_parse(BP_VAR_UNSET, 0 TSRMLS_CC); zend_do_unset(&$1, 
> ZEND_UNSET_OBJ TSRMLS_CC); }
>  ;
>+
>+catches:
>+               catches T_CATCH '(' catch_class_entry T_VARIABLE ')' { 
>zend_do_begin_catch(&$2, &$4, &$5, 0 TSRMLS_CC); } '{' 
>inner_statement_list '}' { zend_do_end_catch(&$2 TSRMLS_CC); }
>+       |       T_CATCH '(' catch_class_entry T_VARIABLE ')' { 
>zend_do_begin_catch(&$1, &$3, &$4, 1 TSRMLS_CC); } '{' 
>inner_statement_list '}' { zend_do_end_catch(&$1 TSRMLS_CC); }
>+;
>+
>
>  unset_variables:
>                 unset_variable
>
>
>
>--
>PHP CVS Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to