about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorFlorent Monjalet <florent.monjalet@gmail.com>2015-03-06 00:37:48 +0100
committerFlorent Monjalet <florent.monjalet@gmail.com>2015-03-06 00:37:48 +0100
commit2d7bea1fa01fde589ffaacdf8b75e3226e37ceb1 (patch)
tree06820090f697992ff4e1526e130b7da02c698df1
parent8f3f666795a8f7c2292092987529036b513250d0 (diff)
downloadmiasm-2d7bea1fa01fde589ffaacdf8b75e3226e37ceb1.tar.gz
miasm-2d7bea1fa01fde589ffaacdf8b75e3226e37ceb1.zip
TranslatorZ3: now uses its cache (forgotten lines...)
-rw-r--r--miasm2/ir/translators/z3_ir.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/miasm2/ir/translators/z3_ir.py b/miasm2/ir/translators/z3_ir.py
index 033c6053..f3f9a6bf 100644
--- a/miasm2/ir/translators/z3_ir.py
+++ b/miasm2/ir/translators/z3_ir.py
@@ -190,7 +190,9 @@ class TranslatorZ3(Translator):
             if expr in cls._cache:
                 return cls._cache[expr]
             else:
-                return super(TranslatorZ3, cls).from_expr(expr)
+                ret = super(TranslatorZ3, cls).from_expr(expr)
+                cls._cache[expr] = ret
+                return ret
         finally:
             # Clean cache and Z3Mem if this call is the root call
             if del_cache: