Fix compound object field designator
- Dominant language
- C#
- Stars
- 451
- Forks
- 49
- Avg merge
- 13h 59m
- Merged PRs (30d)
- 6
Description
Currently the object field initializer uses designator from AST. That leads to polluted emitter in `CompoundObjectInitializationExpression` which known about what kind of initializer we have.
https://github.com/ForNeVeR/Cesium/blob/398ed5e3f73dc2cf551914eb07aa0ce6eeebe622/Cesium.CodeGen/Ir/Expressions/CompoundObjectFieldInitializer.cs#L14
Instead of that, I think proper way to handle that would be encode initialization at that AST->IR translation, or create special IR translation phase which desugar expression to primitive object field assigning.
Contributor guide
Research direction
Start with Cesium.CodeGen/Ir/Expressions/CompoundObjectFieldInitializer.cs at the referenced line, then trace the AST-to-IR translation and CompoundObjectInitializationExpression emitter. Determine how compound object field initialization should be encoded or desugared so the emitter no longer relies on the AST designator; done means the resulting IR represents primitive object-field assignments without polluted emitter output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- compilers
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100