Skip to content

deriving codegen: add intrinsic to map enum instance to its variant index #15620

Closed
@pnkfelix

Description

@pnkfelix

Spawned off of #15503 (comment)

The other piece of the story there would be speeding up the mapping from the value to its discriminant index. Currently I am just emitting that code in place as another match statement, but in principle that could (and should?) be replaced by a compiler intrinsic, as discussed here: #15375 (comment)

Metadata

Metadata

Assignees

Labels

A-codegenArea: Code generationC-enhancementCategory: An issue proposing an enhancement or a PR with one.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions