projects
/
openpower-isa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
432e618
)
oppc/pseudocode: allow to check whether node is present
author
Dmitry Selyutin
<ghostmansd@gmail.com>
Tue, 16 Jan 2024 19:09:45 +0000
(22:09 +0300)
committer
Dmitry Selyutin
<ghostmansd@gmail.com>
Tue, 16 Jan 2024 19:10:07 +0000
(22:10 +0300)
src/openpower/oppc/pc_pseudocode.py
patch
|
blob
|
history
diff --git
a/src/openpower/oppc/pc_pseudocode.py
b/src/openpower/oppc/pc_pseudocode.py
index 074d4c0d9b5f4537c3bc2472919f8c243cfd8335..6804eb26020f11d5dbaa2f095817d3d24f745c79 100644
(file)
--- a/
src/openpower/oppc/pc_pseudocode.py
+++ b/
src/openpower/oppc/pc_pseudocode.py
@@
-14,6
+14,9
@@
class PseudocodeVisitor(pc_util.Visitor):
def __iter__(self):
yield from self.__code[self.__root]
+ def __contains__(self, node):
+ return (node in self.__code)
+
def __getitem__(self, node):
return self.__code[node]