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:
@@ -27,7 +27,8 @@ fn F() { a.b; }
|
||||
// CHECK:STDOUT: .Core = %Core
|
||||
// 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: %F.decl: %F.type = fn_decl @F [template = constants.%F] {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -28,8 +28,9 @@ var x: {.a: i32} = {};
|
||||
// CHECK:STDOUT: .Core = %Core
|
||||
// CHECK:STDOUT: .x = %x
|
||||
// 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: %int.make_type_32: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc14_13.1: type = value_of_initializer %int.make_type_32 [template = i32]
|
||||
// CHECK:STDOUT: %.loc14_13.2: type = converted %int.make_type_32, %.loc14_13.1 [template = i32]
|
||||
|
||||
@@ -27,7 +27,8 @@ var x: {} = {.a = 1};
|
||||
// CHECK:STDOUT: .Core = %Core
|
||||
// CHECK:STDOUT: .x = %x
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace %Core.import, [template] {}
|
||||
// CHECK:STDOUT: %.loc14_9.1: %.1 = struct_literal ()
|
||||
// CHECK:STDOUT: %.loc14_9.2: type = converted %.loc14_9.1, constants.%.1 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %x.var: ref %.1 = var x
|
||||
|
||||
+13
-12
@@ -78,12 +78,13 @@ var y: {.b: i32, .c: i32} = {.b = 3, .b = 4};
|
||||
// CHECK:STDOUT: .x = %x
|
||||
// CHECK:STDOUT: .y = %y
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// 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.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.5: %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.1: %Int32.type = import_ref ir3, inst+4, 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: %import_ref.4: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
|
||||
// CHECK:STDOUT: %int.make_type_32.loc18_16: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc18_16.1: type = value_of_initializer %int.make_type_32.loc18_16 [template = i32]
|
||||
@@ -102,30 +103,30 @@ var y: {.b: i32, .c: i32} = {.b = 3, .b = 4};
|
||||
// CHECK:STDOUT: %.loc18_56.2: type = converted %int.make_type_32.loc18_56, %.loc18_56.1 [template = i32]
|
||||
// CHECK:STDOUT: @F.%return: ref <error> = var <return slot>
|
||||
// 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: %int.make_type_32.loc27_13: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc27_13.1: type = value_of_initializer %int.make_type_32.loc27_13 [template = i32]
|
||||
// CHECK:STDOUT: %.loc27_13.2: type = converted %int.make_type_32.loc27_13, %.loc27_13.1 [template = i32]
|
||||
// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %int.make_type_32.loc27_22: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc27_22.1: type = value_of_initializer %int.make_type_32.loc27_22 [template = i32]
|
||||
// CHECK:STDOUT: %.loc27_22.2: type = converted %int.make_type_32.loc27_22, %.loc27_22.1 [template = i32]
|
||||
// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %int.make_type_32.loc36: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc36_8.1: type = value_of_initializer %int.make_type_32.loc36 [template = i32]
|
||||
// CHECK:STDOUT: %.loc36_8.2: type = converted %int.make_type_32.loc36, %.loc36_8.1 [template = i32]
|
||||
// CHECK:STDOUT: %import_ref.9: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.9: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %int.make_type_32.loc45: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc45_13.1: type = value_of_initializer %int.make_type_32.loc45 [template = i32]
|
||||
// CHECK:STDOUT: %.loc45_13.2: type = converted %int.make_type_32.loc45, %.loc45_13.1 [template = i32]
|
||||
// CHECK:STDOUT: %.loc45_16: type = struct_type {.a: i32} [template = constants.%.3]
|
||||
// CHECK:STDOUT: %x.var: ref %.3 = var x
|
||||
// CHECK:STDOUT: %x: ref %.3 = bind_name x, %x.var
|
||||
// CHECK:STDOUT: %import_ref.10: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.10: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %int.make_type_32.loc53_13: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc53_13.1: type = value_of_initializer %int.make_type_32.loc53_13 [template = i32]
|
||||
// CHECK:STDOUT: %.loc53_13.2: type = converted %int.make_type_32.loc53_13, %.loc53_13.1 [template = i32]
|
||||
// CHECK:STDOUT: %import_ref.11: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.11: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %int.make_type_32.loc53_22: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc53_22.1: type = value_of_initializer %int.make_type_32.loc53_22 [template = i32]
|
||||
// CHECK:STDOUT: %.loc53_22.2: type = converted %int.make_type_32.loc53_22, %.loc53_22.1 [template = i32]
|
||||
|
||||
@@ -36,15 +36,16 @@ var y: {.b: i32} = x;
|
||||
// CHECK:STDOUT: .x = %x
|
||||
// CHECK:STDOUT: .y = %y
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %import_ref.1: %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.1: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc15_13.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32]
|
||||
// CHECK:STDOUT: %.loc15_13.2: type = converted %int.make_type_32.loc15, %.loc15_13.1 [template = i32]
|
||||
// CHECK:STDOUT: %.loc15_16: type = struct_type {.a: i32} [template = constants.%.2]
|
||||
// CHECK:STDOUT: %x.var: ref %.2 = var x
|
||||
// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var
|
||||
// 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: %int.make_type_32.loc20: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc20_13.1: type = value_of_initializer %int.make_type_32.loc20 [template = i32]
|
||||
// CHECK:STDOUT: %.loc20_13.2: type = converted %int.make_type_32.loc20, %.loc20_13.1 [template = i32]
|
||||
|
||||
@@ -29,8 +29,9 @@ var x: {.a: i32} = {.b = 1.0};
|
||||
// CHECK:STDOUT: .Core = %Core
|
||||
// CHECK:STDOUT: .x = %x
|
||||
// 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: %int.make_type_32: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc14_13.1: type = value_of_initializer %int.make_type_32 [template = i32]
|
||||
// CHECK:STDOUT: %.loc14_13.2: type = converted %int.make_type_32, %.loc14_13.1 [template = i32]
|
||||
|
||||
@@ -34,16 +34,17 @@ var y: i32 = x.b;
|
||||
// CHECK:STDOUT: .x = %x
|
||||
// CHECK:STDOUT: .y = %y
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace %Core.import, [template] {}
|
||||
// CHECK:STDOUT: %.loc11_13.1: i32 = int_literal 64 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float]
|
||||
// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref ir3, inst+32, loaded [template = constants.%Float]
|
||||
// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc11_13.1) [template = f64]
|
||||
// CHECK:STDOUT: %.loc11_13.2: type = value_of_initializer %float.make_type [template = f64]
|
||||
// CHECK:STDOUT: %.loc11_13.3: type = converted %float.make_type, %.loc11_13.2 [template = f64]
|
||||
// CHECK:STDOUT: %.loc11_16: type = struct_type {.a: f64} [template = constants.%.3]
|
||||
// CHECK:STDOUT: %x.var: ref %.3 = var x
|
||||
// CHECK:STDOUT: %x: ref %.3 = bind_name x, %x.var
|
||||
// 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: %int.make_type_32: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_32 [template = i32]
|
||||
// CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_32, %.loc15_8.1 [template = i32]
|
||||
|
||||
@@ -28,7 +28,8 @@ fn A() {
|
||||
// CHECK:STDOUT: .Core = %Core
|
||||
// CHECK:STDOUT: .A = %A.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: %A.decl: %A.type = fn_decl @A [template = constants.%A] {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -31,15 +31,16 @@ var y: i32 = x.b;
|
||||
// CHECK:STDOUT: .x = %x
|
||||
// CHECK:STDOUT: .y = %y
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %import_ref.1: %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.1: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc11_13.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32]
|
||||
// CHECK:STDOUT: %.loc11_13.2: type = converted %int.make_type_32.loc11, %.loc11_13.1 [template = i32]
|
||||
// CHECK:STDOUT: %.loc11_16: type = struct_type {.a: i32} [template = constants.%.2]
|
||||
// CHECK:STDOUT: %x.var: ref %.2 = var x
|
||||
// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var
|
||||
// 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: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32]
|
||||
// CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_32.loc15, %.loc15_8.1 [template = i32]
|
||||
|
||||
@@ -30,12 +30,13 @@ var x: {.a: i32, .b: i32} = {.a = 1};
|
||||
// CHECK:STDOUT: .Core = %Core
|
||||
// CHECK:STDOUT: .x = %x
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %import_ref.1: %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.1: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %int.make_type_32.loc14_13: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc14_13.1: type = value_of_initializer %int.make_type_32.loc14_13 [template = i32]
|
||||
// CHECK:STDOUT: %.loc14_13.2: type = converted %int.make_type_32.loc14_13, %.loc14_13.1 [template = i32]
|
||||
// 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: %int.make_type_32.loc14_22: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc14_22.1: type = value_of_initializer %int.make_type_32.loc14_22 [template = i32]
|
||||
// CHECK:STDOUT: %.loc14_22.2: type = converted %int.make_type_32.loc14_22, %.loc14_22.1 [template = i32]
|
||||
|
||||
+4
-3
@@ -27,15 +27,16 @@ var x: {.a: i32} = {.a: i32};
|
||||
// CHECK:STDOUT: .Core = %Core
|
||||
// CHECK:STDOUT: .x = %x
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %import_ref.1: %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.1: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc14_13.1: type = value_of_initializer %int.make_type_32 [template = i32]
|
||||
// CHECK:STDOUT: %.loc14_13.2: type = converted %int.make_type_32, %.loc14_13.1 [template = i32]
|
||||
// CHECK:STDOUT: %.loc14_16: type = struct_type {.a: i32} [template = constants.%.2]
|
||||
// CHECK:STDOUT: %x.var: ref %.2 = var x
|
||||
// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var
|
||||
// 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: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
|
||||
|
||||
@@ -25,7 +25,8 @@ var x: {.a = 1};
|
||||
// CHECK:STDOUT: .Core = %Core
|
||||
// CHECK:STDOUT: .x = %x
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace %Core.import, [template] {}
|
||||
// CHECK:STDOUT: %.loc14_14: i32 = int_literal 1 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %.loc14_15: %.2 = struct_literal (%.loc14_14)
|
||||
// CHECK:STDOUT: %x.var: ref <error> = var x
|
||||
|
||||
+42
-32
@@ -92,34 +92,35 @@ var c_bad: C({.a = 3, .b = 4}) = F();
|
||||
// CHECK:STDOUT: .C = %C.decl
|
||||
// CHECK:STDOUT: .F = %F.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %import_ref.1: %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.1: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc4_17.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32]
|
||||
// CHECK:STDOUT: %.loc4_17.2: type = converted %int.make_type_32.loc4, %.loc4_17.1 [template = i32]
|
||||
// CHECK:STDOUT: %.loc4_20: type = struct_type {.a: i32} [template = constants.%.2]
|
||||
// CHECK:STDOUT: %a_ref.var: ref %.2 = var a_ref
|
||||
// CHECK:STDOUT: %a_ref: ref %.2 = bind_name a_ref, %a_ref.var
|
||||
// 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: %int.make_type_32.loc5_22: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc5_22.1: type = value_of_initializer %int.make_type_32.loc5_22 [template = i32]
|
||||
// CHECK:STDOUT: %.loc5_22.2: type = converted %int.make_type_32.loc5_22, %.loc5_22.1 [template = i32]
|
||||
// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %int.make_type_32.loc5_32: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc5_36.1: %.4 = tuple_literal (%int.make_type_32.loc5_32)
|
||||
// CHECK:STDOUT: %.loc5_36.2: type = value_of_initializer %int.make_type_32.loc5_32 [template = i32]
|
||||
// CHECK:STDOUT: %.loc5_36.3: type = converted %int.make_type_32.loc5_32, %.loc5_36.2 [template = i32]
|
||||
// CHECK:STDOUT: %.loc5_36.4: type = converted %.loc5_36.1, constants.%.5 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc5_37: type = struct_type {.b: i32, .c: %.5} [template = constants.%.6]
|
||||
// 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: %int.make_type_32.loc5_44: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc5_44.1: type = value_of_initializer %int.make_type_32.loc5_44 [template = i32]
|
||||
// CHECK:STDOUT: %.loc5_44.2: type = converted %int.make_type_32.loc5_44, %.loc5_44.1 [template = i32]
|
||||
// CHECK:STDOUT: %.loc5_47: type = struct_type {.a: %.6, .d: i32} [template = constants.%.7]
|
||||
// CHECK:STDOUT: %b_ref.var: ref %.7 = var b_ref
|
||||
// CHECK:STDOUT: %b_ref: ref %.7 = bind_name b_ref, %b_ref.var
|
||||
// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.6: %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: %import_ref.6: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.1] {
|
||||
// CHECK:STDOUT: %int.make_type_32.loc8_18: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc8_18.1: type = value_of_initializer %int.make_type_32.loc8_18 [template = i32]
|
||||
@@ -203,7 +204,7 @@ var c_bad: C({.a = 3, .b = 4}) = F();
|
||||
// CHECK:STDOUT: %C.1: %C.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.10: type = struct_type {} [template]
|
||||
// CHECK:STDOUT: %.11: type = struct_type {.a: i32, .b: i32} [template]
|
||||
// CHECK:STDOUT: %S: %.11 = bind_symbolic_name S 0, <unexpected instref inst+100> [symbolic]
|
||||
// CHECK:STDOUT: %S: %.11 = bind_symbolic_name S 0, <unexpected instref inst+103> [symbolic]
|
||||
// CHECK:STDOUT: %C.2: type = class_type @C, (%S) [symbolic]
|
||||
// CHECK:STDOUT: %.12: i32 = int_literal 1 [template]
|
||||
// CHECK:STDOUT: %.13: i32 = int_literal 2 [template]
|
||||
@@ -226,37 +227,40 @@ var c_bad: C({.a = 3, .b = 4}) = F();
|
||||
// CHECK:STDOUT: .b = %b
|
||||
// CHECK:STDOUT: .c = %c
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %import_ref.1: ref %.2 = import_ref ir0, inst+16, loaded
|
||||
// CHECK:STDOUT: %import_ref.2: ref %.6 = import_ref ir0, inst+59, loaded
|
||||
// CHECK:STDOUT: %import_ref.3: %C.type = import_ref ir0, inst+103, loaded [template = constants.%C.1]
|
||||
// CHECK:STDOUT: %import_ref.4: %F.type = import_ref ir0, inst+125, loaded [template = constants.%F]
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %Implicit.import = import Implicit
|
||||
// CHECK:STDOUT: %default.import = import <invalid>
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %import_ref.1: ref %.2 = import_ref ir0, inst+17, loaded
|
||||
// CHECK:STDOUT: %import_ref.2: ref %.6 = import_ref ir0, inst+60, loaded
|
||||
// CHECK:STDOUT: %import_ref.3: %C.type = import_ref ir0, inst+104, loaded [template = constants.%C.1]
|
||||
// CHECK:STDOUT: %import_ref.4: %F.type = import_ref ir0, inst+126, loaded [template = constants.%F]
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace %Core.import, [template] {}
|
||||
// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc4_13.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32]
|
||||
// CHECK:STDOUT: %.loc4_13.2: type = converted %int.make_type_32.loc4, %.loc4_13.1 [template = i32]
|
||||
// CHECK:STDOUT: %.loc4_16: type = struct_type {.a: i32} [template = constants.%.2]
|
||||
// CHECK:STDOUT: %a.var: ref %.2 = var a
|
||||
// CHECK:STDOUT: %a: ref %.2 = bind_name a, %a.var
|
||||
// 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: %int.make_type_32.loc5_18: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc5_18.1: type = value_of_initializer %int.make_type_32.loc5_18 [template = i32]
|
||||
// CHECK:STDOUT: %.loc5_18.2: type = converted %int.make_type_32.loc5_18, %.loc5_18.1 [template = i32]
|
||||
// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %int.make_type_32.loc5_28: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc5_32.1: %.3 = tuple_literal (%int.make_type_32.loc5_28)
|
||||
// CHECK:STDOUT: %.loc5_32.2: type = value_of_initializer %int.make_type_32.loc5_28 [template = i32]
|
||||
// CHECK:STDOUT: %.loc5_32.3: type = converted %int.make_type_32.loc5_28, %.loc5_32.2 [template = i32]
|
||||
// CHECK:STDOUT: %.loc5_32.4: type = converted %.loc5_32.1, constants.%.4 [template = constants.%.4]
|
||||
// CHECK:STDOUT: %.loc5_33: type = struct_type {.b: i32, .c: %.4} [template = constants.%.5]
|
||||
// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %int.make_type_32.loc5_40: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc5_40.1: type = value_of_initializer %int.make_type_32.loc5_40 [template = i32]
|
||||
// CHECK:STDOUT: %.loc5_40.2: type = converted %int.make_type_32.loc5_40, %.loc5_40.1 [template = i32]
|
||||
// CHECK:STDOUT: %.loc5_43: type = struct_type {.a: %.5, .d: i32} [template = constants.%.6]
|
||||
// CHECK:STDOUT: %b.var: ref %.6 = var b
|
||||
// CHECK:STDOUT: %b: ref %.6 = bind_name b, %b.var
|
||||
// CHECK:STDOUT: %import_ref.9 = import_ref ir0, inst+106, unloaded
|
||||
// CHECK:STDOUT: %import_ref.9 = import_ref ir0, inst+107, unloaded
|
||||
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, %import_ref.3 [template = constants.%C.1]
|
||||
// CHECK:STDOUT: %.loc6_16: i32 = int_literal 1 [template = constants.%.12]
|
||||
// CHECK:STDOUT: %.loc6_24: i32 = int_literal 2 [template = constants.%.13]
|
||||
@@ -325,7 +329,7 @@ var c_bad: C({.a = 3, .b = 4}) = F();
|
||||
// CHECK:STDOUT: %C.1: %C.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.2: type = struct_type {} [template]
|
||||
// CHECK:STDOUT: %.3: type = struct_type {.a: i32, .b: i32} [template]
|
||||
// CHECK:STDOUT: %S: %.3 = bind_symbolic_name S 0, <unexpected instref inst+18> [symbolic]
|
||||
// CHECK:STDOUT: %S: %.3 = bind_symbolic_name S 0, <unexpected instref inst+21> [symbolic]
|
||||
// CHECK:STDOUT: %C.2: type = class_type @C, (%S) [symbolic]
|
||||
// CHECK:STDOUT: %.4: i32 = int_literal 1 [template]
|
||||
// CHECK:STDOUT: %.5: i32 = int_literal 2 [template]
|
||||
@@ -347,12 +351,15 @@ var c_bad: C({.a = 3, .b = 4}) = F();
|
||||
// CHECK:STDOUT: .Core = %Core
|
||||
// CHECK:STDOUT: .c_bad = %c_bad
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %import_ref.1 = import_ref ir0, inst+16, unloaded
|
||||
// CHECK:STDOUT: %import_ref.2 = import_ref ir0, inst+59, unloaded
|
||||
// CHECK:STDOUT: %import_ref.3: %C.type = import_ref ir0, inst+103, loaded [template = constants.%C.1]
|
||||
// CHECK:STDOUT: %import_ref.4: %F.type = import_ref ir0, inst+125, loaded [template = constants.%F]
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %import_ref.5 = import_ref ir0, inst+106, unloaded
|
||||
// CHECK:STDOUT: %Implicit.import = import Implicit
|
||||
// CHECK:STDOUT: %default.import = import <invalid>
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %import_ref.1 = import_ref ir0, inst+17, unloaded
|
||||
// CHECK:STDOUT: %import_ref.2 = import_ref ir0, inst+60, unloaded
|
||||
// CHECK:STDOUT: %import_ref.3: %C.type = import_ref ir0, inst+104, loaded [template = constants.%C.1]
|
||||
// CHECK:STDOUT: %import_ref.4: %F.type = import_ref ir0, inst+126, loaded [template = constants.%F]
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace %Core.import, [template] {}
|
||||
// CHECK:STDOUT: %import_ref.5 = import_ref ir0, inst+107, unloaded
|
||||
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, %import_ref.3 [template = constants.%C.1]
|
||||
// CHECK:STDOUT: %.loc13_20: i32 = int_literal 1 [template = constants.%.4]
|
||||
// CHECK:STDOUT: %.loc13_28: i32 = int_literal 2 [template = constants.%.5]
|
||||
@@ -388,7 +395,7 @@ var c_bad: C({.a = 3, .b = 4}) = F();
|
||||
// CHECK:STDOUT: %C.1: %C.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.2: type = struct_type {} [template]
|
||||
// CHECK:STDOUT: %.3: type = struct_type {.a: i32, .b: i32} [template]
|
||||
// CHECK:STDOUT: %S: %.3 = bind_symbolic_name S 0, <unexpected instref inst+18> [symbolic]
|
||||
// CHECK:STDOUT: %S: %.3 = bind_symbolic_name S 0, <unexpected instref inst+21> [symbolic]
|
||||
// CHECK:STDOUT: %C.2: type = class_type @C, (%S) [symbolic]
|
||||
// CHECK:STDOUT: %.4: i32 = int_literal 3 [template]
|
||||
// CHECK:STDOUT: %.5: i32 = int_literal 4 [template]
|
||||
@@ -413,12 +420,15 @@ var c_bad: C({.a = 3, .b = 4}) = F();
|
||||
// CHECK:STDOUT: .Core = %Core
|
||||
// CHECK:STDOUT: .c_bad = %c_bad
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %import_ref.1 = import_ref ir0, inst+16, unloaded
|
||||
// CHECK:STDOUT: %import_ref.2 = import_ref ir0, inst+59, unloaded
|
||||
// CHECK:STDOUT: %import_ref.3: %C.type = import_ref ir0, inst+103, loaded [template = constants.%C.1]
|
||||
// CHECK:STDOUT: %import_ref.4: %F.type = import_ref ir0, inst+125, loaded [template = constants.%F]
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %import_ref.5 = import_ref ir0, inst+106, unloaded
|
||||
// CHECK:STDOUT: %Implicit.import = import Implicit
|
||||
// CHECK:STDOUT: %default.import = import <invalid>
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %import_ref.1 = import_ref ir0, inst+17, unloaded
|
||||
// CHECK:STDOUT: %import_ref.2 = import_ref ir0, inst+60, unloaded
|
||||
// CHECK:STDOUT: %import_ref.3: %C.type = import_ref ir0, inst+104, loaded [template = constants.%C.1]
|
||||
// CHECK:STDOUT: %import_ref.4: %F.type = import_ref ir0, inst+126, loaded [template = constants.%F]
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace %Core.import, [template] {}
|
||||
// CHECK:STDOUT: %import_ref.5 = import_ref ir0, inst+107, unloaded
|
||||
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, %import_ref.3 [template = constants.%C.1]
|
||||
// CHECK:STDOUT: %.loc6_20: i32 = int_literal 3 [template = constants.%.4]
|
||||
// CHECK:STDOUT: %.loc6_28: i32 = int_literal 4 [template = constants.%.5]
|
||||
|
||||
@@ -39,10 +39,11 @@ fn F() -> i32 {
|
||||
// CHECK:STDOUT: .G = %G.decl
|
||||
// CHECK:STDOUT: .F = %F.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// 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: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace %Core.import, [template] {}
|
||||
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+4, 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: %G.decl: %G.type = fn_decl @G [template = constants.%G] {
|
||||
// CHECK:STDOUT: %int.make_type_32.loc11_16: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc11_16.1: type = value_of_initializer %int.make_type_32.loc11_16 [template = i32]
|
||||
@@ -56,7 +57,7 @@ fn F() -> i32 {
|
||||
// CHECK:STDOUT: %.loc11_37: type = struct_type {.x: i32, .y: i32, .z: i32} [template = constants.%.2]
|
||||
// CHECK:STDOUT: @G.%return: ref %.2 = var <return slot>
|
||||
// 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: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
|
||||
// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc13_11.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32]
|
||||
|
||||
+6
-5
@@ -35,26 +35,27 @@ var z: i32 = y;
|
||||
// CHECK:STDOUT: .y = %y
|
||||
// CHECK:STDOUT: .z = %z
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace %Core.import, [template] {}
|
||||
// CHECK:STDOUT: %.loc11_13.1: i32 = int_literal 64 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float]
|
||||
// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref ir3, inst+32, loaded [template = constants.%Float]
|
||||
// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc11_13.1) [template = f64]
|
||||
// CHECK:STDOUT: %.loc11_13.2: type = value_of_initializer %float.make_type [template = f64]
|
||||
// CHECK:STDOUT: %.loc11_13.3: type = converted %float.make_type, %.loc11_13.2 [template = f64]
|
||||
// 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: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc11_22.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32]
|
||||
// CHECK:STDOUT: %.loc11_22.2: type = converted %int.make_type_32.loc11, %.loc11_22.1 [template = i32]
|
||||
// CHECK:STDOUT: %.loc11_25: type = struct_type {.a: f64, .b: i32} [template = constants.%.3]
|
||||
// CHECK:STDOUT: %x.var: ref %.3 = var x
|
||||
// CHECK:STDOUT: %x: ref %.3 = bind_name x, %x.var
|
||||
// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc12_8.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32]
|
||||
// CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_32.loc12, %.loc12_8.1 [template = i32]
|
||||
// CHECK:STDOUT: %y.var: ref i32 = var y
|
||||
// CHECK:STDOUT: %y: ref i32 = bind_name y, %y.var
|
||||
// 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: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc13_8.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32]
|
||||
// CHECK:STDOUT: %.loc13_8.2: type = converted %int.make_type_32.loc13, %.loc13_8.1 [template = i32]
|
||||
|
||||
+11
-10
@@ -38,10 +38,11 @@ fn G() {
|
||||
// CHECK:STDOUT: .F = %F.decl
|
||||
// CHECK:STDOUT: .G = %G.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// 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: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace %Core.import, [template] {}
|
||||
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+4, 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 = fn_decl @F [template = constants.%F] {
|
||||
// CHECK:STDOUT: %int.make_type_32.loc11_12: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %int.make_type_32.loc11_17: init type = call constants.%Int32() [template = i32]
|
||||
@@ -57,12 +58,12 @@ fn G() {
|
||||
// CHECK:STDOUT: @F.%return: ref %.3 = var <return slot>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {}
|
||||
// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.9: %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: %import_ref.5: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.9: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
|
||||
|
||||
+4
-3
@@ -28,15 +28,16 @@ var y: {.a: i32} = x;
|
||||
// CHECK:STDOUT: .x = %x
|
||||
// CHECK:STDOUT: .y = %y
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %import_ref.1: %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.1: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc11_13.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32]
|
||||
// CHECK:STDOUT: %.loc11_13.2: type = converted %int.make_type_32.loc11, %.loc11_13.1 [template = i32]
|
||||
// CHECK:STDOUT: %.loc11_16: type = struct_type {.a: i32} [template = constants.%.2]
|
||||
// CHECK:STDOUT: %x.var: ref %.2 = var x
|
||||
// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var
|
||||
// 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: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc12_13.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32]
|
||||
// CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_32.loc12, %.loc12_13.1 [template = i32]
|
||||
|
||||
+10
-9
@@ -45,15 +45,16 @@ fn F() -> {.a: i32, .b: f64} {
|
||||
// CHECK:STDOUT: .MakeF64 = %MakeF64.decl
|
||||
// CHECK:STDOUT: .F = %F.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %import_ref.1: %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.1: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %MakeI32.decl: %MakeI32.type = fn_decl @MakeI32 [template = constants.%MakeI32] {
|
||||
// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc11_17.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32]
|
||||
// CHECK:STDOUT: %.loc11_17.2: type = converted %int.make_type_32.loc11, %.loc11_17.1 [template = i32]
|
||||
// CHECK:STDOUT: @MakeI32.%return: ref i32 = var <return slot>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float]
|
||||
// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref ir3, inst+32, loaded [template = constants.%Float]
|
||||
// CHECK:STDOUT: %MakeF64.decl: %MakeF64.type = fn_decl @MakeF64 [template = constants.%MakeF64] {
|
||||
// CHECK:STDOUT: %.loc12_17.1: i32 = int_literal 64 [template = constants.%.2]
|
||||
// CHECK:STDOUT: %float.make_type.loc12: init type = call constants.%Float(%.loc12_17.1) [template = f64]
|
||||
@@ -61,8 +62,8 @@ fn F() -> {.a: i32, .b: f64} {
|
||||
// CHECK:STDOUT: %.loc12_17.3: type = converted %float.make_type.loc12, %.loc12_17.2 [template = f64]
|
||||
// CHECK:STDOUT: @MakeF64.%return: ref f64 = var <return slot>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.4: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float]
|
||||
// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.4: %Float.type = import_ref ir3, inst+32, loaded [template = constants.%Float]
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
|
||||
// CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc14_16.1: type = value_of_initializer %int.make_type_32.loc14 [template = i32]
|
||||
@@ -74,10 +75,10 @@ fn F() -> {.a: i32, .b: f64} {
|
||||
// CHECK:STDOUT: %.loc14_28: type = struct_type {.a: i32, .b: f64} [template = constants.%.3]
|
||||
// CHECK:STDOUT: @F.%return: ref %.3 = var <return slot>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.6: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float]
|
||||
// CHECK:STDOUT: %import_ref.7: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float]
|
||||
// CHECK:STDOUT: %import_ref.8: %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: %import_ref.6: %Float.type = import_ref ir3, inst+32, loaded [template = constants.%Float]
|
||||
// CHECK:STDOUT: %import_ref.7: %Float.type = import_ref ir3, inst+32, loaded [template = constants.%Float]
|
||||
// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
|
||||
|
||||
+6
-5
@@ -33,12 +33,13 @@ var y: {.a: i32, .b: (i32,)} = x;
|
||||
// CHECK:STDOUT: .x = %x
|
||||
// CHECK:STDOUT: .y = %y
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %import_ref.1: %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.1: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %int.make_type_32.loc11_13: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc11_13.1: type = value_of_initializer %int.make_type_32.loc11_13 [template = i32]
|
||||
// CHECK:STDOUT: %.loc11_13.2: type = converted %int.make_type_32.loc11_13, %.loc11_13.1 [template = i32]
|
||||
// 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: %int.make_type_32.loc11_23: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc11_27.1: %.2 = tuple_literal (%int.make_type_32.loc11_23)
|
||||
// CHECK:STDOUT: %.loc11_27.2: type = value_of_initializer %int.make_type_32.loc11_23 [template = i32]
|
||||
@@ -47,11 +48,11 @@ var y: {.a: i32, .b: (i32,)} = x;
|
||||
// CHECK:STDOUT: %.loc11_28: type = struct_type {.a: i32, .b: %.3} [template = constants.%.4]
|
||||
// CHECK:STDOUT: %x.var: ref %.4 = var x
|
||||
// CHECK:STDOUT: %x: ref %.4 = bind_name x, %x.var
|
||||
// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %int.make_type_32.loc12_13: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc12_13.1: type = value_of_initializer %int.make_type_32.loc12_13 [template = i32]
|
||||
// CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_32.loc12_13, %.loc12_13.1 [template = i32]
|
||||
// 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: %int.make_type_32.loc12_23: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc12_27.1: %.2 = tuple_literal (%int.make_type_32.loc12_23)
|
||||
// CHECK:STDOUT: %.loc12_27.2: type = value_of_initializer %int.make_type_32.loc12_23 [template = i32]
|
||||
|
||||
+10
-9
@@ -35,41 +35,42 @@ var y: {.a: i32, .b: i32} = x;
|
||||
// CHECK:STDOUT: .x = %x
|
||||
// CHECK:STDOUT: .y = %y
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %import_ref.1: %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.1: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %int.make_type_32.loc11_13: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc11_13.1: type = value_of_initializer %int.make_type_32.loc11_13 [template = i32]
|
||||
// CHECK:STDOUT: %.loc11_13.2: type = converted %int.make_type_32.loc11_13, %.loc11_13.1 [template = i32]
|
||||
// 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: %int.make_type_32.loc11_22: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc11_22.1: type = value_of_initializer %int.make_type_32.loc11_22 [template = i32]
|
||||
// CHECK:STDOUT: %.loc11_22.2: type = converted %int.make_type_32.loc11_22, %.loc11_22.1 [template = i32]
|
||||
// CHECK:STDOUT: %.loc11_25: type = struct_type {.a: i32, .b: i32} [template = constants.%.2]
|
||||
// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %int.make_type_32.loc12_13: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc12_13.1: type = value_of_initializer %int.make_type_32.loc12_13 [template = i32]
|
||||
// CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_32.loc12_13, %.loc12_13.1 [template = i32]
|
||||
// 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: %int.make_type_32.loc12_22: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc12_22.1: type = value_of_initializer %int.make_type_32.loc12_22 [template = i32]
|
||||
// CHECK:STDOUT: %.loc12_22.2: type = converted %int.make_type_32.loc12_22, %.loc12_22.1 [template = i32]
|
||||
// CHECK:STDOUT: %.loc12_25: type = struct_type {.a: i32, .b: i32} [template = constants.%.2]
|
||||
// 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: %int.make_type_32.loc14_13: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc14_13.1: type = value_of_initializer %int.make_type_32.loc14_13 [template = i32]
|
||||
// CHECK:STDOUT: %.loc14_13.2: type = converted %int.make_type_32.loc14_13, %.loc14_13.1 [template = i32]
|
||||
// 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: %int.make_type_32.loc14_22: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc14_22.1: type = value_of_initializer %int.make_type_32.loc14_22 [template = i32]
|
||||
// CHECK:STDOUT: %.loc14_22.2: type = converted %int.make_type_32.loc14_22, %.loc14_22.1 [template = i32]
|
||||
// CHECK:STDOUT: %.loc14_25: type = struct_type {.a: i32, .b: i32} [template = constants.%.2]
|
||||
// CHECK:STDOUT: %x.var: ref %.2 = var x
|
||||
// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var
|
||||
// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %int.make_type_32.loc15_13: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc15_13.1: type = value_of_initializer %int.make_type_32.loc15_13 [template = i32]
|
||||
// CHECK:STDOUT: %.loc15_13.2: type = converted %int.make_type_32.loc15_13, %.loc15_13.1 [template = i32]
|
||||
// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %int.make_type_32.loc15_22: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc15_22.1: type = value_of_initializer %int.make_type_32.loc15_22 [template = i32]
|
||||
// CHECK:STDOUT: %.loc15_22.2: type = converted %int.make_type_32.loc15_22, %.loc15_22.1 [template = i32]
|
||||
|
||||
Reference in New Issue
Block a user