From 244f54d93f5f9180add08c3b0c9ced54ad31d64b Mon Sep 17 00:00:00 2001 From: Jennifer Taylor Date: Thu, 15 Jul 2021 00:15:14 +0000 Subject: [PATCH] Add future enhancement TODO to decompiler optimizer. --- bemani/format/afp/decompile.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bemani/format/afp/decompile.py b/bemani/format/afp/decompile.py index e8be3ae..8131a56 100644 --- a/bemani/format/afp/decompile.py +++ b/bemani/format/afp/decompile.py @@ -3858,6 +3858,14 @@ class ByteCodeDecompiler(VerboseOutput): self.__eliminate_unused_labels, ] + # TODO: The bytecode compiler that was used in Bishi seems to like using + # registers as temporary storage for variables in a lot of cases. We should + # be able to track register assignment and use and see if there is only one + # use/assignment of a register after all other optimization passes are done. + # If this is the case, we should be able to substitute the original assignment + # for the register when used, and get rid of the assignment altogether. This + # should slightly clean up a fair bit of code. + while True: self.vprint("Running optimizer pass...") any_changed = False