summaryrefslogtreecommitdiff
path: root/Zend/zend_vm_execute.h
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_vm_execute.h')
-rw-r--r--Zend/zend_vm_execute.h189
1 files changed, 63 insertions, 126 deletions
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h
index a6a483c23d..f26b6c5c92 100644
--- a/Zend/zend_vm_execute.h
+++ b/Zend/zend_vm_execute.h
@@ -1965,8 +1965,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CALL_TRAMPOLINE_SPEC_HANDLER(Z
SAVE_OPLINE();
- args = emalloc(sizeof(zend_array));
- zend_hash_init(args, num_args, NULL, ZVAL_PTR_DTOR, 0);
+ args = zend_new_array(num_args);
if (num_args) {
zval *p = ZEND_CALL_ARG(execute_data, 1);
zval *end = p + num_args;
@@ -3392,8 +3391,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CAST_SPEC_CONST_HANDLER(ZEND_O
if (opline->extended_value == IS_ARRAY) {
if (Z_TYPE_P(expr) != IS_OBJECT) {
- ZVAL_NEW_ARR(result);
- zend_hash_init(Z_ARRVAL_P(result), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(result, zend_new_array(8));
if (Z_TYPE_P(expr) != IS_NULL) {
expr = zend_hash_index_add_new(Z_ARRVAL_P(result), 0, expr);
if (IS_CONST == IS_CONST) {
@@ -5887,8 +5885,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CONST_CONST_HA
} else {
size = 0;
}
- ZVAL_NEW_ARR(array);
- zend_hash_init(Z_ARRVAL_P(array), size, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(array, zend_new_array(size));
if (IS_CONST != IS_UNUSED) {
/* Explicitly initialize array as not-packed if flag is set */
@@ -7671,8 +7668,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CONST_UNUSED_H
} else {
size = 0;
}
- ZVAL_NEW_ARR(array);
- zend_hash_init(Z_ARRVAL_P(array), size, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(array, zend_new_array(size));
if (IS_CONST != IS_UNUSED) {
/* Explicitly initialize array as not-packed if flag is set */
@@ -8173,8 +8169,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FUNC_GET_ARGS_SPEC_CONST_UNUSE
result_size = arg_count;
}
- ht = (zend_array *) emalloc(sizeof(zend_array));
- zend_hash_init(ht, result_size, NULL, ZVAL_PTR_DTOR, 0);
+ ht = zend_new_array(result_size);
ZVAL_ARR(EX_VAR(opline->result.var), ht);
if (result_size) {
@@ -9906,8 +9901,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CONST_CV_HANDL
} else {
size = 0;
}
- ZVAL_NEW_ARR(array);
- zend_hash_init(Z_ARRVAL_P(array), size, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(array, zend_new_array(size));
if (IS_CONST != IS_UNUSED) {
/* Explicitly initialize array as not-packed if flag is set */
@@ -11874,8 +11868,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CONST_TMPVAR_H
} else {
size = 0;
}
- ZVAL_NEW_ARR(array);
- zend_hash_init(Z_ARRVAL_P(array), size, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(array, zend_new_array(size));
if (IS_CONST != IS_UNUSED) {
/* Explicitly initialize array as not-packed if flag is set */
@@ -12897,8 +12890,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CAST_SPEC_TMP_HANDLER(ZEND_OPC
if (opline->extended_value == IS_ARRAY) {
if (Z_TYPE_P(expr) != IS_OBJECT) {
- ZVAL_NEW_ARR(result);
- zend_hash_init(Z_ARRVAL_P(result), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(result, zend_new_array(8));
if (Z_TYPE_P(expr) != IS_NULL) {
expr = zend_hash_index_add_new(Z_ARRVAL_P(result), 0, expr);
if (IS_TMP_VAR == IS_CONST) {
@@ -13821,8 +13813,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_TMP_CONST_HAND
} else {
size = 0;
}
- ZVAL_NEW_ARR(array);
- zend_hash_init(Z_ARRVAL_P(array), size, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(array, zend_new_array(size));
if (IS_TMP_VAR != IS_UNUSED) {
/* Explicitly initialize array as not-packed if flag is set */
@@ -14550,8 +14541,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_TMP_UNUSED_HAN
} else {
size = 0;
}
- ZVAL_NEW_ARR(array);
- zend_hash_init(Z_ARRVAL_P(array), size, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(array, zend_new_array(size));
if (IS_TMP_VAR != IS_UNUSED) {
/* Explicitly initialize array as not-packed if flag is set */
@@ -15173,8 +15163,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_TMP_CV_HANDLER
} else {
size = 0;
}
- ZVAL_NEW_ARR(array);
- zend_hash_init(Z_ARRVAL_P(array), size, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(array, zend_new_array(size));
if (IS_TMP_VAR != IS_UNUSED) {
/* Explicitly initialize array as not-packed if flag is set */
@@ -15696,8 +15685,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_TMP_TMPVAR_HAN
} else {
size = 0;
}
- ZVAL_NEW_ARR(array);
- zend_hash_init(Z_ARRVAL_P(array), size, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(array, zend_new_array(size));
if (IS_TMP_VAR != IS_UNUSED) {
/* Explicitly initialize array as not-packed if flag is set */
@@ -16549,8 +16537,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CAST_SPEC_VAR_HANDLER(ZEND_OPC
if (opline->extended_value == IS_ARRAY) {
if (Z_TYPE_P(expr) != IS_OBJECT) {
- ZVAL_NEW_ARR(result);
- zend_hash_init(Z_ARRVAL_P(result), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(result, zend_new_array(8));
if (Z_TYPE_P(expr) != IS_NULL) {
expr = zend_hash_index_add_new(Z_ARRVAL_P(result), 0, expr);
if (IS_VAR == IS_CONST) {
@@ -17648,8 +17635,7 @@ assign_dim_op_new_array:
} else if (IS_VAR == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(container) == IS_UNDEF)) {
container = GET_OP1_UNDEF_CV(container, BP_VAR_RW);
assign_dim_op_convert_to_array:
- ZVAL_NEW_ARR(container);
- zend_hash_init(Z_ARRVAL_P(container), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(container, zend_new_array(8));
goto assign_dim_op_new_array;
}
@@ -19082,8 +19068,7 @@ try_assign_dim_array:
}
} else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
- ZVAL_NEW_ARR(object_ptr);
- zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(object_ptr, zend_new_array(8));
goto try_assign_dim_array;
} else {
if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
@@ -19175,8 +19160,7 @@ try_assign_dim_array:
zval_ptr_dtor_nogc(free_op_data);
}
} else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
- ZVAL_NEW_ARR(object_ptr);
- zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(object_ptr, zend_new_array(8));
goto try_assign_dim_array;
} else {
if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
@@ -19268,8 +19252,7 @@ try_assign_dim_array:
zval_ptr_dtor_nogc(free_op_data);
}
} else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
- ZVAL_NEW_ARR(object_ptr);
- zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(object_ptr, zend_new_array(8));
goto try_assign_dim_array;
} else {
if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
@@ -19360,8 +19343,7 @@ try_assign_dim_array:
}
} else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
- ZVAL_NEW_ARR(object_ptr);
- zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(object_ptr, zend_new_array(8));
goto try_assign_dim_array;
} else {
if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
@@ -19786,8 +19768,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_VAR_CONST_HAND
} else {
size = 0;
}
- ZVAL_NEW_ARR(array);
- zend_hash_init(Z_ARRVAL_P(array), size, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(array, zend_new_array(size));
if (IS_VAR != IS_UNUSED) {
/* Explicitly initialize array as not-packed if flag is set */
@@ -20672,8 +20653,7 @@ assign_dim_op_new_array:
} else if (IS_VAR == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(container) == IS_UNDEF)) {
container = GET_OP1_UNDEF_CV(container, BP_VAR_RW);
assign_dim_op_convert_to_array:
- ZVAL_NEW_ARR(container);
- zend_hash_init(Z_ARRVAL_P(container), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(container, zend_new_array(8));
goto assign_dim_op_new_array;
}
@@ -20935,8 +20915,7 @@ try_assign_dim_array:
}
} else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
- ZVAL_NEW_ARR(object_ptr);
- zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(object_ptr, zend_new_array(8));
goto try_assign_dim_array;
} else {
if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
@@ -21028,8 +21007,7 @@ try_assign_dim_array:
zval_ptr_dtor_nogc(free_op_data);
}
} else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
- ZVAL_NEW_ARR(object_ptr);
- zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(object_ptr, zend_new_array(8));
goto try_assign_dim_array;
} else {
if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
@@ -21121,8 +21099,7 @@ try_assign_dim_array:
zval_ptr_dtor_nogc(free_op_data);
}
} else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
- ZVAL_NEW_ARR(object_ptr);
- zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(object_ptr, zend_new_array(8));
goto try_assign_dim_array;
} else {
if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
@@ -21213,8 +21190,7 @@ try_assign_dim_array:
}
} else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
- ZVAL_NEW_ARR(object_ptr);
- zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(object_ptr, zend_new_array(8));
goto try_assign_dim_array;
} else {
if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
@@ -21548,8 +21524,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_VAR_UNUSED_HAN
} else {
size = 0;
}
- ZVAL_NEW_ARR(array);
- zend_hash_init(Z_ARRVAL_P(array), size, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(array, zend_new_array(size));
if (IS_VAR != IS_UNUSED) {
/* Explicitly initialize array as not-packed if flag is set */
@@ -21986,8 +21961,7 @@ assign_dim_op_new_array:
} else if (IS_VAR == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(container) == IS_UNDEF)) {
container = GET_OP1_UNDEF_CV(container, BP_VAR_RW);
assign_dim_op_convert_to_array:
- ZVAL_NEW_ARR(container);
- zend_hash_init(Z_ARRVAL_P(container), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(container, zend_new_array(8));
goto assign_dim_op_new_array;
}
@@ -23420,8 +23394,7 @@ try_assign_dim_array:
}
} else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
- ZVAL_NEW_ARR(object_ptr);
- zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(object_ptr, zend_new_array(8));
goto try_assign_dim_array;
} else {
if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
@@ -23513,8 +23486,7 @@ try_assign_dim_array:
zval_ptr_dtor_nogc(free_op_data);
}
} else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
- ZVAL_NEW_ARR(object_ptr);
- zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(object_ptr, zend_new_array(8));
goto try_assign_dim_array;
} else {
if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
@@ -23606,8 +23578,7 @@ try_assign_dim_array:
zval_ptr_dtor_nogc(free_op_data);
}
} else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
- ZVAL_NEW_ARR(object_ptr);
- zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(object_ptr, zend_new_array(8));
goto try_assign_dim_array;
} else {
if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
@@ -23698,8 +23669,7 @@ try_assign_dim_array:
}
} else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
- ZVAL_NEW_ARR(object_ptr);
- zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(object_ptr, zend_new_array(8));
goto try_assign_dim_array;
} else {
if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
@@ -24096,8 +24066,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_VAR_CV_HANDLER
} else {
size = 0;
}
- ZVAL_NEW_ARR(array);
- zend_hash_init(Z_ARRVAL_P(array), size, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(array, zend_new_array(size));
if (IS_VAR != IS_UNUSED) {
/* Explicitly initialize array as not-packed if flag is set */
@@ -24592,8 +24561,7 @@ assign_dim_op_new_array:
} else if (IS_VAR == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(container) == IS_UNDEF)) {
container = GET_OP1_UNDEF_CV(container, BP_VAR_RW);
assign_dim_op_convert_to_array:
- ZVAL_NEW_ARR(container);
- zend_hash_init(Z_ARRVAL_P(container), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(container, zend_new_array(8));
goto assign_dim_op_new_array;
}
@@ -26031,8 +25999,7 @@ try_assign_dim_array:
}
} else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
- ZVAL_NEW_ARR(object_ptr);
- zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(object_ptr, zend_new_array(8));
goto try_assign_dim_array;
} else {
if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
@@ -26124,8 +26091,7 @@ try_assign_dim_array:
zval_ptr_dtor_nogc(free_op_data);
}
} else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
- ZVAL_NEW_ARR(object_ptr);
- zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(object_ptr, zend_new_array(8));
goto try_assign_dim_array;
} else {
if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
@@ -26217,8 +26183,7 @@ try_assign_dim_array:
zval_ptr_dtor_nogc(free_op_data);
}
} else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
- ZVAL_NEW_ARR(object_ptr);
- zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(object_ptr, zend_new_array(8));
goto try_assign_dim_array;
} else {
if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
@@ -26309,8 +26274,7 @@ try_assign_dim_array:
}
} else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
- ZVAL_NEW_ARR(object_ptr);
- zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(object_ptr, zend_new_array(8));
goto try_assign_dim_array;
} else {
if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
@@ -26594,8 +26558,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_VAR_TMPVAR_HAN
} else {
size = 0;
}
- ZVAL_NEW_ARR(array);
- zend_hash_init(Z_ARRVAL_P(array), size, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(array, zend_new_array(size));
if (IS_VAR != IS_UNUSED) {
/* Explicitly initialize array as not-packed if flag is set */
@@ -29472,8 +29435,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FUNC_GET_ARGS_SPEC_UNUSED_UNUS
result_size = arg_count;
}
- ht = (zend_array *) emalloc(sizeof(zend_array));
- zend_hash_init(ht, result_size, NULL, ZVAL_PTR_DTOR, 0);
+ ht = zend_new_array(result_size);
ZVAL_ARR(EX_VAR(opline->result.var), ht);
if (result_size) {
@@ -33819,8 +33781,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CAST_SPEC_CV_HANDLER(ZEND_OPCO
if (opline->extended_value == IS_ARRAY) {
if (Z_TYPE_P(expr) != IS_OBJECT) {
- ZVAL_NEW_ARR(result);
- zend_hash_init(Z_ARRVAL_P(result), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(result, zend_new_array(8));
if (Z_TYPE_P(expr) != IS_NULL) {
expr = zend_hash_index_add_new(Z_ARRVAL_P(result), 0, expr);
if (IS_CV == IS_CONST) {
@@ -35387,8 +35348,7 @@ assign_dim_op_new_array:
} else if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(container) == IS_UNDEF)) {
container = GET_OP1_UNDEF_CV(container, BP_VAR_RW);
assign_dim_op_convert_to_array:
- ZVAL_NEW_ARR(container);
- zend_hash_init(Z_ARRVAL_P(container), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(container, zend_new_array(8));
goto assign_dim_op_new_array;
}
@@ -37021,8 +36981,7 @@ try_assign_dim_array:
}
} else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
- ZVAL_NEW_ARR(object_ptr);
- zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(object_ptr, zend_new_array(8));
goto try_assign_dim_array;
} else {
if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
@@ -37114,8 +37073,7 @@ try_assign_dim_array:
zval_ptr_dtor_nogc(free_op_data);
}
} else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
- ZVAL_NEW_ARR(object_ptr);
- zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(object_ptr, zend_new_array(8));
goto try_assign_dim_array;
} else {
if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
@@ -37207,8 +37165,7 @@ try_assign_dim_array:
zval_ptr_dtor_nogc(free_op_data);
}
} else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
- ZVAL_NEW_ARR(object_ptr);
- zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(object_ptr, zend_new_array(8));
goto try_assign_dim_array;
} else {
if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
@@ -37299,8 +37256,7 @@ try_assign_dim_array:
}
} else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
- ZVAL_NEW_ARR(object_ptr);
- zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(object_ptr, zend_new_array(8));
goto try_assign_dim_array;
} else {
if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
@@ -37787,8 +37743,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CV_CONST_HANDL
} else {
size = 0;
}
- ZVAL_NEW_ARR(array);
- zend_hash_init(Z_ARRVAL_P(array), size, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(array, zend_new_array(size));
if (IS_CV != IS_UNUSED) {
/* Explicitly initialize array as not-packed if flag is set */
@@ -39545,8 +39500,7 @@ assign_dim_op_new_array:
} else if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(container) == IS_UNDEF)) {
container = GET_OP1_UNDEF_CV(container, BP_VAR_RW);
assign_dim_op_convert_to_array:
- ZVAL_NEW_ARR(container);
- zend_hash_init(Z_ARRVAL_P(container), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(container, zend_new_array(8));
goto assign_dim_op_new_array;
}
@@ -40037,8 +39991,7 @@ try_assign_dim_array:
}
} else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
- ZVAL_NEW_ARR(object_ptr);
- zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(object_ptr, zend_new_array(8));
goto try_assign_dim_array;
} else {
if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
@@ -40130,8 +40083,7 @@ try_assign_dim_array:
zval_ptr_dtor_nogc(free_op_data);
}
} else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
- ZVAL_NEW_ARR(object_ptr);
- zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(object_ptr, zend_new_array(8));
goto try_assign_dim_array;
} else {
if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
@@ -40223,8 +40175,7 @@ try_assign_dim_array:
zval_ptr_dtor_nogc(free_op_data);
}
} else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
- ZVAL_NEW_ARR(object_ptr);
- zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(object_ptr, zend_new_array(8));
goto try_assign_dim_array;
} else {
if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
@@ -40315,8 +40266,7 @@ try_assign_dim_array:
}
} else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
- ZVAL_NEW_ARR(object_ptr);
- zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(object_ptr, zend_new_array(8));
goto try_assign_dim_array;
} else {
if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
@@ -40495,8 +40445,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CV_UNUSED_HAND
} else {
size = 0;
}
- ZVAL_NEW_ARR(array);
- zend_hash_init(Z_ARRVAL_P(array), size, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(array, zend_new_array(size));
if (IS_CV != IS_UNUSED) {
/* Explicitly initialize array as not-packed if flag is set */
@@ -41904,8 +41853,7 @@ assign_dim_op_new_array:
} else if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(container) == IS_UNDEF)) {
container = GET_OP1_UNDEF_CV(container, BP_VAR_RW);
assign_dim_op_convert_to_array:
- ZVAL_NEW_ARR(container);
- zend_hash_init(Z_ARRVAL_P(container), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(container, zend_new_array(8));
goto assign_dim_op_new_array;
}
@@ -43471,8 +43419,7 @@ try_assign_dim_array:
}
} else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
- ZVAL_NEW_ARR(object_ptr);
- zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(object_ptr, zend_new_array(8));
goto try_assign_dim_array;
} else {
if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
@@ -43564,8 +43511,7 @@ try_assign_dim_array:
zval_ptr_dtor_nogc(free_op_data);
}
} else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
- ZVAL_NEW_ARR(object_ptr);
- zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(object_ptr, zend_new_array(8));
goto try_assign_dim_array;
} else {
if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
@@ -43657,8 +43603,7 @@ try_assign_dim_array:
zval_ptr_dtor_nogc(free_op_data);
}
} else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
- ZVAL_NEW_ARR(object_ptr);
- zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(object_ptr, zend_new_array(8));
goto try_assign_dim_array;
} else {
if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
@@ -43749,8 +43694,7 @@ try_assign_dim_array:
}
} else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
- ZVAL_NEW_ARR(object_ptr);
- zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(object_ptr, zend_new_array(8));
goto try_assign_dim_array;
} else {
if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
@@ -44293,8 +44237,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CV_CV_HANDLER(
} else {
size = 0;
}
- ZVAL_NEW_ARR(array);
- zend_hash_init(Z_ARRVAL_P(array), size, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(array, zend_new_array(size));
if (IS_CV != IS_UNUSED) {
/* Explicitly initialize array as not-packed if flag is set */
@@ -45578,8 +45521,7 @@ assign_dim_op_new_array:
} else if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(container) == IS_UNDEF)) {
container = GET_OP1_UNDEF_CV(container, BP_VAR_RW);
assign_dim_op_convert_to_array:
- ZVAL_NEW_ARR(container);
- zend_hash_init(Z_ARRVAL_P(container), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(container, zend_new_array(8));
goto assign_dim_op_new_array;
}
@@ -47151,8 +47093,7 @@ try_assign_dim_array:
}
} else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
- ZVAL_NEW_ARR(object_ptr);
- zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(object_ptr, zend_new_array(8));
goto try_assign_dim_array;
} else {
if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
@@ -47244,8 +47185,7 @@ try_assign_dim_array:
zval_ptr_dtor_nogc(free_op_data);
}
} else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
- ZVAL_NEW_ARR(object_ptr);
- zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(object_ptr, zend_new_array(8));
goto try_assign_dim_array;
} else {
if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
@@ -47337,8 +47277,7 @@ try_assign_dim_array:
zval_ptr_dtor_nogc(free_op_data);
}
} else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
- ZVAL_NEW_ARR(object_ptr);
- zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(object_ptr, zend_new_array(8));
goto try_assign_dim_array;
} else {
if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
@@ -47429,8 +47368,7 @@ try_assign_dim_array:
}
} else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
- ZVAL_NEW_ARR(object_ptr);
- zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(object_ptr, zend_new_array(8));
goto try_assign_dim_array;
} else {
if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
@@ -47862,8 +47800,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CV_TMPVAR_HAND
} else {
size = 0;
}
- ZVAL_NEW_ARR(array);
- zend_hash_init(Z_ARRVAL_P(array), size, NULL, ZVAL_PTR_DTOR, 0);
+ ZVAL_ARR(array, zend_new_array(size));
if (IS_CV != IS_UNUSED) {
/* Explicitly initialize array as not-packed if flag is set */