Skip to content

ZJIT: Constant-fold IsNil #936

@tekknolagi

Description

@tekknolagi

If we see IsNil(nil) or IsNil(definitely-not-nil), we can fold it to CBool[true] or Cbool[false]. Add this case in fold_constants and use similar logic to that in infer_type

Add an HIR tests in opt_tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions