Skip to content

fix stack effects of make_function, build_slice, and format_value ope… - #192

Merged
rocky merged 1 commit into
rocky:masterfrom
Joel-Flores123:master
Oct 18, 2026
Merged

rocky merged 1 commit into
rocky:masterfrom
Joel-Flores123:master

Conversation

@Joel-Flores123

Copy link
Copy Markdown
Contributor

Corrected some operands in xstack_effect() that existing tests don't cover. I also put in some links to the relevant Cpython code.

  • MAKE_FUNCTION returned None for flags 11–15 on 3.6–3.10 (3.10), and for flags 3–15 on 3.11 and 3.12 (3.11, 3.12).
  • BUILD_SLICE (3.0–3.13) returned -1 for three-part slices like a[1:10:2] when it should be -2. (3.6, 3.13)
  • FORMAT_VALUE (3.6–3.12) returned 0 when a format spec is present when it should be -1. (3.6, 3.12)

I also added test_stack_effect_operand_dependent, which checks these operands for all three opcodes.

@rocky

rocky commented Oct 18, 2026

Copy link
Copy Markdown
Owner

Thanks. (The CI failures are due to not updating released Python versions.)

@rocky
rocky merged commit 51e36c4 into rocky:master Oct 18, 2026
2 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants