Skip to content

Commit c22e6a4

Browse files
Update ll_builder.py
1 parent 376356b commit c22e6a4

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

mypyc/irbuild/ll_builder.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -699,17 +699,7 @@ def isinstance_native(self, obj: Value, class_ir: ClassIR, line: int) -> Value:
699699
even faster type comparison checks `type(obj) is typ`.
700700
"""
701701
concrete = all_concrete_classes(class_ir)
702-
if (
703-
concrete is None
704-
or len(concrete) > FAST_ISINSTANCE_MAX_SUBCLASSES + 1
705-
or any(
706-
# we can only use fast path if we know end user won't inherit from the class
707-
cls.allow_interpreted_subclasses
708-
# a non-native class is only suitable for fast path if final
709-
or not cls.is_ext_class and not cls.is_final_class
710-
for cls in concrete
711-
)
712-
):
702+
if concrete is None or len(concrete) > FAST_ISINSTANCE_MAX_SUBCLASSES + 1:
713703
return self.primitive_op(
714704
fast_isinstance_op, [obj, self.get_native_type(class_ir)], line
715705
)

0 commit comments

Comments
 (0)