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:
818755e
)
oppc/ast: hash node by id
author
Dmitry Selyutin
<ghostmansd@gmail.com>
Sun, 14 Jan 2024 12:17:18 +0000
(15:17 +0300)
committer
Dmitry Selyutin
<ghostmansd@gmail.com>
Tue, 16 Jan 2024 19:10:07 +0000
(22:10 +0300)
src/openpower/oppc/pc_ast.py
patch
|
blob
|
history
diff --git
a/src/openpower/oppc/pc_ast.py
b/src/openpower/oppc/pc_ast.py
index 93df556a8d6107438a0b5d2d4e94777d9af5b7bb..2626b3583032ec50ad8336143728bd60b80dc5da 100644
(file)
--- a/
src/openpower/oppc/pc_ast.py
+++ b/
src/openpower/oppc/pc_ast.py
@@
-10,6
+10,9
@@
class Node(metaclass=NodeMeta):
def __repr__(self):
return f"{hex(id(self))}@{self.__class__.__name__}()"
+ def __hash__(self):
+ return id(self)
+
def __eq__(self, other):
if not isinstance(other, self.__class__):
return NotImplemented