refimpl2injectablefiles.py 1.41 KB
Newer Older
Kunshan Wang's avatar
Kunshan Wang committed
1 2 3 4 5 6 7 8 9 10
import injecttools
import os.path

_my_dir = os.path.dirname(__file__)
_refimpl2_root = os.path.join(_my_dir, "..")

def _make_injectable_file_set(m):
    m2 = {os.path.join(_refimpl2_root, k): v for k,v in m.items()}
    return InjectableFileSet(m2)

Kunshan Wang's avatar
Kunshan Wang committed
11 12
muapi_h_path = os.path.join(_refimpl2_root, "cbinding/muapi.h")
irbuilder_nodes_path = os.path.join(_refimpl2_root, "src/main/scala/uvm/ir/irbuilder/irBuilderNodes.scala")
13

Kunshan Wang's avatar
Kunshan Wang committed
14
injectable_files = injecttools.make_injectable_file_set(_refimpl2_root, [
15 16 17
    ("cStubs.scala", "src/main/scala/uvm/refimpl/nat/cStubs.scala",
        ["STUBS"]),
    ("libmu.py", "pythonbinding/libmu.py",
Kunshan Wang's avatar
Kunshan Wang committed
18 19
        ["CTYPES", "CENUMS", "MUVALUE", "MuVM", "MuCtx", "MuIRBuilder",
            "wrp_MuIRBuilder"]),
Kunshan Wang's avatar
Kunshan Wang committed
20 21
    ("comminsts.scala", "src/main/scala/uvm/comminsts/comminsts.scala",
        ["IRBUILDER_COMMINSTS"]),
22
    ("TypeInferer.scala", "src/main/scala/uvm/staticanalysis/TypeInferer.scala",
Kunshan Wang's avatar
Kunshan Wang committed
23
        ["IRBUILDER_RETVALS"]),
24 25
    ("InstructionResultInferer.scala", "src/main/scala/uvm/staticanalysis/InstructionResultInferer.scala",
        ["IRBUILDER_RETVAL_NUMS"]),
Kunshan Wang's avatar
Kunshan Wang committed
26 27
    ("ir-ci-exec", "src/main/scala/uvm/refimpl/itpr/IRBuilderCommInstExecutor.scala",
        ["IRBUILDER_IMPL"]),
Kunshan Wang's avatar
Kunshan Wang committed
28 29
    ("MuCtxIRBuilderPart.scala", "src/main/scala/uvm/refimpl/MuCtxIRBuilderPart.scala",
        ["METHODS"]),
Kunshan Wang's avatar
Kunshan Wang committed
30 31
    ("IRBuilder.scala", "src/main/scala/uvm/ir/irbuilder/IRBuilder.scala",
        ["IRBUILDERNODE_CONSTRUCTORS"]),
Kunshan Wang's avatar
Kunshan Wang committed
32
    ])