diff options
| author | Camille Mougey <camille.mougey@cea.fr> | 2015-02-23 17:55:27 +0100 |
|---|---|---|
| committer | Camille Mougey <camille.mougey@cea.fr> | 2015-02-23 17:55:27 +0100 |
| commit | 7c0f2382b77afca5e9c2bf24a4f6f2d0f27a6368 (patch) | |
| tree | 378e9abeae94b8809b40ffb4ae2dcd599aadaf7e /miasm2/jitter/jitcore.py | |
| parent | 9303454bbfb934017c1054f668f3083c75b2d61c (diff) | |
| download | miasm-7c0f2382b77afca5e9c2bf24a4f6f2d0f27a6368.tar.gz miasm-7c0f2382b77afca5e9c2bf24a4f6f2d0f27a6368.zip | |
JitCore: Jitted blocks are now a BoundedDict with a possible callback
Diffstat (limited to 'miasm2/jitter/jitcore.py')
| -rw-r--r-- | miasm2/jitter/jitcore.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/miasm2/jitter/jitcore.py b/miasm2/jitter/jitcore.py index f1e34870..b5a6264a 100644 --- a/miasm2/jitter/jitcore.py +++ b/miasm2/jitter/jitcore.py @@ -17,6 +17,7 @@ # from miasm2.core import asmbloc from miasm2.core.interval import interval +from miasm2.core.utils import BoundedDict from miasm2.jitter.csts import * @@ -24,6 +25,8 @@ class JitCore(object): "JiT management. This is an abstract class" + jitted_block_delete_cb = None + def __init__(self, ir_arch, bs=None): """Initialise a JitCore instance. @ir_arch: ir instance for current architecture @@ -33,7 +36,8 @@ class JitCore(object): self.ir_arch = ir_arch self.bs = bs self.known_blocs = {} - self.lbl2jitbloc = {} + self.lbl2jitbloc = BoundedDict(10000, + delete_cb=self.jitted_block_delete_cb) self.lbl2bloc = {} self.log_mn = False self.log_regs = False |