-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SetupValue: Use proper TTG-style extension fields
This removes all of the `HasSetup* :: Bool` type families in favor of new `X* :: Type` type families. These largely serve the same purpose of distinguishing which constructors of `SetupValue` are permissible in each language backend, but they are permit bundling additional, language-specific information into a `SetupValue`. For instance, the `XSetupStruct` instance for `LLVM` evaluates to `Bool`, representing whether we are dealing with an LLVM packed struct or not, and the `XSetupCast` instance for `LLVM` evaluates to an LLVM `Type` to represent the type to cast to. One consequence of this design, aside from some `SetupValue` fields moving around, is that `ppSetupValue` now must perform case analysis on which language backend is currently in use in order to pretty-print any backend-specific data. This is accomplished with the new `SAWExt` data type and the corresponding `IsExt` class. There is a lot of code that shifts around in this patch, but everything is still functionally equivalent. In a subsequent patch, I will introduce additional data into MIR-specific extension fields. Fixes #1914.
- Loading branch information
1 parent
5cbea4e
commit d623a68
Showing
15 changed files
with
213 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.