gpdaniels / spike-prime

Experiments with the LEGO Mindstorms (51515) and SPIKE Prime (45678)
MIT License
282 stars 39 forks source link

Decompiler output expectations? #29

Closed MarkWard0110 closed 2 years ago

MarkWard0110 commented 2 years ago

When I execute the decompile the decompiled .py files contain less than expected code. Many of the files when I decompile them result in .py files containing output similar to the following event_loop.py where the file has imports, a declaration, then return none.

import utimeq
import collections
EventLoop = __build_class__(0, "EventLoop")
return None

Other files have lines like the following

$push(3)
BROKEN_OP`eq`
BROKEN_OP`btrue 147`
$push(hasattr(hub, "display"))

I was expecting to see more information like class, methods, variables, conditional statements, loops, etc.

Is the decompiler working as expected with the output I am getting?

gpdaniels commented 2 years ago

The disassember/decompiler are in a very incomplete state see #19.

I've not been able to spend any time on it since getting the MR from @pitust merged in and working.

gpdaniels commented 2 years ago

Closing as this is currently all that is expected of the decompiler.