com php-src: Eliminated check: Zend/zend_inheritance.c

From: Date: Mon, 09 Jul 2018 12:18:09 +0000
Subject: com php-src: Eliminated check: Zend/zend_inheritance.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-102491@lists.php.net to get a copy of this message
Commit: a34fedb7237afed21b7e3084d22281cd6ac2e57b Author: Dmitry Stogov <dmitry@zend.com> Mon, 9 Jul 2018 15:18:09 +0300 Parents: c90f1964f95d3021137090be39676d22dbc226c2 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a34fedb7237afed21b7e3084d22281cd6ac2e57b Log: Eliminated check Changed paths: M Zend/zend_inheritance.c Diff: diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index b66464c..1873d76 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -588,13 +588,13 @@ static void do_inheritance_check_on_method(zend_function *child, zend_function * } else if (parent_flags & ZEND_ACC_ABSTRACT) { child->common.fn_flags |= ZEND_ACC_IMPLEMENTED_ABSTRACT; child->common.prototype = parent; - } else if (!(parent->common.fn_flags & ZEND_ACC_CTOR) || (parent->common.prototype && (parent->common.prototype->common.scope->ce_flags & ZEND_ACC_INTERFACE))) { + } else if (!(parent->common..fn_flags & ZEND_ACC_CTOR)) { + child->common.prototype = parent->common.prototype ? parent->common.prototype : parent; + } else if (parent->common.prototype && (parent->common.prototype->common.scope->ce_flags & ZEND_ACC_INTERFACE)) { /* ctors only have a prototype if it comes from an interface */ child->common.prototype = parent->common.prototype ? parent->common.prototype : parent; /* and if that is the case, we want to check inheritance against it */ - if (parent->common.fn_flags & ZEND_ACC_CTOR) { - parent = child->common.prototype; - } + parent = child->common.prototype; } if (UNEXPECTED(!zend_do_perform_implementation_check(child, parent))) {

« previous php.cvs (#102491) next »