cyclemodel/inorder: hide set inheritance
authorDmitry Selyutin <ghostmansd@gmail.com>
Wed, 10 May 2023 11:54:23 +0000 (04:54 -0700)
committerDmitry Selyutin <ghostmansd@gmail.com>
Wed, 10 May 2023 11:54:23 +0000 (04:54 -0700)
src/openpower/cyclemodel/inorder.py

index a4682b35e70d71131b9c0daa7c3bedefd2501827..99512458053b5116a71667070e6e9a67aec11c72 100644 (file)
 """
 
 
-class RegisterWrite(set):
+class RegisterWrite:
     """
     RegisterWrite: contains the set of Read-after-Write Hazards.
     Anything in this set must be a STALL at Decode phase because the
     answer has still not popped out the end of a pipeline
     """
+    def __init__(self):
+        self.storage = set()
+
     def expect_write(self, regs):
-        return self.update(regs)
+        return self.storage.update(regs)
 
     def write_expected(self, regs):
-        return (len(self.intersection(regs)) != 0)
+        return (len(self.storage.intersection(regs)) != 0)
 
     def retire_write(self, regs):
-        return self.difference_update(regs)
+        return self.storage.difference_update(regs)
 
 
 class Execute: