Closed 0x32767 closed 11 months ago
You probably need a RESUME
at the top, but more importantly you need to push NULL to the stack if you don't want to use LOAD_GLOBAL
with the flag set. For example
resume 0
push_null
load_name $input
call 0
pop_top
return_const None
(I'm using spasmlang for simplicity) should work as expected with 3.12
Thank you for helping, that worked for me.
I wan't to call a function with no arguments, e.g.
input()
, but I keep getting a RuntimeError saying the stack size is negative. These are the instructions that I have used:Causes:
However when I call the function with an argument I get the expected output, with the bytecode:
I also looked at the dis module to try and find out how python 3.12 does function calls with no arguments.
How could I call input with no arguments?