-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
Summary
Recently, minimal lowering support for astx.LiteralDict was added to LLVMLiteIRVisitor (PR #175).
The current implementation intentionally supports only a small subset of cases:
- Empty dictionaries.
- Dictionaries with homogeneous constant key/value pairs.
For other cases (e.g., heterogeneous types or non-constant elements), the implementation currently raises a TypeError to keep the scope minimal.
Motivation
To make LiteralDict more useful, it would be helpful to extend support to additional scenarios.
Possible Extensions
Some potential follow-ups could include:
- Support for heterogeneous key/value types.
- Support for non-constant elements.
- Lowering using runtime construction (e.g.,
alloca+ stores). - Handling dictionary mutability or updates.
- Alignment with how other literal containers (e.g., lists/tuples) are lowered.
Goal
Gradually extend LiteralDict lowering while keeping the implementation consistent with the existing IR generation patterns in LLVMLiteIRVisitor.
Additional Information
NOTE :-
this issue is the extention of isuue #30 and PR #174
Code of Conduct
- I agree to follow the Code of Conduct
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels