Skip to content

Refactor MIR field/index access to projection places #32

Description

@itsfuad

Goal

Keep storage projection separate from value access across fields, indexes, dereferences, slices, and future maps.

Current Projection Model

  • Reads use explicit Load(place).
  • Writes use generic Store(place, value).
  • Field storage uses ProjectField.
  • Array and dynamic-array element storage uses ProjectIndex.
  • Address-taking and receiver borrows reuse place projection instead of copying values into temporaries.

Progress

Hard Line

Do not add one-off address nodes such as IndexAddr, SliceAddr, or MapAddr. New composite access must extend projection/place architecture.

Remaining Acceptance Criteria

  • Decide whether MIR keeps individual projection nodes or grows a first-class Place model.
  • Add dereference and slice projections needed by safe slice-view creation/lowering.
  • Define map element addressability before map lowering.
  • Keep backend GEP/load/store logic shared across composite access kinds.
  • Add tests for deeper mixed projection chains and mutation across control flow.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions