Skip to content

Generators should use smaller discriminants #69815

Closed
@jonas-schievink

Description

@jonas-schievink

Currently they use a hardcoded u32 discriminant, which is quite a lot of room considering that generators don't typically have billions of states. They should be able to use the smallest unsigned integer type that fits all states instead (so u8 in the vast majority of cases).

Metadata

Metadata

Labels

A-codegenArea: Code generationA-coroutinesArea: CoroutinesC-enhancementCategory: An issue proposing an enhancement or a PR with one.I-heavyIssue: Problems and improvements with respect to binary size of generated code.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions