diff options
author | Nikita Popov <nikic@php.net> | 2014-04-26 13:17:26 +0200 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2014-05-01 00:25:23 +0200 |
commit | 2c24cdb4a34812c0835d2365b67cef6d5d67ebad (patch) | |
tree | a4ec3cb06120567100b0b9ab0943a8f56740fcfd | |
parent | 52e79186b28854664cedd0e6fa5023f93ed6dd96 (diff) | |
download | php-git-2c24cdb4a34812c0835d2365b67cef6d5d67ebad.tar.gz |
Comment out cast_object for IS_NULL
-rw-r--r-- | Zend/zend_vm_def.h | 5 | ||||
-rw-r--r-- | Zend/zend_vm_execute.h | 20 |
2 files changed, 25 insertions, 0 deletions
diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 6d3c7719e3..2538e86cd8 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -3795,6 +3795,10 @@ ZEND_VM_HANDLER(21, ZEND_CAST, CONST|TMP|VAR|CV, ANY) switch (opline->extended_value) { case IS_NULL: + /* This code is taken from convert_to_null. However, it does not seems very useful, + * because a conversion to null always results in the same value. This could only + * be relevant if a cast_object handler for IS_NULL has some kind of side-effect. */ +#if 0 if (OP1_TYPE == IS_VAR || OP1_TYPE == IS_CV) { ZVAL_DEREF(expr); } @@ -3803,6 +3807,7 @@ ZEND_VM_HANDLER(21, ZEND_CAST, CONST|TMP|VAR|CV, ANY) break; } } +#endif ZVAL_NULL(result); break; diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 7241cf49c7..6abc07d4e5 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -2791,6 +2791,10 @@ static int ZEND_FASTCALL ZEND_CAST_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) switch (opline->extended_value) { case IS_NULL: + /* This code is taken from convert_to_null. However, it does not seems very useful, + * because a conversion to null always results in the same value. This could only + * be relevant if a cast_object handler for IS_NULL has some kind of side-effect. */ +#if 0 if (IS_CONST == IS_VAR || IS_CONST == IS_CV) { ZVAL_DEREF(expr); } @@ -2799,6 +2803,7 @@ static int ZEND_FASTCALL ZEND_CAST_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) break; } } +#endif ZVAL_NULL(result); break; @@ -7901,6 +7906,10 @@ static int ZEND_FASTCALL ZEND_CAST_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) switch (opline->extended_value) { case IS_NULL: + /* This code is taken from convert_to_null. However, it does not seems very useful, + * because a conversion to null always results in the same value. This could only + * be relevant if a cast_object handler for IS_NULL has some kind of side-effect. */ +#if 0 if (IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) { ZVAL_DEREF(expr); } @@ -7909,6 +7918,7 @@ static int ZEND_FASTCALL ZEND_CAST_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) break; } } +#endif ZVAL_NULL(result); break; @@ -13081,6 +13091,10 @@ static int ZEND_FASTCALL ZEND_CAST_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) switch (opline->extended_value) { case IS_NULL: + /* This code is taken from convert_to_null. However, it does not seems very useful, + * because a conversion to null always results in the same value. This could only + * be relevant if a cast_object handler for IS_NULL has some kind of side-effect. */ +#if 0 if (IS_VAR == IS_VAR || IS_VAR == IS_CV) { ZVAL_DEREF(expr); } @@ -13089,6 +13103,7 @@ static int ZEND_FASTCALL ZEND_CAST_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) break; } } +#endif ZVAL_NULL(result); break; @@ -30127,6 +30142,10 @@ static int ZEND_FASTCALL ZEND_CAST_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) switch (opline->extended_value) { case IS_NULL: + /* This code is taken from convert_to_null. However, it does not seems very useful, + * because a conversion to null always results in the same value. This could only + * be relevant if a cast_object handler for IS_NULL has some kind of side-effect. */ +#if 0 if (IS_CV == IS_VAR || IS_CV == IS_CV) { ZVAL_DEREF(expr); } @@ -30135,6 +30154,7 @@ static int ZEND_FASTCALL ZEND_CAST_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) break; } } +#endif ZVAL_NULL(result); break; |