The IR Tree: Named Nodes and Namespaces
Working out effective name handling mechanisms in Cone’s IR took several tries. The key challenges:
Although most node types don’t use names, the ones that do are spread out unevenly across every node group: a few expressions (variables and functions), most types, and some statements (e.g., module nodes). What is the best way to gain access to a node’s name information, given this disparity? Cone’s namespace rules vary depending on the semantic context a name is declared within.