Modified main routine in llpython.addr_flow to make it easier to determine which code object caused an exception in the translator.
This commit is contained in:
parent
b5a15a5019
commit
31119a48d4
1 changed files with 2 additions and 3 deletions
|
|
@ -110,11 +110,10 @@ def main(*args):
|
||||||
with open(arg) as in_file:
|
with open(arg) as in_file:
|
||||||
in_source = in_file.read()
|
in_source = in_file.read()
|
||||||
in_codeobj = compile(in_source, arg, 'exec')
|
in_codeobj = compile(in_source, arg, 'exec')
|
||||||
flow_map = build_addr_flows_from_co(in_codeobj)
|
for codeobj in itercodeobjs(in_codeobj):
|
||||||
for codeobj, flow in flow_map.items():
|
|
||||||
print("_" * 70)
|
print("_" * 70)
|
||||||
print(codeobj)
|
print(codeobj)
|
||||||
pprint.pprint(flow)
|
pprint.pprint(build_addr_flow_from_co(codeobj))
|
||||||
else:
|
else:
|
||||||
pprint.pprint(build_addr_flow(getattr(llfuncs, arg)))
|
pprint.pprint(build_addr_flow(getattr(llfuncs, arg)))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue