Hello,
On Sun, 26 Apr 2020 19:51:18 -0700
Skip Montanaro <[email protected]> wrote:
[]
> I think it's worse that this though, as it seems that in gen_send_ex()
> it actually pushes a value onto the stack. That can't be solved by
> simply adding a state attribute to the generator object struct.
At the higher level, "it doesn't push value on stack", it "sets value
of the yield operator to return". CPython uses stack slots to keep
data, so puts it in a stack slot, you use registers, so would put it in
a ("return value") register. Overall, that seems like minor patching
detail comparing to patching which would be required to implement
register-based calling convention for functions.
--
Best regards,
Paul mailto:[email protected]
_______________________________________________
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/AIMUHRIUBDN63IGLTLIYZH4YXZDBNZTV/
Code of Conduct: http://python.org/psf/codeofconduct/