Move ValueType into a new cdsl top-level module.

We want to separate the Python classes that make up the DSL used to
define the Cretonne language from the concrete definitions.

- cdsl.types defines the ValueType class hierarchy.
- base.types defines the concrete types.
This commit is contained in:
Jakob Stoklund Olesen
2016-11-08 09:40:19 -08:00
parent 1e1830aaa6
commit f8545574b5
11 changed files with 210 additions and 202 deletions

View File

@@ -245,7 +245,7 @@ class TypeDocumenter(sphinx.ext.autodoc.Documenter):
return False
def resolve_name(self, modname, parents, path, base):
return 'cretonne.types', [base]
return 'base.types', [base]
def add_content(self, more_content, no_docstring=False):
super(TypeDocumenter, self).add_content(more_content, no_docstring)
@@ -280,11 +280,11 @@ class InstDocumenter(sphinx.ext.autodoc.Documenter):
op = inst.ins[0]
sig += ' ' + op.name
# If the first input is variable-args, this is 'return'. No parens.
if op.typ.operand_kind().name == 'variable_args':
if op.kind.name == 'variable_args':
sig += '...'.format(op.name)
for op in inst.ins[1:]:
# This is a call or branch with args in (...).
if op.typ.operand_kind().name == 'variable_args':
if op.kind.name == 'variable_args':
sig += '({}...)'.format(op.name)
else:
sig += ', ' + op.name