Skip to content

TypedPython: verifier and cgen disagree on whether an F64/BOOL Unbox can deopt #271

Closed

Description

@b-re-w

Found during #143. verify.py e_Unbox sets can_deopt only for an I64 Unbox (and test_verify.py asserts an F64 Unbox is fine in an impure function), but cgen emits tp_unbox_f64 / tp_unbox_bool, which return 1 (deopt) on a non-exact operand, and cgen.py treats every Unbox as may-deopt. In an impure function a deopt after an effect would repeat that effect on redo. The front end currently emits no Unbox, so source programs do not reach it; hand-built IR does.

Done when: verifier and cgen agree (either every scalar Unbox can deopt, or F64/BOOL Unbox is only accepted on an operand proven exact, with cgen emitting no deopt branch), and a test pins the agreed rule.

Activity

  1. added a commit that references this issue on Oct 25, 2026
  2. b-re-w commented on Oct 25, 2026

    @b-re-w
    MemberAuthor

    Landed in develop via #290.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions