GabrielDosReis / ipr

Compiler-neutral Internal Program Representation for C++
BSD 3-Clause "New" or "Revised" License
221 stars 23 forks source link

Refactor `Mapping` [1/n] #274

Closed GabrielDosReis closed 2 years ago

GabrielDosReis commented 2 years ago

This patch is the first in a series to refactor the interface and implementation of Mapping.

This PR removes ipr::Mapping::target() and its implementation. A mapping should just be an expression that maps a set of inputs to an output. The type of the output should be set and retrieved from the entity for which a Mapping is used as initializer, thereby reducing redundancy.

This patch is potentially a source breaching change for users that set and retrieve target().