Skip to content

Commit dab3544

Browse files
authored
Merge pull request #220 from boriel/feature/refact_backend
Feature/refact backend
2 parents 5a41efb + 4cc5664 commit dab3544

File tree

8 files changed

+971
-604
lines changed

8 files changed

+971
-604
lines changed

arch/zx48k/backend/__common.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,21 +41,21 @@ def init():
4141
TMP_LABELS.clear()
4242

4343

44-
def log2(x):
44+
def log2(x) -> float:
4545
""" Returns log2(x)
4646
"""
4747
return math.log(x) / __LN2
4848

4949

50-
def is_2n(x):
50+
def is_2n(x) -> bool:
5151
""" Returns true if x is an exact
5252
power of 2
5353
"""
5454
l = log2(x)
5555
return l == int(l)
5656

5757

58-
def tmp_label():
58+
def tmp_label() -> str:
5959
global LABEL_COUNTER
6060
global TMP_LABELS
6161

@@ -66,7 +66,7 @@ def tmp_label():
6666
return result
6767

6868

69-
def tmp_temp():
69+
def tmp_temp() -> str:
7070
global TMP_COUNTER
7171

7272
for i in range(TMP_COUNTER):

0 commit comments

Comments
 (0)