Better module printing
This commit is contained in:
parent
7f3efc882a
commit
d567f95c1f
1 changed files with 12 additions and 2 deletions
|
@ -203,9 +203,19 @@ class Module(t.NamedTuple):
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
b = []
|
b = []
|
||||||
|
b.append("functions:")
|
||||||
|
for sig, fun in self.functions.items():
|
||||||
|
b.append(f" {sig!r}:")
|
||||||
|
b.append(f" name: {fun.name}")
|
||||||
|
b.append(f" typeconstraints: {fun.typeconstraints}")
|
||||||
|
b.append(f" arguments: {fun.arguments}")
|
||||||
|
b.append(f" returns: {fun.returns}")
|
||||||
|
b.append(f" ip: {self.labels[fun.signature]}")
|
||||||
|
|
||||||
|
b.append("codepage:")
|
||||||
marks = {v: k for k, v in self.labels.items()}
|
marks = {v: k for k, v in self.labels.items()}
|
||||||
for i, o in zip(range(1<<64), self.codepage):
|
for i, o in zip(range(1<<64), self.codepage):
|
||||||
if(i in marks):
|
if(i in marks):
|
||||||
b.append(f"{marks[i]}:")
|
b.append(f" {marks[i]!r}:")
|
||||||
b.append(f" {i: >10}: {o}")
|
b.append(f" {i: >10}: {o}")
|
||||||
return "\n".join(b)
|
return "\n".join(b)
|
||||||
|
|
Loading…
Reference in a new issue