Closed P403n1x87 closed 1 year ago
Patch coverage: 60.00%
and project coverage change: -0.09%
:warning:
Comparison is base (
e14a0a2
) 95.60% compared to head (bdc6775
) 95.51%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I am extremely hesitant to allow this kind of things. In particular I fear that "legalizing" the bytecode when converting to concrete may be too late since we need a CFG to compute the stack size and I would not bet on dis.stack_effect being accurate for pseudo instructions.
This and your request about TryBegin/End to me sound more like we could have a more abstract builder for bytecode that we could then safely compile before doing any computation on it. Food for though.
I've had this idea for a while now and finally had a chance to experiment with it https://github.com/P403n1x87/spasmlang. Perhaps these sorts of transformations can be handled at this higher level.
I'm closing this PR since my use cases are now covered by https://github.com/P403n1x87/spasmlang/pull/2.
Allow handling the
LOAD_METHOD
pseudo-instruction in CPython 3.12 by converting it to the equivalentLOAD_ATTR
instruction.Resolves #128.