com php-src: use flags here: Zend/zend_vm_def.h Zend/ze nd_vm_execute.h
| From: | Bob Weinand | Date: | Wed, 09 Mar 2016 05:43:55 +0000 |
| Subject: | com php-src: use flags here: Zend/zend_vm_def.h Zend/ze nd_vm_execute.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-95600@lists.php.net to get a copy of this message | ||
Commit: fb1ef8ab3c4bb3bbfd7003b93cd47ba5952f62ec
Author: Joe Watkins <krakjoe@php.net> Wed, 9 Mar 2016 05:43:55 +0000
Parents: e5afe080c7caa611b28aa09964c86e77fa045872
Branches: typed_ref_properties
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=fb1ef8ab3c4bb3bbfd7003b93cd47ba5952f62ec
Log:
use flags here
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 bf5c7a4..b4d03dd 100644
--- a/Zend/zend_vm_def.h
+++ b/Zend/zend_vm_def.h
@@ -2098,7 +2098,7 @@ ZEND_VM_HANDLER(97, ZEND_FETCH_OBJ_UNSET, VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV)
property = GET_OP2_ZVAL_PTR(BP_VAR_R);
- if (Z_TYPE_P(container) == IS_OBJECT && Z_TYPE_P(property) == IS_STRING) {
+ if (UNEXPECTED(Z_TYPE_P(container) == IS_OBJECT && (Z_OBJCE_P(container)->ce_flags
& ZEND_ACC_HAS_TYPE_HINTS) && Z_TYPE_P(property) == IS_STRING)) {
/* TODO(krakjoe) needs caching */
zend_property_info *prop_info = zend_hash_find_ptr(&Z_OBJCE_P(container)->properties_info,
Z_STR_P(property));
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h
index 8905c98..b9c9a71 100644
--- a/Zend/zend_vm_execute.h
+++ b/Zend/zend_vm_execute.h
@@ -17891,7 +17891,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL
ZEND_FETCH_OBJ_UNSET_SPEC_VAR_CONST
property = EX_CONSTANT(opline->op2);
- if (Z_TYPE_P(container) == IS_OBJECT && Z_TYPE_P(property) == IS_STRING) {
+ if (UNEXPECTED(Z_TYPE_P(container) == IS_OBJECT && (Z_OBJCE_P(container)->ce_flags
& ZEND_ACC_HAS_TYPE_HINTS) && Z_TYPE_P(property) == IS_STRING)) {
/* TODO(krakjoe) needs caching */
zend_property_info *prop_info = zend_hash_find_ptr(&Z_OBJCE_P(container)->properties_info,
Z_STR_P(property));
@@ -22377,7 +22377,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL
ZEND_FETCH_OBJ_UNSET_SPEC_VAR_CV_HA
property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
- if (Z_TYPE_P(container) == IS_OBJECT && Z_TYPE_P(property) == IS_STRING) {
+ if (UNEXPECTED(Z_TYPE_P(container) == IS_OBJECT && (Z_OBJCE_P(container)->ce_flags
& ZEND_ACC_HAS_TYPE_HINTS) && Z_TYPE_P(property) == IS_STRING)) {
/* TODO(krakjoe) needs caching */
zend_property_info *prop_info = zend_hash_find_ptr(&Z_OBJCE_P(container)->properties_info,
Z_STR_P(property));
@@ -25058,7 +25058,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL
ZEND_FETCH_OBJ_UNSET_SPEC_VAR_TMPVA
property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
- if (Z_TYPE_P(container) == IS_OBJECT && Z_TYPE_P(property) == IS_STRING) {
+ if (UNEXPECTED(Z_TYPE_P(container) == IS_OBJECT && (Z_OBJCE_P(container)->ce_flags
& ZEND_ACC_HAS_TYPE_HINTS) && Z_TYPE_P(property) == IS_STRING)) {
/* TODO(krakjoe) needs caching */
zend_property_info *prop_info = zend_hash_find_ptr(&Z_OBJCE_P(container)->properties_info,
Z_STR_P(property));
@@ -27596,7 +27596,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL
ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_CO
property = EX_CONSTANT(opline->op2);
- if (Z_TYPE_P(container) == IS_OBJECT && Z_TYPE_P(property) == IS_STRING) {
+ if (UNEXPECTED(Z_TYPE_P(container) == IS_OBJECT && (Z_OBJCE_P(container)->ce_flags
& ZEND_ACC_HAS_TYPE_HINTS) && Z_TYPE_P(property) == IS_STRING)) {
/* TODO(krakjoe) needs caching */
zend_property_info *prop_info = zend_hash_find_ptr(&Z_OBJCE_P(container)->properties_info,
Z_STR_P(property));
@@ -31030,7 +31030,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL
ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_CV
property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
- if (Z_TYPE_P(container) == IS_OBJECT && Z_TYPE_P(property) == IS_STRING) {
+ if (UNEXPECTED(Z_TYPE_P(container) == IS_OBJECT && (Z_OBJCE_P(container)->ce_flags
& ZEND_ACC_HAS_TYPE_HINTS) && Z_TYPE_P(property) == IS_STRING)) {
/* TODO(krakjoe) needs caching */
zend_property_info *prop_info = zend_hash_find_ptr(&Z_OBJCE_P(container)->properties_info,
Z_STR_P(property));
@@ -33407,7 +33407,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL
ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_TM
property = _get_zval_ptr_var(opline->op2..var, execute_data, &free_op2);
- if (Z_TYPE_P(container) == IS_OBJECT && Z_TYPE_P(property) == IS_STRING) {
+ if (UNEXPECTED(Z_TYPE_P(container) == IS_OBJECT && (Z_OBJCE_P(container)->ce_flags
& ZEND_ACC_HAS_TYPE_HINTS) && Z_TYPE_P(property) == IS_STRING)) {
/* TODO(krakjoe) needs caching */
zend_property_info *prop_info = zend_hash_find_ptr(&Z_OBJCE_P(container)->properties_info,
Z_STR_P(property));
@@ -38368,7 +38368,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL
ZEND_FETCH_OBJ_UNSET_SPEC_CV_CONST_
property = EX_CONSTANT(opline->op2);
- if (Z_TYPE_P(container) == IS_OBJECT && Z_TYPE_P(property) == IS_STRING) {
+ if (UNEXPECTED(Z_TYPE_P(container) == IS_OBJECT && (Z_OBJCE_P(container)->ce_flags
& ZEND_ACC_HAS_TYPE_HINTS) && Z_TYPE_P(property) == IS_STRING)) {
/* TODO(krakjoe) needs caching */
zend_property_info *prop_info = zend_hash_find_ptr(&Z_OBJCE_P(container)->properties_info,
Z_STR_P(property));
@@ -44865,7 +44865,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL
ZEND_FETCH_OBJ_UNSET_SPEC_CV_CV_HAN
property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
- if (Z_TYPE_P(container) == IS_OBJECT && Z_TYPE_P(property) == IS_STRING) {
+ if (UNEXPECTED(Z_TYPE_P(container) == IS_OBJECT && (Z_OBJCE_P(container)->ce_flags
& ZEND_ACC_HAS_TYPE_HINTS) && Z_TYPE_P(property) == IS_STRING)) {
/* TODO(krakjoe) needs caching */
zend_property_info *prop_info = zend_hash_find_ptr(&Z_OBJCE_P(container)->properties_info,
Z_STR_P(property));
@@ -48533,7 +48533,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL
ZEND_FETCH_OBJ_UNSET_SPEC_CV_TMPVAR
property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
- if (Z_TYPE_P(container) == IS_OBJECT && Z_TYPE_P(property) == IS_STRING) {
+ if (UNEXPECTED(Z_TYPE_P(container) == IS_OBJECT && (Z_OBJCE_P(container)->ce_flags
& ZEND_ACC_HAS_TYPE_HINTS) && Z_TYPE_P(property) == IS_STRING)) {
/* TODO(krakjoe) needs caching */
zend_property_info *prop_info = zend_hash_find_ptr(&Z_OBJCE_P(container)->properties_info,
Z_STR_P(property));