Commit f331eab2 authored by Kunshan Wang's avatar Kunshan Wang

fixed typos and synchronised defs

parent c9666872
This diff is collapsed.
This diff is collapsed.
......@@ -50,8 +50,8 @@ _type_map = {
def to_mu_ty(cty):
if cty.endswith("*"):
return "iref<{}>".format(to_mu_ty(cty[:-1]))
elif cty.startswith("Mu") and cty.endswith("Node"):
return "irnoderef"
elif cty.startswith("Mu") and (cty.endswith("Node") or cty.endswith("Clause")):
return "int<32>"
elif cty in _type_map:
return _type_map[cty]
else:
......@@ -59,17 +59,13 @@ def to_mu_ty(cty):
def get_comminst_defs(ast):
muctx_methods = [s["methods"] for s in ast["structs"]
if s["name"] == "MuCtx"][0]
index_new_bundle = 0
while muctx_methods[index_new_bundle]["name"] != "new_bundle":
index_new_bundle += 1
if s["name"] == "MuIRBuilder"][0]
next_id = start_id_comminst
lines = ["", "::", ""] # start reStructuredText block
for i in range(index_new_bundle, len(muctx_methods)):
for i in range(len(muctx_methods)):
meth = muctx_methods[i]
name = meth["name"]
params = meth["params"]
......
......@@ -68,7 +68,7 @@ def extract_enums(text, typename, pattern):
"defs": defs,
}
_top_level_structs = ["MuVM", "MuCtx"]
_top_level_structs = ["MuVM", "MuCtx", "MuIRBuilder"]
_enums = [(typename, re.compile(regex)) for typename, regex in [
("MuTrapHandlerResult", r'^MU_(THREAD|REBIND)'),
("MuDestKind", r'^MU_DEST_'),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment