mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 08:34:43 +01:00
Model type expressions as regions (#4698)
This is a precondition for enabling the new pattern-matching subsystem to support binding patterns that have `if` expressions in the type position. --------- Co-authored-by: Richard Smith <richard@metafoo.co.uk>
This commit is contained in:
co-authored by
Richard Smith
parent
95c9634c60
commit
a112cbde5c
@@ -36,9 +36,6 @@ var x: {.a: i32} = {};
|
||||
// CHECK:STDOUT: .x = %x
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a]
|
||||
// CHECK:STDOUT: %x.var: ref %struct_type.a = var x
|
||||
// CHECK:STDOUT: %x: ref %struct_type.a = bind_name x, %x.var
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
@@ -34,8 +34,6 @@ var x: {} = {.a = 1};
|
||||
// CHECK:STDOUT: .x = %x
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %.loc14_9.1: %empty_struct_type = struct_literal ()
|
||||
// CHECK:STDOUT: %.loc14_9.2: type = converted %.loc14_9.1, constants.%empty_struct_type [template = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: %x.var: ref %empty_struct_type = var x
|
||||
// CHECK:STDOUT: %x: ref %empty_struct_type = bind_name x, %x.var
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
@@ -103,22 +103,8 @@ var y: {.b: i32, .c: i32} = {.b = 3, .b = 4};
|
||||
// CHECK:STDOUT: %return.param: ref <error> = out_param runtime_param0
|
||||
// CHECK:STDOUT: %return: ref <error> = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %int_32.loc27_13: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc27_13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc27_22: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc27_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc36: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc36: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc45: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc45: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a.2]
|
||||
// CHECK:STDOUT: %x.var: ref %struct_type.a.2 = var x
|
||||
// CHECK:STDOUT: %x: ref %struct_type.a.2 = bind_name x, %x.var
|
||||
// CHECK:STDOUT: %int_32.loc53_13: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc53_13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc53_22: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc53_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %struct_type.b.c: type = struct_type {.b: %i32, .c: %i32} [template = constants.%struct_type.b.c]
|
||||
// CHECK:STDOUT: %y.var: ref %struct_type.b.c = var y
|
||||
// CHECK:STDOUT: %y: ref %struct_type.b.c = bind_name y, %y.var
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
@@ -45,14 +45,8 @@ var y: {.b: i32} = x;
|
||||
// CHECK:STDOUT: .y = %y
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a]
|
||||
// CHECK:STDOUT: %x.var: ref %struct_type.a = var x
|
||||
// CHECK:STDOUT: %x: ref %struct_type.a = bind_name x, %x.var
|
||||
// CHECK:STDOUT: %int_32.loc20: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc20: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %struct_type.b: type = struct_type {.b: %i32} [template = constants.%struct_type.b.2]
|
||||
// CHECK:STDOUT: %y.var: ref %struct_type.b.2 = var y
|
||||
// CHECK:STDOUT: %y: ref %struct_type.b.2 = bind_name y, %y.var
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
@@ -37,9 +37,6 @@ var x: {.a: i32} = {.b = 1.0};
|
||||
// CHECK:STDOUT: .x = %x
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a]
|
||||
// CHECK:STDOUT: %x.var: ref %struct_type.a = var x
|
||||
// CHECK:STDOUT: %x: ref %struct_type.a = bind_name x, %x.var
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
@@ -17,9 +17,6 @@ var y: i32 = x.b;
|
||||
// CHECK:STDOUT: --- fail_member_access_type.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template]
|
||||
// CHECK:STDOUT: %Float.type: type = fn_type @Float [template]
|
||||
// CHECK:STDOUT: %Float: %Float.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: f64} [template]
|
||||
// CHECK:STDOUT: %float: f64 = float_literal 4 [template]
|
||||
// CHECK:STDOUT: %struct: %struct_type.a = struct_value (%float) [template]
|
||||
@@ -43,15 +40,8 @@ var y: i32 = x.b;
|
||||
// CHECK:STDOUT: .y = %y
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64]
|
||||
// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%int_64) [template = f64]
|
||||
// CHECK:STDOUT: %.loc11_13.1: type = value_of_initializer %float.make_type [template = f64]
|
||||
// CHECK:STDOUT: %.loc11_13.2: type = converted %float.make_type, %.loc11_13.1 [template = f64]
|
||||
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: f64} [template = constants.%struct_type.a]
|
||||
// CHECK:STDOUT: %x.var: ref %struct_type.a = var x
|
||||
// CHECK:STDOUT: %x: ref %struct_type.a = bind_name x, %x.var
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %y.var: ref %i32 = var y
|
||||
// CHECK:STDOUT: %y: ref %i32 = bind_name y, %y.var
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
@@ -48,13 +48,8 @@ var y: i32 = x.b;
|
||||
// CHECK:STDOUT: .y = %y
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a.1]
|
||||
// CHECK:STDOUT: %x.var: ref %struct_type.a.1 = var x
|
||||
// CHECK:STDOUT: %x: ref %struct_type.a.1 = bind_name x, %x.var
|
||||
// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %y.var: ref %i32 = var y
|
||||
// CHECK:STDOUT: %y: ref %i32 = bind_name y, %y.var
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
@@ -37,11 +37,6 @@ var x: {.a: i32, .b: i32} = {.a = 1};
|
||||
// CHECK:STDOUT: .x = %x
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %int_32.loc14_13: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc14_13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc14_22: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc14_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b]
|
||||
// CHECK:STDOUT: %x.var: ref %struct_type.a.b = var x
|
||||
// CHECK:STDOUT: %x: ref %struct_type.a.b = bind_name x, %x.var
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
@@ -39,9 +39,6 @@ var x: {.a: i32} = {.a: i32};
|
||||
// CHECK:STDOUT: .x = %x
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a]
|
||||
// CHECK:STDOUT: %x.var: ref %struct_type.a = var x
|
||||
// CHECK:STDOUT: %x: ref %struct_type.a = bind_name x, %x.var
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
@@ -19,8 +19,6 @@ var x: {.a = 1};
|
||||
// CHECK:STDOUT: --- fail_value_as_type.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template]
|
||||
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: Core.IntLiteral} [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -37,9 +35,6 @@ var x: {.a = 1};
|
||||
// CHECK:STDOUT: .x = %x
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1]
|
||||
// CHECK:STDOUT: %.loc17_15.1: %struct_type.a = struct_literal (%int_1)
|
||||
// CHECK:STDOUT: %.loc17_15.2: type = converted %.loc17_15.1, <error> [template = <error>]
|
||||
// CHECK:STDOUT: %x.var: ref <error> = var x
|
||||
// CHECK:STDOUT: %x: ref <error> = bind_name x, %x.var
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
+10
-103
@@ -67,7 +67,6 @@ var c_bad: C({.a = 3, .b = 4}) = F();
|
||||
// CHECK:STDOUT: %Convert.specific_fn.1: <specific function> = specific_function %Convert.bound.1, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template]
|
||||
// CHECK:STDOUT: %struct.1: %struct_type.a.1 = struct_value (%int_0.2) [template]
|
||||
// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template]
|
||||
// CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template]
|
||||
// CHECK:STDOUT: %struct_type.b.c.1: type = struct_type {.b: %i32, .c: %tuple.type.2} [template]
|
||||
// CHECK:STDOUT: %struct_type.a.d.1: type = struct_type {.a: %struct_type.b.c.1, .d: %i32} [template]
|
||||
@@ -118,33 +117,22 @@ var c_bad: C({.a = 3, .b = 4}) = F();
|
||||
// CHECK:STDOUT: .F = %F.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a.1]
|
||||
// CHECK:STDOUT: %a_ref.var: ref %struct_type.a.1 = var a_ref
|
||||
// CHECK:STDOUT: %a_ref: ref %struct_type.a.1 = bind_name a_ref, %a_ref.var
|
||||
// CHECK:STDOUT: %int_32.loc5_22: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc5_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc5_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc5_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc5_36.1: %tuple.type.1 = tuple_literal (%i32.loc5_32)
|
||||
// CHECK:STDOUT: %.loc5_36.2: type = converted %.loc5_36.1, constants.%tuple.type.2 [template = constants.%tuple.type.2]
|
||||
// CHECK:STDOUT: %struct_type.b.c: type = struct_type {.b: %i32, .c: %tuple.type.2} [template = constants.%struct_type.b.c.1]
|
||||
// CHECK:STDOUT: %int_32.loc5_44: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc5_44: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %struct_type.a.d: type = struct_type {.a: %struct_type.b.c.1, .d: %i32} [template = constants.%struct_type.a.d.1]
|
||||
// CHECK:STDOUT: %b_ref.var: ref %struct_type.a.d.1 = var b_ref
|
||||
// CHECK:STDOUT: %b_ref: ref %struct_type.a.d.1 = bind_name b_ref, %b_ref.var
|
||||
// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.generic] {
|
||||
// CHECK:STDOUT: %S.patt.loc8_9.1: %struct_type.a.b.1 = symbolic_binding_pattern S, 0 [symbolic = %S.patt.loc8_9.2 (constants.%S.patt)]
|
||||
// CHECK:STDOUT: %S.param_patt: %struct_type.a.b.1 = value_param_pattern %S.patt.loc8_9.1, runtime_param<invalid> [symbolic = %S.patt.loc8_9.2 (constants.%S.patt)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %int_32.loc8_18: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc8_18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc8_27: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc8_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b.1]
|
||||
// CHECK:STDOUT: %S.param: %struct_type.a.b.1 = value_param runtime_param<invalid>
|
||||
// CHECK:STDOUT: %.loc8: type = splice_block %struct_type.a.b [template = constants.%struct_type.a.b.1] {
|
||||
// CHECK:STDOUT: %int_32.loc8_18: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc8_18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc8_27: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc8_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b.1]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %S.loc8_9.1: %struct_type.a.b.1 = bind_symbolic_name S, 0, %S.param [symbolic = %S.loc8_9.2 (constants.%S)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
|
||||
@@ -258,7 +246,6 @@ var c_bad: C({.a = 3, .b = 4}) = F();
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template]
|
||||
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template]
|
||||
// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template]
|
||||
// CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template]
|
||||
// CHECK:STDOUT: %struct_type.b.c: type = struct_type {.b: %i32, .c: %tuple.type.2} [template]
|
||||
// CHECK:STDOUT: %struct_type.a.d.1: type = struct_type {.a: %struct_type.b.c, .d: %i32} [template]
|
||||
@@ -269,18 +256,7 @@ var c_bad: C({.a = 3, .b = 4}) = F();
|
||||
// CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: %i32, .b: %i32} [template]
|
||||
// CHECK:STDOUT: %S: %struct_type.a.b.1 = bind_symbolic_name S, 0 [symbolic]
|
||||
// CHECK:STDOUT: %S.patt: %struct_type.a.b.1 = symbolic_binding_pattern S, 0 [symbolic]
|
||||
// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template]
|
||||
// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template]
|
||||
// CHECK:STDOUT: %struct_type.a.b.2: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template]
|
||||
// CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.1, @ImplicitAs(%i32) [template]
|
||||
// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template]
|
||||
// CHECK:STDOUT: %interface.5: <witness> = interface_witness (%Convert.10) [template]
|
||||
// CHECK:STDOUT: %Convert.bound.1: <bound method> = bound_method %int_1.1, %Convert.10 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.1: <specific function> = specific_function %Convert.bound.1, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.2: <bound method> = bound_method %int_2.1, %Convert.10 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.2: <specific function> = specific_function %Convert.bound.2, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template]
|
||||
// CHECK:STDOUT: %struct: %struct_type.a.b.1 = struct_value (%int_1.2, %int_2.2) [template]
|
||||
// CHECK:STDOUT: %C.2: type = class_type @C, @C(%struct) [template]
|
||||
@@ -300,7 +276,7 @@ var c_bad: C({.a = 3, .b = 4}) = F();
|
||||
// CHECK:STDOUT: import Core//prelude/...
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %import_ref.195: <witness> = import_ref Implicit//default, loc8_34, loaded [template = constants.%complete_type.3]
|
||||
// CHECK:STDOUT: %import_ref.196 = import_ref Implicit//default, inst602 [no loc], unloaded
|
||||
// CHECK:STDOUT: %import_ref.196 = import_ref Implicit//default, inst603 [no loc], unloaded
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
@@ -317,42 +293,10 @@ var c_bad: C({.a = 3, .b = 4}) = F();
|
||||
// CHECK:STDOUT: %Implicit.import = import Implicit
|
||||
// CHECK:STDOUT: %default.import = import <invalid>
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a]
|
||||
// CHECK:STDOUT: %a.var: ref %struct_type.a = var a
|
||||
// CHECK:STDOUT: %a: ref %struct_type.a = bind_name a, %a.var
|
||||
// CHECK:STDOUT: %int_32.loc5_18: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc5_18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc5_28: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc5_28: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc5_32.1: %tuple.type.1 = tuple_literal (%i32.loc5_28)
|
||||
// CHECK:STDOUT: %.loc5_32.2: type = converted %.loc5_32.1, constants.%tuple.type.2 [template = constants.%tuple.type.2]
|
||||
// CHECK:STDOUT: %struct_type.b.c: type = struct_type {.b: %i32, .c: %tuple.type.2} [template = constants.%struct_type.b.c]
|
||||
// CHECK:STDOUT: %int_32.loc5_40: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc5_40: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %struct_type.a.d: type = struct_type {.a: %struct_type.b.c, .d: %i32} [template = constants.%struct_type.a.d.1]
|
||||
// CHECK:STDOUT: %b.var: ref %struct_type.a.d.1 = var b
|
||||
// CHECK:STDOUT: %b: ref %struct_type.a.d.1 = bind_name b, %b.var
|
||||
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.generic]
|
||||
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1]
|
||||
// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1]
|
||||
// CHECK:STDOUT: %.loc6_25.1: %struct_type.a.b.2 = struct_literal (%int_1, %int_2)
|
||||
// CHECK:STDOUT: %impl.elem0.loc6_25.1: %Convert.type.9 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound.loc6_25.1: <bound method> = bound_method %int_1, %impl.elem0.loc6_25.1 [template = constants.%Convert.bound.1]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc6_25.1: <specific function> = specific_function %Convert.bound.loc6_25.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc6_25.1: init %i32 = call %Convert.specific_fn.loc6_25.1(%int_1) [template = constants.%int_1.2]
|
||||
// CHECK:STDOUT: %.loc6_25.2: %i32 = value_of_initializer %int.convert_checked.loc6_25.1 [template = constants.%int_1.2]
|
||||
// CHECK:STDOUT: %.loc6_25.3: %i32 = converted %int_1, %.loc6_25.2 [template = constants.%int_1.2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc6_25.2: %Convert.type.9 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound.loc6_25.2: <bound method> = bound_method %int_2, %impl.elem0.loc6_25.2 [template = constants.%Convert.bound.2]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc6_25.2: <specific function> = specific_function %Convert.bound.loc6_25.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc6_25.2: init %i32 = call %Convert.specific_fn.loc6_25.2(%int_2) [template = constants.%int_2.2]
|
||||
// CHECK:STDOUT: %.loc6_25.4: %i32 = value_of_initializer %int.convert_checked.loc6_25.2 [template = constants.%int_2.2]
|
||||
// CHECK:STDOUT: %.loc6_25.5: %i32 = converted %int_2, %.loc6_25.4 [template = constants.%int_2.2]
|
||||
// CHECK:STDOUT: %struct: %struct_type.a.b.1 = struct_value (%.loc6_25.3, %.loc6_25.5) [template = constants.%struct]
|
||||
// CHECK:STDOUT: %.loc6_26: %struct_type.a.b.1 = converted %.loc6_25.1, %struct [template = constants.%struct]
|
||||
// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%struct) [template = constants.%C.2]
|
||||
// CHECK:STDOUT: %c.var: ref %C.2 = var c
|
||||
// CHECK:STDOUT: %c: ref %C.2 = bind_name c, %c.var
|
||||
// CHECK:STDOUT: }
|
||||
@@ -434,9 +378,6 @@ var c_bad: C({.a = 3, .b = 4}) = F();
|
||||
// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template]
|
||||
// CHECK:STDOUT: %S: %struct_type.a.b = bind_symbolic_name S, 0 [symbolic]
|
||||
// CHECK:STDOUT: %S.patt: %struct_type.a.b = symbolic_binding_pattern S, 0 [symbolic]
|
||||
// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template]
|
||||
// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template]
|
||||
// CHECK:STDOUT: %struct_type.c.d: type = struct_type {.c: Core.IntLiteral, .d: Core.IntLiteral} [template]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template]
|
||||
@@ -455,7 +396,7 @@ var c_bad: C({.a = 3, .b = 4}) = F();
|
||||
// CHECK:STDOUT: import Core//prelude/...
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %import_ref.194: <witness> = import_ref Implicit//default, loc8_34, loaded [template = constants.%complete_type.3]
|
||||
// CHECK:STDOUT: %import_ref.195 = import_ref Implicit//default, inst602 [no loc], unloaded
|
||||
// CHECK:STDOUT: %import_ref.195 = import_ref Implicit//default, inst603 [no loc], unloaded
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
@@ -470,10 +411,6 @@ var c_bad: C({.a = 3, .b = 4}) = F();
|
||||
// CHECK:STDOUT: %Implicit.import = import Implicit
|
||||
// CHECK:STDOUT: %default.import = import <invalid>
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.generic]
|
||||
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1]
|
||||
// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1]
|
||||
// CHECK:STDOUT: %.loc11: %struct_type.c.d = struct_literal (%int_1, %int_2)
|
||||
// CHECK:STDOUT: %c_bad.var: ref <error> = var c_bad
|
||||
// CHECK:STDOUT: %c_bad: ref <error> = bind_name c_bad, %c_bad.var
|
||||
// CHECK:STDOUT: }
|
||||
@@ -526,18 +463,7 @@ var c_bad: C({.a = 3, .b = 4}) = F();
|
||||
// CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: %i32, .b: %i32} [template]
|
||||
// CHECK:STDOUT: %S: %struct_type.a.b.1 = bind_symbolic_name S, 0 [symbolic]
|
||||
// CHECK:STDOUT: %S.patt: %struct_type.a.b.1 = symbolic_binding_pattern S, 0 [symbolic]
|
||||
// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template]
|
||||
// CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template]
|
||||
// CHECK:STDOUT: %struct_type.a.b.2: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template]
|
||||
// CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.1, @ImplicitAs(%i32) [template]
|
||||
// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template]
|
||||
// CHECK:STDOUT: %interface.5: <witness> = interface_witness (%Convert.10) [template]
|
||||
// CHECK:STDOUT: %Convert.bound.1: <bound method> = bound_method %int_3.1, %Convert.10 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.1: <specific function> = specific_function %Convert.bound.1, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.2: <bound method> = bound_method %int_4.1, %Convert.10 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.2: <specific function> = specific_function %Convert.bound.2, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template]
|
||||
// CHECK:STDOUT: %struct.1: %struct_type.a.b.1 = struct_value (%int_3.2, %int_4.2) [template]
|
||||
// CHECK:STDOUT: %C.2: type = class_type @C, @C(%struct.1) [template]
|
||||
@@ -560,7 +486,7 @@ var c_bad: C({.a = 3, .b = 4}) = F();
|
||||
// CHECK:STDOUT: import Core//prelude/...
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %import_ref.194: <witness> = import_ref Implicit//default, loc8_34, loaded [template = constants.%complete_type.3]
|
||||
// CHECK:STDOUT: %import_ref.195 = import_ref Implicit//default, inst602 [no loc], unloaded
|
||||
// CHECK:STDOUT: %import_ref.195 = import_ref Implicit//default, inst603 [no loc], unloaded
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
@@ -575,25 +501,6 @@ var c_bad: C({.a = 3, .b = 4}) = F();
|
||||
// CHECK:STDOUT: %Implicit.import = import Implicit
|
||||
// CHECK:STDOUT: %default.import = import <invalid>
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.generic]
|
||||
// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1]
|
||||
// CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.1]
|
||||
// CHECK:STDOUT: %.loc9_29.1: %struct_type.a.b.2 = struct_literal (%int_3, %int_4)
|
||||
// CHECK:STDOUT: %impl.elem0.loc9_29.1: %Convert.type.9 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound.loc9_29.1: <bound method> = bound_method %int_3, %impl.elem0.loc9_29.1 [template = constants.%Convert.bound.1]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc9_29.1: <specific function> = specific_function %Convert.bound.loc9_29.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc9_29.1: init %i32 = call %Convert.specific_fn.loc9_29.1(%int_3) [template = constants.%int_3.2]
|
||||
// CHECK:STDOUT: %.loc9_29.2: %i32 = value_of_initializer %int.convert_checked.loc9_29.1 [template = constants.%int_3.2]
|
||||
// CHECK:STDOUT: %.loc9_29.3: %i32 = converted %int_3, %.loc9_29.2 [template = constants.%int_3.2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc9_29.2: %Convert.type.9 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound.loc9_29.2: <bound method> = bound_method %int_4, %impl.elem0.loc9_29.2 [template = constants.%Convert.bound.2]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc9_29.2: <specific function> = specific_function %Convert.bound.loc9_29.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc9_29.2: init %i32 = call %Convert.specific_fn.loc9_29.2(%int_4) [template = constants.%int_4.2]
|
||||
// CHECK:STDOUT: %.loc9_29.4: %i32 = value_of_initializer %int.convert_checked.loc9_29.2 [template = constants.%int_4.2]
|
||||
// CHECK:STDOUT: %.loc9_29.5: %i32 = converted %int_4, %.loc9_29.4 [template = constants.%int_4.2]
|
||||
// CHECK:STDOUT: %struct: %struct_type.a.b.1 = struct_value (%.loc9_29.3, %.loc9_29.5) [template = constants.%struct.1]
|
||||
// CHECK:STDOUT: %.loc9_30: %struct_type.a.b.1 = converted %.loc9_29.1, %struct [template = constants.%struct.1]
|
||||
// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%struct.1) [template = constants.%C.2]
|
||||
// CHECK:STDOUT: %c_bad.var: ref %C.2 = var c_bad
|
||||
// CHECK:STDOUT: %c_bad: ref %C.2 = bind_name c_bad, %c_bad.var
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
@@ -15,9 +15,6 @@ var z: i32 = y;
|
||||
// CHECK:STDOUT: --- member_access.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template]
|
||||
// CHECK:STDOUT: %Float.type: type = fn_type @Float [template]
|
||||
// CHECK:STDOUT: %Float: %Float.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template]
|
||||
// CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: f64, .b: %i32} [template]
|
||||
@@ -52,21 +49,10 @@ var z: i32 = y;
|
||||
// CHECK:STDOUT: .z = %z
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64]
|
||||
// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%int_64) [template = f64]
|
||||
// CHECK:STDOUT: %.loc11_13.1: type = value_of_initializer %float.make_type [template = f64]
|
||||
// CHECK:STDOUT: %.loc11_13.2: type = converted %float.make_type, %.loc11_13.1 [template = f64]
|
||||
// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: f64, .b: %i32} [template = constants.%struct_type.a.b.1]
|
||||
// CHECK:STDOUT: %x.var: ref %struct_type.a.b.1 = var x
|
||||
// CHECK:STDOUT: %x: ref %struct_type.a.b.1 = bind_name x, %x.var
|
||||
// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %y.var: ref %i32 = var y
|
||||
// CHECK:STDOUT: %y: ref %i32 = bind_name y, %y.var
|
||||
// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %z.var: ref %i32 = var z
|
||||
// CHECK:STDOUT: %z: ref %i32 = bind_name z, %z.var
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
@@ -65,23 +65,6 @@ fn G() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @G() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %int_32.loc14_16: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc14_16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc14_21: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc14_21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc14_26: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc14_26: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc14_29.1: %tuple.type.1 = tuple_literal (%i32.loc14_16, %i32.loc14_21, %i32.loc14_26)
|
||||
// CHECK:STDOUT: %.loc14_29.2: type = converted %.loc14_29.1, constants.%tuple.type.2 [template = constants.%tuple.type.2]
|
||||
// CHECK:STDOUT: %int_32.loc14_37: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc14_37: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc14_42: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc14_42: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc14_47: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc14_47: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc14_50.1: %tuple.type.1 = tuple_literal (%i32.loc14_37, %i32.loc14_42, %i32.loc14_47)
|
||||
// CHECK:STDOUT: %.loc14_50.2: type = converted %.loc14_50.1, constants.%tuple.type.2 [template = constants.%tuple.type.2]
|
||||
// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %tuple.type.2, .b: %tuple.type.2} [template = constants.%struct_type.a.b.1]
|
||||
// CHECK:STDOUT: %v.var: ref %struct_type.a.b.1 = var v
|
||||
// CHECK:STDOUT: %v: ref %struct_type.a.b.1 = bind_name v, %v.var
|
||||
// CHECK:STDOUT: %F.ref.loc14_61: %F.type = name_ref F, file.%F.decl [template = constants.%F]
|
||||
|
||||
@@ -23,12 +23,8 @@ var y: {} = x;
|
||||
// CHECK:STDOUT: .x = %x
|
||||
// CHECK:STDOUT: .y = %y
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc11_9.1: %empty_struct_type = struct_literal ()
|
||||
// CHECK:STDOUT: %.loc11_9.2: type = converted %.loc11_9.1, constants.%empty_struct_type [template = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: %x.var: ref %empty_struct_type = var x
|
||||
// CHECK:STDOUT: %x: ref %empty_struct_type = bind_name x, %x.var
|
||||
// CHECK:STDOUT: %.loc12_9.1: %empty_struct_type = struct_literal ()
|
||||
// CHECK:STDOUT: %.loc12_9.2: type = converted %.loc12_9.1, constants.%empty_struct_type [template = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: %y.var: ref %empty_struct_type = var y
|
||||
// CHECK:STDOUT: %y: ref %empty_struct_type = bind_name y, %y.var
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
@@ -25,9 +25,6 @@ var x: {.a: {}} = {.b = {}};
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
||||
// CHECK:STDOUT: .x = %x
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc14_14.1: %empty_struct_type = struct_literal ()
|
||||
// CHECK:STDOUT: %.loc14_14.2: type = converted %.loc14_14.1, constants.%empty_struct_type [template = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %empty_struct_type} [template = constants.%struct_type.a.1]
|
||||
// CHECK:STDOUT: %x.var: ref %struct_type.a.1 = var x
|
||||
// CHECK:STDOUT: %x: ref %struct_type.a.1 = bind_name x, %x.var
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
@@ -24,7 +24,6 @@ var p: Incomplete* = &s.a;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %Incomplete: type = class_type @Incomplete [template]
|
||||
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %Incomplete} [template]
|
||||
// CHECK:STDOUT: %ptr: type = ptr_type %Incomplete [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -35,12 +34,8 @@ var p: Incomplete* = &s.a;
|
||||
// CHECK:STDOUT: .p = %p
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Incomplete.decl: type = class_decl @Incomplete [template = constants.%Incomplete] {} {}
|
||||
// CHECK:STDOUT: %Incomplete.ref.loc19: type = name_ref Incomplete, %Incomplete.decl [template = constants.%Incomplete]
|
||||
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %Incomplete} [template = constants.%struct_type.a]
|
||||
// CHECK:STDOUT: %s.var: ref <error> = var s
|
||||
// CHECK:STDOUT: %s: ref <error> = bind_name s, %s.var
|
||||
// CHECK:STDOUT: %Incomplete.ref.loc21: type = name_ref Incomplete, %Incomplete.decl [template = constants.%Incomplete]
|
||||
// CHECK:STDOUT: %ptr: type = ptr_type %Incomplete [template = constants.%ptr]
|
||||
// CHECK:STDOUT: %p.var: ref %ptr = var p
|
||||
// CHECK:STDOUT: %p: ref %ptr = bind_name p, %p.var
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
@@ -45,14 +45,8 @@ var y: {.a: i32} = x;
|
||||
// CHECK:STDOUT: .y = %y
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %struct_type.a.loc11: type = struct_type {.a: %i32} [template = constants.%struct_type.a.1]
|
||||
// CHECK:STDOUT: %x.var: ref %struct_type.a.1 = var x
|
||||
// CHECK:STDOUT: %x: ref %struct_type.a.1 = bind_name x, %x.var
|
||||
// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %struct_type.a.loc12: type = struct_type {.a: %i32} [template = constants.%struct_type.a.1]
|
||||
// CHECK:STDOUT: %y.var: ref %struct_type.a.1 = var y
|
||||
// CHECK:STDOUT: %y: ref %struct_type.a.1 = bind_name y, %y.var
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
+4
-2
@@ -52,8 +52,6 @@ fn Make(n: i32) -> {.a: i32, .b: i32, .c: i32} {
|
||||
// CHECK:STDOUT: %return.patt: %struct_type.a.b.c.1 = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: %struct_type.a.b.c.1 = out_param_pattern %return.patt, runtime_param1
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %int_32.loc11_12: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc11_12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc11_25: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc11_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc11_34: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
@@ -62,6 +60,10 @@ fn Make(n: i32) -> {.a: i32, .b: i32, .c: i32} {
|
||||
// CHECK:STDOUT: %i32.loc11_43: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %struct_type.a.b.c: type = struct_type {.a: %i32, .b: %i32, .c: %i32} [template = constants.%struct_type.a.b.c.1]
|
||||
// CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0
|
||||
// CHECK:STDOUT: %.loc11: type = splice_block %i32.loc11_12 [template = constants.%i32] {
|
||||
// CHECK:STDOUT: %int_32.loc11_12: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc11_12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %n: %i32 = bind_name n, %n.param
|
||||
// CHECK:STDOUT: %return.param: ref %struct_type.a.b.c.1 = out_param runtime_param1
|
||||
// CHECK:STDOUT: %return: ref %struct_type.a.b.c.1 = return_slot %return.param
|
||||
|
||||
+7
-21
@@ -76,13 +76,13 @@ fn F() -> {.a: i32, .b: f64} {
|
||||
// CHECK:STDOUT: %return.patt: %struct_type.a.b = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: %struct_type.a.b = out_param_pattern %return.patt, runtime_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_64.loc14: Core.IntLiteral = int_value 64 [template = constants.%int_64]
|
||||
// CHECK:STDOUT: %float.make_type.loc14: init type = call constants.%Float(%int_64.loc14) [template = f64]
|
||||
// CHECK:STDOUT: %.loc14_25.1: type = value_of_initializer %float.make_type.loc14 [template = f64]
|
||||
// CHECK:STDOUT: %.loc14_25.2: type = converted %float.make_type.loc14, %.loc14_25.1 [template = f64]
|
||||
// CHECK:STDOUT: %struct_type.a.b.loc14: type = struct_type {.a: %i32, .b: f64} [template = constants.%struct_type.a.b]
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64]
|
||||
// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%int_64) [template = f64]
|
||||
// CHECK:STDOUT: %.loc14_25.1: type = value_of_initializer %float.make_type [template = f64]
|
||||
// CHECK:STDOUT: %.loc14_25.2: type = converted %float.make_type, %.loc14_25.1 [template = f64]
|
||||
// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: f64} [template = constants.%struct_type.a.b]
|
||||
// CHECK:STDOUT: %return.param: ref %struct_type.a.b = out_param runtime_param0
|
||||
// CHECK:STDOUT: %return: ref %struct_type.a.b = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
@@ -94,13 +94,6 @@ fn F() -> {.a: i32, .b: f64} {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F() -> %return.param_patt: %struct_type.a.b {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_64.loc15: Core.IntLiteral = int_value 64 [template = constants.%int_64]
|
||||
// CHECK:STDOUT: %float.make_type.loc15: init type = call constants.%Float(%int_64.loc15) [template = f64]
|
||||
// CHECK:STDOUT: %.loc15_24.1: type = value_of_initializer %float.make_type.loc15 [template = f64]
|
||||
// CHECK:STDOUT: %.loc15_24.2: type = converted %float.make_type.loc15, %.loc15_24.1 [template = f64]
|
||||
// CHECK:STDOUT: %struct_type.a.b.loc15: type = struct_type {.a: %i32, .b: f64} [template = constants.%struct_type.a.b]
|
||||
// CHECK:STDOUT: %MakeF64.ref: %MakeF64.type = name_ref MakeF64, file.%MakeF64.decl [template = constants.%MakeF64]
|
||||
// CHECK:STDOUT: %MakeF64.call: init f64 = call %MakeF64.ref()
|
||||
// CHECK:STDOUT: %MakeI32.ref: %MakeI32.type = name_ref MakeI32, file.%MakeI32.decl [template = constants.%MakeI32]
|
||||
@@ -113,13 +106,6 @@ fn F() -> {.a: i32, .b: f64} {
|
||||
// CHECK:STDOUT: %struct.loc15: %struct_type.a.b = struct_value (%.loc15_62.3, %.loc15_62.5)
|
||||
// CHECK:STDOUT: %.loc15_63: %struct_type.a.b = converted %.loc15_62.1, %struct.loc15
|
||||
// CHECK:STDOUT: %x: %struct_type.a.b = bind_name x, %.loc15_63
|
||||
// CHECK:STDOUT: %int_64.loc16: Core.IntLiteral = int_value 64 [template = constants.%int_64]
|
||||
// CHECK:STDOUT: %float.make_type.loc16: init type = call constants.%Float(%int_64.loc16) [template = f64]
|
||||
// CHECK:STDOUT: %.loc16_15.1: type = value_of_initializer %float.make_type.loc16 [template = f64]
|
||||
// CHECK:STDOUT: %.loc16_15.2: type = converted %float.make_type.loc16, %.loc16_15.1 [template = f64]
|
||||
// CHECK:STDOUT: %int_32.loc16: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %struct_type.b.a: type = struct_type {.b: f64, .a: %i32} [template = constants.%struct_type.b.a]
|
||||
// CHECK:STDOUT: %x.ref: %struct_type.a.b = name_ref x, %x
|
||||
// CHECK:STDOUT: %.loc16_31.1: f64 = struct_access %x.ref, element1
|
||||
// CHECK:STDOUT: %.loc16_31.2: %i32 = struct_access %x.ref, element0
|
||||
|
||||
@@ -16,7 +16,6 @@ var y: {.a: i32, .b: (i32,)} = x;
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template]
|
||||
// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template]
|
||||
// CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template]
|
||||
// CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: %i32, .b: %tuple.type.2} [template]
|
||||
// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template]
|
||||
@@ -53,22 +52,8 @@ var y: {.a: i32, .b: (i32,)} = x;
|
||||
// CHECK:STDOUT: .y = %y
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %int_32.loc11_13: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc11_13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc11_23: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc11_23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_27.1: %tuple.type.1 = tuple_literal (%i32.loc11_23)
|
||||
// CHECK:STDOUT: %.loc11_27.2: type = converted %.loc11_27.1, constants.%tuple.type.2 [template = constants.%tuple.type.2]
|
||||
// CHECK:STDOUT: %struct_type.a.b.loc11: type = struct_type {.a: %i32, .b: %tuple.type.2} [template = constants.%struct_type.a.b.1]
|
||||
// CHECK:STDOUT: %x.var: ref %struct_type.a.b.1 = var x
|
||||
// CHECK:STDOUT: %x: ref %struct_type.a.b.1 = bind_name x, %x.var
|
||||
// CHECK:STDOUT: %int_32.loc12_13: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc12_13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc12_23: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc12_23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc12_27.1: %tuple.type.1 = tuple_literal (%i32.loc12_23)
|
||||
// CHECK:STDOUT: %.loc12_27.2: type = converted %.loc12_27.1, constants.%tuple.type.2 [template = constants.%tuple.type.2]
|
||||
// CHECK:STDOUT: %struct_type.a.b.loc12: type = struct_type {.a: %i32, .b: %tuple.type.2} [template = constants.%struct_type.a.b.1]
|
||||
// CHECK:STDOUT: %y.var: ref %struct_type.a.b.1 = var y
|
||||
// CHECK:STDOUT: %y: ref %struct_type.a.b.1 = bind_name y, %y.var
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
@@ -54,28 +54,8 @@ var y: {.a: i32, .b: i32} = x;
|
||||
// CHECK:STDOUT: .y = %y
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %int_32.loc11_13: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc11_13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc11_22: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc11_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %struct_type.a.b.loc11: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b.1]
|
||||
// CHECK:STDOUT: %int_32.loc12_13: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc12_13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc12_22: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc12_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %struct_type.a.b.loc12: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b.1]
|
||||
// CHECK:STDOUT: %int_32.loc14_13: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc14_13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc14_22: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc14_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %struct_type.a.b.loc14: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b.1]
|
||||
// CHECK:STDOUT: %x.var: ref %struct_type.a.b.1 = var x
|
||||
// CHECK:STDOUT: %x: ref %struct_type.a.b.1 = bind_name x, %x.var
|
||||
// CHECK:STDOUT: %int_32.loc15_13: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc15_13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc15_22: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc15_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %struct_type.a.b.loc15: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b.1]
|
||||
// CHECK:STDOUT: %y.var: ref %struct_type.a.b.1 = var y
|
||||
// CHECK:STDOUT: %y: ref %struct_type.a.b.1 = bind_name y, %y.var
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
Reference in New Issue
Block a user