Add and propagate template phase for constants. (#4964)

Treat template bindings as introducing template phase, and propagate it
in the same way we propagate the checked generic phase.

Rename "symbolic" to "checked symbolic" to make room for "template
symbolic". Also rename "phase" to "dependence".
This commit is contained in:
Richard Smith
2025-02-18 18:57:34 +00:00
committed by GitHub
parent 382094b725
commit e0b2f5d772
21 changed files with 1153 additions and 876 deletions
@@ -117,7 +117,7 @@ impl f64 as type where .Self impls type {}
// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete]
// CHECK:STDOUT: %Float.type: type = fn_type @Float [concrete]
// CHECK:STDOUT: %Float: %Float.type = struct_value () [concrete]
// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic]
// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self]
// CHECK:STDOUT: %type_where: type = facet_type <type where TODO> [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -139,8 +139,8 @@ impl f64 as type where .Self impls type {}
// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%int_64) [concrete = f64]
// CHECK:STDOUT: %.loc11_6.1: type = value_of_initializer %float.make_type [concrete = f64]
// CHECK:STDOUT: %.loc11_6.2: type = converted %float.make_type, %.loc11_6.1 [concrete = f64]
// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic = constants.%.Self]
// CHECK:STDOUT: %.Self.ref: type = name_ref .Self, %.Self [symbolic = constants.%.Self]
// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
// CHECK:STDOUT: %.Self.ref: type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
// CHECK:STDOUT: %.loc11_18: type = where_expr %.Self [concrete = constants.%type_where] {
// CHECK:STDOUT: requirement_impls %.Self.ref, type
// CHECK:STDOUT: }