diff options
| author | Rusty Wagner <rusty@vector35.com> | 2017-08-23 01:04:47 -0400 |
|---|---|---|
| committer | Rusty Wagner <rusty@vector35.com> | 2017-08-23 17:01:33 -0400 |
| commit | 0d88336e22cf85a917729fe0f814c1e63736fca0 (patch) | |
| tree | 246a7cf34d3f3919770cfbb2cf5f357adb1771e1 /python/types.py | |
| parent | 7f3efa01f053e19549c480a770728085900c2131 (diff) | |
Added APIs for clobbered registers, global pointers, and function exit data flow info
Diffstat (limited to 'python/types.py')
| -rw-r--r-- | python/types.py | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/python/types.py b/python/types.py index fd2ee27e..bf4a7b74 100644 --- a/python/types.py +++ b/python/types.py @@ -650,6 +650,43 @@ class BoolWithConfidence(object): return self.value +class SizeWithConfidence(object): + def __init__(self, value, confidence = max_confidence): + self.value = value + self.confidence = confidence + + def __str__(self): + return str(self.value) + + def __repr__(self): + return repr(self.value) + + def __int__(self): + return self.value + + +class RegisterSet(object): + def __init__(self, reg_list, confidence = max_confidence): + self.regs = reg_list + self.confidence = confidence + + def __repr__(self): + return repr(self.regs) + + def __iter__(self): + for reg in self.regs: + yield reg + + def __getitem__(self, idx): + return self.regs[idx] + + def __len__(self): + return len(self.regs) + + def with_confidence(self, confidence): + return RegisterSet(list(self.regs), confidence = confidence) + + class ReferenceTypeWithConfidence(object): def __init__(self, value, confidence = max_confidence): self.value = value |
