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

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
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply