com php-src: use flags here too: Zend/zend_vm_def.h Zen d/zend_vm_execute.h

From: Date: Wed, 09 Mar 2016 05:48:49 +0000
Subject: com php-src: use flags here too: Zend/zend_vm_def.h Zen d/zend_vm_execute.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-95601@lists.php.net to get a copy of this message
Commit: b4ec5eb9f23899c20cc88262570d3cbfd4dc5c8c Author: Joe Watkins <krakjoe@php.net> Wed, 9 Mar 2016 05:48:49 +0000 Parents: fb1ef8ab3c4bb3bbfd7003b93cd47ba5952f62ec Branches: typed_ref_properties Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b4ec5eb9f23899c20cc88262570d3cbfd4dc5c8c Log: use flags here too 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 b4d03dd..d74f84a 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -5929,7 +5929,7 @@ ZEND_VM_HANDLER(76, ZEND_UNSET_OBJ, VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV) } } - if (Z_TYPE_P(offset) == IS_STRING) { + if (UNEXPECTED(Z_OBJCE_P(container)->ce_flags & ZEND_ACC_HAS_TYPE_HINTS && Z_TYPE_P(offset) == IS_STRING)) { /* TODO(krakjoe) needs caching */ zend_property_info *prop_info = zend_hash_find_ptr(&Z_OBJCE_P(container)->properties_info, Z_STR_P(offset)); @@ -6118,7 +6118,7 @@ ZEND_VM_HANDLER(125, ZEND_FE_RESET_RW, CONST|TMP|VAR|CV, JMP_ADDR) FREE_OP1_VAR_PTR(); ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } else if (OP1_TYPE != IS_CONST && EXPECTED(Z_TYPE_P(array_ptr) == IS_OBJECT)) { - if (Z_OBJCE_P(array_ptr)->ce_flags & ZEND_ACC_HAS_TYPE_HINTS) { + if (UNEXPECTED(Z_OBJCE_P(array_ptr)->ce_flags & ZEND_ACC_HAS_TYPE_HINTS)) { zend_throw_exception_ex( zend_ce_type_error, 0, "Typed properties exist in %s: foreach by reference is disallowed", diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index b9c9a71..081c009 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -19581,7 +19581,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_VAR_CONST_HANDL } } - if (Z_TYPE_P(offset) == IS_STRING) { + if (UNEXPECTED(Z_OBJCE_P(container)->ce_flags & ZEND_ACC_HAS_TYPE_HINTS && Z_TYPE_P(offset) == IS_STRING)) { /* TODO(krakjoe) needs caching */ zend_property_info *prop_info = zend_hash_find_ptr(&Z_OBJCE_P(container)->properties_info, Z_STR_P(offset)); @@ -24040,7 +24040,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_VAR_CV_HANDLER( } } - if (Z_TYPE_P(offset) == IS_STRING) { + if (UNEXPECTED(Z_OBJCE_P(container)->ce_flags & ZEND_ACC_HAS_TYPE_HINTS && Z_TYPE_P(offset) == IS_STRING)) { /* TODO(krakjoe) needs caching */ zend_property_info *prop_info = zend_hash_find_ptr(&Z_OBJCE_P(container)->properties_info, Z_STR_P(offset)); @@ -26611,7 +26611,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_VAR_TMPVAR_HAND } } - if (Z_TYPE_P(offset) == IS_STRING) { + if (UNEXPECTED(Z_OBJCE_P(container)->ce_flags & ZEND_ACC_HAS_TYPE_HINTS && Z_TYPE_P(offset) == IS_STRING)) { /* TODO(krakjoe) needs caching */ zend_property_info *prop_info = zend_hash_find_ptr(&Z_OBJCE_P(container)->properties_info, Z_STR_P(offset)); @@ -28948,7 +28948,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_UNUSED_CONST_HA } } - if (Z_TYPE_P(offset) == IS_STRING) { + if (UNEXPECTED(Z_OBJCE_P(container)->ce_flags & ZEND_ACC_HAS_TYPE_HINTS && Z_TYPE_P(offset) == IS_STRING)) { /* TODO(krakjoe) needs caching */ zend_property_info *prop_info = zend_hash_find_ptr(&Z_OBJCE_P(container)->properties_info, Z_STR_P(offset)); @@ -32256,7 +32256,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_UNUSED_CV_HANDL } } - if (Z_TYPE_P(offset) == IS_STRING) { + if (UNEXPECTED(Z_OBJCE_P(container)->ce_flags & ZEND_ACC_HAS_TYPE_HINTS && Z_TYPE_P(offset) == IS_STRING)) { /* TODO(krakjoe) needs caching */ zend_property_info *prop_info = zend_hash_find_ptr(&Z_OBJCE_P(container)->properties_info, Z_STR_P(offset)); @@ -34635,7 +34635,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_UNUSED_TMPVAR_H } } - if (Z_TYPE_P(offset) == IS_STRING) { + if (UNEXPECTED(Z_OBJCE_P(container)->ce_flags & ZEND_ACC_HAS_TYPE_HINTS && Z_TYPE_P(offset) == IS_STRING)) { /* TODO(krakjoe) needs caching */ zend_property_info *prop_info = zend_hash_find_ptr(&Z_OBJCE_P(container)->properties_info, Z_STR_P(offset)); @@ -40182,7 +40182,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_CV_CONST_HANDLE } } - if (Z_TYPE_P(offset) == IS_STRING) { + if (UNEXPECTED(Z_OBJCE_P(container)->ce_flags & ZEND_ACC_HAS_TYPE_HINTS && Z_TYPE_P(offset) == IS_STRING)) { /* TODO(krakjoe) needs caching */ zend_property_info *prop_info = zend_hash_find_ptr(&Z_OBJCE_P(container)->properties_info, Z_STR_P(offset)); @@ -46631,7 +46631,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_CV_CV_HANDLER(Z } } - if (Z_TYPE_P(offset) == IS_STRING) { + if (UNEXPECTED(Z_OBJCE_P(container)->ce_flags & ZEND_ACC_HAS_TYPE_HINTS && Z_TYPE_P(offset) == IS_STRING)) { /* TODO(krakjoe) needs caching */ zend_property_info *prop_info = zend_hash_find_ptr(&Z_OBJCE_P(container)->properties_info, Z_STR_P(offset)); @@ -50191,7 +50191,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_CV_TMPVAR_HANDL } } - if (Z_TYPE_P(offset) == IS_STRING) { + if (UNEXPECTED(Z_OBJCE_P(container)->ce_flags & ZEND_ACC_HAS_TYPE_HINTS && Z_TYPE_P(offset) == IS_STRING)) { /* TODO(krakjoe) needs caching */ zend_property_info *prop_info = zend_hash_find_ptr(&Z_OBJCE_P(container)->properties_info, Z_STR_P(offset));

« previous php.cvs (#95601) next »