Skip to content

Commit 421cc5d

Browse files
authored
Merge pull request #205 from boriel/feature/ensure_sort_opts
Feature/ensure sort opts
2 parents c0e53a6 + 9ca2f96 commit 421cc5d

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

arch/zx48k/backend/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2179,7 +2179,7 @@ def convertToBool():
21792179
return result
21802180

21812181

2182-
def emit_end(MEMORY=None):
2182+
def emit_end():
21832183
""" This special ending autoinitializes required inits
21842184
(mainly alloc.asm) and changes the MEMORY initial address if it is
21852185
ORG XXXX to ORG XXXX + heap size

arch/zx48k/peephole/engine.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ def read_opts(folder_path, result=None):
8484

8585
result.append(pattern_)
8686

87-
return sorted(result, key=lambda x: x.flag)
87+
result[:] = sorted(result, key=lambda x: x.flag)
88+
return result
8889

8990

9091
def apply_match(asm_list, patterns_list, index=0):

zxb.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ def main(args=None):
328328
tmp = [x for x in backend.emit(backend.MEMORY, optimize=False) if x.strip()[0] != '#']
329329
asm_output += tmp
330330
asm_output = backend.emit_start() + asm_output
331-
asm_output += backend.emit_end(asm_output)
331+
asm_output += backend.emit_end()
332332

333333
if options.asm: # Only output assembler file
334334
with open_file(OPTIONS.outputFileName.value, 'wt', 'utf-8') as output_file:

0 commit comments

Comments
 (0)