From d140df58e6152037e7e3a3a0b119eae4970dd77e Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 23 Aug 2018 17:16:28 +0300 Subject: Keep information about unresolved interfaces in zend_class_entry->interface_names. Move interface implementation code into ZEND_DECLARE_*CLASS opcodes. Remove ZEND_ADD_INTERFACE and ZEND_VERIFY_ABSTRACT_CLASS opcodes. --- ext/reflection/php_reflection.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ext/reflection/php_reflection.c') diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index c481e79618..e20479837b 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -324,6 +324,7 @@ static void _class_string(smart_str *str, zend_class_entry *ce, zval *obj, char if (ce->num_interfaces) { uint32_t i; + ZEND_ASSERT(!(ce->ce_flags & ZEND_ACC_UNRESOLVED_INTERFACES)); if (ce->ce_flags & ZEND_ACC_INTERFACE) { smart_str_append_printf(str, " extends %s", ZSTR_VAL(ce->interfaces[0]->name)); } else { @@ -4827,6 +4828,7 @@ ZEND_METHOD(reflection_class, getInterfaces) if (ce->num_interfaces) { uint32_t i; + ZEND_ASSERT(!(ce->ce_flags & ZEND_ACC_UNRESOLVED_INTERFACES)); array_init(return_value); for (i=0; i < ce->num_interfaces; i++) { zval interface; @@ -4858,6 +4860,7 @@ ZEND_METHOD(reflection_class, getInterfaceNames) return; } + ZEND_ASSERT(!(ce->ce_flags & ZEND_ACC_UNRESOLVED_INTERFACES)); array_init(return_value); for (i=0; i < ce->num_interfaces; i++) { -- cgit v1.2.1