com php-src: Support for IS_REFERENCE: Zend/zend_execut e.c Zend/zend_vm_def.h Zend/zend_vm_execute.h
| From: | Dmitry Stogov | Date: | Mon, 24 Feb 2014 12:51:38 +0000 |
| Subject: | com php-src: Support for IS_REFERENCE: Zend/zend_execut e.c Zend/zend_vm_def.h Zend/zend_vm_execute.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-77951@lists.php.net to get a copy of this message | ||
Commit: a3448b7cfa9a04d40e4e8240dc35871a63fba04e
Author: Dmitry Stogov <dmitry@zend.com> Mon, 24 Feb 2014 16:51:38 +0400
Parents: 789eb6dfc3aa524bf66c49b0677857baea90388a
Branches: phpng
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a3448b7cfa9a04d40e4e8240dc35871a63fba04e
Log:
Support for IS_REFERENCE
Changed paths:
M Zend/zend_execute.c
M Zend/zend_vm_def.h
M Zend/zend_vm_execute.h
Diff:
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index 8d27453..4060ee0 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -1278,6 +1278,9 @@ static void zend_fetch_dimension_address_read(zval *result, zval *container,
zva
{
zval *retval;
+ if (UNEXPECTED(Z_TYPE_P(container) == IS_REFERENCE)) {
+ container = Z_REFVAL_P(container);
+ }
switch (Z_TYPE_P(container)) {
case IS_ARRAY:
diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h
index 9dc6318..f34a080 100644
--- a/Zend/zend_vm_def.h
+++ b/Zend/zend_vm_def.h
@@ -1319,6 +1319,10 @@ ZEND_VM_HELPER(zend_fetch_property_address_read_helper, VAR|UNUSED|CV,
CONST|TMP
container = GET_OP1_OBJ_ZVAL_PTR(BP_VAR_R);
offset = GET_OP2_ZVAL_PTR(BP_VAR_R);
+ if (UNEXPECTED(Z_TYPE_P(container) == IS_REFERENCE)) {
+ container = Z_REFVAL_P(container);
+ }
+
if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
zend_error(E_NOTICE, "Trying to get property of non-object");
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h
index 80e68c2..06d7092 100644
--- a/Zend/zend_vm_execute.h
+++ b/Zend/zend_vm_execute.h
@@ -14541,6 +14541,10 @@ static int ZEND_FASTCALL
zend_fetch_property_address_read_helper_SPEC_VAR_CONST(
container = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
offset = opline->op2.zv;
+ if (UNEXPECTED(Z_TYPE_P(container) == IS_REFERENCE)) {
+ container = Z_REFVAL_P(container);
+ }
+
if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
zend_error(E_NOTICE, "Trying to get property of non-object");
@@ -16769,6 +16773,10 @@ static int ZEND_FASTCALL
zend_fetch_property_address_read_helper_SPEC_VAR_TMP(ZE
container = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
offset = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
+ if (UNEXPECTED(Z_TYPE_P(container) == IS_REFERENCE)) {
+ container = Z_REFVAL_P(container);
+ }
+
if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
zend_error(E_NOTICE, "Trying to get property of non-object");
@@ -18901,6 +18909,10 @@ static int ZEND_FASTCALL
zend_fetch_property_address_read_helper_SPEC_VAR_VAR(ZE
container = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
offset = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
+ if (UNEXPECTED(Z_TYPE_P(container) == IS_REFERENCE)) {
+ container = Z_REFVAL_P(container);
+ }
+
if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
zend_error(E_NOTICE, "Trying to get property of non-object");
@@ -22189,6 +22201,10 @@ static int ZEND_FASTCALL
zend_fetch_property_address_read_helper_SPEC_VAR_CV(ZEN
container = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
offset = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
+ if (UNEXPECTED(Z_TYPE_P(container) == IS_REFERENCE)) {
+ container = Z_REFVAL_P(container);
+ }
+
if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
zend_error(E_NOTICE, "Trying to get property of non-object");
@@ -23863,6 +23879,10 @@ static int ZEND_FASTCALL
zend_fetch_property_address_read_helper_SPEC_UNUSED_CON
container = _get_obj_zval_ptr_unused(TSRMLS_C);
offset = opline->op2.zv;
+ if (UNEXPECTED(Z_TYPE_P(container) == IS_REFERENCE)) {
+ container = Z_REFVAL_P(container);
+ }
+
if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
zend_error(E_NOTICE, "Trying to get property of non-object");
@@ -25200,6 +25220,10 @@ static int ZEND_FASTCALL
zend_fetch_property_address_read_helper_SPEC_UNUSED_TMP
container = _get_obj_zval_ptr_unused(TSRMLS_C);
offset = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
+ if (UNEXPECTED(Z_TYPE_P(container) == IS_REFERENCE)) {
+ container = Z_REFVAL_P(container);
+ }
+
if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
zend_error(E_NOTICE, "Trying to get property of non-object");
@@ -26453,6 +26477,10 @@ static int ZEND_FASTCALL
zend_fetch_property_address_read_helper_SPEC_UNUSED_VAR
container = _get_obj_zval_ptr_unused(TSRMLS_C);
offset = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
+ if (UNEXPECTED(Z_TYPE_P(container) == IS_REFERENCE)) {
+ container = Z_REFVAL_P(container);
+ }
+
if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
zend_error(E_NOTICE, "Trying to get property of non-object");
@@ -28105,6 +28133,10 @@ static int ZEND_FASTCALL
zend_fetch_property_address_read_helper_SPEC_UNUSED_CV(
container = _get_obj_zval_ptr_unused(TSRMLS_C);
offset = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
+ if (UNEXPECTED(Z_TYPE_P(container) == IS_REFERENCE)) {
+ container = Z_REFVAL_P(container);
+ }
+
if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
zend_error(E_NOTICE, "Trying to get property of non-object");
@@ -31131,6 +31163,10 @@ static int ZEND_FASTCALL
zend_fetch_property_address_read_helper_SPEC_CV_CONST(Z
container = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var TSRMLS_CC);
offset = opline->op2.zv;
+ if (UNEXPECTED(Z_TYPE_P(container) == IS_REFERENCE)) {
+ container = Z_REFVAL_P(container);
+ }
+
if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
zend_error(E_NOTICE, "Trying to get property of non-object");
@@ -33140,6 +33176,10 @@ static int ZEND_FASTCALL
zend_fetch_property_address_read_helper_SPEC_CV_TMP(ZEN
container = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var TSRMLS_CC);
offset = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
+ if (UNEXPECTED(Z_TYPE_P(container) == IS_REFERENCE)) {
+ container = Z_REFVAL_P(container);
+ }
+
if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
zend_error(E_NOTICE, "Trying to get property of non-object");
@@ -35146,6 +35186,10 @@ static int ZEND_FASTCALL
zend_fetch_property_address_read_helper_SPEC_CV_VAR(ZEN
container = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var TSRMLS_CC);
offset = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
+ if (UNEXPECTED(Z_TYPE_P(container) == IS_REFERENCE)) {
+ container = Z_REFVAL_P(container);
+ }
+
if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
zend_error(E_NOTICE, "Trying to get property of non-object");
@@ -38176,6 +38220,10 @@ static int ZEND_FASTCALL
zend_fetch_property_address_read_helper_SPEC_CV_CV(ZEND
container = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var TSRMLS_CC);
offset = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2..var TSRMLS_CC);
+ if (UNEXPECTED(Z_TYPE_P(container) == IS_REFERENCE)) {
+ container = Z_REFVAL_P(container);
+ }
+
if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
zend_error(E_NOTICE, "Trying to get property of non-object");