mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Rebuild all constants in the eval block. (#4155)
Instead of reusing instructions from the generic entity in the eval block, rebuild constants in the same way we rebuild types. The previous attempt to not rebuild these constants assumed that every constant used in a generic would be built in that generic, and not referenced directly or referenced from some enclosing scope, which isn't true in practice and is a fragile assumption in any case. We could add back some reuse of instructions from the generic -- if we happen to see the right instruction to build a constant, we could opportunistically reuse it -- but given the complexity added by doing so, I'm not pursuing that here. Now that the eval block for a generic consists of instructions uniquely owned by that generic, rather than often being shared with another entity, include the generic in the formatted SemIR output. I'm using the same scope name for the generic object itself as for the parameterized class / function / interface, because there are very frequently references between them and this keeps the IR simpler and more readable, and avoids needing to invent a second name for the scope.
This commit is contained in:
+55
-39
@@ -38,7 +38,7 @@ fn Class(N:! i32).F[self: Self](n: T) {}
|
||||
// CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Class.2: type = class_type @Class, file.%Class.decl(%T) [symbolic]
|
||||
// CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T) [symbolic]
|
||||
// CHECK:STDOUT: %.2: type = unbound_element_type %Class.2, %T [symbolic]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
||||
@@ -71,14 +71,14 @@ fn Class(N:! i32).F[self: Self](n: T) {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] {
|
||||
// CHECK:STDOUT: %T.loc11_13.1: type = param T
|
||||
// CHECK:STDOUT: %T.loc11_13.2: type = bind_symbolic_name T 0, %T.loc11_13.1 [symbolic = %T.loc11_13.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.loc11_13.2: type = bind_symbolic_name T 0, %T.loc11_13.1 [symbolic = @Class.%T (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.4] {
|
||||
// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc32_14.1: type = value_of_initializer %int.make_type_32 [template = i32]
|
||||
// CHECK:STDOUT: %.loc32_14.2: type = converted %int.make_type_32, %.loc32_14.1 [template = i32]
|
||||
// CHECK:STDOUT: %N.loc32_10.1: i32 = param N
|
||||
// CHECK:STDOUT: %N.loc32_10.2: i32 = bind_symbolic_name N 0, %N.loc32_10.1 [symbolic = %N.loc32_10.2 (constants.%N)]
|
||||
// CHECK:STDOUT: %N.loc32_10.2: i32 = bind_symbolic_name N 0, %N.loc32_10.1 [symbolic = @.1.%N (constants.%N)]
|
||||
// CHECK:STDOUT: %Self.ref: <error> = name_ref Self, <error> [template = <error>]
|
||||
// CHECK:STDOUT: %self.loc32_21.1: <error> = param self
|
||||
// CHECK:STDOUT: @.1.%self: <error> = bind_name self, %self.loc32_21.1
|
||||
@@ -88,55 +88,71 @@ fn Class(N:! i32).F[self: Self](n: T) {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @Class
|
||||
// CHECK:STDOUT: generic [file.%T.loc11_13.2: type] {
|
||||
// CHECK:STDOUT: %T.ref.loc12: type = name_ref T, file.%T.loc11_13.2 [symbolic = file.%T.loc11_13.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %.loc12: <unexpected>.inst+28 (%.2) = field_decl a, element0 [template]
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
|
||||
// CHECK:STDOUT: %.loc13: type = specific_constant constants.%Class.2, file.%Class.decl(constants.%T) [symbolic = %.loc13 (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc13 [symbolic = %.loc13 (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %self.loc13_8.1: @Class.%.loc13 (%Class.2) = param self
|
||||
// CHECK:STDOUT: %self.loc13_8.2: @Class.%.loc13 (%Class.2) = bind_name self, %self.loc13_8.1
|
||||
// CHECK:STDOUT: %T.ref.loc13: type = name_ref T, file.%T.loc11_13.2 [symbolic = %T.ref.loc13 (constants.%T)]
|
||||
// CHECK:STDOUT: %n.loc13_20.1: @Class.%T.ref.loc13 (%T) = param n
|
||||
// CHECK:STDOUT: %n.loc13_20.2: @Class.%T.ref.loc13 (%T) = bind_name n, %n.loc13_20.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: generic class @Class(file.%T.loc11_13.2: type) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%Class.2
|
||||
// CHECK:STDOUT: .a = %.loc12
|
||||
// CHECK:STDOUT: .F = %F.decl
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %.1: type = unbound_element_type @Class.%Class (%Class.2), @Class.%T (%T) [symbolic = %.1 (constants.%.2)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class {
|
||||
// CHECK:STDOUT: %T.ref.loc12: type = name_ref T, file.%T.loc11_13.2 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT: %.loc12: @Class.%.1 (%.2) = field_decl a, element0 [template]
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
|
||||
// CHECK:STDOUT: %.loc13: type = specific_constant constants.%Class.2, @Class(constants.%T) [symbolic = @F.%Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc13 [symbolic = @F.%Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %self.loc13_8.1: @F.%Class (%Class.2) = param self
|
||||
// CHECK:STDOUT: %self.loc13_8.2: @F.%Class (%Class.2) = bind_name self, %self.loc13_8.1
|
||||
// CHECK:STDOUT: %T.ref.loc13: type = name_ref T, file.%T.loc11_13.2 [symbolic = @F.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %n.loc13_20.1: @F.%T (%T) = param n
|
||||
// CHECK:STDOUT: %n.loc13_20.2: @F.%T (%T) = bind_name n, %n.loc13_20.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%Class.2
|
||||
// CHECK:STDOUT: .a = %.loc12
|
||||
// CHECK:STDOUT: .F = %F.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F[@Class.%self.loc13_8.2: @Class.%.loc13 (%Class.2)](@Class.%n.loc13_20.2: @Class.%T.ref.loc13 (%T))
|
||||
// CHECK:STDOUT: generic [file.%T.loc11_13.2: type];
|
||||
// CHECK:STDOUT: generic fn @F(file.%T.loc11_13.2: type) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn[@Class.%self.loc13_8.2: @F.%Class (%Class.2)](@Class.%n.loc13_20.2: @F.%T (%T));
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @.1[%self: <error>](%n: <error>)
|
||||
// CHECK:STDOUT: generic [file.%N.loc32_10.2: i32] {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: generic fn @.1(file.%N.loc32_10.2: i32) {
|
||||
// CHECK:STDOUT: %N: i32 = bind_symbolic_name N 0 [symbolic = %N (constants.%N)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn[%self: <error>](%n: <error>) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%Class.decl(constants.%T) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc11_13.2 => constants.%T
|
||||
// CHECK:STDOUT: specific @Class(constants.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Class.%F.decl(constants.%T) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: @Class.%.loc13 => constants.%Class.2
|
||||
// CHECK:STDOUT: @Class.%T.ref.loc13 => constants.%T
|
||||
// CHECK:STDOUT: specific @Class(@F.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%Class.decl(file.%T.loc11_13.2) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc11_13.2 => constants.%T
|
||||
// CHECK:STDOUT: specific @F(constants.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: %Class => constants.%Class.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%.decl(constants.%N) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%N.loc32_10.2 => constants.%N
|
||||
// CHECK:STDOUT: specific @Class(@Class.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @.1(constants.%N) {
|
||||
// CHECK:STDOUT: %N => constants.%N
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+112
-67
@@ -21,6 +21,7 @@ class Class(T:! type) {
|
||||
var k: T;
|
||||
}
|
||||
|
||||
class Declaration(T:! type);
|
||||
|
||||
// CHECK:STDOUT: --- basic.carbon
|
||||
// CHECK:STDOUT:
|
||||
@@ -29,7 +30,7 @@ class Class(T:! type) {
|
||||
// CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Class.2: type = class_type @Class, file.%Class.decl(%T) [symbolic]
|
||||
// CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T) [symbolic]
|
||||
// CHECK:STDOUT: %.2: type = ptr_type %Class.2 [symbolic]
|
||||
// CHECK:STDOUT: %.3: type = ptr_type %T [symbolic]
|
||||
// CHECK:STDOUT: %GetAddr.type: type = fn_type @GetAddr [template]
|
||||
@@ -39,12 +40,16 @@ class Class(T:! type) {
|
||||
// CHECK:STDOUT: %.4: type = unbound_element_type %Class.2, %T [symbolic]
|
||||
// CHECK:STDOUT: %.5: type = struct_type {.k: %T} [symbolic]
|
||||
// CHECK:STDOUT: %.6: type = ptr_type %.5 [symbolic]
|
||||
// CHECK:STDOUT: %Declaration.type: type = generic_class_type @Declaration [template]
|
||||
// CHECK:STDOUT: %Declaration.1: %Declaration.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Declaration.2: type = class_type @Declaration, @Declaration(%T) [symbolic]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
||||
// CHECK:STDOUT: .Core = %Core
|
||||
// CHECK:STDOUT: .Class = %Class.decl
|
||||
// CHECK:STDOUT: .Declaration = %Declaration.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace %Core.import, [template] {
|
||||
@@ -58,88 +63,128 @@ class Class(T:! type) {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] {
|
||||
// CHECK:STDOUT: %T.loc11_13.1: type = param T
|
||||
// CHECK:STDOUT: %T.loc11_13.2: type = bind_symbolic_name T 0, %T.loc11_13.1 [symbolic = %T.loc11_13.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.loc11_13.2: type = bind_symbolic_name T 0, %T.loc11_13.1 [symbolic = @Class.%T (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Declaration.decl: %Declaration.type = class_decl @Declaration [template = constants.%Declaration.1] {
|
||||
// CHECK:STDOUT: %T.loc24_19.1: type = param T
|
||||
// CHECK:STDOUT: %T.loc24_19.2: type = bind_symbolic_name T 0, %T.loc24_19.1 [symbolic = @Declaration.%T (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @Class
|
||||
// CHECK:STDOUT: generic [file.%T.loc11_13.2: type] {
|
||||
// CHECK:STDOUT: %GetAddr.decl: %GetAddr.type = fn_decl @GetAddr [template = constants.%GetAddr] {
|
||||
// CHECK:STDOUT: %.loc12_25: type = specific_constant constants.%Class.2, file.%Class.decl(constants.%T) [symbolic = %.loc12_25 (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %Self.ref.loc12: type = name_ref Self, %.loc12_25 [symbolic = %.loc12_25 (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %.loc12_29: type = ptr_type %Class.2 [symbolic = %.loc12_29 (constants.%.2)]
|
||||
// CHECK:STDOUT: %self.loc12_19.1: @Class.%.loc12_29 (%.2) = param self
|
||||
// CHECK:STDOUT: %self.loc12_19.3: @Class.%.loc12_29 (%.2) = bind_name self, %self.loc12_19.1
|
||||
// CHECK:STDOUT: %.loc12_14: @Class.%.loc12_29 (%.2) = addr_pattern %self.loc12_19.3
|
||||
// CHECK:STDOUT: %T.ref.loc12: type = name_ref T, file.%T.loc11_13.2 [symbolic = %T.ref.loc12 (constants.%T)]
|
||||
// CHECK:STDOUT: %.loc12_38: type = ptr_type %T [symbolic = %.loc12_38 (constants.%.3)]
|
||||
// CHECK:STDOUT: %return.var.loc12: ref %.3 = var <return slot>
|
||||
// CHECK:STDOUT: generic class @Class(file.%T.loc11_13.2: type) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %.1: type = unbound_element_type @Class.%Class (%Class.2), @Class.%T (%T) [symbolic = %.1 (constants.%.4)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class {
|
||||
// CHECK:STDOUT: %GetAddr.decl: %GetAddr.type = fn_decl @GetAddr [template = constants.%GetAddr] {
|
||||
// CHECK:STDOUT: %.loc12_25: type = specific_constant constants.%Class.2, @Class(constants.%T) [symbolic = @GetAddr.%Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %Self.ref.loc12: type = name_ref Self, %.loc12_25 [symbolic = @GetAddr.%Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %.loc12_29: type = ptr_type %Class.2 [symbolic = @GetAddr.%.1 (constants.%.2)]
|
||||
// CHECK:STDOUT: %self.loc12_19.1: @GetAddr.%.1 (%.2) = param self
|
||||
// CHECK:STDOUT: %self.loc12_19.3: @GetAddr.%.1 (%.2) = bind_name self, %self.loc12_19.1
|
||||
// CHECK:STDOUT: %.loc12_14: @GetAddr.%.1 (%.2) = addr_pattern %self.loc12_19.3
|
||||
// CHECK:STDOUT: %T.ref.loc12: type = name_ref T, file.%T.loc11_13.2 [symbolic = @GetAddr.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %.loc12_38: type = ptr_type %T [symbolic = @GetAddr.%.2 (constants.%.3)]
|
||||
// CHECK:STDOUT: %return.var.loc12: ref %.3 = var <return slot>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %GetValue.decl: %GetValue.type = fn_decl @GetValue [template = constants.%GetValue] {
|
||||
// CHECK:STDOUT: %.loc17: type = specific_constant constants.%Class.2, @Class(constants.%T) [symbolic = @GetValue.%Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %Self.ref.loc17: type = name_ref Self, %.loc17 [symbolic = @GetValue.%Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %self.loc17_15.1: @GetValue.%Class (%Class.2) = param self
|
||||
// CHECK:STDOUT: %self.loc17_15.2: @GetValue.%Class (%Class.2) = bind_name self, %self.loc17_15.1
|
||||
// CHECK:STDOUT: %T.ref.loc17: type = name_ref T, file.%T.loc11_13.2 [symbolic = @GetValue.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %return.var.loc17: ref %T = var <return slot>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.ref.loc21: type = name_ref T, file.%T.loc11_13.2 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT: %.loc21: @Class.%.1 (%.4) = field_decl k, element0 [template]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%Class.2
|
||||
// CHECK:STDOUT: .GetAddr = %GetAddr.decl
|
||||
// CHECK:STDOUT: .GetValue = %GetValue.decl
|
||||
// CHECK:STDOUT: .k = %.loc21
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %GetValue.decl: %GetValue.type = fn_decl @GetValue [template = constants.%GetValue] {
|
||||
// CHECK:STDOUT: %.loc17: type = specific_constant constants.%Class.2, file.%Class.decl(constants.%T) [symbolic = %.loc17 (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %Self.ref.loc17: type = name_ref Self, %.loc17 [symbolic = %.loc17 (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %self.loc17_15.1: @Class.%.loc17 (%Class.2) = param self
|
||||
// CHECK:STDOUT: %self.loc17_15.2: @Class.%.loc17 (%Class.2) = bind_name self, %self.loc17_15.1
|
||||
// CHECK:STDOUT: %T.ref.loc17: type = name_ref T, file.%T.loc11_13.2 [symbolic = %T.ref.loc17 (constants.%T)]
|
||||
// CHECK:STDOUT: %return.var.loc17: ref %T = var <return slot>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic class @Declaration(file.%T.loc24_19.2: type) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class;
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @GetAddr(file.%T.loc11_13.2: type) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %.1: type = ptr_type @GetAddr.%Class (%Class.2) [symbolic = %.1 (constants.%.2)]
|
||||
// CHECK:STDOUT: %.2: type = ptr_type @GetAddr.%T (%T) [symbolic = %.2 (constants.%.3)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %.3: type = unbound_element_type @GetAddr.%Class (%Class.2), @GetAddr.%T (%T) [symbolic = %.3 (constants.%.4)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn[addr @Class.%self.loc12_19.3: @GetAddr.%.1 (%.2)]() -> %.3 {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %self.ref: @GetAddr.%.1 (%.2) = name_ref self, @Class.%self.loc12_19.3
|
||||
// CHECK:STDOUT: %.loc13_17.1: ref @GetAddr.%Class (%Class.2) = deref %self.ref
|
||||
// CHECK:STDOUT: %k.ref: @GetAddr.%.3 (%.4) = name_ref k, @Class.%.loc21 [template = @Class.%.loc21]
|
||||
// CHECK:STDOUT: %.loc13_17.2: ref @GetAddr.%T (%T) = class_element_access %.loc13_17.1, element0
|
||||
// CHECK:STDOUT: %.loc13_12: @GetAddr.%.2 (%.3) = addr_of %.loc13_17.2
|
||||
// CHECK:STDOUT: return %.loc13_12
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.ref.loc21: type = name_ref T, file.%T.loc11_13.2 [symbolic = file.%T.loc11_13.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %.loc21: <unexpected>.inst+41 (%.4) = field_decl k, element0 [template]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%Class.2
|
||||
// CHECK:STDOUT: .GetAddr = %GetAddr.decl
|
||||
// CHECK:STDOUT: .GetValue = %GetValue.decl
|
||||
// CHECK:STDOUT: .k = %.loc21
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @GetAddr[addr @Class.%self.loc12_19.3: @Class.%.loc12_29 (%.2)]() -> %.3
|
||||
// CHECK:STDOUT: generic [file.%T.loc11_13.2: type] {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %self.ref: @Class.%.loc12_29 (%.2) = name_ref self, @Class.%self.loc12_19.3
|
||||
// CHECK:STDOUT: %.loc13_17.1: ref @Class.%.loc12_25 (%Class.2) = deref %self.ref
|
||||
// CHECK:STDOUT: %k.ref: <unexpected>.inst+49 (%.4) = name_ref k, @Class.%.loc21 [template = @Class.%.loc21]
|
||||
// CHECK:STDOUT: %.loc13_17.2: ref @Class.%T.ref.loc12 (%T) = class_element_access %.loc13_17.1, element0
|
||||
// CHECK:STDOUT: %.loc13_12: @Class.%.loc12_38 (%.3) = addr_of %.loc13_17.2
|
||||
// CHECK:STDOUT: return %.loc13_12
|
||||
// CHECK:STDOUT: generic fn @GetValue(file.%T.loc11_13.2: type) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %.1: type = unbound_element_type @GetValue.%Class (%Class.2), @GetValue.%T (%T) [symbolic = %.1 (constants.%.4)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn[@Class.%self.loc17_15.2: @GetValue.%Class (%Class.2)]() -> %T {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %self.ref: @GetValue.%Class (%Class.2) = name_ref self, @Class.%self.loc17_15.2
|
||||
// CHECK:STDOUT: %k.ref: @GetValue.%.1 (%.4) = name_ref k, @Class.%.loc21 [template = @Class.%.loc21]
|
||||
// CHECK:STDOUT: %.loc18_16.1: ref @GetValue.%T (%T) = class_element_access %self.ref, element0
|
||||
// CHECK:STDOUT: %.loc18_16.2: @GetValue.%T (%T) = bind_value %.loc18_16.1
|
||||
// CHECK:STDOUT: return %.loc18_16.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @GetValue[@Class.%self.loc17_15.2: @Class.%.loc17 (%Class.2)]() -> %T
|
||||
// CHECK:STDOUT: generic [file.%T.loc11_13.2: type] {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %self.ref: @Class.%.loc17 (%Class.2) = name_ref self, @Class.%self.loc17_15.2
|
||||
// CHECK:STDOUT: %k.ref: <unexpected>.inst+55 (%.4) = name_ref k, @Class.%.loc21 [template = @Class.%.loc21]
|
||||
// CHECK:STDOUT: %.loc18_16.1: ref @Class.%T.ref.loc17 (%T) = class_element_access %self.ref, element0
|
||||
// CHECK:STDOUT: %.loc18_16.2: @Class.%T.ref.loc17 (%T) = bind_value %.loc18_16.1
|
||||
// CHECK:STDOUT: return %.loc18_16.2
|
||||
// CHECK:STDOUT: specific @Class(constants.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %Class => constants.%Class.2
|
||||
// CHECK:STDOUT: %.1 => constants.%.4
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%Class.decl(constants.%T) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc11_13.2 => constants.%T
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: definition:
|
||||
// CHECK:STDOUT: <unexpected>.inst+40 => constants.%Class.2
|
||||
// CHECK:STDOUT: <unexpected>.inst+41 => constants.%.4
|
||||
// CHECK:STDOUT: <unexpected>.inst+37.loc21_8 => <unexpected>.inst+38
|
||||
// CHECK:STDOUT: specific @Class(@GetAddr.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Class.%GetAddr.decl(constants.%T) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: @Class.%.loc12_25 => constants.%Class.2
|
||||
// CHECK:STDOUT: @Class.%.loc12_29 => constants.%.2
|
||||
// CHECK:STDOUT: @Class.%T.ref.loc12 => constants.%T
|
||||
// CHECK:STDOUT: @Class.%.loc12_38 => constants.%.3
|
||||
// CHECK:STDOUT: specific @GetAddr(constants.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: %Class => constants.%Class.2
|
||||
// CHECK:STDOUT: %.1 => constants.%.2
|
||||
// CHECK:STDOUT: %.2 => constants.%.3
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Class.%GetValue.decl(constants.%T) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: @Class.%.loc17 => constants.%Class.2
|
||||
// CHECK:STDOUT: @Class.%T.ref.loc17 => constants.%T
|
||||
// CHECK:STDOUT: specific @Class(@GetValue.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%Class.decl(file.%T.loc11_13.2) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc11_13.2 => constants.%T
|
||||
// CHECK:STDOUT: specific @GetValue(constants.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: %Class => constants.%Class.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Class(@Class.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Declaration(constants.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+74
-56
@@ -73,14 +73,14 @@ var a: Class(5, i32*);
|
||||
// CHECK:STDOUT: %N: i32 = bind_symbolic_name N 1 [symbolic]
|
||||
// CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template]
|
||||
// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Class.2: type = class_type @Class, file.%Class.decl(%T, %N) [symbolic]
|
||||
// CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T, %N) [symbolic]
|
||||
// CHECK:STDOUT: %.2: type = struct_type {} [template]
|
||||
// CHECK:STDOUT: %.3: type = ptr_type i32 [template]
|
||||
// CHECK:STDOUT: %.4: i32 = int_literal 5 [template]
|
||||
// CHECK:STDOUT: %Class.3: type = class_type @Class, file.%Class.decl(%.3, %.4) [template]
|
||||
// CHECK:STDOUT: %Class.3: type = class_type @Class, @Class(%.3, %.4) [template]
|
||||
// CHECK:STDOUT: %.5: type = ptr_type %.2 [template]
|
||||
// CHECK:STDOUT: %.6: i32 = int_literal 0 [template]
|
||||
// CHECK:STDOUT: %Class.4: type = class_type @Class, file.%Class.decl(%.1, %.6) [template]
|
||||
// CHECK:STDOUT: %Class.4: type = class_type @Class, @Class(%.1, %.6) [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -107,12 +107,12 @@ var a: Class(5, i32*);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] {
|
||||
// CHECK:STDOUT: %T.loc4_13.1: type = param T
|
||||
// CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T 0, %T.loc4_13.1 [symbolic = %T.loc4_13.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T 0, %T.loc4_13.1 [symbolic = @Class.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32]
|
||||
// CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_32.loc4, %.loc4_27.1 [template = i32]
|
||||
// CHECK:STDOUT: %N.loc4_23.1: i32 = param N
|
||||
// CHECK:STDOUT: %N.loc4_23.2: i32 = bind_symbolic_name N 1, %N.loc4_23.1 [symbolic = %N.loc4_23.2 (constants.%N)]
|
||||
// CHECK:STDOUT: %N.loc4_23.2: i32 = bind_symbolic_name N 1, %N.loc4_23.1 [symbolic = @Class.%N (constants.%N)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Class.ref.loc6: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.1]
|
||||
// CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%Int32() [template = i32]
|
||||
@@ -136,34 +136,37 @@ var a: Class(5, i32*);
|
||||
// CHECK:STDOUT: %b: ref %Class.4 = bind_name b, %b.var
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @Class
|
||||
// CHECK:STDOUT: generic [file.%T.loc4_13.2: type, file.%N.loc4_23.2: i32] {
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%Class.2
|
||||
// CHECK:STDOUT: generic class @Class(file.%T.loc4_13.2: type, file.%N.loc4_23.2: i32) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT: %N: i32 = bind_symbolic_name N 1 [symbolic = %N (constants.%N)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class {
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%Class.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%Class.decl(constants.%T, constants.%N) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc4_13.2 => constants.%T
|
||||
// CHECK:STDOUT: file.%N.loc4_23.2 => constants.%N
|
||||
// CHECK:STDOUT: specific @Class(constants.%T, constants.%N) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: %N => constants.%N
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%Class.decl(constants.%.3, constants.%.4) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc4_13.2 => constants.%.3
|
||||
// CHECK:STDOUT: file.%N.loc4_23.2 => constants.%.4
|
||||
// CHECK:STDOUT: specific @Class(constants.%.3, constants.%.4) {
|
||||
// CHECK:STDOUT: %T => constants.%.3
|
||||
// CHECK:STDOUT: %N => constants.%.4
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: definition:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%Class.decl(constants.%.1, constants.%.6) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc4_13.2 => constants.%.1
|
||||
// CHECK:STDOUT: file.%N.loc4_23.2 => constants.%.6
|
||||
// CHECK:STDOUT: specific @Class(constants.%.1, constants.%.6) {
|
||||
// CHECK:STDOUT: %T => constants.%.1
|
||||
// CHECK:STDOUT: %N => constants.%.6
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: definition:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_too_few.carbon
|
||||
@@ -176,7 +179,7 @@ var a: Class(5, i32*);
|
||||
// CHECK:STDOUT: %N: i32 = bind_symbolic_name N 1 [symbolic]
|
||||
// CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template]
|
||||
// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Class.2: type = class_type @Class, file.%Class.decl(%T, %N) [symbolic]
|
||||
// CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T, %N) [symbolic]
|
||||
// CHECK:STDOUT: %.2: type = struct_type {} [template]
|
||||
// CHECK:STDOUT: %.3: type = ptr_type i32 [template]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -204,12 +207,12 @@ var a: Class(5, i32*);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] {
|
||||
// CHECK:STDOUT: %T.loc4_13.1: type = param T
|
||||
// CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T 0, %T.loc4_13.1 [symbolic = %T.loc4_13.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T 0, %T.loc4_13.1 [symbolic = @Class.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32]
|
||||
// CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_32.loc4, %.loc4_27.1 [template = i32]
|
||||
// CHECK:STDOUT: %N.loc4_23.1: i32 = param N
|
||||
// CHECK:STDOUT: %N.loc4_23.2: i32 = bind_symbolic_name N 1, %N.loc4_23.1 [symbolic = %N.loc4_23.2 (constants.%N)]
|
||||
// CHECK:STDOUT: %N.loc4_23.2: i32 = bind_symbolic_name N 1, %N.loc4_23.1 [symbolic = @Class.%N (constants.%N)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.1]
|
||||
// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32]
|
||||
@@ -223,18 +226,23 @@ var a: Class(5, i32*);
|
||||
// CHECK:STDOUT: %a: ref <error> = bind_name a, %a.var
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @Class
|
||||
// CHECK:STDOUT: generic [file.%T.loc4_13.2: type, file.%N.loc4_23.2: i32] {
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%Class.2
|
||||
// CHECK:STDOUT: generic class @Class(file.%T.loc4_13.2: type, file.%N.loc4_23.2: i32) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT: %N: i32 = bind_symbolic_name N 1 [symbolic = %N (constants.%N)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class {
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%Class.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%Class.decl(constants.%T, constants.%N) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc4_13.2 => constants.%T
|
||||
// CHECK:STDOUT: file.%N.loc4_23.2 => constants.%N
|
||||
// CHECK:STDOUT: specific @Class(constants.%T, constants.%N) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: %N => constants.%N
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_too_many.carbon
|
||||
@@ -247,7 +255,7 @@ var a: Class(5, i32*);
|
||||
// CHECK:STDOUT: %N: i32 = bind_symbolic_name N 1 [symbolic]
|
||||
// CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template]
|
||||
// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Class.2: type = class_type @Class, file.%Class.decl(%T, %N) [symbolic]
|
||||
// CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T, %N) [symbolic]
|
||||
// CHECK:STDOUT: %.2: type = struct_type {} [template]
|
||||
// CHECK:STDOUT: %.3: type = ptr_type i32 [template]
|
||||
// CHECK:STDOUT: %.4: i32 = int_literal 1 [template]
|
||||
@@ -277,12 +285,12 @@ var a: Class(5, i32*);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] {
|
||||
// CHECK:STDOUT: %T.loc4_13.1: type = param T
|
||||
// CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T 0, %T.loc4_13.1 [symbolic = %T.loc4_13.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T 0, %T.loc4_13.1 [symbolic = @Class.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32]
|
||||
// CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_32.loc4, %.loc4_27.1 [template = i32]
|
||||
// CHECK:STDOUT: %N.loc4_23.1: i32 = param N
|
||||
// CHECK:STDOUT: %N.loc4_23.2: i32 = bind_symbolic_name N 1, %N.loc4_23.1 [symbolic = %N.loc4_23.2 (constants.%N)]
|
||||
// CHECK:STDOUT: %N.loc4_23.2: i32 = bind_symbolic_name N 1, %N.loc4_23.1 [symbolic = @Class.%N (constants.%N)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.1]
|
||||
// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32]
|
||||
@@ -298,18 +306,23 @@ var a: Class(5, i32*);
|
||||
// CHECK:STDOUT: %a: ref <error> = bind_name a, %a.var
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @Class
|
||||
// CHECK:STDOUT: generic [file.%T.loc4_13.2: type, file.%N.loc4_23.2: i32] {
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%Class.2
|
||||
// CHECK:STDOUT: generic class @Class(file.%T.loc4_13.2: type, file.%N.loc4_23.2: i32) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT: %N: i32 = bind_symbolic_name N 1 [symbolic = %N (constants.%N)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class {
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%Class.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%Class.decl(constants.%T, constants.%N) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc4_13.2 => constants.%T
|
||||
// CHECK:STDOUT: file.%N.loc4_23.2 => constants.%N
|
||||
// CHECK:STDOUT: specific @Class(constants.%T, constants.%N) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: %N => constants.%N
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_no_conversion.carbon
|
||||
@@ -322,7 +335,7 @@ var a: Class(5, i32*);
|
||||
// CHECK:STDOUT: %N: i32 = bind_symbolic_name N 1 [symbolic]
|
||||
// CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template]
|
||||
// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Class.2: type = class_type @Class, file.%Class.decl(%T, %N) [symbolic]
|
||||
// CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T, %N) [symbolic]
|
||||
// CHECK:STDOUT: %.2: type = struct_type {} [template]
|
||||
// CHECK:STDOUT: %.3: i32 = int_literal 5 [template]
|
||||
// CHECK:STDOUT: %.4: type = ptr_type i32 [template]
|
||||
@@ -351,12 +364,12 @@ var a: Class(5, i32*);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] {
|
||||
// CHECK:STDOUT: %T.loc4_13.1: type = param T
|
||||
// CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T 0, %T.loc4_13.1 [symbolic = %T.loc4_13.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T 0, %T.loc4_13.1 [symbolic = @Class.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32]
|
||||
// CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_32.loc4, %.loc4_27.1 [template = i32]
|
||||
// CHECK:STDOUT: %N.loc4_23.1: i32 = param N
|
||||
// CHECK:STDOUT: %N.loc4_23.2: i32 = bind_symbolic_name N 1, %N.loc4_23.1 [symbolic = %N.loc4_23.2 (constants.%N)]
|
||||
// CHECK:STDOUT: %N.loc4_23.2: i32 = bind_symbolic_name N 1, %N.loc4_23.1 [symbolic = @Class.%N (constants.%N)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.1]
|
||||
// CHECK:STDOUT: %.loc12_14: i32 = int_literal 5 [template = constants.%.3]
|
||||
@@ -371,17 +384,22 @@ var a: Class(5, i32*);
|
||||
// CHECK:STDOUT: %a: ref <error> = bind_name a, %a.var
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @Class
|
||||
// CHECK:STDOUT: generic [file.%T.loc4_13.2: type, file.%N.loc4_23.2: i32] {
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%Class.2
|
||||
// CHECK:STDOUT: generic class @Class(file.%T.loc4_13.2: type, file.%N.loc4_23.2: i32) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT: %N: i32 = bind_symbolic_name N 1 [symbolic = %N (constants.%N)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class {
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%Class.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%Class.decl(constants.%T, constants.%N) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc4_13.2 => constants.%T
|
||||
// CHECK:STDOUT: file.%N.loc4_23.2 => constants.%N
|
||||
// CHECK:STDOUT: specific @Class(constants.%T, constants.%N) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: %N => constants.%N
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+68
-54
@@ -43,7 +43,7 @@ fn Run() -> i32 {
|
||||
// CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Class.2: type = class_type @Class, file.%Class.decl(%T) [symbolic]
|
||||
// CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T) [symbolic]
|
||||
// CHECK:STDOUT: %.2: type = ptr_type %Class.2 [symbolic]
|
||||
// CHECK:STDOUT: %.3: type = ptr_type %T [symbolic]
|
||||
// CHECK:STDOUT: %Get.type: type = fn_type @Get [template]
|
||||
@@ -55,7 +55,7 @@ fn Run() -> i32 {
|
||||
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Run.type: type = fn_type @Run [template]
|
||||
// CHECK:STDOUT: %Run: %Run.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Class.3: type = class_type @Class, file.%Class.decl(i32) [template]
|
||||
// CHECK:STDOUT: %Class.3: type = class_type @Class, @Class(i32) [template]
|
||||
// CHECK:STDOUT: %.7: type = unbound_element_type %Class.3, i32 [template]
|
||||
// CHECK:STDOUT: %.8: i32 = int_literal 0 [template]
|
||||
// CHECK:STDOUT: %.9: type = struct_type {.k: i32} [template]
|
||||
@@ -85,7 +85,7 @@ fn Run() -> i32 {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] {
|
||||
// CHECK:STDOUT: %T.loc11_13.1: type = param T
|
||||
// CHECK:STDOUT: %T.loc11_13.2: type = bind_symbolic_name T 0, %T.loc11_13.1 [symbolic = %T.loc11_13.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.loc11_13.2: type = bind_symbolic_name T 0, %T.loc11_13.1 [symbolic = @Class.%T (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Run.decl: %Run.type = fn_decl @Run [template = constants.%Run] {
|
||||
// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32]
|
||||
@@ -95,37 +95,53 @@ fn Run() -> i32 {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @Class
|
||||
// CHECK:STDOUT: generic [file.%T.loc11_13.2: type] {
|
||||
// CHECK:STDOUT: %Get.decl: %Get.type = fn_decl @Get [template = constants.%Get] {
|
||||
// CHECK:STDOUT: %.loc12_21: type = specific_constant constants.%Class.2, file.%Class.decl(constants.%T) [symbolic = %.loc12_21 (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc12_21 [symbolic = %.loc12_21 (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %.loc12_25: type = ptr_type %Class.2 [symbolic = %.loc12_25 (constants.%.2)]
|
||||
// CHECK:STDOUT: %self.loc12_15.1: @Class.%.loc12_25 (%.2) = param self
|
||||
// CHECK:STDOUT: %self.loc12_15.3: @Class.%.loc12_25 (%.2) = bind_name self, %self.loc12_15.1
|
||||
// CHECK:STDOUT: %.loc12_10: @Class.%.loc12_25 (%.2) = addr_pattern %self.loc12_15.3
|
||||
// CHECK:STDOUT: %T.ref.loc12: type = name_ref T, file.%T.loc11_13.2 [symbolic = %T.ref.loc12 (constants.%T)]
|
||||
// CHECK:STDOUT: %.loc12_34: type = ptr_type %T [symbolic = %.loc12_34 (constants.%.3)]
|
||||
// CHECK:STDOUT: %return.var: ref %.3 = var <return slot>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.ref.loc16: type = name_ref T, file.%T.loc11_13.2 [symbolic = file.%T.loc11_13.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %.loc16: <unexpected>.inst+32 (%.4) = field_decl k, element0 [template]
|
||||
// CHECK:STDOUT: generic class @Class(file.%T.loc11_13.2: type) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%Class.2
|
||||
// CHECK:STDOUT: .Get = %Get.decl
|
||||
// CHECK:STDOUT: .k = %.loc16
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %.1: type = unbound_element_type @Class.%Class (%Class.2), @Class.%T (%T) [symbolic = %.1 (constants.%.4)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class {
|
||||
// CHECK:STDOUT: %Get.decl: %Get.type = fn_decl @Get [template = constants.%Get] {
|
||||
// CHECK:STDOUT: %.loc12_21: type = specific_constant constants.%Class.2, @Class(constants.%T) [symbolic = @Get.%Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc12_21 [symbolic = @Get.%Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %.loc12_25: type = ptr_type %Class.2 [symbolic = @Get.%.1 (constants.%.2)]
|
||||
// CHECK:STDOUT: %self.loc12_15.1: @Get.%.1 (%.2) = param self
|
||||
// CHECK:STDOUT: %self.loc12_15.3: @Get.%.1 (%.2) = bind_name self, %self.loc12_15.1
|
||||
// CHECK:STDOUT: %.loc12_10: @Get.%.1 (%.2) = addr_pattern %self.loc12_15.3
|
||||
// CHECK:STDOUT: %T.ref.loc12: type = name_ref T, file.%T.loc11_13.2 [symbolic = @Get.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %.loc12_34: type = ptr_type %T [symbolic = @Get.%.2 (constants.%.3)]
|
||||
// CHECK:STDOUT: %return.var: ref %.3 = var <return slot>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.ref.loc16: type = name_ref T, file.%T.loc11_13.2 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT: %.loc16: @Class.%.1 (%.4) = field_decl k, element0 [template]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%Class.2
|
||||
// CHECK:STDOUT: .Get = %Get.decl
|
||||
// CHECK:STDOUT: .k = %.loc16
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Get[addr @Class.%self.loc12_15.3: @Class.%.loc12_25 (%.2)]() -> %.3
|
||||
// CHECK:STDOUT: generic [file.%T.loc11_13.2: type] {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %self.ref: @Class.%.loc12_25 (%.2) = name_ref self, @Class.%self.loc12_15.3
|
||||
// CHECK:STDOUT: %.loc13_17.1: ref @Class.%.loc12_21 (%Class.2) = deref %self.ref
|
||||
// CHECK:STDOUT: %k.ref: <unexpected>.inst+40 (%.4) = name_ref k, @Class.%.loc16 [template = @Class.%.loc16]
|
||||
// CHECK:STDOUT: %.loc13_17.2: ref @Class.%T.ref.loc12 (%T) = class_element_access %.loc13_17.1, element0
|
||||
// CHECK:STDOUT: %.loc13_12: @Class.%.loc12_34 (%.3) = addr_of %.loc13_17.2
|
||||
// CHECK:STDOUT: return %.loc13_12
|
||||
// CHECK:STDOUT: generic fn @Get(file.%T.loc11_13.2: type) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %.1: type = ptr_type @Get.%Class (%Class.2) [symbolic = %.1 (constants.%.2)]
|
||||
// CHECK:STDOUT: %.2: type = ptr_type @Get.%T (%T) [symbolic = %.2 (constants.%.3)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %.3: type = unbound_element_type @Get.%Class (%Class.2), @Get.%T (%T) [symbolic = %.3 (constants.%.4)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn[addr @Class.%self.loc12_15.3: @Get.%.1 (%.2)]() -> %.3 {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %self.ref: @Get.%.1 (%.2) = name_ref self, @Class.%self.loc12_15.3
|
||||
// CHECK:STDOUT: %.loc13_17.1: ref @Get.%Class (%Class.2) = deref %self.ref
|
||||
// CHECK:STDOUT: %k.ref: @Get.%.3 (%.4) = name_ref k, @Class.%.loc16 [template = @Class.%.loc16]
|
||||
// CHECK:STDOUT: %.loc13_17.2: ref @Get.%T (%T) = class_element_access %.loc13_17.1, element0
|
||||
// CHECK:STDOUT: %.loc13_12: @Get.%.2 (%.3) = addr_of %.loc13_17.2
|
||||
// CHECK:STDOUT: return %.loc13_12
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
|
||||
@@ -152,36 +168,34 @@ fn Run() -> i32 {
|
||||
// CHECK:STDOUT: return <error>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%Class.decl(constants.%T) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc11_13.2 => constants.%T
|
||||
// CHECK:STDOUT: specific @Class(constants.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: definition:
|
||||
// CHECK:STDOUT: <unexpected>.inst+31 => constants.%Class.2
|
||||
// CHECK:STDOUT: <unexpected>.inst+32 => constants.%.4
|
||||
// CHECK:STDOUT: <unexpected>.inst+28.loc16_8 => <unexpected>.inst+29
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %Class => constants.%Class.2
|
||||
// CHECK:STDOUT: %.1 => constants.%.4
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Class.%Get.decl(constants.%T) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: @Class.%.loc12_21 => constants.%Class.2
|
||||
// CHECK:STDOUT: @Class.%.loc12_25 => constants.%.2
|
||||
// CHECK:STDOUT: @Class.%T.ref.loc12 => constants.%T
|
||||
// CHECK:STDOUT: @Class.%.loc12_34 => constants.%.3
|
||||
// CHECK:STDOUT: specific @Class(@Get.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%Class.decl(file.%T.loc11_13.2) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc11_13.2 => constants.%T
|
||||
// CHECK:STDOUT: specific @Get(constants.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: %Class => constants.%Class.2
|
||||
// CHECK:STDOUT: %.1 => constants.%.2
|
||||
// CHECK:STDOUT: %.2 => constants.%.3
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%Class.decl(i32) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc11_13.2 => i32
|
||||
// CHECK:STDOUT: specific @Class(@Class.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: definition:
|
||||
// CHECK:STDOUT: <unexpected>.inst+31 => constants.%Class.3
|
||||
// CHECK:STDOUT: <unexpected>.inst+32 => constants.%.7
|
||||
// CHECK:STDOUT: <unexpected>.inst+28.loc16_8 => <unexpected>.inst+29
|
||||
// CHECK:STDOUT: specific @Class(i32) {
|
||||
// CHECK:STDOUT: %T => i32
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %Class => constants.%Class.3
|
||||
// CHECK:STDOUT: %.1 => constants.%.7
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+96
-76
@@ -31,12 +31,12 @@ fn H(U:! type, c: Class(U)) -> U {
|
||||
// CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Class.2: type = class_type @Class, file.%Class.decl(%T) [symbolic]
|
||||
// CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T) [symbolic]
|
||||
// CHECK:STDOUT: %.2: type = unbound_element_type %Class.2, %T [symbolic]
|
||||
// CHECK:STDOUT: %.3: type = struct_type {.x: %T} [symbolic]
|
||||
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
|
||||
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Class.3: type = class_type @Class, file.%Class.decl(i32) [template]
|
||||
// CHECK:STDOUT: %Class.3: type = class_type @Class, @Class(i32) [template]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.4: type = unbound_element_type %Class.3, i32 [template]
|
||||
@@ -44,7 +44,7 @@ fn H(U:! type, c: Class(U)) -> U {
|
||||
// CHECK:STDOUT: %G.type: type = fn_type @G [template]
|
||||
// CHECK:STDOUT: %G: %G.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %U: type = bind_symbolic_name U 0 [symbolic]
|
||||
// CHECK:STDOUT: %Class.4: type = class_type @Class, file.%Class.decl(%U) [symbolic]
|
||||
// CHECK:STDOUT: %Class.4: type = class_type @Class, @Class(%U) [symbolic]
|
||||
// CHECK:STDOUT: %H.type: type = fn_type @H [template]
|
||||
// CHECK:STDOUT: %H: %H.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.6: type = unbound_element_type %Class.4, %U [symbolic]
|
||||
@@ -75,7 +75,7 @@ fn H(U:! type, c: Class(U)) -> U {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] {
|
||||
// CHECK:STDOUT: %T.loc11_13.1: type = param T
|
||||
// CHECK:STDOUT: %T.loc11_13.2: type = bind_symbolic_name T 0, %T.loc11_13.1 [symbolic = %T.loc11_13.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.loc11_13.2: type = bind_symbolic_name T 0, %T.loc11_13.1 [symbolic = @Class.%T (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
|
||||
// CHECK:STDOUT: %Class.ref.loc15: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.1]
|
||||
@@ -94,40 +94,47 @@ fn H(U:! type, c: Class(U)) -> U {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {
|
||||
// CHECK:STDOUT: %T.loc19_6.1: type = param T
|
||||
// CHECK:STDOUT: @G.%T: type = bind_symbolic_name T 0, %T.loc19_6.1 [symbolic = @G.%T (constants.%T)]
|
||||
// CHECK:STDOUT: @G.%T.loc19: type = bind_symbolic_name T 0, %T.loc19_6.1 [symbolic = @G.%T.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %Class.ref.loc19: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.1]
|
||||
// CHECK:STDOUT: %T.ref.loc19_25: type = name_ref T, @G.%T [symbolic = @G.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %.loc19_24: init type = call %Class.ref.loc19(%T.ref.loc19_25) [symbolic = %.loc19_24 (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %.loc19_26.1: type = value_of_initializer %.loc19_24 [symbolic = %.loc19_24 (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %.loc19_26.2: type = converted %.loc19_24, %.loc19_26.1 [symbolic = %.loc19_24 (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %c.loc19_16.1: file.%.loc19_24 (%Class.2) = param c
|
||||
// CHECK:STDOUT: @G.%c: file.%.loc19_24 (%Class.2) = bind_name c, %c.loc19_16.1
|
||||
// CHECK:STDOUT: %T.ref.loc19_32: type = name_ref T, @G.%T [symbolic = @G.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %T.ref.loc19_25: type = name_ref T, @G.%T.loc19 [symbolic = @G.%T.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %.loc19_24: init type = call %Class.ref.loc19(%T.ref.loc19_25) [symbolic = @G.%Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %.loc19_26.1: type = value_of_initializer %.loc19_24 [symbolic = @G.%Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %.loc19_26.2: type = converted %.loc19_24, %.loc19_26.1 [symbolic = @G.%Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %c.loc19_16.1: @G.%Class (%Class.2) = param c
|
||||
// CHECK:STDOUT: @G.%c: @G.%Class (%Class.2) = bind_name c, %c.loc19_16.1
|
||||
// CHECK:STDOUT: %T.ref.loc19_32: type = name_ref T, @G.%T.loc19 [symbolic = @G.%T.1 (constants.%T)]
|
||||
// CHECK:STDOUT: @G.%return: ref %T = var <return slot>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [template = constants.%H] {
|
||||
// CHECK:STDOUT: %U.loc23_6.1: type = param U
|
||||
// CHECK:STDOUT: @H.%U: type = bind_symbolic_name U 0, %U.loc23_6.1 [symbolic = @H.%U (constants.%U)]
|
||||
// CHECK:STDOUT: @H.%U.loc23: type = bind_symbolic_name U 0, %U.loc23_6.1 [symbolic = @H.%U.1 (constants.%U)]
|
||||
// CHECK:STDOUT: %Class.ref.loc23: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.1]
|
||||
// CHECK:STDOUT: %U.ref.loc23_25: type = name_ref U, @H.%U [symbolic = @H.%U (constants.%U)]
|
||||
// CHECK:STDOUT: %.loc23_24: init type = call %Class.ref.loc23(%U.ref.loc23_25) [symbolic = %.loc23_24 (constants.%Class.4)]
|
||||
// CHECK:STDOUT: %.loc23_26.1: type = value_of_initializer %.loc23_24 [symbolic = %.loc23_24 (constants.%Class.4)]
|
||||
// CHECK:STDOUT: %.loc23_26.2: type = converted %.loc23_24, %.loc23_26.1 [symbolic = %.loc23_24 (constants.%Class.4)]
|
||||
// CHECK:STDOUT: %c.loc23_16.1: file.%.loc23_24 (%Class.4) = param c
|
||||
// CHECK:STDOUT: @H.%c: file.%.loc23_24 (%Class.4) = bind_name c, %c.loc23_16.1
|
||||
// CHECK:STDOUT: %U.ref.loc23_32: type = name_ref U, @H.%U [symbolic = @H.%U (constants.%U)]
|
||||
// CHECK:STDOUT: %U.ref.loc23_25: type = name_ref U, @H.%U.loc23 [symbolic = @H.%U.1 (constants.%U)]
|
||||
// CHECK:STDOUT: %.loc23_24: init type = call %Class.ref.loc23(%U.ref.loc23_25) [symbolic = @H.%Class (constants.%Class.4)]
|
||||
// CHECK:STDOUT: %.loc23_26.1: type = value_of_initializer %.loc23_24 [symbolic = @H.%Class (constants.%Class.4)]
|
||||
// CHECK:STDOUT: %.loc23_26.2: type = converted %.loc23_24, %.loc23_26.1 [symbolic = @H.%Class (constants.%Class.4)]
|
||||
// CHECK:STDOUT: %c.loc23_16.1: @H.%Class (%Class.4) = param c
|
||||
// CHECK:STDOUT: @H.%c: @H.%Class (%Class.4) = bind_name c, %c.loc23_16.1
|
||||
// CHECK:STDOUT: %U.ref.loc23_32: type = name_ref U, @H.%U.loc23 [symbolic = @H.%U.1 (constants.%U)]
|
||||
// CHECK:STDOUT: @H.%return: ref %U = var <return slot>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @Class
|
||||
// CHECK:STDOUT: generic [file.%T.loc11_13.2: type] {
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, file.%T.loc11_13.2 [symbolic = file.%T.loc11_13.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %.loc12: <unexpected>.inst+18 (%.2) = field_decl x, element0 [template]
|
||||
// CHECK:STDOUT: generic class @Class(file.%T.loc11_13.2: type) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%Class.2
|
||||
// CHECK:STDOUT: .x = %.loc12
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %.1: type = unbound_element_type @Class.%Class (%Class.2), @Class.%T (%T) [symbolic = %.1 (constants.%.2)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class {
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, file.%T.loc11_13.2 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT: %.loc12: @Class.%.1 (%.2) = field_decl x, element0 [template]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%Class.2
|
||||
// CHECK:STDOUT: .x = %.loc12
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
|
||||
@@ -141,70 +148,83 @@ fn H(U:! type, c: Class(U)) -> U {
|
||||
// CHECK:STDOUT: return %.loc16_11.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @G(%T: type, %c: file.%.loc19_24 (%Class.2)) -> %T
|
||||
// CHECK:STDOUT: generic [%T: type] {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %c.ref: file.%.loc19_24 (%Class.2) = name_ref c, %c
|
||||
// CHECK:STDOUT: %x.ref: <unexpected>.inst+68 (%.2) = name_ref x, @Class.%.loc12 [template = @Class.%.loc12]
|
||||
// CHECK:STDOUT: %.loc20_11.1: ref @G.%T (%T) = class_element_access %c.ref, element0
|
||||
// CHECK:STDOUT: %.loc20_11.2: @G.%T (%T) = bind_value %.loc20_11.1
|
||||
// CHECK:STDOUT: return %.loc20_11.2
|
||||
// CHECK:STDOUT: generic fn @G(%T.loc19: type) {
|
||||
// CHECK:STDOUT: %T.1: type = bind_symbolic_name T 0 [symbolic = %T.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.1) [symbolic = %Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %.1: type = unbound_element_type @G.%Class (%Class.2), @G.%T.1 (%T) [symbolic = %.1 (constants.%.2)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn(%T.loc19: type, %c: @G.%Class (%Class.2)) -> %T {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %c.ref: @G.%Class (%Class.2) = name_ref c, %c
|
||||
// CHECK:STDOUT: %x.ref: @G.%.1 (%.2) = name_ref x, @Class.%.loc12 [template = @Class.%.loc12]
|
||||
// CHECK:STDOUT: %.loc20_11.1: ref @G.%T.1 (%T) = class_element_access %c.ref, element0
|
||||
// CHECK:STDOUT: %.loc20_11.2: @G.%T.1 (%T) = bind_value %.loc20_11.1
|
||||
// CHECK:STDOUT: return %.loc20_11.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @H(%U: type, %c: file.%.loc23_24 (%Class.4)) -> %U
|
||||
// CHECK:STDOUT: generic [%U: type] {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %c.ref: file.%.loc23_24 (%Class.4) = name_ref c, %c
|
||||
// CHECK:STDOUT: %x.ref: <unexpected>.inst+91 (%.6) = name_ref x, @Class.%.loc12 [template = @Class.%.loc12]
|
||||
// CHECK:STDOUT: %.loc24_11.1: ref @H.%U (%U) = class_element_access %c.ref, element0
|
||||
// CHECK:STDOUT: %.loc24_11.2: @H.%U (%U) = bind_value %.loc24_11.1
|
||||
// CHECK:STDOUT: return %.loc24_11.2
|
||||
// CHECK:STDOUT: generic fn @H(%U.loc23: type) {
|
||||
// CHECK:STDOUT: %U.1: type = bind_symbolic_name U 0 [symbolic = %U.1 (constants.%U)]
|
||||
// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%U.1) [symbolic = %Class (constants.%Class.4)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %.1: type = unbound_element_type @H.%Class (%Class.4), @H.%U.1 (%U) [symbolic = %.1 (constants.%.6)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn(%U.loc23: type, %c: @H.%Class (%Class.4)) -> %U {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %c.ref: @H.%Class (%Class.4) = name_ref c, %c
|
||||
// CHECK:STDOUT: %x.ref: @H.%.1 (%.6) = name_ref x, @Class.%.loc12 [template = @Class.%.loc12]
|
||||
// CHECK:STDOUT: %.loc24_11.1: ref @H.%U.1 (%U) = class_element_access %c.ref, element0
|
||||
// CHECK:STDOUT: %.loc24_11.2: @H.%U.1 (%U) = bind_value %.loc24_11.1
|
||||
// CHECK:STDOUT: return %.loc24_11.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%Class.decl(constants.%T) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc11_13.2 => constants.%T
|
||||
// CHECK:STDOUT: specific @Class(constants.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: definition:
|
||||
// CHECK:STDOUT: <unexpected>.inst+17 => constants.%Class.2
|
||||
// CHECK:STDOUT: <unexpected>.inst+18 => constants.%.2
|
||||
// CHECK:STDOUT: <unexpected>.inst+14.loc12_8 => <unexpected>.inst+15
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %Class => constants.%Class.2
|
||||
// CHECK:STDOUT: %.1 => constants.%.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%Class.decl(file.%T.loc11_13.2) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc11_13.2 => constants.%T
|
||||
// CHECK:STDOUT: specific @Class(@Class.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%Class.decl(i32) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc11_13.2 => i32
|
||||
// CHECK:STDOUT: specific @Class(i32) {
|
||||
// CHECK:STDOUT: %T => i32
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: definition:
|
||||
// CHECK:STDOUT: <unexpected>.inst+17 => constants.%Class.3
|
||||
// CHECK:STDOUT: <unexpected>.inst+18 => constants.%.4
|
||||
// CHECK:STDOUT: <unexpected>.inst+14.loc12_8 => <unexpected>.inst+15
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %Class => constants.%Class.3
|
||||
// CHECK:STDOUT: %.1 => constants.%.4
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%G.decl(constants.%T) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: @G.%T => constants.%T
|
||||
// CHECK:STDOUT: file.%.loc19_24 => constants.%Class.2
|
||||
// CHECK:STDOUT: specific @Class(@G.%T.1) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%Class.decl(constants.%U) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc11_13.2 => constants.%U
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: definition:
|
||||
// CHECK:STDOUT: <unexpected>.inst+17 => constants.%Class.4
|
||||
// CHECK:STDOUT: <unexpected>.inst+18 => constants.%.6
|
||||
// CHECK:STDOUT: <unexpected>.inst+14.loc12_8 => <unexpected>.inst+15
|
||||
// CHECK:STDOUT: specific @G(constants.%T) {
|
||||
// CHECK:STDOUT: %T.1 => constants.%T
|
||||
// CHECK:STDOUT: %Class => constants.%Class.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%H.decl(constants.%U) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: @H.%U => constants.%U
|
||||
// CHECK:STDOUT: file.%.loc23_24 => constants.%Class.4
|
||||
// CHECK:STDOUT: specific @Class(constants.%U) {
|
||||
// CHECK:STDOUT: %T => constants.%U
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %Class => constants.%Class.4
|
||||
// CHECK:STDOUT: %.1 => constants.%.6
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Class(@H.%U.1) {
|
||||
// CHECK:STDOUT: %T => constants.%U
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @H(constants.%U) {
|
||||
// CHECK:STDOUT: %U.1 => constants.%U
|
||||
// CHECK:STDOUT: %Class => constants.%Class.4
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+110
-99
@@ -95,10 +95,10 @@ class Class(U:! type) {
|
||||
// CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Class.2: type = class_type @Class, file.%Class.decl(%T) [symbolic]
|
||||
// CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T) [symbolic]
|
||||
// CHECK:STDOUT: %CompleteClass.type: type = generic_class_type @CompleteClass [template]
|
||||
// CHECK:STDOUT: %CompleteClass.1: %CompleteClass.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %CompleteClass.2: type = class_type @CompleteClass, file.%CompleteClass.decl(%T) [symbolic]
|
||||
// CHECK:STDOUT: %CompleteClass.2: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic]
|
||||
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
|
||||
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.2: type = unbound_element_type %CompleteClass.2, i32 [symbolic]
|
||||
@@ -106,7 +106,7 @@ class Class(U:! type) {
|
||||
// CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template]
|
||||
// CHECK:STDOUT: %.3: type = struct_type {.n: i32} [template]
|
||||
// CHECK:STDOUT: %.4: i32 = int_literal 0 [template]
|
||||
// CHECK:STDOUT: %CompleteClass.3: type = class_type @CompleteClass, file.%CompleteClass.decl(i32) [template]
|
||||
// CHECK:STDOUT: %CompleteClass.3: type = class_type @CompleteClass, @CompleteClass(i32) [template]
|
||||
// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template]
|
||||
// CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -136,11 +136,11 @@ class Class(U:! type) {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] {
|
||||
// CHECK:STDOUT: %T.loc4_13.1: type = param T
|
||||
// CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T 0, %T.loc4_13.1 [symbolic = %T.loc4_13.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T 0, %T.loc4_13.1 [symbolic = @Class.%T (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %CompleteClass.decl: %CompleteClass.type = class_decl @CompleteClass [template = constants.%CompleteClass.1] {
|
||||
// CHECK:STDOUT: %T.loc6_21.1: type = param T
|
||||
// CHECK:STDOUT: %T.loc6_21.2: type = bind_symbolic_name T 0, %T.loc6_21.1 [symbolic = %T.loc6_21.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.loc6_21.2: type = bind_symbolic_name T 0, %T.loc6_21.1 [symbolic = @CompleteClass.%T (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {
|
||||
// CHECK:STDOUT: %CompleteClass.ref: %CompleteClass.type = name_ref CompleteClass, %CompleteClass.decl [template = constants.%CompleteClass.1]
|
||||
@@ -154,61 +154,68 @@ class Class(U:! type) {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @Class
|
||||
// CHECK:STDOUT: generic [file.%T.loc4_13.2: type];
|
||||
// CHECK:STDOUT: generic class @Class(file.%T.loc4_13.2: type) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @CompleteClass
|
||||
// CHECK:STDOUT: generic [file.%T.loc6_21.2: type] {
|
||||
// CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc7_10.1: type = value_of_initializer %int.make_type_32.loc7 [template = i32]
|
||||
// CHECK:STDOUT: %.loc7_10.2: type = converted %int.make_type_32.loc7, %.loc7_10.1 [template = i32]
|
||||
// CHECK:STDOUT: %.loc7_8: <unexpected>.inst+39 (%.2) = field_decl n, element0 [template]
|
||||
// CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {
|
||||
// CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc8_13.1: type = value_of_initializer %int.make_type_32.loc8 [template = i32]
|
||||
// CHECK:STDOUT: %.loc8_13.2: type = converted %int.make_type_32.loc8, %.loc8_13.1 [template = i32]
|
||||
// CHECK:STDOUT: %return.var: ref i32 = var <return slot>
|
||||
// CHECK:STDOUT: class;
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic class @CompleteClass(file.%T.loc6_21.2: type) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic = %CompleteClass (constants.%CompleteClass.2)]
|
||||
// CHECK:STDOUT: %.1: type = unbound_element_type @CompleteClass.%CompleteClass (%CompleteClass.2), i32 [symbolic = %.1 (constants.%.2)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class {
|
||||
// CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc7_10.1: type = value_of_initializer %int.make_type_32.loc7 [template = i32]
|
||||
// CHECK:STDOUT: %.loc7_10.2: type = converted %int.make_type_32.loc7, %.loc7_10.1 [template = i32]
|
||||
// CHECK:STDOUT: %.loc7_8: @CompleteClass.%.1 (%.2) = field_decl n, element0 [template]
|
||||
// CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {
|
||||
// CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc8_13.1: type = value_of_initializer %int.make_type_32.loc8 [template = i32]
|
||||
// CHECK:STDOUT: %.loc8_13.2: type = converted %int.make_type_32.loc8, %.loc8_13.1 [template = i32]
|
||||
// CHECK:STDOUT: %return.var: ref i32 = var <return slot>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%CompleteClass.2
|
||||
// CHECK:STDOUT: .n = %.loc7_8
|
||||
// CHECK:STDOUT: .F = %F.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%CompleteClass.2
|
||||
// CHECK:STDOUT: .n = %.loc7_8
|
||||
// CHECK:STDOUT: .F = %F.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F.1() -> i32
|
||||
// CHECK:STDOUT: generic [file.%T.loc6_21.2: type] {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc8: i32 = int_literal 0 [template = constants.%.4]
|
||||
// CHECK:STDOUT: return %.loc8
|
||||
// CHECK:STDOUT: generic fn @F.1(file.%T.loc6_21.2: type) {
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn() -> i32 {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc8: i32 = int_literal 0 [template = constants.%.4]
|
||||
// CHECK:STDOUT: return %.loc8
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F.2() -> %CompleteClass.3;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%Class.decl(constants.%T) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc4_13.2 => constants.%T
|
||||
// CHECK:STDOUT: specific @Class(constants.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%CompleteClass.decl(constants.%T) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc6_21.2 => constants.%T
|
||||
// CHECK:STDOUT: specific @CompleteClass(constants.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @CompleteClass.%F.decl(constants.%T) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: specific @F.1(constants.%T) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @CompleteClass(@CompleteClass.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%CompleteClass.decl(file.%T.loc6_21.2) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc6_21.2 => constants.%T
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%CompleteClass.decl(i32) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc6_21.2 => i32
|
||||
// CHECK:STDOUT: specific @CompleteClass(i32) {
|
||||
// CHECK:STDOUT: %T => i32
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- foo.impl.carbon
|
||||
@@ -218,16 +225,16 @@ class Class(U:! type) {
|
||||
// CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Class.2: type = class_type @Class, <invalid>(%T) [symbolic]
|
||||
// CHECK:STDOUT: %Class.2: type = class_type @Class, invalid(%T) [symbolic]
|
||||
// CHECK:STDOUT: %.2: type = unbound_element_type %Class.2, %T [symbolic]
|
||||
// CHECK:STDOUT: %.3: type = struct_type {.x: %T} [symbolic]
|
||||
// CHECK:STDOUT: %CompleteClass.type: type = generic_class_type @CompleteClass [template]
|
||||
// CHECK:STDOUT: %CompleteClass.1: %CompleteClass.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.4: type = struct_type {.n: i32} [template]
|
||||
// CHECK:STDOUT: %CompleteClass.2: type = class_type @CompleteClass, <invalid>(%T) [symbolic]
|
||||
// CHECK:STDOUT: %CompleteClass.2: type = class_type @CompleteClass, invalid(%T) [symbolic]
|
||||
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
|
||||
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %CompleteClass.3: type = class_type @CompleteClass, <invalid>(i32) [template]
|
||||
// CHECK:STDOUT: %CompleteClass.3: type = class_type @CompleteClass, invalid(i32) [template]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.5: type = ptr_type %.4 [template]
|
||||
@@ -237,11 +244,11 @@ class Class(U:! type) {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %import_ref.1: %Class.type = import_ref Main//foo, inst+6, loaded [template = constants.%Class.1]
|
||||
// CHECK:STDOUT: %import_ref.2: %CompleteClass.type = import_ref Main//foo, inst+13, loaded [template = constants.%CompleteClass.1]
|
||||
// CHECK:STDOUT: %import_ref.3: %F.type = import_ref Main//foo, inst+53, loaded [template = constants.%F]
|
||||
// CHECK:STDOUT: %import_ref.4 = import_ref Main//foo, inst+16, unloaded
|
||||
// CHECK:STDOUT: %import_ref.5 = import_ref Main//foo, inst+26, unloaded
|
||||
// CHECK:STDOUT: %import_ref.6 = import_ref Main//foo, inst+34, unloaded
|
||||
// CHECK:STDOUT: %import_ref.2: %CompleteClass.type = import_ref Main//foo, inst+14, loaded [template = constants.%CompleteClass.1]
|
||||
// CHECK:STDOUT: %import_ref.3: %F.type = import_ref Main//foo, inst+55, loaded [template = constants.%F]
|
||||
// CHECK:STDOUT: %import_ref.4 = import_ref Main//foo, inst+18, unloaded
|
||||
// CHECK:STDOUT: %import_ref.5 = import_ref Main//foo, inst+28, unloaded
|
||||
// CHECK:STDOUT: %import_ref.6 = import_ref Main//foo, inst+36, unloaded
|
||||
// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -309,9 +316,9 @@ class Class(U:! type) {
|
||||
// CHECK:STDOUT: return %.loc9_18 to %return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific <invalid>(constants.%T);
|
||||
// CHECK:STDOUT: specific invalid(constants.%T);
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific <invalid>(i32);
|
||||
// CHECK:STDOUT: specific invalid(i32);
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- use_foo.carbon
|
||||
// CHECK:STDOUT:
|
||||
@@ -325,8 +332,8 @@ class Class(U:! type) {
|
||||
// CHECK:STDOUT: %CompleteClass.1: %CompleteClass.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.2: type = struct_type {.n: i32} [template]
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0, <unexpected>.inst+28 [symbolic]
|
||||
// CHECK:STDOUT: %CompleteClass.2: type = class_type @CompleteClass, <invalid>(%T) [symbolic]
|
||||
// CHECK:STDOUT: %CompleteClass.3: type = class_type @CompleteClass, <invalid>(i32) [template]
|
||||
// CHECK:STDOUT: %CompleteClass.2: type = class_type @CompleteClass, invalid(%T) [symbolic]
|
||||
// CHECK:STDOUT: %CompleteClass.3: type = class_type @CompleteClass, invalid(i32) [template]
|
||||
// CHECK:STDOUT: %.3: type = ptr_type %.2 [template]
|
||||
// CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template]
|
||||
// CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template]
|
||||
@@ -336,12 +343,12 @@ class Class(U:! type) {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %import_ref.1 = import_ref Main//foo, inst+6, unloaded
|
||||
// CHECK:STDOUT: %import_ref.2: %CompleteClass.type = import_ref Main//foo, inst+13, loaded [template = constants.%CompleteClass.1]
|
||||
// CHECK:STDOUT: %import_ref.3: %F.type.1 = import_ref Main//foo, inst+53, loaded [template = constants.%F.1]
|
||||
// CHECK:STDOUT: %import_ref.2: %CompleteClass.type = import_ref Main//foo, inst+14, loaded [template = constants.%CompleteClass.1]
|
||||
// CHECK:STDOUT: %import_ref.3: %F.type.1 = import_ref Main//foo, inst+55, loaded [template = constants.%F.1]
|
||||
// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.5 = import_ref Main//foo, inst+16, unloaded
|
||||
// CHECK:STDOUT: %import_ref.6 = import_ref Main//foo, inst+26, unloaded
|
||||
// CHECK:STDOUT: %import_ref.7: %F.type.2 = import_ref Main//foo, inst+34, loaded [template = constants.%F.2]
|
||||
// CHECK:STDOUT: %import_ref.5 = import_ref Main//foo, inst+18, unloaded
|
||||
// CHECK:STDOUT: %import_ref.6 = import_ref Main//foo, inst+28, unloaded
|
||||
// CHECK:STDOUT: %import_ref.7: %F.type.2 = import_ref Main//foo, inst+36, loaded [template = constants.%F.2]
|
||||
// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -408,9 +415,9 @@ class Class(U:! type) {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F.2() -> i32;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific <invalid>(constants.%T);
|
||||
// CHECK:STDOUT: specific invalid(constants.%T);
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific <invalid>(i32);
|
||||
// CHECK:STDOUT: specific invalid(i32);
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_todo_use_foo.carbon
|
||||
// CHECK:STDOUT:
|
||||
@@ -424,8 +431,8 @@ class Class(U:! type) {
|
||||
// CHECK:STDOUT: %CompleteClass.1: %CompleteClass.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.2: type = struct_type {.n: i32} [template]
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0, <unexpected>.inst+28 [symbolic]
|
||||
// CHECK:STDOUT: %CompleteClass.2: type = class_type @CompleteClass, <invalid>(%T) [symbolic]
|
||||
// CHECK:STDOUT: %CompleteClass.3: type = class_type @CompleteClass, <invalid>(i32) [template]
|
||||
// CHECK:STDOUT: %CompleteClass.2: type = class_type @CompleteClass, invalid(%T) [symbolic]
|
||||
// CHECK:STDOUT: %CompleteClass.3: type = class_type @CompleteClass, invalid(i32) [template]
|
||||
// CHECK:STDOUT: %.3: type = ptr_type %.2 [template]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
||||
@@ -434,12 +441,12 @@ class Class(U:! type) {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %import_ref.1 = import_ref Main//foo, inst+6, unloaded
|
||||
// CHECK:STDOUT: %import_ref.2: %CompleteClass.type = import_ref Main//foo, inst+13, loaded [template = constants.%CompleteClass.1]
|
||||
// CHECK:STDOUT: %import_ref.3: %F.type = import_ref Main//foo, inst+53, loaded [template = constants.%F]
|
||||
// CHECK:STDOUT: %import_ref.2: %CompleteClass.type = import_ref Main//foo, inst+14, loaded [template = constants.%CompleteClass.1]
|
||||
// CHECK:STDOUT: %import_ref.3: %F.type = import_ref Main//foo, inst+55, loaded [template = constants.%F]
|
||||
// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.5 = import_ref Main//foo, inst+16, unloaded
|
||||
// CHECK:STDOUT: %import_ref.6: %.4 = import_ref Main//foo, inst+26, loaded [template = %.1]
|
||||
// CHECK:STDOUT: %import_ref.7 = import_ref Main//foo, inst+34, unloaded
|
||||
// CHECK:STDOUT: %import_ref.5 = import_ref Main//foo, inst+18, unloaded
|
||||
// CHECK:STDOUT: %import_ref.6: %.4 = import_ref Main//foo, inst+28, loaded [template = %.1]
|
||||
// CHECK:STDOUT: %import_ref.7 = import_ref Main//foo, inst+36, unloaded
|
||||
// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -502,9 +509,9 @@ class Class(U:! type) {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F() -> %CompleteClass.3;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific <invalid>(constants.%T);
|
||||
// CHECK:STDOUT: specific invalid(constants.%T);
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific <invalid>(i32);
|
||||
// CHECK:STDOUT: specific invalid(i32);
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_generic_arg_mismatch.carbon
|
||||
// CHECK:STDOUT:
|
||||
@@ -516,24 +523,24 @@ class Class(U:! type) {
|
||||
// CHECK:STDOUT: %CompleteClass.1: %CompleteClass.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.2: type = struct_type {.n: i32} [template]
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0, <unexpected>.inst+19 [symbolic]
|
||||
// CHECK:STDOUT: %CompleteClass.2: type = class_type @CompleteClass, <invalid>(%T) [symbolic]
|
||||
// CHECK:STDOUT: %CompleteClass.2: type = class_type @CompleteClass, invalid(%T) [symbolic]
|
||||
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
|
||||
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.3: type = ptr_type i32 [template]
|
||||
// CHECK:STDOUT: %CompleteClass.3: type = class_type @CompleteClass, <invalid>(%.3) [template]
|
||||
// CHECK:STDOUT: %CompleteClass.3: type = class_type @CompleteClass, invalid(%.3) [template]
|
||||
// CHECK:STDOUT: %.4: type = ptr_type %.2 [template]
|
||||
// CHECK:STDOUT: %CompleteClass.4: type = class_type @CompleteClass, <invalid>(i32) [template]
|
||||
// CHECK:STDOUT: %CompleteClass.4: type = class_type @CompleteClass, invalid(i32) [template]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %import_ref.1 = import_ref Main//foo, inst+6, unloaded
|
||||
// CHECK:STDOUT: %import_ref.2: %CompleteClass.type = import_ref Main//foo, inst+13, loaded [template = constants.%CompleteClass.1]
|
||||
// CHECK:STDOUT: %import_ref.3: %F.type = import_ref Main//foo, inst+53, loaded [template = constants.%F]
|
||||
// CHECK:STDOUT: %import_ref.4 = import_ref Main//foo, inst+16, unloaded
|
||||
// CHECK:STDOUT: %import_ref.5 = import_ref Main//foo, inst+26, unloaded
|
||||
// CHECK:STDOUT: %import_ref.6 = import_ref Main//foo, inst+34, unloaded
|
||||
// CHECK:STDOUT: %import_ref.2: %CompleteClass.type = import_ref Main//foo, inst+14, loaded [template = constants.%CompleteClass.1]
|
||||
// CHECK:STDOUT: %import_ref.3: %F.type = import_ref Main//foo, inst+55, loaded [template = constants.%F]
|
||||
// CHECK:STDOUT: %import_ref.4 = import_ref Main//foo, inst+18, unloaded
|
||||
// CHECK:STDOUT: %import_ref.5 = import_ref Main//foo, inst+28, unloaded
|
||||
// CHECK:STDOUT: %import_ref.6 = import_ref Main//foo, inst+36, unloaded
|
||||
// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -589,11 +596,11 @@ class Class(U:! type) {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F() -> %CompleteClass.4;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific <invalid>(constants.%T);
|
||||
// CHECK:STDOUT: specific invalid(constants.%T);
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific <invalid>(constants.%.3);
|
||||
// CHECK:STDOUT: specific invalid(constants.%.3);
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific <invalid>(i32);
|
||||
// CHECK:STDOUT: specific invalid(i32);
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_bad_foo.impl.carbon
|
||||
// CHECK:STDOUT:
|
||||
@@ -603,16 +610,16 @@ class Class(U:! type) {
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0, <unexpected>.inst+17 [symbolic]
|
||||
// CHECK:STDOUT: %Class.2: type = class_type @Class, <invalid>(%T) [symbolic]
|
||||
// CHECK:STDOUT: %Class.2: type = class_type @Class, invalid(%T) [symbolic]
|
||||
// CHECK:STDOUT: %.type: type = generic_class_type @.1 [template]
|
||||
// CHECK:STDOUT: %.2: %.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.3: type = class_type @.1, file.%.decl(%U) [symbolic]
|
||||
// CHECK:STDOUT: %.3: type = class_type @.1, @.1(%U) [symbolic]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %import_ref.1: %Class.type = import_ref Main//foo, inst+6, loaded [template = constants.%Class.1]
|
||||
// CHECK:STDOUT: %import_ref.2 = import_ref Main//foo, inst+13, unloaded
|
||||
// CHECK:STDOUT: %import_ref.3 = import_ref Main//foo, inst+53, unloaded
|
||||
// CHECK:STDOUT: %import_ref.2 = import_ref Main//foo, inst+14, unloaded
|
||||
// CHECK:STDOUT: %import_ref.3 = import_ref Main//foo, inst+55, unloaded
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
@@ -636,26 +643,30 @@ class Class(U:! type) {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.2] {
|
||||
// CHECK:STDOUT: %U.loc9_13.1: type = param U
|
||||
// CHECK:STDOUT: %U.loc9_13.2: type = bind_symbolic_name U 0, %U.loc9_13.1 [symbolic = %U.loc9_13.2 (constants.%U)]
|
||||
// CHECK:STDOUT: %U.loc9_13.2: type = bind_symbolic_name U 0, %U.loc9_13.1 [symbolic = @.1.%U (constants.%U)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @Class;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @.1
|
||||
// CHECK:STDOUT: generic [file.%U.loc9_13.2: type] {
|
||||
// CHECK:STDOUT: %T.ref: <error> = name_ref T, <error> [template = <error>]
|
||||
// CHECK:STDOUT: %.loc13: <error> = field_decl x, element0 [template]
|
||||
// CHECK:STDOUT: generic class @.1(file.%U.loc9_13.2: type) {
|
||||
// CHECK:STDOUT: %U: type = bind_symbolic_name U 0 [symbolic = %U (constants.%U)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%.3
|
||||
// CHECK:STDOUT: .x = %.loc13
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class {
|
||||
// CHECK:STDOUT: %T.ref: <error> = name_ref T, <error> [template = <error>]
|
||||
// CHECK:STDOUT: %.loc13: <error> = field_decl x, element0 [template]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%.3
|
||||
// CHECK:STDOUT: .x = %.loc13
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific <invalid>(constants.%T);
|
||||
// CHECK:STDOUT: specific invalid(constants.%T);
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%.decl(constants.%U) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%U.loc9_13.2 => constants.%U
|
||||
// CHECK:STDOUT: specific @.1(constants.%U) {
|
||||
// CHECK:STDOUT: %U => constants.%U
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+74
-56
@@ -27,7 +27,7 @@ class Class(T:! type) {
|
||||
// CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Class.2: type = class_type @Class, file.%Class.decl(%T) [symbolic]
|
||||
// CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T) [symbolic]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %G.type: type = fn_type @G [template]
|
||||
@@ -54,77 +54,95 @@ class Class(T:! type) {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] {
|
||||
// CHECK:STDOUT: %T.loc11_13.1: type = param T
|
||||
// CHECK:STDOUT: %T.loc11_13.2: type = bind_symbolic_name T 0, %T.loc11_13.1 [symbolic = %T.loc11_13.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.loc11_13.2: type = bind_symbolic_name T 0, %T.loc11_13.1 [symbolic = @Class.%T (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @Class
|
||||
// CHECK:STDOUT: generic [file.%T.loc11_13.2: type] {
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
|
||||
// CHECK:STDOUT: %T.ref.loc12_11: type = name_ref T, file.%T.loc11_13.2 [symbolic = %T.ref.loc12_11 (constants.%T)]
|
||||
// CHECK:STDOUT: %n.loc12_8.1: @Class.%T.ref.loc12_11 (%T) = param n
|
||||
// CHECK:STDOUT: %n.loc12_8.2: @Class.%T.ref.loc12_11 (%T) = bind_name n, %n.loc12_8.1
|
||||
// CHECK:STDOUT: %T.ref.loc12_17: type = name_ref T, file.%T.loc11_13.2 [symbolic = %T.ref.loc12_11 (constants.%T)]
|
||||
// CHECK:STDOUT: %return.var.loc12: ref %T = var <return slot>
|
||||
// CHECK:STDOUT: generic class @Class(file.%T.loc11_13.2: type) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %.1: type = unbound_element_type @Class.%Class (%Class.2), @Class.%T (%T) [symbolic = %.1 (constants.%.2)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class {
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
|
||||
// CHECK:STDOUT: %T.ref.loc12_11: type = name_ref T, file.%T.loc11_13.2 [symbolic = @F.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %n.loc12_8.1: @F.%T (%T) = param n
|
||||
// CHECK:STDOUT: %n.loc12_8.2: @F.%T (%T) = bind_name n, %n.loc12_8.1
|
||||
// CHECK:STDOUT: %T.ref.loc12_17: type = name_ref T, file.%T.loc11_13.2 [symbolic = @F.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %return.var.loc12: ref %T = var <return slot>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {
|
||||
// CHECK:STDOUT: %.loc16: type = specific_constant constants.%Class.2, @Class(constants.%T) [symbolic = @G.%Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc16 [symbolic = @G.%Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %self.loc16_8.1: @G.%Class (%Class.2) = param self
|
||||
// CHECK:STDOUT: %self.loc16_8.2: @G.%Class (%Class.2) = bind_name self, %self.loc16_8.1
|
||||
// CHECK:STDOUT: %T.ref.loc16: type = name_ref T, file.%T.loc11_13.2 [symbolic = @G.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %return.var.loc16: ref %T = var <return slot>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.ref.loc20: type = name_ref T, file.%T.loc11_13.2 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT: %.loc20: @Class.%.1 (%.2) = field_decl n, element0 [template]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%Class.2
|
||||
// CHECK:STDOUT: .F = %F.decl
|
||||
// CHECK:STDOUT: .G = %G.decl
|
||||
// CHECK:STDOUT: .n = %.loc20
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {
|
||||
// CHECK:STDOUT: %.loc16: type = specific_constant constants.%Class.2, file.%Class.decl(constants.%T) [symbolic = %.loc16 (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc16 [symbolic = %.loc16 (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %self.loc16_8.1: @Class.%.loc16 (%Class.2) = param self
|
||||
// CHECK:STDOUT: %self.loc16_8.2: @Class.%.loc16 (%Class.2) = bind_name self, %self.loc16_8.1
|
||||
// CHECK:STDOUT: %T.ref.loc16: type = name_ref T, file.%T.loc11_13.2 [symbolic = %T.ref.loc16 (constants.%T)]
|
||||
// CHECK:STDOUT: %return.var.loc16: ref %T = var <return slot>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @F(file.%T.loc11_13.2: type) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn(@Class.%n.loc12_8.2: @F.%T (%T)) -> %T {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %n.ref: @F.%T (%T) = name_ref n, @Class.%n.loc12_8.2
|
||||
// CHECK:STDOUT: return %n.ref
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.ref.loc20: type = name_ref T, file.%T.loc11_13.2 [symbolic = file.%T.loc11_13.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %.loc20: <unexpected>.inst+35 (%.2) = field_decl n, element0 [template]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%Class.2
|
||||
// CHECK:STDOUT: .F = %F.decl
|
||||
// CHECK:STDOUT: .G = %G.decl
|
||||
// CHECK:STDOUT: .n = %.loc20
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F(@Class.%n.loc12_8.2: @Class.%T.ref.loc12_11 (%T)) -> %T
|
||||
// CHECK:STDOUT: generic [file.%T.loc11_13.2: type] {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %n.ref: @Class.%T.ref.loc12_11 (%T) = name_ref n, @Class.%n.loc12_8.2
|
||||
// CHECK:STDOUT: return %n.ref
|
||||
// CHECK:STDOUT: generic fn @G(file.%T.loc11_13.2: type) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %.1: type = unbound_element_type @G.%Class (%Class.2), @G.%T (%T) [symbolic = %.1 (constants.%.2)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn[@Class.%self.loc16_8.2: @G.%Class (%Class.2)]() -> %T {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %self.ref: @G.%Class (%Class.2) = name_ref self, @Class.%self.loc16_8.2
|
||||
// CHECK:STDOUT: %n.ref: @G.%.1 (%.2) = name_ref n, @Class.%.loc20 [template = @Class.%.loc20]
|
||||
// CHECK:STDOUT: %.loc17_16.1: ref @G.%T (%T) = class_element_access %self.ref, element0
|
||||
// CHECK:STDOUT: %.loc17_16.2: @G.%T (%T) = bind_value %.loc17_16.1
|
||||
// CHECK:STDOUT: return %.loc17_16.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @G[@Class.%self.loc16_8.2: @Class.%.loc16 (%Class.2)]() -> %T
|
||||
// CHECK:STDOUT: generic [file.%T.loc11_13.2: type] {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %self.ref: @Class.%.loc16 (%Class.2) = name_ref self, @Class.%self.loc16_8.2
|
||||
// CHECK:STDOUT: %n.ref: <unexpected>.inst+44 (%.2) = name_ref n, @Class.%.loc20 [template = @Class.%.loc20]
|
||||
// CHECK:STDOUT: %.loc17_16.1: ref @Class.%T.ref.loc16 (%T) = class_element_access %self.ref, element0
|
||||
// CHECK:STDOUT: %.loc17_16.2: @Class.%T.ref.loc16 (%T) = bind_value %.loc17_16.1
|
||||
// CHECK:STDOUT: return %.loc17_16.2
|
||||
// CHECK:STDOUT: specific @Class(constants.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %Class => constants.%Class.2
|
||||
// CHECK:STDOUT: %.1 => constants.%.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%Class.decl(constants.%T) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc11_13.2 => constants.%T
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: definition:
|
||||
// CHECK:STDOUT: <unexpected>.inst+34 => constants.%Class.2
|
||||
// CHECK:STDOUT: <unexpected>.inst+35 => constants.%.2
|
||||
// CHECK:STDOUT: <unexpected>.inst+31.loc20_8 => <unexpected>.inst+32
|
||||
// CHECK:STDOUT: specific @F(constants.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Class.%F.decl(constants.%T) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: @Class.%T.ref.loc12_11 => constants.%T
|
||||
// CHECK:STDOUT: specific @Class(@G.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Class.%G.decl(constants.%T) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: @Class.%.loc16 => constants.%Class.2
|
||||
// CHECK:STDOUT: @Class.%T.ref.loc16 => constants.%T
|
||||
// CHECK:STDOUT: specific @G(constants.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: %Class => constants.%Class.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%Class.decl(file.%T.loc11_13.2) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc11_13.2 => constants.%T
|
||||
// CHECK:STDOUT: specific @Class(@Class.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+238
-174
@@ -112,7 +112,7 @@ fn Generic(T:! ()).WrongType() {}
|
||||
// CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Class.2: type = class_type @Class, file.%Class.decl(%T) [symbolic]
|
||||
// CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T) [symbolic]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %G.type: type = fn_type @G [template]
|
||||
@@ -139,7 +139,7 @@ fn Generic(T:! ()).WrongType() {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] {
|
||||
// CHECK:STDOUT: %T.loc4_13.1: type = param T
|
||||
// CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T 0, %T.loc4_13.1 [symbolic = %T.loc4_13.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T 0, %T.loc4_13.1 [symbolic = @Class.%T (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
|
||||
// CHECK:STDOUT: %T.loc10_10.1: type = param T
|
||||
@@ -153,7 +153,7 @@ fn Generic(T:! ()).WrongType() {}
|
||||
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {
|
||||
// CHECK:STDOUT: %T.loc14_10.1: type = param T
|
||||
// CHECK:STDOUT: %T.loc14_10.2: type = bind_symbolic_name T 0, %T.loc14_10.1 [symbolic = constants.%T]
|
||||
// CHECK:STDOUT: %.loc14: type = specific_constant constants.%Class.2, %Class.decl(constants.%T) [symbolic = constants.%Class.2]
|
||||
// CHECK:STDOUT: %.loc14: type = specific_constant constants.%Class.2, @Class(constants.%T) [symbolic = constants.%Class.2]
|
||||
// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc14 [symbolic = constants.%Class.2]
|
||||
// CHECK:STDOUT: %self.loc14_22.1: %Class.2 = param self
|
||||
// CHECK:STDOUT: @G.%self: %Class.2 = bind_name self, %self.loc14_22.1
|
||||
@@ -162,74 +162,92 @@ fn Generic(T:! ()).WrongType() {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @Class
|
||||
// CHECK:STDOUT: generic [file.%T.loc4_13.2: type] {
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
|
||||
// CHECK:STDOUT: %T.ref.loc5_11: type = name_ref T, file.%T.loc4_13.2 [symbolic = %T.ref.loc5_11 (constants.%T)]
|
||||
// CHECK:STDOUT: %n.loc5_8.1: @Class.%T.ref.loc5_11 (%T) = param n
|
||||
// CHECK:STDOUT: %n.loc5_8.2: @Class.%T.ref.loc5_11 (%T) = bind_name n, %n.loc5_8.1
|
||||
// CHECK:STDOUT: %T.ref.loc5_17: type = name_ref T, file.%T.loc4_13.2 [symbolic = %T.ref.loc5_11 (constants.%T)]
|
||||
// CHECK:STDOUT: %return.var.loc5: ref %T = var <return slot>
|
||||
// CHECK:STDOUT: generic class @Class(file.%T.loc4_13.2: type) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %.1: type = unbound_element_type @Class.%Class (%Class.2), @Class.%T (%T) [symbolic = %.1 (constants.%.2)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class {
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
|
||||
// CHECK:STDOUT: %T.ref.loc5_11: type = name_ref T, file.%T.loc4_13.2 [symbolic = @F.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %n.loc5_8.1: @F.%T (%T) = param n
|
||||
// CHECK:STDOUT: %n.loc5_8.2: @F.%T (%T) = bind_name n, %n.loc5_8.1
|
||||
// CHECK:STDOUT: %T.ref.loc5_17: type = name_ref T, file.%T.loc4_13.2 [symbolic = @F.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %return.var.loc5: ref %T = var <return slot>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {
|
||||
// CHECK:STDOUT: %.loc6: type = specific_constant constants.%Class.2, @Class(constants.%T) [symbolic = @G.%Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc6 [symbolic = @G.%Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %self.loc6_8.1: @G.%Class (%Class.2) = param self
|
||||
// CHECK:STDOUT: %self.loc6_8.2: @G.%Class (%Class.2) = bind_name self, %self.loc6_8.1
|
||||
// CHECK:STDOUT: %T.ref.loc6: type = name_ref T, file.%T.loc4_13.2 [symbolic = @G.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %return.var.loc6: ref %T = var <return slot>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.ref.loc7: type = name_ref T, file.%T.loc4_13.2 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT: %.loc7: @Class.%.1 (%.2) = field_decl n, element0 [template]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%Class.2
|
||||
// CHECK:STDOUT: .F = %F.decl
|
||||
// CHECK:STDOUT: .G = %G.decl
|
||||
// CHECK:STDOUT: .n = %.loc7
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {
|
||||
// CHECK:STDOUT: %.loc6: type = specific_constant constants.%Class.2, file.%Class.decl(constants.%T) [symbolic = %.loc6 (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc6 [symbolic = %.loc6 (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %self.loc6_8.1: @Class.%.loc6 (%Class.2) = param self
|
||||
// CHECK:STDOUT: %self.loc6_8.2: @Class.%.loc6 (%Class.2) = bind_name self, %self.loc6_8.1
|
||||
// CHECK:STDOUT: %T.ref.loc6: type = name_ref T, file.%T.loc4_13.2 [symbolic = %T.ref.loc6 (constants.%T)]
|
||||
// CHECK:STDOUT: %return.var.loc6: ref %T = var <return slot>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @F(file.%T.loc4_13.2: type) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn(%n: %T) -> %T {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %n.ref: @F.%T (%T) = name_ref n, %n
|
||||
// CHECK:STDOUT: return %n.ref
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.ref.loc7: type = name_ref T, file.%T.loc4_13.2 [symbolic = file.%T.loc4_13.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %.loc7: <unexpected>.inst+35 (%.2) = field_decl n, element0 [template]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%Class.2
|
||||
// CHECK:STDOUT: .F = %F.decl
|
||||
// CHECK:STDOUT: .G = %G.decl
|
||||
// CHECK:STDOUT: .n = %.loc7
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F(%n: %T) -> %T
|
||||
// CHECK:STDOUT: generic [file.%T.loc4_13.2: type] {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %n.ref: @Class.%T.ref.loc5_11 (%T) = name_ref n, %n
|
||||
// CHECK:STDOUT: return %n.ref
|
||||
// CHECK:STDOUT: generic fn @G(file.%T.loc4_13.2: type) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %.1: type = unbound_element_type @G.%Class (%Class.2), @G.%T (%T) [symbolic = %.1 (constants.%.2)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn[%self: %Class.2]() -> %T {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %self.ref: @G.%Class (%Class.2) = name_ref self, %self
|
||||
// CHECK:STDOUT: %n.ref: @G.%.1 (%.2) = name_ref n, @Class.%.loc7 [template = @Class.%.loc7]
|
||||
// CHECK:STDOUT: %.loc15_14.1: ref @G.%T (%T) = class_element_access %self.ref, element0
|
||||
// CHECK:STDOUT: %.loc15_14.2: @G.%T (%T) = bind_value %.loc15_14.1
|
||||
// CHECK:STDOUT: return %.loc15_14.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @G[%self: %Class.2]() -> %T
|
||||
// CHECK:STDOUT: generic [file.%T.loc4_13.2: type] {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %self.ref: @Class.%.loc6 (%Class.2) = name_ref self, %self
|
||||
// CHECK:STDOUT: %n.ref: <unexpected>.inst+61 (%.2) = name_ref n, @Class.%.loc7 [template = @Class.%.loc7]
|
||||
// CHECK:STDOUT: %.loc15_14.1: ref @Class.%T.ref.loc6 (%T) = class_element_access %self.ref, element0
|
||||
// CHECK:STDOUT: %.loc15_14.2: @Class.%T.ref.loc6 (%T) = bind_value %.loc15_14.1
|
||||
// CHECK:STDOUT: return %.loc15_14.2
|
||||
// CHECK:STDOUT: specific @Class(constants.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %Class => constants.%Class.2
|
||||
// CHECK:STDOUT: %.1 => constants.%.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%Class.decl(constants.%T) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc4_13.2 => constants.%T
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: definition:
|
||||
// CHECK:STDOUT: <unexpected>.inst+34 => constants.%Class.2
|
||||
// CHECK:STDOUT: <unexpected>.inst+35 => constants.%.2
|
||||
// CHECK:STDOUT: <unexpected>.inst+31.loc7_8 => <unexpected>.inst+32
|
||||
// CHECK:STDOUT: specific @F(constants.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Class.%F.decl(constants.%T) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: @Class.%T.ref.loc5_11 => constants.%T
|
||||
// CHECK:STDOUT: specific @Class(@G.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Class.%G.decl(constants.%T) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: @Class.%.loc6 => constants.%Class.2
|
||||
// CHECK:STDOUT: @Class.%T.ref.loc6 => constants.%T
|
||||
// CHECK:STDOUT: specific @G(constants.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: %Class => constants.%Class.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%Class.decl(file.%T.loc4_13.2) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc4_13.2 => constants.%T
|
||||
// CHECK:STDOUT: specific @Class(@Class.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- nested.carbon
|
||||
@@ -239,11 +257,11 @@ fn Generic(T:! ()).WrongType() {}
|
||||
// CHECK:STDOUT: %A.type: type = generic_class_type @A [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %A.1: %A.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %A.2: type = class_type @A, file.%A.decl(%T) [symbolic]
|
||||
// CHECK:STDOUT: %A.2: type = class_type @A, @A(%T) [symbolic]
|
||||
// CHECK:STDOUT: %N: %T = bind_symbolic_name N 1 [symbolic]
|
||||
// CHECK:STDOUT: %B.type: type = generic_class_type @B [template]
|
||||
// CHECK:STDOUT: %B.1: %B.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %B.2: type = class_type @B, @A.%B.decl(%T, %N) [symbolic]
|
||||
// CHECK:STDOUT: %B.2: type = class_type @B, @B(%T, %N) [symbolic]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.2: type = struct_type {} [template]
|
||||
@@ -267,7 +285,7 @@ fn Generic(T:! ()).WrongType() {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %A.decl: %A.type = class_decl @A [template = constants.%A.1] {
|
||||
// CHECK:STDOUT: %T.loc4_9.1: type = param T
|
||||
// CHECK:STDOUT: %T.loc4_9.2: type = bind_symbolic_name T 0, %T.loc4_9.1 [symbolic = %T.loc4_9.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.loc4_9.2: type = bind_symbolic_name T 0, %T.loc4_9.1 [symbolic = @A.%T (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
|
||||
// CHECK:STDOUT: %T.loc10_6.1: type = param T
|
||||
@@ -275,7 +293,7 @@ fn Generic(T:! ()).WrongType() {}
|
||||
// CHECK:STDOUT: %T.ref.loc10_22: type = name_ref T, %T.loc10_6.2 [symbolic = constants.%T]
|
||||
// CHECK:STDOUT: %N.loc10_18.1: %T = param N
|
||||
// CHECK:STDOUT: %N.loc10_18.2: %T = bind_symbolic_name N 1, %N.loc10_18.1 [symbolic = constants.%N]
|
||||
// CHECK:STDOUT: %.loc10: type = specific_constant constants.%B.2, @A.%B.decl(constants.%T, constants.%N) [symbolic = constants.%B.2]
|
||||
// CHECK:STDOUT: %.loc10: type = specific_constant constants.%B.2, @B(constants.%T, constants.%N) [symbolic = constants.%B.2]
|
||||
// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc10 [symbolic = constants.%B.2]
|
||||
// CHECK:STDOUT: %self.loc10_27.1: %B.2 = param self
|
||||
// CHECK:STDOUT: @F.%self: %B.2 = bind_name self, %self.loc10_27.1
|
||||
@@ -285,61 +303,82 @@ fn Generic(T:! ()).WrongType() {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @A
|
||||
// CHECK:STDOUT: generic [file.%T.loc4_9.2: type] {
|
||||
// CHECK:STDOUT: %B.decl: %B.type = class_decl @B [template = constants.%B.1] {
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, file.%T.loc4_9.2 [symbolic = %T.ref (constants.%T)]
|
||||
// CHECK:STDOUT: %N.loc5_11.1: @A.%T.ref (%T) = param N
|
||||
// CHECK:STDOUT: %N.loc5_11.2: @A.%T.ref (%T) = bind_symbolic_name N 1, %N.loc5_11.1 [symbolic = %N.loc5_11.2 (constants.%N)]
|
||||
// CHECK:STDOUT: generic class @A(file.%T.loc4_9.2: type) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class {
|
||||
// CHECK:STDOUT: %B.decl: %B.type = class_decl @B [template = constants.%B.1] {
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, file.%T.loc4_9.2 [symbolic = @B.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %N.loc5_11.1: @B.%T (%T) = param N
|
||||
// CHECK:STDOUT: %N.loc5_11.2: @B.%T (%T) = bind_symbolic_name N 1, %N.loc5_11.1 [symbolic = @B.%N (constants.%N)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%A.2
|
||||
// CHECK:STDOUT: .B = %B.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%A.2
|
||||
// CHECK:STDOUT: .B = %B.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @B
|
||||
// CHECK:STDOUT: generic [file.%T.loc4_9.2: type, @A.%N.loc5_11.2: @A.%T.ref (%T)] {
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
|
||||
// CHECK:STDOUT: %.loc6: type = specific_constant constants.%B.2, @A.%B.decl(constants.%T, constants.%N) [symbolic = %.loc6 (constants.%B.2)]
|
||||
// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc6 [symbolic = %.loc6 (constants.%B.2)]
|
||||
// CHECK:STDOUT: %self.loc6_10.1: @B.%.loc6 (%B.2) = param self
|
||||
// CHECK:STDOUT: %self.loc6_10.2: @B.%.loc6 (%B.2) = bind_name self, %self.loc6_10.1
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, file.%T.loc4_9.2 [symbolic = %T.ref (constants.%T)]
|
||||
// CHECK:STDOUT: %a.loc6_22.1: @B.%T.ref (%T) = param a
|
||||
// CHECK:STDOUT: %a.loc6_22.2: @B.%T.ref (%T) = bind_name a, %a.loc6_22.1
|
||||
// CHECK:STDOUT: generic class @B(file.%T.loc4_9.2: type, @A.%N.loc5_11.2: @B.%T (%T)) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT: %N: %T = bind_symbolic_name N 1 [symbolic = %N (constants.%N)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class {
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
|
||||
// CHECK:STDOUT: %.loc6: type = specific_constant constants.%B.2, @B(constants.%T, constants.%N) [symbolic = @F.%B (constants.%B.2)]
|
||||
// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc6 [symbolic = @F.%B (constants.%B.2)]
|
||||
// CHECK:STDOUT: %self.loc6_10.1: @F.%B (%B.2) = param self
|
||||
// CHECK:STDOUT: %self.loc6_10.2: @F.%B (%B.2) = bind_name self, %self.loc6_10.1
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, file.%T.loc4_9.2 [symbolic = @F.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %a.loc6_22.1: @F.%T (%T) = param a
|
||||
// CHECK:STDOUT: %a.loc6_22.2: @F.%T (%T) = bind_name a, %a.loc6_22.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%B.2
|
||||
// CHECK:STDOUT: .F = %F.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%B.2
|
||||
// CHECK:STDOUT: .F = %F.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F[%self: %B.2](%a: %T)
|
||||
// CHECK:STDOUT: generic [file.%T.loc4_9.2: type, @A.%N.loc5_11.2: @A.%T.ref (%T)] {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: generic fn @F(file.%T.loc4_9.2: type, @A.%N.loc5_11.2: @B.%T (%T)) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT: %N: %T = bind_symbolic_name N 1 [symbolic = %N (constants.%N)]
|
||||
// CHECK:STDOUT: %B: type = class_type @B, @B(%T, %N) [symbolic = %B (constants.%B.2)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn[%self: %B.2](%a: %T) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%A.decl(constants.%T) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc4_9.2 => constants.%T
|
||||
// CHECK:STDOUT: specific @A(constants.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: definition:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @A.%B.decl(constants.%T, constants.%N) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: @A.%T.ref => constants.%T
|
||||
// CHECK:STDOUT: @A.%N.loc5_11.2 => constants.%N
|
||||
// CHECK:STDOUT: specific @B(constants.%T, constants.%N) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: %N => constants.%N
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: definition:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @B.%F.decl(constants.%T, constants.%N) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: @B.%.loc6 => constants.%B.2
|
||||
// CHECK:STDOUT: @B.%T.ref => constants.%T
|
||||
// CHECK:STDOUT: specific @B(@F.%T, @F.%N) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: %N => constants.%N
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @F(constants.%T, constants.%N) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: %N => constants.%N
|
||||
// CHECK:STDOUT: %B => constants.%B.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_mismatched_not_generic_vs_generic.carbon
|
||||
@@ -373,7 +412,7 @@ fn Generic(T:! ()).WrongType() {}
|
||||
// CHECK:STDOUT: %NotGeneric.decl: type = class_decl @NotGeneric [template = constants.%NotGeneric] {}
|
||||
// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] {
|
||||
// CHECK:STDOUT: %T.loc15_15.1: type = param T
|
||||
// CHECK:STDOUT: %T.loc15_15.2: type = bind_symbolic_name T 0, %T.loc15_15.1 [symbolic = %T.loc15_15.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.loc15_15.2: type = bind_symbolic_name T 0, %T.loc15_15.1 [symbolic = @.1.%T (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -387,15 +426,19 @@ fn Generic(T:! ()).WrongType() {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F();
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @.1()
|
||||
// CHECK:STDOUT: generic [file.%T.loc15_15.2: type] {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: generic fn @.1(file.%T.loc15_15.2: type) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%.decl(constants.%T) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc15_15.2 => constants.%T
|
||||
// CHECK:STDOUT: specific @.1(constants.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_mismatched_too_few_args.carbon
|
||||
@@ -405,7 +448,7 @@ fn Generic(T:! ()).WrongType() {}
|
||||
// CHECK:STDOUT: %Generic.type: type = generic_class_type @Generic [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %Generic.1: %Generic.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Generic.2: type = class_type @Generic, file.%Generic.decl(%T) [symbolic]
|
||||
// CHECK:STDOUT: %Generic.2: type = class_type @Generic, @Generic(%T) [symbolic]
|
||||
// CHECK:STDOUT: %TooFew.type: type = fn_type @TooFew [template]
|
||||
// CHECK:STDOUT: %TooFew: %TooFew.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.2: type = struct_type {} [template]
|
||||
@@ -430,36 +473,40 @@ fn Generic(T:! ()).WrongType() {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Generic.decl: %Generic.type = class_decl @Generic [template = constants.%Generic.1] {
|
||||
// CHECK:STDOUT: %T.loc4_15.1: type = param T
|
||||
// CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T 0, %T.loc4_15.1 [symbolic = %T.loc4_15.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T 0, %T.loc4_15.1 [symbolic = @Generic.%T (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @Generic
|
||||
// CHECK:STDOUT: generic [file.%T.loc4_15.2: type] {
|
||||
// CHECK:STDOUT: %TooFew.decl: %TooFew.type = fn_decl @TooFew [template = constants.%TooFew] {}
|
||||
// CHECK:STDOUT: generic class @Generic(file.%T.loc4_15.2: type) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%Generic.2
|
||||
// CHECK:STDOUT: .TooFew = %TooFew.decl
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class {
|
||||
// CHECK:STDOUT: %TooFew.decl: %TooFew.type = fn_decl @TooFew [template = constants.%TooFew] {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%Generic.2
|
||||
// CHECK:STDOUT: .TooFew = %TooFew.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @TooFew()
|
||||
// CHECK:STDOUT: generic [file.%T.loc4_15.2: type];
|
||||
// CHECK:STDOUT: generic fn @TooFew(file.%T.loc4_15.2: type) {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn();
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @.1() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%Generic.decl(constants.%T) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc4_15.2 => constants.%T
|
||||
// CHECK:STDOUT: specific @Generic(constants.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Generic.%TooFew.decl(constants.%T) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: specific @TooFew(constants.%T) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_mismatched_too_many_args.carbon
|
||||
// CHECK:STDOUT:
|
||||
@@ -468,7 +515,7 @@ fn Generic(T:! ()).WrongType() {}
|
||||
// CHECK:STDOUT: %Generic.type: type = generic_class_type @Generic [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %Generic.1: %Generic.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Generic.2: type = class_type @Generic, file.%Generic.decl(%T) [symbolic]
|
||||
// CHECK:STDOUT: %Generic.2: type = class_type @Generic, @Generic(%T) [symbolic]
|
||||
// CHECK:STDOUT: %TooMany.type: type = fn_type @TooMany [template]
|
||||
// CHECK:STDOUT: %TooMany: %TooMany.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.2: type = struct_type {} [template]
|
||||
@@ -494,47 +541,56 @@ fn Generic(T:! ()).WrongType() {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Generic.decl: %Generic.type = class_decl @Generic [template = constants.%Generic.1] {
|
||||
// CHECK:STDOUT: %T.loc4_15.1: type = param T
|
||||
// CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T 0, %T.loc4_15.1 [symbolic = %T.loc4_15.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T 0, %T.loc4_15.1 [symbolic = @Generic.%T (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] {
|
||||
// CHECK:STDOUT: %T.loc15_12.1: type = param T
|
||||
// CHECK:STDOUT: %T.loc15_12.2: type = bind_symbolic_name T 0, %T.loc15_12.1 [symbolic = %T.loc15_12.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.loc15_12.2: type = bind_symbolic_name T 0, %T.loc15_12.1 [symbolic = @.1.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %U.loc15_22.1: type = param U
|
||||
// CHECK:STDOUT: %U.loc15_22.2: type = bind_symbolic_name U 1, %U.loc15_22.1 [symbolic = %U.loc15_22.2 (constants.%U)]
|
||||
// CHECK:STDOUT: %U.loc15_22.2: type = bind_symbolic_name U 1, %U.loc15_22.1 [symbolic = @.1.%U (constants.%U)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @Generic
|
||||
// CHECK:STDOUT: generic [file.%T.loc4_15.2: type] {
|
||||
// CHECK:STDOUT: %TooMany.decl: %TooMany.type = fn_decl @TooMany [template = constants.%TooMany] {}
|
||||
// CHECK:STDOUT: generic class @Generic(file.%T.loc4_15.2: type) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%Generic.2
|
||||
// CHECK:STDOUT: .TooMany = %TooMany.decl
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class {
|
||||
// CHECK:STDOUT: %TooMany.decl: %TooMany.type = fn_decl @TooMany [template = constants.%TooMany] {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%Generic.2
|
||||
// CHECK:STDOUT: .TooMany = %TooMany.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @TooMany()
|
||||
// CHECK:STDOUT: generic [file.%T.loc4_15.2: type];
|
||||
// CHECK:STDOUT: generic fn @TooMany(file.%T.loc4_15.2: type) {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @.1()
|
||||
// CHECK:STDOUT: generic [file.%T.loc15_12.2: type, file.%U.loc15_22.2: type] {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: fn();
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%Generic.decl(constants.%T) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc4_15.2 => constants.%T
|
||||
// CHECK:STDOUT: generic fn @.1(file.%T.loc15_12.2: type, file.%U.loc15_22.2: type) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT: %U: type = bind_symbolic_name U 1 [symbolic = %U (constants.%U)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Generic.%TooMany.decl(constants.%T) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: specific @Generic(constants.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%.decl(constants.%T, constants.%U) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc15_12.2 => constants.%T
|
||||
// CHECK:STDOUT: file.%U.loc15_22.2 => constants.%U
|
||||
// CHECK:STDOUT: specific @TooMany(constants.%T) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @.1(constants.%T, constants.%U) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: %U => constants.%U
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_mismatched_wrong_arg_type.carbon
|
||||
@@ -544,7 +600,7 @@ fn Generic(T:! ()).WrongType() {}
|
||||
// CHECK:STDOUT: %Generic.type: type = generic_class_type @Generic [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %Generic.1: %Generic.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Generic.2: type = class_type @Generic, file.%Generic.decl(%T.1) [symbolic]
|
||||
// CHECK:STDOUT: %Generic.2: type = class_type @Generic, @Generic(%T.1) [symbolic]
|
||||
// CHECK:STDOUT: %WrongType.type: type = fn_type @WrongType [template]
|
||||
// CHECK:STDOUT: %WrongType: %WrongType.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.2: type = struct_type {} [template]
|
||||
@@ -570,45 +626,53 @@ fn Generic(T:! ()).WrongType() {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Generic.decl: %Generic.type = class_decl @Generic [template = constants.%Generic.1] {
|
||||
// CHECK:STDOUT: %T.loc4_15.1: type = param T
|
||||
// CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T 0, %T.loc4_15.1 [symbolic = %T.loc4_15.2 (constants.%T.1)]
|
||||
// CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T 0, %T.loc4_15.1 [symbolic = @Generic.%T (constants.%T.1)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] {
|
||||
// CHECK:STDOUT: %.loc14_17.1: %.1 = tuple_literal ()
|
||||
// CHECK:STDOUT: %.loc14_17.2: type = converted %.loc14_17.1, constants.%.1 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %T.loc14_12.1: %.1 = param T
|
||||
// CHECK:STDOUT: %T.loc14_12.2: %.1 = bind_symbolic_name T 0, %T.loc14_12.1 [symbolic = %T.loc14_12.2 (constants.%T.2)]
|
||||
// CHECK:STDOUT: %T.loc14_12.2: %.1 = bind_symbolic_name T 0, %T.loc14_12.1 [symbolic = @.1.%T (constants.%T.2)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @Generic
|
||||
// CHECK:STDOUT: generic [file.%T.loc4_15.2: type] {
|
||||
// CHECK:STDOUT: %WrongType.decl: %WrongType.type = fn_decl @WrongType [template = constants.%WrongType] {}
|
||||
// CHECK:STDOUT: generic class @Generic(file.%T.loc4_15.2: type) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T.1)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%Generic.2
|
||||
// CHECK:STDOUT: .WrongType = %WrongType.decl
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class {
|
||||
// CHECK:STDOUT: %WrongType.decl: %WrongType.type = fn_decl @WrongType [template = constants.%WrongType] {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%Generic.2
|
||||
// CHECK:STDOUT: .WrongType = %WrongType.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @WrongType()
|
||||
// CHECK:STDOUT: generic [file.%T.loc4_15.2: type];
|
||||
// CHECK:STDOUT: generic fn @WrongType(file.%T.loc4_15.2: type) {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @.1()
|
||||
// CHECK:STDOUT: generic [file.%T.loc14_12.2: %.1] {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: fn();
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%Generic.decl(constants.%T.1) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc4_15.2 => constants.%T.1
|
||||
// CHECK:STDOUT: generic fn @.1(file.%T.loc14_12.2: %.1) {
|
||||
// CHECK:STDOUT: %T: %.1 = bind_symbolic_name T 0 [symbolic = %T (constants.%T.2)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Generic.%WrongType.decl(constants.%T.1) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: specific @Generic(constants.%T.1) {
|
||||
// CHECK:STDOUT: %T => constants.%T.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%.decl(constants.%T.2) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc14_12.2 => constants.%T.2
|
||||
// CHECK:STDOUT: specific @WrongType(constants.%T.1) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @.1(constants.%T.2) {
|
||||
// CHECK:STDOUT: %T => constants.%T.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+122
-88
@@ -93,7 +93,7 @@ class E(U:! type) {}
|
||||
// CHECK:STDOUT: %Generic.type: type = generic_class_type @Generic [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %Generic.1: %Generic.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Generic.2: type = class_type @Generic, file.%Generic.decl.loc4(%T) [symbolic]
|
||||
// CHECK:STDOUT: %Generic.2: type = class_type @Generic, @Generic(%T) [symbolic]
|
||||
// CHECK:STDOUT: %.2: type = struct_type {} [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -114,7 +114,7 @@ class E(U:! type) {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Generic.decl.loc4: %Generic.type = class_decl @Generic [template = constants.%Generic.1] {
|
||||
// CHECK:STDOUT: %T.loc4_15.1: type = param T
|
||||
// CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T 0, %T.loc4_15.1 [symbolic = %T.loc4_15.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T 0, %T.loc4_15.1 [symbolic = @Generic.%T (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Generic.decl.loc6: %Generic.type = class_decl @Generic [template = constants.%Generic.1] {
|
||||
// CHECK:STDOUT: %T.loc6_15.1: type = param T
|
||||
@@ -122,15 +122,19 @@ class E(U:! type) {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @Generic
|
||||
// CHECK:STDOUT: generic [file.%T.loc4_15.2: type] {
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%Generic.2
|
||||
// CHECK:STDOUT: generic class @Generic(file.%T.loc4_15.2: type) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class {
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%Generic.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%Generic.decl.loc4(constants.%T) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc4_15.2 => constants.%T
|
||||
// CHECK:STDOUT: specific @Generic(constants.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_mismatch_param_list.carbon
|
||||
@@ -141,7 +145,7 @@ class E(U:! type) {}
|
||||
// CHECK:STDOUT: %.type: type = generic_class_type @.1 [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %.2: %.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.3: type = class_type @.1, file.%.decl(%T) [symbolic]
|
||||
// CHECK:STDOUT: %.3: type = class_type @.1, @.1(%T) [symbolic]
|
||||
// CHECK:STDOUT: %.4: type = struct_type {} [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -163,21 +167,25 @@ class E(U:! type) {}
|
||||
// CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {}
|
||||
// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.2] {
|
||||
// CHECK:STDOUT: %T.loc12_9.1: type = param T
|
||||
// CHECK:STDOUT: %T.loc12_9.2: type = bind_symbolic_name T 0, %T.loc12_9.1 [symbolic = %T.loc12_9.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.loc12_9.2: type = bind_symbolic_name T 0, %T.loc12_9.1 [symbolic = @.1.%T (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @A;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @.1
|
||||
// CHECK:STDOUT: generic [file.%T.loc12_9.2: type] {
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%.3
|
||||
// CHECK:STDOUT: generic class @.1(file.%T.loc12_9.2: type) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class {
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%.3
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%.decl(constants.%T) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc12_9.2 => constants.%T
|
||||
// CHECK:STDOUT: specific @.1(constants.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_mismatch_implicit_param_list.carbon
|
||||
@@ -189,12 +197,12 @@ class E(U:! type) {}
|
||||
// CHECK:STDOUT: %N.1: i32 = bind_symbolic_name N 0 [symbolic]
|
||||
// CHECK:STDOUT: %B.type: type = generic_class_type @B [template]
|
||||
// CHECK:STDOUT: %B.1: %B.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %B.2: type = class_type @B, file.%B.decl(%N.1) [symbolic]
|
||||
// CHECK:STDOUT: %B.2: type = class_type @B, @B(%N.1) [symbolic]
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic]
|
||||
// CHECK:STDOUT: %N.2: %T = bind_symbolic_name N 1 [symbolic]
|
||||
// CHECK:STDOUT: %.type: type = generic_class_type @.1 [template]
|
||||
// CHECK:STDOUT: %.2: %.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.3: type = class_type @.1, file.%.decl(%T, %N.2) [symbolic]
|
||||
// CHECK:STDOUT: %.3: type = class_type @.1, @.1(%T, %N.2) [symbolic]
|
||||
// CHECK:STDOUT: %.4: type = struct_type {} [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -222,37 +230,44 @@ class E(U:! type) {}
|
||||
// CHECK:STDOUT: %.loc4_13.1: type = value_of_initializer %int.make_type_32 [template = i32]
|
||||
// CHECK:STDOUT: %.loc4_13.2: type = converted %int.make_type_32, %.loc4_13.1 [template = i32]
|
||||
// CHECK:STDOUT: %N.loc4_9.1: i32 = param N
|
||||
// CHECK:STDOUT: %N.loc4_9.2: i32 = bind_symbolic_name N 0, %N.loc4_9.1 [symbolic = %N.loc4_9.2 (constants.%N.1)]
|
||||
// CHECK:STDOUT: %N.loc4_9.2: i32 = bind_symbolic_name N 0, %N.loc4_9.1 [symbolic = @B.%N (constants.%N.1)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.2] {
|
||||
// CHECK:STDOUT: %T.loc12_9.1: type = param T
|
||||
// CHECK:STDOUT: %T.loc12_9.2: type = bind_symbolic_name T 0, %T.loc12_9.1 [symbolic = %T.loc12_9.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc12_9.2 [symbolic = %T.loc12_9.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %N.loc12_19.1: file.%T.loc12_9.2 (%T) = param N
|
||||
// CHECK:STDOUT: %N.loc12_19.2: file.%T.loc12_9.2 (%T) = bind_symbolic_name N 1, %N.loc12_19.1 [symbolic = %N.loc12_19.2 (constants.%N.2)]
|
||||
// CHECK:STDOUT: %T.loc12_9.2: type = bind_symbolic_name T 0, %T.loc12_9.1 [symbolic = @.1.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc12_9.2 [symbolic = @.1.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %N.loc12_19.1: @.1.%T (%T) = param N
|
||||
// CHECK:STDOUT: %N.loc12_19.2: @.1.%T (%T) = bind_symbolic_name N 1, %N.loc12_19.1 [symbolic = @.1.%N (constants.%N.2)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @B
|
||||
// CHECK:STDOUT: generic [file.%N.loc4_9.2: i32];
|
||||
// CHECK:STDOUT: generic class @B(file.%N.loc4_9.2: i32) {
|
||||
// CHECK:STDOUT: %N: i32 = bind_symbolic_name N 0 [symbolic = %N (constants.%N.1)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @.1
|
||||
// CHECK:STDOUT: generic [file.%T.loc12_9.2: type, file.%N.loc12_19.2: file.%T.loc12_9.2 (%T)] {
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%.3
|
||||
// CHECK:STDOUT: class;
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic class @.1(file.%T.loc12_9.2: type, file.%N.loc12_19.2: @.1.%T (%T)) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT: %N: %T = bind_symbolic_name N 1 [symbolic = %N (constants.%N.2)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class {
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%.3
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%B.decl(constants.%N.1) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%N.loc4_9.2 => constants.%N.1
|
||||
// CHECK:STDOUT: specific @B(constants.%N.1) {
|
||||
// CHECK:STDOUT: %N => constants.%N.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%.decl(constants.%T, constants.%N.2) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc12_9.2 => constants.%T
|
||||
// CHECK:STDOUT: file.%N.loc12_19.2 => constants.%N.2
|
||||
// CHECK:STDOUT: specific @.1(constants.%T, constants.%N.2) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: %N => constants.%N.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_mismatch_param_count.carbon
|
||||
@@ -262,13 +277,13 @@ class E(U:! type) {}
|
||||
// CHECK:STDOUT: %C.type: type = generic_class_type @C [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %C.1: %C.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %C.2: type = class_type @C, file.%C.decl(%T) [symbolic]
|
||||
// CHECK:STDOUT: %C.2: type = class_type @C, @C(%T) [symbolic]
|
||||
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
|
||||
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %U: i32 = bind_symbolic_name U 1 [symbolic]
|
||||
// CHECK:STDOUT: %.type: type = generic_class_type @.1 [template]
|
||||
// CHECK:STDOUT: %.2: %.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.3: type = class_type @.1, file.%.decl(%T, %U) [symbolic]
|
||||
// CHECK:STDOUT: %.3: type = class_type @.1, @.1(%T, %U) [symbolic]
|
||||
// CHECK:STDOUT: %.4: type = struct_type {} [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -293,39 +308,46 @@ class E(U:! type) {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.1] {
|
||||
// CHECK:STDOUT: %T.loc4_9.1: type = param T
|
||||
// CHECK:STDOUT: %T.loc4_9.2: type = bind_symbolic_name T 0, %T.loc4_9.1 [symbolic = %T.loc4_9.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.loc4_9.2: type = bind_symbolic_name T 0, %T.loc4_9.1 [symbolic = @C.%T (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.2] {
|
||||
// CHECK:STDOUT: %T.loc12_9.1: type = param T
|
||||
// CHECK:STDOUT: %T.loc12_9.2: type = bind_symbolic_name T 0, %T.loc12_9.1 [symbolic = %T.loc12_9.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.loc12_9.2: type = bind_symbolic_name T 0, %T.loc12_9.1 [symbolic = @.1.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc12_23.1: type = value_of_initializer %int.make_type_32 [template = i32]
|
||||
// CHECK:STDOUT: %.loc12_23.2: type = converted %int.make_type_32, %.loc12_23.1 [template = i32]
|
||||
// CHECK:STDOUT: %U.loc12_19.1: i32 = param U
|
||||
// CHECK:STDOUT: %U.loc12_19.2: i32 = bind_symbolic_name U 1, %U.loc12_19.1 [symbolic = %U.loc12_19.2 (constants.%U)]
|
||||
// CHECK:STDOUT: %U.loc12_19.2: i32 = bind_symbolic_name U 1, %U.loc12_19.1 [symbolic = @.1.%U (constants.%U)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @C
|
||||
// CHECK:STDOUT: generic [file.%T.loc4_9.2: type];
|
||||
// CHECK:STDOUT: generic class @C(file.%T.loc4_9.2: type) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @.1
|
||||
// CHECK:STDOUT: generic [file.%T.loc12_9.2: type, file.%U.loc12_19.2: i32] {
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%.3
|
||||
// CHECK:STDOUT: class;
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic class @.1(file.%T.loc12_9.2: type, file.%U.loc12_19.2: i32) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT: %U: i32 = bind_symbolic_name U 1 [symbolic = %U (constants.%U)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class {
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%.3
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%C.decl(constants.%T) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc4_9.2 => constants.%T
|
||||
// CHECK:STDOUT: specific @C(constants.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%.decl(constants.%T, constants.%U) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc12_9.2 => constants.%T
|
||||
// CHECK:STDOUT: file.%U.loc12_19.2 => constants.%U
|
||||
// CHECK:STDOUT: specific @.1(constants.%T, constants.%U) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: %U => constants.%U
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_mismatch_param_type.carbon
|
||||
@@ -335,13 +357,13 @@ class E(U:! type) {}
|
||||
// CHECK:STDOUT: %D.type: type = generic_class_type @D [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %D.1: %D.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %D.2: type = class_type @D, file.%D.decl(%T.1) [symbolic]
|
||||
// CHECK:STDOUT: %D.2: type = class_type @D, @D(%T.1) [symbolic]
|
||||
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
|
||||
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %T.2: i32 = bind_symbolic_name T 0 [symbolic]
|
||||
// CHECK:STDOUT: %.type: type = generic_class_type @.1 [template]
|
||||
// CHECK:STDOUT: %.2: %.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.3: type = class_type @.1, file.%.decl(%T.2) [symbolic]
|
||||
// CHECK:STDOUT: %.3: type = class_type @.1, @.1(%T.2) [symbolic]
|
||||
// CHECK:STDOUT: %.4: type = struct_type {} [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -366,36 +388,42 @@ class E(U:! type) {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %D.decl: %D.type = class_decl @D [template = constants.%D.1] {
|
||||
// CHECK:STDOUT: %T.loc4_9.1: type = param T
|
||||
// CHECK:STDOUT: %T.loc4_9.2: type = bind_symbolic_name T 0, %T.loc4_9.1 [symbolic = %T.loc4_9.2 (constants.%T.1)]
|
||||
// CHECK:STDOUT: %T.loc4_9.2: type = bind_symbolic_name T 0, %T.loc4_9.1 [symbolic = @D.%T (constants.%T.1)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.2] {
|
||||
// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc12_13.1: type = value_of_initializer %int.make_type_32 [template = i32]
|
||||
// CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_32, %.loc12_13.1 [template = i32]
|
||||
// CHECK:STDOUT: %T.loc12_9.1: i32 = param T
|
||||
// CHECK:STDOUT: %T.loc12_9.2: i32 = bind_symbolic_name T 0, %T.loc12_9.1 [symbolic = %T.loc12_9.2 (constants.%T.2)]
|
||||
// CHECK:STDOUT: %T.loc12_9.2: i32 = bind_symbolic_name T 0, %T.loc12_9.1 [symbolic = @.1.%T (constants.%T.2)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @D
|
||||
// CHECK:STDOUT: generic [file.%T.loc4_9.2: type];
|
||||
// CHECK:STDOUT: generic class @D(file.%T.loc4_9.2: type) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T.1)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @.1
|
||||
// CHECK:STDOUT: generic [file.%T.loc12_9.2: i32] {
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%.3
|
||||
// CHECK:STDOUT: class;
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic class @.1(file.%T.loc12_9.2: i32) {
|
||||
// CHECK:STDOUT: %T: i32 = bind_symbolic_name T 0 [symbolic = %T (constants.%T.2)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class {
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%.3
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%D.decl(constants.%T.1) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc4_9.2 => constants.%T.1
|
||||
// CHECK:STDOUT: specific @D(constants.%T.1) {
|
||||
// CHECK:STDOUT: %T => constants.%T.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%.decl(constants.%T.2) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc12_9.2 => constants.%T.2
|
||||
// CHECK:STDOUT: specific @.1(constants.%T.2) {
|
||||
// CHECK:STDOUT: %T => constants.%T.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_mismatch_param_name.carbon
|
||||
@@ -405,11 +433,11 @@ class E(U:! type) {}
|
||||
// CHECK:STDOUT: %E.type: type = generic_class_type @E [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %E.1: %E.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %E.2: type = class_type @E, file.%E.decl(%T) [symbolic]
|
||||
// CHECK:STDOUT: %E.2: type = class_type @E, @E(%T) [symbolic]
|
||||
// CHECK:STDOUT: %U: type = bind_symbolic_name U 0 [symbolic]
|
||||
// CHECK:STDOUT: %.type: type = generic_class_type @.1 [template]
|
||||
// CHECK:STDOUT: %.2: %.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.3: type = class_type @.1, file.%.decl(%U) [symbolic]
|
||||
// CHECK:STDOUT: %.3: type = class_type @.1, @.1(%U) [symbolic]
|
||||
// CHECK:STDOUT: %.4: type = struct_type {} [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -430,30 +458,36 @@ class E(U:! type) {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %E.decl: %E.type = class_decl @E [template = constants.%E.1] {
|
||||
// CHECK:STDOUT: %T.loc4_9.1: type = param T
|
||||
// CHECK:STDOUT: %T.loc4_9.2: type = bind_symbolic_name T 0, %T.loc4_9.1 [symbolic = %T.loc4_9.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.loc4_9.2: type = bind_symbolic_name T 0, %T.loc4_9.1 [symbolic = @E.%T (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.2] {
|
||||
// CHECK:STDOUT: %U.loc11_9.1: type = param U
|
||||
// CHECK:STDOUT: %U.loc11_9.2: type = bind_symbolic_name U 0, %U.loc11_9.1 [symbolic = %U.loc11_9.2 (constants.%U)]
|
||||
// CHECK:STDOUT: %U.loc11_9.2: type = bind_symbolic_name U 0, %U.loc11_9.1 [symbolic = @.1.%U (constants.%U)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @E
|
||||
// CHECK:STDOUT: generic [file.%T.loc4_9.2: type];
|
||||
// CHECK:STDOUT: generic class @E(file.%T.loc4_9.2: type) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @.1
|
||||
// CHECK:STDOUT: generic [file.%U.loc11_9.2: type] {
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%.3
|
||||
// CHECK:STDOUT: class;
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%E.decl(constants.%T) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc4_9.2 => constants.%T
|
||||
// CHECK:STDOUT: generic class @.1(file.%U.loc11_9.2: type) {
|
||||
// CHECK:STDOUT: %U: type = bind_symbolic_name U 0 [symbolic = %U (constants.%U)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class {
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%.3
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%.decl(constants.%U) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%U.loc11_9.2 => constants.%U
|
||||
// CHECK:STDOUT: specific @E(constants.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @.1(constants.%U) {
|
||||
// CHECK:STDOUT: %U => constants.%U
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+89
-63
@@ -26,7 +26,7 @@ class Class(T:! type) {
|
||||
// CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Class.2: type = class_type @Class, file.%Class.decl(%T) [symbolic]
|
||||
// CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T) [symbolic]
|
||||
// CHECK:STDOUT: %MakeSelf.type: type = fn_type @MakeSelf [template]
|
||||
// CHECK:STDOUT: %MakeSelf: %MakeSelf.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %MakeClass.type: type = fn_type @MakeClass [template]
|
||||
@@ -54,84 +54,110 @@ class Class(T:! type) {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] {
|
||||
// CHECK:STDOUT: %T.loc11_13.1: type = param T
|
||||
// CHECK:STDOUT: %T.loc11_13.2: type = bind_symbolic_name T 0, %T.loc11_13.1 [symbolic = %T.loc11_13.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.loc11_13.2: type = bind_symbolic_name T 0, %T.loc11_13.1 [symbolic = @Class.%T (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @Class
|
||||
// CHECK:STDOUT: generic [file.%T.loc11_13.2: type] {
|
||||
// CHECK:STDOUT: %MakeSelf.decl: %MakeSelf.type = fn_decl @MakeSelf [template = constants.%MakeSelf] {
|
||||
// CHECK:STDOUT: %.loc14: type = specific_constant constants.%Class.2, file.%Class.decl(constants.%T) [symbolic = %.loc14 (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc14 [symbolic = %.loc14 (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %return.var.loc14: ref %Class.2 = var <return slot>
|
||||
// CHECK:STDOUT: generic class @Class(file.%T.loc11_13.2: type) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class {
|
||||
// CHECK:STDOUT: %MakeSelf.decl: %MakeSelf.type = fn_decl @MakeSelf [template = constants.%MakeSelf] {
|
||||
// CHECK:STDOUT: %.loc14: type = specific_constant constants.%Class.2, @Class(constants.%T) [symbolic = @MakeSelf.%Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc14 [symbolic = @MakeSelf.%Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %return.var.loc14: ref %Class.2 = var <return slot>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %MakeClass.decl: %MakeClass.type = fn_decl @MakeClass [template = constants.%MakeClass] {
|
||||
// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.1]
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, file.%T.loc11_13.2 [symbolic = @MakeClass.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %.loc15_26: init type = call %Class.ref(%T.ref) [symbolic = @MakeClass.%Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %.loc15_28.1: type = value_of_initializer %.loc15_26 [symbolic = @MakeClass.%Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %.loc15_28.2: type = converted %.loc15_26, %.loc15_28.1 [symbolic = @MakeClass.%Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %return.var.loc15: ref %Class.2 = var <return slot>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%Class.2
|
||||
// CHECK:STDOUT: .MakeSelf = %MakeSelf.decl
|
||||
// CHECK:STDOUT: .MakeClass = %MakeClass.decl
|
||||
// CHECK:STDOUT: .F = %F.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %MakeClass.decl: %MakeClass.type = fn_decl @MakeClass [template = constants.%MakeClass] {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @MakeSelf(file.%T.loc11_13.2: type) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn() -> %Class.2;
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @MakeClass(file.%T.loc11_13.2: type) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn() -> %Class.2;
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @F(file.%T.loc11_13.2: type) {
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.1]
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, file.%T.loc11_13.2 [symbolic = %T.ref (constants.%T)]
|
||||
// CHECK:STDOUT: %.loc15_26: init type = call %Class.ref(%T.ref) [symbolic = %.loc15_26 (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %.loc15_28.1: type = value_of_initializer %.loc15_26 [symbolic = %.loc15_26 (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %.loc15_28.2: type = converted %.loc15_26, %.loc15_28.1 [symbolic = %.loc15_26 (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %return.var.loc15: ref %Class.2 = var <return slot>
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, file.%T.loc11_13.2 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT: %.loc17_17: init type = call %Class.ref(%T.ref) [symbolic = %Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %.loc17_19.1: type = value_of_initializer %.loc17_17 [symbolic = %Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %.loc17_19.2: type = converted %.loc17_17, %.loc17_19.1 [symbolic = %Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %c.var: ref @F.%Class (%Class.2) = var c
|
||||
// CHECK:STDOUT: %c: ref @F.%Class (%Class.2) = bind_name c, %c.var
|
||||
// CHECK:STDOUT: %MakeSelf.ref: %MakeSelf.type = name_ref MakeSelf, @Class.%MakeSelf.decl [template = constants.%MakeSelf]
|
||||
// CHECK:STDOUT: %.loc17_9: ref @F.%Class (%Class.2) = splice_block %c.var {}
|
||||
// CHECK:STDOUT: %MakeSelf.call: init @F.%Class (%Class.2) = call %MakeSelf.ref() to %.loc17_9
|
||||
// CHECK:STDOUT: assign %c.var, %MakeSelf.call
|
||||
// CHECK:STDOUT: %.loc18_12: type = specific_constant constants.%Class.2, @Class(constants.%T) [symbolic = %Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc18_12 [symbolic = %Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %s.var: ref @F.%Class (%Class.2) = var s
|
||||
// CHECK:STDOUT: %s: ref @F.%Class (%Class.2) = bind_name s, %s.var
|
||||
// CHECK:STDOUT: %MakeClass.ref: %MakeClass.type = name_ref MakeClass, @Class.%MakeClass.decl [template = constants.%MakeClass]
|
||||
// CHECK:STDOUT: %.loc18_9: ref @F.%Class (%Class.2) = splice_block %s.var {}
|
||||
// CHECK:STDOUT: %MakeClass.call: init @F.%Class (%Class.2) = call %MakeClass.ref() to %.loc18_9
|
||||
// CHECK:STDOUT: assign %s.var, %MakeClass.call
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%Class.2
|
||||
// CHECK:STDOUT: .MakeSelf = %MakeSelf.decl
|
||||
// CHECK:STDOUT: .MakeClass = %MakeClass.decl
|
||||
// CHECK:STDOUT: .F = %F.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @MakeSelf() -> %Class.2
|
||||
// CHECK:STDOUT: generic [file.%T.loc11_13.2: type];
|
||||
// CHECK:STDOUT: specific @Class(constants.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @MakeClass() -> %Class.2
|
||||
// CHECK:STDOUT: generic [file.%T.loc11_13.2: type];
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F()
|
||||
// CHECK:STDOUT: generic [file.%T.loc11_13.2: type] {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.1]
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, file.%T.loc11_13.2 [symbolic = %T.ref (constants.%T)]
|
||||
// CHECK:STDOUT: %.loc17_17: init type = call %Class.ref(%T.ref) [symbolic = %.loc17_17 (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %.loc17_19.1: type = value_of_initializer %.loc17_17 [symbolic = %.loc17_17 (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %.loc17_19.2: type = converted %.loc17_17, %.loc17_19.1 [symbolic = %.loc17_17 (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %c.var: ref @F.%.loc17_17 (%Class.2) = var c
|
||||
// CHECK:STDOUT: %c: ref @F.%.loc17_17 (%Class.2) = bind_name c, %c.var
|
||||
// CHECK:STDOUT: %MakeSelf.ref: %MakeSelf.type = name_ref MakeSelf, @Class.%MakeSelf.decl [template = constants.%MakeSelf]
|
||||
// CHECK:STDOUT: %.loc17_9: ref @F.%.loc17_17 (%Class.2) = splice_block %c.var {}
|
||||
// CHECK:STDOUT: %MakeSelf.call: init @F.%.loc17_17 (%Class.2) = call %MakeSelf.ref() to %.loc17_9
|
||||
// CHECK:STDOUT: assign %c.var, %MakeSelf.call
|
||||
// CHECK:STDOUT: %.loc18_12: type = specific_constant constants.%Class.2, file.%Class.decl(constants.%T) [symbolic = %.loc17_17 (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc18_12 [symbolic = %.loc17_17 (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %s.var: ref @F.%.loc17_17 (%Class.2) = var s
|
||||
// CHECK:STDOUT: %s: ref @F.%.loc17_17 (%Class.2) = bind_name s, %s.var
|
||||
// CHECK:STDOUT: %MakeClass.ref: %MakeClass.type = name_ref MakeClass, @Class.%MakeClass.decl [template = constants.%MakeClass]
|
||||
// CHECK:STDOUT: %.loc18_9: ref @F.%.loc17_17 (%Class.2) = splice_block %s.var {}
|
||||
// CHECK:STDOUT: %MakeClass.call: init @F.%.loc17_17 (%Class.2) = call %MakeClass.ref() to %.loc18_9
|
||||
// CHECK:STDOUT: assign %s.var, %MakeClass.call
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%Class.decl(constants.%T) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc11_13.2 => constants.%T
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: definition:
|
||||
// CHECK:STDOUT: specific @Class(@MakeSelf.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Class.%MakeSelf.decl(constants.%T) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: @Class.%.loc14 => constants.%Class.2
|
||||
// CHECK:STDOUT: specific @MakeSelf(constants.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: %Class => constants.%Class.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Class.%MakeClass.decl(constants.%T) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: @Class.%T.ref => constants.%T
|
||||
// CHECK:STDOUT: @Class.%.loc15_26 => constants.%Class.2
|
||||
// CHECK:STDOUT: specific @Class(@MakeClass.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Class.%F.decl(constants.%T) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: specific @MakeClass(constants.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: %Class => constants.%Class.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @F(constants.%T) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Class(@F.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+51
-38
@@ -22,7 +22,7 @@ fn Class(T:! type).F[self: Self](n: T) {}
|
||||
// CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Class.2: type = class_type @Class, file.%Class.decl(%T) [symbolic]
|
||||
// CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T) [symbolic]
|
||||
// CHECK:STDOUT: %.2: type = unbound_element_type %Class.2, %T [symbolic]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
||||
@@ -47,12 +47,12 @@ fn Class(T:! type).F[self: Self](n: T) {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] {
|
||||
// CHECK:STDOUT: %T.loc11_13.1: type = param T
|
||||
// CHECK:STDOUT: %T.loc11_13.2: type = bind_symbolic_name T 0, %T.loc11_13.1 [symbolic = %T.loc11_13.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.loc11_13.2: type = bind_symbolic_name T 0, %T.loc11_13.1 [symbolic = @Class.%T (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
|
||||
// CHECK:STDOUT: %T.loc16_10.1: type = param T
|
||||
// CHECK:STDOUT: %T.loc16_10.2: type = bind_symbolic_name T 0, %T.loc16_10.1 [symbolic = constants.%T]
|
||||
// CHECK:STDOUT: %.loc16: type = specific_constant constants.%Class.2, %Class.decl(constants.%T) [symbolic = constants.%Class.2]
|
||||
// CHECK:STDOUT: %.loc16: type = specific_constant constants.%Class.2, @Class(constants.%T) [symbolic = constants.%Class.2]
|
||||
// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc16 [symbolic = constants.%Class.2]
|
||||
// CHECK:STDOUT: %self.loc16_22.1: %Class.2 = param self
|
||||
// CHECK:STDOUT: @F.%self: %Class.2 = bind_name self, %self.loc16_22.1
|
||||
@@ -62,50 +62,63 @@ fn Class(T:! type).F[self: Self](n: T) {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @Class
|
||||
// CHECK:STDOUT: generic [file.%T.loc11_13.2: type] {
|
||||
// CHECK:STDOUT: %T.ref.loc12: type = name_ref T, file.%T.loc11_13.2 [symbolic = file.%T.loc11_13.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %.loc12: <unexpected>.inst+28 (%.2) = field_decl a, element0 [template]
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
|
||||
// CHECK:STDOUT: %.loc13: type = specific_constant constants.%Class.2, file.%Class.decl(constants.%T) [symbolic = %.loc13 (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc13 [symbolic = %.loc13 (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %self.loc13_8.1: @Class.%.loc13 (%Class.2) = param self
|
||||
// CHECK:STDOUT: %self.loc13_8.2: @Class.%.loc13 (%Class.2) = bind_name self, %self.loc13_8.1
|
||||
// CHECK:STDOUT: %T.ref.loc13: type = name_ref T, file.%T.loc11_13.2 [symbolic = %T.ref.loc13 (constants.%T)]
|
||||
// CHECK:STDOUT: %n.loc13_20.1: @Class.%T.ref.loc13 (%T) = param n
|
||||
// CHECK:STDOUT: %n.loc13_20.2: @Class.%T.ref.loc13 (%T) = bind_name n, %n.loc13_20.1
|
||||
// CHECK:STDOUT: generic class @Class(file.%T.loc11_13.2: type) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %.1: type = unbound_element_type @Class.%Class (%Class.2), @Class.%T (%T) [symbolic = %.1 (constants.%.2)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class {
|
||||
// CHECK:STDOUT: %T.ref.loc12: type = name_ref T, file.%T.loc11_13.2 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT: %.loc12: @Class.%.1 (%.2) = field_decl a, element0 [template]
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
|
||||
// CHECK:STDOUT: %.loc13: type = specific_constant constants.%Class.2, @Class(constants.%T) [symbolic = @F.%Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc13 [symbolic = @F.%Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT: %self.loc13_8.1: @F.%Class (%Class.2) = param self
|
||||
// CHECK:STDOUT: %self.loc13_8.2: @F.%Class (%Class.2) = bind_name self, %self.loc13_8.1
|
||||
// CHECK:STDOUT: %T.ref.loc13: type = name_ref T, file.%T.loc11_13.2 [symbolic = @F.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %n.loc13_20.1: @F.%T (%T) = param n
|
||||
// CHECK:STDOUT: %n.loc13_20.2: @F.%T (%T) = bind_name n, %n.loc13_20.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%Class.2
|
||||
// CHECK:STDOUT: .a = %.loc12
|
||||
// CHECK:STDOUT: .F = %F.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%Class.2
|
||||
// CHECK:STDOUT: .a = %.loc12
|
||||
// CHECK:STDOUT: .F = %F.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F[%self: %Class.2](%n: %T)
|
||||
// CHECK:STDOUT: generic [file.%T.loc11_13.2: type] {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: generic fn @F(file.%T.loc11_13.2: type) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class.2)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn[%self: %Class.2](%n: %T) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%Class.decl(constants.%T) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc11_13.2 => constants.%T
|
||||
// CHECK:STDOUT: specific @Class(constants.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: definition:
|
||||
// CHECK:STDOUT: <unexpected>.inst+27 => constants.%Class.2
|
||||
// CHECK:STDOUT: <unexpected>.inst+28 => constants.%.2
|
||||
// CHECK:STDOUT: <unexpected>.inst+14.loc12_8 => <unexpected>.inst+15
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %Class => constants.%Class.2
|
||||
// CHECK:STDOUT: %.1 => constants.%.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Class.%F.decl(constants.%T) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: @Class.%.loc13 => constants.%Class.2
|
||||
// CHECK:STDOUT: @Class.%T.ref.loc13 => constants.%T
|
||||
// CHECK:STDOUT: specific @Class(@F.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific file.%Class.decl(file.%T.loc11_13.2) {
|
||||
// CHECK:STDOUT: declaration:
|
||||
// CHECK:STDOUT: file.%T.loc11_13.2 => constants.%T
|
||||
// CHECK:STDOUT: specific @F(constants.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: %Class => constants.%Class.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Class(@Class.%T) {
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -39,7 +39,7 @@ class D(b: C(1_000)) {}
|
||||
// CHECK:STDOUT: %C.2: type = class_type @C [template]
|
||||
// CHECK:STDOUT: %.2: type = struct_type {} [template]
|
||||
// CHECK:STDOUT: %.3: i32 = int_literal 1000 [template]
|
||||
// CHECK:STDOUT: %C.3: type = class_type @C, <invalid>(%.3) [template]
|
||||
// CHECK:STDOUT: %C.3: type = class_type @C, invalid(%.3) [template]
|
||||
// CHECK:STDOUT: %D.type: type = generic_class_type @D [template]
|
||||
// CHECK:STDOUT: %D.1: %D.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %D.2: type = class_type @D [template]
|
||||
@@ -104,7 +104,7 @@ class D(b: C(1_000)) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific <invalid>(constants.%.3);
|
||||
// CHECK:STDOUT: specific invalid(constants.%.3);
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_int_mismatch.carbon
|
||||
// CHECK:STDOUT:
|
||||
@@ -117,7 +117,7 @@ class D(b: C(1_000)) {}
|
||||
// CHECK:STDOUT: %C.2: type = class_type @C [template]
|
||||
// CHECK:STDOUT: %.2: type = struct_type {} [template]
|
||||
// CHECK:STDOUT: %.3: i32 = int_literal 1000 [template]
|
||||
// CHECK:STDOUT: %C.3: type = class_type @C, <invalid>(%.3) [template]
|
||||
// CHECK:STDOUT: %C.3: type = class_type @C, invalid(%.3) [template]
|
||||
// CHECK:STDOUT: %D.type: type = generic_class_type @D [template]
|
||||
// CHECK:STDOUT: %D.1: %D.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %D.2: type = class_type @D [template]
|
||||
@@ -187,5 +187,5 @@ class D(b: C(1_000)) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific <invalid>(constants.%.3);
|
||||
// CHECK:STDOUT: specific invalid(constants.%.3);
|
||||
// CHECK:STDOUT:
|
||||
|
||||
Reference in New Issue
Block a user