diff options
| author | serpilliere <fabrice.desclaux@cea.fr> | 2015-02-21 20:51:31 +0100 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2016-11-04 16:45:46 +0100 |
| commit | 8e8a60b5d55db6209d05577d038ed3b4dc961b60 (patch) | |
| tree | 2cb6c1b7133d073897abe2e072662369ec60ee57 /miasm2/expression/expression_helper.py | |
| parent | a15e0faca425c6e2591448e510bf14f1c3f04e14 (diff) | |
| download | miasm-8e8a60b5d55db6209d05577d038ed3b4dc961b60.tar.gz miasm-8e8a60b5d55db6209d05577d038ed3b4dc961b60.zip | |
Expression: Use singleton pattern for Expression
Start the transformation of Expression into immutable. Multiple problems were present in Expression class. One of them was comparison done through hash, which could generate collisions. The attributes is_simp/is_canon where linked to the instance, and could not survive to expression simplification.
Diffstat (limited to 'miasm2/expression/expression_helper.py')
| -rw-r--r-- | miasm2/expression/expression_helper.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/miasm2/expression/expression_helper.py b/miasm2/expression/expression_helper.py index 0c661c2a..3b85d720 100644 --- a/miasm2/expression/expression_helper.py +++ b/miasm2/expression/expression_helper.py @@ -86,7 +86,7 @@ def merge_sliceto_slice(args): sorted_s.pop() out[1] = s_start out[0] = m2_expr.ExprInt(int(out[0]), size) - final_sources.append((start, out)) + final_sources.append((start, tuple(out))) final_sources_int = final_sources # check if same sources have corresponding start/stop |