com php-src: Fixed IS_REFERENCE support: Zend/zend_AP I.c Zend/zend_vm_def.h Zend/zend_vm_execute.h
| From: | Dmitry Stogov | Date: | Fri, 28 Feb 2014 08:54:38 +0000 |
| Subject: | com php-src: Fixed IS_REFERENCE support: Zend/zend_AP I.c Zend/zend_vm_def.h Zend/zend_vm_execute.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-77878@lists.php.net to get a copy of this message | ||
Commit: 3ed445f749b35ec3d7c0ef59205a7f23e410f60e
Author: Dmitry Stogov <dmitry@zend.com> Fri, 28 Feb 2014 12:54:38 +0400
Parents: cee824bbef922334a2db1aa6308a6079f08dffd2
Branches: phpng
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3ed445f749b35ec3d7c0ef59205a7f23e410f60e
Log:
Fixed IS_REFERENCE support
Changed paths:
M Zend/zend_API.c
M Zend/zend_vm_def.h
M Zend/zend_vm_execute.h
Diff:
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index 32f60dc..8cd3462 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -1125,6 +1125,11 @@ ZEND_API void zend_merge_properties(zval *obj, HashTable *properties, int
destro
static int zval_update_class_constant(zval *pp, int is_static, int offset TSRMLS_DC) /* {{{ */
{
+// zval *p = pp;
+
+ if (Z_TYPE_P(pp) == IS_REFERENCE) {
+ pp = Z_REFVAL_P(pp);
+ }
if (IS_CONSTANT_TYPE(Z_TYPE_P(pp))) {
zend_class_entry **scope = EG(in_execution)?&EG(scope):&CG(active_class_entry);
diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def..h
index 9207187..1279f23 100644
--- a/Zend/zend_vm_def.h
+++ b/Zend/zend_vm_def.h
@@ -4585,6 +4585,9 @@ ZEND_VM_HELPER_EX(zend_isset_isempty_dim_prop_obj_handler, VAR|UNUSED|CV,
CONST|
container = GET_OP1_OBJ_ZVAL_PTR(BP_VAR_IS);
offset = GET_OP2_ZVAL_PTR(BP_VAR_R);
+ if (Z_TYPE_P(container) == IS_REFERENCE) {
+ container = Z_REFVAL_P(container);
+ }
if (Z_TYPE_P(container) == IS_ARRAY && !prop_dim) {
HashTable *ht;
int isset = 0;
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h
index 9a461f5..f209c12 100644
--- a/Zend/zend_vm_execute.h
+++ b/Zend/zend_vm_execute.h
@@ -15759,6 +15759,9 @@ static int ZEND_FASTCALL
zend_isset_isempty_dim_prop_obj_handler_SPEC_VAR_CONST(
container = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
offset = opline->op2.zv;
+ if (Z_TYPE_P(container) == IS_REFERENCE) {
+ container = Z_REFVAL_P(container);
+ }
if (Z_TYPE_P(container) == IS_ARRAY && !prop_dim) {
HashTable *ht;
int isset = 0;
@@ -17774,6 +17777,9 @@ static int ZEND_FASTCALL
zend_isset_isempty_dim_prop_obj_handler_SPEC_VAR_TMP(in
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 (Z_TYPE_P(container) == IS_REFERENCE) {
+ container = Z_REFVAL_P(container);
+ }
if (Z_TYPE_P(container) == IS_ARRAY && !prop_dim) {
HashTable *ht;
int isset = 0;
@@ -20183,6 +20189,9 @@ static int ZEND_FASTCALL
zend_isset_isempty_dim_prop_obj_handler_SPEC_VAR_VAR(in
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 (Z_TYPE_P(container) == IS_REFERENCE) {
+ container = Z_REFVAL_P(container);
+ }
if (Z_TYPE_P(container) == IS_ARRAY && !prop_dim) {
HashTable *ht;
int isset = 0;
@@ -23372,6 +23381,9 @@ static int ZEND_FASTCALL
zend_isset_isempty_dim_prop_obj_handler_SPEC_VAR_CV(int
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 (Z_TYPE_P(container) == IS_REFERENCE) {
+ container = Z_REFVAL_P(container);
+ }
if (Z_TYPE_P(container) == IS_ARRAY && !prop_dim) {
HashTable *ht;
int isset = 0;
@@ -24815,6 +24827,9 @@ static int ZEND_FASTCALL
zend_isset_isempty_dim_prop_obj_handler_SPEC_UNUSED_CON
container = _get_obj_zval_ptr_unused(TSRMLS_C);
offset = opline->op2.zv;
+ if (Z_TYPE_P(container) == IS_REFERENCE) {
+ container = Z_REFVAL_P(container);
+ }
if (Z_TYPE_P(container) == IS_ARRAY && !prop_dim) {
HashTable *ht;
int isset = 0;
@@ -26090,6 +26105,9 @@ static int ZEND_FASTCALL
zend_isset_isempty_dim_prop_obj_handler_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 (Z_TYPE_P(container) == IS_REFERENCE) {
+ container = Z_REFVAL_P(container);
+ }
if (Z_TYPE_P(container) == IS_ARRAY && !prop_dim) {
HashTable *ht;
int isset = 0;
@@ -27365,6 +27383,9 @@ static int ZEND_FASTCALL
zend_isset_isempty_dim_prop_obj_handler_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 (Z_TYPE_P(container) == IS_REFERENCE) {
+ container = Z_REFVAL_P(container);
+ }
if (Z_TYPE_P(container) == IS_ARRAY && !prop_dim) {
HashTable *ht;
int isset = 0;
@@ -29040,6 +29061,9 @@ static int ZEND_FASTCALL
zend_isset_isempty_dim_prop_obj_handler_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 (Z_TYPE_P(container) == IS_REFERENCE) {
+ container = Z_REFVAL_P(container);
+ }
if (Z_TYPE_P(container) == IS_ARRAY && !prop_dim) {
HashTable *ht;
int isset = 0;
@@ -32465,6 +32489,9 @@ static int ZEND_FASTCALL
zend_isset_isempty_dim_prop_obj_handler_SPEC_CV_CONST(i
container = _get_zval_ptr_cv_BP_VAR_IS(execute_data, opline->op1.var TSRMLS_CC);
offset = opline->op2..zv;
+ if (Z_TYPE_P(container) == IS_REFERENCE) {
+ container = Z_REFVAL_P(container);
+ }
if (Z_TYPE_P(container) == IS_ARRAY && !prop_dim) {
HashTable *ht;
int isset = 0;
@@ -34355,6 +34382,9 @@ static int ZEND_FASTCALL
zend_isset_isempty_dim_prop_obj_handler_SPEC_CV_TMP(int
container = _get_zval_ptr_cv_BP_VAR_IS(execute_data, opline->op1.var TSRMLS_CC);
offset = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
+ if (Z_TYPE_P(container) == IS_REFERENCE) {
+ container = Z_REFVAL_P(container);
+ }
if (Z_TYPE_P(container) == IS_ARRAY && !prop_dim) {
HashTable *ht;
int isset = 0;
@@ -36639,6 +36669,9 @@ static int ZEND_FASTCALL
zend_isset_isempty_dim_prop_obj_handler_SPEC_CV_VAR(int
container = _get_zval_ptr_cv_BP_VAR_IS(execute_data, opline->op1.var TSRMLS_CC);
offset = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
+ if (Z_TYPE_P(container) == IS_REFERENCE) {
+ container = Z_REFVAL_P(container);
+ }
if (Z_TYPE_P(container) == IS_ARRAY && !prop_dim) {
HashTable *ht;
int isset = 0;
@@ -39572,6 +39605,9 @@ static int ZEND_FASTCALL
zend_isset_isempty_dim_prop_obj_handler_SPEC_CV_CV(int
container = _get_zval_ptr_cv_BP_VAR_IS(execute_data, opline->op1.var TSRMLS_CC);
offset = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
+ if (Z_TYPE_P(container) == IS_REFERENCE) {
+ container = Z_REFVAL_P(container);
+ }
if (Z_TYPE_P(container) == IS_ARRAY && !prop_dim) {
HashTable *ht;
int isset = 0;