From: Dmitry Selyutin Date: Mon, 12 Jun 2023 07:11:44 +0000 (+0300) Subject: insndb/core: fix operands iterators X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=refs%2Fheads%2Fpaths;p=openpower-isa.git insndb/core: fix operands iterators --- diff --git a/src/openpower/insndb/core.py b/src/openpower/insndb/core.py index aef9530d..c8e4bc4d 100644 --- a/src/openpower/insndb/core.py +++ b/src/openpower/insndb/core.py @@ -882,17 +882,13 @@ class Operands(Dict, datatype=object): (cls, kwargs) = items yield (cls, dict(kwargs)) - @staticmethod - def filter(cls): - return lambda pair: issubclass(pair[0], cls) - @cached_property def static(self): - return filter(self.__class__.filter(StaticOperand), self) + return tuple(filter(lambda pair: issubclass(pair[0], StaticOperand), self)) - @property + @cached_property def dynamic(self): - return filter(self.__class__.filter(DynamicOperand), self) + return tuple(filter(lambda pair: issubclass(pair[0], DynamicOperand), self)) class Arguments(tuple):