Merge branch 'PHP-7.1'

* PHP-7.1:
  Intriduced ZEND_ACC_INHERITED class flag. It's going to be helpful for static optimisations, when "parent" is not known yet.
This commit is contained in:
Dmitry Stogov 2016-11-01 22:58:59 +03:00
commit c71ab7260a
3 changed files with 3 additions and 1 deletions

View File

@ -5968,6 +5968,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));

View File

@ -215,6 +215,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 */

View File

@ -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));
}
/* }}} */