Commit Graph
4 Commits
Author SHA1 Message Date
Jon Ross-Perkins e73207429f Adjust handling of values in calls and structs (#2824)
Previously, IR for arguments in calls and struct values was separated out. This merges it back in. Additionally, parameters for functions and struct types had their own IR; the block is still there, but there's a TODO to decide what to do with it.

In the LLVM IR, this has the consequence of emitting expressions that are inputs to a call or struct value within the scope of the function, which is pretty much where it should be. Importantly it happens before the call is encountered.

This change also tinkers with the int and real literal lowering. I'm pretty sure both are still wrong, but was having trouble figuring out a "better" way to do it, and this seems like it'll work for now.
2023-05-18 11:42:03 -07:00
Jon Ross-Perkins 4a5d925974 Add vlog support to lowering. (#2836) 2023-05-18 11:14:29 -07:00
Jon Ross-Perkins e42b48ecc5 Start supporting struct type literals in lowering. (#2822)
This currently handles most of struct types and member access, but not values. The value issue is, I think, an underlying semantic IR approach (changed in #2824). I'd still like to get this in in order to ensure I'm creating IR at least reasonably well, but I want to be clear this is expected to be incomplete and is split out mainly to try to keep PRs in reasonable units.
2023-05-18 08:01:55 -07:00
Jon Ross-Perkins ee9f883ef3 Refactoring lowering logic into separate files. (#2820)
This echoes https://github.com/carbon-language/carbon-lang/pull/2818 and the philosophy is mostly covered there.

This isn't necessary for lowering right now, but things are likely to head in that direction and maintaining the context boundary will reduce blurring of lines. For now I'm just putting all the handlers in one file.
2023-05-15 14:55:10 -07:00