mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Add a location to indirect imports. (#4098)
By adding an `ImportDecl` instruction, this creates something that can be referenced through `ImportIRInst`. packages/no_prelude/implicit_imports_entities.carbon is getting a test of this (import_conflict and import_conflict_reverse). Also re-packs ImportIR from 24 bytes to 16 on 64-bit, since I'm touching everywhere that makes one anyways.
This commit is contained in:
+8
-7
@@ -75,17 +75,18 @@ fn InstanceCallIndirect(p: i32*) {
|
||||
// CHECK:STDOUT: .NonInstanceCallIndirect = %NonInstanceCallIndirect.decl
|
||||
// CHECK:STDOUT: .InstanceCallIndirect = %InstanceCallIndirect.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace %Core.import, [template] {}
|
||||
// CHECK:STDOUT: %Simple.decl: type = interface_decl @Simple [template = constants.%.1] {}
|
||||
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: impl_decl @impl {
|
||||
// CHECK:STDOUT: %int.make_type_32.loc16: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc16_6.1: type = value_of_initializer %int.make_type_32.loc16 [template = i32]
|
||||
// CHECK:STDOUT: %.loc16_6.2: type = converted %int.make_type_32.loc16, %.loc16_6.1 [template = i32]
|
||||
// CHECK:STDOUT: %Simple.ref: type = name_ref Simple, %Simple.decl [template = constants.%.1]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %NonInstanceCall.decl: %NonInstanceCall.type = fn_decl @NonInstanceCall [template = constants.%NonInstanceCall] {
|
||||
// CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc21_23.1: type = value_of_initializer %int.make_type_32.loc21 [template = i32]
|
||||
@@ -93,7 +94,7 @@ fn InstanceCallIndirect(p: i32*) {
|
||||
// CHECK:STDOUT: %n.loc21_20.1: i32 = param n
|
||||
// CHECK:STDOUT: @NonInstanceCall.%n: i32 = bind_name n, %n.loc21_20.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %InstanceCall.decl: %InstanceCall.type = fn_decl @InstanceCall [template = constants.%InstanceCall] {
|
||||
// CHECK:STDOUT: %int.make_type_32.loc25: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc25_20.1: type = value_of_initializer %int.make_type_32.loc25 [template = i32]
|
||||
@@ -101,7 +102,7 @@ fn InstanceCallIndirect(p: i32*) {
|
||||
// CHECK:STDOUT: %n.loc25_17.1: i32 = param n
|
||||
// CHECK:STDOUT: @InstanceCall.%n: i32 = bind_name n, %n.loc25_17.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %NonInstanceCallIndirect.decl: %NonInstanceCallIndirect.type = fn_decl @NonInstanceCallIndirect [template = constants.%NonInstanceCallIndirect] {
|
||||
// CHECK:STDOUT: %int.make_type_32.loc29: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc29_34.1: type = value_of_initializer %int.make_type_32.loc29 [template = i32]
|
||||
@@ -110,7 +111,7 @@ fn InstanceCallIndirect(p: i32*) {
|
||||
// CHECK:STDOUT: %p.loc29_28.1: %.8 = param p
|
||||
// CHECK:STDOUT: @NonInstanceCallIndirect.%p: %.8 = bind_name p, %p.loc29_28.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %InstanceCallIndirect.decl: %InstanceCallIndirect.type = fn_decl @InstanceCallIndirect [template = constants.%InstanceCallIndirect] {
|
||||
// CHECK:STDOUT: %int.make_type_32.loc33: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc33_31.1: type = value_of_initializer %int.make_type_32.loc33 [template = i32]
|
||||
|
||||
+3
-2
@@ -27,9 +27,10 @@ impl i32 as I;
|
||||
// CHECK:STDOUT: .Core = %Core
|
||||
// CHECK:STDOUT: .I = %I.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace %Core.import, [template] {}
|
||||
// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {}
|
||||
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: impl_decl @impl {
|
||||
// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc13_6.1: type = value_of_initializer %int.make_type_32 [template = i32]
|
||||
|
||||
+3
-2
@@ -30,9 +30,10 @@ impl i32 as Empty {
|
||||
// CHECK:STDOUT: .Core = %Core
|
||||
// CHECK:STDOUT: .Empty = %Empty.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace %Core.import, [template] {}
|
||||
// CHECK:STDOUT: %Empty.decl: type = interface_decl @Empty [template = constants.%.1] {}
|
||||
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: impl_decl @impl {
|
||||
// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc14_6.1: type = value_of_initializer %int.make_type_32 [template = i32]
|
||||
|
||||
+2
-1
@@ -50,7 +50,8 @@ fn G(c: C) {
|
||||
// CHECK:STDOUT: .C = %C.decl
|
||||
// CHECK:STDOUT: .G = %G.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace %Core.import, [template] {}
|
||||
// CHECK:STDOUT: %HasF.decl: type = interface_decl @HasF [template = constants.%.1] {}
|
||||
// CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {}
|
||||
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {
|
||||
|
||||
+4
-3
@@ -47,16 +47,17 @@ fn InstanceCall(n: i32) {
|
||||
// CHECK:STDOUT: .Simple = %Simple.decl
|
||||
// CHECK:STDOUT: .InstanceCall = %InstanceCall.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace %Core.import, [template] {}
|
||||
// CHECK:STDOUT: %Simple.decl: type = interface_decl @Simple [template = constants.%.1] {}
|
||||
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: impl_decl @impl {
|
||||
// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc15_6.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32]
|
||||
// CHECK:STDOUT: %.loc15_6.2: type = converted %int.make_type_32.loc15, %.loc15_6.1 [template = i32]
|
||||
// CHECK:STDOUT: %Simple.ref: type = name_ref Simple, %Simple.decl [template = constants.%.1]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %InstanceCall.decl: %InstanceCall.type = fn_decl @InstanceCall [template = constants.%InstanceCall] {
|
||||
// CHECK:STDOUT: %int.make_type_32.loc22: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc22_20.1: type = value_of_initializer %int.make_type_32.loc22 [template = i32]
|
||||
|
||||
@@ -47,7 +47,8 @@ class C {
|
||||
// CHECK:STDOUT: .GenericInterface = %GenericInterface.decl
|
||||
// CHECK:STDOUT: .C = %C.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace %Core.import, [template] {}
|
||||
// CHECK:STDOUT: %GenericInterface.decl: %GenericInterface.type = interface_decl @GenericInterface [template = constants.%GenericInterface] {
|
||||
// CHECK:STDOUT: %T.loc11_28.1: type = param T
|
||||
// CHECK:STDOUT: %T.loc11_28.2: type = bind_symbolic_name T 0, %T.loc11_28.1 [symbolic = constants.%T]
|
||||
|
||||
@@ -31,9 +31,10 @@ extend impl i32 as I {}
|
||||
// CHECK:STDOUT: .Core = %Core
|
||||
// CHECK:STDOUT: .I = %I.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace %Core.import, [template] {}
|
||||
// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {}
|
||||
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: impl_decl @impl {
|
||||
// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc16_13.1: type = value_of_initializer %int.make_type_32 [template = i32]
|
||||
|
||||
@@ -62,10 +62,11 @@ class E {
|
||||
// CHECK:STDOUT: .D = %D.decl
|
||||
// CHECK:STDOUT: .E = %E.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace %Core.import, [template] {}
|
||||
// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {}
|
||||
// CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {}
|
||||
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %D.decl: type = class_decl @D [template = constants.%D] {}
|
||||
// CHECK:STDOUT: %E.decl: type = class_decl @E [template = constants.%E] {}
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
@@ -30,9 +30,10 @@ class C {
|
||||
// CHECK:STDOUT: .Core = %Core
|
||||
// CHECK:STDOUT: .C = %C.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace %Core.import, [template] {}
|
||||
// CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {}
|
||||
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl @impl: %C as i32;
|
||||
|
||||
+2
-1
@@ -34,7 +34,8 @@ interface I {
|
||||
// CHECK:STDOUT: .Core = %Core
|
||||
// CHECK:STDOUT: .I = %I.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace %Core.import, [template] {}
|
||||
// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -34,7 +34,8 @@ class C {
|
||||
// CHECK:STDOUT: .I = %I.decl
|
||||
// CHECK:STDOUT: .C = %C.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace %Core.import, [template] {}
|
||||
// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {}
|
||||
// CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {}
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
+2
-1
@@ -39,7 +39,8 @@ impl as Simple {
|
||||
// CHECK:STDOUT: .Core = %Core
|
||||
// CHECK:STDOUT: .Simple = %Simple.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace %Core.import, [template] {}
|
||||
// CHECK:STDOUT: %Simple.decl: type = interface_decl @Simple [template = constants.%.1] {}
|
||||
// CHECK:STDOUT: impl_decl @impl {
|
||||
// CHECK:STDOUT: %Simple.ref: type = name_ref Simple, %Simple.decl [template = constants.%.1]
|
||||
|
||||
@@ -32,7 +32,8 @@ impl bool as I {}
|
||||
// CHECK:STDOUT: .Core = %Core
|
||||
// CHECK:STDOUT: .I = %I.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace %Core.import, [template] {}
|
||||
// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {}
|
||||
// CHECK:STDOUT: %import_ref: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool]
|
||||
// CHECK:STDOUT: impl_decl @impl {
|
||||
|
||||
@@ -323,7 +323,8 @@ class SelfNestedBadReturnType {
|
||||
// CHECK:STDOUT: .SelfNestedBadParam = %SelfNestedBadParam.decl
|
||||
// CHECK:STDOUT: .SelfNestedBadReturnType = %SelfNestedBadReturnType.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace %Core.import, [template] {}
|
||||
// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {}
|
||||
// CHECK:STDOUT: %NoF.decl: type = class_decl @NoF [template = constants.%NoF] {}
|
||||
// CHECK:STDOUT: %FNotFunction.decl: type = class_decl @FNotFunction [template = constants.%FNotFunction] {}
|
||||
@@ -361,12 +362,12 @@ class SelfNestedBadReturnType {
|
||||
// CHECK:STDOUT: %import_ref.19: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool]
|
||||
// CHECK:STDOUT: %import_ref.20: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool]
|
||||
// CHECK:STDOUT: %SelfNested.decl: type = interface_decl @SelfNested [template = constants.%.9] {}
|
||||
// CHECK:STDOUT: %import_ref.21: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.21: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %SelfNestedBadParam.decl: type = class_decl @SelfNestedBadParam [template = constants.%SelfNestedBadParam] {}
|
||||
// CHECK:STDOUT: %import_ref.22: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.23: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.22: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.23: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %SelfNestedBadReturnType.decl: type = class_decl @SelfNestedBadReturnType [template = constants.%SelfNestedBadReturnType] {}
|
||||
// CHECK:STDOUT: %import_ref.24: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.24: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface @I {
|
||||
|
||||
@@ -30,8 +30,9 @@ impl i32 as false {}
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
||||
// CHECK:STDOUT: .Core = %Core
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace %Core.import, [template] {}
|
||||
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: impl_decl @impl {
|
||||
// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc18_6.1: type = value_of_initializer %int.make_type_32 [template = i32]
|
||||
|
||||
+2
-1
@@ -29,7 +29,8 @@ impl true as I {}
|
||||
// CHECK:STDOUT: .Core = %Core
|
||||
// CHECK:STDOUT: .I = %I.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace %Core.import, [template] {}
|
||||
// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {}
|
||||
// CHECK:STDOUT: impl_decl @impl {
|
||||
// CHECK:STDOUT: %.loc16: bool = bool_literal true [template = constants.%.2]
|
||||
|
||||
+5
-4
@@ -36,16 +36,17 @@ impl i32 as I {}
|
||||
// CHECK:STDOUT: .Core = %Core
|
||||
// CHECK:STDOUT: .I = %I.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace %Core.import, [template] {}
|
||||
// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {}
|
||||
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: impl_decl @impl {
|
||||
// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc13_6.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32]
|
||||
// CHECK:STDOUT: %.loc13_6.2: type = converted %int.make_type_32.loc13, %.loc13_6.1 [template = i32]
|
||||
// CHECK:STDOUT: %I.ref.loc13: type = name_ref I, %I.decl [template = constants.%.1]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: impl_decl @impl {
|
||||
// CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc21_6.1: type = value_of_initializer %int.make_type_32.loc21 [template = i32]
|
||||
@@ -64,7 +65,7 @@ impl i32 as I {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl @impl: i32 as %.1 {
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: witness = <unexpected instref inst+17>
|
||||
// CHECK:STDOUT: witness = <unexpected instref inst+18>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
|
||||
|
||||
@@ -32,7 +32,8 @@ impl bool as I where .T = bool {}
|
||||
// CHECK:STDOUT: .Core = %Core
|
||||
// CHECK:STDOUT: .I = %I.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace %Core.import, [template] {}
|
||||
// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {}
|
||||
// CHECK:STDOUT: %import_ref: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool]
|
||||
// CHECK:STDOUT: impl_decl @impl {
|
||||
|
||||
+2
-1
@@ -46,7 +46,8 @@ class C {
|
||||
// CHECK:STDOUT: .Simple = %Simple.decl
|
||||
// CHECK:STDOUT: .C = %C.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace %Core.import, [template] {}
|
||||
// CHECK:STDOUT: %Simple.decl: type = interface_decl @Simple [template = constants.%.1] {}
|
||||
// CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {}
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
+2
-1
@@ -37,7 +37,8 @@ impl forall [T:! type] T as Simple {
|
||||
// CHECK:STDOUT: .Core = %Core
|
||||
// CHECK:STDOUT: .Simple = %Simple.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace %Core.import, [template] {}
|
||||
// CHECK:STDOUT: %Simple.decl: type = interface_decl @Simple [template = constants.%.1] {}
|
||||
// CHECK:STDOUT: impl_decl @impl {
|
||||
// CHECK:STDOUT: %T.loc15_14.1: type = param T
|
||||
|
||||
+2
-1
@@ -52,7 +52,8 @@ fn G(c: C) {
|
||||
// CHECK:STDOUT: .C = %C.decl
|
||||
// CHECK:STDOUT: .G = %G.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace %Core.import, [template] {}
|
||||
// CHECK:STDOUT: %HasF.decl: type = interface_decl @HasF [template = constants.%.1] {}
|
||||
// CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {}
|
||||
// CHECK:STDOUT: impl_decl @impl {
|
||||
|
||||
@@ -52,7 +52,8 @@ fn F(c: C) {
|
||||
// CHECK:STDOUT: .C = %C.decl
|
||||
// CHECK:STDOUT: .F = %F.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace %Core.import, [template] {}
|
||||
// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {}
|
||||
// CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {}
|
||||
// CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {
|
||||
|
||||
@@ -56,10 +56,11 @@ impl C as I {
|
||||
// CHECK:STDOUT: .C = %C.decl
|
||||
// CHECK:STDOUT: .F = %F.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace %Core.import, [template] {}
|
||||
// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {}
|
||||
// CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {}
|
||||
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {
|
||||
// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc19_11.1: type = value_of_initializer %int.make_type_32 [template = i32]
|
||||
|
||||
+14
-11
@@ -53,7 +53,8 @@ fn G(c: Impl.C) {
|
||||
// CHECK:STDOUT: .HasF = %HasF.decl
|
||||
// CHECK:STDOUT: .C = %C.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace %Core.import, [template] {}
|
||||
// CHECK:STDOUT: %HasF.decl: type = interface_decl @HasF [template = constants.%.1] {}
|
||||
// CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {}
|
||||
// CHECK:STDOUT: impl_decl @impl {
|
||||
@@ -121,22 +122,24 @@ fn G(c: Impl.C) {
|
||||
// CHECK:STDOUT: .Impl = %Impl
|
||||
// CHECK:STDOUT: .G = %G.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %Impl: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %import_ref.1 = import_ref ir8, inst+14, unloaded
|
||||
// CHECK:STDOUT: %import_ref.2 = import_ref ir8, inst+4, unloaded
|
||||
// CHECK:STDOUT: %import_ref.3: %.5 = import_ref ir8, inst+11, loaded [template = constants.%.6]
|
||||
// CHECK:STDOUT: %import_ref.4 = import_ref ir8, inst+6, unloaded
|
||||
// CHECK:STDOUT: %import_ref.5: <witness> = import_ref ir8, inst+22, loaded [template = constants.%.7]
|
||||
// CHECK:STDOUT: %import_ref.6: type = import_ref ir8, inst+13, loaded [template = constants.%C]
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Impl.import = import Impl
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace %Core.import, [template] {}
|
||||
// CHECK:STDOUT: %Impl: <namespace> = namespace %Impl.import, [template] {}
|
||||
// CHECK:STDOUT: %import_ref.1 = import_ref ir8, inst+15, unloaded
|
||||
// CHECK:STDOUT: %import_ref.2 = import_ref ir8, inst+5, unloaded
|
||||
// CHECK:STDOUT: %import_ref.3: %.5 = import_ref ir8, inst+12, loaded [template = constants.%.6]
|
||||
// CHECK:STDOUT: %import_ref.4 = import_ref ir8, inst+7, unloaded
|
||||
// CHECK:STDOUT: %import_ref.5: <witness> = import_ref ir8, inst+23, loaded [template = constants.%.7]
|
||||
// CHECK:STDOUT: %import_ref.6: type = import_ref ir8, inst+14, loaded [template = constants.%C]
|
||||
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {
|
||||
// CHECK:STDOUT: %Impl.ref: <namespace> = name_ref Impl, %Impl [template = %Impl]
|
||||
// CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.6 [template = constants.%C]
|
||||
// CHECK:STDOUT: %c.loc4_6.1: %C = param c
|
||||
// CHECK:STDOUT: @G.%c: %C = bind_name c, %c.loc4_6.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %import_ref.7: type = import_ref ir8, inst+2, loaded [template = constants.%.2]
|
||||
// CHECK:STDOUT: %import_ref.8 = import_ref ir8, inst+6, unloaded
|
||||
// CHECK:STDOUT: %import_ref.7: type = import_ref ir8, inst+3, loaded [template = constants.%.2]
|
||||
// CHECK:STDOUT: %import_ref.8 = import_ref ir8, inst+7, unloaded
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface @HasF {
|
||||
|
||||
@@ -53,13 +53,14 @@ fn F(c: C) -> i32 {
|
||||
// CHECK:STDOUT: .I = %I.decl
|
||||
// CHECK:STDOUT: .F = %F.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace %Core.import, [template] {}
|
||||
// CHECK:STDOUT: %C.decl.loc11: type = class_decl @C [template = constants.%C] {}
|
||||
// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {}
|
||||
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %C.decl.loc17: type = class_decl @C [template = constants.%C] {}
|
||||
// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %F.decl: %F.type.3 = fn_decl @F.3 [template = constants.%F.3] {
|
||||
// CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl.loc11 [template = constants.%C]
|
||||
// CHECK:STDOUT: %c.loc23_6.1: %C = param c
|
||||
|
||||
@@ -118,7 +118,8 @@ fn G(c: Impl.C) {
|
||||
// CHECK:STDOUT: .Impl = %Impl
|
||||
// CHECK:STDOUT: .G = %G.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Impl: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %Impl.import = import Impl
|
||||
// CHECK:STDOUT: %Impl: <namespace> = namespace %Impl.import, [template] {}
|
||||
// CHECK:STDOUT: %import_ref.1 = import_ref ir1, inst+13, unloaded
|
||||
// CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+3, unloaded
|
||||
// CHECK:STDOUT: %import_ref.3: %.5 = import_ref ir1, inst+10, loaded [template = constants.%.6]
|
||||
|
||||
@@ -101,6 +101,7 @@ fn F(x: (), y: ()) -> () {
|
||||
// CHECK:STDOUT: .Add = %import_ref.1
|
||||
// CHECK:STDOUT: .F = %F.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %default.import = import <invalid>
|
||||
// CHECK:STDOUT: %import_ref.1: type = import_ref ir1, inst+1, loaded [template = constants.%.2]
|
||||
// CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+3, unloaded
|
||||
// CHECK:STDOUT: %import_ref.3: %.4 = import_ref ir1, inst+24, loaded [template = constants.%.5]
|
||||
|
||||
@@ -122,6 +122,8 @@ impl () as D;
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
||||
// CHECK:STDOUT: .A = %import_ref.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %default.import.loc2_6.1 = import <invalid>
|
||||
// CHECK:STDOUT: %default.import.loc2_6.2 = import <invalid>
|
||||
// CHECK:STDOUT: %import_ref.1: type = import_ref ir0, inst+1, loaded [template = constants.%.2]
|
||||
// CHECK:STDOUT: %import_ref.2 = import_ref ir0, inst+3, unloaded
|
||||
// CHECK:STDOUT: impl_decl @impl {
|
||||
@@ -167,6 +169,8 @@ impl () as D;
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
||||
// CHECK:STDOUT: .A = %import_ref.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %default.import.loc2_6.1 = import <invalid>
|
||||
// CHECK:STDOUT: %default.import.loc2_6.2 = import <invalid>
|
||||
// CHECK:STDOUT: %import_ref.1 = import_ref ir1, inst+1, unloaded
|
||||
// CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+3, unloaded
|
||||
// CHECK:STDOUT: }
|
||||
@@ -221,6 +225,8 @@ impl () as D;
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
||||
// CHECK:STDOUT: .B = %import_ref.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %default.import.loc2_6.1 = import <invalid>
|
||||
// CHECK:STDOUT: %default.import.loc2_6.2 = import <invalid>
|
||||
// CHECK:STDOUT: %import_ref.1 = import_ref ir0, inst+1, unloaded
|
||||
// CHECK:STDOUT: %import_ref.2 = import_ref ir0, inst+3, unloaded
|
||||
// CHECK:STDOUT: }
|
||||
@@ -275,6 +281,8 @@ impl () as D;
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
||||
// CHECK:STDOUT: .C = %import_ref.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %default.import.loc2_6.1 = import <invalid>
|
||||
// CHECK:STDOUT: %default.import.loc2_6.2 = import <invalid>
|
||||
// CHECK:STDOUT: %import_ref.1: type = import_ref ir0, inst+1, loaded [template = constants.%.2]
|
||||
// CHECK:STDOUT: %import_ref.2 = import_ref ir0, inst+3, unloaded
|
||||
// CHECK:STDOUT: impl_decl @impl {
|
||||
@@ -310,6 +318,8 @@ impl () as D;
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
||||
// CHECK:STDOUT: .D = %D.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %default.import.loc2_6.1 = import <invalid>
|
||||
// CHECK:STDOUT: %default.import.loc2_6.2 = import <invalid>
|
||||
// CHECK:STDOUT: %D.decl: type = interface_decl @D [template = constants.%.1] {}
|
||||
// CHECK:STDOUT: impl_decl @impl {
|
||||
// CHECK:STDOUT: %.loc9_7.1: %.2 = tuple_literal ()
|
||||
|
||||
+5
-4
@@ -37,9 +37,10 @@ impl i32 as I {}
|
||||
// CHECK:STDOUT: .I = %I.decl
|
||||
// CHECK:STDOUT: .X = %X.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace %Core.import, [template] {}
|
||||
// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {}
|
||||
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: impl_decl @impl {
|
||||
// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc13_6.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32]
|
||||
@@ -47,8 +48,8 @@ impl i32 as I {}
|
||||
// CHECK:STDOUT: %I.ref.loc13: type = name_ref I, %I.decl [template = constants.%.1]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %X.decl: type = class_decl @X [template = constants.%X] {}
|
||||
// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: impl_decl @impl {
|
||||
// CHECK:STDOUT: %int.make_type_32.loc19: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc19_6.1: type = value_of_initializer %int.make_type_32.loc19 [template = i32]
|
||||
|
||||
Reference in New Issue
Block a user