arg_num = ZEND_CALL_NUM_ARGS(EX(call)) + 1;
ZEND_VM_C_LABEL(send_again):
- switch (Z_TYPE_P(args)) {
- case IS_ARRAY: {
- HashTable *ht = Z_ARRVAL_P(args);
- zval *arg, *top;
- zend_string *name;
-
- zend_vm_stack_extend_call_frame(&EX(call), arg_num - 1, zend_hash_num_elements(ht));
-
- if (OP1_TYPE != IS_CONST && OP1_TYPE != IS_TMP_VAR && Z_IMMUTABLE_P(args)) {
- uint32_t i;
- int separate = 0;
-
- /* check if any of arguments are going to be passed by reference */
- for (i = 0; i < zend_hash_num_elements(ht); i++) {
- if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, arg_num + i)) {
- separate = 1;
- break;
- }
- }
- if (separate) {
- zval_copy_ctor(args);
- ht = Z_ARRVAL_P(args);
+ if (EXPECTED(Z_TYPE_P(args) == IS_ARRAY)) {
+ HashTable *ht = Z_ARRVAL_P(args);
+ zval *arg, *top;
+ zend_string *name;
+
+ zend_vm_stack_extend_call_frame(&EX(call), arg_num - 1, zend_hash_num_elements(ht));
+
+ if (OP1_TYPE != IS_CONST && OP1_TYPE != IS_TMP_VAR && Z_IMMUTABLE_P(args)) {
+ uint32_t i;
+ int separate = 0;
+
+ /* check if any of arguments are going to be passed by reference */
+ for (i = 0; i < zend_hash_num_elements(ht); i++) {
+ if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, arg_num + i)) {
+ separate = 1;
+ break;
}
}
+ if (separate) {
+ zval_copy_ctor(args);
+ ht = Z_ARRVAL_P(args);
+ }
+ }
- ZEND_HASH_FOREACH_STR_KEY_VAL(ht, name, arg) {
- if (name) {
- zend_error(E_EXCEPTION | E_ERROR, "Cannot unpack array with string keys");
- FREE_OP1();
- HANDLE_EXCEPTION();
- }
+ ZEND_HASH_FOREACH_STR_KEY_VAL(ht, name, arg) {
+ if (name) {
+ zend_error(E_EXCEPTION | E_ERROR, "Cannot unpack array with string keys");
+ FREE_OP1();
+ HANDLE_EXCEPTION();
+ }
- top = ZEND_CALL_ARG(EX(call), arg_num);
- if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, arg_num)) {
- if (!Z_IMMUTABLE_P(args)) {
- ZVAL_MAKE_REF(arg);
- Z_ADDREF_P(arg);
- ZVAL_REF(top, Z_REF_P(arg));
- } else {
- ZVAL_DUP(top, arg);
- }
- } else if (Z_ISREF_P(arg)) {
- ZVAL_COPY(top, Z_REFVAL_P(arg));
+ top = ZEND_CALL_ARG(EX(call), arg_num);
+ if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, arg_num)) {
+ if (!Z_IMMUTABLE_P(args)) {
+ ZVAL_MAKE_REF(arg);
+ Z_ADDREF_P(arg);
+ ZVAL_REF(top, Z_REF_P(arg));
} else {
- ZVAL_COPY(top, arg);
+ ZVAL_DUP(top, arg);
}
+ } else if (Z_ISREF_P(arg)) {
+ ZVAL_COPY(top, Z_REFVAL_P(arg));
+ } else {
+ ZVAL_COPY(top, arg);
+ }
- ZEND_CALL_NUM_ARGS(EX(call))++;
- arg_num++;
- } ZEND_HASH_FOREACH_END();
+ ZEND_CALL_NUM_ARGS(EX(call))++;
+ arg_num++;
+ } ZEND_HASH_FOREACH_END();
- break;
- }
- case IS_OBJECT: {
- zend_class_entry *ce = Z_OBJCE_P(args);
- zend_object_iterator *iter;
+ } else if (EXPECTED(Z_TYPE_P(args) == IS_OBJECT)) {
+ zend_class_entry *ce = Z_OBJCE_P(args);
+ zend_object_iterator *iter;
- if (!ce || !ce->get_iterator) {
- zend_error(E_WARNING, "Only arrays and Traversables can be unpacked");
- break;
- }
+ if (!ce || !ce->get_iterator) {
+ zend_error(E_WARNING, "Only arrays and Traversables can be unpacked");
+ } else {
iter = ce->get_iterator(ce, args, 0);
if (UNEXPECTED(!iter)) {
ZEND_VM_C_LABEL(unpack_iter_dtor):
zend_iterator_dtor(iter);
- break;
}
- case IS_REFERENCE:
- args = Z_REFVAL_P(args);
- ZEND_VM_C_GOTO(send_again);
- break;
- default:
- zend_error(E_WARNING, "Only arrays and Traversables can be unpacked");
+ } else if (EXPECTED(Z_ISREF_P(args))) {
+ args = Z_REFVAL_P(args);
+ ZEND_VM_C_GOTO(send_again);
+ } else {
+ zend_error(E_WARNING, "Only arrays and Traversables can be unpacked");
}
FREE_OP1();
zval *container;
zval *offset;
zend_ulong hval;
+ zend_string *key;
SAVE_OPLINE();
container = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_UNSET);
ZEND_VM_C_LABEL(offset_again):
SEPARATE_ARRAY(container);
ht = Z_ARRVAL_P(container);
- switch (Z_TYPE_P(offset)) {
- case IS_DOUBLE:
- hval = zend_dval_to_lval(Z_DVAL_P(offset));
- zend_hash_index_del(ht, hval);
- break;
- case IS_LONG:
- hval = Z_LVAL_P(offset);
-ZEND_VM_C_LABEL(num_index_dim):
- zend_hash_index_del(ht, hval);
- break;
- case IS_STRING:
- if (OP2_TYPE != IS_CONST) {
- if (ZEND_HANDLE_NUMERIC(Z_STR_P(offset), hval)) {
- ZEND_VM_C_GOTO(num_index_dim);
- }
- }
- if (ht == &EG(symbol_table)) {
- zend_delete_global_variable(Z_STR_P(offset));
- } else {
- zend_hash_del(ht, Z_STR_P(offset));
+ if (EXPECTED(Z_TYPE_P(offset) == IS_STRING)) {
+ key = Z_STR_P(offset);
+ if (OP2_TYPE != IS_CONST) {
+ if (ZEND_HANDLE_NUMERIC(key, hval)) {
+ ZEND_VM_C_GOTO(num_index_dim);
}
- break;
- case IS_NULL:
- zend_hash_del(ht, STR_EMPTY_ALLOC());
- break;
- case IS_FALSE:
- hval = 0;
- ZEND_VM_C_GOTO(num_index_dim);
- case IS_TRUE:
- hval = 1;
- ZEND_VM_C_GOTO(num_index_dim);
- case IS_RESOURCE:
- hval = Z_RES_HANDLE_P(offset);
- ZEND_VM_C_GOTO(num_index_dim);
- case IS_REFERENCE:
- offset = Z_REFVAL_P(offset);
- ZEND_VM_C_GOTO(offset_again);
- break;
- default:
- zend_error(E_WARNING, "Illegal offset type in unset");
- break;
+ }
+ZEND_VM_C_LABEL(str_index_dim):
+ if (ht == &EG(symbol_table)) {
+ zend_delete_global_variable(key);
+ } else {
+ zend_hash_del(ht, key);
+ }
+ } else if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
+ hval = Z_LVAL_P(offset);
+ZEND_VM_C_LABEL(num_index_dim):
+ zend_hash_index_del(ht, hval);
+ } else if ((OP2_TYPE & (IS_VAR|IS_CV)) && EXPECTED(Z_TYPE_P(offset) == IS_REFERENCE)) {
+ offset = Z_REFVAL_P(offset);
+ ZEND_VM_C_GOTO(offset_again);
+ } else if (Z_TYPE_P(offset) == IS_DOUBLE) {
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ ZEND_VM_C_GOTO(num_index_dim);
+ } else if (Z_TYPE_P(offset) == IS_NULL) {
+ key = STR_EMPTY_ALLOC();
+ ZEND_VM_C_GOTO(str_index_dim);
+ } else if (Z_TYPE_P(offset) == IS_FALSE) {
+ hval = 0;
+ ZEND_VM_C_GOTO(num_index_dim);
+ } else if (Z_TYPE_P(offset) == IS_TRUE) {
+ hval = 1;
+ ZEND_VM_C_GOTO(num_index_dim);
+ } else if (Z_TYPE_P(offset) == IS_RESOURCE) {
+ hval = Z_RES_HANDLE_P(offset);
+ ZEND_VM_C_GOTO(num_index_dim);
+ } else {
+ zend_error(E_WARNING, "Illegal offset type in unset");
}
} else if (OP1_TYPE == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
if (UNEXPECTED(Z_OBJ_HT_P(container)->unset_dimension == NULL)) {
hval = Z_LVAL_P(offset);
ZEND_VM_C_LABEL(num_index_prop):
value = zend_hash_index_find(ht, hval);
+ } else if ((OP2_TYPE & (IS_VAR|IS_CV)) && EXPECTED(Z_ISREF_P(offset))) {
+ offset = Z_REFVAL_P(offset);
+ ZEND_VM_C_GOTO(isset_again);
+ } else if (Z_TYPE_P(offset) == IS_DOUBLE) {
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ ZEND_VM_C_GOTO(num_index_prop);
+ } else if (Z_TYPE_P(offset) == IS_NULL) {
+ str = STR_EMPTY_ALLOC();
+ ZEND_VM_C_GOTO(str_index_prop);
+ } else if (Z_TYPE_P(offset) == IS_FALSE) {
+ hval = 0;
+ ZEND_VM_C_GOTO(num_index_prop);
+ } else if (Z_TYPE_P(offset) == IS_TRUE) {
+ hval = 1;
+ ZEND_VM_C_GOTO(num_index_prop);
+ } else if (Z_TYPE_P(offset) == IS_RESOURCE) {
+ hval = Z_RES_HANDLE_P(offset);
+ ZEND_VM_C_GOTO(num_index_prop);
} else {
- switch (Z_TYPE_P(offset)) {
- case IS_DOUBLE:
- hval = zend_dval_to_lval(Z_DVAL_P(offset));
- ZEND_VM_C_GOTO(num_index_prop);
- case IS_NULL:
- str = STR_EMPTY_ALLOC();
- ZEND_VM_C_GOTO(str_index_prop);
- case IS_FALSE:
- hval = 0;
- ZEND_VM_C_GOTO(num_index_prop);
- case IS_TRUE:
- hval = 1;
- ZEND_VM_C_GOTO(num_index_prop);
- case IS_RESOURCE:
- hval = Z_RES_HANDLE_P(offset);
- ZEND_VM_C_GOTO(num_index_prop);
- case IS_REFERENCE:
- offset = Z_REFVAL_P(offset);
- ZEND_VM_C_GOTO(isset_again);
- default:
- zend_error(E_WARNING, "Illegal offset type in isset or empty");
- ZEND_VM_C_GOTO(isset_not_found);
- }
+ zend_error(E_WARNING, "Illegal offset type in isset or empty");
+ ZEND_VM_C_GOTO(isset_not_found);
}
if (opline->extended_value & ZEND_ISSET) {
arg_num = ZEND_CALL_NUM_ARGS(EX(call)) + 1;
send_again:
- switch (Z_TYPE_P(args)) {
- case IS_ARRAY: {
- HashTable *ht = Z_ARRVAL_P(args);
- zval *arg, *top;
- zend_string *name;
-
- zend_vm_stack_extend_call_frame(&EX(call), arg_num - 1, zend_hash_num_elements(ht));
-
- if (opline->op1_type != IS_CONST && opline->op1_type != IS_TMP_VAR && Z_IMMUTABLE_P(args)) {
- uint32_t i;
- int separate = 0;
-
- /* check if any of arguments are going to be passed by reference */
- for (i = 0; i < zend_hash_num_elements(ht); i++) {
- if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, arg_num + i)) {
- separate = 1;
- break;
- }
- }
- if (separate) {
- zval_copy_ctor(args);
- ht = Z_ARRVAL_P(args);
+ if (EXPECTED(Z_TYPE_P(args) == IS_ARRAY)) {
+ HashTable *ht = Z_ARRVAL_P(args);
+ zval *arg, *top;
+ zend_string *name;
+
+ zend_vm_stack_extend_call_frame(&EX(call), arg_num - 1, zend_hash_num_elements(ht));
+
+ if (opline->op1_type != IS_CONST && opline->op1_type != IS_TMP_VAR && Z_IMMUTABLE_P(args)) {
+ uint32_t i;
+ int separate = 0;
+
+ /* check if any of arguments are going to be passed by reference */
+ for (i = 0; i < zend_hash_num_elements(ht); i++) {
+ if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, arg_num + i)) {
+ separate = 1;
+ break;
}
}
+ if (separate) {
+ zval_copy_ctor(args);
+ ht = Z_ARRVAL_P(args);
+ }
+ }
- ZEND_HASH_FOREACH_STR_KEY_VAL(ht, name, arg) {
- if (name) {
- zend_error(E_EXCEPTION | E_ERROR, "Cannot unpack array with string keys");
- FREE_OP(free_op1);
- HANDLE_EXCEPTION();
- }
+ ZEND_HASH_FOREACH_STR_KEY_VAL(ht, name, arg) {
+ if (name) {
+ zend_error(E_EXCEPTION | E_ERROR, "Cannot unpack array with string keys");
+ FREE_OP(free_op1);
+ HANDLE_EXCEPTION();
+ }
- top = ZEND_CALL_ARG(EX(call), arg_num);
- if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, arg_num)) {
- if (!Z_IMMUTABLE_P(args)) {
- ZVAL_MAKE_REF(arg);
- Z_ADDREF_P(arg);
- ZVAL_REF(top, Z_REF_P(arg));
- } else {
- ZVAL_DUP(top, arg);
- }
- } else if (Z_ISREF_P(arg)) {
- ZVAL_COPY(top, Z_REFVAL_P(arg));
+ top = ZEND_CALL_ARG(EX(call), arg_num);
+ if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, arg_num)) {
+ if (!Z_IMMUTABLE_P(args)) {
+ ZVAL_MAKE_REF(arg);
+ Z_ADDREF_P(arg);
+ ZVAL_REF(top, Z_REF_P(arg));
} else {
- ZVAL_COPY(top, arg);
+ ZVAL_DUP(top, arg);
}
+ } else if (Z_ISREF_P(arg)) {
+ ZVAL_COPY(top, Z_REFVAL_P(arg));
+ } else {
+ ZVAL_COPY(top, arg);
+ }
- ZEND_CALL_NUM_ARGS(EX(call))++;
- arg_num++;
- } ZEND_HASH_FOREACH_END();
+ ZEND_CALL_NUM_ARGS(EX(call))++;
+ arg_num++;
+ } ZEND_HASH_FOREACH_END();
- break;
- }
- case IS_OBJECT: {
- zend_class_entry *ce = Z_OBJCE_P(args);
- zend_object_iterator *iter;
+ } else if (EXPECTED(Z_TYPE_P(args) == IS_OBJECT)) {
+ zend_class_entry *ce = Z_OBJCE_P(args);
+ zend_object_iterator *iter;
- if (!ce || !ce->get_iterator) {
- zend_error(E_WARNING, "Only arrays and Traversables can be unpacked");
- break;
- }
+ if (!ce || !ce->get_iterator) {
+ zend_error(E_WARNING, "Only arrays and Traversables can be unpacked");
+ } else {
iter = ce->get_iterator(ce, args, 0);
if (UNEXPECTED(!iter)) {
unpack_iter_dtor:
zend_iterator_dtor(iter);
- break;
}
- case IS_REFERENCE:
- args = Z_REFVAL_P(args);
- goto send_again;
- break;
- default:
- zend_error(E_WARNING, "Only arrays and Traversables can be unpacked");
+ } else if (EXPECTED(Z_ISREF_P(args))) {
+ args = Z_REFVAL_P(args);
+ goto send_again;
+ } else {
+ zend_error(E_WARNING, "Only arrays and Traversables can be unpacked");
}
FREE_OP(free_op1);
hval = Z_LVAL_P(offset);
num_index_prop:
value = zend_hash_index_find(ht, hval);
+ } else if ((IS_CONST & (IS_VAR|IS_CV)) && EXPECTED(Z_ISREF_P(offset))) {
+ offset = Z_REFVAL_P(offset);
+ goto isset_again;
+ } else if (Z_TYPE_P(offset) == IS_DOUBLE) {
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_NULL) {
+ str = STR_EMPTY_ALLOC();
+ goto str_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_FALSE) {
+ hval = 0;
+ goto num_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_TRUE) {
+ hval = 1;
+ goto num_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_RESOURCE) {
+ hval = Z_RES_HANDLE_P(offset);
+ goto num_index_prop;
} else {
- switch (Z_TYPE_P(offset)) {
- case IS_DOUBLE:
- hval = zend_dval_to_lval(Z_DVAL_P(offset));
- goto num_index_prop;
- case IS_NULL:
- str = STR_EMPTY_ALLOC();
- goto str_index_prop;
- case IS_FALSE:
- hval = 0;
- goto num_index_prop;
- case IS_TRUE:
- hval = 1;
- goto num_index_prop;
- case IS_RESOURCE:
- hval = Z_RES_HANDLE_P(offset);
- goto num_index_prop;
- case IS_REFERENCE:
- offset = Z_REFVAL_P(offset);
- goto isset_again;
- default:
- zend_error(E_WARNING, "Illegal offset type in isset or empty");
- goto isset_not_found;
- }
+ zend_error(E_WARNING, "Illegal offset type in isset or empty");
+ goto isset_not_found;
}
if (opline->extended_value & ZEND_ISSET) {
hval = Z_LVAL_P(offset);
num_index_prop:
value = zend_hash_index_find(ht, hval);
+ } else if ((IS_CV & (IS_VAR|IS_CV)) && EXPECTED(Z_ISREF_P(offset))) {
+ offset = Z_REFVAL_P(offset);
+ goto isset_again;
+ } else if (Z_TYPE_P(offset) == IS_DOUBLE) {
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_NULL) {
+ str = STR_EMPTY_ALLOC();
+ goto str_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_FALSE) {
+ hval = 0;
+ goto num_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_TRUE) {
+ hval = 1;
+ goto num_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_RESOURCE) {
+ hval = Z_RES_HANDLE_P(offset);
+ goto num_index_prop;
} else {
- switch (Z_TYPE_P(offset)) {
- case IS_DOUBLE:
- hval = zend_dval_to_lval(Z_DVAL_P(offset));
- goto num_index_prop;
- case IS_NULL:
- str = STR_EMPTY_ALLOC();
- goto str_index_prop;
- case IS_FALSE:
- hval = 0;
- goto num_index_prop;
- case IS_TRUE:
- hval = 1;
- goto num_index_prop;
- case IS_RESOURCE:
- hval = Z_RES_HANDLE_P(offset);
- goto num_index_prop;
- case IS_REFERENCE:
- offset = Z_REFVAL_P(offset);
- goto isset_again;
- default:
- zend_error(E_WARNING, "Illegal offset type in isset or empty");
- goto isset_not_found;
- }
+ zend_error(E_WARNING, "Illegal offset type in isset or empty");
+ goto isset_not_found;
}
if (opline->extended_value & ZEND_ISSET) {
hval = Z_LVAL_P(offset);
num_index_prop:
value = zend_hash_index_find(ht, hval);
+ } else if (((IS_TMP_VAR|IS_VAR) & (IS_VAR|IS_CV)) && EXPECTED(Z_ISREF_P(offset))) {
+ offset = Z_REFVAL_P(offset);
+ goto isset_again;
+ } else if (Z_TYPE_P(offset) == IS_DOUBLE) {
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_NULL) {
+ str = STR_EMPTY_ALLOC();
+ goto str_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_FALSE) {
+ hval = 0;
+ goto num_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_TRUE) {
+ hval = 1;
+ goto num_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_RESOURCE) {
+ hval = Z_RES_HANDLE_P(offset);
+ goto num_index_prop;
} else {
- switch (Z_TYPE_P(offset)) {
- case IS_DOUBLE:
- hval = zend_dval_to_lval(Z_DVAL_P(offset));
- goto num_index_prop;
- case IS_NULL:
- str = STR_EMPTY_ALLOC();
- goto str_index_prop;
- case IS_FALSE:
- hval = 0;
- goto num_index_prop;
- case IS_TRUE:
- hval = 1;
- goto num_index_prop;
- case IS_RESOURCE:
- hval = Z_RES_HANDLE_P(offset);
- goto num_index_prop;
- case IS_REFERENCE:
- offset = Z_REFVAL_P(offset);
- goto isset_again;
- default:
- zend_error(E_WARNING, "Illegal offset type in isset or empty");
- goto isset_not_found;
- }
+ zend_error(E_WARNING, "Illegal offset type in isset or empty");
+ goto isset_not_found;
}
if (opline->extended_value & ZEND_ISSET) {
zval *container;
zval *offset;
zend_ulong hval;
+ zend_string *key;
SAVE_OPLINE();
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
offset_again:
SEPARATE_ARRAY(container);
ht = Z_ARRVAL_P(container);
- switch (Z_TYPE_P(offset)) {
- case IS_DOUBLE:
- hval = zend_dval_to_lval(Z_DVAL_P(offset));
- zend_hash_index_del(ht, hval);
- break;
- case IS_LONG:
- hval = Z_LVAL_P(offset);
-num_index_dim:
- zend_hash_index_del(ht, hval);
- break;
- case IS_STRING:
- if (IS_CONST != IS_CONST) {
- if (ZEND_HANDLE_NUMERIC(Z_STR_P(offset), hval)) {
- goto num_index_dim;
- }
- }
- if (ht == &EG(symbol_table)) {
- zend_delete_global_variable(Z_STR_P(offset));
- } else {
- zend_hash_del(ht, Z_STR_P(offset));
+ if (EXPECTED(Z_TYPE_P(offset) == IS_STRING)) {
+ key = Z_STR_P(offset);
+ if (IS_CONST != IS_CONST) {
+ if (ZEND_HANDLE_NUMERIC(key, hval)) {
+ goto num_index_dim;
}
- break;
- case IS_NULL:
- zend_hash_del(ht, STR_EMPTY_ALLOC());
- break;
- case IS_FALSE:
- hval = 0;
- goto num_index_dim;
- case IS_TRUE:
- hval = 1;
- goto num_index_dim;
- case IS_RESOURCE:
- hval = Z_RES_HANDLE_P(offset);
- goto num_index_dim;
- case IS_REFERENCE:
- offset = Z_REFVAL_P(offset);
- goto offset_again;
- break;
- default:
- zend_error(E_WARNING, "Illegal offset type in unset");
- break;
+ }
+str_index_dim:
+ if (ht == &EG(symbol_table)) {
+ zend_delete_global_variable(key);
+ } else {
+ zend_hash_del(ht, key);
+ }
+ } else if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
+ hval = Z_LVAL_P(offset);
+num_index_dim:
+ zend_hash_index_del(ht, hval);
+ } else if ((IS_CONST & (IS_VAR|IS_CV)) && EXPECTED(Z_TYPE_P(offset) == IS_REFERENCE)) {
+ offset = Z_REFVAL_P(offset);
+ goto offset_again;
+ } else if (Z_TYPE_P(offset) == IS_DOUBLE) {
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_dim;
+ } else if (Z_TYPE_P(offset) == IS_NULL) {
+ key = STR_EMPTY_ALLOC();
+ goto str_index_dim;
+ } else if (Z_TYPE_P(offset) == IS_FALSE) {
+ hval = 0;
+ goto num_index_dim;
+ } else if (Z_TYPE_P(offset) == IS_TRUE) {
+ hval = 1;
+ goto num_index_dim;
+ } else if (Z_TYPE_P(offset) == IS_RESOURCE) {
+ hval = Z_RES_HANDLE_P(offset);
+ goto num_index_dim;
+ } else {
+ zend_error(E_WARNING, "Illegal offset type in unset");
}
} else if (IS_VAR == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
if (UNEXPECTED(Z_OBJ_HT_P(container)->unset_dimension == NULL)) {
zval *container;
zval *offset;
zend_ulong hval;
+ zend_string *key;
SAVE_OPLINE();
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
offset_again:
SEPARATE_ARRAY(container);
ht = Z_ARRVAL_P(container);
- switch (Z_TYPE_P(offset)) {
- case IS_DOUBLE:
- hval = zend_dval_to_lval(Z_DVAL_P(offset));
- zend_hash_index_del(ht, hval);
- break;
- case IS_LONG:
- hval = Z_LVAL_P(offset);
-num_index_dim:
- zend_hash_index_del(ht, hval);
- break;
- case IS_STRING:
- if (IS_CV != IS_CONST) {
- if (ZEND_HANDLE_NUMERIC(Z_STR_P(offset), hval)) {
- goto num_index_dim;
- }
- }
- if (ht == &EG(symbol_table)) {
- zend_delete_global_variable(Z_STR_P(offset));
- } else {
- zend_hash_del(ht, Z_STR_P(offset));
+ if (EXPECTED(Z_TYPE_P(offset) == IS_STRING)) {
+ key = Z_STR_P(offset);
+ if (IS_CV != IS_CONST) {
+ if (ZEND_HANDLE_NUMERIC(key, hval)) {
+ goto num_index_dim;
}
- break;
- case IS_NULL:
- zend_hash_del(ht, STR_EMPTY_ALLOC());
- break;
- case IS_FALSE:
- hval = 0;
- goto num_index_dim;
- case IS_TRUE:
- hval = 1;
- goto num_index_dim;
- case IS_RESOURCE:
- hval = Z_RES_HANDLE_P(offset);
- goto num_index_dim;
- case IS_REFERENCE:
- offset = Z_REFVAL_P(offset);
- goto offset_again;
- break;
- default:
- zend_error(E_WARNING, "Illegal offset type in unset");
- break;
+ }
+str_index_dim:
+ if (ht == &EG(symbol_table)) {
+ zend_delete_global_variable(key);
+ } else {
+ zend_hash_del(ht, key);
+ }
+ } else if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
+ hval = Z_LVAL_P(offset);
+num_index_dim:
+ zend_hash_index_del(ht, hval);
+ } else if ((IS_CV & (IS_VAR|IS_CV)) && EXPECTED(Z_TYPE_P(offset) == IS_REFERENCE)) {
+ offset = Z_REFVAL_P(offset);
+ goto offset_again;
+ } else if (Z_TYPE_P(offset) == IS_DOUBLE) {
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_dim;
+ } else if (Z_TYPE_P(offset) == IS_NULL) {
+ key = STR_EMPTY_ALLOC();
+ goto str_index_dim;
+ } else if (Z_TYPE_P(offset) == IS_FALSE) {
+ hval = 0;
+ goto num_index_dim;
+ } else if (Z_TYPE_P(offset) == IS_TRUE) {
+ hval = 1;
+ goto num_index_dim;
+ } else if (Z_TYPE_P(offset) == IS_RESOURCE) {
+ hval = Z_RES_HANDLE_P(offset);
+ goto num_index_dim;
+ } else {
+ zend_error(E_WARNING, "Illegal offset type in unset");
}
} else if (IS_VAR == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
if (UNEXPECTED(Z_OBJ_HT_P(container)->unset_dimension == NULL)) {
zval *container;
zval *offset;
zend_ulong hval;
+ zend_string *key;
SAVE_OPLINE();
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
offset_again:
SEPARATE_ARRAY(container);
ht = Z_ARRVAL_P(container);
- switch (Z_TYPE_P(offset)) {
- case IS_DOUBLE:
- hval = zend_dval_to_lval(Z_DVAL_P(offset));
- zend_hash_index_del(ht, hval);
- break;
- case IS_LONG:
- hval = Z_LVAL_P(offset);
-num_index_dim:
- zend_hash_index_del(ht, hval);
- break;
- case IS_STRING:
- if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
- if (ZEND_HANDLE_NUMERIC(Z_STR_P(offset), hval)) {
- goto num_index_dim;
- }
- }
- if (ht == &EG(symbol_table)) {
- zend_delete_global_variable(Z_STR_P(offset));
- } else {
- zend_hash_del(ht, Z_STR_P(offset));
+ if (EXPECTED(Z_TYPE_P(offset) == IS_STRING)) {
+ key = Z_STR_P(offset);
+ if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
+ if (ZEND_HANDLE_NUMERIC(key, hval)) {
+ goto num_index_dim;
}
- break;
- case IS_NULL:
- zend_hash_del(ht, STR_EMPTY_ALLOC());
- break;
- case IS_FALSE:
- hval = 0;
- goto num_index_dim;
- case IS_TRUE:
- hval = 1;
- goto num_index_dim;
- case IS_RESOURCE:
- hval = Z_RES_HANDLE_P(offset);
- goto num_index_dim;
- case IS_REFERENCE:
- offset = Z_REFVAL_P(offset);
- goto offset_again;
- break;
- default:
- zend_error(E_WARNING, "Illegal offset type in unset");
- break;
+ }
+str_index_dim:
+ if (ht == &EG(symbol_table)) {
+ zend_delete_global_variable(key);
+ } else {
+ zend_hash_del(ht, key);
+ }
+ } else if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
+ hval = Z_LVAL_P(offset);
+num_index_dim:
+ zend_hash_index_del(ht, hval);
+ } else if (((IS_TMP_VAR|IS_VAR) & (IS_VAR|IS_CV)) && EXPECTED(Z_TYPE_P(offset) == IS_REFERENCE)) {
+ offset = Z_REFVAL_P(offset);
+ goto offset_again;
+ } else if (Z_TYPE_P(offset) == IS_DOUBLE) {
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_dim;
+ } else if (Z_TYPE_P(offset) == IS_NULL) {
+ key = STR_EMPTY_ALLOC();
+ goto str_index_dim;
+ } else if (Z_TYPE_P(offset) == IS_FALSE) {
+ hval = 0;
+ goto num_index_dim;
+ } else if (Z_TYPE_P(offset) == IS_TRUE) {
+ hval = 1;
+ goto num_index_dim;
+ } else if (Z_TYPE_P(offset) == IS_RESOURCE) {
+ hval = Z_RES_HANDLE_P(offset);
+ goto num_index_dim;
+ } else {
+ zend_error(E_WARNING, "Illegal offset type in unset");
}
} else if (IS_VAR == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
if (UNEXPECTED(Z_OBJ_HT_P(container)->unset_dimension == NULL)) {
zval *container;
zval *offset;
zend_ulong hval;
+ zend_string *key;
SAVE_OPLINE();
container = _get_obj_zval_ptr_unused(execute_data);
offset_again:
SEPARATE_ARRAY(container);
ht = Z_ARRVAL_P(container);
- switch (Z_TYPE_P(offset)) {
- case IS_DOUBLE:
- hval = zend_dval_to_lval(Z_DVAL_P(offset));
- zend_hash_index_del(ht, hval);
- break;
- case IS_LONG:
- hval = Z_LVAL_P(offset);
-num_index_dim:
- zend_hash_index_del(ht, hval);
- break;
- case IS_STRING:
- if (IS_CONST != IS_CONST) {
- if (ZEND_HANDLE_NUMERIC(Z_STR_P(offset), hval)) {
- goto num_index_dim;
- }
- }
- if (ht == &EG(symbol_table)) {
- zend_delete_global_variable(Z_STR_P(offset));
- } else {
- zend_hash_del(ht, Z_STR_P(offset));
+ if (EXPECTED(Z_TYPE_P(offset) == IS_STRING)) {
+ key = Z_STR_P(offset);
+ if (IS_CONST != IS_CONST) {
+ if (ZEND_HANDLE_NUMERIC(key, hval)) {
+ goto num_index_dim;
}
- break;
- case IS_NULL:
- zend_hash_del(ht, STR_EMPTY_ALLOC());
- break;
- case IS_FALSE:
- hval = 0;
- goto num_index_dim;
- case IS_TRUE:
- hval = 1;
- goto num_index_dim;
- case IS_RESOURCE:
- hval = Z_RES_HANDLE_P(offset);
- goto num_index_dim;
- case IS_REFERENCE:
- offset = Z_REFVAL_P(offset);
- goto offset_again;
- break;
- default:
- zend_error(E_WARNING, "Illegal offset type in unset");
- break;
+ }
+str_index_dim:
+ if (ht == &EG(symbol_table)) {
+ zend_delete_global_variable(key);
+ } else {
+ zend_hash_del(ht, key);
+ }
+ } else if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
+ hval = Z_LVAL_P(offset);
+num_index_dim:
+ zend_hash_index_del(ht, hval);
+ } else if ((IS_CONST & (IS_VAR|IS_CV)) && EXPECTED(Z_TYPE_P(offset) == IS_REFERENCE)) {
+ offset = Z_REFVAL_P(offset);
+ goto offset_again;
+ } else if (Z_TYPE_P(offset) == IS_DOUBLE) {
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_dim;
+ } else if (Z_TYPE_P(offset) == IS_NULL) {
+ key = STR_EMPTY_ALLOC();
+ goto str_index_dim;
+ } else if (Z_TYPE_P(offset) == IS_FALSE) {
+ hval = 0;
+ goto num_index_dim;
+ } else if (Z_TYPE_P(offset) == IS_TRUE) {
+ hval = 1;
+ goto num_index_dim;
+ } else if (Z_TYPE_P(offset) == IS_RESOURCE) {
+ hval = Z_RES_HANDLE_P(offset);
+ goto num_index_dim;
+ } else {
+ zend_error(E_WARNING, "Illegal offset type in unset");
}
} else if (IS_UNUSED == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
if (UNEXPECTED(Z_OBJ_HT_P(container)->unset_dimension == NULL)) {
hval = Z_LVAL_P(offset);
num_index_prop:
value = zend_hash_index_find(ht, hval);
+ } else if ((IS_CONST & (IS_VAR|IS_CV)) && EXPECTED(Z_ISREF_P(offset))) {
+ offset = Z_REFVAL_P(offset);
+ goto isset_again;
+ } else if (Z_TYPE_P(offset) == IS_DOUBLE) {
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_NULL) {
+ str = STR_EMPTY_ALLOC();
+ goto str_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_FALSE) {
+ hval = 0;
+ goto num_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_TRUE) {
+ hval = 1;
+ goto num_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_RESOURCE) {
+ hval = Z_RES_HANDLE_P(offset);
+ goto num_index_prop;
} else {
- switch (Z_TYPE_P(offset)) {
- case IS_DOUBLE:
- hval = zend_dval_to_lval(Z_DVAL_P(offset));
- goto num_index_prop;
- case IS_NULL:
- str = STR_EMPTY_ALLOC();
- goto str_index_prop;
- case IS_FALSE:
- hval = 0;
- goto num_index_prop;
- case IS_TRUE:
- hval = 1;
- goto num_index_prop;
- case IS_RESOURCE:
- hval = Z_RES_HANDLE_P(offset);
- goto num_index_prop;
- case IS_REFERENCE:
- offset = Z_REFVAL_P(offset);
- goto isset_again;
- default:
- zend_error(E_WARNING, "Illegal offset type in isset or empty");
- goto isset_not_found;
- }
+ zend_error(E_WARNING, "Illegal offset type in isset or empty");
+ goto isset_not_found;
}
if (opline->extended_value & ZEND_ISSET) {
zval *container;
zval *offset;
zend_ulong hval;
+ zend_string *key;
SAVE_OPLINE();
container = _get_obj_zval_ptr_unused(execute_data);
offset_again:
SEPARATE_ARRAY(container);
ht = Z_ARRVAL_P(container);
- switch (Z_TYPE_P(offset)) {
- case IS_DOUBLE:
- hval = zend_dval_to_lval(Z_DVAL_P(offset));
- zend_hash_index_del(ht, hval);
- break;
- case IS_LONG:
- hval = Z_LVAL_P(offset);
-num_index_dim:
- zend_hash_index_del(ht, hval);
- break;
- case IS_STRING:
- if (IS_CV != IS_CONST) {
- if (ZEND_HANDLE_NUMERIC(Z_STR_P(offset), hval)) {
- goto num_index_dim;
- }
- }
- if (ht == &EG(symbol_table)) {
- zend_delete_global_variable(Z_STR_P(offset));
- } else {
- zend_hash_del(ht, Z_STR_P(offset));
+ if (EXPECTED(Z_TYPE_P(offset) == IS_STRING)) {
+ key = Z_STR_P(offset);
+ if (IS_CV != IS_CONST) {
+ if (ZEND_HANDLE_NUMERIC(key, hval)) {
+ goto num_index_dim;
}
- break;
- case IS_NULL:
- zend_hash_del(ht, STR_EMPTY_ALLOC());
- break;
- case IS_FALSE:
- hval = 0;
- goto num_index_dim;
- case IS_TRUE:
- hval = 1;
- goto num_index_dim;
- case IS_RESOURCE:
- hval = Z_RES_HANDLE_P(offset);
- goto num_index_dim;
- case IS_REFERENCE:
- offset = Z_REFVAL_P(offset);
- goto offset_again;
- break;
- default:
- zend_error(E_WARNING, "Illegal offset type in unset");
- break;
+ }
+str_index_dim:
+ if (ht == &EG(symbol_table)) {
+ zend_delete_global_variable(key);
+ } else {
+ zend_hash_del(ht, key);
+ }
+ } else if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
+ hval = Z_LVAL_P(offset);
+num_index_dim:
+ zend_hash_index_del(ht, hval);
+ } else if ((IS_CV & (IS_VAR|IS_CV)) && EXPECTED(Z_TYPE_P(offset) == IS_REFERENCE)) {
+ offset = Z_REFVAL_P(offset);
+ goto offset_again;
+ } else if (Z_TYPE_P(offset) == IS_DOUBLE) {
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_dim;
+ } else if (Z_TYPE_P(offset) == IS_NULL) {
+ key = STR_EMPTY_ALLOC();
+ goto str_index_dim;
+ } else if (Z_TYPE_P(offset) == IS_FALSE) {
+ hval = 0;
+ goto num_index_dim;
+ } else if (Z_TYPE_P(offset) == IS_TRUE) {
+ hval = 1;
+ goto num_index_dim;
+ } else if (Z_TYPE_P(offset) == IS_RESOURCE) {
+ hval = Z_RES_HANDLE_P(offset);
+ goto num_index_dim;
+ } else {
+ zend_error(E_WARNING, "Illegal offset type in unset");
}
} else if (IS_UNUSED == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
if (UNEXPECTED(Z_OBJ_HT_P(container)->unset_dimension == NULL)) {
hval = Z_LVAL_P(offset);
num_index_prop:
value = zend_hash_index_find(ht, hval);
+ } else if ((IS_CV & (IS_VAR|IS_CV)) && EXPECTED(Z_ISREF_P(offset))) {
+ offset = Z_REFVAL_P(offset);
+ goto isset_again;
+ } else if (Z_TYPE_P(offset) == IS_DOUBLE) {
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_NULL) {
+ str = STR_EMPTY_ALLOC();
+ goto str_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_FALSE) {
+ hval = 0;
+ goto num_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_TRUE) {
+ hval = 1;
+ goto num_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_RESOURCE) {
+ hval = Z_RES_HANDLE_P(offset);
+ goto num_index_prop;
} else {
- switch (Z_TYPE_P(offset)) {
- case IS_DOUBLE:
- hval = zend_dval_to_lval(Z_DVAL_P(offset));
- goto num_index_prop;
- case IS_NULL:
- str = STR_EMPTY_ALLOC();
- goto str_index_prop;
- case IS_FALSE:
- hval = 0;
- goto num_index_prop;
- case IS_TRUE:
- hval = 1;
- goto num_index_prop;
- case IS_RESOURCE:
- hval = Z_RES_HANDLE_P(offset);
- goto num_index_prop;
- case IS_REFERENCE:
- offset = Z_REFVAL_P(offset);
- goto isset_again;
- default:
- zend_error(E_WARNING, "Illegal offset type in isset or empty");
- goto isset_not_found;
- }
+ zend_error(E_WARNING, "Illegal offset type in isset or empty");
+ goto isset_not_found;
}
if (opline->extended_value & ZEND_ISSET) {
zval *container;
zval *offset;
zend_ulong hval;
+ zend_string *key;
SAVE_OPLINE();
container = _get_obj_zval_ptr_unused(execute_data);
offset_again:
SEPARATE_ARRAY(container);
ht = Z_ARRVAL_P(container);
- switch (Z_TYPE_P(offset)) {
- case IS_DOUBLE:
- hval = zend_dval_to_lval(Z_DVAL_P(offset));
- zend_hash_index_del(ht, hval);
- break;
- case IS_LONG:
- hval = Z_LVAL_P(offset);
-num_index_dim:
- zend_hash_index_del(ht, hval);
- break;
- case IS_STRING:
- if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
- if (ZEND_HANDLE_NUMERIC(Z_STR_P(offset), hval)) {
- goto num_index_dim;
- }
- }
- if (ht == &EG(symbol_table)) {
- zend_delete_global_variable(Z_STR_P(offset));
- } else {
- zend_hash_del(ht, Z_STR_P(offset));
+ if (EXPECTED(Z_TYPE_P(offset) == IS_STRING)) {
+ key = Z_STR_P(offset);
+ if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
+ if (ZEND_HANDLE_NUMERIC(key, hval)) {
+ goto num_index_dim;
}
- break;
- case IS_NULL:
- zend_hash_del(ht, STR_EMPTY_ALLOC());
- break;
- case IS_FALSE:
- hval = 0;
- goto num_index_dim;
- case IS_TRUE:
- hval = 1;
- goto num_index_dim;
- case IS_RESOURCE:
- hval = Z_RES_HANDLE_P(offset);
- goto num_index_dim;
- case IS_REFERENCE:
- offset = Z_REFVAL_P(offset);
- goto offset_again;
- break;
- default:
- zend_error(E_WARNING, "Illegal offset type in unset");
- break;
+ }
+str_index_dim:
+ if (ht == &EG(symbol_table)) {
+ zend_delete_global_variable(key);
+ } else {
+ zend_hash_del(ht, key);
+ }
+ } else if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
+ hval = Z_LVAL_P(offset);
+num_index_dim:
+ zend_hash_index_del(ht, hval);
+ } else if (((IS_TMP_VAR|IS_VAR) & (IS_VAR|IS_CV)) && EXPECTED(Z_TYPE_P(offset) == IS_REFERENCE)) {
+ offset = Z_REFVAL_P(offset);
+ goto offset_again;
+ } else if (Z_TYPE_P(offset) == IS_DOUBLE) {
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_dim;
+ } else if (Z_TYPE_P(offset) == IS_NULL) {
+ key = STR_EMPTY_ALLOC();
+ goto str_index_dim;
+ } else if (Z_TYPE_P(offset) == IS_FALSE) {
+ hval = 0;
+ goto num_index_dim;
+ } else if (Z_TYPE_P(offset) == IS_TRUE) {
+ hval = 1;
+ goto num_index_dim;
+ } else if (Z_TYPE_P(offset) == IS_RESOURCE) {
+ hval = Z_RES_HANDLE_P(offset);
+ goto num_index_dim;
+ } else {
+ zend_error(E_WARNING, "Illegal offset type in unset");
}
} else if (IS_UNUSED == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
if (UNEXPECTED(Z_OBJ_HT_P(container)->unset_dimension == NULL)) {
hval = Z_LVAL_P(offset);
num_index_prop:
value = zend_hash_index_find(ht, hval);
+ } else if (((IS_TMP_VAR|IS_VAR) & (IS_VAR|IS_CV)) && EXPECTED(Z_ISREF_P(offset))) {
+ offset = Z_REFVAL_P(offset);
+ goto isset_again;
+ } else if (Z_TYPE_P(offset) == IS_DOUBLE) {
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_NULL) {
+ str = STR_EMPTY_ALLOC();
+ goto str_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_FALSE) {
+ hval = 0;
+ goto num_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_TRUE) {
+ hval = 1;
+ goto num_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_RESOURCE) {
+ hval = Z_RES_HANDLE_P(offset);
+ goto num_index_prop;
} else {
- switch (Z_TYPE_P(offset)) {
- case IS_DOUBLE:
- hval = zend_dval_to_lval(Z_DVAL_P(offset));
- goto num_index_prop;
- case IS_NULL:
- str = STR_EMPTY_ALLOC();
- goto str_index_prop;
- case IS_FALSE:
- hval = 0;
- goto num_index_prop;
- case IS_TRUE:
- hval = 1;
- goto num_index_prop;
- case IS_RESOURCE:
- hval = Z_RES_HANDLE_P(offset);
- goto num_index_prop;
- case IS_REFERENCE:
- offset = Z_REFVAL_P(offset);
- goto isset_again;
- default:
- zend_error(E_WARNING, "Illegal offset type in isset or empty");
- goto isset_not_found;
- }
+ zend_error(E_WARNING, "Illegal offset type in isset or empty");
+ goto isset_not_found;
}
if (opline->extended_value & ZEND_ISSET) {
zval *container;
zval *offset;
zend_ulong hval;
+ zend_string *key;
SAVE_OPLINE();
container = _get_zval_ptr_cv_BP_VAR_UNSET(execute_data, opline->op1.var);
offset_again:
SEPARATE_ARRAY(container);
ht = Z_ARRVAL_P(container);
- switch (Z_TYPE_P(offset)) {
- case IS_DOUBLE:
- hval = zend_dval_to_lval(Z_DVAL_P(offset));
- zend_hash_index_del(ht, hval);
- break;
- case IS_LONG:
- hval = Z_LVAL_P(offset);
-num_index_dim:
- zend_hash_index_del(ht, hval);
- break;
- case IS_STRING:
- if (IS_CONST != IS_CONST) {
- if (ZEND_HANDLE_NUMERIC(Z_STR_P(offset), hval)) {
- goto num_index_dim;
- }
- }
- if (ht == &EG(symbol_table)) {
- zend_delete_global_variable(Z_STR_P(offset));
- } else {
- zend_hash_del(ht, Z_STR_P(offset));
+ if (EXPECTED(Z_TYPE_P(offset) == IS_STRING)) {
+ key = Z_STR_P(offset);
+ if (IS_CONST != IS_CONST) {
+ if (ZEND_HANDLE_NUMERIC(key, hval)) {
+ goto num_index_dim;
}
- break;
- case IS_NULL:
- zend_hash_del(ht, STR_EMPTY_ALLOC());
- break;
- case IS_FALSE:
- hval = 0;
- goto num_index_dim;
- case IS_TRUE:
- hval = 1;
- goto num_index_dim;
- case IS_RESOURCE:
- hval = Z_RES_HANDLE_P(offset);
- goto num_index_dim;
- case IS_REFERENCE:
- offset = Z_REFVAL_P(offset);
- goto offset_again;
- break;
- default:
- zend_error(E_WARNING, "Illegal offset type in unset");
- break;
+ }
+str_index_dim:
+ if (ht == &EG(symbol_table)) {
+ zend_delete_global_variable(key);
+ } else {
+ zend_hash_del(ht, key);
+ }
+ } else if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
+ hval = Z_LVAL_P(offset);
+num_index_dim:
+ zend_hash_index_del(ht, hval);
+ } else if ((IS_CONST & (IS_VAR|IS_CV)) && EXPECTED(Z_TYPE_P(offset) == IS_REFERENCE)) {
+ offset = Z_REFVAL_P(offset);
+ goto offset_again;
+ } else if (Z_TYPE_P(offset) == IS_DOUBLE) {
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_dim;
+ } else if (Z_TYPE_P(offset) == IS_NULL) {
+ key = STR_EMPTY_ALLOC();
+ goto str_index_dim;
+ } else if (Z_TYPE_P(offset) == IS_FALSE) {
+ hval = 0;
+ goto num_index_dim;
+ } else if (Z_TYPE_P(offset) == IS_TRUE) {
+ hval = 1;
+ goto num_index_dim;
+ } else if (Z_TYPE_P(offset) == IS_RESOURCE) {
+ hval = Z_RES_HANDLE_P(offset);
+ goto num_index_dim;
+ } else {
+ zend_error(E_WARNING, "Illegal offset type in unset");
}
} else if (IS_CV == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
if (UNEXPECTED(Z_OBJ_HT_P(container)->unset_dimension == NULL)) {
hval = Z_LVAL_P(offset);
num_index_prop:
value = zend_hash_index_find(ht, hval);
+ } else if ((IS_CONST & (IS_VAR|IS_CV)) && EXPECTED(Z_ISREF_P(offset))) {
+ offset = Z_REFVAL_P(offset);
+ goto isset_again;
+ } else if (Z_TYPE_P(offset) == IS_DOUBLE) {
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_NULL) {
+ str = STR_EMPTY_ALLOC();
+ goto str_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_FALSE) {
+ hval = 0;
+ goto num_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_TRUE) {
+ hval = 1;
+ goto num_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_RESOURCE) {
+ hval = Z_RES_HANDLE_P(offset);
+ goto num_index_prop;
} else {
- switch (Z_TYPE_P(offset)) {
- case IS_DOUBLE:
- hval = zend_dval_to_lval(Z_DVAL_P(offset));
- goto num_index_prop;
- case IS_NULL:
- str = STR_EMPTY_ALLOC();
- goto str_index_prop;
- case IS_FALSE:
- hval = 0;
- goto num_index_prop;
- case IS_TRUE:
- hval = 1;
- goto num_index_prop;
- case IS_RESOURCE:
- hval = Z_RES_HANDLE_P(offset);
- goto num_index_prop;
- case IS_REFERENCE:
- offset = Z_REFVAL_P(offset);
- goto isset_again;
- default:
- zend_error(E_WARNING, "Illegal offset type in isset or empty");
- goto isset_not_found;
- }
+ zend_error(E_WARNING, "Illegal offset type in isset or empty");
+ goto isset_not_found;
}
if (opline->extended_value & ZEND_ISSET) {
zval *container;
zval *offset;
zend_ulong hval;
+ zend_string *key;
SAVE_OPLINE();
container = _get_zval_ptr_cv_BP_VAR_UNSET(execute_data, opline->op1.var);
offset_again:
SEPARATE_ARRAY(container);
ht = Z_ARRVAL_P(container);
- switch (Z_TYPE_P(offset)) {
- case IS_DOUBLE:
- hval = zend_dval_to_lval(Z_DVAL_P(offset));
- zend_hash_index_del(ht, hval);
- break;
- case IS_LONG:
- hval = Z_LVAL_P(offset);
-num_index_dim:
- zend_hash_index_del(ht, hval);
- break;
- case IS_STRING:
- if (IS_CV != IS_CONST) {
- if (ZEND_HANDLE_NUMERIC(Z_STR_P(offset), hval)) {
- goto num_index_dim;
- }
- }
- if (ht == &EG(symbol_table)) {
- zend_delete_global_variable(Z_STR_P(offset));
- } else {
- zend_hash_del(ht, Z_STR_P(offset));
+ if (EXPECTED(Z_TYPE_P(offset) == IS_STRING)) {
+ key = Z_STR_P(offset);
+ if (IS_CV != IS_CONST) {
+ if (ZEND_HANDLE_NUMERIC(key, hval)) {
+ goto num_index_dim;
}
- break;
- case IS_NULL:
- zend_hash_del(ht, STR_EMPTY_ALLOC());
- break;
- case IS_FALSE:
- hval = 0;
- goto num_index_dim;
- case IS_TRUE:
- hval = 1;
- goto num_index_dim;
- case IS_RESOURCE:
- hval = Z_RES_HANDLE_P(offset);
- goto num_index_dim;
- case IS_REFERENCE:
- offset = Z_REFVAL_P(offset);
- goto offset_again;
- break;
- default:
- zend_error(E_WARNING, "Illegal offset type in unset");
- break;
+ }
+str_index_dim:
+ if (ht == &EG(symbol_table)) {
+ zend_delete_global_variable(key);
+ } else {
+ zend_hash_del(ht, key);
+ }
+ } else if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
+ hval = Z_LVAL_P(offset);
+num_index_dim:
+ zend_hash_index_del(ht, hval);
+ } else if ((IS_CV & (IS_VAR|IS_CV)) && EXPECTED(Z_TYPE_P(offset) == IS_REFERENCE)) {
+ offset = Z_REFVAL_P(offset);
+ goto offset_again;
+ } else if (Z_TYPE_P(offset) == IS_DOUBLE) {
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_dim;
+ } else if (Z_TYPE_P(offset) == IS_NULL) {
+ key = STR_EMPTY_ALLOC();
+ goto str_index_dim;
+ } else if (Z_TYPE_P(offset) == IS_FALSE) {
+ hval = 0;
+ goto num_index_dim;
+ } else if (Z_TYPE_P(offset) == IS_TRUE) {
+ hval = 1;
+ goto num_index_dim;
+ } else if (Z_TYPE_P(offset) == IS_RESOURCE) {
+ hval = Z_RES_HANDLE_P(offset);
+ goto num_index_dim;
+ } else {
+ zend_error(E_WARNING, "Illegal offset type in unset");
}
} else if (IS_CV == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
if (UNEXPECTED(Z_OBJ_HT_P(container)->unset_dimension == NULL)) {
hval = Z_LVAL_P(offset);
num_index_prop:
value = zend_hash_index_find(ht, hval);
+ } else if ((IS_CV & (IS_VAR|IS_CV)) && EXPECTED(Z_ISREF_P(offset))) {
+ offset = Z_REFVAL_P(offset);
+ goto isset_again;
+ } else if (Z_TYPE_P(offset) == IS_DOUBLE) {
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_NULL) {
+ str = STR_EMPTY_ALLOC();
+ goto str_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_FALSE) {
+ hval = 0;
+ goto num_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_TRUE) {
+ hval = 1;
+ goto num_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_RESOURCE) {
+ hval = Z_RES_HANDLE_P(offset);
+ goto num_index_prop;
} else {
- switch (Z_TYPE_P(offset)) {
- case IS_DOUBLE:
- hval = zend_dval_to_lval(Z_DVAL_P(offset));
- goto num_index_prop;
- case IS_NULL:
- str = STR_EMPTY_ALLOC();
- goto str_index_prop;
- case IS_FALSE:
- hval = 0;
- goto num_index_prop;
- case IS_TRUE:
- hval = 1;
- goto num_index_prop;
- case IS_RESOURCE:
- hval = Z_RES_HANDLE_P(offset);
- goto num_index_prop;
- case IS_REFERENCE:
- offset = Z_REFVAL_P(offset);
- goto isset_again;
- default:
- zend_error(E_WARNING, "Illegal offset type in isset or empty");
- goto isset_not_found;
- }
+ zend_error(E_WARNING, "Illegal offset type in isset or empty");
+ goto isset_not_found;
}
if (opline->extended_value & ZEND_ISSET) {
zval *container;
zval *offset;
zend_ulong hval;
+ zend_string *key;
SAVE_OPLINE();
container = _get_zval_ptr_cv_BP_VAR_UNSET(execute_data, opline->op1.var);
offset_again:
SEPARATE_ARRAY(container);
ht = Z_ARRVAL_P(container);
- switch (Z_TYPE_P(offset)) {
- case IS_DOUBLE:
- hval = zend_dval_to_lval(Z_DVAL_P(offset));
- zend_hash_index_del(ht, hval);
- break;
- case IS_LONG:
- hval = Z_LVAL_P(offset);
-num_index_dim:
- zend_hash_index_del(ht, hval);
- break;
- case IS_STRING:
- if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
- if (ZEND_HANDLE_NUMERIC(Z_STR_P(offset), hval)) {
- goto num_index_dim;
- }
- }
- if (ht == &EG(symbol_table)) {
- zend_delete_global_variable(Z_STR_P(offset));
- } else {
- zend_hash_del(ht, Z_STR_P(offset));
+ if (EXPECTED(Z_TYPE_P(offset) == IS_STRING)) {
+ key = Z_STR_P(offset);
+ if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
+ if (ZEND_HANDLE_NUMERIC(key, hval)) {
+ goto num_index_dim;
}
- break;
- case IS_NULL:
- zend_hash_del(ht, STR_EMPTY_ALLOC());
- break;
- case IS_FALSE:
- hval = 0;
- goto num_index_dim;
- case IS_TRUE:
- hval = 1;
- goto num_index_dim;
- case IS_RESOURCE:
- hval = Z_RES_HANDLE_P(offset);
- goto num_index_dim;
- case IS_REFERENCE:
- offset = Z_REFVAL_P(offset);
- goto offset_again;
- break;
- default:
- zend_error(E_WARNING, "Illegal offset type in unset");
- break;
+ }
+str_index_dim:
+ if (ht == &EG(symbol_table)) {
+ zend_delete_global_variable(key);
+ } else {
+ zend_hash_del(ht, key);
+ }
+ } else if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
+ hval = Z_LVAL_P(offset);
+num_index_dim:
+ zend_hash_index_del(ht, hval);
+ } else if (((IS_TMP_VAR|IS_VAR) & (IS_VAR|IS_CV)) && EXPECTED(Z_TYPE_P(offset) == IS_REFERENCE)) {
+ offset = Z_REFVAL_P(offset);
+ goto offset_again;
+ } else if (Z_TYPE_P(offset) == IS_DOUBLE) {
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_dim;
+ } else if (Z_TYPE_P(offset) == IS_NULL) {
+ key = STR_EMPTY_ALLOC();
+ goto str_index_dim;
+ } else if (Z_TYPE_P(offset) == IS_FALSE) {
+ hval = 0;
+ goto num_index_dim;
+ } else if (Z_TYPE_P(offset) == IS_TRUE) {
+ hval = 1;
+ goto num_index_dim;
+ } else if (Z_TYPE_P(offset) == IS_RESOURCE) {
+ hval = Z_RES_HANDLE_P(offset);
+ goto num_index_dim;
+ } else {
+ zend_error(E_WARNING, "Illegal offset type in unset");
}
} else if (IS_CV == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
if (UNEXPECTED(Z_OBJ_HT_P(container)->unset_dimension == NULL)) {
hval = Z_LVAL_P(offset);
num_index_prop:
value = zend_hash_index_find(ht, hval);
+ } else if (((IS_TMP_VAR|IS_VAR) & (IS_VAR|IS_CV)) && EXPECTED(Z_ISREF_P(offset))) {
+ offset = Z_REFVAL_P(offset);
+ goto isset_again;
+ } else if (Z_TYPE_P(offset) == IS_DOUBLE) {
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_NULL) {
+ str = STR_EMPTY_ALLOC();
+ goto str_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_FALSE) {
+ hval = 0;
+ goto num_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_TRUE) {
+ hval = 1;
+ goto num_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_RESOURCE) {
+ hval = Z_RES_HANDLE_P(offset);
+ goto num_index_prop;
} else {
- switch (Z_TYPE_P(offset)) {
- case IS_DOUBLE:
- hval = zend_dval_to_lval(Z_DVAL_P(offset));
- goto num_index_prop;
- case IS_NULL:
- str = STR_EMPTY_ALLOC();
- goto str_index_prop;
- case IS_FALSE:
- hval = 0;
- goto num_index_prop;
- case IS_TRUE:
- hval = 1;
- goto num_index_prop;
- case IS_RESOURCE:
- hval = Z_RES_HANDLE_P(offset);
- goto num_index_prop;
- case IS_REFERENCE:
- offset = Z_REFVAL_P(offset);
- goto isset_again;
- default:
- zend_error(E_WARNING, "Illegal offset type in isset or empty");
- goto isset_not_found;
- }
+ zend_error(E_WARNING, "Illegal offset type in isset or empty");
+ goto isset_not_found;
}
if (opline->extended_value & ZEND_ISSET) {
hval = Z_LVAL_P(offset);
num_index_prop:
value = zend_hash_index_find(ht, hval);
+ } else if ((IS_CONST & (IS_VAR|IS_CV)) && EXPECTED(Z_ISREF_P(offset))) {
+ offset = Z_REFVAL_P(offset);
+ goto isset_again;
+ } else if (Z_TYPE_P(offset) == IS_DOUBLE) {
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_NULL) {
+ str = STR_EMPTY_ALLOC();
+ goto str_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_FALSE) {
+ hval = 0;
+ goto num_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_TRUE) {
+ hval = 1;
+ goto num_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_RESOURCE) {
+ hval = Z_RES_HANDLE_P(offset);
+ goto num_index_prop;
} else {
- switch (Z_TYPE_P(offset)) {
- case IS_DOUBLE:
- hval = zend_dval_to_lval(Z_DVAL_P(offset));
- goto num_index_prop;
- case IS_NULL:
- str = STR_EMPTY_ALLOC();
- goto str_index_prop;
- case IS_FALSE:
- hval = 0;
- goto num_index_prop;
- case IS_TRUE:
- hval = 1;
- goto num_index_prop;
- case IS_RESOURCE:
- hval = Z_RES_HANDLE_P(offset);
- goto num_index_prop;
- case IS_REFERENCE:
- offset = Z_REFVAL_P(offset);
- goto isset_again;
- default:
- zend_error(E_WARNING, "Illegal offset type in isset or empty");
- goto isset_not_found;
- }
+ zend_error(E_WARNING, "Illegal offset type in isset or empty");
+ goto isset_not_found;
}
if (opline->extended_value & ZEND_ISSET) {
hval = Z_LVAL_P(offset);
num_index_prop:
value = zend_hash_index_find(ht, hval);
+ } else if ((IS_CV & (IS_VAR|IS_CV)) && EXPECTED(Z_ISREF_P(offset))) {
+ offset = Z_REFVAL_P(offset);
+ goto isset_again;
+ } else if (Z_TYPE_P(offset) == IS_DOUBLE) {
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_NULL) {
+ str = STR_EMPTY_ALLOC();
+ goto str_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_FALSE) {
+ hval = 0;
+ goto num_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_TRUE) {
+ hval = 1;
+ goto num_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_RESOURCE) {
+ hval = Z_RES_HANDLE_P(offset);
+ goto num_index_prop;
} else {
- switch (Z_TYPE_P(offset)) {
- case IS_DOUBLE:
- hval = zend_dval_to_lval(Z_DVAL_P(offset));
- goto num_index_prop;
- case IS_NULL:
- str = STR_EMPTY_ALLOC();
- goto str_index_prop;
- case IS_FALSE:
- hval = 0;
- goto num_index_prop;
- case IS_TRUE:
- hval = 1;
- goto num_index_prop;
- case IS_RESOURCE:
- hval = Z_RES_HANDLE_P(offset);
- goto num_index_prop;
- case IS_REFERENCE:
- offset = Z_REFVAL_P(offset);
- goto isset_again;
- default:
- zend_error(E_WARNING, "Illegal offset type in isset or empty");
- goto isset_not_found;
- }
+ zend_error(E_WARNING, "Illegal offset type in isset or empty");
+ goto isset_not_found;
}
if (opline->extended_value & ZEND_ISSET) {
hval = Z_LVAL_P(offset);
num_index_prop:
value = zend_hash_index_find(ht, hval);
+ } else if (((IS_TMP_VAR|IS_VAR) & (IS_VAR|IS_CV)) && EXPECTED(Z_ISREF_P(offset))) {
+ offset = Z_REFVAL_P(offset);
+ goto isset_again;
+ } else if (Z_TYPE_P(offset) == IS_DOUBLE) {
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_NULL) {
+ str = STR_EMPTY_ALLOC();
+ goto str_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_FALSE) {
+ hval = 0;
+ goto num_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_TRUE) {
+ hval = 1;
+ goto num_index_prop;
+ } else if (Z_TYPE_P(offset) == IS_RESOURCE) {
+ hval = Z_RES_HANDLE_P(offset);
+ goto num_index_prop;
} else {
- switch (Z_TYPE_P(offset)) {
- case IS_DOUBLE:
- hval = zend_dval_to_lval(Z_DVAL_P(offset));
- goto num_index_prop;
- case IS_NULL:
- str = STR_EMPTY_ALLOC();
- goto str_index_prop;
- case IS_FALSE:
- hval = 0;
- goto num_index_prop;
- case IS_TRUE:
- hval = 1;
- goto num_index_prop;
- case IS_RESOURCE:
- hval = Z_RES_HANDLE_P(offset);
- goto num_index_prop;
- case IS_REFERENCE:
- offset = Z_REFVAL_P(offset);
- goto isset_again;
- default:
- zend_error(E_WARNING, "Illegal offset type in isset or empty");
- goto isset_not_found;
- }
+ zend_error(E_WARNING, "Illegal offset type in isset or empty");
+ goto isset_not_found;
}
if (opline->extended_value & ZEND_ISSET) {