Util methods for Python jitter #.
Updates @cpu instance according to new CPU values
@cpu: JitCpu instance
@exec_engine: symbexec instance
Definition at line 12 of file jitcore_python.py.
14 """Updates @cpu instance according to new CPU values
16 @exec_engine: symbexec instance"""
18 for symbol
in exec_engine.symbols:
19 if isinstance(symbol, m2_expr.ExprId):
20 if hasattr(cpu, symbol.name):
21 value = exec_engine.symbols.symbols_id[symbol]
22 if not isinstance(value, m2_expr.ExprInt):
23 raise ValueError(
"A simplification is missing: %s" % value)
25 setattr(cpu, symbol.name, value.arg.arg)
27 raise NotImplementedError(
"Type not handled: %s" % symbol)
def update_cpu_from_engine
Util methods for Python jitter #.