Skip to content
Snippets Groups Projects

Fix handling of constness in Typifier

Merged Frederik Hennig requested to merge fhennig/fix-const-typing into backend-rework
All threads resolved!

Improves the handling of constness in the typifier.

Left-hand sides of non-declaration assignments may not be const. For the typifier to tell apart const from non-const expressions, it needs to track constness in the TypeContext. This MR adds that ability: All expressions are now by default assigned const types, unless otherwise specified. This does not change the handling of untyped symbols, which still receive the default_dtype. A PsSymbolExpr may therefore now have a different const qualifier than its wrapped PsSymbol.

Additionally, this MR further documents and clarified the behaviour and control flow of the typifier.

Edited by Frederik Hennig

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Daniel Bauer approved this merge request

    approved this merge request

  • Frederik Hennig added 1 commit

    added 1 commit

    • 7526c0db - Add clarifying docstring to TypeContext compatibility check

    Compare with previous version

  • Frederik Hennig resolved all threads

    resolved all threads

  • Frederik Hennig enabled an automatic merge when the pipeline for 7526c0db succeeds

    enabled an automatic merge when the pipeline for 7526c0db succeeds

  • Daniel Bauer resolved all threads

    resolved all threads

  • Frederik Hennig mentioned in commit 191cc207

    mentioned in commit 191cc207

  • Please register or sign in to reply
    Loading