com php-src: Intriduced ZEND_ACC_INHERITED class flag . It's going to be helpful for static optim isations, when "parent" is not known yet. :
Zend/zend_compile.c Zend/zend_compile.h ext/r eflection/php_reflection.c
| From: | Dmitry Stogov | Date: | Tue, 01 Nov 2016 19:56:25 +0000 |
| Subject: | com php-src: Intriduced ZEND_ACC_INHERITED class flag . It's going to be helpful for static optim isations, when "parent" is not known yet. : Zend/zend_compile.c Zend/zend_compile.h ext/r eflection/php_reflection.c |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-95379@lists.php.net to get a copy of this message | ||
Commit: bdc1ba3e3a314da472ef132e233f8b37ddac39e1
Author: Dmitry Stogov <dmitry@zend.com> Tue, 1 Nov 2016 22:56:25 +0300
Parents: b281362681bea63b139b89f5943e5c220bf0b82d
Branches: PHP-7.1 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=bdc1ba3e3a314da472ef132e233f8b37ddac39e1
Log:
Intriduced ZEND_ACC_INHERITED class flag.
It's going to be helpful for static optimisations, when "parent" is not known yet.
Changed paths:
M Zend/zend_compile.c
M Zend/zend_compile.h
M ext/reflection/php_reflection.c
Diff:
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index f53365f..47cc6c6 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -5949,6 +5949,7 @@ void zend_compile_class_decl(zend_ast *ast) /* {{{ */
}
zend_compile_class_ref(&extends_node, extends_ast, 0);
+ ce->ce_flags |= ZEND_ACC_INHERITED;
}
opline = get_next_op(CG(active_op_array));
diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h
index 1f0773d..422404d 100644
--- a/Zend/zend_compile.h
+++ b/Zend/zend_compile.h
@@ -213,6 +213,7 @@ typedef struct _zend_oparray_context {
#define ZEND_ACC_TRAIT 0x80
#define ZEND_ACC_ANON_CLASS 0x100
#define ZEND_ACC_ANON_BOUND 0x200
+#define ZEND_ACC_INHERITED 0x400
/* method flags (visibility) */
/* The order of those must be kept - public < protected < private */
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 9ecb04d..1169bb6 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -4783,7 +4783,7 @@ ZEND_METHOD(reflection_class, getModifiers)
}
GET_REFLECTION_OBJECT_PTR(ce);
- RETURN_LONG(ce->ce_flags & ~(ZEND_ACC_CONSTANTS_UPDATED|ZEND_ACC_USE_GUARDS));
+ RETURN_LONG(ce->ce_flags &
~(ZEND_ACC_CONSTANTS_UPDATED|ZEND_ACC_USE_GUARDS|ZEND_ACC_INHERITED));
}
/* }}} */