Skip to content

Commit

Permalink
stash
Browse files Browse the repository at this point in the history
  • Loading branch information
laruence committed Aug 22, 2012
1 parent c4fecc1 commit 703a4e3
Show file tree
Hide file tree
Showing 5 changed files with 362 additions and 508 deletions.
1 change: 1 addition & 0 deletions Zend/zend_compile.c
Expand Up @@ -2792,6 +2792,7 @@ void zend_do_end_finally(znode *try_token, znode* catch_token, znode *finally_to
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
CG(active_op_array)->try_catch_array[try_token->u.op.opline_num].finally_op = finally_token->u.op.opline_num;
CG(active_op_array)->try_catch_array[try_token->u.op.opline_num].finally_end = get_next_op_number(CG(active_op_array));
CG(active_op_array)->has_finally_block = 1;

opline->opcode = ZEND_LEAVE;
SET_UNUSED(opline->op1);
Expand Down
4 changes: 3 additions & 1 deletion Zend/zend_compile.h
Expand Up @@ -281,6 +281,7 @@ struct _zend_op_array {

zend_try_catch_element *try_catch_array;
int last_try_catch;
zend_bool has_finally_block;

/* static variables support */
HashTable *static_variables;
Expand Down Expand Up @@ -383,7 +384,8 @@ struct _zend_execute_data {
zend_class_entry *current_called_scope;
zval *current_this;
zval *current_object;
zend_bool leaving;
zend_uint leaving;
zend_uint leaving_dest;
};

#define EX(element) execute_data.element
Expand Down
1 change: 1 addition & 0 deletions Zend/zend_opcode.c
Expand Up @@ -87,6 +87,7 @@ void init_op_array(zend_op_array *op_array, zend_uchar type, int initial_ops_siz

op_array->static_variables = NULL;
op_array->last_try_catch = 0;
op_array->has_finally_block = 0;

op_array->this_var = -1;

Expand Down

0 comments on commit 703a4e3

Please sign in to comment.