Optimize instanceof_function

Split out the simple equality check into an inline function --
this is one of the common cases.

Replace instanceof_function_ex with zend_class_implements_interface.
There are a few more places where it may be used.
This commit is contained in:
Nikita Popov 2019-10-25 10:45:42 +02:00
parent bd7b1afd6e
commit c858d17f06
9 changed files with 51 additions and 51 deletions

View file

@ -69,8 +69,7 @@ int datefmt_process_calendar_arg(zval* calendar_zv,
cal_int_type = Z_LVAL_P(calendar_zv);
} else if (Z_TYPE_P(calendar_zv) == IS_OBJECT &&
instanceof_function_ex(Z_OBJCE_P(calendar_zv),
Calendar_ce_ptr, 0)) {
instanceof_function(Z_OBJCE_P(calendar_zv), Calendar_ce_ptr)) {
cal = calendar_fetch_native_calendar(calendar_zv);
if (cal == NULL) {