cvs: ZendEngine2 / zend_compile.c zend_compile.h zend_vm_def.h zend_vm_execute.h zend_vm_opcodes.h
| From: | Dmitry Stogov | Date: | Thu, 16 Jun 2005 12:17:41 +0000 |
| Subject: | cvs: ZendEngine2 / zend_compile.c zend_compile.h zend_vm_def.h zend_vm_execute.h zend_vm_opcodes.h | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-3808@lists.php.net to get a copy of this message | ||
dmitry Thu Jun 16 08:17:41 2005 EDT
Modified files:
/ZendEngine2 zend_compile.c zend_compile.h zend_vm_def.h
zend_vm_execute.h zend_vm_opcodes.h
Log:
ZEND_UNSET_DIM_OBJ is splitted to ZEND_UNSET_DIM and ZEND_UNSET_OBJ.
http://cvs.php.net/diff.php/ZendEngine2/zend_compile.c?r1=1.636&r2=1.637&ty=u Index: ZendEngine2/zend_compile.c diff -u ZendEngine2/zend_compile.c:1.636 ZendEngine2/zend_compile.c:1.637 --- ZendEngine2/zend_compile.c:1.636 Fri Jun 10 03:56:38 2005 +++ ZendEngine2/zend_compile.c Thu Jun 16 08:17:33 2005 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.c,v 1.636 2005/06/10 07:56:38 dmitry Exp $ */ +/* $Id: zend_compile.c,v 1.637 2005/06/16 12:17:33 dmitry Exp $ */ #include <zend_language_parser.h> #include "zend.h" @@ -3332,12 +3332,10 @@ last_op->opcode = ZEND_UNSET_VAR; break; case ZEND_FETCH_DIM_UNSET: - last_op->opcode = ZEND_UNSET_DIM_OBJ; - last_op->extended_value = ZEND_UNSET_DIM; + last_op->opcode = ZEND_UNSET_DIM; break; case ZEND_FETCH_OBJ_UNSET: - last_op->opcode = ZEND_UNSET_DIM_OBJ; - last_op->extended_value = ZEND_UNSET_OBJ; + last_op->opcode = ZEND_UNSET_OBJ; break; } http://cvs.php.net/diff.php/ZendEngine2/zend_compile.h?r1=1.308&r2=1.309&ty=u Index: ZendEngine2/zend_compile.h diff -u ZendEngine2/zend_compile.h:1.308 ZendEngine2/zend_compile.h:1.309 --- ZendEngine2/zend_compile.h:1.308 Thu Jun 9 13:20:43 2005 +++ ZendEngine2/zend_compile.h Thu Jun 16 08:17:33 2005 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.h,v 1.308 2005/06/09 17:20:43 stas Exp $ */ +/* $Id: zend_compile.h,v 1.309 2005/06/16 12:17:33 dmitry Exp $ */ #ifndef ZEND_COMPILE_H #define ZEND_COMPILE_H @@ -576,10 +576,6 @@ #define ZEND_FETCH_STATIC_MEMBER 3 -/* obj/dim unsets */ -#define ZEND_UNSET_DIM 1 -#define ZEND_UNSET_OBJ 2 - /* class fetches */ #define ZEND_FETCH_CLASS_DEFAULT 0 #define ZEND_FETCH_CLASS_SELF 1 http://cvs.php.net/diff.php/ZendEngine2/zend_vm_def.h?r1=1.37&r2=1.38&ty=u Index: ZendEngine2/zend_vm_def.h diff -u ZendEngine2/zend_vm_def.h:1.37 ZendEngine2/zend_vm_def.h:1.38 --- ZendEngine2/zend_vm_def.h:1.37 Thu Jun 16 02:00:46 2005 +++ ZendEngine2/zend_vm_def.h Thu Jun 16 08:17:34 2005 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_vm_def.h,v 1.37 2005/06/16 06:00:46 dmitry Exp $ */ +/* $Id: zend_vm_def.h,v 1.38 2005/06/16 12:17:34 dmitry Exp $ */ /* If you change this file, please regenerate the zend_vm_execute.h and * zend_vm_opcodes.h files by running: @@ -2809,7 +2809,7 @@ ZEND_VM_NEXT_OPCODE(); } -ZEND_VM_HANDLER(75, ZEND_UNSET_DIM_OBJ, VAR|UNUSED|CV, CONST|TMP|VAR|CV) +ZEND_VM_HANDLER(75, ZEND_UNSET_DIM, VAR|UNUSED|CV, CONST|TMP|VAR|CV) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; @@ -2818,96 +2818,113 @@ long index; if (container) { - if (OP1_TYPE == IS_CV && container != &EG(uninitialized_zval_ptr)) { SEPARATE_ZVAL_IF_NOT_REF(container); } - if (opline->extended_value == ZEND_UNSET_DIM) { - switch (Z_TYPE_PP(container)) { - case IS_ARRAY: { - HashTable *ht = Z_ARRVAL_PP(container); - - switch (offset->type) { - case IS_DOUBLE: - case IS_RESOURCE: - case IS_BOOL: - case IS_LONG: - if (offset->type == IS_DOUBLE) { - index = (long) offset->value.dval; - } else { - index = offset->value.lval; - } + switch (Z_TYPE_PP(container)) { + case IS_ARRAY: { + HashTable *ht = Z_ARRVAL_PP(container); + + switch (offset->type) { + case IS_DOUBLE: + case IS_RESOURCE: + case IS_BOOL: + case IS_LONG: + if (offset->type == IS_DOUBLE) { + index = (long) offset->value.dval; + } else { + index = offset->value.lval; + } - zend_hash_index_del(ht, index); - break; - case IS_STRING: - if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && - ht == &EG(symbol_table)) { - zend_execute_data *ex; - ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); - - for (ex = EXECUTE_DATA; ex; ex = ex->prev_execute_data) { - if (ex->symbol_table == ht) { - int i; - - for (i = 0; i < ex->op_array->last_var; i++) { - if (ex->op_array->vars[i].hash_value == hash_value && - ex->op_array->vars[i].name_len == offset->value.str.len && - !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { - ex->CVs[i] = NULL; - break; - } + zend_hash_index_del(ht, index); + break; + case IS_STRING: + if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && + ht == &EG(symbol_table)) { + zend_execute_data *ex; + ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); + + for (ex = EXECUTE_DATA; ex; ex = ex->prev_execute_data) { + if (ex->symbol_table == ht) { + int i; + + for (i = 0; i < ex->op_array->last_var; i++) { + if (ex->op_array->vars[i].hash_value == hash_value && + ex->op_array->vars[i].name_len == offset->value.str.len && + !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { + ex->CVs[i] = NULL; + break; } } } } - break; - case IS_NULL: - zend_hash_del(ht, "", sizeof("")); - break; - default: - zend_error(E_WARNING, "Illegal offset type in unset"); - break; - } - FREE_OP2(); - break; + } + break; + case IS_NULL: + zend_hash_del(ht, "", sizeof("")); + break; + default: + zend_error(E_WARNING, "Illegal offset type in unset"); + break; } - case IS_OBJECT: - if (!Z_OBJ_HT_P(*container)->unset_dimension) { - zend_error_noreturn(E_ERROR, "Cannot use object as array"); - } - if (IS_OP2_TMP_FREE()) { - MAKE_REAL_ZVAL_PTR(offset); - } - Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); - if (IS_OP2_TMP_FREE()) { - zval_ptr_dtor(&offset); - } else { - FREE_OP2(); - } - break; - case IS_STRING: - zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); - ZEND_VM_CONTINUE(); /* bailed out before */ - default: - FREE_OP2(); - break; + FREE_OP2(); + break; } - } else { /* ZEND_UNSET_OBJ */ - if (Z_TYPE_PP(container) == IS_OBJECT) { + case IS_OBJECT: + if (!Z_OBJ_HT_P(*container)->unset_dimension) { + zend_error_noreturn(E_ERROR, "Cannot use object as array"); + } if (IS_OP2_TMP_FREE()) { MAKE_REAL_ZVAL_PTR(offset); } - Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); if (IS_OP2_TMP_FREE()) { zval_ptr_dtor(&offset); } else { FREE_OP2(); } + break; + case IS_STRING: + zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); + ZEND_VM_CONTINUE(); /* bailed out before */ + default: + FREE_OP2(); + break; + } + } else { + FREE_OP2(); + } + FREE_OP1_VAR_PTR(); + + ZEND_VM_NEXT_OPCODE(); +} + +ZEND_VM_HANDLER(76, ZEND_UNSET_OBJ, VAR|UNUSED|CV, CONST|TMP|VAR|CV) +{ + zend_op *opline = EX(opline); + zend_free_op free_op1, free_op2; + zval **container = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_UNSET); + zval *offset = GET_OP2_ZVAL_PTR(BP_VAR_R); + long index; + + if (container) { + if (OP1_TYPE == IS_CV && container != &EG(uninitialized_zval_ptr)) { + SEPARATE_ZVAL_IF_NOT_REF(container); + } + if (Z_TYPE_PP(container) == IS_OBJECT) { + if (IS_OP2_TMP_FREE()) { + MAKE_REAL_ZVAL_PTR(offset); } + Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + if (IS_OP2_TMP_FREE()) { + zval_ptr_dtor(&offset); + } else { + FREE_OP2(); + } + } else { + FREE_OP2(); } } else { - /* overloaded element */ FREE_OP2(); } FREE_OP1_VAR_PTR(); http://cvs.php.net/diff.php/ZendEngine2/zend_vm_execute.h?r1=1.39&r2=1.40&ty=u Index: ZendEngine2/zend_vm_execute.h diff -u ZendEngine2/zend_vm_execute.h:1.39 ZendEngine2/zend_vm_execute.h:1.40 --- ZendEngine2/zend_vm_execute.h:1.39 Thu Jun 16 02:00:47 2005 +++ ZendEngine2/zend_vm_execute.h Thu Jun 16 08:17:34 2005 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_vm_execute.h,v 1.39 2005/06/16 06:00:47 dmitry Exp $ */ +/* $Id: zend_vm_execute.h,v 1.40 2005/06/16 12:17:34 dmitry Exp $ */ static opcode_handler_t zend_user_opcode_handlers[256] = {(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL}; @@ -8882,7 +8882,7 @@ return ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } -static int ZEND_UNSET_DIM_OBJ_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +static int ZEND_UNSET_DIM_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; @@ -8891,96 +8891,113 @@ long index; if (container) { - if (IS_VAR == IS_CV && container != &EG(uninitialized_zval_ptr)) { SEPARATE_ZVAL_IF_NOT_REF(container); } - if (opline->extended_value == ZEND_UNSET_DIM) { - switch (Z_TYPE_PP(container)) { - case IS_ARRAY: { - HashTable *ht = Z_ARRVAL_PP(container); - - switch (offset->type) { - case IS_DOUBLE: - case IS_RESOURCE: - case IS_BOOL: - case IS_LONG: - if (offset->type == IS_DOUBLE) { - index = (long) offset->value.dval; - } else { - index = offset->value.lval; - } + switch (Z_TYPE_PP(container)) { + case IS_ARRAY: { + HashTable *ht = Z_ARRVAL_PP(container); + + switch (offset->type) { + case IS_DOUBLE: + case IS_RESOURCE: + case IS_BOOL: + case IS_LONG: + if (offset->type == IS_DOUBLE) { + index = (long) offset->value.dval; + } else { + index = offset->value.lval; + } - zend_hash_index_del(ht, index); - break; - case IS_STRING: - if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && - ht == &EG(symbol_table)) { - zend_execute_data *ex; - ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); - - for (ex = execute_data; ex; ex = ex->prev_execute_data) { - if (ex->symbol_table == ht) { - int i; - - for (i = 0; i < ex->op_array->last_var; i++) { - if (ex->op_array->vars[i].hash_value == hash_value && - ex->op_array->vars[i].name_len == offset->value.str.len && - !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { - ex->CVs[i] = NULL; - break; - } + zend_hash_index_del(ht, index); + break; + case IS_STRING: + if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && + ht == &EG(symbol_table)) { + zend_execute_data *ex; + ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); + + for (ex = execute_data; ex; ex = ex->prev_execute_data) { + if (ex->symbol_table == ht) { + int i; + + for (i = 0; i < ex->op_array->last_var; i++) { + if (ex->op_array->vars[i].hash_value == hash_value && + ex->op_array->vars[i].name_len == offset->value.str.len && + !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { + ex->CVs[i] = NULL; + break; } } } } - break; - case IS_NULL: - zend_hash_del(ht, "", sizeof("")); - break; - default: - zend_error(E_WARNING, "Illegal offset type in unset"); - break; - } - - break; + } + break; + case IS_NULL: + zend_hash_del(ht, "", sizeof("")); + break; + default: + zend_error(E_WARNING, "Illegal offset type in unset"); + break; } - case IS_OBJECT: - if (!Z_OBJ_HT_P(*container)->unset_dimension) { - zend_error_noreturn(E_ERROR, "Cannot use object as array"); - } - if (0) { - MAKE_REAL_ZVAL_PTR(offset); - } - Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); - if (0) { - zval_ptr_dtor(&offset); - } else { - } - break; - case IS_STRING: - zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); - ZEND_VM_CONTINUE(); /* bailed out before */ - default: - - break; + break; } - } else { /* ZEND_UNSET_OBJ */ - if (Z_TYPE_PP(container) == IS_OBJECT) { + case IS_OBJECT: + if (!Z_OBJ_HT_P(*container)->unset_dimension) { + zend_error_noreturn(E_ERROR, "Cannot use object as array"); + } if (0) { MAKE_REAL_ZVAL_PTR(offset); } - Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); if (0) { zval_ptr_dtor(&offset); } else { } + break; + case IS_STRING: + zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); + ZEND_VM_CONTINUE(); /* bailed out before */ + default: + + break; + } + } else { + + } + if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; + + ZEND_VM_NEXT_OPCODE(); +} + +static int ZEND_UNSET_OBJ_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +{ + zend_op *opline = EX(opline); + zend_free_op free_op1; + zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); + zval *offset = &opline->op2.u.constant; + long index; + + if (container) { + if (IS_VAR == IS_CV && container != &EG(uninitialized_zval_ptr)) { + SEPARATE_ZVAL_IF_NOT_REF(container); + } + if (Z_TYPE_PP(container) == IS_OBJECT) { + if (0) { + MAKE_REAL_ZVAL_PTR(offset); + } + Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + if (0) { + zval_ptr_dtor(&offset); + } else { + } + } else { + } } else { - /* overloaded element */ } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; @@ -10284,7 +10301,7 @@ return ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } -static int ZEND_UNSET_DIM_OBJ_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +static int ZEND_UNSET_DIM_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; @@ -10293,96 +10310,113 @@ long index; if (container) { - if (IS_VAR == IS_CV && container != &EG(uninitialized_zval_ptr)) { SEPARATE_ZVAL_IF_NOT_REF(container); } - if (opline->extended_value == ZEND_UNSET_DIM) { - switch (Z_TYPE_PP(container)) { - case IS_ARRAY: { - HashTable *ht = Z_ARRVAL_PP(container); - - switch (offset->type) { - case IS_DOUBLE: - case IS_RESOURCE: - case IS_BOOL: - case IS_LONG: - if (offset->type == IS_DOUBLE) { - index = (long) offset->value.dval; - } else { - index = offset->value.lval; - } + switch (Z_TYPE_PP(container)) { + case IS_ARRAY: { + HashTable *ht = Z_ARRVAL_PP(container); + + switch (offset->type) { + case IS_DOUBLE: + case IS_RESOURCE: + case IS_BOOL: + case IS_LONG: + if (offset->type == IS_DOUBLE) { + index = (long) offset->value.dval; + } else { + index = offset->value.lval; + } - zend_hash_index_del(ht, index); - break; - case IS_STRING: - if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && - ht == &EG(symbol_table)) { - zend_execute_data *ex; - ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); - - for (ex = execute_data; ex; ex = ex->prev_execute_data) { - if (ex->symbol_table == ht) { - int i; - - for (i = 0; i < ex->op_array->last_var; i++) { - if (ex->op_array->vars[i].hash_value == hash_value && - ex->op_array->vars[i].name_len == offset->value.str.len && - !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { - ex->CVs[i] = NULL; - break; - } + zend_hash_index_del(ht, index); + break; + case IS_STRING: + if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && + ht == &EG(symbol_table)) { + zend_execute_data *ex; + ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); + + for (ex = execute_data; ex; ex = ex->prev_execute_data) { + if (ex->symbol_table == ht) { + int i; + + for (i = 0; i < ex->op_array->last_var; i++) { + if (ex->op_array->vars[i].hash_value == hash_value && + ex->op_array->vars[i].name_len == offset->value.str.len && + !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { + ex->CVs[i] = NULL; + break; } } } } - break; - case IS_NULL: - zend_hash_del(ht, "", sizeof("")); - break; - default: - zend_error(E_WARNING, "Illegal offset type in unset"); - break; - } - zval_dtor(free_op2.var); - break; + } + break; + case IS_NULL: + zend_hash_del(ht, "", sizeof("")); + break; + default: + zend_error(E_WARNING, "Illegal offset type in unset"); + break; } - case IS_OBJECT: - if (!Z_OBJ_HT_P(*container)->unset_dimension) { - zend_error_noreturn(E_ERROR, "Cannot use object as array"); - } - if (1) { - MAKE_REAL_ZVAL_PTR(offset); - } - Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); - if (1) { - zval_ptr_dtor(&offset); - } else { - zval_dtor(free_op2.var); - } - break; - case IS_STRING: - zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); - ZEND_VM_CONTINUE(); /* bailed out before */ - default: - zval_dtor(free_op2.var); - break; + zval_dtor(free_op2.var); + break; } - } else { /* ZEND_UNSET_OBJ */ - if (Z_TYPE_PP(container) == IS_OBJECT) { + case IS_OBJECT: + if (!Z_OBJ_HT_P(*container)->unset_dimension) { + zend_error_noreturn(E_ERROR, "Cannot use object as array"); + } if (1) { MAKE_REAL_ZVAL_PTR(offset); } - Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); if (1) { zval_ptr_dtor(&offset); } else { zval_dtor(free_op2.var); } + break; + case IS_STRING: + zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); + ZEND_VM_CONTINUE(); /* bailed out before */ + default: + zval_dtor(free_op2.var); + break; + } + } else { + zval_dtor(free_op2.var); + } + if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; + + ZEND_VM_NEXT_OPCODE(); +} + +static int ZEND_UNSET_OBJ_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +{ + zend_op *opline = EX(opline); + zend_free_op free_op1, free_op2; + zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); + zval *offset = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC); + long index; + + if (container) { + if (IS_VAR == IS_CV && container != &EG(uninitialized_zval_ptr)) { + SEPARATE_ZVAL_IF_NOT_REF(container); + } + if (Z_TYPE_PP(container) == IS_OBJECT) { + if (1) { + MAKE_REAL_ZVAL_PTR(offset); } + Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + if (1) { + zval_ptr_dtor(&offset); + } else { + zval_dtor(free_op2.var); + } + } else { + zval_dtor(free_op2.var); } } else { - /* overloaded element */ zval_dtor(free_op2.var); } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; @@ -11720,7 +11754,7 @@ return ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } -static int ZEND_UNSET_DIM_OBJ_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +static int ZEND_UNSET_DIM_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; @@ -11729,96 +11763,113 @@ long index; if (container) { - if (IS_VAR == IS_CV && container != &EG(uninitialized_zval_ptr)) { SEPARATE_ZVAL_IF_NOT_REF(container); } - if (opline->extended_value == ZEND_UNSET_DIM) { - switch (Z_TYPE_PP(container)) { - case IS_ARRAY: { - HashTable *ht = Z_ARRVAL_PP(container); - - switch (offset->type) { - case IS_DOUBLE: - case IS_RESOURCE: - case IS_BOOL: - case IS_LONG: - if (offset->type == IS_DOUBLE) { - index = (long) offset->value.dval; - } else { - index = offset->value.lval; - } + switch (Z_TYPE_PP(container)) { + case IS_ARRAY: { + HashTable *ht = Z_ARRVAL_PP(container); + + switch (offset->type) { + case IS_DOUBLE: + case IS_RESOURCE: + case IS_BOOL: + case IS_LONG: + if (offset->type == IS_DOUBLE) { + index = (long) offset->value.dval; + } else { + index = offset->value.lval; + } - zend_hash_index_del(ht, index); - break; - case IS_STRING: - if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && - ht == &EG(symbol_table)) { - zend_execute_data *ex; - ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); - - for (ex = execute_data; ex; ex = ex->prev_execute_data) { - if (ex->symbol_table == ht) { - int i; - - for (i = 0; i < ex->op_array->last_var; i++) { - if (ex->op_array->vars[i].hash_value == hash_value && - ex->op_array->vars[i].name_len == offset->value.str.len && - !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { - ex->CVs[i] = NULL; - break; - } + zend_hash_index_del(ht, index); + break; + case IS_STRING: + if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && + ht == &EG(symbol_table)) { + zend_execute_data *ex; + ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); + + for (ex = execute_data; ex; ex = ex->prev_execute_data) { + if (ex->symbol_table == ht) { + int i; + + for (i = 0; i < ex->op_array->last_var; i++) { + if (ex->op_array->vars[i].hash_value == hash_value && + ex->op_array->vars[i].name_len == offset->value.str.len && + !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { + ex->CVs[i] = NULL; + break; } } } } - break; - case IS_NULL: - zend_hash_del(ht, "", sizeof("")); - break; - default: - zend_error(E_WARNING, "Illegal offset type in unset"); - break; - } - if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; - break; + } + break; + case IS_NULL: + zend_hash_del(ht, "", sizeof("")); + break; + default: + zend_error(E_WARNING, "Illegal offset type in unset"); + break; } - case IS_OBJECT: - if (!Z_OBJ_HT_P(*container)->unset_dimension) { - zend_error_noreturn(E_ERROR, "Cannot use object as array"); - } - if (0) { - MAKE_REAL_ZVAL_PTR(offset); - } - Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); - if (0) { - zval_ptr_dtor(&offset); - } else { - if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; - } - break; - case IS_STRING: - zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); - ZEND_VM_CONTINUE(); /* bailed out before */ - default: - if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; - break; + if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; + break; } - } else { /* ZEND_UNSET_OBJ */ - if (Z_TYPE_PP(container) == IS_OBJECT) { + case IS_OBJECT: + if (!Z_OBJ_HT_P(*container)->unset_dimension) { + zend_error_noreturn(E_ERROR, "Cannot use object as array"); + } if (0) { MAKE_REAL_ZVAL_PTR(offset); } - Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); if (0) { zval_ptr_dtor(&offset); } else { if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; } + break; + case IS_STRING: + zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); + ZEND_VM_CONTINUE(); /* bailed out before */ + default: + if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; + break; + } + } else { + if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; + } + if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; + + ZEND_VM_NEXT_OPCODE(); +} + +static int ZEND_UNSET_OBJ_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +{ + zend_op *opline = EX(opline); + zend_free_op free_op1, free_op2; + zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); + zval *offset = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC); + long index; + + if (container) { + if (IS_VAR == IS_CV && container != &EG(uninitialized_zval_ptr)) { + SEPARATE_ZVAL_IF_NOT_REF(container); + } + if (Z_TYPE_PP(container) == IS_OBJECT) { + if (0) { + MAKE_REAL_ZVAL_PTR(offset); } + Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + if (0) { + zval_ptr_dtor(&offset); + } else { + if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; + } + } else { + if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; } } else { - /* overloaded element */ if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; @@ -13528,7 +13579,7 @@ return ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } -static int ZEND_UNSET_DIM_OBJ_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +static int ZEND_UNSET_DIM_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; @@ -13537,96 +13588,113 @@ long index; if (container) { - if (IS_VAR == IS_CV && container != &EG(uninitialized_zval_ptr)) { SEPARATE_ZVAL_IF_NOT_REF(container); } - if (opline->extended_value == ZEND_UNSET_DIM) { - switch (Z_TYPE_PP(container)) { - case IS_ARRAY: { - HashTable *ht = Z_ARRVAL_PP(container); - - switch (offset->type) { - case IS_DOUBLE: - case IS_RESOURCE: - case IS_BOOL: - case IS_LONG: - if (offset->type == IS_DOUBLE) { - index = (long) offset->value.dval; - } else { - index = offset->value.lval; - } + switch (Z_TYPE_PP(container)) { + case IS_ARRAY: { + HashTable *ht = Z_ARRVAL_PP(container); + + switch (offset->type) { + case IS_DOUBLE: + case IS_RESOURCE: + case IS_BOOL: + case IS_LONG: + if (offset->type == IS_DOUBLE) { + index = (long) offset->value.dval; + } else { + index = offset->value.lval; + } - zend_hash_index_del(ht, index); - break; - case IS_STRING: - if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && - ht == &EG(symbol_table)) { - zend_execute_data *ex; - ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); - - for (ex = execute_data; ex; ex = ex->prev_execute_data) { - if (ex->symbol_table == ht) { - int i; - - for (i = 0; i < ex->op_array->last_var; i++) { - if (ex->op_array->vars[i].hash_value == hash_value && - ex->op_array->vars[i].name_len == offset->value.str.len && - !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { - ex->CVs[i] = NULL; - break; - } + zend_hash_index_del(ht, index); + break; + case IS_STRING: + if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && + ht == &EG(symbol_table)) { + zend_execute_data *ex; + ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); + + for (ex = execute_data; ex; ex = ex->prev_execute_data) { + if (ex->symbol_table == ht) { + int i; + + for (i = 0; i < ex->op_array->last_var; i++) { + if (ex->op_array->vars[i].hash_value == hash_value && + ex->op_array->vars[i].name_len == offset->value.str.len && + !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { + ex->CVs[i] = NULL; + break; } } } } - break; - case IS_NULL: - zend_hash_del(ht, "", sizeof("")); - break; - default: - zend_error(E_WARNING, "Illegal offset type in unset"); - break; - } - - break; + } + break; + case IS_NULL: + zend_hash_del(ht, "", sizeof("")); + break; + default: + zend_error(E_WARNING, "Illegal offset type in unset"); + break; } - case IS_OBJECT: - if (!Z_OBJ_HT_P(*container)->unset_dimension) { - zend_error_noreturn(E_ERROR, "Cannot use object as array"); - } - if (0) { - MAKE_REAL_ZVAL_PTR(offset); - } - Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); - if (0) { - zval_ptr_dtor(&offset); - } else { - - } - break; - case IS_STRING: - zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); - ZEND_VM_CONTINUE(); /* bailed out before */ - default: - break; + break; } - } else { /* ZEND_UNSET_OBJ */ - if (Z_TYPE_PP(container) == IS_OBJECT) { + case IS_OBJECT: + if (!Z_OBJ_HT_P(*container)->unset_dimension) { + zend_error_noreturn(E_ERROR, "Cannot use object as array"); + } if (0) { MAKE_REAL_ZVAL_PTR(offset); } - Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); if (0) { zval_ptr_dtor(&offset); } else { } + break; + case IS_STRING: + zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); + ZEND_VM_CONTINUE(); /* bailed out before */ + default: + + break; + } + } else { + + } + if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; + + ZEND_VM_NEXT_OPCODE(); +} + +static int ZEND_UNSET_OBJ_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +{ + zend_op *opline = EX(opline); + zend_free_op free_op1; + zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); + zval *offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); + long index; + + if (container) { + if (IS_VAR == IS_CV && container != &EG(uninitialized_zval_ptr)) { + SEPARATE_ZVAL_IF_NOT_REF(container); + } + if (Z_TYPE_PP(container) == IS_OBJECT) { + if (0) { + MAKE_REAL_ZVAL_PTR(offset); + } + Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + if (0) { + zval_ptr_dtor(&offset); + } else { + } + } else { + } } else { - /* overloaded element */ } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; @@ -14669,7 +14737,7 @@ return ZEND_ADD_ARRAY_ELEMENT_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } -static int ZEND_UNSET_DIM_OBJ_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +static int ZEND_UNSET_DIM_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); @@ -14678,96 +14746,112 @@ long index; if (container) { - if (IS_UNUSED == IS_CV && container != &EG(uninitialized_zval_ptr)) { SEPARATE_ZVAL_IF_NOT_REF(container); } - if (opline->extended_value == ZEND_UNSET_DIM) { - switch (Z_TYPE_PP(container)) { - case IS_ARRAY: { - HashTable *ht = Z_ARRVAL_PP(container); - - switch (offset->type) { - case IS_DOUBLE: - case IS_RESOURCE: - case IS_BOOL: - case IS_LONG: - if (offset->type == IS_DOUBLE) { - index = (long) offset->value.dval; - } else { - index = offset->value.lval; - } + switch (Z_TYPE_PP(container)) { + case IS_ARRAY: { + HashTable *ht = Z_ARRVAL_PP(container); + + switch (offset->type) { + case IS_DOUBLE: + case IS_RESOURCE: + case IS_BOOL: + case IS_LONG: + if (offset->type == IS_DOUBLE) { + index = (long) offset->value.dval; + } else { + index = offset->value.lval; + } - zend_hash_index_del(ht, index); - break; - case IS_STRING: - if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && - ht == &EG(symbol_table)) { - zend_execute_data *ex; - ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); - - for (ex = execute_data; ex; ex = ex->prev_execute_data) { - if (ex->symbol_table == ht) { - int i; - - for (i = 0; i < ex->op_array->last_var; i++) { - if (ex->op_array->vars[i].hash_value == hash_value && - ex->op_array->vars[i].name_len == offset->value.str.len && - !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { - ex->CVs[i] = NULL; - break; - } + zend_hash_index_del(ht, index); + break; + case IS_STRING: + if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && + ht == &EG(symbol_table)) { + zend_execute_data *ex; + ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); + + for (ex = execute_data; ex; ex = ex->prev_execute_data) { + if (ex->symbol_table == ht) { + int i; + + for (i = 0; i < ex->op_array->last_var; i++) { + if (ex->op_array->vars[i].hash_value == hash_value && + ex->op_array->vars[i].name_len == offset->value.str.len && + !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { + ex->CVs[i] = NULL; + break; } } } } - break; - case IS_NULL: - zend_hash_del(ht, "", sizeof("")); - break; - default: - zend_error(E_WARNING, "Illegal offset type in unset"); - break; - } - - break; + } + break; + case IS_NULL: + zend_hash_del(ht, "", sizeof("")); + break; + default: + zend_error(E_WARNING, "Illegal offset type in unset"); + break; } - case IS_OBJECT: - if (!Z_OBJ_HT_P(*container)->unset_dimension) { - zend_error_noreturn(E_ERROR, "Cannot use object as array"); - } - if (0) { - MAKE_REAL_ZVAL_PTR(offset); - } - Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); - if (0) { - zval_ptr_dtor(&offset); - } else { - } - break; - case IS_STRING: - zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); - ZEND_VM_CONTINUE(); /* bailed out before */ - default: - - break; + break; } - } else { /* ZEND_UNSET_OBJ */ - if (Z_TYPE_PP(container) == IS_OBJECT) { + case IS_OBJECT: + if (!Z_OBJ_HT_P(*container)->unset_dimension) { + zend_error_noreturn(E_ERROR, "Cannot use object as array"); + } if (0) { MAKE_REAL_ZVAL_PTR(offset); } - Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); if (0) { zval_ptr_dtor(&offset); } else { } + break; + case IS_STRING: + zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); + ZEND_VM_CONTINUE(); /* bailed out before */ + default: + + break; + } + } else { + + } + + ZEND_VM_NEXT_OPCODE(); +} + +static int ZEND_UNSET_OBJ_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +{ + zend_op *opline = EX(opline); + + zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C); + zval *offset = &opline->op2.u.constant; + long index; + + if (container) { + if (IS_UNUSED == IS_CV && container != &EG(uninitialized_zval_ptr)) { + SEPARATE_ZVAL_IF_NOT_REF(container); + } + if (Z_TYPE_PP(container) == IS_OBJECT) { + if (0) { + MAKE_REAL_ZVAL_PTR(offset); + } + Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + if (0) { + zval_ptr_dtor(&offset); + } else { + } + } else { + } } else { - /* overloaded element */ } @@ -15693,7 +15777,7 @@ return ZEND_ADD_ARRAY_ELEMENT_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } -static int ZEND_UNSET_DIM_OBJ_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +static int ZEND_UNSET_DIM_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; @@ -15702,96 +15786,112 @@ long index; if (container) { - if (IS_UNUSED == IS_CV && container != &EG(uninitialized_zval_ptr)) { SEPARATE_ZVAL_IF_NOT_REF(container); } - if (opline->extended_value == ZEND_UNSET_DIM) { - switch (Z_TYPE_PP(container)) { - case IS_ARRAY: { - HashTable *ht = Z_ARRVAL_PP(container); - - switch (offset->type) { - case IS_DOUBLE: - case IS_RESOURCE: - case IS_BOOL: - case IS_LONG: - if (offset->type == IS_DOUBLE) { - index = (long) offset->value.dval; - } else { - index = offset->value.lval; - } + switch (Z_TYPE_PP(container)) { + case IS_ARRAY: { + HashTable *ht = Z_ARRVAL_PP(container); + + switch (offset->type) { + case IS_DOUBLE: + case IS_RESOURCE: + case IS_BOOL: + case IS_LONG: + if (offset->type == IS_DOUBLE) { + index = (long) offset->value.dval; + } else { + index = offset->value.lval; + } - zend_hash_index_del(ht, index); - break; - case IS_STRING: - if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && - ht == &EG(symbol_table)) { - zend_execute_data *ex; - ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); - - for (ex = execute_data; ex; ex = ex->prev_execute_data) { - if (ex->symbol_table == ht) { - int i; - - for (i = 0; i < ex->op_array->last_var; i++) { - if (ex->op_array->vars[i].hash_value == hash_value && - ex->op_array->vars[i].name_len == offset->value.str.len && - !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { - ex->CVs[i] = NULL; - break; - } + zend_hash_index_del(ht, index); + break; + case IS_STRING: + if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && + ht == &EG(symbol_table)) { + zend_execute_data *ex; + ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); + + for (ex = execute_data; ex; ex = ex->prev_execute_data) { + if (ex->symbol_table == ht) { + int i; + + for (i = 0; i < ex->op_array->last_var; i++) { + if (ex->op_array->vars[i].hash_value == hash_value && + ex->op_array->vars[i].name_len == offset->value.str.len && + !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { + ex->CVs[i] = NULL; + break; } } } } - break; - case IS_NULL: - zend_hash_del(ht, "", sizeof("")); - break; - default: - zend_error(E_WARNING, "Illegal offset type in unset"); - break; - } - zval_dtor(free_op2.var); - break; + } + break; + case IS_NULL: + zend_hash_del(ht, "", sizeof("")); + break; + default: + zend_error(E_WARNING, "Illegal offset type in unset"); + break; } - case IS_OBJECT: - if (!Z_OBJ_HT_P(*container)->unset_dimension) { - zend_error_noreturn(E_ERROR, "Cannot use object as array"); - } - if (1) { - MAKE_REAL_ZVAL_PTR(offset); - } - Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); - if (1) { - zval_ptr_dtor(&offset); - } else { - zval_dtor(free_op2.var); - } - break; - case IS_STRING: - zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); - ZEND_VM_CONTINUE(); /* bailed out before */ - default: - zval_dtor(free_op2.var); - break; + zval_dtor(free_op2.var); + break; } - } else { /* ZEND_UNSET_OBJ */ - if (Z_TYPE_PP(container) == IS_OBJECT) { + case IS_OBJECT: + if (!Z_OBJ_HT_P(*container)->unset_dimension) { + zend_error_noreturn(E_ERROR, "Cannot use object as array"); + } if (1) { MAKE_REAL_ZVAL_PTR(offset); } - Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); if (1) { zval_ptr_dtor(&offset); } else { zval_dtor(free_op2.var); } + break; + case IS_STRING: + zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); + ZEND_VM_CONTINUE(); /* bailed out before */ + default: + zval_dtor(free_op2.var); + break; + } + } else { + zval_dtor(free_op2.var); + } + + ZEND_VM_NEXT_OPCODE(); +} + +static int ZEND_UNSET_OBJ_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +{ + zend_op *opline = EX(opline); + zend_free_op free_op2; + zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C); + zval *offset = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC); + long index; + + if (container) { + if (IS_UNUSED == IS_CV && container != &EG(uninitialized_zval_ptr)) { + SEPARATE_ZVAL_IF_NOT_REF(container); + } + if (Z_TYPE_PP(container) == IS_OBJECT) { + if (1) { + MAKE_REAL_ZVAL_PTR(offset); } + Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + if (1) { + zval_ptr_dtor(&offset); + } else { + zval_dtor(free_op2.var); + } + } else { + zval_dtor(free_op2.var); } } else { - /* overloaded element */ zval_dtor(free_op2.var); } @@ -16717,7 +16817,7 @@ return ZEND_ADD_ARRAY_ELEMENT_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } -static int ZEND_UNSET_DIM_OBJ_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +static int ZEND_UNSET_DIM_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; @@ -16726,96 +16826,112 @@ long index; if (container) { - if (IS_UNUSED == IS_CV && container != &EG(uninitialized_zval_ptr)) { SEPARATE_ZVAL_IF_NOT_REF(container); } - if (opline->extended_value == ZEND_UNSET_DIM) { - switch (Z_TYPE_PP(container)) { - case IS_ARRAY: { - HashTable *ht = Z_ARRVAL_PP(container); - - switch (offset->type) { - case IS_DOUBLE: - case IS_RESOURCE: - case IS_BOOL: - case IS_LONG: - if (offset->type == IS_DOUBLE) { - index = (long) offset->value.dval; - } else { - index = offset->value.lval; - } + switch (Z_TYPE_PP(container)) { + case IS_ARRAY: { + HashTable *ht = Z_ARRVAL_PP(container); + + switch (offset->type) { + case IS_DOUBLE: + case IS_RESOURCE: + case IS_BOOL: + case IS_LONG: + if (offset->type == IS_DOUBLE) { + index = (long) offset->value.dval; + } else { + index = offset->value.lval; + } - zend_hash_index_del(ht, index); - break; - case IS_STRING: - if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && - ht == &EG(symbol_table)) { - zend_execute_data *ex; - ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); - - for (ex = execute_data; ex; ex = ex->prev_execute_data) { - if (ex->symbol_table == ht) { - int i; - - for (i = 0; i < ex->op_array->last_var; i++) { - if (ex->op_array->vars[i].hash_value == hash_value && - ex->op_array->vars[i].name_len == offset->value.str.len && - !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { - ex->CVs[i] = NULL; - break; - } + zend_hash_index_del(ht, index); + break; + case IS_STRING: + if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && + ht == &EG(symbol_table)) { + zend_execute_data *ex; + ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); + + for (ex = execute_data; ex; ex = ex->prev_execute_data) { + if (ex->symbol_table == ht) { + int i; + + for (i = 0; i < ex->op_array->last_var; i++) { + if (ex->op_array->vars[i].hash_value == hash_value && + ex->op_array->vars[i].name_len == offset->value.str.len && + !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { + ex->CVs[i] = NULL; + break; } } } } - break; - case IS_NULL: - zend_hash_del(ht, "", sizeof("")); - break; - default: - zend_error(E_WARNING, "Illegal offset type in unset"); - break; - } - if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; - break; + } + break; + case IS_NULL: + zend_hash_del(ht, "", sizeof("")); + break; + default: + zend_error(E_WARNING, "Illegal offset type in unset"); + break; } - case IS_OBJECT: - if (!Z_OBJ_HT_P(*container)->unset_dimension) { - zend_error_noreturn(E_ERROR, "Cannot use object as array"); - } - if (0) { - MAKE_REAL_ZVAL_PTR(offset); - } - Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); - if (0) { - zval_ptr_dtor(&offset); - } else { - if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; - } - break; - case IS_STRING: - zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); - ZEND_VM_CONTINUE(); /* bailed out before */ - default: - if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; - break; + if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; + break; } - } else { /* ZEND_UNSET_OBJ */ - if (Z_TYPE_PP(container) == IS_OBJECT) { + case IS_OBJECT: + if (!Z_OBJ_HT_P(*container)->unset_dimension) { + zend_error_noreturn(E_ERROR, "Cannot use object as array"); + } if (0) { MAKE_REAL_ZVAL_PTR(offset); } - Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); if (0) { zval_ptr_dtor(&offset); } else { if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; } + break; + case IS_STRING: + zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); + ZEND_VM_CONTINUE(); /* bailed out before */ + default: + if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; + break; + } + } else { + if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; + } + + ZEND_VM_NEXT_OPCODE(); +} + +static int ZEND_UNSET_OBJ_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +{ + zend_op *opline = EX(opline); + zend_free_op free_op2; + zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C); + zval *offset = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC); + long index; + + if (container) { + if (IS_UNUSED == IS_CV && container != &EG(uninitialized_zval_ptr)) { + SEPARATE_ZVAL_IF_NOT_REF(container); + } + if (Z_TYPE_PP(container) == IS_OBJECT) { + if (0) { + MAKE_REAL_ZVAL_PTR(offset); + } + Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + if (0) { + zval_ptr_dtor(&offset); + } else { + if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; } + } else { + if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; } } else { - /* overloaded element */ if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; } @@ -18103,7 +18219,7 @@ return ZEND_ADD_ARRAY_ELEMENT_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } -static int ZEND_UNSET_DIM_OBJ_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +static int ZEND_UNSET_DIM_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); @@ -18112,96 +18228,112 @@ long index; if (container) { - if (IS_UNUSED == IS_CV && container != &EG(uninitialized_zval_ptr)) { SEPARATE_ZVAL_IF_NOT_REF(container); } - if (opline->extended_value == ZEND_UNSET_DIM) { - switch (Z_TYPE_PP(container)) { - case IS_ARRAY: { - HashTable *ht = Z_ARRVAL_PP(container); - - switch (offset->type) { - case IS_DOUBLE: - case IS_RESOURCE: - case IS_BOOL: - case IS_LONG: - if (offset->type == IS_DOUBLE) { - index = (long) offset->value.dval; - } else { - index = offset->value.lval; - } + switch (Z_TYPE_PP(container)) { + case IS_ARRAY: { + HashTable *ht = Z_ARRVAL_PP(container); + + switch (offset->type) { + case IS_DOUBLE: + case IS_RESOURCE: + case IS_BOOL: + case IS_LONG: + if (offset->type == IS_DOUBLE) { + index = (long) offset->value.dval; + } else { + index = offset->value.lval; + } - zend_hash_index_del(ht, index); - break; - case IS_STRING: - if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && - ht == &EG(symbol_table)) { - zend_execute_data *ex; - ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); - - for (ex = execute_data; ex; ex = ex->prev_execute_data) { - if (ex->symbol_table == ht) { - int i; - - for (i = 0; i < ex->op_array->last_var; i++) { - if (ex->op_array->vars[i].hash_value == hash_value && - ex->op_array->vars[i].name_len == offset->value.str.len && - !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { - ex->CVs[i] = NULL; - break; - } + zend_hash_index_del(ht, index); + break; + case IS_STRING: + if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && + ht == &EG(symbol_table)) { + zend_execute_data *ex; + ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); + + for (ex = execute_data; ex; ex = ex->prev_execute_data) { + if (ex->symbol_table == ht) { + int i; + + for (i = 0; i < ex->op_array->last_var; i++) { + if (ex->op_array->vars[i].hash_value == hash_value && + ex->op_array->vars[i].name_len == offset->value.str.len && + !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { + ex->CVs[i] = NULL; + break; } } } } - break; - case IS_NULL: - zend_hash_del(ht, "", sizeof("")); - break; - default: - zend_error(E_WARNING, "Illegal offset type in unset"); - break; - } + } + break; + case IS_NULL: + zend_hash_del(ht, "", sizeof("")); + break; + default: + zend_error(E_WARNING, "Illegal offset type in unset"); + break; + } - break; + break; + } + case IS_OBJECT: + if (!Z_OBJ_HT_P(*container)->unset_dimension) { + zend_error_noreturn(E_ERROR, "Cannot use object as array"); } - case IS_OBJECT: - if (!Z_OBJ_HT_P(*container)->unset_dimension) { - zend_error_noreturn(E_ERROR, "Cannot use object as array"); - } - if (0) { - MAKE_REAL_ZVAL_PTR(offset); - } - Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); - if (0) { - zval_ptr_dtor(&offset); - } else { + if (0) { + MAKE_REAL_ZVAL_PTR(offset); + } + Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); + if (0) { + zval_ptr_dtor(&offset); + } else { - } - break; - case IS_STRING: - zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); - ZEND_VM_CONTINUE(); /* bailed out before */ - default: + } + break; + case IS_STRING: + zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); + ZEND_VM_CONTINUE(); /* bailed out before */ + default: + + break; + } + } else { + + } + + ZEND_VM_NEXT_OPCODE(); +} - break; +static int ZEND_UNSET_OBJ_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +{ + zend_op *opline = EX(opline); + + zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C); + zval *offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); + long index; + + if (container) { + if (IS_UNUSED == IS_CV && container != &EG(uninitialized_zval_ptr)) { + SEPARATE_ZVAL_IF_NOT_REF(container); + } + if (Z_TYPE_PP(container) == IS_OBJECT) { + if (0) { + MAKE_REAL_ZVAL_PTR(offset); } - } else { /* ZEND_UNSET_OBJ */ - if (Z_TYPE_PP(container) == IS_OBJECT) { - if (0) { - MAKE_REAL_ZVAL_PTR(offset); - } - Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); - if (0) { - zval_ptr_dtor(&offset); - } else { + Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + if (0) { + zval_ptr_dtor(&offset); + } else { - } } + } else { + } } else { - /* overloaded element */ } @@ -20622,7 +20754,7 @@ return ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } -static int ZEND_UNSET_DIM_OBJ_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +static int ZEND_UNSET_DIM_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); @@ -20631,96 +20763,112 @@ long index; if (container) { - if (IS_CV == IS_CV && container != &EG(uninitialized_zval_ptr)) { SEPARATE_ZVAL_IF_NOT_REF(container); } - if (opline->extended_value == ZEND_UNSET_DIM) { - switch (Z_TYPE_PP(container)) { - case IS_ARRAY: { - HashTable *ht = Z_ARRVAL_PP(container); - - switch (offset->type) { - case IS_DOUBLE: - case IS_RESOURCE: - case IS_BOOL: - case IS_LONG: - if (offset->type == IS_DOUBLE) { - index = (long) offset->value.dval; - } else { - index = offset->value.lval; - } + switch (Z_TYPE_PP(container)) { + case IS_ARRAY: { + HashTable *ht = Z_ARRVAL_PP(container); + + switch (offset->type) { + case IS_DOUBLE: + case IS_RESOURCE: + case IS_BOOL: + case IS_LONG: + if (offset->type == IS_DOUBLE) { + index = (long) offset->value.dval; + } else { + index = offset->value.lval; + } - zend_hash_index_del(ht, index); - break; - case IS_STRING: - if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && - ht == &EG(symbol_table)) { - zend_execute_data *ex; - ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); - - for (ex = execute_data; ex; ex = ex->prev_execute_data) { - if (ex->symbol_table == ht) { - int i; - - for (i = 0; i < ex->op_array->last_var; i++) { - if (ex->op_array->vars[i].hash_value == hash_value && - ex->op_array->vars[i].name_len == offset->value.str.len && - !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { - ex->CVs[i] = NULL; - break; - } + zend_hash_index_del(ht, index); + break; + case IS_STRING: + if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && + ht == &EG(symbol_table)) { + zend_execute_data *ex; + ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); + + for (ex = execute_data; ex; ex = ex->prev_execute_data) { + if (ex->symbol_table == ht) { + int i; + + for (i = 0; i < ex->op_array->last_var; i++) { + if (ex->op_array->vars[i].hash_value == hash_value && + ex->op_array->vars[i].name_len == offset->value.str.len && + !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { + ex->CVs[i] = NULL; + break; } } } } - break; - case IS_NULL: - zend_hash_del(ht, "", sizeof("")); - break; - default: - zend_error(E_WARNING, "Illegal offset type in unset"); - break; - } - - break; + } + break; + case IS_NULL: + zend_hash_del(ht, "", sizeof("")); + break; + default: + zend_error(E_WARNING, "Illegal offset type in unset"); + break; } - case IS_OBJECT: - if (!Z_OBJ_HT_P(*container)->unset_dimension) { - zend_error_noreturn(E_ERROR, "Cannot use object as array"); - } - if (0) { - MAKE_REAL_ZVAL_PTR(offset); - } - Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); - if (0) { - zval_ptr_dtor(&offset); - } else { - - } - break; - case IS_STRING: - zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); - ZEND_VM_CONTINUE(); /* bailed out before */ - default: - break; + break; } - } else { /* ZEND_UNSET_OBJ */ - if (Z_TYPE_PP(container) == IS_OBJECT) { + case IS_OBJECT: + if (!Z_OBJ_HT_P(*container)->unset_dimension) { + zend_error_noreturn(E_ERROR, "Cannot use object as array"); + } if (0) { MAKE_REAL_ZVAL_PTR(offset); } - Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); if (0) { zval_ptr_dtor(&offset); } else { } + break; + case IS_STRING: + zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); + ZEND_VM_CONTINUE(); /* bailed out before */ + default: + + break; + } + } else { + + } + + ZEND_VM_NEXT_OPCODE(); +} + +static int ZEND_UNSET_OBJ_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +{ + zend_op *opline = EX(opline); + + zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_UNSET TSRMLS_CC); + zval *offset = &opline->op2.u.constant; + long index; + + if (container) { + if (IS_CV == IS_CV && container != &EG(uninitialized_zval_ptr)) { + SEPARATE_ZVAL_IF_NOT_REF(container); + } + if (Z_TYPE_PP(container) == IS_OBJECT) { + if (0) { + MAKE_REAL_ZVAL_PTR(offset); + } + Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + if (0) { + zval_ptr_dtor(&offset); + } else { + } + } else { + } } else { - /* overloaded element */ } @@ -22017,7 +22165,7 @@ return ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } -static int ZEND_UNSET_DIM_OBJ_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +static int ZEND_UNSET_DIM_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; @@ -22026,96 +22174,112 @@ long index; if (container) { - if (IS_CV == IS_CV && container != &EG(uninitialized_zval_ptr)) { SEPARATE_ZVAL_IF_NOT_REF(container); } - if (opline->extended_value == ZEND_UNSET_DIM) { - switch (Z_TYPE_PP(container)) { - case IS_ARRAY: { - HashTable *ht = Z_ARRVAL_PP(container); - - switch (offset->type) { - case IS_DOUBLE: - case IS_RESOURCE: - case IS_BOOL: - case IS_LONG: - if (offset->type == IS_DOUBLE) { - index = (long) offset->value.dval; - } else { - index = offset->value.lval; - } + switch (Z_TYPE_PP(container)) { + case IS_ARRAY: { + HashTable *ht = Z_ARRVAL_PP(container); + + switch (offset->type) { + case IS_DOUBLE: + case IS_RESOURCE: + case IS_BOOL: + case IS_LONG: + if (offset->type == IS_DOUBLE) { + index = (long) offset->value.dval; + } else { + index = offset->value.lval; + } - zend_hash_index_del(ht, index); - break; - case IS_STRING: - if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && - ht == &EG(symbol_table)) { - zend_execute_data *ex; - ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); - - for (ex = execute_data; ex; ex = ex->prev_execute_data) { - if (ex->symbol_table == ht) { - int i; - - for (i = 0; i < ex->op_array->last_var; i++) { - if (ex->op_array->vars[i].hash_value == hash_value && - ex->op_array->vars[i].name_len == offset->value.str.len && - !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { - ex->CVs[i] = NULL; - break; - } + zend_hash_index_del(ht, index); + break; + case IS_STRING: + if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && + ht == &EG(symbol_table)) { + zend_execute_data *ex; + ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); + + for (ex = execute_data; ex; ex = ex->prev_execute_data) { + if (ex->symbol_table == ht) { + int i; + + for (i = 0; i < ex->op_array->last_var; i++) { + if (ex->op_array->vars[i].hash_value == hash_value && + ex->op_array->vars[i].name_len == offset->value.str.len && + !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { + ex->CVs[i] = NULL; + break; } } } } - break; - case IS_NULL: - zend_hash_del(ht, "", sizeof("")); - break; - default: - zend_error(E_WARNING, "Illegal offset type in unset"); - break; - } - zval_dtor(free_op2.var); - break; + } + break; + case IS_NULL: + zend_hash_del(ht, "", sizeof("")); + break; + default: + zend_error(E_WARNING, "Illegal offset type in unset"); + break; } - case IS_OBJECT: - if (!Z_OBJ_HT_P(*container)->unset_dimension) { - zend_error_noreturn(E_ERROR, "Cannot use object as array"); - } - if (1) { - MAKE_REAL_ZVAL_PTR(offset); - } - Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); - if (1) { - zval_ptr_dtor(&offset); - } else { - zval_dtor(free_op2.var); - } - break; - case IS_STRING: - zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); - ZEND_VM_CONTINUE(); /* bailed out before */ - default: - zval_dtor(free_op2.var); - break; + zval_dtor(free_op2.var); + break; } - } else { /* ZEND_UNSET_OBJ */ - if (Z_TYPE_PP(container) == IS_OBJECT) { + case IS_OBJECT: + if (!Z_OBJ_HT_P(*container)->unset_dimension) { + zend_error_noreturn(E_ERROR, "Cannot use object as array"); + } if (1) { MAKE_REAL_ZVAL_PTR(offset); } - Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); if (1) { zval_ptr_dtor(&offset); } else { zval_dtor(free_op2.var); } + break; + case IS_STRING: + zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); + ZEND_VM_CONTINUE(); /* bailed out before */ + default: + zval_dtor(free_op2.var); + break; + } + } else { + zval_dtor(free_op2.var); + } + + ZEND_VM_NEXT_OPCODE(); +} + +static int ZEND_UNSET_OBJ_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +{ + zend_op *opline = EX(opline); + zend_free_op free_op2; + zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_UNSET TSRMLS_CC); + zval *offset = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC); + long index; + + if (container) { + if (IS_CV == IS_CV && container != &EG(uninitialized_zval_ptr)) { + SEPARATE_ZVAL_IF_NOT_REF(container); + } + if (Z_TYPE_PP(container) == IS_OBJECT) { + if (1) { + MAKE_REAL_ZVAL_PTR(offset); + } + Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + if (1) { + zval_ptr_dtor(&offset); + } else { + zval_dtor(free_op2.var); } + } else { + zval_dtor(free_op2.var); } } else { - /* overloaded element */ zval_dtor(free_op2.var); } @@ -23445,7 +23609,7 @@ return ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } -static int ZEND_UNSET_DIM_OBJ_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +static int ZEND_UNSET_DIM_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; @@ -23454,96 +23618,112 @@ long index; if (container) { - if (IS_CV == IS_CV && container != &EG(uninitialized_zval_ptr)) { SEPARATE_ZVAL_IF_NOT_REF(container); } - if (opline->extended_value == ZEND_UNSET_DIM) { - switch (Z_TYPE_PP(container)) { - case IS_ARRAY: { - HashTable *ht = Z_ARRVAL_PP(container); - - switch (offset->type) { - case IS_DOUBLE: - case IS_RESOURCE: - case IS_BOOL: - case IS_LONG: - if (offset->type == IS_DOUBLE) { - index = (long) offset->value.dval; - } else { - index = offset->value.lval; - } + switch (Z_TYPE_PP(container)) { + case IS_ARRAY: { + HashTable *ht = Z_ARRVAL_PP(container); + + switch (offset->type) { + case IS_DOUBLE: + case IS_RESOURCE: + case IS_BOOL: + case IS_LONG: + if (offset->type == IS_DOUBLE) { + index = (long) offset->value.dval; + } else { + index = offset->value.lval; + } - zend_hash_index_del(ht, index); - break; - case IS_STRING: - if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && - ht == &EG(symbol_table)) { - zend_execute_data *ex; - ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); - - for (ex = execute_data; ex; ex = ex->prev_execute_data) { - if (ex->symbol_table == ht) { - int i; - - for (i = 0; i < ex->op_array->last_var; i++) { - if (ex->op_array->vars[i].hash_value == hash_value && - ex->op_array->vars[i].name_len == offset->value.str.len && - !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { - ex->CVs[i] = NULL; - break; - } + zend_hash_index_del(ht, index); + break; + case IS_STRING: + if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && + ht == &EG(symbol_table)) { + zend_execute_data *ex; + ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); + + for (ex = execute_data; ex; ex = ex->prev_execute_data) { + if (ex->symbol_table == ht) { + int i; + + for (i = 0; i < ex->op_array->last_var; i++) { + if (ex->op_array->vars[i].hash_value == hash_value && + ex->op_array->vars[i].name_len == offset->value.str.len && + !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { + ex->CVs[i] = NULL; + break; } } } } - break; - case IS_NULL: - zend_hash_del(ht, "", sizeof("")); - break; - default: - zend_error(E_WARNING, "Illegal offset type in unset"); - break; - } - if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; - break; + } + break; + case IS_NULL: + zend_hash_del(ht, "", sizeof("")); + break; + default: + zend_error(E_WARNING, "Illegal offset type in unset"); + break; } - case IS_OBJECT: - if (!Z_OBJ_HT_P(*container)->unset_dimension) { - zend_error_noreturn(E_ERROR, "Cannot use object as array"); - } - if (0) { - MAKE_REAL_ZVAL_PTR(offset); - } - Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); - if (0) { - zval_ptr_dtor(&offset); - } else { - if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; - } - break; - case IS_STRING: - zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); - ZEND_VM_CONTINUE(); /* bailed out before */ - default: - if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; - break; + if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; + break; } - } else { /* ZEND_UNSET_OBJ */ - if (Z_TYPE_PP(container) == IS_OBJECT) { + case IS_OBJECT: + if (!Z_OBJ_HT_P(*container)->unset_dimension) { + zend_error_noreturn(E_ERROR, "Cannot use object as array"); + } if (0) { MAKE_REAL_ZVAL_PTR(offset); } - Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); if (0) { zval_ptr_dtor(&offset); } else { if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; } + break; + case IS_STRING: + zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); + ZEND_VM_CONTINUE(); /* bailed out before */ + default: + if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; + break; + } + } else { + if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; + } + + ZEND_VM_NEXT_OPCODE(); +} + +static int ZEND_UNSET_OBJ_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +{ + zend_op *opline = EX(opline); + zend_free_op free_op2; + zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_UNSET TSRMLS_CC); + zval *offset = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC); + long index; + + if (container) { + if (IS_CV == IS_CV && container != &EG(uninitialized_zval_ptr)) { + SEPARATE_ZVAL_IF_NOT_REF(container); + } + if (Z_TYPE_PP(container) == IS_OBJECT) { + if (0) { + MAKE_REAL_ZVAL_PTR(offset); } + Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + if (0) { + zval_ptr_dtor(&offset); + } else { + if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; + } + } else { + if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; } } else { - /* overloaded element */ if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; } @@ -25244,7 +25424,7 @@ return ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } -static int ZEND_UNSET_DIM_OBJ_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +static int ZEND_UNSET_DIM_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); @@ -25253,96 +25433,112 @@ long index; if (container) { - if (IS_CV == IS_CV && container != &EG(uninitialized_zval_ptr)) { SEPARATE_ZVAL_IF_NOT_REF(container); } - if (opline->extended_value == ZEND_UNSET_DIM) { - switch (Z_TYPE_PP(container)) { - case IS_ARRAY: { - HashTable *ht = Z_ARRVAL_PP(container); - - switch (offset->type) { - case IS_DOUBLE: - case IS_RESOURCE: - case IS_BOOL: - case IS_LONG: - if (offset->type == IS_DOUBLE) { - index = (long) offset->value.dval; - } else { - index = offset->value.lval; - } + switch (Z_TYPE_PP(container)) { + case IS_ARRAY: { + HashTable *ht = Z_ARRVAL_PP(container); + + switch (offset->type) { + case IS_DOUBLE: + case IS_RESOURCE: + case IS_BOOL: + case IS_LONG: + if (offset->type == IS_DOUBLE) { + index = (long) offset->value.dval; + } else { + index = offset->value.lval; + } - zend_hash_index_del(ht, index); - break; - case IS_STRING: - if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && - ht == &EG(symbol_table)) { - zend_execute_data *ex; - ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); - - for (ex = execute_data; ex; ex = ex->prev_execute_data) { - if (ex->symbol_table == ht) { - int i; - - for (i = 0; i < ex->op_array->last_var; i++) { - if (ex->op_array->vars[i].hash_value == hash_value && - ex->op_array->vars[i].name_len == offset->value.str.len && - !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { - ex->CVs[i] = NULL; - break; - } + zend_hash_index_del(ht, index); + break; + case IS_STRING: + if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && + ht == &EG(symbol_table)) { + zend_execute_data *ex; + ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); + + for (ex = execute_data; ex; ex = ex->prev_execute_data) { + if (ex->symbol_table == ht) { + int i; + + for (i = 0; i < ex->op_array->last_var; i++) { + if (ex->op_array->vars[i].hash_value == hash_value && + ex->op_array->vars[i].name_len == offset->value.str.len && + !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { + ex->CVs[i] = NULL; + break; } } } } - break; - case IS_NULL: - zend_hash_del(ht, "", sizeof("")); - break; - default: - zend_error(E_WARNING, "Illegal offset type in unset"); - break; - } - - break; + } + break; + case IS_NULL: + zend_hash_del(ht, "", sizeof("")); + break; + default: + zend_error(E_WARNING, "Illegal offset type in unset"); + break; } - case IS_OBJECT: - if (!Z_OBJ_HT_P(*container)->unset_dimension) { - zend_error_noreturn(E_ERROR, "Cannot use object as array"); - } - if (0) { - MAKE_REAL_ZVAL_PTR(offset); - } - Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); - if (0) { - zval_ptr_dtor(&offset); - } else { - - } - break; - case IS_STRING: - zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); - ZEND_VM_CONTINUE(); /* bailed out before */ - default: - break; + break; } - } else { /* ZEND_UNSET_OBJ */ - if (Z_TYPE_PP(container) == IS_OBJECT) { + case IS_OBJECT: + if (!Z_OBJ_HT_P(*container)->unset_dimension) { + zend_error_noreturn(E_ERROR, "Cannot use object as array"); + } if (0) { MAKE_REAL_ZVAL_PTR(offset); } - Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); if (0) { zval_ptr_dtor(&offset); } else { } + break; + case IS_STRING: + zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); + ZEND_VM_CONTINUE(); /* bailed out before */ + default: + + break; + } + } else { + + } + + ZEND_VM_NEXT_OPCODE(); +} + +static int ZEND_UNSET_OBJ_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +{ + zend_op *opline = EX(opline); + + zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_UNSET TSRMLS_CC); + zval *offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); + long index; + + if (container) { + if (IS_CV == IS_CV && container != &EG(uninitialized_zval_ptr)) { + SEPARATE_ZVAL_IF_NOT_REF(container); + } + if (Z_TYPE_PP(container) == IS_OBJECT) { + if (0) { + MAKE_REAL_ZVAL_PTR(offset); + } + Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + if (0) { + zval_ptr_dtor(&offset); + } else { + } + } else { + } } else { - /* overloaded element */ } @@ -27377,33 +27573,21 @@ ZEND_NULL_HANDLER, ZEND_NULL_HANDLER, ZEND_NULL_HANDLER, - ZEND_UNSET_DIM_OBJ_SPEC_VAR_CONST_HANDLER, - ZEND_UNSET_DIM_OBJ_SPEC_VAR_TMP_HANDLER, - ZEND_UNSET_DIM_OBJ_SPEC_VAR_VAR_HANDLER, - ZEND_NULL_HANDLER, - ZEND_UNSET_DIM_OBJ_SPEC_VAR_CV_HANDLER, - ZEND_UNSET_DIM_OBJ_SPEC_UNUSED_CONST_HANDLER, - ZEND_UNSET_DIM_OBJ_SPEC_UNUSED_TMP_HANDLER, - ZEND_UNSET_DIM_OBJ_SPEC_UNUSED_VAR_HANDLER, - ZEND_NULL_HANDLER, - ZEND_UNSET_DIM_OBJ_SPEC_UNUSED_CV_HANDLER, - ZEND_UNSET_DIM_OBJ_SPEC_CV_CONST_HANDLER, - ZEND_UNSET_DIM_OBJ_SPEC_CV_TMP_HANDLER, - ZEND_UNSET_DIM_OBJ_SPEC_CV_VAR_HANDLER, - ZEND_NULL_HANDLER, - ZEND_UNSET_DIM_OBJ_SPEC_CV_CV_HANDLER, - ZEND_NULL_HANDLER, - ZEND_NULL_HANDLER, - ZEND_NULL_HANDLER, - ZEND_NULL_HANDLER, - ZEND_NULL_HANDLER, - ZEND_NULL_HANDLER, - ZEND_NULL_HANDLER, - ZEND_NULL_HANDLER, - ZEND_NULL_HANDLER, + ZEND_UNSET_DIM_SPEC_VAR_CONST_HANDLER, + ZEND_UNSET_DIM_SPEC_VAR_TMP_HANDLER, + ZEND_UNSET_DIM_SPEC_VAR_VAR_HANDLER, ZEND_NULL_HANDLER, + ZEND_UNSET_DIM_SPEC_VAR_CV_HANDLER, + ZEND_UNSET_DIM_SPEC_UNUSED_CONST_HANDLER, + ZEND_UNSET_DIM_SPEC_UNUSED_TMP_HANDLER, + ZEND_UNSET_DIM_SPEC_UNUSED_VAR_HANDLER, ZEND_NULL_HANDLER, + ZEND_UNSET_DIM_SPEC_UNUSED_CV_HANDLER, + ZEND_UNSET_DIM_SPEC_CV_CONST_HANDLER, + ZEND_UNSET_DIM_SPEC_CV_TMP_HANDLER, + ZEND_UNSET_DIM_SPEC_CV_VAR_HANDLER, ZEND_NULL_HANDLER, + ZEND_UNSET_DIM_SPEC_CV_CV_HANDLER, ZEND_NULL_HANDLER, ZEND_NULL_HANDLER, ZEND_NULL_HANDLER, @@ -27414,9 +27598,21 @@ ZEND_NULL_HANDLER, ZEND_NULL_HANDLER, ZEND_NULL_HANDLER, + ZEND_UNSET_OBJ_SPEC_VAR_CONST_HANDLER, + ZEND_UNSET_OBJ_SPEC_VAR_TMP_HANDLER, + ZEND_UNSET_OBJ_SPEC_VAR_VAR_HANDLER, ZEND_NULL_HANDLER, + ZEND_UNSET_OBJ_SPEC_VAR_CV_HANDLER, + ZEND_UNSET_OBJ_SPEC_UNUSED_CONST_HANDLER, + ZEND_UNSET_OBJ_SPEC_UNUSED_TMP_HANDLER, + ZEND_UNSET_OBJ_SPEC_UNUSED_VAR_HANDLER, ZEND_NULL_HANDLER, + ZEND_UNSET_OBJ_SPEC_UNUSED_CV_HANDLER, + ZEND_UNSET_OBJ_SPEC_CV_CONST_HANDLER, + ZEND_UNSET_OBJ_SPEC_CV_TMP_HANDLER, + ZEND_UNSET_OBJ_SPEC_CV_VAR_HANDLER, ZEND_NULL_HANDLER, + ZEND_UNSET_OBJ_SPEC_CV_CV_HANDLER, ZEND_FE_RESET_SPEC_CONST_HANDLER, ZEND_FE_RESET_SPEC_CONST_HANDLER, ZEND_FE_RESET_SPEC_CONST_HANDLER, http://cvs.php.net/diff.php/ZendEngine2/zend_vm_opcodes.h?r1=1.26&r2=1.27&ty=u Index: ZendEngine2/zend_vm_opcodes.h diff -u ZendEngine2/zend_vm_opcodes.h:1.26 ZendEngine2/zend_vm_opcodes.h:1.27 --- ZendEngine2/zend_vm_opcodes.h:1.26 Thu Jun 16 02:00:48 2005 +++ ZendEngine2/zend_vm_opcodes.h Thu Jun 16 08:17:39 2005 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_vm_opcodes.h,v 1.26 2005/06/16 06:00:48 dmitry Exp $ */ +/* $Id: zend_vm_opcodes.h,v 1.27 2005/06/16 12:17:39 dmitry Exp $ */ #define ZEND_NOP 0 #define ZEND_ADD 1 @@ -92,7 +92,8 @@ #define ZEND_ADD_ARRAY_ELEMENT 72 #define ZEND_INCLUDE_OR_EVAL 73 #define ZEND_UNSET_VAR 74 -#define ZEND_UNSET_DIM_OBJ 75 +#define ZEND_UNSET_DIM 75 +#define ZEND_UNSET_OBJ 76 #define ZEND_FE_RESET 77 #define ZEND_FE_FETCH 78 #define ZEND_EXIT 79
http://cvs.php.net/diff.php/ZendEngine2/zend_compile.c?r1=1.636&r2=1.637&ty=u Index: ZendEngine2/zend_compile.c diff -u ZendEngine2/zend_compile.c:1.636 ZendEngine2/zend_compile.c:1.637 --- ZendEngine2/zend_compile.c:1.636 Fri Jun 10 03:56:38 2005 +++ ZendEngine2/zend_compile.c Thu Jun 16 08:17:33 2005 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.c,v 1.636 2005/06/10 07:56:38 dmitry Exp $ */ +/* $Id: zend_compile.c,v 1.637 2005/06/16 12:17:33 dmitry Exp $ */ #include <zend_language_parser.h> #include "zend.h" @@ -3332,12 +3332,10 @@ last_op->opcode = ZEND_UNSET_VAR; break; case ZEND_FETCH_DIM_UNSET: - last_op->opcode = ZEND_UNSET_DIM_OBJ; - last_op->extended_value = ZEND_UNSET_DIM; + last_op->opcode = ZEND_UNSET_DIM; break; case ZEND_FETCH_OBJ_UNSET: - last_op->opcode = ZEND_UNSET_DIM_OBJ; - last_op->extended_value = ZEND_UNSET_OBJ; + last_op->opcode = ZEND_UNSET_OBJ; break; } http://cvs.php.net/diff.php/ZendEngine2/zend_compile.h?r1=1.308&r2=1.309&ty=u Index: ZendEngine2/zend_compile.h diff -u ZendEngine2/zend_compile.h:1.308 ZendEngine2/zend_compile.h:1.309 --- ZendEngine2/zend_compile.h:1.308 Thu Jun 9 13:20:43 2005 +++ ZendEngine2/zend_compile.h Thu Jun 16 08:17:33 2005 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.h,v 1.308 2005/06/09 17:20:43 stas Exp $ */ +/* $Id: zend_compile.h,v 1.309 2005/06/16 12:17:33 dmitry Exp $ */ #ifndef ZEND_COMPILE_H #define ZEND_COMPILE_H @@ -576,10 +576,6 @@ #define ZEND_FETCH_STATIC_MEMBER 3 -/* obj/dim unsets */ -#define ZEND_UNSET_DIM 1 -#define ZEND_UNSET_OBJ 2 - /* class fetches */ #define ZEND_FETCH_CLASS_DEFAULT 0 #define ZEND_FETCH_CLASS_SELF 1 http://cvs.php.net/diff.php/ZendEngine2/zend_vm_def.h?r1=1.37&r2=1.38&ty=u Index: ZendEngine2/zend_vm_def.h diff -u ZendEngine2/zend_vm_def.h:1.37 ZendEngine2/zend_vm_def.h:1.38 --- ZendEngine2/zend_vm_def.h:1.37 Thu Jun 16 02:00:46 2005 +++ ZendEngine2/zend_vm_def.h Thu Jun 16 08:17:34 2005 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_vm_def.h,v 1.37 2005/06/16 06:00:46 dmitry Exp $ */ +/* $Id: zend_vm_def.h,v 1.38 2005/06/16 12:17:34 dmitry Exp $ */ /* If you change this file, please regenerate the zend_vm_execute.h and * zend_vm_opcodes.h files by running: @@ -2809,7 +2809,7 @@ ZEND_VM_NEXT_OPCODE(); } -ZEND_VM_HANDLER(75, ZEND_UNSET_DIM_OBJ, VAR|UNUSED|CV, CONST|TMP|VAR|CV) +ZEND_VM_HANDLER(75, ZEND_UNSET_DIM, VAR|UNUSED|CV, CONST|TMP|VAR|CV) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; @@ -2818,96 +2818,113 @@ long index; if (container) { - if (OP1_TYPE == IS_CV && container != &EG(uninitialized_zval_ptr)) { SEPARATE_ZVAL_IF_NOT_REF(container); } - if (opline->extended_value == ZEND_UNSET_DIM) { - switch (Z_TYPE_PP(container)) { - case IS_ARRAY: { - HashTable *ht = Z_ARRVAL_PP(container); - - switch (offset->type) { - case IS_DOUBLE: - case IS_RESOURCE: - case IS_BOOL: - case IS_LONG: - if (offset->type == IS_DOUBLE) { - index = (long) offset->value.dval; - } else { - index = offset->value.lval; - } + switch (Z_TYPE_PP(container)) { + case IS_ARRAY: { + HashTable *ht = Z_ARRVAL_PP(container); + + switch (offset->type) { + case IS_DOUBLE: + case IS_RESOURCE: + case IS_BOOL: + case IS_LONG: + if (offset->type == IS_DOUBLE) { + index = (long) offset->value.dval; + } else { + index = offset->value.lval; + } - zend_hash_index_del(ht, index); - break; - case IS_STRING: - if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && - ht == &EG(symbol_table)) { - zend_execute_data *ex; - ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); - - for (ex = EXECUTE_DATA; ex; ex = ex->prev_execute_data) { - if (ex->symbol_table == ht) { - int i; - - for (i = 0; i < ex->op_array->last_var; i++) { - if (ex->op_array->vars[i].hash_value == hash_value && - ex->op_array->vars[i].name_len == offset->value.str.len && - !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { - ex->CVs[i] = NULL; - break; - } + zend_hash_index_del(ht, index); + break; + case IS_STRING: + if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && + ht == &EG(symbol_table)) { + zend_execute_data *ex; + ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); + + for (ex = EXECUTE_DATA; ex; ex = ex->prev_execute_data) { + if (ex->symbol_table == ht) { + int i; + + for (i = 0; i < ex->op_array->last_var; i++) { + if (ex->op_array->vars[i].hash_value == hash_value && + ex->op_array->vars[i].name_len == offset->value.str.len && + !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { + ex->CVs[i] = NULL; + break; } } } } - break; - case IS_NULL: - zend_hash_del(ht, "", sizeof("")); - break; - default: - zend_error(E_WARNING, "Illegal offset type in unset"); - break; - } - FREE_OP2(); - break; + } + break; + case IS_NULL: + zend_hash_del(ht, "", sizeof("")); + break; + default: + zend_error(E_WARNING, "Illegal offset type in unset"); + break; } - case IS_OBJECT: - if (!Z_OBJ_HT_P(*container)->unset_dimension) { - zend_error_noreturn(E_ERROR, "Cannot use object as array"); - } - if (IS_OP2_TMP_FREE()) { - MAKE_REAL_ZVAL_PTR(offset); - } - Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); - if (IS_OP2_TMP_FREE()) { - zval_ptr_dtor(&offset); - } else { - FREE_OP2(); - } - break; - case IS_STRING: - zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); - ZEND_VM_CONTINUE(); /* bailed out before */ - default: - FREE_OP2(); - break; + FREE_OP2(); + break; } - } else { /* ZEND_UNSET_OBJ */ - if (Z_TYPE_PP(container) == IS_OBJECT) { + case IS_OBJECT: + if (!Z_OBJ_HT_P(*container)->unset_dimension) { + zend_error_noreturn(E_ERROR, "Cannot use object as array"); + } if (IS_OP2_TMP_FREE()) { MAKE_REAL_ZVAL_PTR(offset); } - Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); if (IS_OP2_TMP_FREE()) { zval_ptr_dtor(&offset); } else { FREE_OP2(); } + break; + case IS_STRING: + zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); + ZEND_VM_CONTINUE(); /* bailed out before */ + default: + FREE_OP2(); + break; + } + } else { + FREE_OP2(); + } + FREE_OP1_VAR_PTR(); + + ZEND_VM_NEXT_OPCODE(); +} + +ZEND_VM_HANDLER(76, ZEND_UNSET_OBJ, VAR|UNUSED|CV, CONST|TMP|VAR|CV) +{ + zend_op *opline = EX(opline); + zend_free_op free_op1, free_op2; + zval **container = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_UNSET); + zval *offset = GET_OP2_ZVAL_PTR(BP_VAR_R); + long index; + + if (container) { + if (OP1_TYPE == IS_CV && container != &EG(uninitialized_zval_ptr)) { + SEPARATE_ZVAL_IF_NOT_REF(container); + } + if (Z_TYPE_PP(container) == IS_OBJECT) { + if (IS_OP2_TMP_FREE()) { + MAKE_REAL_ZVAL_PTR(offset); } + Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + if (IS_OP2_TMP_FREE()) { + zval_ptr_dtor(&offset); + } else { + FREE_OP2(); + } + } else { + FREE_OP2(); } } else { - /* overloaded element */ FREE_OP2(); } FREE_OP1_VAR_PTR(); http://cvs.php.net/diff.php/ZendEngine2/zend_vm_execute.h?r1=1.39&r2=1.40&ty=u Index: ZendEngine2/zend_vm_execute.h diff -u ZendEngine2/zend_vm_execute.h:1.39 ZendEngine2/zend_vm_execute.h:1.40 --- ZendEngine2/zend_vm_execute.h:1.39 Thu Jun 16 02:00:47 2005 +++ ZendEngine2/zend_vm_execute.h Thu Jun 16 08:17:34 2005 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_vm_execute.h,v 1.39 2005/06/16 06:00:47 dmitry Exp $ */ +/* $Id: zend_vm_execute.h,v 1.40 2005/06/16 12:17:34 dmitry Exp $ */ static opcode_handler_t zend_user_opcode_handlers[256] = {(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL}; @@ -8882,7 +8882,7 @@ return ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } -static int ZEND_UNSET_DIM_OBJ_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +static int ZEND_UNSET_DIM_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; @@ -8891,96 +8891,113 @@ long index; if (container) { - if (IS_VAR == IS_CV && container != &EG(uninitialized_zval_ptr)) { SEPARATE_ZVAL_IF_NOT_REF(container); } - if (opline->extended_value == ZEND_UNSET_DIM) { - switch (Z_TYPE_PP(container)) { - case IS_ARRAY: { - HashTable *ht = Z_ARRVAL_PP(container); - - switch (offset->type) { - case IS_DOUBLE: - case IS_RESOURCE: - case IS_BOOL: - case IS_LONG: - if (offset->type == IS_DOUBLE) { - index = (long) offset->value.dval; - } else { - index = offset->value.lval; - } + switch (Z_TYPE_PP(container)) { + case IS_ARRAY: { + HashTable *ht = Z_ARRVAL_PP(container); + + switch (offset->type) { + case IS_DOUBLE: + case IS_RESOURCE: + case IS_BOOL: + case IS_LONG: + if (offset->type == IS_DOUBLE) { + index = (long) offset->value.dval; + } else { + index = offset->value.lval; + } - zend_hash_index_del(ht, index); - break; - case IS_STRING: - if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && - ht == &EG(symbol_table)) { - zend_execute_data *ex; - ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); - - for (ex = execute_data; ex; ex = ex->prev_execute_data) { - if (ex->symbol_table == ht) { - int i; - - for (i = 0; i < ex->op_array->last_var; i++) { - if (ex->op_array->vars[i].hash_value == hash_value && - ex->op_array->vars[i].name_len == offset->value.str.len && - !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { - ex->CVs[i] = NULL; - break; - } + zend_hash_index_del(ht, index); + break; + case IS_STRING: + if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && + ht == &EG(symbol_table)) { + zend_execute_data *ex; + ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); + + for (ex = execute_data; ex; ex = ex->prev_execute_data) { + if (ex->symbol_table == ht) { + int i; + + for (i = 0; i < ex->op_array->last_var; i++) { + if (ex->op_array->vars[i].hash_value == hash_value && + ex->op_array->vars[i].name_len == offset->value.str.len && + !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { + ex->CVs[i] = NULL; + break; } } } } - break; - case IS_NULL: - zend_hash_del(ht, "", sizeof("")); - break; - default: - zend_error(E_WARNING, "Illegal offset type in unset"); - break; - } - - break; + } + break; + case IS_NULL: + zend_hash_del(ht, "", sizeof("")); + break; + default: + zend_error(E_WARNING, "Illegal offset type in unset"); + break; } - case IS_OBJECT: - if (!Z_OBJ_HT_P(*container)->unset_dimension) { - zend_error_noreturn(E_ERROR, "Cannot use object as array"); - } - if (0) { - MAKE_REAL_ZVAL_PTR(offset); - } - Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); - if (0) { - zval_ptr_dtor(&offset); - } else { - } - break; - case IS_STRING: - zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); - ZEND_VM_CONTINUE(); /* bailed out before */ - default: - - break; + break; } - } else { /* ZEND_UNSET_OBJ */ - if (Z_TYPE_PP(container) == IS_OBJECT) { + case IS_OBJECT: + if (!Z_OBJ_HT_P(*container)->unset_dimension) { + zend_error_noreturn(E_ERROR, "Cannot use object as array"); + } if (0) { MAKE_REAL_ZVAL_PTR(offset); } - Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); if (0) { zval_ptr_dtor(&offset); } else { } + break; + case IS_STRING: + zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); + ZEND_VM_CONTINUE(); /* bailed out before */ + default: + + break; + } + } else { + + } + if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; + + ZEND_VM_NEXT_OPCODE(); +} + +static int ZEND_UNSET_OBJ_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +{ + zend_op *opline = EX(opline); + zend_free_op free_op1; + zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); + zval *offset = &opline->op2.u.constant; + long index; + + if (container) { + if (IS_VAR == IS_CV && container != &EG(uninitialized_zval_ptr)) { + SEPARATE_ZVAL_IF_NOT_REF(container); + } + if (Z_TYPE_PP(container) == IS_OBJECT) { + if (0) { + MAKE_REAL_ZVAL_PTR(offset); + } + Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + if (0) { + zval_ptr_dtor(&offset); + } else { + } + } else { + } } else { - /* overloaded element */ } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; @@ -10284,7 +10301,7 @@ return ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } -static int ZEND_UNSET_DIM_OBJ_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +static int ZEND_UNSET_DIM_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; @@ -10293,96 +10310,113 @@ long index; if (container) { - if (IS_VAR == IS_CV && container != &EG(uninitialized_zval_ptr)) { SEPARATE_ZVAL_IF_NOT_REF(container); } - if (opline->extended_value == ZEND_UNSET_DIM) { - switch (Z_TYPE_PP(container)) { - case IS_ARRAY: { - HashTable *ht = Z_ARRVAL_PP(container); - - switch (offset->type) { - case IS_DOUBLE: - case IS_RESOURCE: - case IS_BOOL: - case IS_LONG: - if (offset->type == IS_DOUBLE) { - index = (long) offset->value.dval; - } else { - index = offset->value.lval; - } + switch (Z_TYPE_PP(container)) { + case IS_ARRAY: { + HashTable *ht = Z_ARRVAL_PP(container); + + switch (offset->type) { + case IS_DOUBLE: + case IS_RESOURCE: + case IS_BOOL: + case IS_LONG: + if (offset->type == IS_DOUBLE) { + index = (long) offset->value.dval; + } else { + index = offset->value.lval; + } - zend_hash_index_del(ht, index); - break; - case IS_STRING: - if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && - ht == &EG(symbol_table)) { - zend_execute_data *ex; - ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); - - for (ex = execute_data; ex; ex = ex->prev_execute_data) { - if (ex->symbol_table == ht) { - int i; - - for (i = 0; i < ex->op_array->last_var; i++) { - if (ex->op_array->vars[i].hash_value == hash_value && - ex->op_array->vars[i].name_len == offset->value.str.len && - !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { - ex->CVs[i] = NULL; - break; - } + zend_hash_index_del(ht, index); + break; + case IS_STRING: + if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && + ht == &EG(symbol_table)) { + zend_execute_data *ex; + ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); + + for (ex = execute_data; ex; ex = ex->prev_execute_data) { + if (ex->symbol_table == ht) { + int i; + + for (i = 0; i < ex->op_array->last_var; i++) { + if (ex->op_array->vars[i].hash_value == hash_value && + ex->op_array->vars[i].name_len == offset->value.str.len && + !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { + ex->CVs[i] = NULL; + break; } } } } - break; - case IS_NULL: - zend_hash_del(ht, "", sizeof("")); - break; - default: - zend_error(E_WARNING, "Illegal offset type in unset"); - break; - } - zval_dtor(free_op2.var); - break; + } + break; + case IS_NULL: + zend_hash_del(ht, "", sizeof("")); + break; + default: + zend_error(E_WARNING, "Illegal offset type in unset"); + break; } - case IS_OBJECT: - if (!Z_OBJ_HT_P(*container)->unset_dimension) { - zend_error_noreturn(E_ERROR, "Cannot use object as array"); - } - if (1) { - MAKE_REAL_ZVAL_PTR(offset); - } - Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); - if (1) { - zval_ptr_dtor(&offset); - } else { - zval_dtor(free_op2.var); - } - break; - case IS_STRING: - zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); - ZEND_VM_CONTINUE(); /* bailed out before */ - default: - zval_dtor(free_op2.var); - break; + zval_dtor(free_op2.var); + break; } - } else { /* ZEND_UNSET_OBJ */ - if (Z_TYPE_PP(container) == IS_OBJECT) { + case IS_OBJECT: + if (!Z_OBJ_HT_P(*container)->unset_dimension) { + zend_error_noreturn(E_ERROR, "Cannot use object as array"); + } if (1) { MAKE_REAL_ZVAL_PTR(offset); } - Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); if (1) { zval_ptr_dtor(&offset); } else { zval_dtor(free_op2.var); } + break; + case IS_STRING: + zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); + ZEND_VM_CONTINUE(); /* bailed out before */ + default: + zval_dtor(free_op2.var); + break; + } + } else { + zval_dtor(free_op2.var); + } + if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; + + ZEND_VM_NEXT_OPCODE(); +} + +static int ZEND_UNSET_OBJ_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +{ + zend_op *opline = EX(opline); + zend_free_op free_op1, free_op2; + zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); + zval *offset = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC); + long index; + + if (container) { + if (IS_VAR == IS_CV && container != &EG(uninitialized_zval_ptr)) { + SEPARATE_ZVAL_IF_NOT_REF(container); + } + if (Z_TYPE_PP(container) == IS_OBJECT) { + if (1) { + MAKE_REAL_ZVAL_PTR(offset); } + Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + if (1) { + zval_ptr_dtor(&offset); + } else { + zval_dtor(free_op2.var); + } + } else { + zval_dtor(free_op2.var); } } else { - /* overloaded element */ zval_dtor(free_op2.var); } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; @@ -11720,7 +11754,7 @@ return ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } -static int ZEND_UNSET_DIM_OBJ_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +static int ZEND_UNSET_DIM_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; @@ -11729,96 +11763,113 @@ long index; if (container) { - if (IS_VAR == IS_CV && container != &EG(uninitialized_zval_ptr)) { SEPARATE_ZVAL_IF_NOT_REF(container); } - if (opline->extended_value == ZEND_UNSET_DIM) { - switch (Z_TYPE_PP(container)) { - case IS_ARRAY: { - HashTable *ht = Z_ARRVAL_PP(container); - - switch (offset->type) { - case IS_DOUBLE: - case IS_RESOURCE: - case IS_BOOL: - case IS_LONG: - if (offset->type == IS_DOUBLE) { - index = (long) offset->value.dval; - } else { - index = offset->value.lval; - } + switch (Z_TYPE_PP(container)) { + case IS_ARRAY: { + HashTable *ht = Z_ARRVAL_PP(container); + + switch (offset->type) { + case IS_DOUBLE: + case IS_RESOURCE: + case IS_BOOL: + case IS_LONG: + if (offset->type == IS_DOUBLE) { + index = (long) offset->value.dval; + } else { + index = offset->value.lval; + } - zend_hash_index_del(ht, index); - break; - case IS_STRING: - if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && - ht == &EG(symbol_table)) { - zend_execute_data *ex; - ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); - - for (ex = execute_data; ex; ex = ex->prev_execute_data) { - if (ex->symbol_table == ht) { - int i; - - for (i = 0; i < ex->op_array->last_var; i++) { - if (ex->op_array->vars[i].hash_value == hash_value && - ex->op_array->vars[i].name_len == offset->value.str.len && - !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { - ex->CVs[i] = NULL; - break; - } + zend_hash_index_del(ht, index); + break; + case IS_STRING: + if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && + ht == &EG(symbol_table)) { + zend_execute_data *ex; + ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); + + for (ex = execute_data; ex; ex = ex->prev_execute_data) { + if (ex->symbol_table == ht) { + int i; + + for (i = 0; i < ex->op_array->last_var; i++) { + if (ex->op_array->vars[i].hash_value == hash_value && + ex->op_array->vars[i].name_len == offset->value.str.len && + !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { + ex->CVs[i] = NULL; + break; } } } } - break; - case IS_NULL: - zend_hash_del(ht, "", sizeof("")); - break; - default: - zend_error(E_WARNING, "Illegal offset type in unset"); - break; - } - if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; - break; + } + break; + case IS_NULL: + zend_hash_del(ht, "", sizeof("")); + break; + default: + zend_error(E_WARNING, "Illegal offset type in unset"); + break; } - case IS_OBJECT: - if (!Z_OBJ_HT_P(*container)->unset_dimension) { - zend_error_noreturn(E_ERROR, "Cannot use object as array"); - } - if (0) { - MAKE_REAL_ZVAL_PTR(offset); - } - Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); - if (0) { - zval_ptr_dtor(&offset); - } else { - if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; - } - break; - case IS_STRING: - zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); - ZEND_VM_CONTINUE(); /* bailed out before */ - default: - if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; - break; + if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; + break; } - } else { /* ZEND_UNSET_OBJ */ - if (Z_TYPE_PP(container) == IS_OBJECT) { + case IS_OBJECT: + if (!Z_OBJ_HT_P(*container)->unset_dimension) { + zend_error_noreturn(E_ERROR, "Cannot use object as array"); + } if (0) { MAKE_REAL_ZVAL_PTR(offset); } - Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); if (0) { zval_ptr_dtor(&offset); } else { if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; } + break; + case IS_STRING: + zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); + ZEND_VM_CONTINUE(); /* bailed out before */ + default: + if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; + break; + } + } else { + if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; + } + if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; + + ZEND_VM_NEXT_OPCODE(); +} + +static int ZEND_UNSET_OBJ_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +{ + zend_op *opline = EX(opline); + zend_free_op free_op1, free_op2; + zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); + zval *offset = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC); + long index; + + if (container) { + if (IS_VAR == IS_CV && container != &EG(uninitialized_zval_ptr)) { + SEPARATE_ZVAL_IF_NOT_REF(container); + } + if (Z_TYPE_PP(container) == IS_OBJECT) { + if (0) { + MAKE_REAL_ZVAL_PTR(offset); } + Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + if (0) { + zval_ptr_dtor(&offset); + } else { + if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; + } + } else { + if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; } } else { - /* overloaded element */ if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; @@ -13528,7 +13579,7 @@ return ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } -static int ZEND_UNSET_DIM_OBJ_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +static int ZEND_UNSET_DIM_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; @@ -13537,96 +13588,113 @@ long index; if (container) { - if (IS_VAR == IS_CV && container != &EG(uninitialized_zval_ptr)) { SEPARATE_ZVAL_IF_NOT_REF(container); } - if (opline->extended_value == ZEND_UNSET_DIM) { - switch (Z_TYPE_PP(container)) { - case IS_ARRAY: { - HashTable *ht = Z_ARRVAL_PP(container); - - switch (offset->type) { - case IS_DOUBLE: - case IS_RESOURCE: - case IS_BOOL: - case IS_LONG: - if (offset->type == IS_DOUBLE) { - index = (long) offset->value.dval; - } else { - index = offset->value.lval; - } + switch (Z_TYPE_PP(container)) { + case IS_ARRAY: { + HashTable *ht = Z_ARRVAL_PP(container); + + switch (offset->type) { + case IS_DOUBLE: + case IS_RESOURCE: + case IS_BOOL: + case IS_LONG: + if (offset->type == IS_DOUBLE) { + index = (long) offset->value.dval; + } else { + index = offset->value.lval; + } - zend_hash_index_del(ht, index); - break; - case IS_STRING: - if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && - ht == &EG(symbol_table)) { - zend_execute_data *ex; - ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); - - for (ex = execute_data; ex; ex = ex->prev_execute_data) { - if (ex->symbol_table == ht) { - int i; - - for (i = 0; i < ex->op_array->last_var; i++) { - if (ex->op_array->vars[i].hash_value == hash_value && - ex->op_array->vars[i].name_len == offset->value.str.len && - !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { - ex->CVs[i] = NULL; - break; - } + zend_hash_index_del(ht, index); + break; + case IS_STRING: + if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && + ht == &EG(symbol_table)) { + zend_execute_data *ex; + ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); + + for (ex = execute_data; ex; ex = ex->prev_execute_data) { + if (ex->symbol_table == ht) { + int i; + + for (i = 0; i < ex->op_array->last_var; i++) { + if (ex->op_array->vars[i].hash_value == hash_value && + ex->op_array->vars[i].name_len == offset->value.str.len && + !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { + ex->CVs[i] = NULL; + break; } } } } - break; - case IS_NULL: - zend_hash_del(ht, "", sizeof("")); - break; - default: - zend_error(E_WARNING, "Illegal offset type in unset"); - break; - } - - break; + } + break; + case IS_NULL: + zend_hash_del(ht, "", sizeof("")); + break; + default: + zend_error(E_WARNING, "Illegal offset type in unset"); + break; } - case IS_OBJECT: - if (!Z_OBJ_HT_P(*container)->unset_dimension) { - zend_error_noreturn(E_ERROR, "Cannot use object as array"); - } - if (0) { - MAKE_REAL_ZVAL_PTR(offset); - } - Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); - if (0) { - zval_ptr_dtor(&offset); - } else { - - } - break; - case IS_STRING: - zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); - ZEND_VM_CONTINUE(); /* bailed out before */ - default: - break; + break; } - } else { /* ZEND_UNSET_OBJ */ - if (Z_TYPE_PP(container) == IS_OBJECT) { + case IS_OBJECT: + if (!Z_OBJ_HT_P(*container)->unset_dimension) { + zend_error_noreturn(E_ERROR, "Cannot use object as array"); + } if (0) { MAKE_REAL_ZVAL_PTR(offset); } - Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); if (0) { zval_ptr_dtor(&offset); } else { } + break; + case IS_STRING: + zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); + ZEND_VM_CONTINUE(); /* bailed out before */ + default: + + break; + } + } else { + + } + if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; + + ZEND_VM_NEXT_OPCODE(); +} + +static int ZEND_UNSET_OBJ_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +{ + zend_op *opline = EX(opline); + zend_free_op free_op1; + zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); + zval *offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); + long index; + + if (container) { + if (IS_VAR == IS_CV && container != &EG(uninitialized_zval_ptr)) { + SEPARATE_ZVAL_IF_NOT_REF(container); + } + if (Z_TYPE_PP(container) == IS_OBJECT) { + if (0) { + MAKE_REAL_ZVAL_PTR(offset); + } + Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + if (0) { + zval_ptr_dtor(&offset); + } else { + } + } else { + } } else { - /* overloaded element */ } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; @@ -14669,7 +14737,7 @@ return ZEND_ADD_ARRAY_ELEMENT_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } -static int ZEND_UNSET_DIM_OBJ_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +static int ZEND_UNSET_DIM_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); @@ -14678,96 +14746,112 @@ long index; if (container) { - if (IS_UNUSED == IS_CV && container != &EG(uninitialized_zval_ptr)) { SEPARATE_ZVAL_IF_NOT_REF(container); } - if (opline->extended_value == ZEND_UNSET_DIM) { - switch (Z_TYPE_PP(container)) { - case IS_ARRAY: { - HashTable *ht = Z_ARRVAL_PP(container); - - switch (offset->type) { - case IS_DOUBLE: - case IS_RESOURCE: - case IS_BOOL: - case IS_LONG: - if (offset->type == IS_DOUBLE) { - index = (long) offset->value.dval; - } else { - index = offset->value.lval; - } + switch (Z_TYPE_PP(container)) { + case IS_ARRAY: { + HashTable *ht = Z_ARRVAL_PP(container); + + switch (offset->type) { + case IS_DOUBLE: + case IS_RESOURCE: + case IS_BOOL: + case IS_LONG: + if (offset->type == IS_DOUBLE) { + index = (long) offset->value.dval; + } else { + index = offset->value.lval; + } - zend_hash_index_del(ht, index); - break; - case IS_STRING: - if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && - ht == &EG(symbol_table)) { - zend_execute_data *ex; - ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); - - for (ex = execute_data; ex; ex = ex->prev_execute_data) { - if (ex->symbol_table == ht) { - int i; - - for (i = 0; i < ex->op_array->last_var; i++) { - if (ex->op_array->vars[i].hash_value == hash_value && - ex->op_array->vars[i].name_len == offset->value.str.len && - !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { - ex->CVs[i] = NULL; - break; - } + zend_hash_index_del(ht, index); + break; + case IS_STRING: + if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && + ht == &EG(symbol_table)) { + zend_execute_data *ex; + ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); + + for (ex = execute_data; ex; ex = ex->prev_execute_data) { + if (ex->symbol_table == ht) { + int i; + + for (i = 0; i < ex->op_array->last_var; i++) { + if (ex->op_array->vars[i].hash_value == hash_value && + ex->op_array->vars[i].name_len == offset->value.str.len && + !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { + ex->CVs[i] = NULL; + break; } } } } - break; - case IS_NULL: - zend_hash_del(ht, "", sizeof("")); - break; - default: - zend_error(E_WARNING, "Illegal offset type in unset"); - break; - } - - break; + } + break; + case IS_NULL: + zend_hash_del(ht, "", sizeof("")); + break; + default: + zend_error(E_WARNING, "Illegal offset type in unset"); + break; } - case IS_OBJECT: - if (!Z_OBJ_HT_P(*container)->unset_dimension) { - zend_error_noreturn(E_ERROR, "Cannot use object as array"); - } - if (0) { - MAKE_REAL_ZVAL_PTR(offset); - } - Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); - if (0) { - zval_ptr_dtor(&offset); - } else { - } - break; - case IS_STRING: - zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); - ZEND_VM_CONTINUE(); /* bailed out before */ - default: - - break; + break; } - } else { /* ZEND_UNSET_OBJ */ - if (Z_TYPE_PP(container) == IS_OBJECT) { + case IS_OBJECT: + if (!Z_OBJ_HT_P(*container)->unset_dimension) { + zend_error_noreturn(E_ERROR, "Cannot use object as array"); + } if (0) { MAKE_REAL_ZVAL_PTR(offset); } - Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); if (0) { zval_ptr_dtor(&offset); } else { } + break; + case IS_STRING: + zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); + ZEND_VM_CONTINUE(); /* bailed out before */ + default: + + break; + } + } else { + + } + + ZEND_VM_NEXT_OPCODE(); +} + +static int ZEND_UNSET_OBJ_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +{ + zend_op *opline = EX(opline); + + zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C); + zval *offset = &opline->op2.u.constant; + long index; + + if (container) { + if (IS_UNUSED == IS_CV && container != &EG(uninitialized_zval_ptr)) { + SEPARATE_ZVAL_IF_NOT_REF(container); + } + if (Z_TYPE_PP(container) == IS_OBJECT) { + if (0) { + MAKE_REAL_ZVAL_PTR(offset); + } + Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + if (0) { + zval_ptr_dtor(&offset); + } else { + } + } else { + } } else { - /* overloaded element */ } @@ -15693,7 +15777,7 @@ return ZEND_ADD_ARRAY_ELEMENT_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } -static int ZEND_UNSET_DIM_OBJ_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +static int ZEND_UNSET_DIM_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; @@ -15702,96 +15786,112 @@ long index; if (container) { - if (IS_UNUSED == IS_CV && container != &EG(uninitialized_zval_ptr)) { SEPARATE_ZVAL_IF_NOT_REF(container); } - if (opline->extended_value == ZEND_UNSET_DIM) { - switch (Z_TYPE_PP(container)) { - case IS_ARRAY: { - HashTable *ht = Z_ARRVAL_PP(container); - - switch (offset->type) { - case IS_DOUBLE: - case IS_RESOURCE: - case IS_BOOL: - case IS_LONG: - if (offset->type == IS_DOUBLE) { - index = (long) offset->value.dval; - } else { - index = offset->value.lval; - } + switch (Z_TYPE_PP(container)) { + case IS_ARRAY: { + HashTable *ht = Z_ARRVAL_PP(container); + + switch (offset->type) { + case IS_DOUBLE: + case IS_RESOURCE: + case IS_BOOL: + case IS_LONG: + if (offset->type == IS_DOUBLE) { + index = (long) offset->value.dval; + } else { + index = offset->value.lval; + } - zend_hash_index_del(ht, index); - break; - case IS_STRING: - if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && - ht == &EG(symbol_table)) { - zend_execute_data *ex; - ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); - - for (ex = execute_data; ex; ex = ex->prev_execute_data) { - if (ex->symbol_table == ht) { - int i; - - for (i = 0; i < ex->op_array->last_var; i++) { - if (ex->op_array->vars[i].hash_value == hash_value && - ex->op_array->vars[i].name_len == offset->value.str.len && - !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { - ex->CVs[i] = NULL; - break; - } + zend_hash_index_del(ht, index); + break; + case IS_STRING: + if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && + ht == &EG(symbol_table)) { + zend_execute_data *ex; + ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); + + for (ex = execute_data; ex; ex = ex->prev_execute_data) { + if (ex->symbol_table == ht) { + int i; + + for (i = 0; i < ex->op_array->last_var; i++) { + if (ex->op_array->vars[i].hash_value == hash_value && + ex->op_array->vars[i].name_len == offset->value.str.len && + !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { + ex->CVs[i] = NULL; + break; } } } } - break; - case IS_NULL: - zend_hash_del(ht, "", sizeof("")); - break; - default: - zend_error(E_WARNING, "Illegal offset type in unset"); - break; - } - zval_dtor(free_op2.var); - break; + } + break; + case IS_NULL: + zend_hash_del(ht, "", sizeof("")); + break; + default: + zend_error(E_WARNING, "Illegal offset type in unset"); + break; } - case IS_OBJECT: - if (!Z_OBJ_HT_P(*container)->unset_dimension) { - zend_error_noreturn(E_ERROR, "Cannot use object as array"); - } - if (1) { - MAKE_REAL_ZVAL_PTR(offset); - } - Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); - if (1) { - zval_ptr_dtor(&offset); - } else { - zval_dtor(free_op2.var); - } - break; - case IS_STRING: - zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); - ZEND_VM_CONTINUE(); /* bailed out before */ - default: - zval_dtor(free_op2.var); - break; + zval_dtor(free_op2.var); + break; } - } else { /* ZEND_UNSET_OBJ */ - if (Z_TYPE_PP(container) == IS_OBJECT) { + case IS_OBJECT: + if (!Z_OBJ_HT_P(*container)->unset_dimension) { + zend_error_noreturn(E_ERROR, "Cannot use object as array"); + } if (1) { MAKE_REAL_ZVAL_PTR(offset); } - Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); if (1) { zval_ptr_dtor(&offset); } else { zval_dtor(free_op2.var); } + break; + case IS_STRING: + zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); + ZEND_VM_CONTINUE(); /* bailed out before */ + default: + zval_dtor(free_op2.var); + break; + } + } else { + zval_dtor(free_op2.var); + } + + ZEND_VM_NEXT_OPCODE(); +} + +static int ZEND_UNSET_OBJ_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +{ + zend_op *opline = EX(opline); + zend_free_op free_op2; + zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C); + zval *offset = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC); + long index; + + if (container) { + if (IS_UNUSED == IS_CV && container != &EG(uninitialized_zval_ptr)) { + SEPARATE_ZVAL_IF_NOT_REF(container); + } + if (Z_TYPE_PP(container) == IS_OBJECT) { + if (1) { + MAKE_REAL_ZVAL_PTR(offset); } + Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + if (1) { + zval_ptr_dtor(&offset); + } else { + zval_dtor(free_op2.var); + } + } else { + zval_dtor(free_op2.var); } } else { - /* overloaded element */ zval_dtor(free_op2.var); } @@ -16717,7 +16817,7 @@ return ZEND_ADD_ARRAY_ELEMENT_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } -static int ZEND_UNSET_DIM_OBJ_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +static int ZEND_UNSET_DIM_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; @@ -16726,96 +16826,112 @@ long index; if (container) { - if (IS_UNUSED == IS_CV && container != &EG(uninitialized_zval_ptr)) { SEPARATE_ZVAL_IF_NOT_REF(container); } - if (opline->extended_value == ZEND_UNSET_DIM) { - switch (Z_TYPE_PP(container)) { - case IS_ARRAY: { - HashTable *ht = Z_ARRVAL_PP(container); - - switch (offset->type) { - case IS_DOUBLE: - case IS_RESOURCE: - case IS_BOOL: - case IS_LONG: - if (offset->type == IS_DOUBLE) { - index = (long) offset->value.dval; - } else { - index = offset->value.lval; - } + switch (Z_TYPE_PP(container)) { + case IS_ARRAY: { + HashTable *ht = Z_ARRVAL_PP(container); + + switch (offset->type) { + case IS_DOUBLE: + case IS_RESOURCE: + case IS_BOOL: + case IS_LONG: + if (offset->type == IS_DOUBLE) { + index = (long) offset->value.dval; + } else { + index = offset->value.lval; + } - zend_hash_index_del(ht, index); - break; - case IS_STRING: - if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && - ht == &EG(symbol_table)) { - zend_execute_data *ex; - ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); - - for (ex = execute_data; ex; ex = ex->prev_execute_data) { - if (ex->symbol_table == ht) { - int i; - - for (i = 0; i < ex->op_array->last_var; i++) { - if (ex->op_array->vars[i].hash_value == hash_value && - ex->op_array->vars[i].name_len == offset->value.str.len && - !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { - ex->CVs[i] = NULL; - break; - } + zend_hash_index_del(ht, index); + break; + case IS_STRING: + if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && + ht == &EG(symbol_table)) { + zend_execute_data *ex; + ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); + + for (ex = execute_data; ex; ex = ex->prev_execute_data) { + if (ex->symbol_table == ht) { + int i; + + for (i = 0; i < ex->op_array->last_var; i++) { + if (ex->op_array->vars[i].hash_value == hash_value && + ex->op_array->vars[i].name_len == offset->value.str.len && + !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { + ex->CVs[i] = NULL; + break; } } } } - break; - case IS_NULL: - zend_hash_del(ht, "", sizeof("")); - break; - default: - zend_error(E_WARNING, "Illegal offset type in unset"); - break; - } - if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; - break; + } + break; + case IS_NULL: + zend_hash_del(ht, "", sizeof("")); + break; + default: + zend_error(E_WARNING, "Illegal offset type in unset"); + break; } - case IS_OBJECT: - if (!Z_OBJ_HT_P(*container)->unset_dimension) { - zend_error_noreturn(E_ERROR, "Cannot use object as array"); - } - if (0) { - MAKE_REAL_ZVAL_PTR(offset); - } - Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); - if (0) { - zval_ptr_dtor(&offset); - } else { - if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; - } - break; - case IS_STRING: - zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); - ZEND_VM_CONTINUE(); /* bailed out before */ - default: - if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; - break; + if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; + break; } - } else { /* ZEND_UNSET_OBJ */ - if (Z_TYPE_PP(container) == IS_OBJECT) { + case IS_OBJECT: + if (!Z_OBJ_HT_P(*container)->unset_dimension) { + zend_error_noreturn(E_ERROR, "Cannot use object as array"); + } if (0) { MAKE_REAL_ZVAL_PTR(offset); } - Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); if (0) { zval_ptr_dtor(&offset); } else { if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; } + break; + case IS_STRING: + zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); + ZEND_VM_CONTINUE(); /* bailed out before */ + default: + if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; + break; + } + } else { + if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; + } + + ZEND_VM_NEXT_OPCODE(); +} + +static int ZEND_UNSET_OBJ_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +{ + zend_op *opline = EX(opline); + zend_free_op free_op2; + zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C); + zval *offset = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC); + long index; + + if (container) { + if (IS_UNUSED == IS_CV && container != &EG(uninitialized_zval_ptr)) { + SEPARATE_ZVAL_IF_NOT_REF(container); + } + if (Z_TYPE_PP(container) == IS_OBJECT) { + if (0) { + MAKE_REAL_ZVAL_PTR(offset); + } + Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + if (0) { + zval_ptr_dtor(&offset); + } else { + if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; } + } else { + if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; } } else { - /* overloaded element */ if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; } @@ -18103,7 +18219,7 @@ return ZEND_ADD_ARRAY_ELEMENT_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } -static int ZEND_UNSET_DIM_OBJ_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +static int ZEND_UNSET_DIM_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); @@ -18112,96 +18228,112 @@ long index; if (container) { - if (IS_UNUSED == IS_CV && container != &EG(uninitialized_zval_ptr)) { SEPARATE_ZVAL_IF_NOT_REF(container); } - if (opline->extended_value == ZEND_UNSET_DIM) { - switch (Z_TYPE_PP(container)) { - case IS_ARRAY: { - HashTable *ht = Z_ARRVAL_PP(container); - - switch (offset->type) { - case IS_DOUBLE: - case IS_RESOURCE: - case IS_BOOL: - case IS_LONG: - if (offset->type == IS_DOUBLE) { - index = (long) offset->value.dval; - } else { - index = offset->value.lval; - } + switch (Z_TYPE_PP(container)) { + case IS_ARRAY: { + HashTable *ht = Z_ARRVAL_PP(container); + + switch (offset->type) { + case IS_DOUBLE: + case IS_RESOURCE: + case IS_BOOL: + case IS_LONG: + if (offset->type == IS_DOUBLE) { + index = (long) offset->value.dval; + } else { + index = offset->value.lval; + } - zend_hash_index_del(ht, index); - break; - case IS_STRING: - if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && - ht == &EG(symbol_table)) { - zend_execute_data *ex; - ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); - - for (ex = execute_data; ex; ex = ex->prev_execute_data) { - if (ex->symbol_table == ht) { - int i; - - for (i = 0; i < ex->op_array->last_var; i++) { - if (ex->op_array->vars[i].hash_value == hash_value && - ex->op_array->vars[i].name_len == offset->value.str.len && - !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { - ex->CVs[i] = NULL; - break; - } + zend_hash_index_del(ht, index); + break; + case IS_STRING: + if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && + ht == &EG(symbol_table)) { + zend_execute_data *ex; + ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); + + for (ex = execute_data; ex; ex = ex->prev_execute_data) { + if (ex->symbol_table == ht) { + int i; + + for (i = 0; i < ex->op_array->last_var; i++) { + if (ex->op_array->vars[i].hash_value == hash_value && + ex->op_array->vars[i].name_len == offset->value.str.len && + !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { + ex->CVs[i] = NULL; + break; } } } } - break; - case IS_NULL: - zend_hash_del(ht, "", sizeof("")); - break; - default: - zend_error(E_WARNING, "Illegal offset type in unset"); - break; - } + } + break; + case IS_NULL: + zend_hash_del(ht, "", sizeof("")); + break; + default: + zend_error(E_WARNING, "Illegal offset type in unset"); + break; + } - break; + break; + } + case IS_OBJECT: + if (!Z_OBJ_HT_P(*container)->unset_dimension) { + zend_error_noreturn(E_ERROR, "Cannot use object as array"); } - case IS_OBJECT: - if (!Z_OBJ_HT_P(*container)->unset_dimension) { - zend_error_noreturn(E_ERROR, "Cannot use object as array"); - } - if (0) { - MAKE_REAL_ZVAL_PTR(offset); - } - Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); - if (0) { - zval_ptr_dtor(&offset); - } else { + if (0) { + MAKE_REAL_ZVAL_PTR(offset); + } + Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); + if (0) { + zval_ptr_dtor(&offset); + } else { - } - break; - case IS_STRING: - zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); - ZEND_VM_CONTINUE(); /* bailed out before */ - default: + } + break; + case IS_STRING: + zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); + ZEND_VM_CONTINUE(); /* bailed out before */ + default: + + break; + } + } else { + + } + + ZEND_VM_NEXT_OPCODE(); +} - break; +static int ZEND_UNSET_OBJ_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +{ + zend_op *opline = EX(opline); + + zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C); + zval *offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); + long index; + + if (container) { + if (IS_UNUSED == IS_CV && container != &EG(uninitialized_zval_ptr)) { + SEPARATE_ZVAL_IF_NOT_REF(container); + } + if (Z_TYPE_PP(container) == IS_OBJECT) { + if (0) { + MAKE_REAL_ZVAL_PTR(offset); } - } else { /* ZEND_UNSET_OBJ */ - if (Z_TYPE_PP(container) == IS_OBJECT) { - if (0) { - MAKE_REAL_ZVAL_PTR(offset); - } - Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); - if (0) { - zval_ptr_dtor(&offset); - } else { + Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + if (0) { + zval_ptr_dtor(&offset); + } else { - } } + } else { + } } else { - /* overloaded element */ } @@ -20622,7 +20754,7 @@ return ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } -static int ZEND_UNSET_DIM_OBJ_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +static int ZEND_UNSET_DIM_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); @@ -20631,96 +20763,112 @@ long index; if (container) { - if (IS_CV == IS_CV && container != &EG(uninitialized_zval_ptr)) { SEPARATE_ZVAL_IF_NOT_REF(container); } - if (opline->extended_value == ZEND_UNSET_DIM) { - switch (Z_TYPE_PP(container)) { - case IS_ARRAY: { - HashTable *ht = Z_ARRVAL_PP(container); - - switch (offset->type) { - case IS_DOUBLE: - case IS_RESOURCE: - case IS_BOOL: - case IS_LONG: - if (offset->type == IS_DOUBLE) { - index = (long) offset->value.dval; - } else { - index = offset->value.lval; - } + switch (Z_TYPE_PP(container)) { + case IS_ARRAY: { + HashTable *ht = Z_ARRVAL_PP(container); + + switch (offset->type) { + case IS_DOUBLE: + case IS_RESOURCE: + case IS_BOOL: + case IS_LONG: + if (offset->type == IS_DOUBLE) { + index = (long) offset->value.dval; + } else { + index = offset->value.lval; + } - zend_hash_index_del(ht, index); - break; - case IS_STRING: - if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && - ht == &EG(symbol_table)) { - zend_execute_data *ex; - ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); - - for (ex = execute_data; ex; ex = ex->prev_execute_data) { - if (ex->symbol_table == ht) { - int i; - - for (i = 0; i < ex->op_array->last_var; i++) { - if (ex->op_array->vars[i].hash_value == hash_value && - ex->op_array->vars[i].name_len == offset->value.str.len && - !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { - ex->CVs[i] = NULL; - break; - } + zend_hash_index_del(ht, index); + break; + case IS_STRING: + if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && + ht == &EG(symbol_table)) { + zend_execute_data *ex; + ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); + + for (ex = execute_data; ex; ex = ex->prev_execute_data) { + if (ex->symbol_table == ht) { + int i; + + for (i = 0; i < ex->op_array->last_var; i++) { + if (ex->op_array->vars[i].hash_value == hash_value && + ex->op_array->vars[i].name_len == offset->value.str.len && + !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { + ex->CVs[i] = NULL; + break; } } } } - break; - case IS_NULL: - zend_hash_del(ht, "", sizeof("")); - break; - default: - zend_error(E_WARNING, "Illegal offset type in unset"); - break; - } - - break; + } + break; + case IS_NULL: + zend_hash_del(ht, "", sizeof("")); + break; + default: + zend_error(E_WARNING, "Illegal offset type in unset"); + break; } - case IS_OBJECT: - if (!Z_OBJ_HT_P(*container)->unset_dimension) { - zend_error_noreturn(E_ERROR, "Cannot use object as array"); - } - if (0) { - MAKE_REAL_ZVAL_PTR(offset); - } - Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); - if (0) { - zval_ptr_dtor(&offset); - } else { - - } - break; - case IS_STRING: - zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); - ZEND_VM_CONTINUE(); /* bailed out before */ - default: - break; + break; } - } else { /* ZEND_UNSET_OBJ */ - if (Z_TYPE_PP(container) == IS_OBJECT) { + case IS_OBJECT: + if (!Z_OBJ_HT_P(*container)->unset_dimension) { + zend_error_noreturn(E_ERROR, "Cannot use object as array"); + } if (0) { MAKE_REAL_ZVAL_PTR(offset); } - Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); if (0) { zval_ptr_dtor(&offset); } else { } + break; + case IS_STRING: + zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); + ZEND_VM_CONTINUE(); /* bailed out before */ + default: + + break; + } + } else { + + } + + ZEND_VM_NEXT_OPCODE(); +} + +static int ZEND_UNSET_OBJ_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +{ + zend_op *opline = EX(opline); + + zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_UNSET TSRMLS_CC); + zval *offset = &opline->op2.u.constant; + long index; + + if (container) { + if (IS_CV == IS_CV && container != &EG(uninitialized_zval_ptr)) { + SEPARATE_ZVAL_IF_NOT_REF(container); + } + if (Z_TYPE_PP(container) == IS_OBJECT) { + if (0) { + MAKE_REAL_ZVAL_PTR(offset); + } + Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + if (0) { + zval_ptr_dtor(&offset); + } else { + } + } else { + } } else { - /* overloaded element */ } @@ -22017,7 +22165,7 @@ return ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } -static int ZEND_UNSET_DIM_OBJ_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +static int ZEND_UNSET_DIM_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; @@ -22026,96 +22174,112 @@ long index; if (container) { - if (IS_CV == IS_CV && container != &EG(uninitialized_zval_ptr)) { SEPARATE_ZVAL_IF_NOT_REF(container); } - if (opline->extended_value == ZEND_UNSET_DIM) { - switch (Z_TYPE_PP(container)) { - case IS_ARRAY: { - HashTable *ht = Z_ARRVAL_PP(container); - - switch (offset->type) { - case IS_DOUBLE: - case IS_RESOURCE: - case IS_BOOL: - case IS_LONG: - if (offset->type == IS_DOUBLE) { - index = (long) offset->value.dval; - } else { - index = offset->value.lval; - } + switch (Z_TYPE_PP(container)) { + case IS_ARRAY: { + HashTable *ht = Z_ARRVAL_PP(container); + + switch (offset->type) { + case IS_DOUBLE: + case IS_RESOURCE: + case IS_BOOL: + case IS_LONG: + if (offset->type == IS_DOUBLE) { + index = (long) offset->value.dval; + } else { + index = offset->value.lval; + } - zend_hash_index_del(ht, index); - break; - case IS_STRING: - if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && - ht == &EG(symbol_table)) { - zend_execute_data *ex; - ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); - - for (ex = execute_data; ex; ex = ex->prev_execute_data) { - if (ex->symbol_table == ht) { - int i; - - for (i = 0; i < ex->op_array->last_var; i++) { - if (ex->op_array->vars[i].hash_value == hash_value && - ex->op_array->vars[i].name_len == offset->value.str.len && - !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { - ex->CVs[i] = NULL; - break; - } + zend_hash_index_del(ht, index); + break; + case IS_STRING: + if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && + ht == &EG(symbol_table)) { + zend_execute_data *ex; + ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); + + for (ex = execute_data; ex; ex = ex->prev_execute_data) { + if (ex->symbol_table == ht) { + int i; + + for (i = 0; i < ex->op_array->last_var; i++) { + if (ex->op_array->vars[i].hash_value == hash_value && + ex->op_array->vars[i].name_len == offset->value.str.len && + !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { + ex->CVs[i] = NULL; + break; } } } } - break; - case IS_NULL: - zend_hash_del(ht, "", sizeof("")); - break; - default: - zend_error(E_WARNING, "Illegal offset type in unset"); - break; - } - zval_dtor(free_op2.var); - break; + } + break; + case IS_NULL: + zend_hash_del(ht, "", sizeof("")); + break; + default: + zend_error(E_WARNING, "Illegal offset type in unset"); + break; } - case IS_OBJECT: - if (!Z_OBJ_HT_P(*container)->unset_dimension) { - zend_error_noreturn(E_ERROR, "Cannot use object as array"); - } - if (1) { - MAKE_REAL_ZVAL_PTR(offset); - } - Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); - if (1) { - zval_ptr_dtor(&offset); - } else { - zval_dtor(free_op2.var); - } - break; - case IS_STRING: - zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); - ZEND_VM_CONTINUE(); /* bailed out before */ - default: - zval_dtor(free_op2.var); - break; + zval_dtor(free_op2.var); + break; } - } else { /* ZEND_UNSET_OBJ */ - if (Z_TYPE_PP(container) == IS_OBJECT) { + case IS_OBJECT: + if (!Z_OBJ_HT_P(*container)->unset_dimension) { + zend_error_noreturn(E_ERROR, "Cannot use object as array"); + } if (1) { MAKE_REAL_ZVAL_PTR(offset); } - Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); if (1) { zval_ptr_dtor(&offset); } else { zval_dtor(free_op2.var); } + break; + case IS_STRING: + zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); + ZEND_VM_CONTINUE(); /* bailed out before */ + default: + zval_dtor(free_op2.var); + break; + } + } else { + zval_dtor(free_op2.var); + } + + ZEND_VM_NEXT_OPCODE(); +} + +static int ZEND_UNSET_OBJ_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +{ + zend_op *opline = EX(opline); + zend_free_op free_op2; + zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_UNSET TSRMLS_CC); + zval *offset = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC); + long index; + + if (container) { + if (IS_CV == IS_CV && container != &EG(uninitialized_zval_ptr)) { + SEPARATE_ZVAL_IF_NOT_REF(container); + } + if (Z_TYPE_PP(container) == IS_OBJECT) { + if (1) { + MAKE_REAL_ZVAL_PTR(offset); + } + Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + if (1) { + zval_ptr_dtor(&offset); + } else { + zval_dtor(free_op2.var); } + } else { + zval_dtor(free_op2.var); } } else { - /* overloaded element */ zval_dtor(free_op2.var); } @@ -23445,7 +23609,7 @@ return ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } -static int ZEND_UNSET_DIM_OBJ_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +static int ZEND_UNSET_DIM_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; @@ -23454,96 +23618,112 @@ long index; if (container) { - if (IS_CV == IS_CV && container != &EG(uninitialized_zval_ptr)) { SEPARATE_ZVAL_IF_NOT_REF(container); } - if (opline->extended_value == ZEND_UNSET_DIM) { - switch (Z_TYPE_PP(container)) { - case IS_ARRAY: { - HashTable *ht = Z_ARRVAL_PP(container); - - switch (offset->type) { - case IS_DOUBLE: - case IS_RESOURCE: - case IS_BOOL: - case IS_LONG: - if (offset->type == IS_DOUBLE) { - index = (long) offset->value.dval; - } else { - index = offset->value.lval; - } + switch (Z_TYPE_PP(container)) { + case IS_ARRAY: { + HashTable *ht = Z_ARRVAL_PP(container); + + switch (offset->type) { + case IS_DOUBLE: + case IS_RESOURCE: + case IS_BOOL: + case IS_LONG: + if (offset->type == IS_DOUBLE) { + index = (long) offset->value.dval; + } else { + index = offset->value.lval; + } - zend_hash_index_del(ht, index); - break; - case IS_STRING: - if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && - ht == &EG(symbol_table)) { - zend_execute_data *ex; - ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); - - for (ex = execute_data; ex; ex = ex->prev_execute_data) { - if (ex->symbol_table == ht) { - int i; - - for (i = 0; i < ex->op_array->last_var; i++) { - if (ex->op_array->vars[i].hash_value == hash_value && - ex->op_array->vars[i].name_len == offset->value.str.len && - !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { - ex->CVs[i] = NULL; - break; - } + zend_hash_index_del(ht, index); + break; + case IS_STRING: + if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && + ht == &EG(symbol_table)) { + zend_execute_data *ex; + ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); + + for (ex = execute_data; ex; ex = ex->prev_execute_data) { + if (ex->symbol_table == ht) { + int i; + + for (i = 0; i < ex->op_array->last_var; i++) { + if (ex->op_array->vars[i].hash_value == hash_value && + ex->op_array->vars[i].name_len == offset->value.str.len && + !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { + ex->CVs[i] = NULL; + break; } } } } - break; - case IS_NULL: - zend_hash_del(ht, "", sizeof("")); - break; - default: - zend_error(E_WARNING, "Illegal offset type in unset"); - break; - } - if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; - break; + } + break; + case IS_NULL: + zend_hash_del(ht, "", sizeof("")); + break; + default: + zend_error(E_WARNING, "Illegal offset type in unset"); + break; } - case IS_OBJECT: - if (!Z_OBJ_HT_P(*container)->unset_dimension) { - zend_error_noreturn(E_ERROR, "Cannot use object as array"); - } - if (0) { - MAKE_REAL_ZVAL_PTR(offset); - } - Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); - if (0) { - zval_ptr_dtor(&offset); - } else { - if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; - } - break; - case IS_STRING: - zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); - ZEND_VM_CONTINUE(); /* bailed out before */ - default: - if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; - break; + if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; + break; } - } else { /* ZEND_UNSET_OBJ */ - if (Z_TYPE_PP(container) == IS_OBJECT) { + case IS_OBJECT: + if (!Z_OBJ_HT_P(*container)->unset_dimension) { + zend_error_noreturn(E_ERROR, "Cannot use object as array"); + } if (0) { MAKE_REAL_ZVAL_PTR(offset); } - Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); if (0) { zval_ptr_dtor(&offset); } else { if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; } + break; + case IS_STRING: + zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); + ZEND_VM_CONTINUE(); /* bailed out before */ + default: + if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; + break; + } + } else { + if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; + } + + ZEND_VM_NEXT_OPCODE(); +} + +static int ZEND_UNSET_OBJ_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +{ + zend_op *opline = EX(opline); + zend_free_op free_op2; + zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_UNSET TSRMLS_CC); + zval *offset = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC); + long index; + + if (container) { + if (IS_CV == IS_CV && container != &EG(uninitialized_zval_ptr)) { + SEPARATE_ZVAL_IF_NOT_REF(container); + } + if (Z_TYPE_PP(container) == IS_OBJECT) { + if (0) { + MAKE_REAL_ZVAL_PTR(offset); } + Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + if (0) { + zval_ptr_dtor(&offset); + } else { + if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; + } + } else { + if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; } } else { - /* overloaded element */ if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; } @@ -25244,7 +25424,7 @@ return ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } -static int ZEND_UNSET_DIM_OBJ_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +static int ZEND_UNSET_DIM_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); @@ -25253,96 +25433,112 @@ long index; if (container) { - if (IS_CV == IS_CV && container != &EG(uninitialized_zval_ptr)) { SEPARATE_ZVAL_IF_NOT_REF(container); } - if (opline->extended_value == ZEND_UNSET_DIM) { - switch (Z_TYPE_PP(container)) { - case IS_ARRAY: { - HashTable *ht = Z_ARRVAL_PP(container); - - switch (offset->type) { - case IS_DOUBLE: - case IS_RESOURCE: - case IS_BOOL: - case IS_LONG: - if (offset->type == IS_DOUBLE) { - index = (long) offset->value.dval; - } else { - index = offset->value.lval; - } + switch (Z_TYPE_PP(container)) { + case IS_ARRAY: { + HashTable *ht = Z_ARRVAL_PP(container); + + switch (offset->type) { + case IS_DOUBLE: + case IS_RESOURCE: + case IS_BOOL: + case IS_LONG: + if (offset->type == IS_DOUBLE) { + index = (long) offset->value.dval; + } else { + index = offset->value.lval; + } - zend_hash_index_del(ht, index); - break; - case IS_STRING: - if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && - ht == &EG(symbol_table)) { - zend_execute_data *ex; - ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); - - for (ex = execute_data; ex; ex = ex->prev_execute_data) { - if (ex->symbol_table == ht) { - int i; - - for (i = 0; i < ex->op_array->last_var; i++) { - if (ex->op_array->vars[i].hash_value == hash_value && - ex->op_array->vars[i].name_len == offset->value.str.len && - !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { - ex->CVs[i] = NULL; - break; - } + zend_hash_index_del(ht, index); + break; + case IS_STRING: + if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && + ht == &EG(symbol_table)) { + zend_execute_data *ex; + ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); + + for (ex = execute_data; ex; ex = ex->prev_execute_data) { + if (ex->symbol_table == ht) { + int i; + + for (i = 0; i < ex->op_array->last_var; i++) { + if (ex->op_array->vars[i].hash_value == hash_value && + ex->op_array->vars[i].name_len == offset->value.str.len && + !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { + ex->CVs[i] = NULL; + break; } } } } - break; - case IS_NULL: - zend_hash_del(ht, "", sizeof("")); - break; - default: - zend_error(E_WARNING, "Illegal offset type in unset"); - break; - } - - break; + } + break; + case IS_NULL: + zend_hash_del(ht, "", sizeof("")); + break; + default: + zend_error(E_WARNING, "Illegal offset type in unset"); + break; } - case IS_OBJECT: - if (!Z_OBJ_HT_P(*container)->unset_dimension) { - zend_error_noreturn(E_ERROR, "Cannot use object as array"); - } - if (0) { - MAKE_REAL_ZVAL_PTR(offset); - } - Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); - if (0) { - zval_ptr_dtor(&offset); - } else { - - } - break; - case IS_STRING: - zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); - ZEND_VM_CONTINUE(); /* bailed out before */ - default: - break; + break; } - } else { /* ZEND_UNSET_OBJ */ - if (Z_TYPE_PP(container) == IS_OBJECT) { + case IS_OBJECT: + if (!Z_OBJ_HT_P(*container)->unset_dimension) { + zend_error_noreturn(E_ERROR, "Cannot use object as array"); + } if (0) { MAKE_REAL_ZVAL_PTR(offset); } - Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); if (0) { zval_ptr_dtor(&offset); } else { } + break; + case IS_STRING: + zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); + ZEND_VM_CONTINUE(); /* bailed out before */ + default: + + break; + } + } else { + + } + + ZEND_VM_NEXT_OPCODE(); +} + +static int ZEND_UNSET_OBJ_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +{ + zend_op *opline = EX(opline); + + zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_UNSET TSRMLS_CC); + zval *offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); + long index; + + if (container) { + if (IS_CV == IS_CV && container != &EG(uninitialized_zval_ptr)) { + SEPARATE_ZVAL_IF_NOT_REF(container); + } + if (Z_TYPE_PP(container) == IS_OBJECT) { + if (0) { + MAKE_REAL_ZVAL_PTR(offset); + } + Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); + if (0) { + zval_ptr_dtor(&offset); + } else { + } + } else { + } } else { - /* overloaded element */ } @@ -27377,33 +27573,21 @@ ZEND_NULL_HANDLER, ZEND_NULL_HANDLER, ZEND_NULL_HANDLER, - ZEND_UNSET_DIM_OBJ_SPEC_VAR_CONST_HANDLER, - ZEND_UNSET_DIM_OBJ_SPEC_VAR_TMP_HANDLER, - ZEND_UNSET_DIM_OBJ_SPEC_VAR_VAR_HANDLER, - ZEND_NULL_HANDLER, - ZEND_UNSET_DIM_OBJ_SPEC_VAR_CV_HANDLER, - ZEND_UNSET_DIM_OBJ_SPEC_UNUSED_CONST_HANDLER, - ZEND_UNSET_DIM_OBJ_SPEC_UNUSED_TMP_HANDLER, - ZEND_UNSET_DIM_OBJ_SPEC_UNUSED_VAR_HANDLER, - ZEND_NULL_HANDLER, - ZEND_UNSET_DIM_OBJ_SPEC_UNUSED_CV_HANDLER, - ZEND_UNSET_DIM_OBJ_SPEC_CV_CONST_HANDLER, - ZEND_UNSET_DIM_OBJ_SPEC_CV_TMP_HANDLER, - ZEND_UNSET_DIM_OBJ_SPEC_CV_VAR_HANDLER, - ZEND_NULL_HANDLER, - ZEND_UNSET_DIM_OBJ_SPEC_CV_CV_HANDLER, - ZEND_NULL_HANDLER, - ZEND_NULL_HANDLER, - ZEND_NULL_HANDLER, - ZEND_NULL_HANDLER, - ZEND_NULL_HANDLER, - ZEND_NULL_HANDLER, - ZEND_NULL_HANDLER, - ZEND_NULL_HANDLER, - ZEND_NULL_HANDLER, + ZEND_UNSET_DIM_SPEC_VAR_CONST_HANDLER, + ZEND_UNSET_DIM_SPEC_VAR_TMP_HANDLER, + ZEND_UNSET_DIM_SPEC_VAR_VAR_HANDLER, ZEND_NULL_HANDLER, + ZEND_UNSET_DIM_SPEC_VAR_CV_HANDLER, + ZEND_UNSET_DIM_SPEC_UNUSED_CONST_HANDLER, + ZEND_UNSET_DIM_SPEC_UNUSED_TMP_HANDLER, + ZEND_UNSET_DIM_SPEC_UNUSED_VAR_HANDLER, ZEND_NULL_HANDLER, + ZEND_UNSET_DIM_SPEC_UNUSED_CV_HANDLER, + ZEND_UNSET_DIM_SPEC_CV_CONST_HANDLER, + ZEND_UNSET_DIM_SPEC_CV_TMP_HANDLER, + ZEND_UNSET_DIM_SPEC_CV_VAR_HANDLER, ZEND_NULL_HANDLER, + ZEND_UNSET_DIM_SPEC_CV_CV_HANDLER, ZEND_NULL_HANDLER, ZEND_NULL_HANDLER, ZEND_NULL_HANDLER, @@ -27414,9 +27598,21 @@ ZEND_NULL_HANDLER, ZEND_NULL_HANDLER, ZEND_NULL_HANDLER, + ZEND_UNSET_OBJ_SPEC_VAR_CONST_HANDLER, + ZEND_UNSET_OBJ_SPEC_VAR_TMP_HANDLER, + ZEND_UNSET_OBJ_SPEC_VAR_VAR_HANDLER, ZEND_NULL_HANDLER, + ZEND_UNSET_OBJ_SPEC_VAR_CV_HANDLER, + ZEND_UNSET_OBJ_SPEC_UNUSED_CONST_HANDLER, + ZEND_UNSET_OBJ_SPEC_UNUSED_TMP_HANDLER, + ZEND_UNSET_OBJ_SPEC_UNUSED_VAR_HANDLER, ZEND_NULL_HANDLER, + ZEND_UNSET_OBJ_SPEC_UNUSED_CV_HANDLER, + ZEND_UNSET_OBJ_SPEC_CV_CONST_HANDLER, + ZEND_UNSET_OBJ_SPEC_CV_TMP_HANDLER, + ZEND_UNSET_OBJ_SPEC_CV_VAR_HANDLER, ZEND_NULL_HANDLER, + ZEND_UNSET_OBJ_SPEC_CV_CV_HANDLER, ZEND_FE_RESET_SPEC_CONST_HANDLER, ZEND_FE_RESET_SPEC_CONST_HANDLER, ZEND_FE_RESET_SPEC_CONST_HANDLER, http://cvs.php.net/diff.php/ZendEngine2/zend_vm_opcodes.h?r1=1.26&r2=1.27&ty=u Index: ZendEngine2/zend_vm_opcodes.h diff -u ZendEngine2/zend_vm_opcodes.h:1.26 ZendEngine2/zend_vm_opcodes.h:1.27 --- ZendEngine2/zend_vm_opcodes.h:1.26 Thu Jun 16 02:00:48 2005 +++ ZendEngine2/zend_vm_opcodes.h Thu Jun 16 08:17:39 2005 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_vm_opcodes.h,v 1.26 2005/06/16 06:00:48 dmitry Exp $ */ +/* $Id: zend_vm_opcodes.h,v 1.27 2005/06/16 12:17:39 dmitry Exp $ */ #define ZEND_NOP 0 #define ZEND_ADD 1 @@ -92,7 +92,8 @@ #define ZEND_ADD_ARRAY_ELEMENT 72 #define ZEND_INCLUDE_OR_EVAL 73 #define ZEND_UNSET_VAR 74 -#define ZEND_UNSET_DIM_OBJ 75 +#define ZEND_UNSET_DIM 75 +#define ZEND_UNSET_OBJ 76 #define ZEND_FE_RESET 77 #define ZEND_FE_FETCH 78 #define ZEND_EXIT 79