Add missing files

Temporary and Reference variable have a specific classes for the SSA slithIR version
pull/179/head
Josselin 6 years ago
parent 821d385f33
commit a7cfcf7ae8
  1. 18
      slither/slithir/variables/reference_ssa.py
  2. 20
      slither/slithir/variables/temporary_ssa.py

@ -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…
Cancel
Save