Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mu-spec
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
16
Issues
16
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mu
mu-spec
Commits
f331eab2
Commit
f331eab2
authored
Aug 09, 2016
by
Kunshan Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed typos and synchronised defs
parent
c9666872
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
209 additions
and
236 deletions
+209
-236
common-insts.rst
common-insts.rst
+78
-91
muapi.h
muapi.h
+126
-136
scripts/muapi-irbuilder-to-comminsts.py
scripts/muapi-irbuilder-to-comminsts.py
+4
-8
scripts/muapiparser.py
scripts/muapiparser.py
+1
-1
No files found.
common-insts.rst
View file @
f331eab2
This diff is collapsed.
Click to expand it.
muapi.h
View file @
f331eab2
This diff is collapsed.
Click to expand it.
scripts/muapi-irbuilder-to-comminsts.py
View file @
f331eab2
...
@@ -50,8 +50,8 @@ _type_map = {
...
@@ -50,8 +50,8 @@ _type_map = {
def
to_mu_ty
(
cty
):
def
to_mu_ty
(
cty
):
if
cty
.
endswith
(
"*"
):
if
cty
.
endswith
(
"*"
):
return
"iref<{}>"
.
format
(
to_mu_ty
(
cty
[:
-
1
]))
return
"iref<{}>"
.
format
(
to_mu_ty
(
cty
[:
-
1
]))
elif
cty
.
startswith
(
"Mu"
)
and
cty
.
endswith
(
"Node"
):
elif
cty
.
startswith
(
"Mu"
)
and
(
cty
.
endswith
(
"Node"
)
or
cty
.
endswith
(
"Clause"
)
):
return
"i
rnoderef
"
return
"i
nt<32>
"
elif
cty
in
_type_map
:
elif
cty
in
_type_map
:
return
_type_map
[
cty
]
return
_type_map
[
cty
]
else
:
else
:
...
@@ -59,17 +59,13 @@ def to_mu_ty(cty):
...
@@ -59,17 +59,13 @@ def to_mu_ty(cty):
def
get_comminst_defs
(
ast
):
def
get_comminst_defs
(
ast
):
muctx_methods
=
[
s
[
"methods"
]
for
s
in
ast
[
"structs"
]
muctx_methods
=
[
s
[
"methods"
]
for
s
in
ast
[
"structs"
]
if
s
[
"name"
]
==
"MuCtx"
][
0
]
if
s
[
"name"
]
==
"MuIRBuilder"
][
0
]
index_new_bundle
=
0
while
muctx_methods
[
index_new_bundle
][
"name"
]
!=
"new_bundle"
:
index_new_bundle
+=
1
next_id
=
start_id_comminst
next_id
=
start_id_comminst
lines
=
[
""
,
"::"
,
""
]
# start reStructuredText block
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
]
meth
=
muctx_methods
[
i
]
name
=
meth
[
"name"
]
name
=
meth
[
"name"
]
params
=
meth
[
"params"
]
params
=
meth
[
"params"
]
...
...
scripts/muapiparser.py
View file @
f331eab2
...
@@ -68,7 +68,7 @@ def extract_enums(text, typename, pattern):
...
@@ -68,7 +68,7 @@ def extract_enums(text, typename, pattern):
"defs"
:
defs
,
"defs"
:
defs
,
}
}
_top_level_structs
=
[
"MuVM"
,
"MuCtx"
]
_top_level_structs
=
[
"MuVM"
,
"MuCtx"
,
"MuIRBuilder"
]
_enums
=
[(
typename
,
re
.
compile
(
regex
))
for
typename
,
regex
in
[
_enums
=
[(
typename
,
re
.
compile
(
regex
))
for
typename
,
regex
in
[
(
"MuTrapHandlerResult"
,
r'^MU_(THREAD|REBIND)'
),
(
"MuTrapHandlerResult"
,
r'^MU_(THREAD|REBIND)'
),
(
"MuDestKind"
,
r'^MU_DEST_'
),
(
"MuDestKind"
,
r'^MU_DEST_'
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment