1
0
mirror of https://github.com/php/php-src.git synced 2026-04-14 11:32:11 +02:00

Fixed IS_UNDEF handling

This commit is contained in:
Dmitry Stogov
2020-07-03 10:52:03 +03:00
parent 807d6c0418
commit ca159561db

View File

@@ -1612,16 +1612,12 @@ static zend_bool is_power_of_two(uint32_t x)
static zend_bool has_concrete_type(uint32_t value_type)
{
if (value_type & MAY_BE_UNDEF) {
value_type |= MAY_BE_NULL;
}
value_type &= MAY_BE_ANY;
return is_power_of_two (value_type);
return is_power_of_two (value_type & (MAY_BE_ANY|MAY_BE_UNDEF));
}
static uint32_t concrete_type(uint32_t value_type)
{
return floor_log2(value_type & MAY_BE_ANY);
return floor_log2(value_type & (MAY_BE_ANY|MAY_BE_UNDEF));
}
static inline zend_bool is_signed(double d)