|
|
@@ -11,7 +11,7 @@
|
|
|
// - CARBON_SEMANTICS_BUILTIN_KIND_NAME(Name)
|
|
|
// Used as a fallback if other macros are missing. Used directly by Invalid
|
|
|
// only, which is defined last.
|
|
|
-// - CARBON_SEMANTICS_BUILTIN_KIND(Name, Type)
|
|
|
+// - CARBON_SEMANTICS_BUILTIN_KIND(Name, Type, Label)
|
|
|
// Defines a builtin kind with the associated type, which must also be
|
|
|
// builtin.
|
|
|
//
|
|
|
@@ -38,12 +38,12 @@
|
|
|
|
|
|
// Tracks expressions which are valid as types.
|
|
|
// This has a deliberately self-referential type.
|
|
|
-CARBON_SEMANTICS_BUILTIN_KIND(TypeType, TypeType)
|
|
|
+CARBON_SEMANTICS_BUILTIN_KIND(TypeType, TypeType, "Type")
|
|
|
|
|
|
// Used when a SemanticNode has an invalid type, which should then be ignored
|
|
|
// for future type checking.
|
|
|
// This has a deliberately self-referential type.
|
|
|
-CARBON_SEMANTICS_BUILTIN_KIND(InvalidType, InvalidType)
|
|
|
+CARBON_SEMANTICS_BUILTIN_KIND(InvalidType, InvalidType, "<unknown>")
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
// TODO: Below types are all placeholders. While the above may last, the below
|
|
|
@@ -52,19 +52,19 @@ CARBON_SEMANTICS_BUILTIN_KIND(InvalidType, InvalidType)
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
// The type of integer values and integer literals, currently always i32.
|
|
|
-CARBON_SEMANTICS_BUILTIN_KIND(IntegerType, TypeType)
|
|
|
+CARBON_SEMANTICS_BUILTIN_KIND(IntegerType, TypeType, "i32")
|
|
|
|
|
|
// The type of floating point values and real literals, currently always f64.
|
|
|
-CARBON_SEMANTICS_BUILTIN_KIND(FloatingPointType, TypeType)
|
|
|
+CARBON_SEMANTICS_BUILTIN_KIND(FloatingPointType, TypeType, "f64")
|
|
|
|
|
|
// The type of string values and String literals.
|
|
|
-CARBON_SEMANTICS_BUILTIN_KIND(StringType, TypeType)
|
|
|
+CARBON_SEMANTICS_BUILTIN_KIND(StringType, TypeType, "String")
|
|
|
|
|
|
-// The canonical empty tuple type, or `() as type`.
|
|
|
-CARBON_SEMANTICS_BUILTIN_KIND(EmptyTupleType, TypeType)
|
|
|
+// The canonical empty tuple type.
|
|
|
+CARBON_SEMANTICS_BUILTIN_KIND(EmptyTupleType, TypeType, "() as Type")
|
|
|
|
|
|
-// The canonical empty tuple, or `()`.
|
|
|
-CARBON_SEMANTICS_BUILTIN_KIND(EmptyTuple, EmptyTupleType)
|
|
|
+// The canonical empty tuple.
|
|
|
+CARBON_SEMANTICS_BUILTIN_KIND(EmptyTuple, EmptyTupleType, "()")
|
|
|
|
|
|
// Keep invalid last, so that we can use values as array indices without needing
|
|
|
// an invalid entry.
|