ScratchABlock icon indicating copy to clipboard operation
ScratchABlock copied to clipboard

RFC: Split current core.py

Open pfalcon opened this issue 6 years ago • 2 comments

The problem is that it contains 2 different kinds of classes:

  • "Atomic"/"Simple", e.g. REG, ADDR
  • "Complex"/"Recursive", e.g. EXPR, Inst

Simple types are oftentimes imported by other modules. And complex types sometimes need services of these other modules, leading to circular imports which need to be worked around.

pfalcon avatar Jan 05 '18 16:01 pfalcon

What about creating a package named "core"? It could contain different modules grouped together according to function...

maximumspatium avatar Jan 24 '18 16:01 maximumspatium

Ok, instead of splitting core.py, I instead split xform.py. Now there're:

xform_bblock.py xform_cfg.py xform_expr_infer.py xform_expr.py xform_graph.py xform_inst.py xform_inter.py

Those clear call to be moved to package (xform.cfg, etc.), but I'm not doing that so far for pure practical reasons of not jumping between dirs when editing code.

pfalcon avatar Nov 11 '18 10:11 pfalcon