com php-src: cleanup: Zend/zend_vm_def.h Zend/zend_vm _execute.h
| From: | Dmitry Stogov | Date: | Mon, 06 Jun 2016 22:14:53 +0000 |
| Subject: | com php-src: cleanup: Zend/zend_vm_def.h Zend/zend_vm _execute.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-92336@lists.php.net to get a copy of this message | ||
Commit: 214d4613f523ac12a1fb5f06a9b3e98a47ed6e49
Author: Dmitry Stogov <dmitry@zend.com> Tue, 7 Jun 2016 01:14:53 +0300
Parents: d324db717ca11128c1dc800a3936db1fda24dc3e
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=214d4613f523ac12a1fb5f06a9b3e98a47ed6e49
Log:
cleanup
Changed paths:
M Zend/zend_vm_def.h
M Zend/zend_vm_execute.h
Diff:
diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h
index 3131ef5..2ec5c80 100644
--- a/Zend/zend_vm_def.h
+++ b/Zend/zend_vm_def.h
@@ -848,7 +848,7 @@ ZEND_VM_C_LABEL(assign_dim_op_convert_to_array):
if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
ZEND_VM_C_GOTO(assign_dim_op_convert_to_array);
}
- if (UNEXPECTED(!Z_ISERROR_P(container))) {
+ if (UNEXPECTED(OP1_TYPE != IS_VAR || !Z_ISERROR_P(container))) {
zend_error(E_WARNING, "Cannot use a scalar value as an array");
}
ZEND_VM_C_LABEL(assign_dim_op_ret_null):
@@ -4376,7 +4376,8 @@ ZEND_VM_HANDLER(67, ZEND_SEND_REF, VAR|CV, NUM)
arg = ZEND_CALL_VAR(EX(call), opline->result.var);
if (OP1_TYPE == IS_VAR && UNEXPECTED(Z_ISERROR_P(varptr))) {
- ZVAL_NEW_REF(arg, &EG(uninitialized_zval));
+ ZVAL_NEW_EMPTY_REF(arg);
+ ZVAL_NULL(Z_REFVAL_P(arg));
ZEND_VM_NEXT_OPCODE();
}
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h
index a71db7c..f7bc9fb 100644
--- a/Zend/zend_vm_execute.h
+++ b/Zend/zend_vm_execute.h
@@ -15717,7 +15717,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL
ZEND_SEND_REF_SPEC_VAR_HANDLER(ZEND
arg = ZEND_CALL_VAR(EX(call), opline->result.var);
if (IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(varptr))) {
- ZVAL_NEW_REF(arg, &EG(uninitialized_zval));
+ ZVAL_NEW_EMPTY_REF(arg);
+ ZVAL_NULL(Z_REFVAL_P(arg));
ZEND_VM_NEXT_OPCODE();
}
@@ -17120,7 +17121,7 @@ assign_dim_op_convert_to_array:
if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
goto assign_dim_op_convert_to_array;
}
- if (UNEXPECTED(!Z_ISERROR_P(container))) {
+ if (UNEXPECTED(IS_VAR != IS_VAR || !Z_ISERROR_P(container))) {
zend_error(E_WARNING, "Cannot use a scalar value as an array");
}
assign_dim_op_ret_null:
@@ -20684,7 +20685,7 @@ assign_dim_op_convert_to_array:
if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
goto assign_dim_op_convert_to_array;
}
- if (UNEXPECTED(!Z_ISERROR_P(container))) {
+ if (UNEXPECTED(IS_VAR != IS_VAR || !Z_ISERROR_P(container))) {
zend_error(E_WARNING, "Cannot use a scalar value as an array");
}
assign_dim_op_ret_null:
@@ -22086,7 +22087,7 @@ assign_dim_op_convert_to_array:
if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
goto assign_dim_op_convert_to_array;
}
- if (UNEXPECTED(!Z_ISERROR_P(container))) {
+ if (UNEXPECTED(IS_VAR != IS_VAR || !Z_ISERROR_P(container))) {
zend_error(E_WARNING, "Cannot use a scalar value as an array");
}
assign_dim_op_ret_null:
@@ -25175,7 +25176,7 @@ assign_dim_op_convert_to_array:
if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
goto assign_dim_op_convert_to_array;
}
- if (UNEXPECTED(!Z_ISERROR_P(container))) {
+ if (UNEXPECTED(IS_VAR != IS_VAR || !Z_ISERROR_P(container))) {
zend_error(E_WARNING, "Cannot use a scalar value as an array");
}
assign_dim_op_ret_null:
@@ -28195,7 +28196,7 @@ assign_dim_op_convert_to_array:
if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
goto assign_dim_op_convert_to_array;
}
- if (UNEXPECTED(!Z_ISERROR_P(container))) {
+ if (UNEXPECTED(IS_UNUSED != IS_VAR || !Z_ISERROR_P(container))) {
zend_error(E_WARNING, "Cannot use a scalar value as an array");
}
assign_dim_op_ret_null:
@@ -31065,7 +31066,7 @@ assign_dim_op_convert_to_array:
if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
goto assign_dim_op_convert_to_array;
}
- if (UNEXPECTED(!Z_ISERROR_P(container))) {
+ if (UNEXPECTED(IS_UNUSED != IS_VAR || !Z_ISERROR_P(container))) {
zend_error(E_WARNING, "Cannot use a scalar value as an array");
}
assign_dim_op_ret_null:
@@ -31850,7 +31851,7 @@ assign_dim_op_convert_to_array:
if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
goto assign_dim_op_convert_to_array;
}
- if (UNEXPECTED(!Z_ISERROR_P(container))) {
+ if (UNEXPECTED(IS_UNUSED != IS_VAR || !Z_ISERROR_P(container))) {
zend_error(E_WARNING, "Cannot use a scalar value as an array");
}
assign_dim_op_ret_null:
@@ -34388,7 +34389,7 @@ assign_dim_op_convert_to_array:
if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
goto assign_dim_op_convert_to_array;
}
- if (UNEXPECTED(!Z_ISERROR_P(container))) {
+ if (UNEXPECTED(IS_UNUSED != IS_VAR || !Z_ISERROR_P(container))) {
zend_error(E_WARNING, "Cannot use a scalar value as an array");
}
assign_dim_op_ret_null:
@@ -37383,7 +37384,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL
ZEND_SEND_REF_SPEC_CV_HANDLER(ZEND_
arg = ZEND_CALL_VAR(EX(call), opline->result.var);
if (IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(varptr))) {
- ZVAL_NEW_REF(arg, &EG(uninitialized_zval));
+ ZVAL_NEW_EMPTY_REF(arg);
+ ZVAL_NULL(Z_REFVAL_P(arg));
ZEND_VM_NEXT_OPCODE();
}
@@ -39173,7 +39175,7 @@ assign_dim_op_convert_to_array:
if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
goto assign_dim_op_convert_to_array;
}
- if (UNEXPECTED(!Z_ISERROR_P(container))) {
+ if (UNEXPECTED(IS_CV != IS_VAR || !Z_ISERROR_P(container))) {
zend_error(E_WARNING, "Cannot use a scalar value as an array");
}
assign_dim_op_ret_null:
@@ -43930,7 +43932,7 @@ assign_dim_op_convert_to_array:
if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
goto assign_dim_op_convert_to_array;
}
- if (UNEXPECTED(!Z_ISERROR_P(container))) {
+ if (UNEXPECTED(IS_CV != IS_VAR || !Z_ISERROR_P(container))) {
zend_error(E_WARNING, "Cannot use a scalar value as an array");
}
assign_dim_op_ret_null:
@@ -46325,7 +46327,7 @@ assign_dim_op_convert_to_array:
if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
goto assign_dim_op_convert_to_array;
}
- if (UNEXPECTED(!Z_ISERROR_P(container))) {
+ if (UNEXPECTED(IS_CV != IS_VAR || !Z_ISERROR_P(container))) {
zend_error(E_WARNING, "Cannot use a scalar value as an array");
}
assign_dim_op_ret_null:
@@ -50487,7 +50489,7 @@ assign_dim_op_convert_to_array:
if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
goto assign_dim_op_convert_to_array;
}
- if (UNEXPECTED(!Z_ISERROR_P(container))) {
+ if (UNEXPECTED(IS_CV != IS_VAR || !Z_ISERROR_P(container))) {
zend_error(E_WARNING, "Cannot use a scalar value as an array");
}
assign_dim_op_ret_null: