mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Remove most uses of the ERROR type
It is now only used to signal exceptions for property reads. ERROR zvals are never returned back to the VM anymore, so there's no need to check for them when receiving a VAR. Also return MAY_BE_ERROR, as ERROR is now no longer relevant for inference.
This commit is contained in:
parent
7e77617533
commit
01fc1a3057
13 changed files with 259 additions and 691 deletions
|
@ -1,16 +0,0 @@
|
||||||
--TEST--
|
|
||||||
Bug #36303 (foreach on error_zval produces segfault)
|
|
||||||
--XFAIL--
|
|
||||||
TODO: ERROR zval still possible?
|
|
||||||
--FILE--
|
|
||||||
<?php
|
|
||||||
$x = [];
|
|
||||||
foreach ($x[[]] as &$v) {
|
|
||||||
}
|
|
||||||
echo "ok\n";
|
|
||||||
?>
|
|
||||||
--EXPECTF--
|
|
||||||
Warning: Illegal offset type in %s on line %d
|
|
||||||
|
|
||||||
Warning: Invalid argument supplied for foreach() in %s on line %d
|
|
||||||
ok
|
|
|
@ -1,13 +0,0 @@
|
||||||
--TEST--
|
|
||||||
Bug #52237 (Crash when passing the reference of the property of a non-object)
|
|
||||||
--XFAIL--
|
|
||||||
TODO: ERROR zval still possible?
|
|
||||||
--FILE--
|
|
||||||
<?php
|
|
||||||
$data = [];
|
|
||||||
preg_match('//', '', $data[[]]);
|
|
||||||
var_dump(count($data));
|
|
||||||
?>
|
|
||||||
--EXPECTF--
|
|
||||||
Warning: Illegal offset type in %s on line %d
|
|
||||||
int(0)
|
|
|
@ -617,8 +617,6 @@ static zend_never_inline zend_bool zend_verify_ref_array_assignable(zend_referen
|
||||||
/* this should modify object only if it's empty */
|
/* this should modify object only if it's empty */
|
||||||
static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_throw_non_object_error(zval *object, zval *property OPLINE_DC EXECUTE_DATA_DC)
|
static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_throw_non_object_error(zval *object, zval *property OPLINE_DC EXECUTE_DATA_DC)
|
||||||
{
|
{
|
||||||
/* TODO: What about the ERROR case? */
|
|
||||||
if (EXPECTED(!Z_ISERROR_P(object))) {
|
|
||||||
zend_string *tmp_property_name;
|
zend_string *tmp_property_name;
|
||||||
zend_string *property_name = zval_get_tmp_string(property, &tmp_property_name);
|
zend_string *property_name = zval_get_tmp_string(property, &tmp_property_name);
|
||||||
|
|
||||||
|
@ -640,7 +638,6 @@ static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_throw_non_object_erro
|
||||||
"Attempt to assign property '%s' of non-object", ZSTR_VAL(property_name));
|
"Attempt to assign property '%s' of non-object", ZSTR_VAL(property_name));
|
||||||
}
|
}
|
||||||
zend_tmp_string_release(tmp_property_name);
|
zend_tmp_string_release(tmp_property_name);
|
||||||
}
|
|
||||||
|
|
||||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
ZVAL_NULL(EX_VAR(opline->result.var));
|
||||||
|
@ -1914,7 +1911,7 @@ static ZEND_COLD void zend_binary_assign_op_dim_slow(zval *container, zval *dim
|
||||||
zend_check_string_offset(dim, BP_VAR_RW EXECUTE_DATA_CC);
|
zend_check_string_offset(dim, BP_VAR_RW EXECUTE_DATA_CC);
|
||||||
zend_wrong_string_offset(EXECUTE_DATA_C);
|
zend_wrong_string_offset(EXECUTE_DATA_C);
|
||||||
}
|
}
|
||||||
} else if (EXPECTED(!Z_ISERROR_P(container))) {
|
} else {
|
||||||
zend_use_scalar_as_array();
|
zend_use_scalar_as_array();
|
||||||
}
|
}
|
||||||
FREE_OP((opline+1)->op1_type, (opline+1)->op1.var);
|
FREE_OP((opline+1)->op1_type, (opline+1)->op1.var);
|
||||||
|
@ -2079,13 +2076,13 @@ fetch_from_array:
|
||||||
retval = zend_hash_next_index_insert(Z_ARRVAL_P(container), &EG(uninitialized_zval));
|
retval = zend_hash_next_index_insert(Z_ARRVAL_P(container), &EG(uninitialized_zval));
|
||||||
if (UNEXPECTED(retval == NULL)) {
|
if (UNEXPECTED(retval == NULL)) {
|
||||||
zend_cannot_add_element();
|
zend_cannot_add_element();
|
||||||
ZVAL_ERROR(result);
|
ZVAL_UNDEF(result);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
retval = zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), dim, dim_type, type EXECUTE_DATA_CC);
|
retval = zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), dim, dim_type, type EXECUTE_DATA_CC);
|
||||||
if (UNEXPECTED(!retval)) {
|
if (UNEXPECTED(!retval)) {
|
||||||
ZVAL_ERROR(result);
|
ZVAL_UNDEF(result);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2100,7 +2097,7 @@ fetch_from_array:
|
||||||
if (type != BP_VAR_UNSET) {
|
if (type != BP_VAR_UNSET) {
|
||||||
if (ZEND_REF_HAS_TYPE_SOURCES(ref)) {
|
if (ZEND_REF_HAS_TYPE_SOURCES(ref)) {
|
||||||
if (UNEXPECTED(!zend_verify_ref_array_assignable(ref))) {
|
if (UNEXPECTED(!zend_verify_ref_array_assignable(ref))) {
|
||||||
ZVAL_ERROR(result);
|
ZVAL_UNDEF(result);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2118,7 +2115,7 @@ fetch_from_array:
|
||||||
zend_check_string_offset(dim, type EXECUTE_DATA_CC);
|
zend_check_string_offset(dim, type EXECUTE_DATA_CC);
|
||||||
zend_wrong_string_offset(EXECUTE_DATA_C);
|
zend_wrong_string_offset(EXECUTE_DATA_C);
|
||||||
}
|
}
|
||||||
ZVAL_ERROR(result);
|
ZVAL_UNDEF(result);
|
||||||
} else if (EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
|
} else if (EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
|
||||||
if (ZEND_CONST_COND(dim_type == IS_CV, dim != NULL) && UNEXPECTED(Z_TYPE_P(dim) == IS_UNDEF)) {
|
if (ZEND_CONST_COND(dim_type == IS_CV, dim != NULL) && UNEXPECTED(Z_TYPE_P(dim) == IS_UNDEF)) {
|
||||||
dim = ZVAL_UNDEFINED_OP2();
|
dim = ZVAL_UNDEFINED_OP2();
|
||||||
|
@ -2150,7 +2147,8 @@ fetch_from_array:
|
||||||
ZVAL_INDIRECT(result, retval);
|
ZVAL_INDIRECT(result, retval);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ZVAL_ERROR(result);
|
ZEND_ASSERT(EG(exception) && "read_dimension() returned NULL without exception");
|
||||||
|
ZVAL_UNDEF(result);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
|
if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
|
||||||
|
@ -2168,15 +2166,13 @@ return_null:
|
||||||
}
|
}
|
||||||
ZVAL_NULL(result);
|
ZVAL_NULL(result);
|
||||||
}
|
}
|
||||||
} else if (EXPECTED(Z_ISERROR_P(container))) {
|
|
||||||
ZVAL_ERROR(result);
|
|
||||||
} else {
|
} else {
|
||||||
if (type == BP_VAR_UNSET) {
|
if (type == BP_VAR_UNSET) {
|
||||||
zend_throw_error(NULL, "Cannot unset offset in a non-array variable");
|
zend_throw_error(NULL, "Cannot unset offset in a non-array variable");
|
||||||
ZVAL_NULL(result);
|
ZVAL_UNDEF(result);
|
||||||
} else {
|
} else {
|
||||||
zend_use_scalar_as_array();
|
zend_use_scalar_as_array();
|
||||||
ZVAL_ERROR(result);
|
ZVAL_UNDEF(result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2698,13 +2694,12 @@ static zend_always_inline void zend_assign_to_property_reference(zval *container
|
||||||
variable_ptr = Z_INDIRECT_P(variable_ptr);
|
variable_ptr = Z_INDIRECT_P(variable_ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* variable_ptr may be ERROR if fetching the property threw an exception. */
|
||||||
if (UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
|
if (UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
|
||||||
variable_ptr = &EG(uninitialized_zval);
|
variable_ptr = &EG(uninitialized_zval);
|
||||||
} else if (UNEXPECTED(Z_TYPE(variable) != IS_INDIRECT)) {
|
} else if (UNEXPECTED(Z_TYPE(variable) != IS_INDIRECT)) {
|
||||||
zend_throw_error(NULL, "Cannot assign by reference to overloaded object");
|
zend_throw_error(NULL, "Cannot assign by reference to overloaded object");
|
||||||
variable_ptr = &EG(uninitialized_zval);
|
variable_ptr = &EG(uninitialized_zval);
|
||||||
} else if (/*OP_DATA_TYPE == IS_VAR &&*/ UNEXPECTED(Z_ISERROR_P(value_ptr))) {
|
|
||||||
variable_ptr = &EG(uninitialized_zval);
|
|
||||||
} else if (/*OP_DATA_TYPE == IS_VAR &&*/
|
} else if (/*OP_DATA_TYPE == IS_VAR &&*/
|
||||||
(opline->extended_value & ZEND_RETURNS_FUNCTION) &&
|
(opline->extended_value & ZEND_RETURNS_FUNCTION) &&
|
||||||
UNEXPECTED(!Z_ISREF_P(value_ptr))) {
|
UNEXPECTED(!Z_ISREF_P(value_ptr))) {
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
#define MAY_BE_ARRAY_KEY_STRING (1<<26)
|
#define MAY_BE_ARRAY_KEY_STRING (1<<26)
|
||||||
#define MAY_BE_ARRAY_KEY_ANY (MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_KEY_STRING)
|
#define MAY_BE_ARRAY_KEY_ANY (MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_KEY_STRING)
|
||||||
|
|
||||||
#define MAY_BE_ERROR (1<<27)
|
/* Bit 27 unused */
|
||||||
#define MAY_BE_CLASS (1<<28)
|
#define MAY_BE_CLASS (1<<28)
|
||||||
|
|
||||||
#endif /* ZEND_TYPE_INFO_H */
|
#endif /* ZEND_TYPE_INFO_H */
|
||||||
|
|
|
@ -1279,11 +1279,6 @@ ZEND_VM_HANDLER(26, ZEND_ASSIGN_OP, VAR|CV, CONST|TMPVAR|CV, OP)
|
||||||
value = GET_OP2_ZVAL_PTR(BP_VAR_R);
|
value = GET_OP2_ZVAL_PTR(BP_VAR_R);
|
||||||
var_ptr = GET_OP1_ZVAL_PTR_PTR(BP_VAR_RW);
|
var_ptr = GET_OP1_ZVAL_PTR_PTR(BP_VAR_RW);
|
||||||
|
|
||||||
if (OP1_TYPE == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
|
|
||||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
|
||||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
do {
|
do {
|
||||||
if (UNEXPECTED(Z_TYPE_P(var_ptr) == IS_REFERENCE)) {
|
if (UNEXPECTED(Z_TYPE_P(var_ptr) == IS_REFERENCE)) {
|
||||||
zend_reference *ref = Z_REF_P(var_ptr);
|
zend_reference *ref = Z_REF_P(var_ptr);
|
||||||
|
@ -1299,7 +1294,6 @@ ZEND_VM_HANDLER(26, ZEND_ASSIGN_OP, VAR|CV, CONST|TMPVAR|CV, OP)
|
||||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||||
ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
|
ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
FREE_OP2();
|
FREE_OP2();
|
||||||
FREE_OP1_VAR_PTR();
|
FREE_OP1_VAR_PTR();
|
||||||
|
@ -1520,13 +1514,6 @@ ZEND_VM_HELPER(zend_pre_inc_helper, VAR|CV, ANY)
|
||||||
|
|
||||||
var_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_RW);
|
var_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_RW);
|
||||||
|
|
||||||
if (OP1_TYPE == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
|
|
||||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
|
||||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
|
||||||
}
|
|
||||||
ZEND_VM_NEXT_OPCODE();
|
|
||||||
}
|
|
||||||
|
|
||||||
SAVE_OPLINE();
|
SAVE_OPLINE();
|
||||||
if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_P(var_ptr) == IS_UNDEF)) {
|
if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_P(var_ptr) == IS_UNDEF)) {
|
||||||
ZVAL_NULL(var_ptr);
|
ZVAL_NULL(var_ptr);
|
||||||
|
@ -1578,13 +1565,6 @@ ZEND_VM_HELPER(zend_pre_dec_helper, VAR|CV, ANY)
|
||||||
|
|
||||||
var_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_RW);
|
var_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_RW);
|
||||||
|
|
||||||
if (OP1_TYPE == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
|
|
||||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
|
||||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
|
||||||
}
|
|
||||||
ZEND_VM_NEXT_OPCODE();
|
|
||||||
}
|
|
||||||
|
|
||||||
SAVE_OPLINE();
|
SAVE_OPLINE();
|
||||||
if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_P(var_ptr) == IS_UNDEF)) {
|
if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_P(var_ptr) == IS_UNDEF)) {
|
||||||
ZVAL_NULL(var_ptr);
|
ZVAL_NULL(var_ptr);
|
||||||
|
@ -1637,11 +1617,6 @@ ZEND_VM_HELPER(zend_post_inc_helper, VAR|CV, ANY)
|
||||||
|
|
||||||
var_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_RW);
|
var_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_RW);
|
||||||
|
|
||||||
if (OP1_TYPE == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
|
|
||||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
|
||||||
ZEND_VM_NEXT_OPCODE();
|
|
||||||
}
|
|
||||||
|
|
||||||
SAVE_OPLINE();
|
SAVE_OPLINE();
|
||||||
if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_P(var_ptr) == IS_UNDEF)) {
|
if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_P(var_ptr) == IS_UNDEF)) {
|
||||||
ZVAL_NULL(var_ptr);
|
ZVAL_NULL(var_ptr);
|
||||||
|
@ -1690,11 +1665,6 @@ ZEND_VM_HELPER(zend_post_dec_helper, VAR|CV, ANY)
|
||||||
|
|
||||||
var_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_RW);
|
var_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_RW);
|
||||||
|
|
||||||
if (OP1_TYPE == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
|
|
||||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
|
||||||
ZEND_VM_NEXT_OPCODE();
|
|
||||||
}
|
|
||||||
|
|
||||||
SAVE_OPLINE();
|
SAVE_OPLINE();
|
||||||
if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_P(var_ptr) == IS_UNDEF)) {
|
if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_P(var_ptr) == IS_UNDEF)) {
|
||||||
ZVAL_NULL(var_ptr);
|
ZVAL_NULL(var_ptr);
|
||||||
|
@ -2718,9 +2688,7 @@ ZEND_VM_C_LABEL(try_assign_dim_array):
|
||||||
ZEND_VM_C_GOTO(try_assign_dim_array);
|
ZEND_VM_C_GOTO(try_assign_dim_array);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (OP1_TYPE != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
|
|
||||||
zend_use_scalar_as_array();
|
zend_use_scalar_as_array();
|
||||||
}
|
|
||||||
dim = GET_OP2_ZVAL_PTR(BP_VAR_R);
|
dim = GET_OP2_ZVAL_PTR(BP_VAR_R);
|
||||||
ZEND_VM_C_LABEL(assign_dim_error):
|
ZEND_VM_C_LABEL(assign_dim_error):
|
||||||
FREE_UNFETCHED_OP_DATA();
|
FREE_UNFETCHED_OP_DATA();
|
||||||
|
@ -2747,19 +2715,12 @@ ZEND_VM_HANDLER(22, ZEND_ASSIGN, VAR|CV, CONST|TMP|VAR|CV, SPEC(RETVAL))
|
||||||
value = GET_OP2_ZVAL_PTR(BP_VAR_R);
|
value = GET_OP2_ZVAL_PTR(BP_VAR_R);
|
||||||
variable_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_W);
|
variable_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_W);
|
||||||
|
|
||||||
if (OP1_TYPE == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
|
|
||||||
FREE_OP2();
|
|
||||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
|
||||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
value = zend_assign_to_variable(variable_ptr, value, OP2_TYPE, EX_USES_STRICT_TYPES());
|
value = zend_assign_to_variable(variable_ptr, value, OP2_TYPE, EX_USES_STRICT_TYPES());
|
||||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||||
ZVAL_COPY(EX_VAR(opline->result.var), value);
|
ZVAL_COPY(EX_VAR(opline->result.var), value);
|
||||||
}
|
}
|
||||||
FREE_OP1_VAR_PTR();
|
FREE_OP1_VAR_PTR();
|
||||||
/* zend_assign_to_variable() always takes care of op2, never free it! */
|
/* zend_assign_to_variable() always takes care of op2, never free it! */
|
||||||
}
|
|
||||||
|
|
||||||
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
||||||
}
|
}
|
||||||
|
@ -2774,15 +2735,11 @@ ZEND_VM_HANDLER(30, ZEND_ASSIGN_REF, VAR|CV, VAR|CV, SRC)
|
||||||
value_ptr = GET_OP2_ZVAL_PTR_PTR(BP_VAR_W);
|
value_ptr = GET_OP2_ZVAL_PTR_PTR(BP_VAR_W);
|
||||||
variable_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_W);
|
variable_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_W);
|
||||||
|
|
||||||
if (OP1_TYPE == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
|
if (OP1_TYPE == IS_VAR &&
|
||||||
variable_ptr = &EG(uninitialized_zval);
|
|
||||||
} else if (OP1_TYPE == IS_VAR &&
|
|
||||||
UNEXPECTED(Z_TYPE_P(EX_VAR(opline->op1.var)) != IS_INDIRECT)) {
|
UNEXPECTED(Z_TYPE_P(EX_VAR(opline->op1.var)) != IS_INDIRECT)) {
|
||||||
|
|
||||||
zend_throw_error(NULL, "Cannot assign by reference to an array dimension of an object");
|
zend_throw_error(NULL, "Cannot assign by reference to an array dimension of an object");
|
||||||
variable_ptr = &EG(uninitialized_zval);
|
variable_ptr = &EG(uninitialized_zval);
|
||||||
} else if (OP2_TYPE == IS_VAR && UNEXPECTED(Z_ISERROR_P(value_ptr))) {
|
|
||||||
variable_ptr = &EG(uninitialized_zval);
|
|
||||||
} else if (OP2_TYPE == IS_VAR &&
|
} else if (OP2_TYPE == IS_VAR &&
|
||||||
opline->extended_value == ZEND_RETURNS_FUNCTION &&
|
opline->extended_value == ZEND_RETURNS_FUNCTION &&
|
||||||
UNEXPECTED(!Z_ISREF_P(value_ptr))) {
|
UNEXPECTED(!Z_ISREF_P(value_ptr))) {
|
||||||
|
@ -2861,9 +2818,7 @@ ZEND_VM_HANDLER(33, ZEND_ASSIGN_STATIC_PROP_REF, ANY, ANY, CACHE_SLOT|SRC)
|
||||||
|
|
||||||
value_ptr = GET_OP_DATA_ZVAL_PTR_PTR(BP_VAR_W);
|
value_ptr = GET_OP_DATA_ZVAL_PTR_PTR(BP_VAR_W);
|
||||||
|
|
||||||
if (OP_DATA_TYPE == IS_VAR && UNEXPECTED(Z_ISERROR_P(value_ptr))) {
|
if (OP_DATA_TYPE == IS_VAR && (opline->extended_value & ZEND_RETURNS_FUNCTION) && UNEXPECTED(!Z_ISREF_P(value_ptr))) {
|
||||||
prop = &EG(uninitialized_zval);
|
|
||||||
} else if (OP_DATA_TYPE == IS_VAR && (opline->extended_value & ZEND_RETURNS_FUNCTION) && UNEXPECTED(!Z_ISREF_P(value_ptr))) {
|
|
||||||
if (UNEXPECTED(!zend_wrong_assign_to_variable_reference(prop, value_ptr OPLINE_CC EXECUTE_DATA_CC))) {
|
if (UNEXPECTED(!zend_wrong_assign_to_variable_reference(prop, value_ptr OPLINE_CC EXECUTE_DATA_CC))) {
|
||||||
prop = &EG(uninitialized_zval);
|
prop = &EG(uninitialized_zval);
|
||||||
}
|
}
|
||||||
|
@ -4789,12 +4744,6 @@ ZEND_VM_HANDLER(67, ZEND_SEND_REF, VAR|CV, NUM)
|
||||||
varptr = GET_OP1_ZVAL_PTR_PTR(BP_VAR_W);
|
varptr = GET_OP1_ZVAL_PTR_PTR(BP_VAR_W);
|
||||||
|
|
||||||
arg = ZEND_CALL_VAR(EX(call), opline->result.var);
|
arg = ZEND_CALL_VAR(EX(call), opline->result.var);
|
||||||
if (OP1_TYPE == IS_VAR && UNEXPECTED(Z_ISERROR_P(varptr))) {
|
|
||||||
ZVAL_NEW_EMPTY_REF(arg);
|
|
||||||
ZVAL_NULL(Z_REFVAL_P(arg));
|
|
||||||
ZEND_VM_NEXT_OPCODE();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Z_ISREF_P(varptr)) {
|
if (Z_ISREF_P(varptr)) {
|
||||||
Z_ADDREF_P(varptr);
|
Z_ADDREF_P(varptr);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1102,9 +1102,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_STATIC_PROP_REF_SPEC_HA
|
||||||
|
|
||||||
value_ptr = get_zval_ptr_ptr((opline+1)->op1_type, (opline+1)->op1, BP_VAR_W);
|
value_ptr = get_zval_ptr_ptr((opline+1)->op1_type, (opline+1)->op1, BP_VAR_W);
|
||||||
|
|
||||||
if ((opline+1)->op1_type == IS_VAR && UNEXPECTED(Z_ISERROR_P(value_ptr))) {
|
if ((opline+1)->op1_type == IS_VAR && (opline->extended_value & ZEND_RETURNS_FUNCTION) && UNEXPECTED(!Z_ISREF_P(value_ptr))) {
|
||||||
prop = &EG(uninitialized_zval);
|
|
||||||
} else if ((opline+1)->op1_type == IS_VAR && (opline->extended_value & ZEND_RETURNS_FUNCTION) && UNEXPECTED(!Z_ISREF_P(value_ptr))) {
|
|
||||||
if (UNEXPECTED(!zend_wrong_assign_to_variable_reference(prop, value_ptr OPLINE_CC EXECUTE_DATA_CC))) {
|
if (UNEXPECTED(!zend_wrong_assign_to_variable_reference(prop, value_ptr OPLINE_CC EXECUTE_DATA_CC))) {
|
||||||
prop = &EG(uninitialized_zval);
|
prop = &EG(uninitialized_zval);
|
||||||
}
|
}
|
||||||
|
@ -20241,13 +20239,6 @@ static zend_never_inline ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_inc_help
|
||||||
|
|
||||||
var_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC);
|
var_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC);
|
||||||
|
|
||||||
if (IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
|
|
||||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
|
||||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
|
||||||
}
|
|
||||||
ZEND_VM_NEXT_OPCODE();
|
|
||||||
}
|
|
||||||
|
|
||||||
SAVE_OPLINE();
|
SAVE_OPLINE();
|
||||||
if (IS_VAR == IS_CV && UNEXPECTED(Z_TYPE_P(var_ptr) == IS_UNDEF)) {
|
if (IS_VAR == IS_CV && UNEXPECTED(Z_TYPE_P(var_ptr) == IS_UNDEF)) {
|
||||||
ZVAL_NULL(var_ptr);
|
ZVAL_NULL(var_ptr);
|
||||||
|
@ -20317,13 +20308,6 @@ static zend_never_inline ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_dec_help
|
||||||
|
|
||||||
var_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC);
|
var_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC);
|
||||||
|
|
||||||
if (IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
|
|
||||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
|
||||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
|
||||||
}
|
|
||||||
ZEND_VM_NEXT_OPCODE();
|
|
||||||
}
|
|
||||||
|
|
||||||
SAVE_OPLINE();
|
SAVE_OPLINE();
|
||||||
if (IS_VAR == IS_CV && UNEXPECTED(Z_TYPE_P(var_ptr) == IS_UNDEF)) {
|
if (IS_VAR == IS_CV && UNEXPECTED(Z_TYPE_P(var_ptr) == IS_UNDEF)) {
|
||||||
ZVAL_NULL(var_ptr);
|
ZVAL_NULL(var_ptr);
|
||||||
|
@ -20394,11 +20378,6 @@ static zend_never_inline ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_inc_hel
|
||||||
|
|
||||||
var_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC);
|
var_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC);
|
||||||
|
|
||||||
if (IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
|
|
||||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
|
||||||
ZEND_VM_NEXT_OPCODE();
|
|
||||||
}
|
|
||||||
|
|
||||||
SAVE_OPLINE();
|
SAVE_OPLINE();
|
||||||
if (IS_VAR == IS_CV && UNEXPECTED(Z_TYPE_P(var_ptr) == IS_UNDEF)) {
|
if (IS_VAR == IS_CV && UNEXPECTED(Z_TYPE_P(var_ptr) == IS_UNDEF)) {
|
||||||
ZVAL_NULL(var_ptr);
|
ZVAL_NULL(var_ptr);
|
||||||
|
@ -20447,11 +20426,6 @@ static zend_never_inline ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_dec_hel
|
||||||
|
|
||||||
var_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC);
|
var_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC);
|
||||||
|
|
||||||
if (IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
|
|
||||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
|
||||||
ZEND_VM_NEXT_OPCODE();
|
|
||||||
}
|
|
||||||
|
|
||||||
SAVE_OPLINE();
|
SAVE_OPLINE();
|
||||||
if (IS_VAR == IS_CV && UNEXPECTED(Z_TYPE_P(var_ptr) == IS_UNDEF)) {
|
if (IS_VAR == IS_CV && UNEXPECTED(Z_TYPE_P(var_ptr) == IS_UNDEF)) {
|
||||||
ZVAL_NULL(var_ptr);
|
ZVAL_NULL(var_ptr);
|
||||||
|
@ -20853,12 +20827,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_REF_SPEC_VAR_HANDLER(ZEND
|
||||||
varptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC);
|
varptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC);
|
||||||
|
|
||||||
arg = ZEND_CALL_VAR(EX(call), opline->result.var);
|
arg = ZEND_CALL_VAR(EX(call), opline->result.var);
|
||||||
if (IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(varptr))) {
|
|
||||||
ZVAL_NEW_EMPTY_REF(arg);
|
|
||||||
ZVAL_NULL(Z_REFVAL_P(arg));
|
|
||||||
ZEND_VM_NEXT_OPCODE();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Z_ISREF_P(varptr)) {
|
if (Z_ISREF_P(varptr)) {
|
||||||
Z_ADDREF_P(varptr);
|
Z_ADDREF_P(varptr);
|
||||||
} else {
|
} else {
|
||||||
|
@ -22092,11 +22060,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OP_SPEC_VAR_CONST_HANDL
|
||||||
value = RT_CONSTANT(opline, opline->op2);
|
value = RT_CONSTANT(opline, opline->op2);
|
||||||
var_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC);
|
var_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC);
|
||||||
|
|
||||||
if (IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
|
|
||||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
|
||||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
do {
|
do {
|
||||||
if (UNEXPECTED(Z_TYPE_P(var_ptr) == IS_REFERENCE)) {
|
if (UNEXPECTED(Z_TYPE_P(var_ptr) == IS_REFERENCE)) {
|
||||||
zend_reference *ref = Z_REF_P(var_ptr);
|
zend_reference *ref = Z_REF_P(var_ptr);
|
||||||
|
@ -22112,7 +22075,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OP_SPEC_VAR_CONST_HANDL
|
||||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||||
ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
|
ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
|
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
|
||||||
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
||||||
|
@ -23104,9 +23066,7 @@ try_assign_dim_array:
|
||||||
goto try_assign_dim_array;
|
goto try_assign_dim_array;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
|
|
||||||
zend_use_scalar_as_array();
|
zend_use_scalar_as_array();
|
||||||
}
|
|
||||||
dim = RT_CONSTANT(opline, opline->op2);
|
dim = RT_CONSTANT(opline, opline->op2);
|
||||||
assign_dim_error:
|
assign_dim_error:
|
||||||
|
|
||||||
|
@ -23220,9 +23180,7 @@ try_assign_dim_array:
|
||||||
goto try_assign_dim_array;
|
goto try_assign_dim_array;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
|
|
||||||
zend_use_scalar_as_array();
|
zend_use_scalar_as_array();
|
||||||
}
|
|
||||||
dim = RT_CONSTANT(opline, opline->op2);
|
dim = RT_CONSTANT(opline, opline->op2);
|
||||||
assign_dim_error:
|
assign_dim_error:
|
||||||
zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
|
zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
|
||||||
|
@ -23336,9 +23294,7 @@ try_assign_dim_array:
|
||||||
goto try_assign_dim_array;
|
goto try_assign_dim_array;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
|
|
||||||
zend_use_scalar_as_array();
|
zend_use_scalar_as_array();
|
||||||
}
|
|
||||||
dim = RT_CONSTANT(opline, opline->op2);
|
dim = RT_CONSTANT(opline, opline->op2);
|
||||||
assign_dim_error:
|
assign_dim_error:
|
||||||
zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
|
zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
|
||||||
|
@ -23451,9 +23407,7 @@ try_assign_dim_array:
|
||||||
goto try_assign_dim_array;
|
goto try_assign_dim_array;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
|
|
||||||
zend_use_scalar_as_array();
|
zend_use_scalar_as_array();
|
||||||
}
|
|
||||||
dim = RT_CONSTANT(opline, opline->op2);
|
dim = RT_CONSTANT(opline, opline->op2);
|
||||||
assign_dim_error:
|
assign_dim_error:
|
||||||
|
|
||||||
|
@ -23480,19 +23434,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_CONST_RETVAL_U
|
||||||
value = RT_CONSTANT(opline, opline->op2);
|
value = RT_CONSTANT(opline, opline->op2);
|
||||||
variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC);
|
variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC);
|
||||||
|
|
||||||
if (IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
|
|
||||||
|
|
||||||
if (UNEXPECTED(0)) {
|
|
||||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES());
|
value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES());
|
||||||
if (UNEXPECTED(0)) {
|
if (UNEXPECTED(0)) {
|
||||||
ZVAL_COPY(EX_VAR(opline->result.var), value);
|
ZVAL_COPY(EX_VAR(opline->result.var), value);
|
||||||
}
|
}
|
||||||
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
|
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
|
||||||
/* zend_assign_to_variable() always takes care of op2, never free it! */
|
/* zend_assign_to_variable() always takes care of op2, never free it! */
|
||||||
}
|
|
||||||
|
|
||||||
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
||||||
}
|
}
|
||||||
|
@ -23507,19 +23454,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_CONST_RETVAL_U
|
||||||
value = RT_CONSTANT(opline, opline->op2);
|
value = RT_CONSTANT(opline, opline->op2);
|
||||||
variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC);
|
variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC);
|
||||||
|
|
||||||
if (IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
|
|
||||||
|
|
||||||
if (UNEXPECTED(1)) {
|
|
||||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES());
|
value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES());
|
||||||
if (UNEXPECTED(1)) {
|
if (UNEXPECTED(1)) {
|
||||||
ZVAL_COPY(EX_VAR(opline->result.var), value);
|
ZVAL_COPY(EX_VAR(opline->result.var), value);
|
||||||
}
|
}
|
||||||
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
|
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
|
||||||
/* zend_assign_to_variable() always takes care of op2, never free it! */
|
/* zend_assign_to_variable() always takes care of op2, never free it! */
|
||||||
}
|
|
||||||
|
|
||||||
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
||||||
}
|
}
|
||||||
|
@ -24438,11 +24378,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OP_SPEC_VAR_TMPVAR_HAND
|
||||||
value = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC);
|
value = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC);
|
||||||
var_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC);
|
var_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC);
|
||||||
|
|
||||||
if (IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
|
|
||||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
|
||||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
do {
|
do {
|
||||||
if (UNEXPECTED(Z_TYPE_P(var_ptr) == IS_REFERENCE)) {
|
if (UNEXPECTED(Z_TYPE_P(var_ptr) == IS_REFERENCE)) {
|
||||||
zend_reference *ref = Z_REF_P(var_ptr);
|
zend_reference *ref = Z_REF_P(var_ptr);
|
||||||
|
@ -24458,7 +24393,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OP_SPEC_VAR_TMPVAR_HAND
|
||||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||||
ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
|
ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
|
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
|
||||||
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
|
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
|
||||||
|
@ -25454,9 +25388,7 @@ try_assign_dim_array:
|
||||||
goto try_assign_dim_array;
|
goto try_assign_dim_array;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
|
|
||||||
zend_use_scalar_as_array();
|
zend_use_scalar_as_array();
|
||||||
}
|
|
||||||
dim = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC);
|
dim = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC);
|
||||||
assign_dim_error:
|
assign_dim_error:
|
||||||
|
|
||||||
|
@ -25570,9 +25502,7 @@ try_assign_dim_array:
|
||||||
goto try_assign_dim_array;
|
goto try_assign_dim_array;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
|
|
||||||
zend_use_scalar_as_array();
|
zend_use_scalar_as_array();
|
||||||
}
|
|
||||||
dim = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC);
|
dim = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC);
|
||||||
assign_dim_error:
|
assign_dim_error:
|
||||||
zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
|
zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
|
||||||
|
@ -25686,9 +25616,7 @@ try_assign_dim_array:
|
||||||
goto try_assign_dim_array;
|
goto try_assign_dim_array;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
|
|
||||||
zend_use_scalar_as_array();
|
zend_use_scalar_as_array();
|
||||||
}
|
|
||||||
dim = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC);
|
dim = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC);
|
||||||
assign_dim_error:
|
assign_dim_error:
|
||||||
zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
|
zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
|
||||||
|
@ -25801,9 +25729,7 @@ try_assign_dim_array:
|
||||||
goto try_assign_dim_array;
|
goto try_assign_dim_array;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
|
|
||||||
zend_use_scalar_as_array();
|
zend_use_scalar_as_array();
|
||||||
}
|
|
||||||
dim = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC);
|
dim = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC);
|
||||||
assign_dim_error:
|
assign_dim_error:
|
||||||
|
|
||||||
|
@ -26336,19 +26262,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_TMP_RETVAL_UNU
|
||||||
value = _get_zval_ptr_tmp(opline->op2.var EXECUTE_DATA_CC);
|
value = _get_zval_ptr_tmp(opline->op2.var EXECUTE_DATA_CC);
|
||||||
variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC);
|
variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC);
|
||||||
|
|
||||||
if (IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
|
|
||||||
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
|
|
||||||
if (UNEXPECTED(0)) {
|
|
||||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES());
|
value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES());
|
||||||
if (UNEXPECTED(0)) {
|
if (UNEXPECTED(0)) {
|
||||||
ZVAL_COPY(EX_VAR(opline->result.var), value);
|
ZVAL_COPY(EX_VAR(opline->result.var), value);
|
||||||
}
|
}
|
||||||
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
|
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
|
||||||
/* zend_assign_to_variable() always takes care of op2, never free it! */
|
/* zend_assign_to_variable() always takes care of op2, never free it! */
|
||||||
}
|
|
||||||
|
|
||||||
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
||||||
}
|
}
|
||||||
|
@ -26363,19 +26282,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_TMP_RETVAL_USE
|
||||||
value = _get_zval_ptr_tmp(opline->op2.var EXECUTE_DATA_CC);
|
value = _get_zval_ptr_tmp(opline->op2.var EXECUTE_DATA_CC);
|
||||||
variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC);
|
variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC);
|
||||||
|
|
||||||
if (IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
|
|
||||||
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
|
|
||||||
if (UNEXPECTED(1)) {
|
|
||||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES());
|
value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES());
|
||||||
if (UNEXPECTED(1)) {
|
if (UNEXPECTED(1)) {
|
||||||
ZVAL_COPY(EX_VAR(opline->result.var), value);
|
ZVAL_COPY(EX_VAR(opline->result.var), value);
|
||||||
}
|
}
|
||||||
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
|
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
|
||||||
/* zend_assign_to_variable() always takes care of op2, never free it! */
|
/* zend_assign_to_variable() always takes care of op2, never free it! */
|
||||||
}
|
|
||||||
|
|
||||||
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
||||||
}
|
}
|
||||||
|
@ -26562,19 +26474,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_VAR_RETVAL_UNU
|
||||||
value = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC);
|
value = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC);
|
||||||
variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC);
|
variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC);
|
||||||
|
|
||||||
if (IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
|
|
||||||
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
|
|
||||||
if (UNEXPECTED(0)) {
|
|
||||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES());
|
value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES());
|
||||||
if (UNEXPECTED(0)) {
|
if (UNEXPECTED(0)) {
|
||||||
ZVAL_COPY(EX_VAR(opline->result.var), value);
|
ZVAL_COPY(EX_VAR(opline->result.var), value);
|
||||||
}
|
}
|
||||||
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
|
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
|
||||||
/* zend_assign_to_variable() always takes care of op2, never free it! */
|
/* zend_assign_to_variable() always takes care of op2, never free it! */
|
||||||
}
|
|
||||||
|
|
||||||
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
||||||
}
|
}
|
||||||
|
@ -26589,19 +26494,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_VAR_RETVAL_USE
|
||||||
value = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC);
|
value = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC);
|
||||||
variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC);
|
variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC);
|
||||||
|
|
||||||
if (IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
|
|
||||||
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
|
|
||||||
if (UNEXPECTED(1)) {
|
|
||||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES());
|
value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES());
|
||||||
if (UNEXPECTED(1)) {
|
if (UNEXPECTED(1)) {
|
||||||
ZVAL_COPY(EX_VAR(opline->result.var), value);
|
ZVAL_COPY(EX_VAR(opline->result.var), value);
|
||||||
}
|
}
|
||||||
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
|
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
|
||||||
/* zend_assign_to_variable() always takes care of op2, never free it! */
|
/* zend_assign_to_variable() always takes care of op2, never free it! */
|
||||||
}
|
|
||||||
|
|
||||||
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
||||||
}
|
}
|
||||||
|
@ -26616,15 +26514,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_VAR_VAR_HANDLE
|
||||||
value_ptr = _get_zval_ptr_ptr_var(opline->op2.var EXECUTE_DATA_CC);
|
value_ptr = _get_zval_ptr_ptr_var(opline->op2.var EXECUTE_DATA_CC);
|
||||||
variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC);
|
variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC);
|
||||||
|
|
||||||
if (IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
|
if (IS_VAR == IS_VAR &&
|
||||||
variable_ptr = &EG(uninitialized_zval);
|
|
||||||
} else if (IS_VAR == IS_VAR &&
|
|
||||||
UNEXPECTED(Z_TYPE_P(EX_VAR(opline->op1.var)) != IS_INDIRECT)) {
|
UNEXPECTED(Z_TYPE_P(EX_VAR(opline->op1.var)) != IS_INDIRECT)) {
|
||||||
|
|
||||||
zend_throw_error(NULL, "Cannot assign by reference to an array dimension of an object");
|
zend_throw_error(NULL, "Cannot assign by reference to an array dimension of an object");
|
||||||
variable_ptr = &EG(uninitialized_zval);
|
variable_ptr = &EG(uninitialized_zval);
|
||||||
} else if (IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(value_ptr))) {
|
|
||||||
variable_ptr = &EG(uninitialized_zval);
|
|
||||||
} else if (IS_VAR == IS_VAR &&
|
} else if (IS_VAR == IS_VAR &&
|
||||||
opline->extended_value == ZEND_RETURNS_FUNCTION &&
|
opline->extended_value == ZEND_RETURNS_FUNCTION &&
|
||||||
UNEXPECTED(!Z_ISREF_P(value_ptr))) {
|
UNEXPECTED(!Z_ISREF_P(value_ptr))) {
|
||||||
|
@ -27011,9 +26905,7 @@ try_assign_dim_array:
|
||||||
goto try_assign_dim_array;
|
goto try_assign_dim_array;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
|
|
||||||
zend_use_scalar_as_array();
|
zend_use_scalar_as_array();
|
||||||
}
|
|
||||||
dim = NULL;
|
dim = NULL;
|
||||||
assign_dim_error:
|
assign_dim_error:
|
||||||
|
|
||||||
|
@ -27127,9 +27019,7 @@ try_assign_dim_array:
|
||||||
goto try_assign_dim_array;
|
goto try_assign_dim_array;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
|
|
||||||
zend_use_scalar_as_array();
|
zend_use_scalar_as_array();
|
||||||
}
|
|
||||||
dim = NULL;
|
dim = NULL;
|
||||||
assign_dim_error:
|
assign_dim_error:
|
||||||
zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
|
zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
|
||||||
|
@ -27243,9 +27133,7 @@ try_assign_dim_array:
|
||||||
goto try_assign_dim_array;
|
goto try_assign_dim_array;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
|
|
||||||
zend_use_scalar_as_array();
|
zend_use_scalar_as_array();
|
||||||
}
|
|
||||||
dim = NULL;
|
dim = NULL;
|
||||||
assign_dim_error:
|
assign_dim_error:
|
||||||
zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
|
zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
|
||||||
|
@ -27358,9 +27246,7 @@ try_assign_dim_array:
|
||||||
goto try_assign_dim_array;
|
goto try_assign_dim_array;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
|
|
||||||
zend_use_scalar_as_array();
|
zend_use_scalar_as_array();
|
||||||
}
|
|
||||||
dim = NULL;
|
dim = NULL;
|
||||||
assign_dim_error:
|
assign_dim_error:
|
||||||
|
|
||||||
|
@ -28145,11 +28031,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OP_SPEC_VAR_CV_HANDLER(
|
||||||
value = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC);
|
value = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC);
|
||||||
var_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC);
|
var_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC);
|
||||||
|
|
||||||
if (IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
|
|
||||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
|
||||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
do {
|
do {
|
||||||
if (UNEXPECTED(Z_TYPE_P(var_ptr) == IS_REFERENCE)) {
|
if (UNEXPECTED(Z_TYPE_P(var_ptr) == IS_REFERENCE)) {
|
||||||
zend_reference *ref = Z_REF_P(var_ptr);
|
zend_reference *ref = Z_REF_P(var_ptr);
|
||||||
|
@ -28165,7 +28046,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OP_SPEC_VAR_CV_HANDLER(
|
||||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||||
ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
|
ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
|
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
|
||||||
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
||||||
|
@ -29157,9 +29037,7 @@ try_assign_dim_array:
|
||||||
goto try_assign_dim_array;
|
goto try_assign_dim_array;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
|
|
||||||
zend_use_scalar_as_array();
|
zend_use_scalar_as_array();
|
||||||
}
|
|
||||||
dim = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC);
|
dim = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC);
|
||||||
assign_dim_error:
|
assign_dim_error:
|
||||||
|
|
||||||
|
@ -29273,9 +29151,7 @@ try_assign_dim_array:
|
||||||
goto try_assign_dim_array;
|
goto try_assign_dim_array;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
|
|
||||||
zend_use_scalar_as_array();
|
zend_use_scalar_as_array();
|
||||||
}
|
|
||||||
dim = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC);
|
dim = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC);
|
||||||
assign_dim_error:
|
assign_dim_error:
|
||||||
zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
|
zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
|
||||||
|
@ -29389,9 +29265,7 @@ try_assign_dim_array:
|
||||||
goto try_assign_dim_array;
|
goto try_assign_dim_array;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
|
|
||||||
zend_use_scalar_as_array();
|
zend_use_scalar_as_array();
|
||||||
}
|
|
||||||
dim = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC);
|
dim = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC);
|
||||||
assign_dim_error:
|
assign_dim_error:
|
||||||
zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
|
zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
|
||||||
|
@ -29504,9 +29378,7 @@ try_assign_dim_array:
|
||||||
goto try_assign_dim_array;
|
goto try_assign_dim_array;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
|
|
||||||
zend_use_scalar_as_array();
|
zend_use_scalar_as_array();
|
||||||
}
|
|
||||||
dim = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC);
|
dim = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC);
|
||||||
assign_dim_error:
|
assign_dim_error:
|
||||||
|
|
||||||
|
@ -29533,19 +29405,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_CV_RETVAL_UNUS
|
||||||
value = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC);
|
value = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC);
|
||||||
variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC);
|
variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC);
|
||||||
|
|
||||||
if (IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
|
|
||||||
|
|
||||||
if (UNEXPECTED(0)) {
|
|
||||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES());
|
value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES());
|
||||||
if (UNEXPECTED(0)) {
|
if (UNEXPECTED(0)) {
|
||||||
ZVAL_COPY(EX_VAR(opline->result.var), value);
|
ZVAL_COPY(EX_VAR(opline->result.var), value);
|
||||||
}
|
}
|
||||||
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
|
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
|
||||||
/* zend_assign_to_variable() always takes care of op2, never free it! */
|
/* zend_assign_to_variable() always takes care of op2, never free it! */
|
||||||
}
|
|
||||||
|
|
||||||
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
||||||
}
|
}
|
||||||
|
@ -29560,19 +29425,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_CV_RETVAL_USED
|
||||||
value = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC);
|
value = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC);
|
||||||
variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC);
|
variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC);
|
||||||
|
|
||||||
if (IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
|
|
||||||
|
|
||||||
if (UNEXPECTED(1)) {
|
|
||||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES());
|
value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES());
|
||||||
if (UNEXPECTED(1)) {
|
if (UNEXPECTED(1)) {
|
||||||
ZVAL_COPY(EX_VAR(opline->result.var), value);
|
ZVAL_COPY(EX_VAR(opline->result.var), value);
|
||||||
}
|
}
|
||||||
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
|
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
|
||||||
/* zend_assign_to_variable() always takes care of op2, never free it! */
|
/* zend_assign_to_variable() always takes care of op2, never free it! */
|
||||||
}
|
|
||||||
|
|
||||||
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
||||||
}
|
}
|
||||||
|
@ -29587,15 +29445,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_VAR_CV_HANDLER
|
||||||
value_ptr = _get_zval_ptr_cv_BP_VAR_W(opline->op2.var EXECUTE_DATA_CC);
|
value_ptr = _get_zval_ptr_cv_BP_VAR_W(opline->op2.var EXECUTE_DATA_CC);
|
||||||
variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC);
|
variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC);
|
||||||
|
|
||||||
if (IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
|
if (IS_VAR == IS_VAR &&
|
||||||
variable_ptr = &EG(uninitialized_zval);
|
|
||||||
} else if (IS_VAR == IS_VAR &&
|
|
||||||
UNEXPECTED(Z_TYPE_P(EX_VAR(opline->op1.var)) != IS_INDIRECT)) {
|
UNEXPECTED(Z_TYPE_P(EX_VAR(opline->op1.var)) != IS_INDIRECT)) {
|
||||||
|
|
||||||
zend_throw_error(NULL, "Cannot assign by reference to an array dimension of an object");
|
zend_throw_error(NULL, "Cannot assign by reference to an array dimension of an object");
|
||||||
variable_ptr = &EG(uninitialized_zval);
|
variable_ptr = &EG(uninitialized_zval);
|
||||||
} else if (IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(value_ptr))) {
|
|
||||||
variable_ptr = &EG(uninitialized_zval);
|
|
||||||
} else if (IS_CV == IS_VAR &&
|
} else if (IS_CV == IS_VAR &&
|
||||||
opline->extended_value == ZEND_RETURNS_FUNCTION &&
|
opline->extended_value == ZEND_RETURNS_FUNCTION &&
|
||||||
UNEXPECTED(!Z_ISREF_P(value_ptr))) {
|
UNEXPECTED(!Z_ISREF_P(value_ptr))) {
|
||||||
|
@ -36923,13 +36777,6 @@ static zend_never_inline ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_inc_help
|
||||||
|
|
||||||
var_ptr = EX_VAR(opline->op1.var);
|
var_ptr = EX_VAR(opline->op1.var);
|
||||||
|
|
||||||
if (IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
|
|
||||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
|
||||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
|
||||||
}
|
|
||||||
ZEND_VM_NEXT_OPCODE();
|
|
||||||
}
|
|
||||||
|
|
||||||
SAVE_OPLINE();
|
SAVE_OPLINE();
|
||||||
if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(var_ptr) == IS_UNDEF)) {
|
if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(var_ptr) == IS_UNDEF)) {
|
||||||
ZVAL_NULL(var_ptr);
|
ZVAL_NULL(var_ptr);
|
||||||
|
@ -36998,13 +36845,6 @@ static zend_never_inline ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_dec_help
|
||||||
|
|
||||||
var_ptr = EX_VAR(opline->op1.var);
|
var_ptr = EX_VAR(opline->op1.var);
|
||||||
|
|
||||||
if (IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
|
|
||||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
|
||||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
|
||||||
}
|
|
||||||
ZEND_VM_NEXT_OPCODE();
|
|
||||||
}
|
|
||||||
|
|
||||||
SAVE_OPLINE();
|
SAVE_OPLINE();
|
||||||
if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(var_ptr) == IS_UNDEF)) {
|
if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(var_ptr) == IS_UNDEF)) {
|
||||||
ZVAL_NULL(var_ptr);
|
ZVAL_NULL(var_ptr);
|
||||||
|
@ -37074,11 +36914,6 @@ static zend_never_inline ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_inc_hel
|
||||||
|
|
||||||
var_ptr = EX_VAR(opline->op1.var);
|
var_ptr = EX_VAR(opline->op1.var);
|
||||||
|
|
||||||
if (IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
|
|
||||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
|
||||||
ZEND_VM_NEXT_OPCODE();
|
|
||||||
}
|
|
||||||
|
|
||||||
SAVE_OPLINE();
|
SAVE_OPLINE();
|
||||||
if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(var_ptr) == IS_UNDEF)) {
|
if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(var_ptr) == IS_UNDEF)) {
|
||||||
ZVAL_NULL(var_ptr);
|
ZVAL_NULL(var_ptr);
|
||||||
|
@ -37126,11 +36961,6 @@ static zend_never_inline ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_dec_hel
|
||||||
|
|
||||||
var_ptr = EX_VAR(opline->op1.var);
|
var_ptr = EX_VAR(opline->op1.var);
|
||||||
|
|
||||||
if (IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
|
|
||||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
|
||||||
ZEND_VM_NEXT_OPCODE();
|
|
||||||
}
|
|
||||||
|
|
||||||
SAVE_OPLINE();
|
SAVE_OPLINE();
|
||||||
if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(var_ptr) == IS_UNDEF)) {
|
if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(var_ptr) == IS_UNDEF)) {
|
||||||
ZVAL_NULL(var_ptr);
|
ZVAL_NULL(var_ptr);
|
||||||
|
@ -37633,12 +37463,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_REF_SPEC_CV_HANDLER(ZEND_
|
||||||
varptr = _get_zval_ptr_cv_BP_VAR_W(opline->op1.var EXECUTE_DATA_CC);
|
varptr = _get_zval_ptr_cv_BP_VAR_W(opline->op1.var EXECUTE_DATA_CC);
|
||||||
|
|
||||||
arg = ZEND_CALL_VAR(EX(call), opline->result.var);
|
arg = ZEND_CALL_VAR(EX(call), opline->result.var);
|
||||||
if (IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(varptr))) {
|
|
||||||
ZVAL_NEW_EMPTY_REF(arg);
|
|
||||||
ZVAL_NULL(Z_REFVAL_P(arg));
|
|
||||||
ZEND_VM_NEXT_OPCODE();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Z_ISREF_P(varptr)) {
|
if (Z_ISREF_P(varptr)) {
|
||||||
Z_ADDREF_P(varptr);
|
Z_ADDREF_P(varptr);
|
||||||
} else {
|
} else {
|
||||||
|
@ -39392,11 +39216,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OP_SPEC_CV_CONST_HANDLE
|
||||||
value = RT_CONSTANT(opline, opline->op2);
|
value = RT_CONSTANT(opline, opline->op2);
|
||||||
var_ptr = _get_zval_ptr_cv_BP_VAR_RW(opline->op1.var EXECUTE_DATA_CC);
|
var_ptr = _get_zval_ptr_cv_BP_VAR_RW(opline->op1.var EXECUTE_DATA_CC);
|
||||||
|
|
||||||
if (IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
|
|
||||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
|
||||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
do {
|
do {
|
||||||
if (UNEXPECTED(Z_TYPE_P(var_ptr) == IS_REFERENCE)) {
|
if (UNEXPECTED(Z_TYPE_P(var_ptr) == IS_REFERENCE)) {
|
||||||
zend_reference *ref = Z_REF_P(var_ptr);
|
zend_reference *ref = Z_REF_P(var_ptr);
|
||||||
|
@ -39412,7 +39231,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OP_SPEC_CV_CONST_HANDLE
|
||||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||||
ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
|
ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
||||||
|
@ -40677,9 +40495,7 @@ try_assign_dim_array:
|
||||||
goto try_assign_dim_array;
|
goto try_assign_dim_array;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
|
|
||||||
zend_use_scalar_as_array();
|
zend_use_scalar_as_array();
|
||||||
}
|
|
||||||
dim = RT_CONSTANT(opline, opline->op2);
|
dim = RT_CONSTANT(opline, opline->op2);
|
||||||
assign_dim_error:
|
assign_dim_error:
|
||||||
|
|
||||||
|
@ -40793,9 +40609,7 @@ try_assign_dim_array:
|
||||||
goto try_assign_dim_array;
|
goto try_assign_dim_array;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
|
|
||||||
zend_use_scalar_as_array();
|
zend_use_scalar_as_array();
|
||||||
}
|
|
||||||
dim = RT_CONSTANT(opline, opline->op2);
|
dim = RT_CONSTANT(opline, opline->op2);
|
||||||
assign_dim_error:
|
assign_dim_error:
|
||||||
zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
|
zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
|
||||||
|
@ -40909,9 +40723,7 @@ try_assign_dim_array:
|
||||||
goto try_assign_dim_array;
|
goto try_assign_dim_array;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
|
|
||||||
zend_use_scalar_as_array();
|
zend_use_scalar_as_array();
|
||||||
}
|
|
||||||
dim = RT_CONSTANT(opline, opline->op2);
|
dim = RT_CONSTANT(opline, opline->op2);
|
||||||
assign_dim_error:
|
assign_dim_error:
|
||||||
zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
|
zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
|
||||||
|
@ -41024,9 +40836,7 @@ try_assign_dim_array:
|
||||||
goto try_assign_dim_array;
|
goto try_assign_dim_array;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
|
|
||||||
zend_use_scalar_as_array();
|
zend_use_scalar_as_array();
|
||||||
}
|
|
||||||
dim = RT_CONSTANT(opline, opline->op2);
|
dim = RT_CONSTANT(opline, opline->op2);
|
||||||
assign_dim_error:
|
assign_dim_error:
|
||||||
|
|
||||||
|
@ -41053,19 +40863,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_CONST_RETVAL_UN
|
||||||
value = RT_CONSTANT(opline, opline->op2);
|
value = RT_CONSTANT(opline, opline->op2);
|
||||||
variable_ptr = EX_VAR(opline->op1.var);
|
variable_ptr = EX_VAR(opline->op1.var);
|
||||||
|
|
||||||
if (IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
|
|
||||||
|
|
||||||
if (UNEXPECTED(0)) {
|
|
||||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES());
|
value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES());
|
||||||
if (UNEXPECTED(0)) {
|
if (UNEXPECTED(0)) {
|
||||||
ZVAL_COPY(EX_VAR(opline->result.var), value);
|
ZVAL_COPY(EX_VAR(opline->result.var), value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* zend_assign_to_variable() always takes care of op2, never free it! */
|
/* zend_assign_to_variable() always takes care of op2, never free it! */
|
||||||
}
|
|
||||||
|
|
||||||
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
||||||
}
|
}
|
||||||
|
@ -41080,19 +40883,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_CONST_RETVAL_US
|
||||||
value = RT_CONSTANT(opline, opline->op2);
|
value = RT_CONSTANT(opline, opline->op2);
|
||||||
variable_ptr = EX_VAR(opline->op1.var);
|
variable_ptr = EX_VAR(opline->op1.var);
|
||||||
|
|
||||||
if (IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
|
|
||||||
|
|
||||||
if (UNEXPECTED(1)) {
|
|
||||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES());
|
value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES());
|
||||||
if (UNEXPECTED(1)) {
|
if (UNEXPECTED(1)) {
|
||||||
ZVAL_COPY(EX_VAR(opline->result.var), value);
|
ZVAL_COPY(EX_VAR(opline->result.var), value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* zend_assign_to_variable() always takes care of op2, never free it! */
|
/* zend_assign_to_variable() always takes care of op2, never free it! */
|
||||||
}
|
|
||||||
|
|
||||||
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
||||||
}
|
}
|
||||||
|
@ -42977,11 +42773,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OP_SPEC_CV_TMPVAR_HANDL
|
||||||
value = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC);
|
value = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC);
|
||||||
var_ptr = _get_zval_ptr_cv_BP_VAR_RW(opline->op1.var EXECUTE_DATA_CC);
|
var_ptr = _get_zval_ptr_cv_BP_VAR_RW(opline->op1.var EXECUTE_DATA_CC);
|
||||||
|
|
||||||
if (IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
|
|
||||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
|
||||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
do {
|
do {
|
||||||
if (UNEXPECTED(Z_TYPE_P(var_ptr) == IS_REFERENCE)) {
|
if (UNEXPECTED(Z_TYPE_P(var_ptr) == IS_REFERENCE)) {
|
||||||
zend_reference *ref = Z_REF_P(var_ptr);
|
zend_reference *ref = Z_REF_P(var_ptr);
|
||||||
|
@ -42997,7 +42788,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OP_SPEC_CV_TMPVAR_HANDL
|
||||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||||
ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
|
ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
|
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
|
||||||
|
|
||||||
|
@ -44260,9 +44050,7 @@ try_assign_dim_array:
|
||||||
goto try_assign_dim_array;
|
goto try_assign_dim_array;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
|
|
||||||
zend_use_scalar_as_array();
|
zend_use_scalar_as_array();
|
||||||
}
|
|
||||||
dim = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC);
|
dim = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC);
|
||||||
assign_dim_error:
|
assign_dim_error:
|
||||||
|
|
||||||
|
@ -44376,9 +44164,7 @@ try_assign_dim_array:
|
||||||
goto try_assign_dim_array;
|
goto try_assign_dim_array;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
|
|
||||||
zend_use_scalar_as_array();
|
zend_use_scalar_as_array();
|
||||||
}
|
|
||||||
dim = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC);
|
dim = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC);
|
||||||
assign_dim_error:
|
assign_dim_error:
|
||||||
zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
|
zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
|
||||||
|
@ -44492,9 +44278,7 @@ try_assign_dim_array:
|
||||||
goto try_assign_dim_array;
|
goto try_assign_dim_array;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
|
|
||||||
zend_use_scalar_as_array();
|
zend_use_scalar_as_array();
|
||||||
}
|
|
||||||
dim = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC);
|
dim = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC);
|
||||||
assign_dim_error:
|
assign_dim_error:
|
||||||
zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
|
zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
|
||||||
|
@ -44607,9 +44391,7 @@ try_assign_dim_array:
|
||||||
goto try_assign_dim_array;
|
goto try_assign_dim_array;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
|
|
||||||
zend_use_scalar_as_array();
|
zend_use_scalar_as_array();
|
||||||
}
|
|
||||||
dim = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC);
|
dim = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC);
|
||||||
assign_dim_error:
|
assign_dim_error:
|
||||||
|
|
||||||
|
@ -45448,19 +45230,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_TMP_RETVAL_UNUS
|
||||||
value = _get_zval_ptr_tmp(opline->op2.var EXECUTE_DATA_CC);
|
value = _get_zval_ptr_tmp(opline->op2.var EXECUTE_DATA_CC);
|
||||||
variable_ptr = EX_VAR(opline->op1.var);
|
variable_ptr = EX_VAR(opline->op1.var);
|
||||||
|
|
||||||
if (IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
|
|
||||||
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
|
|
||||||
if (UNEXPECTED(0)) {
|
|
||||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES());
|
value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES());
|
||||||
if (UNEXPECTED(0)) {
|
if (UNEXPECTED(0)) {
|
||||||
ZVAL_COPY(EX_VAR(opline->result.var), value);
|
ZVAL_COPY(EX_VAR(opline->result.var), value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* zend_assign_to_variable() always takes care of op2, never free it! */
|
/* zend_assign_to_variable() always takes care of op2, never free it! */
|
||||||
}
|
|
||||||
|
|
||||||
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
||||||
}
|
}
|
||||||
|
@ -45475,19 +45250,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_TMP_RETVAL_USED
|
||||||
value = _get_zval_ptr_tmp(opline->op2.var EXECUTE_DATA_CC);
|
value = _get_zval_ptr_tmp(opline->op2.var EXECUTE_DATA_CC);
|
||||||
variable_ptr = EX_VAR(opline->op1.var);
|
variable_ptr = EX_VAR(opline->op1.var);
|
||||||
|
|
||||||
if (IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
|
|
||||||
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
|
|
||||||
if (UNEXPECTED(1)) {
|
|
||||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES());
|
value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES());
|
||||||
if (UNEXPECTED(1)) {
|
if (UNEXPECTED(1)) {
|
||||||
ZVAL_COPY(EX_VAR(opline->result.var), value);
|
ZVAL_COPY(EX_VAR(opline->result.var), value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* zend_assign_to_variable() always takes care of op2, never free it! */
|
/* zend_assign_to_variable() always takes care of op2, never free it! */
|
||||||
}
|
|
||||||
|
|
||||||
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
||||||
}
|
}
|
||||||
|
@ -45673,19 +45441,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_VAR_RETVAL_UNUS
|
||||||
value = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC);
|
value = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC);
|
||||||
variable_ptr = EX_VAR(opline->op1.var);
|
variable_ptr = EX_VAR(opline->op1.var);
|
||||||
|
|
||||||
if (IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
|
|
||||||
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
|
|
||||||
if (UNEXPECTED(0)) {
|
|
||||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES());
|
value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES());
|
||||||
if (UNEXPECTED(0)) {
|
if (UNEXPECTED(0)) {
|
||||||
ZVAL_COPY(EX_VAR(opline->result.var), value);
|
ZVAL_COPY(EX_VAR(opline->result.var), value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* zend_assign_to_variable() always takes care of op2, never free it! */
|
/* zend_assign_to_variable() always takes care of op2, never free it! */
|
||||||
}
|
|
||||||
|
|
||||||
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
||||||
}
|
}
|
||||||
|
@ -45700,19 +45461,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_VAR_RETVAL_USED
|
||||||
value = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC);
|
value = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC);
|
||||||
variable_ptr = EX_VAR(opline->op1.var);
|
variable_ptr = EX_VAR(opline->op1.var);
|
||||||
|
|
||||||
if (IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
|
|
||||||
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
|
|
||||||
if (UNEXPECTED(1)) {
|
|
||||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES());
|
value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES());
|
||||||
if (UNEXPECTED(1)) {
|
if (UNEXPECTED(1)) {
|
||||||
ZVAL_COPY(EX_VAR(opline->result.var), value);
|
ZVAL_COPY(EX_VAR(opline->result.var), value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* zend_assign_to_variable() always takes care of op2, never free it! */
|
/* zend_assign_to_variable() always takes care of op2, never free it! */
|
||||||
}
|
|
||||||
|
|
||||||
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
||||||
}
|
}
|
||||||
|
@ -45727,15 +45481,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_CV_VAR_HANDLER
|
||||||
value_ptr = _get_zval_ptr_ptr_var(opline->op2.var EXECUTE_DATA_CC);
|
value_ptr = _get_zval_ptr_ptr_var(opline->op2.var EXECUTE_DATA_CC);
|
||||||
variable_ptr = EX_VAR(opline->op1.var);
|
variable_ptr = EX_VAR(opline->op1.var);
|
||||||
|
|
||||||
if (IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
|
if (IS_CV == IS_VAR &&
|
||||||
variable_ptr = &EG(uninitialized_zval);
|
|
||||||
} else if (IS_CV == IS_VAR &&
|
|
||||||
UNEXPECTED(Z_TYPE_P(EX_VAR(opline->op1.var)) != IS_INDIRECT)) {
|
UNEXPECTED(Z_TYPE_P(EX_VAR(opline->op1.var)) != IS_INDIRECT)) {
|
||||||
|
|
||||||
zend_throw_error(NULL, "Cannot assign by reference to an array dimension of an object");
|
zend_throw_error(NULL, "Cannot assign by reference to an array dimension of an object");
|
||||||
variable_ptr = &EG(uninitialized_zval);
|
variable_ptr = &EG(uninitialized_zval);
|
||||||
} else if (IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(value_ptr))) {
|
|
||||||
variable_ptr = &EG(uninitialized_zval);
|
|
||||||
} else if (IS_VAR == IS_VAR &&
|
} else if (IS_VAR == IS_VAR &&
|
||||||
opline->extended_value == ZEND_RETURNS_FUNCTION &&
|
opline->extended_value == ZEND_RETURNS_FUNCTION &&
|
||||||
UNEXPECTED(!Z_ISREF_P(value_ptr))) {
|
UNEXPECTED(!Z_ISREF_P(value_ptr))) {
|
||||||
|
@ -46293,9 +46043,7 @@ try_assign_dim_array:
|
||||||
goto try_assign_dim_array;
|
goto try_assign_dim_array;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
|
|
||||||
zend_use_scalar_as_array();
|
zend_use_scalar_as_array();
|
||||||
}
|
|
||||||
dim = NULL;
|
dim = NULL;
|
||||||
assign_dim_error:
|
assign_dim_error:
|
||||||
|
|
||||||
|
@ -46409,9 +46157,7 @@ try_assign_dim_array:
|
||||||
goto try_assign_dim_array;
|
goto try_assign_dim_array;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
|
|
||||||
zend_use_scalar_as_array();
|
zend_use_scalar_as_array();
|
||||||
}
|
|
||||||
dim = NULL;
|
dim = NULL;
|
||||||
assign_dim_error:
|
assign_dim_error:
|
||||||
zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
|
zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
|
||||||
|
@ -46525,9 +46271,7 @@ try_assign_dim_array:
|
||||||
goto try_assign_dim_array;
|
goto try_assign_dim_array;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
|
|
||||||
zend_use_scalar_as_array();
|
zend_use_scalar_as_array();
|
||||||
}
|
|
||||||
dim = NULL;
|
dim = NULL;
|
||||||
assign_dim_error:
|
assign_dim_error:
|
||||||
zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
|
zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
|
||||||
|
@ -46640,9 +46384,7 @@ try_assign_dim_array:
|
||||||
goto try_assign_dim_array;
|
goto try_assign_dim_array;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
|
|
||||||
zend_use_scalar_as_array();
|
zend_use_scalar_as_array();
|
||||||
}
|
|
||||||
dim = NULL;
|
dim = NULL;
|
||||||
assign_dim_error:
|
assign_dim_error:
|
||||||
|
|
||||||
|
@ -48121,11 +47863,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OP_SPEC_CV_CV_HANDLER(Z
|
||||||
value = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC);
|
value = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC);
|
||||||
var_ptr = _get_zval_ptr_cv_BP_VAR_RW(opline->op1.var EXECUTE_DATA_CC);
|
var_ptr = _get_zval_ptr_cv_BP_VAR_RW(opline->op1.var EXECUTE_DATA_CC);
|
||||||
|
|
||||||
if (IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
|
|
||||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
|
||||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
do {
|
do {
|
||||||
if (UNEXPECTED(Z_TYPE_P(var_ptr) == IS_REFERENCE)) {
|
if (UNEXPECTED(Z_TYPE_P(var_ptr) == IS_REFERENCE)) {
|
||||||
zend_reference *ref = Z_REF_P(var_ptr);
|
zend_reference *ref = Z_REF_P(var_ptr);
|
||||||
|
@ -48141,7 +47878,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OP_SPEC_CV_CV_HANDLER(Z
|
||||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||||
ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
|
ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
||||||
|
@ -49401,9 +49137,7 @@ try_assign_dim_array:
|
||||||
goto try_assign_dim_array;
|
goto try_assign_dim_array;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
|
|
||||||
zend_use_scalar_as_array();
|
zend_use_scalar_as_array();
|
||||||
}
|
|
||||||
dim = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC);
|
dim = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC);
|
||||||
assign_dim_error:
|
assign_dim_error:
|
||||||
|
|
||||||
|
@ -49517,9 +49251,7 @@ try_assign_dim_array:
|
||||||
goto try_assign_dim_array;
|
goto try_assign_dim_array;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
|
|
||||||
zend_use_scalar_as_array();
|
zend_use_scalar_as_array();
|
||||||
}
|
|
||||||
dim = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC);
|
dim = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC);
|
||||||
assign_dim_error:
|
assign_dim_error:
|
||||||
zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
|
zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
|
||||||
|
@ -49633,9 +49365,7 @@ try_assign_dim_array:
|
||||||
goto try_assign_dim_array;
|
goto try_assign_dim_array;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
|
|
||||||
zend_use_scalar_as_array();
|
zend_use_scalar_as_array();
|
||||||
}
|
|
||||||
dim = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC);
|
dim = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC);
|
||||||
assign_dim_error:
|
assign_dim_error:
|
||||||
zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
|
zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
|
||||||
|
@ -49748,9 +49478,7 @@ try_assign_dim_array:
|
||||||
goto try_assign_dim_array;
|
goto try_assign_dim_array;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
|
|
||||||
zend_use_scalar_as_array();
|
zend_use_scalar_as_array();
|
||||||
}
|
|
||||||
dim = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC);
|
dim = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC);
|
||||||
assign_dim_error:
|
assign_dim_error:
|
||||||
|
|
||||||
|
@ -49777,19 +49505,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_CV_RETVAL_UNUSE
|
||||||
value = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC);
|
value = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC);
|
||||||
variable_ptr = EX_VAR(opline->op1.var);
|
variable_ptr = EX_VAR(opline->op1.var);
|
||||||
|
|
||||||
if (IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
|
|
||||||
|
|
||||||
if (UNEXPECTED(0)) {
|
|
||||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES());
|
value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES());
|
||||||
if (UNEXPECTED(0)) {
|
if (UNEXPECTED(0)) {
|
||||||
ZVAL_COPY(EX_VAR(opline->result.var), value);
|
ZVAL_COPY(EX_VAR(opline->result.var), value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* zend_assign_to_variable() always takes care of op2, never free it! */
|
/* zend_assign_to_variable() always takes care of op2, never free it! */
|
||||||
}
|
|
||||||
|
|
||||||
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
||||||
}
|
}
|
||||||
|
@ -49804,19 +49525,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_CV_RETVAL_USED_
|
||||||
value = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC);
|
value = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC);
|
||||||
variable_ptr = EX_VAR(opline->op1.var);
|
variable_ptr = EX_VAR(opline->op1.var);
|
||||||
|
|
||||||
if (IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
|
|
||||||
|
|
||||||
if (UNEXPECTED(1)) {
|
|
||||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES());
|
value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES());
|
||||||
if (UNEXPECTED(1)) {
|
if (UNEXPECTED(1)) {
|
||||||
ZVAL_COPY(EX_VAR(opline->result.var), value);
|
ZVAL_COPY(EX_VAR(opline->result.var), value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* zend_assign_to_variable() always takes care of op2, never free it! */
|
/* zend_assign_to_variable() always takes care of op2, never free it! */
|
||||||
}
|
|
||||||
|
|
||||||
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
||||||
}
|
}
|
||||||
|
@ -49831,15 +49545,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_CV_CV_HANDLER(
|
||||||
value_ptr = _get_zval_ptr_cv_BP_VAR_W(opline->op2.var EXECUTE_DATA_CC);
|
value_ptr = _get_zval_ptr_cv_BP_VAR_W(opline->op2.var EXECUTE_DATA_CC);
|
||||||
variable_ptr = EX_VAR(opline->op1.var);
|
variable_ptr = EX_VAR(opline->op1.var);
|
||||||
|
|
||||||
if (IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
|
if (IS_CV == IS_VAR &&
|
||||||
variable_ptr = &EG(uninitialized_zval);
|
|
||||||
} else if (IS_CV == IS_VAR &&
|
|
||||||
UNEXPECTED(Z_TYPE_P(EX_VAR(opline->op1.var)) != IS_INDIRECT)) {
|
UNEXPECTED(Z_TYPE_P(EX_VAR(opline->op1.var)) != IS_INDIRECT)) {
|
||||||
|
|
||||||
zend_throw_error(NULL, "Cannot assign by reference to an array dimension of an object");
|
zend_throw_error(NULL, "Cannot assign by reference to an array dimension of an object");
|
||||||
variable_ptr = &EG(uninitialized_zval);
|
variable_ptr = &EG(uninitialized_zval);
|
||||||
} else if (IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(value_ptr))) {
|
|
||||||
variable_ptr = &EG(uninitialized_zval);
|
|
||||||
} else if (IS_CV == IS_VAR &&
|
} else if (IS_CV == IS_VAR &&
|
||||||
opline->extended_value == ZEND_RETURNS_FUNCTION &&
|
opline->extended_value == ZEND_RETURNS_FUNCTION &&
|
||||||
UNEXPECTED(!Z_ISREF_P(value_ptr))) {
|
UNEXPECTED(!Z_ISREF_P(value_ptr))) {
|
||||||
|
|
|
@ -1450,6 +1450,7 @@ static zval *dom_nodelist_read_dimension(zend_object *object, zval *offset, int
|
||||||
zval offset_copy;
|
zval offset_copy;
|
||||||
|
|
||||||
if (!offset) {
|
if (!offset) {
|
||||||
|
zend_throw_error(NULL, "Cannot access node list without offset");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,11 @@ var_dump(isset($nodes[$offset]), $nodes[$offset]->textContent);
|
||||||
var_dump($offset);
|
var_dump($offset);
|
||||||
|
|
||||||
echo "testing read_dimension with null offset\n";
|
echo "testing read_dimension with null offset\n";
|
||||||
|
try {
|
||||||
var_dump($nodes[][] = 1);
|
var_dump($nodes[][] = 1);
|
||||||
|
} catch (Error $e) {
|
||||||
|
echo $e->getMessage(), "\n";
|
||||||
|
}
|
||||||
|
|
||||||
echo "testing attribute access\n";
|
echo "testing attribute access\n";
|
||||||
$anchor = $doc->getElementsByTagName('a')[0];
|
$anchor = $doc->getElementsByTagName('a')[0];
|
||||||
|
@ -82,7 +86,7 @@ bool(true)
|
||||||
string(4) "data"
|
string(4) "data"
|
||||||
string(4) "test"
|
string(4) "test"
|
||||||
testing read_dimension with null offset
|
testing read_dimension with null offset
|
||||||
NULL
|
Cannot access node list without offset
|
||||||
testing attribute access
|
testing attribute access
|
||||||
string(4) "href"
|
string(4) "href"
|
||||||
==DONE==
|
==DONE==
|
||||||
|
|
|
@ -311,10 +311,6 @@ static void zend_dump_type_info(uint32_t info, zend_class_entry *ce, int is_inst
|
||||||
fprintf(stderr, "resource");
|
fprintf(stderr, "resource");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (info & MAY_BE_ERROR) {
|
|
||||||
if (first) first = 0; else fprintf(stderr, ", ");
|
|
||||||
fprintf(stderr, "error");
|
|
||||||
}
|
|
||||||
//TODO: this is useful only for JIT???
|
//TODO: this is useful only for JIT???
|
||||||
if (info & MAY_BE_IN_REG) {
|
if (info & MAY_BE_IN_REG) {
|
||||||
if (first) first = 0; else fprintf(stderr, ", ");
|
if (first) first = 0; else fprintf(stderr, ", ");
|
||||||
|
|
|
@ -2065,16 +2065,10 @@ uint32_t zend_array_element_type(uint32_t t1, int write, int insert)
|
||||||
}
|
}
|
||||||
if (t1 & (MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_FALSE)) {
|
if (t1 & (MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_FALSE)) {
|
||||||
tmp |= MAY_BE_NULL;
|
tmp |= MAY_BE_NULL;
|
||||||
if (t1 & MAY_BE_ERROR) {
|
|
||||||
if (write) {
|
|
||||||
tmp |= MAY_BE_ERROR;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (t1 & (MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_RESOURCE)) {
|
if (t1 & (MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_RESOURCE)) {
|
||||||
|
if (!write) {
|
||||||
tmp |= MAY_BE_NULL;
|
tmp |= MAY_BE_NULL;
|
||||||
if (write) {
|
|
||||||
tmp |= MAY_BE_ERROR;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return tmp;
|
return tmp;
|
||||||
|
@ -2425,8 +2419,8 @@ static int zend_update_type_info(const zend_op_array *op_array,
|
||||||
/* If one of the operands cannot have any type, this means the operand derives from
|
/* If one of the operands cannot have any type, this means the operand derives from
|
||||||
* unreachable code. Propagate the empty result early, so that that the following
|
* unreachable code. Propagate the empty result early, so that that the following
|
||||||
* code may assume that operands have at least one type. */
|
* code may assume that operands have at least one type. */
|
||||||
if (!(t1 & (MAY_BE_ANY|MAY_BE_UNDEF|MAY_BE_CLASS|MAY_BE_ERROR))
|
if (!(t1 & (MAY_BE_ANY|MAY_BE_UNDEF|MAY_BE_CLASS))
|
||||||
|| !(t2 & (MAY_BE_ANY|MAY_BE_UNDEF|MAY_BE_CLASS|MAY_BE_ERROR))) {
|
|| !(t2 & (MAY_BE_ANY|MAY_BE_UNDEF|MAY_BE_CLASS))) {
|
||||||
tmp = 0;
|
tmp = 0;
|
||||||
if (ssa_ops[i].result_def >= 0) {
|
if (ssa_ops[i].result_def >= 0) {
|
||||||
UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def);
|
UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def);
|
||||||
|
@ -2717,9 +2711,6 @@ static int zend_update_type_info(const zend_op_array *op_array,
|
||||||
tmp |= MAY_BE_LONG;
|
tmp |= MAY_BE_LONG;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (t1 & MAY_BE_ERROR) {
|
|
||||||
tmp |= MAY_BE_NULL;
|
|
||||||
}
|
|
||||||
if (t1 & (MAY_BE_UNDEF | MAY_BE_NULL)) {
|
if (t1 & (MAY_BE_UNDEF | MAY_BE_NULL)) {
|
||||||
if (opline->opcode == ZEND_PRE_INC) {
|
if (opline->opcode == ZEND_PRE_INC) {
|
||||||
tmp |= MAY_BE_LONG;
|
tmp |= MAY_BE_LONG;
|
||||||
|
@ -2752,7 +2743,7 @@ static int zend_update_type_info(const zend_op_array *op_array,
|
||||||
if (t1 & (MAY_BE_RC1|MAY_BE_RCN)) {
|
if (t1 & (MAY_BE_RC1|MAY_BE_RCN)) {
|
||||||
tmp |= MAY_BE_RC1|MAY_BE_RCN;
|
tmp |= MAY_BE_RC1|MAY_BE_RCN;
|
||||||
}
|
}
|
||||||
tmp |= t1 & ~(MAY_BE_UNDEF|MAY_BE_ERROR|MAY_BE_REF|MAY_BE_RCN);
|
tmp |= t1 & ~(MAY_BE_UNDEF|MAY_BE_REF|MAY_BE_RCN);
|
||||||
if (t1 & MAY_BE_UNDEF) {
|
if (t1 & MAY_BE_UNDEF) {
|
||||||
tmp |= MAY_BE_NULL;
|
tmp |= MAY_BE_NULL;
|
||||||
}
|
}
|
||||||
|
@ -2779,9 +2770,6 @@ static int zend_update_type_info(const zend_op_array *op_array,
|
||||||
tmp |= MAY_BE_LONG;
|
tmp |= MAY_BE_LONG;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (t1 & MAY_BE_ERROR) {
|
|
||||||
tmp |= MAY_BE_NULL;
|
|
||||||
}
|
|
||||||
if (t1 & (MAY_BE_UNDEF | MAY_BE_NULL)) {
|
if (t1 & (MAY_BE_UNDEF | MAY_BE_NULL)) {
|
||||||
if (opline->opcode == ZEND_POST_INC) {
|
if (opline->opcode == ZEND_POST_INC) {
|
||||||
tmp |= MAY_BE_LONG;
|
tmp |= MAY_BE_LONG;
|
||||||
|
@ -2959,7 +2947,7 @@ static int zend_update_type_info(const zend_op_array *op_array,
|
||||||
if (opline->op2_type == IS_VAR && opline->extended_value == ZEND_RETURNS_FUNCTION) {
|
if (opline->op2_type == IS_VAR && opline->extended_value == ZEND_RETURNS_FUNCTION) {
|
||||||
tmp = (MAY_BE_REF | MAY_BE_RCN | MAY_BE_RC1 | t2) & ~MAY_BE_UNDEF;
|
tmp = (MAY_BE_REF | MAY_BE_RCN | MAY_BE_RC1 | t2) & ~MAY_BE_UNDEF;
|
||||||
} else {
|
} else {
|
||||||
tmp = (MAY_BE_REF | t2) & ~(MAY_BE_UNDEF|MAY_BE_ERROR|MAY_BE_RC1|MAY_BE_RCN);
|
tmp = (MAY_BE_REF | t2) & ~(MAY_BE_UNDEF|MAY_BE_RC1|MAY_BE_RCN);
|
||||||
}
|
}
|
||||||
if (t2 & MAY_BE_UNDEF) {
|
if (t2 & MAY_BE_UNDEF) {
|
||||||
tmp |= MAY_BE_NULL;
|
tmp |= MAY_BE_NULL;
|
||||||
|
@ -2987,7 +2975,7 @@ static int zend_update_type_info(const zend_op_array *op_array,
|
||||||
if ((opline+1)->op1_type == IS_VAR && (opline->extended_value & ZEND_RETURNS_FUNCTION)) {
|
if ((opline+1)->op1_type == IS_VAR && (opline->extended_value & ZEND_RETURNS_FUNCTION)) {
|
||||||
tmp = (MAY_BE_REF | MAY_BE_RCN | MAY_BE_RC1 | t2) & ~MAY_BE_UNDEF;
|
tmp = (MAY_BE_REF | MAY_BE_RCN | MAY_BE_RC1 | t2) & ~MAY_BE_UNDEF;
|
||||||
} else {
|
} else {
|
||||||
tmp = (MAY_BE_REF | t2) & ~(MAY_BE_UNDEF|MAY_BE_ERROR|MAY_BE_RC1|MAY_BE_RCN);
|
tmp = (MAY_BE_REF | t2) & ~(MAY_BE_UNDEF|MAY_BE_RC1|MAY_BE_RCN);
|
||||||
}
|
}
|
||||||
if (t2 & MAY_BE_UNDEF) {
|
if (t2 & MAY_BE_UNDEF) {
|
||||||
tmp |= MAY_BE_NULL;
|
tmp |= MAY_BE_NULL;
|
||||||
|
@ -3484,18 +3472,7 @@ static int zend_update_type_info(const zend_op_array *op_array,
|
||||||
opline->opcode != ZEND_FETCH_LIST_R ? t1 : ((t1 & ~MAY_BE_STRING) | MAY_BE_NULL),
|
opline->opcode != ZEND_FETCH_LIST_R ? t1 : ((t1 & ~MAY_BE_STRING) | MAY_BE_NULL),
|
||||||
opline->result_type == IS_VAR,
|
opline->result_type == IS_VAR,
|
||||||
opline->op2_type == IS_UNUSED);
|
opline->op2_type == IS_UNUSED);
|
||||||
if (opline->opcode == ZEND_FETCH_DIM_W ||
|
if (opline->opcode == ZEND_FETCH_DIM_IS && (t1 & MAY_BE_STRING)) {
|
||||||
opline->opcode == ZEND_FETCH_DIM_RW ||
|
|
||||||
opline->opcode == ZEND_FETCH_DIM_FUNC_ARG ||
|
|
||||||
opline->opcode == ZEND_FETCH_LIST_W) {
|
|
||||||
if (t1 & (MAY_BE_ERROR|MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_RESOURCE|MAY_BE_OBJECT)) {
|
|
||||||
tmp |= MAY_BE_ERROR;
|
|
||||||
} else if (opline->op2_type == IS_UNUSED) {
|
|
||||||
tmp |= MAY_BE_ERROR;
|
|
||||||
} else if (t2 & (MAY_BE_ARRAY|MAY_BE_OBJECT)) {
|
|
||||||
tmp |= MAY_BE_ERROR;
|
|
||||||
}
|
|
||||||
} else if (opline->opcode == ZEND_FETCH_DIM_IS && (t1 & MAY_BE_STRING)) {
|
|
||||||
tmp |= MAY_BE_NULL;
|
tmp |= MAY_BE_NULL;
|
||||||
}
|
}
|
||||||
UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def);
|
UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def);
|
||||||
|
@ -3514,7 +3491,7 @@ static int zend_update_type_info(const zend_op_array *op_array,
|
||||||
tmp = zend_fetch_prop_type(script,
|
tmp = zend_fetch_prop_type(script,
|
||||||
zend_fetch_prop_info(op_array, ssa, opline, i), &ce);
|
zend_fetch_prop_info(op_array, ssa, opline, i), &ce);
|
||||||
if (opline->result_type != IS_TMP_VAR) {
|
if (opline->result_type != IS_TMP_VAR) {
|
||||||
tmp |= MAY_BE_REF | MAY_BE_ERROR;
|
tmp |= MAY_BE_REF;
|
||||||
}
|
}
|
||||||
UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def);
|
UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def);
|
||||||
if (ce) {
|
if (ce) {
|
||||||
|
@ -3531,7 +3508,7 @@ static int zend_update_type_info(const zend_op_array *op_array,
|
||||||
tmp = zend_fetch_prop_type(script,
|
tmp = zend_fetch_prop_type(script,
|
||||||
zend_fetch_static_prop_info(script, op_array, ssa, opline), &ce);
|
zend_fetch_static_prop_info(script, op_array, ssa, opline), &ce);
|
||||||
if (opline->result_type != IS_TMP_VAR) {
|
if (opline->result_type != IS_TMP_VAR) {
|
||||||
tmp |= MAY_BE_REF | MAY_BE_ERROR;
|
tmp |= MAY_BE_REF;
|
||||||
}
|
}
|
||||||
UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def);
|
UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def);
|
||||||
if (ce) {
|
if (ce) {
|
||||||
|
|
|
@ -199,7 +199,7 @@ static zend_always_inline uint32_t get_ssa_var_info(const zend_ssa *ssa, int ssa
|
||||||
if (ssa->var_info && ssa_var_num >= 0) {
|
if (ssa->var_info && ssa_var_num >= 0) {
|
||||||
return ssa->var_info[ssa_var_num].type;
|
return ssa->var_info[ssa_var_num].type;
|
||||||
} else {
|
} else {
|
||||||
return MAY_BE_UNDEF | MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_REF | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ERROR;
|
return MAY_BE_UNDEF | MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_REF | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -930,9 +930,7 @@ static void ZEND_FASTCALL zend_jit_assign_dim_helper(zval *object_ptr, zval *dim
|
||||||
zend_assign_to_string_offset(object_ptr, dim, value, result);
|
zend_assign_to_string_offset(object_ptr, dim, value, result);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//??? if (OP1_TYPE != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
|
|
||||||
zend_throw_error(NULL, "Cannot use a scalar value as an array");
|
zend_throw_error(NULL, "Cannot use a scalar value as an array");
|
||||||
//??? }
|
|
||||||
if (result) {
|
if (result) {
|
||||||
ZVAL_UNDEF(result);
|
ZVAL_UNDEF(result);
|
||||||
}
|
}
|
||||||
|
@ -977,9 +975,7 @@ static void ZEND_FASTCALL zend_jit_assign_dim_op_helper(zval *container, zval *d
|
||||||
//??? } else if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
|
//??? } else if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
|
||||||
//??? ZEND_VM_C_GOTO(assign_dim_op_convert_to_array);
|
//??? ZEND_VM_C_GOTO(assign_dim_op_convert_to_array);
|
||||||
} else {
|
} else {
|
||||||
//??? if (UNEXPECTED(OP1_TYPE != IS_VAR || EXPECTED(!Z_ISERROR_P(container)))) {
|
|
||||||
zend_throw_error(NULL, "Cannot use a scalar value as an array");
|
zend_throw_error(NULL, "Cannot use a scalar value as an array");
|
||||||
//??? }
|
|
||||||
//??? if (retval) {
|
//??? if (retval) {
|
||||||
//??? ZVAL_NULL(retval);
|
//??? ZVAL_NULL(retval);
|
||||||
//??? }
|
//??? }
|
||||||
|
|
|
@ -7542,37 +7542,6 @@ static int zend_jit_send_ref(dasm_State **Dst, const zend_op *opline, zend_op_ar
|
||||||
| // ret = Z_INDIRECT_P(ret);
|
| // ret = Z_INDIRECT_P(ret);
|
||||||
| GET_Z_PTR r0, r0
|
| GET_Z_PTR r0, r0
|
||||||
|1:
|
|1:
|
||||||
if (op1_info & MAY_BE_ERROR) {
|
|
||||||
if (op1_info & (MAY_BE_ANY|MAY_BE_REF)) {
|
|
||||||
if (cold) {
|
|
||||||
| IF_NOT_Z_TYPE r0, _IS_ERROR, >1
|
|
||||||
} else {
|
|
||||||
| IF_Z_TYPE r0, _IS_ERROR, >1
|
|
||||||
|.cold_code
|
|
||||||
|1:
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
| // ZVAL_NEW_EMPTY_REF(arg);
|
|
||||||
| EMALLOC sizeof(zend_reference), op_array, opline
|
|
||||||
| SET_ZVAL_PTR arg_addr, r0
|
|
||||||
| SET_ZVAL_TYPE_INFO arg_addr, IS_REFERENCE_EX
|
|
||||||
| mov dword [r0], 1
|
|
||||||
| mov dword [r0 + offsetof(zend_reference, gc.u.type_info)], IS_REFERENCE
|
|
||||||
| mov aword [r0 + offsetof(zend_reference, sources.ptr)], 0
|
|
||||||
ref_addr = ZEND_ADDR_MEM_ZVAL(ZREG_R0, 8);
|
|
||||||
| // ZVAL_NULL(Z_REFVAL_P(arg));
|
|
||||||
| SET_ZVAL_TYPE_INFO ref_addr, IS_NULL
|
|
||||||
|
|
||||||
if (op1_info & (MAY_BE_ANY|MAY_BE_REF)) {
|
|
||||||
| jmp >7
|
|
||||||
if (cold) {
|
|
||||||
|1:
|
|
||||||
} else {
|
|
||||||
|.code
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (opline->op1_type == IS_CV) {
|
} else if (opline->op1_type == IS_CV) {
|
||||||
if (op1_info & MAY_BE_UNDEF) {
|
if (op1_info & MAY_BE_UNDEF) {
|
||||||
if (op1_info & (MAY_BE_ANY|MAY_BE_REF)) {
|
if (op1_info & (MAY_BE_ANY|MAY_BE_REF)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue