You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's set a little context here. As best as I can tell the opcode STORE_LOCALS was in python 3.0-3.3 but removed in 3.4 right? What version of Python does this bytecode come from?
If it is the case that this exists only in a limited number of Python 3 versions, some care is needed in crafting the deparse Python grammar so it exists only in those versions. I can help to ensure that; so not a big deal, but just something to note.
Harder though is taking something that works in https://github.com/zrax/pycdc and adapting that here. Underneath, sadly the two work totally differently and for things like this, uncompyle6 is the harder to adapt. pycdc seems to work more like an Python interpreter so adding an opcode independent of anything else is easier for it. Also pycdc keeps track of stack entries while uncompyle6 is doing a grammar derivation starting with disassembled bytecode as tokens.
What is needed and missing both here and in the pycdc bug report, is bytecode that reproduces this error. Even better we both would want minimal bytecode, that is the shortest example that shows the problem. Also it would be super to have the source code for that bytecode since obviously right now we can't get that from either program.
--- This code section failed: ---
102 0 LOAD_FAST 'locals'
3 STORE_LOCALS ''
4 LOAD_NAME 'name'
7 STORE_NAME 'module'
10 LOAD_CONST '_zone'
13 STORE_NAME 'qualname'
103 16 LOAD_NAME 'staticmethod'
19 LOAD_CONST '<code_object add_sim>'
22 LOAD_CONST '_zone.add_sim'
25 MAKE_FUNCTION_0 ''
28 CALL_FUNCTION_1 ''
31 STORE_NAME 'add_sim'
106 34 LOAD_NAME 'staticmethod'
37 LOAD_CONST '<code_object remove_sim>'
40 LOAD_CONST '_zone.remove_sim'
43 MAKE_FUNCTION_0 ''
46 CALL_FUNCTION_1 ''
49 STORE_NAME 'remove_sim'
Syntax error at or near `STORE_LOCALS' token at offset 3
These guys fixed this here zrax/pycdc#63 - I'll take a look.
The text was updated successfully, but these errors were encountered: