com php-src: Comment out cast_object for IS_NULL: Z end/zend_vm_def.h Zend/zend_vm_execute.h

From: Date: Wed, 30 Apr 2014 22:25:23 +0000
Subject: com php-src: Comment out cast_object for IS_NULL: Z end/zend_vm_def.h Zend/zend_vm_execute.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-77263@lists.php.net to get a copy of this message
Commit: 2c24cdb4a34812c0835d2365b67cef6d5d67ebad Author: Nikita Popov <nikic@php.net> Sat, 26 Apr 2014 13:17:26 +0200 Parents: 52e79186b28854664cedd0e6fa5023f93ed6dd96 Branches: phpng Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2c24cdb4a34812c0835d2365b67cef6d5d67ebad Log: Comment out cast_object for IS_NULL 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 6d3c771..2538e86 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 7241cf4..6abc07d 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;

« previous php.cvs (#77263) next »