mirror of https://github.com/crytic/slither
Temporary and Reference variable have a specific classes for the SSA slithIR versionpull/179/head
parent
821d385f33
commit
a7cfcf7ae8
@ -0,0 +1,18 @@ |
||||
''' |
||||
This class is used for the SSA version of slithIR |
||||
It is similar to the non-SSA version of slithIR |
||||
as the ReferenceVariable are in SSA form in both version |
||||
''' |
||||
from .reference import ReferenceVariable |
||||
from .variable import SlithIRVariable |
||||
|
||||
class ReferenceVariableSSA(ReferenceVariable): |
||||
|
||||
def __init__(self, reference): |
||||
super(ReferenceVariableSSA, self).__init__(reference.node, reference.index) |
||||
|
||||
self._non_ssa_version = reference |
||||
|
||||
@property |
||||
def non_ssa_version(self): |
||||
return self._non_ssa_version |
@ -0,0 +1,20 @@ |
||||
''' |
||||
This class is used for the SSA version of slithIR |
||||
It is similar to the non-SSA version of slithIR |
||||
as the TemporaryVariable are in SSA form in both version |
||||
''' |
||||
from .temporary import TemporaryVariable |
||||
from .variable import SlithIRVariable |
||||
|
||||
class TemporaryVariableSSA(TemporaryVariable): |
||||
|
||||
def __init__(self, temporary): |
||||
super(TemporaryVariableSSA, self).__init__(temporary.node, temporary.index) |
||||
|
||||
self._non_ssa_version = temporary |
||||
|
||||
|
||||
@property |
||||
def non_ssa_version(self): |
||||
return self._non_ssa_version |
||||
|
Loading…
Reference in new issue