mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Implement unused pattern bindings, continued (#6518)
Implementation of unused pattern bindings #2022, continued. Whereas previous PR #6460 took care of parsing, and PR #6479 prepared the stage by using _ in some test cases, this PR has the the actual implementation, using a simple dataflow analysis. --------- Co-authored-by: Burak Emir <bqe@google.com> Co-authored-by: jonmeow <jperkins@google.com>
This commit is contained in:
co-authored by
Burak Emir
jonmeow
parent
bea24a8bee
commit
fdb188ccfd
+6
-6
@@ -37,7 +37,7 @@ interface I {
|
||||
}
|
||||
|
||||
impl (i32, i32) as I {
|
||||
fn F[self: Self]() {}
|
||||
fn F[unused self: Self]() {}
|
||||
}
|
||||
|
||||
fn G(x: (i32, i32)) {
|
||||
@@ -60,7 +60,7 @@ impl (i32, i32) as I {
|
||||
// This requires a thunk due to the return type mismatch.
|
||||
// The thunk internally contains an element access of the form
|
||||
// `self.(RealF)()`.
|
||||
fn F[self: Self]() -> Derived* { return &d; }
|
||||
fn F[unused self: Self]() -> Derived* { return &d; }
|
||||
}
|
||||
|
||||
fn G(x: (i32, i32)) {
|
||||
@@ -174,11 +174,11 @@ library "[[@TEST_NAME]]";
|
||||
|
||||
fn Main() {
|
||||
var non_tuple: array(i32, 2) = (5, 5);
|
||||
// CHECK:STDERR: fail_non_tuple_access.carbon:[[@LINE+4]]:20: error: type `array(i32, 2)` does not support tuple indexing; only tuples can be indexed that way [TupleIndexOnANonTupleType]
|
||||
// CHECK:STDERR: var first: i32 = non_tuple.0;
|
||||
// CHECK:STDERR: ^~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_non_tuple_access.carbon:[[@LINE+4]]:27: error: type `array(i32, 2)` does not support tuple indexing; only tuples can be indexed that way [TupleIndexOnANonTupleType]
|
||||
// CHECK:STDERR: var unused first: i32 = non_tuple.0;
|
||||
// CHECK:STDERR: ^~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
var first: i32 = non_tuple.0;
|
||||
var unused first: i32 = non_tuple.0;
|
||||
}
|
||||
|
||||
// --- fail_out_of_bound_access.carbon
|
||||
|
||||
+58
-58
@@ -36,13 +36,13 @@ fn F() -> (i32, i32, i32);
|
||||
|
||||
fn G() {
|
||||
//@dump-sem-ir-begin
|
||||
var v: ((i32, i32, i32), (i32, i32, i32)) = (F(), F());
|
||||
var unused v: ((i32, i32, i32), (i32, i32, i32)) = (F(), F());
|
||||
//@dump-sem-ir-end
|
||||
}
|
||||
|
||||
fn H() {
|
||||
//@dump-sem-ir-begin
|
||||
var v: (i32, (i32, i32, i32), i32) = (1, F(), 2);
|
||||
var unused v: (i32, (i32, i32, i32), i32) = (1, F(), 2);
|
||||
//@dump-sem-ir-end
|
||||
}
|
||||
|
||||
@@ -192,35 +192,35 @@ fn H() {
|
||||
// CHECK:STDOUT: %v.var_patt: %pattern_type.d88 = var_pattern %v.patt [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %v.var: ref %tuple.type.99b = var %v.var_patt
|
||||
// CHECK:STDOUT: %F.ref.loc7_48: %F.type = name_ref F, file.%F.decl [concrete = constants.%F]
|
||||
// CHECK:STDOUT: %F.ref.loc7_55: %F.type = name_ref F, file.%F.decl [concrete = constants.%F]
|
||||
// CHECK:STDOUT: %tuple.elem0: ref %tuple.type.189 = tuple_access %v.var, element0
|
||||
// CHECK:STDOUT: %F.call.loc7_50: init %tuple.type.189 to %tuple.elem0 = call %F.ref.loc7_48()
|
||||
// CHECK:STDOUT: %F.ref.loc7_53: %F.type = name_ref F, file.%F.decl [concrete = constants.%F]
|
||||
// CHECK:STDOUT: %F.call.loc7_57: init %tuple.type.189 to %tuple.elem0 = call %F.ref.loc7_55()
|
||||
// CHECK:STDOUT: %F.ref.loc7_60: %F.type = name_ref F, file.%F.decl [concrete = constants.%F]
|
||||
// CHECK:STDOUT: %tuple.elem1: ref %tuple.type.189 = tuple_access %v.var, element1
|
||||
// CHECK:STDOUT: %F.call.loc7_55: init %tuple.type.189 to %tuple.elem1 = call %F.ref.loc7_53()
|
||||
// CHECK:STDOUT: %.loc7_56.1: %tuple.type.99b = tuple_literal (%F.call.loc7_50, %F.call.loc7_55)
|
||||
// CHECK:STDOUT: %.loc7_56.2: init %tuple.type.99b to %v.var = tuple_init (%F.call.loc7_50, %F.call.loc7_55)
|
||||
// CHECK:STDOUT: %.loc7_3: init %tuple.type.99b = converted %.loc7_56.1, %.loc7_56.2
|
||||
// CHECK:STDOUT: %F.call.loc7_62: init %tuple.type.189 to %tuple.elem1 = call %F.ref.loc7_60()
|
||||
// CHECK:STDOUT: %.loc7_63.1: %tuple.type.99b = tuple_literal (%F.call.loc7_57, %F.call.loc7_62)
|
||||
// CHECK:STDOUT: %.loc7_63.2: init %tuple.type.99b to %v.var = tuple_init (%F.call.loc7_57, %F.call.loc7_62)
|
||||
// CHECK:STDOUT: %.loc7_3: init %tuple.type.99b = converted %.loc7_63.1, %.loc7_63.2
|
||||
// CHECK:STDOUT: assign %v.var, %.loc7_3
|
||||
// CHECK:STDOUT: %.loc7_43.1: type = splice_block %.loc7_43.5 [concrete = constants.%tuple.type.99b] {
|
||||
// CHECK:STDOUT: %int_32.loc7_12: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc7_12: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc7_17: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc7_17: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc7_22: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc7_22: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc7_25: %tuple.type.ff9 = tuple_literal (%i32.loc7_12, %i32.loc7_17, %i32.loc7_22) [concrete = constants.%tuple.e64]
|
||||
// CHECK:STDOUT: %.loc7_50.1: type = splice_block %.loc7_50.5 [concrete = constants.%tuple.type.99b] {
|
||||
// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc7_24: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc7_24: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc7_29: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc7_29: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc7_34: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc7_34: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc7_39: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc7_39: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc7_42: %tuple.type.ff9 = tuple_literal (%i32.loc7_29, %i32.loc7_34, %i32.loc7_39) [concrete = constants.%tuple.e64]
|
||||
// CHECK:STDOUT: %.loc7_43.2: %tuple.type.f9f = tuple_literal (%.loc7_25, %.loc7_42) [concrete = constants.%tuple.9e5]
|
||||
// CHECK:STDOUT: %.loc7_43.3: type = converted constants.%tuple.e64, constants.%tuple.type.189 [concrete = constants.%tuple.type.189]
|
||||
// CHECK:STDOUT: %.loc7_43.4: type = converted constants.%tuple.e64, constants.%tuple.type.189 [concrete = constants.%tuple.type.189]
|
||||
// CHECK:STDOUT: %.loc7_43.5: type = converted %.loc7_43.2, constants.%tuple.type.99b [concrete = constants.%tuple.type.99b]
|
||||
// CHECK:STDOUT: %.loc7_32: %tuple.type.ff9 = tuple_literal (%i32.loc7_19, %i32.loc7_24, %i32.loc7_29) [concrete = constants.%tuple.e64]
|
||||
// CHECK:STDOUT: %int_32.loc7_36: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc7_36: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc7_41: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc7_41: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc7_46: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc7_46: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc7_49: %tuple.type.ff9 = tuple_literal (%i32.loc7_36, %i32.loc7_41, %i32.loc7_46) [concrete = constants.%tuple.e64]
|
||||
// CHECK:STDOUT: %.loc7_50.2: %tuple.type.f9f = tuple_literal (%.loc7_32, %.loc7_49) [concrete = constants.%tuple.9e5]
|
||||
// CHECK:STDOUT: %.loc7_50.3: type = converted constants.%tuple.e64, constants.%tuple.type.189 [concrete = constants.%tuple.type.189]
|
||||
// CHECK:STDOUT: %.loc7_50.4: type = converted constants.%tuple.e64, constants.%tuple.type.189 [concrete = constants.%tuple.type.189]
|
||||
// CHECK:STDOUT: %.loc7_50.5: type = converted %.loc7_50.2, constants.%tuple.type.99b [concrete = constants.%tuple.type.99b]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %v: ref %tuple.type.99b = ref_binding v, %v.var
|
||||
// CHECK:STDOUT: %DestroyOp.bound: <bound method> = bound_method %v.var, constants.%DestroyOp.b0ebf8.1
|
||||
@@ -242,41 +242,41 @@ fn H() {
|
||||
// CHECK:STDOUT: %tuple.elem1: ref %tuple.type.189 = tuple_access %v.var, element1
|
||||
// CHECK:STDOUT: %F.call: init %tuple.type.189 to %tuple.elem1 = call %F.ref()
|
||||
// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
|
||||
// CHECK:STDOUT: %.loc13_50.1: %tuple.type.667 = tuple_literal (%int_1, %F.call, %int_2)
|
||||
// CHECK:STDOUT: %impl.elem0.loc13_50.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
|
||||
// CHECK:STDOUT: %bound_method.loc13_50.1: <bound method> = bound_method %int_1, %impl.elem0.loc13_50.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215]
|
||||
// CHECK:STDOUT: %specific_fn.loc13_50.1: <specific function> = specific_function %impl.elem0.loc13_50.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc13_50.2: <bound method> = bound_method %int_1, %specific_fn.loc13_50.1 [concrete = constants.%bound_method.38b]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc13_50.1: init %i32 = call %bound_method.loc13_50.2(%int_1) [concrete = constants.%int_1.5d2]
|
||||
// CHECK:STDOUT: %.loc13_50.2: init %i32 = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc13_50.1 [concrete = constants.%int_1.5d2]
|
||||
// CHECK:STDOUT: %.loc13_57.1: %tuple.type.667 = tuple_literal (%int_1, %F.call, %int_2)
|
||||
// CHECK:STDOUT: %impl.elem0.loc13_57.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
|
||||
// CHECK:STDOUT: %bound_method.loc13_57.1: <bound method> = bound_method %int_1, %impl.elem0.loc13_57.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215]
|
||||
// CHECK:STDOUT: %specific_fn.loc13_57.1: <specific function> = specific_function %impl.elem0.loc13_57.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc13_57.2: <bound method> = bound_method %int_1, %specific_fn.loc13_57.1 [concrete = constants.%bound_method.38b]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc13_57.1: init %i32 = call %bound_method.loc13_57.2(%int_1) [concrete = constants.%int_1.5d2]
|
||||
// CHECK:STDOUT: %.loc13_57.2: init %i32 = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc13_57.1 [concrete = constants.%int_1.5d2]
|
||||
// CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %v.var, element0
|
||||
// CHECK:STDOUT: %.loc13_50.3: init %i32 to %tuple.elem0 = in_place_init %.loc13_50.2 [concrete = constants.%int_1.5d2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc13_50.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
|
||||
// CHECK:STDOUT: %bound_method.loc13_50.3: <bound method> = bound_method %int_2, %impl.elem0.loc13_50.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5]
|
||||
// CHECK:STDOUT: %specific_fn.loc13_50.2: <specific function> = specific_function %impl.elem0.loc13_50.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc13_50.4: <bound method> = bound_method %int_2, %specific_fn.loc13_50.2 [concrete = constants.%bound_method.646]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc13_50.2: init %i32 = call %bound_method.loc13_50.4(%int_2) [concrete = constants.%int_2.ef8]
|
||||
// CHECK:STDOUT: %.loc13_50.4: init %i32 = converted %int_2, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc13_50.2 [concrete = constants.%int_2.ef8]
|
||||
// CHECK:STDOUT: %.loc13_57.3: init %i32 to %tuple.elem0 = in_place_init %.loc13_57.2 [concrete = constants.%int_1.5d2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc13_57.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
|
||||
// CHECK:STDOUT: %bound_method.loc13_57.3: <bound method> = bound_method %int_2, %impl.elem0.loc13_57.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5]
|
||||
// CHECK:STDOUT: %specific_fn.loc13_57.2: <specific function> = specific_function %impl.elem0.loc13_57.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc13_57.4: <bound method> = bound_method %int_2, %specific_fn.loc13_57.2 [concrete = constants.%bound_method.646]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc13_57.2: init %i32 = call %bound_method.loc13_57.4(%int_2) [concrete = constants.%int_2.ef8]
|
||||
// CHECK:STDOUT: %.loc13_57.4: init %i32 = converted %int_2, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc13_57.2 [concrete = constants.%int_2.ef8]
|
||||
// CHECK:STDOUT: %tuple.elem2: ref %i32 = tuple_access %v.var, element2
|
||||
// CHECK:STDOUT: %.loc13_50.5: init %i32 to %tuple.elem2 = in_place_init %.loc13_50.4 [concrete = constants.%int_2.ef8]
|
||||
// CHECK:STDOUT: %.loc13_50.6: init %tuple.type.516 to %v.var = tuple_init (%.loc13_50.3, %F.call, %.loc13_50.5)
|
||||
// CHECK:STDOUT: %.loc13_3: init %tuple.type.516 = converted %.loc13_50.1, %.loc13_50.6
|
||||
// CHECK:STDOUT: %.loc13_57.5: init %i32 to %tuple.elem2 = in_place_init %.loc13_57.4 [concrete = constants.%int_2.ef8]
|
||||
// CHECK:STDOUT: %.loc13_57.6: init %tuple.type.516 to %v.var = tuple_init (%.loc13_57.3, %F.call, %.loc13_57.5)
|
||||
// CHECK:STDOUT: %.loc13_3: init %tuple.type.516 = converted %.loc13_57.1, %.loc13_57.6
|
||||
// CHECK:STDOUT: assign %v.var, %.loc13_3
|
||||
// CHECK:STDOUT: %.loc13_36.1: type = splice_block %.loc13_36.4 [concrete = constants.%tuple.type.516] {
|
||||
// CHECK:STDOUT: %int_32.loc13_11: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc13_11: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc13_17: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc13_17: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc13_22: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc13_22: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc13_27: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc13_27: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc13_30: %tuple.type.ff9 = tuple_literal (%i32.loc13_17, %i32.loc13_22, %i32.loc13_27) [concrete = constants.%tuple.e64]
|
||||
// CHECK:STDOUT: %int_32.loc13_33: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc13_33: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc13_36.2: %tuple.type.3a3 = tuple_literal (%i32.loc13_11, %.loc13_30, %i32.loc13_33) [concrete = constants.%tuple.5fc]
|
||||
// CHECK:STDOUT: %.loc13_36.3: type = converted constants.%tuple.e64, constants.%tuple.type.189 [concrete = constants.%tuple.type.189]
|
||||
// CHECK:STDOUT: %.loc13_36.4: type = converted %.loc13_36.2, constants.%tuple.type.516 [concrete = constants.%tuple.type.516]
|
||||
// CHECK:STDOUT: %.loc13_43.1: type = splice_block %.loc13_43.4 [concrete = constants.%tuple.type.516] {
|
||||
// CHECK:STDOUT: %int_32.loc13_18: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc13_18: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc13_24: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc13_24: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc13_29: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc13_29: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc13_34: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc13_34: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc13_37: %tuple.type.ff9 = tuple_literal (%i32.loc13_24, %i32.loc13_29, %i32.loc13_34) [concrete = constants.%tuple.e64]
|
||||
// CHECK:STDOUT: %int_32.loc13_40: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc13_40: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc13_43.2: %tuple.type.3a3 = tuple_literal (%i32.loc13_18, %.loc13_37, %i32.loc13_40) [concrete = constants.%tuple.5fc]
|
||||
// CHECK:STDOUT: %.loc13_43.3: type = converted constants.%tuple.e64, constants.%tuple.type.189 [concrete = constants.%tuple.type.189]
|
||||
// CHECK:STDOUT: %.loc13_43.4: type = converted %.loc13_43.2, constants.%tuple.type.516 [concrete = constants.%tuple.type.516]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %v: ref %tuple.type.516 = ref_binding v, %v.var
|
||||
// CHECK:STDOUT: %DestroyOp.bound: <bound method> = bound_method %v.var, constants.%DestroyOp.b0ebf8.2
|
||||
|
||||
+112
-112
@@ -17,9 +17,9 @@ library "[[@TEST_NAME]]";
|
||||
|
||||
fn F() {
|
||||
//@dump-sem-ir-begin
|
||||
let (x: {}, y: {}) = ({}, {});
|
||||
var (a: {}, b: {});
|
||||
var (c: {}, d: {}) = ({}, {});
|
||||
let (unused x: {}, unused y: {}) = ({}, {});
|
||||
var (unused a: {}, unused b: {});
|
||||
var (unused c: {}, unused d: {}) = ({}, {});
|
||||
//@dump-sem-ir-end
|
||||
}
|
||||
|
||||
@@ -30,14 +30,14 @@ library "[[@TEST_NAME]]";
|
||||
fn F() {
|
||||
//@dump-sem-ir-begin
|
||||
var tuple: ({}, {}) = ({}, {});
|
||||
var (x: {}, y: {}) = tuple;
|
||||
var (unused x: {}, unused y: {}) = tuple;
|
||||
//@dump-sem-ir-end
|
||||
}
|
||||
|
||||
fn G() {
|
||||
//@dump-sem-ir-begin
|
||||
let tuple: ({}, {}) = ({}, {});
|
||||
var (x: {}, y: {}) = tuple;
|
||||
var (unused x: {}, unused y: {}) = tuple;
|
||||
//@dump-sem-ir-end
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ fn MakeTuple() -> ({}, {});
|
||||
|
||||
fn H() {
|
||||
//@dump-sem-ir-begin
|
||||
var (x: {}, y: {}) = MakeTuple();
|
||||
var (unused x: {}, unused y: {}) = MakeTuple();
|
||||
//@dump-sem-ir-end
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ library "[[@TEST_NAME]]";
|
||||
|
||||
fn F() {
|
||||
//@dump-sem-ir-begin
|
||||
let (x: {}, (y: {}, z: {})) = ({}, ({}, {}));
|
||||
let (unused x: {}, (unused y: {}, unused z: {})) = ({}, ({}, {}));
|
||||
//@dump-sem-ir-end
|
||||
}
|
||||
|
||||
@@ -121,74 +121,74 @@ let (a: {}, b: {}) = ({}, {}, {});
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %x.patt: %pattern_type.a96 = value_binding_pattern x [concrete]
|
||||
// CHECK:STDOUT: %y.patt: %pattern_type.a96 = value_binding_pattern y [concrete]
|
||||
// CHECK:STDOUT: %.loc6_20: %pattern_type.de4 = tuple_pattern (%x.patt, %y.patt) [concrete]
|
||||
// CHECK:STDOUT: %.loc6_34: %pattern_type.de4 = tuple_pattern (%x.patt, %y.patt) [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc6_26.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc6_30.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc6_31: %tuple.type.b6b = tuple_literal (%.loc6_26.1, %.loc6_30.1) [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc6_12.1: type = splice_block %.loc6_12.3 [concrete = constants.%empty_struct_type] {
|
||||
// CHECK:STDOUT: %.loc6_12.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc6_12.3: type = converted %.loc6_12.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %empty_struct.loc6_26: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc6_26.2: %empty_struct_type = converted %.loc6_26.1, %empty_struct.loc6_26 [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %x: %empty_struct_type = value_binding x, %.loc6_26.2
|
||||
// CHECK:STDOUT: %.loc6_40.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc6_44.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc6_45: %tuple.type.b6b = tuple_literal (%.loc6_40.1, %.loc6_44.1) [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc6_19.1: type = splice_block %.loc6_19.3 [concrete = constants.%empty_struct_type] {
|
||||
// CHECK:STDOUT: %.loc6_19.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc6_19.3: type = converted %.loc6_19.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %empty_struct.loc6_30: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc6_30.2: %empty_struct_type = converted %.loc6_30.1, %empty_struct.loc6_30 [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %y: %empty_struct_type = value_binding y, %.loc6_30.2
|
||||
// CHECK:STDOUT: %empty_struct.loc6_40: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc6_40.2: %empty_struct_type = converted %.loc6_40.1, %empty_struct.loc6_40 [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %x: %empty_struct_type = value_binding x, %.loc6_40.2
|
||||
// CHECK:STDOUT: %.loc6_33.1: type = splice_block %.loc6_33.3 [concrete = constants.%empty_struct_type] {
|
||||
// CHECK:STDOUT: %.loc6_33.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc6_33.3: type = converted %.loc6_33.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %empty_struct.loc6_44: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc6_44.2: %empty_struct_type = converted %.loc6_44.1, %empty_struct.loc6_44 [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %y: %empty_struct_type = value_binding y, %.loc6_44.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.a96 = ref_binding_pattern a [concrete]
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.a96 = ref_binding_pattern b [concrete]
|
||||
// CHECK:STDOUT: %.loc7_20: %pattern_type.de4 = tuple_pattern (%a.patt, %b.patt) [concrete]
|
||||
// CHECK:STDOUT: %.var_patt.loc7: %pattern_type.de4 = var_pattern %.loc7_20 [concrete]
|
||||
// CHECK:STDOUT: %.loc7_34: %pattern_type.de4 = tuple_pattern (%a.patt, %b.patt) [concrete]
|
||||
// CHECK:STDOUT: %.var_patt.loc7: %pattern_type.de4 = var_pattern %.loc7_34 [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.var.loc7: ref %tuple.type.b6b = var %.var_patt.loc7
|
||||
// CHECK:STDOUT: %tuple.elem0.loc7: ref %empty_struct_type = tuple_access %.var.loc7, element0
|
||||
// CHECK:STDOUT: %tuple.elem1.loc7: ref %empty_struct_type = tuple_access %.var.loc7, element1
|
||||
// CHECK:STDOUT: %.loc7_12.1: type = splice_block %.loc7_12.3 [concrete = constants.%empty_struct_type] {
|
||||
// CHECK:STDOUT: %.loc7_12.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc7_12.3: type = converted %.loc7_12.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %a: ref %empty_struct_type = ref_binding a, %tuple.elem0.loc7
|
||||
// CHECK:STDOUT: %.loc7_19.1: type = splice_block %.loc7_19.3 [concrete = constants.%empty_struct_type] {
|
||||
// CHECK:STDOUT: %.loc7_19.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc7_19.3: type = converted %.loc7_19.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %a: ref %empty_struct_type = ref_binding a, %tuple.elem0.loc7
|
||||
// CHECK:STDOUT: %.loc7_33.1: type = splice_block %.loc7_33.3 [concrete = constants.%empty_struct_type] {
|
||||
// CHECK:STDOUT: %.loc7_33.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc7_33.3: type = converted %.loc7_33.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %b: ref %empty_struct_type = ref_binding b, %tuple.elem1.loc7
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %c.patt: %pattern_type.a96 = ref_binding_pattern c [concrete]
|
||||
// CHECK:STDOUT: %d.patt: %pattern_type.a96 = ref_binding_pattern d [concrete]
|
||||
// CHECK:STDOUT: %.loc8_20: %pattern_type.de4 = tuple_pattern (%c.patt, %d.patt) [concrete]
|
||||
// CHECK:STDOUT: %.var_patt.loc8: %pattern_type.de4 = var_pattern %.loc8_20 [concrete]
|
||||
// CHECK:STDOUT: %.loc8_34: %pattern_type.de4 = tuple_pattern (%c.patt, %d.patt) [concrete]
|
||||
// CHECK:STDOUT: %.var_patt.loc8: %pattern_type.de4 = var_pattern %.loc8_34 [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.var.loc8: ref %tuple.type.b6b = var %.var_patt.loc8
|
||||
// CHECK:STDOUT: %.loc8_26.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc8_30.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc8_31.1: %tuple.type.b6b = tuple_literal (%.loc8_26.1, %.loc8_30.1) [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: %tuple.elem0.loc8_31: ref %empty_struct_type = tuple_access %.var.loc8, element0
|
||||
// CHECK:STDOUT: %.loc8_26.2: init %empty_struct_type = struct_init () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc8_31.2: init %empty_struct_type = converted %.loc8_26.1, %.loc8_26.2 [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %tuple.elem1.loc8_31: ref %empty_struct_type = tuple_access %.var.loc8, element1
|
||||
// CHECK:STDOUT: %.loc8_30.2: init %empty_struct_type = struct_init () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc8_31.3: init %empty_struct_type = converted %.loc8_30.1, %.loc8_30.2 [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc8_31.4: init %tuple.type.b6b to %.var.loc8 = tuple_init (%.loc8_31.2, %.loc8_31.3) [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc8_3: init %tuple.type.b6b = converted %.loc8_31.1, %.loc8_31.4 [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc8_40.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc8_44.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc8_45.1: %tuple.type.b6b = tuple_literal (%.loc8_40.1, %.loc8_44.1) [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: %tuple.elem0.loc8_45: ref %empty_struct_type = tuple_access %.var.loc8, element0
|
||||
// CHECK:STDOUT: %.loc8_40.2: init %empty_struct_type = struct_init () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc8_45.2: init %empty_struct_type = converted %.loc8_40.1, %.loc8_40.2 [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %tuple.elem1.loc8_45: ref %empty_struct_type = tuple_access %.var.loc8, element1
|
||||
// CHECK:STDOUT: %.loc8_44.2: init %empty_struct_type = struct_init () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc8_45.3: init %empty_struct_type = converted %.loc8_44.1, %.loc8_44.2 [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc8_45.4: init %tuple.type.b6b to %.var.loc8 = tuple_init (%.loc8_45.2, %.loc8_45.3) [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc8_3: init %tuple.type.b6b = converted %.loc8_45.1, %.loc8_45.4 [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: assign %.var.loc8, %.loc8_3
|
||||
// CHECK:STDOUT: %tuple.elem0.loc8_3: ref %empty_struct_type = tuple_access %.var.loc8, element0
|
||||
// CHECK:STDOUT: %tuple.elem1.loc8_3: ref %empty_struct_type = tuple_access %.var.loc8, element1
|
||||
// CHECK:STDOUT: %.loc8_12.1: type = splice_block %.loc8_12.3 [concrete = constants.%empty_struct_type] {
|
||||
// CHECK:STDOUT: %.loc8_12.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc8_12.3: type = converted %.loc8_12.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %c: ref %empty_struct_type = ref_binding c, %tuple.elem0.loc8_3
|
||||
// CHECK:STDOUT: %.loc8_19.1: type = splice_block %.loc8_19.3 [concrete = constants.%empty_struct_type] {
|
||||
// CHECK:STDOUT: %.loc8_19.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc8_19.3: type = converted %.loc8_19.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %c: ref %empty_struct_type = ref_binding c, %tuple.elem0.loc8_3
|
||||
// CHECK:STDOUT: %.loc8_33.1: type = splice_block %.loc8_33.3 [concrete = constants.%empty_struct_type] {
|
||||
// CHECK:STDOUT: %.loc8_33.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc8_33.3: type = converted %.loc8_33.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %d: ref %empty_struct_type = ref_binding d, %tuple.elem1.loc8_3
|
||||
// CHECK:STDOUT: %DestroyOp.bound.loc8: <bound method> = bound_method %.var.loc8, constants.%DestroyOp
|
||||
// CHECK:STDOUT: %DestroyOp.call.loc8: init %empty_tuple.type = call %DestroyOp.bound.loc8(%.var.loc8)
|
||||
@@ -249,33 +249,33 @@ let (a: {}, b: {}) = ({}, {}, {});
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %x.patt: %pattern_type.a96 = ref_binding_pattern x [concrete]
|
||||
// CHECK:STDOUT: %y.patt: %pattern_type.a96 = ref_binding_pattern y [concrete]
|
||||
// CHECK:STDOUT: %.loc7_20: %pattern_type.de4 = tuple_pattern (%x.patt, %y.patt) [concrete]
|
||||
// CHECK:STDOUT: %.var_patt: %pattern_type.de4 = var_pattern %.loc7_20 [concrete]
|
||||
// CHECK:STDOUT: %.loc7_34: %pattern_type.de4 = tuple_pattern (%x.patt, %y.patt) [concrete]
|
||||
// CHECK:STDOUT: %.var_patt: %pattern_type.de4 = var_pattern %.loc7_34 [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.var: ref %tuple.type.b6b = var %.var_patt
|
||||
// CHECK:STDOUT: %tuple.ref: ref %tuple.type.b6b = name_ref tuple, %tuple
|
||||
// CHECK:STDOUT: %tuple.elem0.loc7_24.1: ref %empty_struct_type = tuple_access %tuple.ref, element0
|
||||
// CHECK:STDOUT: %tuple.elem0.loc7_24.2: ref %empty_struct_type = tuple_access %.var, element0
|
||||
// CHECK:STDOUT: %.loc7_24.1: init %empty_struct_type = struct_init () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc7_24.2: init %empty_struct_type = converted %tuple.elem0.loc7_24.1, %.loc7_24.1 [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %tuple.elem1.loc7_24.1: ref %empty_struct_type = tuple_access %tuple.ref, element1
|
||||
// CHECK:STDOUT: %tuple.elem1.loc7_24.2: ref %empty_struct_type = tuple_access %.var, element1
|
||||
// CHECK:STDOUT: %.loc7_24.3: init %empty_struct_type = struct_init () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc7_24.4: init %empty_struct_type = converted %tuple.elem1.loc7_24.1, %.loc7_24.3 [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc7_24.5: init %tuple.type.b6b to %.var = tuple_init (%.loc7_24.2, %.loc7_24.4) [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc7_3: init %tuple.type.b6b = converted %tuple.ref, %.loc7_24.5 [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: %tuple.elem0.loc7_38.1: ref %empty_struct_type = tuple_access %tuple.ref, element0
|
||||
// CHECK:STDOUT: %tuple.elem0.loc7_38.2: ref %empty_struct_type = tuple_access %.var, element0
|
||||
// CHECK:STDOUT: %.loc7_38.1: init %empty_struct_type = struct_init () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc7_38.2: init %empty_struct_type = converted %tuple.elem0.loc7_38.1, %.loc7_38.1 [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %tuple.elem1.loc7_38.1: ref %empty_struct_type = tuple_access %tuple.ref, element1
|
||||
// CHECK:STDOUT: %tuple.elem1.loc7_38.2: ref %empty_struct_type = tuple_access %.var, element1
|
||||
// CHECK:STDOUT: %.loc7_38.3: init %empty_struct_type = struct_init () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc7_38.4: init %empty_struct_type = converted %tuple.elem1.loc7_38.1, %.loc7_38.3 [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc7_38.5: init %tuple.type.b6b to %.var = tuple_init (%.loc7_38.2, %.loc7_38.4) [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc7_3: init %tuple.type.b6b = converted %tuple.ref, %.loc7_38.5 [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: assign %.var, %.loc7_3
|
||||
// CHECK:STDOUT: %tuple.elem0.loc7_3: ref %empty_struct_type = tuple_access %.var, element0
|
||||
// CHECK:STDOUT: %tuple.elem1.loc7_3: ref %empty_struct_type = tuple_access %.var, element1
|
||||
// CHECK:STDOUT: %.loc7_12.1: type = splice_block %.loc7_12.3 [concrete = constants.%empty_struct_type] {
|
||||
// CHECK:STDOUT: %.loc7_12.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc7_12.3: type = converted %.loc7_12.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %x: ref %empty_struct_type = ref_binding x, %tuple.elem0.loc7_3
|
||||
// CHECK:STDOUT: %.loc7_19.1: type = splice_block %.loc7_19.3 [concrete = constants.%empty_struct_type] {
|
||||
// CHECK:STDOUT: %.loc7_19.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc7_19.3: type = converted %.loc7_19.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %x: ref %empty_struct_type = ref_binding x, %tuple.elem0.loc7_3
|
||||
// CHECK:STDOUT: %.loc7_33.1: type = splice_block %.loc7_33.3 [concrete = constants.%empty_struct_type] {
|
||||
// CHECK:STDOUT: %.loc7_33.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc7_33.3: type = converted %.loc7_33.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %y: ref %empty_struct_type = ref_binding y, %tuple.elem1.loc7_3
|
||||
// CHECK:STDOUT: %DestroyOp.bound.loc7: <bound method> = bound_method %.var, constants.%DestroyOp
|
||||
// CHECK:STDOUT: %DestroyOp.call.loc7: init %empty_tuple.type = call %DestroyOp.bound.loc7(%.var)
|
||||
@@ -312,33 +312,33 @@ let (a: {}, b: {}) = ({}, {}, {});
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %x.patt: %pattern_type.a96 = ref_binding_pattern x [concrete]
|
||||
// CHECK:STDOUT: %y.patt: %pattern_type.a96 = ref_binding_pattern y [concrete]
|
||||
// CHECK:STDOUT: %.loc14_20: %pattern_type.de4 = tuple_pattern (%x.patt, %y.patt) [concrete]
|
||||
// CHECK:STDOUT: %.var_patt: %pattern_type.de4 = var_pattern %.loc14_20 [concrete]
|
||||
// CHECK:STDOUT: %.loc14_34: %pattern_type.de4 = tuple_pattern (%x.patt, %y.patt) [concrete]
|
||||
// CHECK:STDOUT: %.var_patt: %pattern_type.de4 = var_pattern %.loc14_34 [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.var: ref %tuple.type.b6b = var %.var_patt
|
||||
// CHECK:STDOUT: %tuple.ref: %tuple.type.b6b = name_ref tuple, %tuple.loc13_7
|
||||
// CHECK:STDOUT: %tuple.elem0.loc14_24.1: %empty_struct_type = tuple_access %tuple.ref, element0
|
||||
// CHECK:STDOUT: %tuple.elem0.loc14_24.2: ref %empty_struct_type = tuple_access %.var, element0
|
||||
// CHECK:STDOUT: %.loc14_24.1: init %empty_struct_type = struct_init () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc14_24.2: init %empty_struct_type = converted %tuple.elem0.loc14_24.1, %.loc14_24.1 [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %tuple.elem1.loc14_24.1: %empty_struct_type = tuple_access %tuple.ref, element1
|
||||
// CHECK:STDOUT: %tuple.elem1.loc14_24.2: ref %empty_struct_type = tuple_access %.var, element1
|
||||
// CHECK:STDOUT: %.loc14_24.3: init %empty_struct_type = struct_init () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc14_24.4: init %empty_struct_type = converted %tuple.elem1.loc14_24.1, %.loc14_24.3 [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc14_24.5: init %tuple.type.b6b to %.var = tuple_init (%.loc14_24.2, %.loc14_24.4) [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc14_3: init %tuple.type.b6b = converted %tuple.ref, %.loc14_24.5 [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: %tuple.elem0.loc14_38.1: %empty_struct_type = tuple_access %tuple.ref, element0
|
||||
// CHECK:STDOUT: %tuple.elem0.loc14_38.2: ref %empty_struct_type = tuple_access %.var, element0
|
||||
// CHECK:STDOUT: %.loc14_38.1: init %empty_struct_type = struct_init () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc14_38.2: init %empty_struct_type = converted %tuple.elem0.loc14_38.1, %.loc14_38.1 [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %tuple.elem1.loc14_38.1: %empty_struct_type = tuple_access %tuple.ref, element1
|
||||
// CHECK:STDOUT: %tuple.elem1.loc14_38.2: ref %empty_struct_type = tuple_access %.var, element1
|
||||
// CHECK:STDOUT: %.loc14_38.3: init %empty_struct_type = struct_init () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc14_38.4: init %empty_struct_type = converted %tuple.elem1.loc14_38.1, %.loc14_38.3 [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc14_38.5: init %tuple.type.b6b to %.var = tuple_init (%.loc14_38.2, %.loc14_38.4) [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc14_3: init %tuple.type.b6b = converted %tuple.ref, %.loc14_38.5 [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: assign %.var, %.loc14_3
|
||||
// CHECK:STDOUT: %tuple.elem0.loc14_3: ref %empty_struct_type = tuple_access %.var, element0
|
||||
// CHECK:STDOUT: %tuple.elem1.loc14_3: ref %empty_struct_type = tuple_access %.var, element1
|
||||
// CHECK:STDOUT: %.loc14_12.1: type = splice_block %.loc14_12.3 [concrete = constants.%empty_struct_type] {
|
||||
// CHECK:STDOUT: %.loc14_12.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc14_12.3: type = converted %.loc14_12.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %x: ref %empty_struct_type = ref_binding x, %tuple.elem0.loc14_3
|
||||
// CHECK:STDOUT: %.loc14_19.1: type = splice_block %.loc14_19.3 [concrete = constants.%empty_struct_type] {
|
||||
// CHECK:STDOUT: %.loc14_19.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc14_19.3: type = converted %.loc14_19.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %x: ref %empty_struct_type = ref_binding x, %tuple.elem0.loc14_3
|
||||
// CHECK:STDOUT: %.loc14_33.1: type = splice_block %.loc14_33.3 [concrete = constants.%empty_struct_type] {
|
||||
// CHECK:STDOUT: %.loc14_33.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc14_33.3: type = converted %.loc14_33.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %y: ref %empty_struct_type = ref_binding y, %tuple.elem1.loc14_3
|
||||
// CHECK:STDOUT: %DestroyOp.bound: <bound method> = bound_method %.var, constants.%DestroyOp
|
||||
// CHECK:STDOUT: %DestroyOp.call: init %empty_tuple.type = call %DestroyOp.bound(%.var)
|
||||
@@ -350,8 +350,8 @@ let (a: {}, b: {}) = ({}, {}, {});
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %x.patt: %pattern_type.a96 = ref_binding_pattern x [concrete]
|
||||
// CHECK:STDOUT: %y.patt: %pattern_type.a96 = ref_binding_pattern y [concrete]
|
||||
// CHECK:STDOUT: %.loc22_20: %pattern_type.de4 = tuple_pattern (%x.patt, %y.patt) [concrete]
|
||||
// CHECK:STDOUT: %.var_patt: %pattern_type.de4 = var_pattern %.loc22_20 [concrete]
|
||||
// CHECK:STDOUT: %.loc22_34: %pattern_type.de4 = tuple_pattern (%x.patt, %y.patt) [concrete]
|
||||
// CHECK:STDOUT: %.var_patt: %pattern_type.de4 = var_pattern %.loc22_34 [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.var: ref %tuple.type.b6b = var %.var_patt
|
||||
// CHECK:STDOUT: %MakeTuple.ref: %MakeTuple.type = name_ref MakeTuple, file.%MakeTuple.decl [concrete = constants.%MakeTuple]
|
||||
@@ -360,15 +360,15 @@ let (a: {}, b: {}) = ({}, {}, {});
|
||||
// CHECK:STDOUT: assign %.var, %MakeTuple.call
|
||||
// CHECK:STDOUT: %tuple.elem0: ref %empty_struct_type = tuple_access %.var, element0
|
||||
// CHECK:STDOUT: %tuple.elem1: ref %empty_struct_type = tuple_access %.var, element1
|
||||
// CHECK:STDOUT: %.loc22_12.1: type = splice_block %.loc22_12.3 [concrete = constants.%empty_struct_type] {
|
||||
// CHECK:STDOUT: %.loc22_12.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc22_12.3: type = converted %.loc22_12.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %x: ref %empty_struct_type = ref_binding x, %tuple.elem0
|
||||
// CHECK:STDOUT: %.loc22_19.1: type = splice_block %.loc22_19.3 [concrete = constants.%empty_struct_type] {
|
||||
// CHECK:STDOUT: %.loc22_19.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc22_19.3: type = converted %.loc22_19.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %x: ref %empty_struct_type = ref_binding x, %tuple.elem0
|
||||
// CHECK:STDOUT: %.loc22_33.1: type = splice_block %.loc22_33.3 [concrete = constants.%empty_struct_type] {
|
||||
// CHECK:STDOUT: %.loc22_33.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc22_33.3: type = converted %.loc22_33.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %y: ref %empty_struct_type = ref_binding y, %tuple.elem1
|
||||
// CHECK:STDOUT: %DestroyOp.bound: <bound method> = bound_method %.var, constants.%DestroyOp
|
||||
// CHECK:STDOUT: %DestroyOp.call: init %empty_tuple.type = call %DestroyOp.bound(%.var)
|
||||
@@ -398,35 +398,35 @@ let (a: {}, b: {}) = ({}, {}, {});
|
||||
// CHECK:STDOUT: %x.patt: %pattern_type.a96 = value_binding_pattern x [concrete]
|
||||
// CHECK:STDOUT: %y.patt: %pattern_type.a96 = value_binding_pattern y [concrete]
|
||||
// CHECK:STDOUT: %z.patt: %pattern_type.a96 = value_binding_pattern z [concrete]
|
||||
// CHECK:STDOUT: %.loc6_28: %pattern_type.de4 = tuple_pattern (%y.patt, %z.patt) [concrete]
|
||||
// CHECK:STDOUT: %.loc6_29: %pattern_type.361 = tuple_pattern (%x.patt, %.loc6_28) [concrete]
|
||||
// CHECK:STDOUT: %.loc6_49: %pattern_type.de4 = tuple_pattern (%y.patt, %z.patt) [concrete]
|
||||
// CHECK:STDOUT: %.loc6_50: %pattern_type.361 = tuple_pattern (%x.patt, %.loc6_49) [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc6_35.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc6_40.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc6_44.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc6_45: %tuple.type.b6b = tuple_literal (%.loc6_40.1, %.loc6_44.1) [concrete = constants.%tuple.9a3]
|
||||
// CHECK:STDOUT: %.loc6_46: %tuple.type.6ca = tuple_literal (%.loc6_35.1, %.loc6_45) [concrete = constants.%tuple.56c]
|
||||
// CHECK:STDOUT: %.loc6_12.1: type = splice_block %.loc6_12.3 [concrete = constants.%empty_struct_type] {
|
||||
// CHECK:STDOUT: %.loc6_12.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc6_12.3: type = converted %.loc6_12.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: %.loc6_56.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc6_61.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc6_65.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc6_66: %tuple.type.b6b = tuple_literal (%.loc6_61.1, %.loc6_65.1) [concrete = constants.%tuple.9a3]
|
||||
// CHECK:STDOUT: %.loc6_67: %tuple.type.6ca = tuple_literal (%.loc6_56.1, %.loc6_66) [concrete = constants.%tuple.56c]
|
||||
// CHECK:STDOUT: %.loc6_19.1: type = splice_block %.loc6_19.3 [concrete = constants.%empty_struct_type] {
|
||||
// CHECK:STDOUT: %.loc6_19.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc6_19.3: type = converted %.loc6_19.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %empty_struct.loc6_35: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc6_35.2: %empty_struct_type = converted %.loc6_35.1, %empty_struct.loc6_35 [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %x: %empty_struct_type = value_binding x, %.loc6_35.2
|
||||
// CHECK:STDOUT: %.loc6_20.1: type = splice_block %.loc6_20.3 [concrete = constants.%empty_struct_type] {
|
||||
// CHECK:STDOUT: %.loc6_20.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc6_20.3: type = converted %.loc6_20.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: %empty_struct.loc6_56: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc6_56.2: %empty_struct_type = converted %.loc6_56.1, %empty_struct.loc6_56 [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %x: %empty_struct_type = value_binding x, %.loc6_56.2
|
||||
// CHECK:STDOUT: %.loc6_34.1: type = splice_block %.loc6_34.3 [concrete = constants.%empty_struct_type] {
|
||||
// CHECK:STDOUT: %.loc6_34.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc6_34.3: type = converted %.loc6_34.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %empty_struct.loc6_40: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc6_40.2: %empty_struct_type = converted %.loc6_40.1, %empty_struct.loc6_40 [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %y: %empty_struct_type = value_binding y, %.loc6_40.2
|
||||
// CHECK:STDOUT: %.loc6_27.1: type = splice_block %.loc6_27.3 [concrete = constants.%empty_struct_type] {
|
||||
// CHECK:STDOUT: %.loc6_27.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc6_27.3: type = converted %.loc6_27.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: %empty_struct.loc6_61: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc6_61.2: %empty_struct_type = converted %.loc6_61.1, %empty_struct.loc6_61 [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %y: %empty_struct_type = value_binding y, %.loc6_61.2
|
||||
// CHECK:STDOUT: %.loc6_48.1: type = splice_block %.loc6_48.3 [concrete = constants.%empty_struct_type] {
|
||||
// CHECK:STDOUT: %.loc6_48.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc6_48.3: type = converted %.loc6_48.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %empty_struct.loc6_44: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc6_44.2: %empty_struct_type = converted %.loc6_44.1, %empty_struct.loc6_44 [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %z: %empty_struct_type = value_binding z, %.loc6_44.2
|
||||
// CHECK:STDOUT: %empty_struct.loc6_65: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc6_65.2: %empty_struct_type = converted %.loc6_65.1, %empty_struct.loc6_65 [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %z: %empty_struct_type = value_binding z, %.loc6_65.2
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
Reference in New Issue
Block a user