mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Support accessing associated functions by member access into facets (#4872)
For an expression such as `(Type as Interface).AssocFn()`, track the `Self` type `Type` in the result of the member access so that it's available when checking the function call. This introduces a new kind of type, `ImplFunctionType`, that represents the type of a function that is expected within an impl, modeled as the type of the function within the interface plus a value to use as `Self`. Calls to values of this type behave like calls to the underlying function except that the `Self` parameter is pre-bound to the self type from the facet. In order to support this, fix an issue where the imported list of generic bindings lost their association with their enclosing generic. This adds a little complexity to `import_ref`, including a new recursive cycle that I intend to address in a follow-up PR. --------- Co-authored-by: Jon Ross-Perkins <jperkins@google.com>
This commit is contained in:
co-authored by
Jon Ross-Perkins
parent
dcfccd3187
commit
fcfb1345d5
+51
-48
@@ -34,10 +34,13 @@ fn Main() {
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_12.6a3: Core.IntLiteral = int_value 12 [template]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [template]
|
||||
// CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [template]
|
||||
// CHECK:STDOUT: %impl_witness.d39: <witness> = impl_witness (imports.%Core.import_ref.a5b), @impl.1(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.1(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [template]
|
||||
// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, %impl_witness.d39 [template]
|
||||
// CHECK:STDOUT: %.a0b: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [template]
|
||||
// CHECK:STDOUT: %Convert.bound.221: <bound method> = bound_method %int_12.6a3, %Convert.956 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.9a9: <specific function> = specific_function %Convert.bound.221, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_12.1e1: %i32 = int_value 12 [template]
|
||||
@@ -107,10 +110,10 @@ fn Main() {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %a.var: ref %i32 = var a
|
||||
// CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.6a3]
|
||||
// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.1b6 = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %Convert.bound.loc12: <bound method> = bound_method %int_12, %impl.elem0.loc12 [template = constants.%Convert.bound.221]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc12: <specific function> = specific_function %Convert.bound.loc12, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.9a9]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %Convert.specific_fn.loc12(%int_12) [template = constants.%int_12.1e1]
|
||||
// CHECK:STDOUT: %impl.elem0.loc12: %.a0b = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %bound_method.loc12: <bound method> = bound_method %int_12, %impl.elem0.loc12 [template = constants.%Convert.bound.221]
|
||||
// CHECK:STDOUT: %specific_fn.loc12: <specific function> = specific_function %bound_method.loc12, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.9a9]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %specific_fn.loc12(%int_12) [template = constants.%int_12.1e1]
|
||||
// CHECK:STDOUT: %.loc12_3.2: init %i32 = converted %int_12, %int.convert_checked.loc12 [template = constants.%int_12.1e1]
|
||||
// CHECK:STDOUT: assign %a.var, %.loc12_3.2
|
||||
// CHECK:STDOUT: %.loc12_10: type = splice_block %i32.loc12 [template = constants.%i32] {
|
||||
@@ -120,10 +123,10 @@ fn Main() {
|
||||
// CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var
|
||||
// CHECK:STDOUT: %a.ref.loc13: ref %i32 = name_ref a, %a
|
||||
// CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [template = constants.%int_9.988]
|
||||
// CHECK:STDOUT: %impl.elem0.loc13: %Convert.type.1b6 = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %Convert.bound.loc13: <bound method> = bound_method %int_9, %impl.elem0.loc13 [template = constants.%Convert.bound.9e2]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc13: <specific function> = specific_function %Convert.bound.loc13, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.b02]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %Convert.specific_fn.loc13(%int_9) [template = constants.%int_9.f88]
|
||||
// CHECK:STDOUT: %impl.elem0.loc13: %.a0b = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %bound_method.loc13: <bound method> = bound_method %int_9, %impl.elem0.loc13 [template = constants.%Convert.bound.9e2]
|
||||
// CHECK:STDOUT: %specific_fn.loc13: <specific function> = specific_function %bound_method.loc13, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.b02]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %specific_fn.loc13(%int_9) [template = constants.%int_9.f88]
|
||||
// CHECK:STDOUT: %.loc13: init %i32 = converted %int_9, %int.convert_checked.loc13 [template = constants.%int_9.f88]
|
||||
// CHECK:STDOUT: assign %a.ref.loc13, %.loc13
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
@@ -134,17 +137,17 @@ fn Main() {
|
||||
// CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [template = constants.%int_1.5b8]
|
||||
// CHECK:STDOUT: %int_2.loc15: Core.IntLiteral = int_value 2 [template = constants.%int_2.ecc]
|
||||
// CHECK:STDOUT: %.loc15_28.1: %tuple.type.f94 = tuple_literal (%int_1.loc15, %int_2.loc15)
|
||||
// CHECK:STDOUT: %impl.elem0.loc15_28.1: %Convert.type.1b6 = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %Convert.bound.loc15_28.1: <bound method> = bound_method %int_1.loc15, %impl.elem0.loc15_28.1 [template = constants.%Convert.bound.ab5]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc15_28.1: <specific function> = specific_function %Convert.bound.loc15_28.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.70c]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc15_28.1: init %i32 = call %Convert.specific_fn.loc15_28.1(%int_1.loc15) [template = constants.%int_1.5d2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc15_28.1: %.a0b = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %bound_method.loc15_28.1: <bound method> = bound_method %int_1.loc15, %impl.elem0.loc15_28.1 [template = constants.%Convert.bound.ab5]
|
||||
// CHECK:STDOUT: %specific_fn.loc15_28.1: <specific function> = specific_function %bound_method.loc15_28.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.70c]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc15_28.1: init %i32 = call %specific_fn.loc15_28.1(%int_1.loc15) [template = constants.%int_1.5d2]
|
||||
// CHECK:STDOUT: %.loc15_28.2: init %i32 = converted %int_1.loc15, %int.convert_checked.loc15_28.1 [template = constants.%int_1.5d2]
|
||||
// CHECK:STDOUT: %tuple.elem0.loc15: ref %i32 = tuple_access %b.var, element0
|
||||
// CHECK:STDOUT: %.loc15_28.3: init %i32 = initialize_from %.loc15_28.2 to %tuple.elem0.loc15 [template = constants.%int_1.5d2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc15_28.2: %Convert.type.1b6 = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %Convert.bound.loc15_28.2: <bound method> = bound_method %int_2.loc15, %impl.elem0.loc15_28.2 [template = constants.%Convert.bound.ef9]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc15_28.2: <specific function> = specific_function %Convert.bound.loc15_28.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.787]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc15_28.2: init %i32 = call %Convert.specific_fn.loc15_28.2(%int_2.loc15) [template = constants.%int_2.ef8]
|
||||
// CHECK:STDOUT: %impl.elem0.loc15_28.2: %.a0b = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %bound_method.loc15_28.2: <bound method> = bound_method %int_2.loc15, %impl.elem0.loc15_28.2 [template = constants.%Convert.bound.ef9]
|
||||
// CHECK:STDOUT: %specific_fn.loc15_28.2: <specific function> = specific_function %bound_method.loc15_28.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.787]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc15_28.2: init %i32 = call %specific_fn.loc15_28.2(%int_2.loc15) [template = constants.%int_2.ef8]
|
||||
// CHECK:STDOUT: %.loc15_28.4: init %i32 = converted %int_2.loc15, %int.convert_checked.loc15_28.2 [template = constants.%int_2.ef8]
|
||||
// CHECK:STDOUT: %tuple.elem1.loc15: ref %i32 = tuple_access %b.var, element1
|
||||
// CHECK:STDOUT: %.loc15_28.5: init %i32 = initialize_from %.loc15_28.4 to %tuple.elem1.loc15 [template = constants.%int_2.ef8]
|
||||
@@ -164,20 +167,20 @@ fn Main() {
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0]
|
||||
// CHECK:STDOUT: %tuple.elem0.loc16: ref %i32 = tuple_access %b.ref.loc16, element0
|
||||
// CHECK:STDOUT: %int_3.loc16: Core.IntLiteral = int_value 3 [template = constants.%int_3.1ba]
|
||||
// CHECK:STDOUT: %impl.elem0.loc16: %Convert.type.1b6 = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %Convert.bound.loc16: <bound method> = bound_method %int_3.loc16, %impl.elem0.loc16 [template = constants.%Convert.bound.b30]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc16: <specific function> = specific_function %Convert.bound.loc16, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.b42]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc16: init %i32 = call %Convert.specific_fn.loc16(%int_3.loc16) [template = constants.%int_3.822]
|
||||
// CHECK:STDOUT: %impl.elem0.loc16: %.a0b = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %bound_method.loc16: <bound method> = bound_method %int_3.loc16, %impl.elem0.loc16 [template = constants.%Convert.bound.b30]
|
||||
// CHECK:STDOUT: %specific_fn.loc16: <specific function> = specific_function %bound_method.loc16, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.b42]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc16: init %i32 = call %specific_fn.loc16(%int_3.loc16) [template = constants.%int_3.822]
|
||||
// CHECK:STDOUT: %.loc16: init %i32 = converted %int_3.loc16, %int.convert_checked.loc16 [template = constants.%int_3.822]
|
||||
// CHECK:STDOUT: assign %tuple.elem0.loc16, %.loc16
|
||||
// CHECK:STDOUT: %b.ref.loc17: ref %tuple.type.d07 = name_ref b, %b
|
||||
// CHECK:STDOUT: %int_1.loc17: Core.IntLiteral = int_value 1 [template = constants.%int_1.5b8]
|
||||
// CHECK:STDOUT: %tuple.elem1.loc17: ref %i32 = tuple_access %b.ref.loc17, element1
|
||||
// CHECK:STDOUT: %int_4.loc17: Core.IntLiteral = int_value 4 [template = constants.%int_4.0c1]
|
||||
// CHECK:STDOUT: %impl.elem0.loc17: %Convert.type.1b6 = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %Convert.bound.loc17: <bound method> = bound_method %int_4.loc17, %impl.elem0.loc17 [template = constants.%Convert.bound.ac3]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc17: <specific function> = specific_function %Convert.bound.loc17, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.450]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc17: init %i32 = call %Convert.specific_fn.loc17(%int_4.loc17) [template = constants.%int_4.940]
|
||||
// CHECK:STDOUT: %impl.elem0.loc17: %.a0b = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %bound_method.loc17: <bound method> = bound_method %int_4.loc17, %impl.elem0.loc17 [template = constants.%Convert.bound.ac3]
|
||||
// CHECK:STDOUT: %specific_fn.loc17: <specific function> = specific_function %bound_method.loc17, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.450]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc17: init %i32 = call %specific_fn.loc17(%int_4.loc17) [template = constants.%int_4.940]
|
||||
// CHECK:STDOUT: %.loc17: init %i32 = converted %int_4.loc17, %int.convert_checked.loc17 [template = constants.%int_4.940]
|
||||
// CHECK:STDOUT: assign %tuple.elem1.loc17, %.loc17
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
@@ -188,17 +191,17 @@ fn Main() {
|
||||
// CHECK:STDOUT: %int_1.loc19: Core.IntLiteral = int_value 1 [template = constants.%int_1.5b8]
|
||||
// CHECK:STDOUT: %int_2.loc19: Core.IntLiteral = int_value 2 [template = constants.%int_2.ecc]
|
||||
// CHECK:STDOUT: %.loc19_46.1: %struct_type.a.b.cfd = struct_literal (%int_1.loc19, %int_2.loc19)
|
||||
// CHECK:STDOUT: %impl.elem0.loc19_46.1: %Convert.type.1b6 = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %Convert.bound.loc19_46.1: <bound method> = bound_method %int_1.loc19, %impl.elem0.loc19_46.1 [template = constants.%Convert.bound.ab5]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc19_46.1: <specific function> = specific_function %Convert.bound.loc19_46.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.70c]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc19_46.1: init %i32 = call %Convert.specific_fn.loc19_46.1(%int_1.loc19) [template = constants.%int_1.5d2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc19_46.1: %.a0b = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %bound_method.loc19_46.1: <bound method> = bound_method %int_1.loc19, %impl.elem0.loc19_46.1 [template = constants.%Convert.bound.ab5]
|
||||
// CHECK:STDOUT: %specific_fn.loc19_46.1: <specific function> = specific_function %bound_method.loc19_46.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.70c]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc19_46.1: init %i32 = call %specific_fn.loc19_46.1(%int_1.loc19) [template = constants.%int_1.5d2]
|
||||
// CHECK:STDOUT: %.loc19_46.2: init %i32 = converted %int_1.loc19, %int.convert_checked.loc19_46.1 [template = constants.%int_1.5d2]
|
||||
// CHECK:STDOUT: %.loc19_46.3: ref %i32 = struct_access %c.var, element0
|
||||
// CHECK:STDOUT: %.loc19_46.4: init %i32 = initialize_from %.loc19_46.2 to %.loc19_46.3 [template = constants.%int_1.5d2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc19_46.2: %Convert.type.1b6 = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %Convert.bound.loc19_46.2: <bound method> = bound_method %int_2.loc19, %impl.elem0.loc19_46.2 [template = constants.%Convert.bound.ef9]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc19_46.2: <specific function> = specific_function %Convert.bound.loc19_46.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.787]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc19_46.2: init %i32 = call %Convert.specific_fn.loc19_46.2(%int_2.loc19) [template = constants.%int_2.ef8]
|
||||
// CHECK:STDOUT: %impl.elem0.loc19_46.2: %.a0b = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %bound_method.loc19_46.2: <bound method> = bound_method %int_2.loc19, %impl.elem0.loc19_46.2 [template = constants.%Convert.bound.ef9]
|
||||
// CHECK:STDOUT: %specific_fn.loc19_46.2: <specific function> = specific_function %bound_method.loc19_46.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.787]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc19_46.2: init %i32 = call %specific_fn.loc19_46.2(%int_2.loc19) [template = constants.%int_2.ef8]
|
||||
// CHECK:STDOUT: %.loc19_46.5: init %i32 = converted %int_2.loc19, %int.convert_checked.loc19_46.2 [template = constants.%int_2.ef8]
|
||||
// CHECK:STDOUT: %.loc19_46.6: ref %i32 = struct_access %c.var, element1
|
||||
// CHECK:STDOUT: %.loc19_46.7: init %i32 = initialize_from %.loc19_46.5 to %.loc19_46.6 [template = constants.%int_2.ef8]
|
||||
@@ -216,19 +219,19 @@ fn Main() {
|
||||
// CHECK:STDOUT: %c.ref.loc20: ref %struct_type.a.b.501 = name_ref c, %c
|
||||
// CHECK:STDOUT: %.loc20_4: ref %i32 = struct_access %c.ref.loc20, element0
|
||||
// CHECK:STDOUT: %int_3.loc20: Core.IntLiteral = int_value 3 [template = constants.%int_3.1ba]
|
||||
// CHECK:STDOUT: %impl.elem0.loc20: %Convert.type.1b6 = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %Convert.bound.loc20: <bound method> = bound_method %int_3.loc20, %impl.elem0.loc20 [template = constants.%Convert.bound.b30]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc20: <specific function> = specific_function %Convert.bound.loc20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.b42]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc20: init %i32 = call %Convert.specific_fn.loc20(%int_3.loc20) [template = constants.%int_3.822]
|
||||
// CHECK:STDOUT: %impl.elem0.loc20: %.a0b = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %bound_method.loc20: <bound method> = bound_method %int_3.loc20, %impl.elem0.loc20 [template = constants.%Convert.bound.b30]
|
||||
// CHECK:STDOUT: %specific_fn.loc20: <specific function> = specific_function %bound_method.loc20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.b42]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc20: init %i32 = call %specific_fn.loc20(%int_3.loc20) [template = constants.%int_3.822]
|
||||
// CHECK:STDOUT: %.loc20_7: init %i32 = converted %int_3.loc20, %int.convert_checked.loc20 [template = constants.%int_3.822]
|
||||
// CHECK:STDOUT: assign %.loc20_4, %.loc20_7
|
||||
// CHECK:STDOUT: %c.ref.loc21: ref %struct_type.a.b.501 = name_ref c, %c
|
||||
// CHECK:STDOUT: %.loc21_4: ref %i32 = struct_access %c.ref.loc21, element1
|
||||
// CHECK:STDOUT: %int_4.loc21: Core.IntLiteral = int_value 4 [template = constants.%int_4.0c1]
|
||||
// CHECK:STDOUT: %impl.elem0.loc21: %Convert.type.1b6 = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %Convert.bound.loc21: <bound method> = bound_method %int_4.loc21, %impl.elem0.loc21 [template = constants.%Convert.bound.ac3]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc21: <specific function> = specific_function %Convert.bound.loc21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.450]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc21: init %i32 = call %Convert.specific_fn.loc21(%int_4.loc21) [template = constants.%int_4.940]
|
||||
// CHECK:STDOUT: %impl.elem0.loc21: %.a0b = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %bound_method.loc21: <bound method> = bound_method %int_4.loc21, %impl.elem0.loc21 [template = constants.%Convert.bound.ac3]
|
||||
// CHECK:STDOUT: %specific_fn.loc21: <specific function> = specific_function %bound_method.loc21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.450]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc21: init %i32 = call %specific_fn.loc21(%int_4.loc21) [template = constants.%int_4.940]
|
||||
// CHECK:STDOUT: %.loc21_7: init %i32 = converted %int_4.loc21, %int.convert_checked.loc21 [template = constants.%int_4.940]
|
||||
// CHECK:STDOUT: assign %.loc21_4, %.loc21_7
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
@@ -249,10 +252,10 @@ fn Main() {
|
||||
// CHECK:STDOUT: %.loc24_4: %ptr.235 = bind_value %p.ref.loc24
|
||||
// CHECK:STDOUT: %.loc24_3: ref %i32 = deref %.loc24_4
|
||||
// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.64b]
|
||||
// CHECK:STDOUT: %impl.elem0.loc24: %Convert.type.1b6 = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %Convert.bound.loc24: <bound method> = bound_method %int_5, %impl.elem0.loc24 [template = constants.%Convert.bound.4e6]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc24: <specific function> = specific_function %Convert.bound.loc24, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.ba9]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc24: init %i32 = call %Convert.specific_fn.loc24(%int_5) [template = constants.%int_5.0f6]
|
||||
// CHECK:STDOUT: %impl.elem0.loc24: %.a0b = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %bound_method.loc24: <bound method> = bound_method %int_5, %impl.elem0.loc24 [template = constants.%Convert.bound.4e6]
|
||||
// CHECK:STDOUT: %specific_fn.loc24: <specific function> = specific_function %bound_method.loc24, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.ba9]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc24: init %i32 = call %specific_fn.loc24(%int_5) [template = constants.%int_5.0f6]
|
||||
// CHECK:STDOUT: %.loc24_6: init %i32 = converted %int_5, %int.convert_checked.loc24 [template = constants.%int_5.0f6]
|
||||
// CHECK:STDOUT: assign %.loc24_3, %.loc24_6
|
||||
// CHECK:STDOUT: %true: bool = bool_literal true [template = constants.%true]
|
||||
@@ -272,10 +275,10 @@ fn Main() {
|
||||
// CHECK:STDOUT: %.loc26_5: %ptr.235 = block_arg !if.expr.result
|
||||
// CHECK:STDOUT: %.loc26_3: ref %i32 = deref %.loc26_5
|
||||
// CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [template = constants.%int_10.64f]
|
||||
// CHECK:STDOUT: %impl.elem0.loc26: %Convert.type.1b6 = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %Convert.bound.loc26: <bound method> = bound_method %int_10, %impl.elem0.loc26 [template = constants.%Convert.bound.491]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc26: <specific function> = specific_function %Convert.bound.loc26, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.e67]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc26: init %i32 = call %Convert.specific_fn.loc26(%int_10) [template = constants.%int_10.265]
|
||||
// CHECK:STDOUT: %impl.elem0.loc26: %.a0b = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %bound_method.loc26: <bound method> = bound_method %int_10, %impl.elem0.loc26 [template = constants.%Convert.bound.491]
|
||||
// CHECK:STDOUT: %specific_fn.loc26: <specific function> = specific_function %bound_method.loc26, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.e67]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc26: init %i32 = call %specific_fn.loc26(%int_10) [template = constants.%int_10.265]
|
||||
// CHECK:STDOUT: %.loc26_29: init %i32 = converted %int_10, %int.convert_checked.loc26 [template = constants.%int_10.265]
|
||||
// CHECK:STDOUT: assign %.loc26_3, %.loc26_29
|
||||
// CHECK:STDOUT: return
|
||||
|
||||
+35
-32
@@ -68,10 +68,13 @@ fn Main() {
|
||||
// CHECK:STDOUT: %Main: %Main.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [template]
|
||||
// CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [template]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [template]
|
||||
// CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [template]
|
||||
// CHECK:STDOUT: %impl_witness.d39: <witness> = impl_witness (imports.%Core.import_ref.a5b), @impl.1(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.1(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [template]
|
||||
// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, %impl_witness.d39 [template]
|
||||
// CHECK:STDOUT: %.a0b: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [template]
|
||||
// CHECK:STDOUT: %Convert.bound.ab5: <bound method> = bound_method %int_1.5b8, %Convert.956 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.70c: <specific function> = specific_function %Convert.bound.ab5, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [template]
|
||||
@@ -141,10 +144,10 @@ fn Main() {
|
||||
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F]
|
||||
// CHECK:STDOUT: %F.call: init %i32 = call %F.ref()
|
||||
// CHECK:STDOUT: %int_1.loc23: Core.IntLiteral = int_value 1 [template = constants.%int_1.5b8]
|
||||
// CHECK:STDOUT: %impl.elem0.loc23: %Convert.type.1b6 = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %Convert.bound.loc23: <bound method> = bound_method %int_1.loc23, %impl.elem0.loc23 [template = constants.%Convert.bound.ab5]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc23: <specific function> = specific_function %Convert.bound.loc23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.70c]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc23: init %i32 = call %Convert.specific_fn.loc23(%int_1.loc23) [template = constants.%int_1.5d2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc23: %.a0b = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %bound_method.loc23: <bound method> = bound_method %int_1.loc23, %impl.elem0.loc23 [template = constants.%Convert.bound.ab5]
|
||||
// CHECK:STDOUT: %specific_fn.loc23: <specific function> = specific_function %bound_method.loc23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.70c]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc23: init %i32 = call %specific_fn.loc23(%int_1.loc23) [template = constants.%int_1.5d2]
|
||||
// CHECK:STDOUT: %.loc23: init %i32 = converted %int_1.loc23, %int.convert_checked.loc23 [template = constants.%int_1.5d2]
|
||||
// CHECK:STDOUT: assign %F.call, %.loc23
|
||||
// CHECK:STDOUT: %int_1.loc28: Core.IntLiteral = int_value 1 [template = constants.%int_1.5b8]
|
||||
@@ -168,10 +171,10 @@ fn Main() {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %n.var: ref %i32 = var n
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.5c6]
|
||||
// CHECK:STDOUT: %impl.elem0.loc29: %Convert.type.1b6 = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %Convert.bound.loc29: <bound method> = bound_method %int_0, %impl.elem0.loc29 [template = constants.%Convert.bound.d04]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc29: <specific function> = specific_function %Convert.bound.loc29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.d62]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc29: init %i32 = call %Convert.specific_fn.loc29(%int_0) [template = constants.%int_0.6a9]
|
||||
// CHECK:STDOUT: %impl.elem0.loc29: %.a0b = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %bound_method.loc29: <bound method> = bound_method %int_0, %impl.elem0.loc29 [template = constants.%Convert.bound.d04]
|
||||
// CHECK:STDOUT: %specific_fn.loc29: <specific function> = specific_function %bound_method.loc29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.d62]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc29: init %i32 = call %specific_fn.loc29(%int_0) [template = constants.%int_0.6a9]
|
||||
// CHECK:STDOUT: %.loc29_3.2: init %i32 = converted %int_0, %int.convert_checked.loc29 [template = constants.%int_0.6a9]
|
||||
// CHECK:STDOUT: assign %n.var, %.loc29_3.2
|
||||
// CHECK:STDOUT: %.loc29_10: type = splice_block %i32.loc29 [template = constants.%i32] {
|
||||
@@ -185,17 +188,17 @@ fn Main() {
|
||||
// CHECK:STDOUT: %int_1.loc34: Core.IntLiteral = int_value 1 [template = constants.%int_1.5b8]
|
||||
// CHECK:STDOUT: %int_2.loc34: Core.IntLiteral = int_value 2 [template = constants.%int_2.ecc]
|
||||
// CHECK:STDOUT: %.loc34_17.1: %tuple.type.f94 = tuple_literal (%int_1.loc34, %int_2.loc34)
|
||||
// CHECK:STDOUT: %impl.elem0.loc34_17.1: %Convert.type.1b6 = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %Convert.bound.loc34_17.1: <bound method> = bound_method %int_1.loc34, %impl.elem0.loc34_17.1 [template = constants.%Convert.bound.ab5]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc34_17.1: <specific function> = specific_function %Convert.bound.loc34_17.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.70c]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc34_17.1: init %i32 = call %Convert.specific_fn.loc34_17.1(%int_1.loc34) [template = constants.%int_1.5d2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc34_17.1: %.a0b = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %bound_method.loc34_17.1: <bound method> = bound_method %int_1.loc34, %impl.elem0.loc34_17.1 [template = constants.%Convert.bound.ab5]
|
||||
// CHECK:STDOUT: %specific_fn.loc34_17.1: <specific function> = specific_function %bound_method.loc34_17.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.70c]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc34_17.1: init %i32 = call %specific_fn.loc34_17.1(%int_1.loc34) [template = constants.%int_1.5d2]
|
||||
// CHECK:STDOUT: %.loc34_17.2: init %i32 = converted %int_1.loc34, %int.convert_checked.loc34_17.1 [template = constants.%int_1.5d2]
|
||||
// CHECK:STDOUT: %tuple.elem0.loc34: %i32 = tuple_access %.loc34_8.1, element0
|
||||
// CHECK:STDOUT: %.loc34_17.3: init %i32 = initialize_from %.loc34_17.2 to %tuple.elem0.loc34 [template = constants.%int_1.5d2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc34_17.2: %Convert.type.1b6 = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %Convert.bound.loc34_17.2: <bound method> = bound_method %int_2.loc34, %impl.elem0.loc34_17.2 [template = constants.%Convert.bound.ef9]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc34_17.2: <specific function> = specific_function %Convert.bound.loc34_17.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.787]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc34_17.2: init %i32 = call %Convert.specific_fn.loc34_17.2(%int_2.loc34) [template = constants.%int_2.ef8]
|
||||
// CHECK:STDOUT: %impl.elem0.loc34_17.2: %.a0b = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %bound_method.loc34_17.2: <bound method> = bound_method %int_2.loc34, %impl.elem0.loc34_17.2 [template = constants.%Convert.bound.ef9]
|
||||
// CHECK:STDOUT: %specific_fn.loc34_17.2: <specific function> = specific_function %bound_method.loc34_17.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.787]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc34_17.2: init %i32 = call %specific_fn.loc34_17.2(%int_2.loc34) [template = constants.%int_2.ef8]
|
||||
// CHECK:STDOUT: %.loc34_17.4: init %i32 = converted %int_2.loc34, %int.convert_checked.loc34_17.2 [template = constants.%int_2.ef8]
|
||||
// CHECK:STDOUT: %tuple.elem1.loc34: %i32 = tuple_access %.loc34_8.1, element1
|
||||
// CHECK:STDOUT: %.loc34_17.5: init %i32 = initialize_from %.loc34_17.4 to %tuple.elem1.loc34 [template = constants.%int_2.ef8]
|
||||
@@ -234,20 +237,20 @@ fn Main() {
|
||||
// CHECK:STDOUT: %int_1.loc49: Core.IntLiteral = int_value 1 [template = constants.%int_1.5b8]
|
||||
// CHECK:STDOUT: %int_32.loc49: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc49: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %impl.elem0.loc49_12: %Convert.type.1b6 = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %Convert.bound.loc49_12: <bound method> = bound_method %int_1.loc49, %impl.elem0.loc49_12 [template = constants.%Convert.bound.ab5]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc49_12: <specific function> = specific_function %Convert.bound.loc49_12, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.70c]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc49_12: init %i32 = call %Convert.specific_fn.loc49_12(%int_1.loc49) [template = constants.%int_1.5d2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc49_12: %.a0b = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %bound_method.loc49_12: <bound method> = bound_method %int_1.loc49, %impl.elem0.loc49_12 [template = constants.%Convert.bound.ab5]
|
||||
// CHECK:STDOUT: %specific_fn.loc49_12: <specific function> = specific_function %bound_method.loc49_12, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.70c]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc49_12: init %i32 = call %specific_fn.loc49_12(%int_1.loc49) [template = constants.%int_1.5d2]
|
||||
// CHECK:STDOUT: %.loc49_12.1: %i32 = value_of_initializer %int.convert_checked.loc49_12 [template = constants.%int_1.5d2]
|
||||
// CHECK:STDOUT: %.loc49_12.2: %i32 = converted %int_1.loc49, %.loc49_12.1 [template = constants.%int_1.5d2]
|
||||
// CHECK:STDOUT: br !if.expr.result.loc49(%.loc49_12.2)
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !if.expr.else.loc49:
|
||||
// CHECK:STDOUT: %int_2.loc49: Core.IntLiteral = int_value 2 [template = constants.%int_2.ecc]
|
||||
// CHECK:STDOUT: %impl.elem0.loc49_19: %Convert.type.1b6 = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %Convert.bound.loc49_19: <bound method> = bound_method %int_2.loc49, %impl.elem0.loc49_19 [template = constants.%Convert.bound.ef9]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc49_19: <specific function> = specific_function %Convert.bound.loc49_19, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.787]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc49_19: init %i32 = call %Convert.specific_fn.loc49_19(%int_2.loc49) [template = constants.%int_2.ef8]
|
||||
// CHECK:STDOUT: %impl.elem0.loc49_19: %.a0b = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %bound_method.loc49_19: <bound method> = bound_method %int_2.loc49, %impl.elem0.loc49_19 [template = constants.%Convert.bound.ef9]
|
||||
// CHECK:STDOUT: %specific_fn.loc49_19: <specific function> = specific_function %bound_method.loc49_19, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.787]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc49_19: init %i32 = call %specific_fn.loc49_19(%int_2.loc49) [template = constants.%int_2.ef8]
|
||||
// CHECK:STDOUT: %.loc49_19.1: %i32 = value_of_initializer %int.convert_checked.loc49_19 [template = constants.%int_2.ef8]
|
||||
// CHECK:STDOUT: %.loc49_19.2: %i32 = converted %int_2.loc49, %.loc49_19.1 [template = constants.%int_2.ef8]
|
||||
// CHECK:STDOUT: br !if.expr.result.loc49(%.loc49_19.2)
|
||||
@@ -255,10 +258,10 @@ fn Main() {
|
||||
// CHECK:STDOUT: !if.expr.result.loc49:
|
||||
// CHECK:STDOUT: %.loc49_4: %i32 = block_arg !if.expr.result.loc49 [template = constants.%int_1.5d2]
|
||||
// CHECK:STDOUT: %int_3.loc49: Core.IntLiteral = int_value 3 [template = constants.%int_3.1ba]
|
||||
// CHECK:STDOUT: %impl.elem0.loc49_27: %Convert.type.1b6 = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %Convert.bound.loc49_27: <bound method> = bound_method %int_3.loc49, %impl.elem0.loc49_27 [template = constants.%Convert.bound.b30]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc49_27: <specific function> = specific_function %Convert.bound.loc49_27, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.b42]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc49_27: init %i32 = call %Convert.specific_fn.loc49_27(%int_3.loc49) [template = constants.%int_3.822]
|
||||
// CHECK:STDOUT: %impl.elem0.loc49_27: %.a0b = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %bound_method.loc49_27: <bound method> = bound_method %int_3.loc49, %impl.elem0.loc49_27 [template = constants.%Convert.bound.b30]
|
||||
// CHECK:STDOUT: %specific_fn.loc49_27: <specific function> = specific_function %bound_method.loc49_27, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.b42]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc49_27: init %i32 = call %specific_fn.loc49_27(%int_3.loc49) [template = constants.%int_3.822]
|
||||
// CHECK:STDOUT: %.loc49_27: init %i32 = converted %int_3.loc49, %int.convert_checked.loc49_27 [template = constants.%int_3.822]
|
||||
// CHECK:STDOUT: assign %.loc49_4, %.loc49_27
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
@@ -287,10 +290,10 @@ fn Main() {
|
||||
// CHECK:STDOUT: !if.expr.result.loc57:
|
||||
// CHECK:STDOUT: %.loc57_4: %i32 = block_arg !if.expr.result.loc57
|
||||
// CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [template = constants.%int_10.64f]
|
||||
// CHECK:STDOUT: %impl.elem0.loc57: %Convert.type.1b6 = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %Convert.bound.loc57: <bound method> = bound_method %int_10, %impl.elem0.loc57 [template = constants.%Convert.bound.491]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc57: <specific function> = specific_function %Convert.bound.loc57, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.e67]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc57: init %i32 = call %Convert.specific_fn.loc57(%int_10) [template = constants.%int_10.265]
|
||||
// CHECK:STDOUT: %impl.elem0.loc57: %.a0b = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %bound_method.loc57: <bound method> = bound_method %int_10, %impl.elem0.loc57 [template = constants.%Convert.bound.491]
|
||||
// CHECK:STDOUT: %specific_fn.loc57: <specific function> = specific_function %bound_method.loc57, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.e67]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc57: init %i32 = call %specific_fn.loc57(%int_10) [template = constants.%int_10.265]
|
||||
// CHECK:STDOUT: %.loc57_27: init %i32 = converted %int_10, %int.convert_checked.loc57 [template = constants.%int_10.265]
|
||||
// CHECK:STDOUT: assign %.loc57_4, %.loc57_27
|
||||
// CHECK:STDOUT: return
|
||||
|
||||
+11
-8
@@ -32,10 +32,13 @@ fn Main() {
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [template]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [template]
|
||||
// CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [template]
|
||||
// CHECK:STDOUT: %impl_witness.d39: <witness> = impl_witness (imports.%Core.import_ref.a5b), @impl.1(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.1(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [template]
|
||||
// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, %impl_witness.d39 [template]
|
||||
// CHECK:STDOUT: %.a0b: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [template]
|
||||
// CHECK:STDOUT: %Convert.bound.d04: <bound method> = bound_method %int_0.5c6, %Convert.956 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.d62: <specific function> = specific_function %Convert.bound.d04, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [template]
|
||||
@@ -78,10 +81,10 @@ fn Main() {
|
||||
// CHECK:STDOUT: fn @F() -> %i32 {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.5c6]
|
||||
// CHECK:STDOUT: %impl.elem0: %Convert.type.1b6 = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %Convert.bound: <bound method> = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound.d04]
|
||||
// CHECK:STDOUT: %Convert.specific_fn: <specific function> = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.d62]
|
||||
// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.6a9]
|
||||
// CHECK:STDOUT: %impl.elem0: %.a0b = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound.d04]
|
||||
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %bound_method, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.d62]
|
||||
// CHECK:STDOUT: %int.convert_checked: init %i32 = call %specific_fn(%int_0) [template = constants.%int_0.6a9]
|
||||
// CHECK:STDOUT: %.loc11_25.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_0.6a9]
|
||||
// CHECK:STDOUT: %.loc11_25.2: %i32 = converted %int_0, %.loc11_25.1 [template = constants.%int_0.6a9]
|
||||
// CHECK:STDOUT: return %.loc11_25.2
|
||||
@@ -95,10 +98,10 @@ fn Main() {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %a.var: ref %i32 = var a
|
||||
// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1ba]
|
||||
// CHECK:STDOUT: %impl.elem0: %Convert.type.1b6 = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %Convert.bound: <bound method> = bound_method %int_3, %impl.elem0 [template = constants.%Convert.bound.b30]
|
||||
// CHECK:STDOUT: %Convert.specific_fn: <specific function> = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.b42]
|
||||
// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_3) [template = constants.%int_3.822]
|
||||
// CHECK:STDOUT: %impl.elem0: %.a0b = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %int_3, %impl.elem0 [template = constants.%Convert.bound.b30]
|
||||
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %bound_method, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.b42]
|
||||
// CHECK:STDOUT: %int.convert_checked: init %i32 = call %specific_fn(%int_3) [template = constants.%int_3.822]
|
||||
// CHECK:STDOUT: %.loc14_3.2: init %i32 = converted %int_3, %int.convert_checked [template = constants.%int_3.822]
|
||||
// CHECK:STDOUT: assign %a.var, %.loc14_3.2
|
||||
// CHECK:STDOUT: %.loc14_10: type = splice_block %i32 [template = constants.%i32] {
|
||||
|
||||
+7
-4
@@ -28,10 +28,13 @@ fn Main() {
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [template]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [template]
|
||||
// CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [template]
|
||||
// CHECK:STDOUT: %impl_witness.d39: <witness> = impl_witness (imports.%Core.import_ref.a5b), @impl.1(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.1(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [template]
|
||||
// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, %impl_witness.d39 [template]
|
||||
// CHECK:STDOUT: %.a0b: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [template]
|
||||
// CHECK:STDOUT: %Convert.bound: <bound method> = bound_method %int_3.1ba, %Convert.956 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn: <specific function> = specific_function %Convert.bound, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_3.822: %i32 = int_value 3 [template]
|
||||
@@ -64,10 +67,10 @@ fn Main() {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %a.var: ref %i32 = var a
|
||||
// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1ba]
|
||||
// CHECK:STDOUT: %impl.elem0: %Convert.type.1b6 = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %Convert.bound: <bound method> = bound_method %int_3, %impl.elem0 [template = constants.%Convert.bound]
|
||||
// CHECK:STDOUT: %Convert.specific_fn: <specific function> = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn]
|
||||
// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_3) [template = constants.%int_3.822]
|
||||
// CHECK:STDOUT: %impl.elem0: %.a0b = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %int_3, %impl.elem0 [template = constants.%Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %bound_method, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn]
|
||||
// CHECK:STDOUT: %int.convert_checked: init %i32 = call %specific_fn(%int_3) [template = constants.%int_3.822]
|
||||
// CHECK:STDOUT: %.loc12_3.2: init %i32 = converted %int_3, %int.convert_checked [template = constants.%int_3.822]
|
||||
// CHECK:STDOUT: assign %a.var, %.loc12_3.2
|
||||
// CHECK:STDOUT: %.loc12_10: type = splice_block %i32 [template = constants.%i32] {
|
||||
|
||||
@@ -28,7 +28,6 @@ fn Main() -> i32 {
|
||||
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template]
|
||||
// CHECK:STDOUT: %float: f64 = float_literal 3.4000000000000004 [template]
|
||||
// CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template]
|
||||
// CHECK:STDOUT: %Op.type: type = fn_type @Op [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -62,8 +61,7 @@ fn Main() -> i32 {
|
||||
// CHECK:STDOUT: %.loc18: %empty_struct_type = struct_literal ()
|
||||
// CHECK:STDOUT: %float: f64 = float_literal 3.4000000000000004 [template = constants.%float]
|
||||
// CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12]
|
||||
// CHECK:STDOUT: %impl.elem0: %Op.type = impl_witness_access <error>, element0 [template = <error>]
|
||||
// CHECK:STDOUT: %Op.bound: <bound method> = bound_method <error>, %impl.elem0 [template = <error>]
|
||||
// CHECK:STDOUT: %impl.elem0: <error> = impl_witness_access <error>, element0 [template = <error>]
|
||||
// CHECK:STDOUT: return <error>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+10
-6
@@ -43,6 +43,7 @@ fn TestAssign(a: C*, b: C) {
|
||||
// CHECK:STDOUT: %impl_witness.796: <witness> = impl_witness (@impl.1.%Op.decl) [template]
|
||||
// CHECK:STDOUT: %Op.type.7a3: type = fn_type @Op.2 [template]
|
||||
// CHECK:STDOUT: %Op.c84: %Op.type.7a3 = struct_value () [template]
|
||||
// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %C, %impl_witness.796 [template]
|
||||
// CHECK:STDOUT: %C.val: %C = struct_value () [template]
|
||||
// CHECK:STDOUT: %AddAssign.type: type = facet_type <@AddAssign> [template]
|
||||
// CHECK:STDOUT: %Op.type.421: type = fn_type @Op.3 [template]
|
||||
@@ -50,10 +51,13 @@ fn TestAssign(a: C*, b: C) {
|
||||
// CHECK:STDOUT: %ptr.019: type = ptr_type %C [template]
|
||||
// CHECK:STDOUT: %Op.type.0b8: type = fn_type @Op.4 [template]
|
||||
// CHECK:STDOUT: %Op.d8e: %Op.type.0b8 = struct_value () [template]
|
||||
// CHECK:STDOUT: %AddAssign.facet: %AddAssign.type = facet_value %C, %impl_witness.95d [template]
|
||||
// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template]
|
||||
// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.4bb: type = fn_type_with_self_type %Op.type.545, %Add.facet [template]
|
||||
// CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template]
|
||||
// CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.499: type = fn_type_with_self_type %Op.type.421, %AddAssign.facet [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -198,10 +202,10 @@ fn TestAssign(a: C*, b: C) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %a.ref: %C = name_ref a, %a
|
||||
// CHECK:STDOUT: %b.ref: %C = name_ref b, %b
|
||||
// CHECK:STDOUT: %impl.elem0: %Op.type.545 = impl_witness_access constants.%impl_witness.796, element0 [template = constants.%Op.c84]
|
||||
// CHECK:STDOUT: %Op.bound: <bound method> = bound_method %a.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %impl.elem0: %.4bb = impl_witness_access constants.%impl_witness.796, element0 [template = constants.%Op.c84]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %a.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %.loc26: ref %C = splice_block %return {}
|
||||
// CHECK:STDOUT: %Op.call: init %C = call %Op.bound(%a.ref, %b.ref) to %.loc26
|
||||
// CHECK:STDOUT: %Op.call: init %C = call %bound_method(%a.ref, %b.ref) to %.loc26
|
||||
// CHECK:STDOUT: return %Op.call to %return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -210,10 +214,10 @@ fn TestAssign(a: C*, b: C) {
|
||||
// CHECK:STDOUT: %a.ref: %ptr.019 = name_ref a, %a
|
||||
// CHECK:STDOUT: %.loc31: ref %C = deref %a.ref
|
||||
// CHECK:STDOUT: %b.ref: %C = name_ref b, %b
|
||||
// CHECK:STDOUT: %impl.elem0: %Op.type.421 = impl_witness_access constants.%impl_witness.95d, element0 [template = constants.%Op.d8e]
|
||||
// CHECK:STDOUT: %Op.bound: <bound method> = bound_method %.loc31, %impl.elem0
|
||||
// CHECK:STDOUT: %impl.elem0: %.499 = impl_witness_access constants.%impl_witness.95d, element0 [template = constants.%Op.d8e]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %.loc31, %impl.elem0
|
||||
// CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc31
|
||||
// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %Op.bound(%addr, %b.ref)
|
||||
// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(%addr, %b.ref)
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -43,6 +43,7 @@ fn TestAssign(a: C*, b: C) {
|
||||
// CHECK:STDOUT: %impl_witness.5af: <witness> = impl_witness (@impl.1.%Op.decl) [template]
|
||||
// CHECK:STDOUT: %Op.type.45e: type = fn_type @Op.2 [template]
|
||||
// CHECK:STDOUT: %Op.c43: %Op.type.45e = struct_value () [template]
|
||||
// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value %C, %impl_witness.5af [template]
|
||||
// CHECK:STDOUT: %C.val: %C = struct_value () [template]
|
||||
// CHECK:STDOUT: %BitAndAssign.type: type = facet_type <@BitAndAssign> [template]
|
||||
// CHECK:STDOUT: %Op.type.93f: type = fn_type @Op.3 [template]
|
||||
@@ -50,10 +51,13 @@ fn TestAssign(a: C*, b: C) {
|
||||
// CHECK:STDOUT: %ptr.019: type = ptr_type %C [template]
|
||||
// CHECK:STDOUT: %Op.type.969: type = fn_type @Op.4 [template]
|
||||
// CHECK:STDOUT: %Op.747: %Op.type.969 = struct_value () [template]
|
||||
// CHECK:STDOUT: %BitAndAssign.facet: %BitAndAssign.type = facet_value %C, %impl_witness.762 [template]
|
||||
// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template]
|
||||
// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.9a0: type = fn_type_with_self_type %Op.type.27a, %BitAnd.facet [template]
|
||||
// CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template]
|
||||
// CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.ade: type = fn_type_with_self_type %Op.type.93f, %BitAndAssign.facet [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -198,10 +202,10 @@ fn TestAssign(a: C*, b: C) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %a.ref: %C = name_ref a, %a
|
||||
// CHECK:STDOUT: %b.ref: %C = name_ref b, %b
|
||||
// CHECK:STDOUT: %impl.elem0: %Op.type.27a = impl_witness_access constants.%impl_witness.5af, element0 [template = constants.%Op.c43]
|
||||
// CHECK:STDOUT: %Op.bound: <bound method> = bound_method %a.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %impl.elem0: %.9a0 = impl_witness_access constants.%impl_witness.5af, element0 [template = constants.%Op.c43]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %a.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %.loc26: ref %C = splice_block %return {}
|
||||
// CHECK:STDOUT: %Op.call: init %C = call %Op.bound(%a.ref, %b.ref) to %.loc26
|
||||
// CHECK:STDOUT: %Op.call: init %C = call %bound_method(%a.ref, %b.ref) to %.loc26
|
||||
// CHECK:STDOUT: return %Op.call to %return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -210,10 +214,10 @@ fn TestAssign(a: C*, b: C) {
|
||||
// CHECK:STDOUT: %a.ref: %ptr.019 = name_ref a, %a
|
||||
// CHECK:STDOUT: %.loc31: ref %C = deref %a.ref
|
||||
// CHECK:STDOUT: %b.ref: %C = name_ref b, %b
|
||||
// CHECK:STDOUT: %impl.elem0: %Op.type.93f = impl_witness_access constants.%impl_witness.762, element0 [template = constants.%Op.747]
|
||||
// CHECK:STDOUT: %Op.bound: <bound method> = bound_method %.loc31, %impl.elem0
|
||||
// CHECK:STDOUT: %impl.elem0: %.ade = impl_witness_access constants.%impl_witness.762, element0 [template = constants.%Op.747]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %.loc31, %impl.elem0
|
||||
// CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc31
|
||||
// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %Op.bound(%addr, %b.ref)
|
||||
// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(%addr, %b.ref)
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -35,9 +35,11 @@ fn TestOp(a: C) -> C {
|
||||
// CHECK:STDOUT: %impl_witness: <witness> = impl_witness (@impl.1.%Op.decl) [template]
|
||||
// CHECK:STDOUT: %Op.type.544: type = fn_type @Op.2 [template]
|
||||
// CHECK:STDOUT: %Op.bf2: %Op.type.544 = struct_value () [template]
|
||||
// CHECK:STDOUT: %BitComplement.facet: %BitComplement.type = facet_value %C, %impl_witness [template]
|
||||
// CHECK:STDOUT: %C.val: %C = struct_value () [template]
|
||||
// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template]
|
||||
// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.784: type = fn_type_with_self_type %Op.type.f25, %BitComplement.facet [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -117,10 +119,10 @@ fn TestOp(a: C) -> C {
|
||||
// CHECK:STDOUT: fn @TestOp(%a.param_patt: %C) -> %return.param_patt: %C {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %a.ref: %C = name_ref a, %a
|
||||
// CHECK:STDOUT: %impl.elem0: %Op.type.f25 = impl_witness_access constants.%impl_witness, element0 [template = constants.%Op.bf2]
|
||||
// CHECK:STDOUT: %Op.bound: <bound method> = bound_method %a.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %impl.elem0: %.784 = impl_witness_access constants.%impl_witness, element0 [template = constants.%Op.bf2]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %a.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %.loc23: ref %C = splice_block %return {}
|
||||
// CHECK:STDOUT: %Op.call: init %C = call %Op.bound(%a.ref) to %.loc23
|
||||
// CHECK:STDOUT: %Op.call: init %C = call %bound_method(%a.ref) to %.loc23
|
||||
// CHECK:STDOUT: return %Op.call to %return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+10
-6
@@ -43,6 +43,7 @@ fn TestAssign(a: C*, b: C) {
|
||||
// CHECK:STDOUT: %impl_witness.e68: <witness> = impl_witness (@impl.1.%Op.decl) [template]
|
||||
// CHECK:STDOUT: %Op.type.951: type = fn_type @Op.2 [template]
|
||||
// CHECK:STDOUT: %Op.59a: %Op.type.951 = struct_value () [template]
|
||||
// CHECK:STDOUT: %BitOr.facet: %BitOr.type = facet_value %C, %impl_witness.e68 [template]
|
||||
// CHECK:STDOUT: %C.val: %C = struct_value () [template]
|
||||
// CHECK:STDOUT: %BitOrAssign.type: type = facet_type <@BitOrAssign> [template]
|
||||
// CHECK:STDOUT: %Op.type.099: type = fn_type @Op.3 [template]
|
||||
@@ -50,10 +51,13 @@ fn TestAssign(a: C*, b: C) {
|
||||
// CHECK:STDOUT: %ptr.019: type = ptr_type %C [template]
|
||||
// CHECK:STDOUT: %Op.type.8ba: type = fn_type @Op.4 [template]
|
||||
// CHECK:STDOUT: %Op.b27: %Op.type.8ba = struct_value () [template]
|
||||
// CHECK:STDOUT: %BitOrAssign.facet: %BitOrAssign.type = facet_value %C, %impl_witness.85b [template]
|
||||
// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template]
|
||||
// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.88d: type = fn_type_with_self_type %Op.type.9bb, %BitOr.facet [template]
|
||||
// CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template]
|
||||
// CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.ecb: type = fn_type_with_self_type %Op.type.099, %BitOrAssign.facet [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -198,10 +202,10 @@ fn TestAssign(a: C*, b: C) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %a.ref: %C = name_ref a, %a
|
||||
// CHECK:STDOUT: %b.ref: %C = name_ref b, %b
|
||||
// CHECK:STDOUT: %impl.elem0: %Op.type.9bb = impl_witness_access constants.%impl_witness.e68, element0 [template = constants.%Op.59a]
|
||||
// CHECK:STDOUT: %Op.bound: <bound method> = bound_method %a.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %impl.elem0: %.88d = impl_witness_access constants.%impl_witness.e68, element0 [template = constants.%Op.59a]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %a.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %.loc26: ref %C = splice_block %return {}
|
||||
// CHECK:STDOUT: %Op.call: init %C = call %Op.bound(%a.ref, %b.ref) to %.loc26
|
||||
// CHECK:STDOUT: %Op.call: init %C = call %bound_method(%a.ref, %b.ref) to %.loc26
|
||||
// CHECK:STDOUT: return %Op.call to %return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -210,10 +214,10 @@ fn TestAssign(a: C*, b: C) {
|
||||
// CHECK:STDOUT: %a.ref: %ptr.019 = name_ref a, %a
|
||||
// CHECK:STDOUT: %.loc31: ref %C = deref %a.ref
|
||||
// CHECK:STDOUT: %b.ref: %C = name_ref b, %b
|
||||
// CHECK:STDOUT: %impl.elem0: %Op.type.099 = impl_witness_access constants.%impl_witness.85b, element0 [template = constants.%Op.b27]
|
||||
// CHECK:STDOUT: %Op.bound: <bound method> = bound_method %.loc31, %impl.elem0
|
||||
// CHECK:STDOUT: %impl.elem0: %.ecb = impl_witness_access constants.%impl_witness.85b, element0 [template = constants.%Op.b27]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %.loc31, %impl.elem0
|
||||
// CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc31
|
||||
// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %Op.bound(%addr, %b.ref)
|
||||
// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(%addr, %b.ref)
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -43,6 +43,7 @@ fn TestAssign(a: C*, b: C) {
|
||||
// CHECK:STDOUT: %impl_witness.01d: <witness> = impl_witness (@impl.1.%Op.decl) [template]
|
||||
// CHECK:STDOUT: %Op.type.672: type = fn_type @Op.2 [template]
|
||||
// CHECK:STDOUT: %Op.442: %Op.type.672 = struct_value () [template]
|
||||
// CHECK:STDOUT: %BitXor.facet: %BitXor.type = facet_value %C, %impl_witness.01d [template]
|
||||
// CHECK:STDOUT: %C.val: %C = struct_value () [template]
|
||||
// CHECK:STDOUT: %BitXorAssign.type: type = facet_type <@BitXorAssign> [template]
|
||||
// CHECK:STDOUT: %Op.type.58d: type = fn_type @Op.3 [template]
|
||||
@@ -50,10 +51,13 @@ fn TestAssign(a: C*, b: C) {
|
||||
// CHECK:STDOUT: %ptr.019: type = ptr_type %C [template]
|
||||
// CHECK:STDOUT: %Op.type.8ab: type = fn_type @Op.4 [template]
|
||||
// CHECK:STDOUT: %Op.67d: %Op.type.8ab = struct_value () [template]
|
||||
// CHECK:STDOUT: %BitXorAssign.facet: %BitXorAssign.type = facet_value %C, %impl_witness.8dc [template]
|
||||
// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template]
|
||||
// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.8f3: type = fn_type_with_self_type %Op.type.e96, %BitXor.facet [template]
|
||||
// CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template]
|
||||
// CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.1c2: type = fn_type_with_self_type %Op.type.58d, %BitXorAssign.facet [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -198,10 +202,10 @@ fn TestAssign(a: C*, b: C) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %a.ref: %C = name_ref a, %a
|
||||
// CHECK:STDOUT: %b.ref: %C = name_ref b, %b
|
||||
// CHECK:STDOUT: %impl.elem0: %Op.type.e96 = impl_witness_access constants.%impl_witness.01d, element0 [template = constants.%Op.442]
|
||||
// CHECK:STDOUT: %Op.bound: <bound method> = bound_method %a.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %impl.elem0: %.8f3 = impl_witness_access constants.%impl_witness.01d, element0 [template = constants.%Op.442]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %a.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %.loc26: ref %C = splice_block %return {}
|
||||
// CHECK:STDOUT: %Op.call: init %C = call %Op.bound(%a.ref, %b.ref) to %.loc26
|
||||
// CHECK:STDOUT: %Op.call: init %C = call %bound_method(%a.ref, %b.ref) to %.loc26
|
||||
// CHECK:STDOUT: return %Op.call to %return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -210,10 +214,10 @@ fn TestAssign(a: C*, b: C) {
|
||||
// CHECK:STDOUT: %a.ref: %ptr.019 = name_ref a, %a
|
||||
// CHECK:STDOUT: %.loc31: ref %C = deref %a.ref
|
||||
// CHECK:STDOUT: %b.ref: %C = name_ref b, %b
|
||||
// CHECK:STDOUT: %impl.elem0: %Op.type.58d = impl_witness_access constants.%impl_witness.8dc, element0 [template = constants.%Op.67d]
|
||||
// CHECK:STDOUT: %Op.bound: <bound method> = bound_method %.loc31, %impl.elem0
|
||||
// CHECK:STDOUT: %impl.elem0: %.1c2 = impl_witness_access constants.%impl_witness.8dc, element0 [template = constants.%Op.67d]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %.loc31, %impl.elem0
|
||||
// CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc31
|
||||
// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %Op.bound(%addr, %b.ref)
|
||||
// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(%addr, %b.ref)
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -36,9 +36,11 @@ fn TestOp() {
|
||||
// CHECK:STDOUT: %ptr.019: type = ptr_type %C [template]
|
||||
// CHECK:STDOUT: %Op.type.9e0: type = fn_type @Op.2 [template]
|
||||
// CHECK:STDOUT: %Op.cf9: %Op.type.9e0 = struct_value () [template]
|
||||
// CHECK:STDOUT: %Dec.facet: %Dec.type = facet_value %C, %impl_witness [template]
|
||||
// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template]
|
||||
// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %C.val: %C = struct_value () [template]
|
||||
// CHECK:STDOUT: %.01d: type = fn_type_with_self_type %Op.type.633, %Dec.facet [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -110,10 +112,10 @@ fn TestOp() {
|
||||
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
|
||||
// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var
|
||||
// CHECK:STDOUT: %c.ref: ref %C = name_ref c, %c
|
||||
// CHECK:STDOUT: %impl.elem0: %Op.type.633 = impl_witness_access constants.%impl_witness, element0 [template = constants.%Op.cf9]
|
||||
// CHECK:STDOUT: %Op.bound: <bound method> = bound_method %c.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %impl.elem0: %.01d = impl_witness_access constants.%impl_witness, element0 [template = constants.%Op.cf9]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %c.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %addr: %ptr.019 = addr_of %c.ref
|
||||
// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %Op.bound(%addr)
|
||||
// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(%addr)
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+10
-6
@@ -43,6 +43,7 @@ fn TestAssign(a: C*, b: C) {
|
||||
// CHECK:STDOUT: %impl_witness.745: <witness> = impl_witness (@impl.1.%Op.decl) [template]
|
||||
// CHECK:STDOUT: %Op.type.750: type = fn_type @Op.2 [template]
|
||||
// CHECK:STDOUT: %Op.21e: %Op.type.750 = struct_value () [template]
|
||||
// CHECK:STDOUT: %Div.facet: %Div.type = facet_value %C, %impl_witness.745 [template]
|
||||
// CHECK:STDOUT: %C.val: %C = struct_value () [template]
|
||||
// CHECK:STDOUT: %DivAssign.type: type = facet_type <@DivAssign> [template]
|
||||
// CHECK:STDOUT: %Op.type.b95: type = fn_type @Op.3 [template]
|
||||
@@ -50,10 +51,13 @@ fn TestAssign(a: C*, b: C) {
|
||||
// CHECK:STDOUT: %ptr.019: type = ptr_type %C [template]
|
||||
// CHECK:STDOUT: %Op.type.b04: type = fn_type @Op.4 [template]
|
||||
// CHECK:STDOUT: %Op.27c: %Op.type.b04 = struct_value () [template]
|
||||
// CHECK:STDOUT: %DivAssign.facet: %DivAssign.type = facet_value %C, %impl_witness.d13 [template]
|
||||
// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template]
|
||||
// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.a6e: type = fn_type_with_self_type %Op.type.784, %Div.facet [template]
|
||||
// CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template]
|
||||
// CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.0f9: type = fn_type_with_self_type %Op.type.b95, %DivAssign.facet [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -198,10 +202,10 @@ fn TestAssign(a: C*, b: C) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %a.ref: %C = name_ref a, %a
|
||||
// CHECK:STDOUT: %b.ref: %C = name_ref b, %b
|
||||
// CHECK:STDOUT: %impl.elem0: %Op.type.784 = impl_witness_access constants.%impl_witness.745, element0 [template = constants.%Op.21e]
|
||||
// CHECK:STDOUT: %Op.bound: <bound method> = bound_method %a.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %impl.elem0: %.a6e = impl_witness_access constants.%impl_witness.745, element0 [template = constants.%Op.21e]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %a.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %.loc26: ref %C = splice_block %return {}
|
||||
// CHECK:STDOUT: %Op.call: init %C = call %Op.bound(%a.ref, %b.ref) to %.loc26
|
||||
// CHECK:STDOUT: %Op.call: init %C = call %bound_method(%a.ref, %b.ref) to %.loc26
|
||||
// CHECK:STDOUT: return %Op.call to %return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -210,10 +214,10 @@ fn TestAssign(a: C*, b: C) {
|
||||
// CHECK:STDOUT: %a.ref: %ptr.019 = name_ref a, %a
|
||||
// CHECK:STDOUT: %.loc31: ref %C = deref %a.ref
|
||||
// CHECK:STDOUT: %b.ref: %C = name_ref b, %b
|
||||
// CHECK:STDOUT: %impl.elem0: %Op.type.b95 = impl_witness_access constants.%impl_witness.d13, element0 [template = constants.%Op.27c]
|
||||
// CHECK:STDOUT: %Op.bound: <bound method> = bound_method %.loc31, %impl.elem0
|
||||
// CHECK:STDOUT: %impl.elem0: %.0f9 = impl_witness_access constants.%impl_witness.d13, element0 [template = constants.%Op.27c]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %.loc31, %impl.elem0
|
||||
// CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc31
|
||||
// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %Op.bound(%addr, %b.ref)
|
||||
// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(%addr, %b.ref)
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+14
-9
@@ -99,10 +99,13 @@ fn TestLhsBad(a: D, b: C) -> bool {
|
||||
// CHECK:STDOUT: %Equal.f96: %Equal.type.b4a = struct_value () [template]
|
||||
// CHECK:STDOUT: %NotEqual.type.a7d: type = fn_type @NotEqual.2 [template]
|
||||
// CHECK:STDOUT: %NotEqual.c3f: %NotEqual.type.a7d = struct_value () [template]
|
||||
// CHECK:STDOUT: %Eq.facet: %Eq.type = facet_value %C, %impl_witness [template]
|
||||
// CHECK:STDOUT: %TestEqual.type: type = fn_type @TestEqual [template]
|
||||
// CHECK:STDOUT: %TestEqual: %TestEqual.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.dad: type = fn_type_with_self_type %Equal.type.79c, %Eq.facet [template]
|
||||
// CHECK:STDOUT: %TestNotEqual.type: type = fn_type @TestNotEqual [template]
|
||||
// CHECK:STDOUT: %TestNotEqual: %TestNotEqual.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.d23: type = fn_type_with_self_type %NotEqual.type.e6c, %Eq.facet [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -236,9 +239,9 @@ fn TestLhsBad(a: D, b: C) -> bool {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %a.ref: %C = name_ref a, %a
|
||||
// CHECK:STDOUT: %b.ref: %C = name_ref b, %b
|
||||
// CHECK:STDOUT: %impl.elem0: %Equal.type.79c = impl_witness_access constants.%impl_witness, element0 [template = constants.%Equal.f96]
|
||||
// CHECK:STDOUT: %Equal.bound: <bound method> = bound_method %a.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %Equal.call: init bool = call %Equal.bound(%a.ref, %b.ref)
|
||||
// CHECK:STDOUT: %impl.elem0: %.dad = impl_witness_access constants.%impl_witness, element0 [template = constants.%Equal.f96]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %a.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %Equal.call: init bool = call %bound_method(%a.ref, %b.ref)
|
||||
// CHECK:STDOUT: %.loc12_16.1: bool = value_of_initializer %Equal.call
|
||||
// CHECK:STDOUT: %.loc12_16.2: bool = converted %Equal.call, %.loc12_16.1
|
||||
// CHECK:STDOUT: return %.loc12_16.2
|
||||
@@ -248,9 +251,9 @@ fn TestLhsBad(a: D, b: C) -> bool {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %a.ref: %C = name_ref a, %a
|
||||
// CHECK:STDOUT: %b.ref: %C = name_ref b, %b
|
||||
// CHECK:STDOUT: %impl.elem1: %NotEqual.type.e6c = impl_witness_access constants.%impl_witness, element1 [template = constants.%NotEqual.c3f]
|
||||
// CHECK:STDOUT: %NotEqual.bound: <bound method> = bound_method %a.ref, %impl.elem1
|
||||
// CHECK:STDOUT: %NotEqual.call: init bool = call %NotEqual.bound(%a.ref, %b.ref)
|
||||
// CHECK:STDOUT: %impl.elem1: %.d23 = impl_witness_access constants.%impl_witness, element1 [template = constants.%NotEqual.c3f]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %a.ref, %impl.elem1
|
||||
// CHECK:STDOUT: %NotEqual.call: init bool = call %bound_method(%a.ref, %b.ref)
|
||||
// CHECK:STDOUT: %.loc16_16.1: bool = value_of_initializer %NotEqual.call
|
||||
// CHECK:STDOUT: %.loc16_16.2: bool = converted %NotEqual.call, %.loc16_16.1
|
||||
// CHECK:STDOUT: return %.loc16_16.2
|
||||
@@ -368,8 +371,10 @@ fn TestLhsBad(a: D, b: C) -> bool {
|
||||
// CHECK:STDOUT: %Equal.f96: %Equal.type.b4a = struct_value () [template]
|
||||
// CHECK:STDOUT: %NotEqual.type.a7d: type = fn_type @NotEqual.2 [template]
|
||||
// CHECK:STDOUT: %NotEqual.c3f: %NotEqual.type.a7d = struct_value () [template]
|
||||
// CHECK:STDOUT: %Eq.facet: %Eq.type = facet_value %C, %impl_witness [template]
|
||||
// CHECK:STDOUT: %TestRhsBad.type: type = fn_type @TestRhsBad [template]
|
||||
// CHECK:STDOUT: %TestRhsBad: %TestRhsBad.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.dad: type = fn_type_with_self_type %Equal.type.79c, %Eq.facet [template]
|
||||
// CHECK:STDOUT: %TestLhsBad.type: type = fn_type @TestLhsBad [template]
|
||||
// CHECK:STDOUT: %TestLhsBad: %TestLhsBad.type = struct_value () [template]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -516,10 +521,10 @@ fn TestLhsBad(a: D, b: C) -> bool {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %a.ref: %C = name_ref a, %a
|
||||
// CHECK:STDOUT: %b.ref: %D = name_ref b, %b
|
||||
// CHECK:STDOUT: %impl.elem0: %Equal.type.79c = impl_witness_access constants.%impl_witness, element0 [template = constants.%Equal.f96]
|
||||
// CHECK:STDOUT: %Equal.bound: <bound method> = bound_method %a.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %impl.elem0: %.dad = impl_witness_access constants.%impl_witness, element0 [template = constants.%Equal.f96]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %a.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %.loc23_15: %C = converted %b.ref, <error> [template = <error>]
|
||||
// CHECK:STDOUT: %Equal.call: init bool = call %Equal.bound(%a.ref, <error>)
|
||||
// CHECK:STDOUT: %Equal.call: init bool = call %bound_method(%a.ref, <error>)
|
||||
// CHECK:STDOUT: %.loc23_16.1: bool = value_of_initializer %Equal.call
|
||||
// CHECK:STDOUT: %.loc23_16.2: bool = converted %Equal.call, %.loc23_16.1
|
||||
// CHECK:STDOUT: return %.loc23_16.2
|
||||
|
||||
@@ -54,15 +54,19 @@ fn TestAddAssignNonRef(a: C, b: C) {
|
||||
// CHECK:STDOUT: %ptr.019: type = ptr_type %C [template]
|
||||
// CHECK:STDOUT: %Op.type.73a: type = fn_type @Op.2 [template]
|
||||
// CHECK:STDOUT: %Op.0c9: %Op.type.73a = struct_value () [template]
|
||||
// CHECK:STDOUT: %Inc.facet: %Inc.type = facet_value %C, %impl_witness.ec3 [template]
|
||||
// CHECK:STDOUT: %AddAssign.type: type = facet_type <@AddAssign> [template]
|
||||
// CHECK:STDOUT: %Op.type.421: type = fn_type @Op.3 [template]
|
||||
// CHECK:STDOUT: %impl_witness.95d: <witness> = impl_witness (@impl.2.%Op.decl) [template]
|
||||
// CHECK:STDOUT: %Op.type.0b8: type = fn_type @Op.4 [template]
|
||||
// CHECK:STDOUT: %Op.d8e: %Op.type.0b8 = struct_value () [template]
|
||||
// CHECK:STDOUT: %AddAssign.facet: %AddAssign.type = facet_value %C, %impl_witness.95d [template]
|
||||
// CHECK:STDOUT: %TestIncNonRef.type: type = fn_type @TestIncNonRef [template]
|
||||
// CHECK:STDOUT: %TestIncNonRef: %TestIncNonRef.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.e6d: type = fn_type_with_self_type %Op.type.e3a, %Inc.facet [template]
|
||||
// CHECK:STDOUT: %TestAddAssignNonRef.type: type = fn_type @TestAddAssignNonRef [template]
|
||||
// CHECK:STDOUT: %TestAddAssignNonRef: %TestAddAssignNonRef.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.499: type = fn_type_with_self_type %Op.type.421, %AddAssign.facet [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -178,9 +182,9 @@ fn TestAddAssignNonRef(a: C, b: C) {
|
||||
// CHECK:STDOUT: fn @TestIncNonRef(%a.param_patt: %C) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %a.ref: %C = name_ref a, %a
|
||||
// CHECK:STDOUT: %impl.elem0: %Op.type.e3a = impl_witness_access constants.%impl_witness.ec3, element0 [template = constants.%Op.0c9]
|
||||
// CHECK:STDOUT: %Op.bound: <bound method> = bound_method %a.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %Op.bound(<error>)
|
||||
// CHECK:STDOUT: %impl.elem0: %.e6d = impl_witness_access constants.%impl_witness.ec3, element0 [template = constants.%Op.0c9]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %a.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(<error>)
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -188,9 +192,9 @@ fn TestAddAssignNonRef(a: C, b: C) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %a.ref: %C = name_ref a, %a
|
||||
// CHECK:STDOUT: %b.ref: %C = name_ref b, %b
|
||||
// CHECK:STDOUT: %impl.elem0: %Op.type.421 = impl_witness_access constants.%impl_witness.95d, element0 [template = constants.%Op.d8e]
|
||||
// CHECK:STDOUT: %Op.bound: <bound method> = bound_method %a.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %Op.bound(<error>, %b.ref)
|
||||
// CHECK:STDOUT: %impl.elem0: %.499 = impl_witness_access constants.%impl_witness.95d, element0 [template = constants.%Op.d8e]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %a.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(<error>, %b.ref)
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -33,6 +33,7 @@ fn G(n: i32) {
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template]
|
||||
// CHECK:STDOUT: %Add.type: type = facet_type <@Add> [template]
|
||||
// CHECK:STDOUT: %Op.type.545: type = fn_type @Op.1 [template]
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template]
|
||||
@@ -41,6 +42,8 @@ fn G(n: i32) {
|
||||
// CHECK:STDOUT: %impl_witness.01d: <witness> = impl_witness (imports.%Core.import_ref.344), @impl.14(%int_32) [template]
|
||||
// CHECK:STDOUT: %Op.type.210: type = fn_type @Op.2, @impl.14(%int_32) [template]
|
||||
// CHECK:STDOUT: %Op.c82: %Op.type.210 = struct_value () [template]
|
||||
// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %i32, %impl_witness.01d [template]
|
||||
// CHECK:STDOUT: %.ede: type = fn_type_with_self_type %Op.type.545, %Add.facet [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -77,8 +80,7 @@ fn G(n: i32) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %undeclared.ref: <error> = name_ref undeclared, <error> [template = <error>]
|
||||
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1]
|
||||
// CHECK:STDOUT: %impl.elem0: %Op.type.545 = impl_witness_access <error>, element0 [template = <error>]
|
||||
// CHECK:STDOUT: %Op.bound: <bound method> = bound_method %undeclared.ref, %impl.elem0 [template = <error>]
|
||||
// CHECK:STDOUT: %impl.elem0: <error> = impl_witness_access <error>, element0 [template = <error>]
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -86,8 +88,8 @@ fn G(n: i32) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n
|
||||
// CHECK:STDOUT: %undeclared.ref: <error> = name_ref undeclared, <error> [template = <error>]
|
||||
// CHECK:STDOUT: %impl.elem0: %Op.type.545 = impl_witness_access constants.%impl_witness.01d, element0 [template = constants.%Op.c82]
|
||||
// CHECK:STDOUT: %Op.bound: <bound method> = bound_method %n.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %impl.elem0: %.ede = impl_witness_access constants.%impl_witness.01d, element0 [template = constants.%Op.c82]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %n.ref, %impl.elem0
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -62,17 +62,21 @@ fn TestAssign(b: D) {
|
||||
// CHECK:STDOUT: %impl_witness.796: <witness> = impl_witness (@impl.1.%Op.decl) [template]
|
||||
// CHECK:STDOUT: %Op.type.7a3: type = fn_type @Op.2 [template]
|
||||
// CHECK:STDOUT: %Op.c84: %Op.type.7a3 = struct_value () [template]
|
||||
// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %C, %impl_witness.796 [template]
|
||||
// CHECK:STDOUT: %AddAssign.type: type = facet_type <@AddAssign> [template]
|
||||
// CHECK:STDOUT: %Op.type.421: type = fn_type @Op.3 [template]
|
||||
// CHECK:STDOUT: %impl_witness.95d: <witness> = impl_witness (@impl.2.%Op.decl) [template]
|
||||
// CHECK:STDOUT: %ptr.019: type = ptr_type %C [template]
|
||||
// CHECK:STDOUT: %Op.type.0b8: type = fn_type @Op.4 [template]
|
||||
// CHECK:STDOUT: %Op.d8e: %Op.type.0b8 = struct_value () [template]
|
||||
// CHECK:STDOUT: %AddAssign.facet: %AddAssign.type = facet_value %C, %impl_witness.95d [template]
|
||||
// CHECK:STDOUT: %Test.type: type = fn_type @Test [template]
|
||||
// CHECK:STDOUT: %Test: %Test.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.4bb: type = fn_type_with_self_type %Op.type.545, %Add.facet [template]
|
||||
// CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template]
|
||||
// CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %C.val: %C = struct_value () [template]
|
||||
// CHECK:STDOUT: %.499: type = fn_type_with_self_type %Op.type.421, %AddAssign.facet [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -211,11 +215,11 @@ fn TestAssign(b: D) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %a.ref: %C = name_ref a, %a
|
||||
// CHECK:STDOUT: %b.ref: %D = name_ref b, %b
|
||||
// CHECK:STDOUT: %impl.elem0: %Op.type.545 = impl_witness_access constants.%impl_witness.796, element0 [template = constants.%Op.c84]
|
||||
// CHECK:STDOUT: %Op.bound: <bound method> = bound_method %a.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %impl.elem0: %.4bb = impl_witness_access constants.%impl_witness.796, element0 [template = constants.%Op.c84]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %a.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %.loc23: ref %C = splice_block %return {}
|
||||
// CHECK:STDOUT: %.loc34: %C = converted %b.ref, <error> [template = <error>]
|
||||
// CHECK:STDOUT: %Op.call: init %C = call %Op.bound(%a.ref, <error>) to %.loc23
|
||||
// CHECK:STDOUT: %Op.call: init %C = call %bound_method(%a.ref, <error>) to %.loc23
|
||||
// CHECK:STDOUT: return %Op.call to %return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -234,11 +238,11 @@ fn TestAssign(b: D) {
|
||||
// CHECK:STDOUT: %a: ref %C = bind_name a, %a.var
|
||||
// CHECK:STDOUT: %a.ref: ref %C = name_ref a, %a
|
||||
// CHECK:STDOUT: %b.ref: %D = name_ref b, %b
|
||||
// CHECK:STDOUT: %impl.elem0: %Op.type.421 = impl_witness_access constants.%impl_witness.95d, element0 [template = constants.%Op.d8e]
|
||||
// CHECK:STDOUT: %Op.bound: <bound method> = bound_method %a.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %impl.elem0: %.499 = impl_witness_access constants.%impl_witness.95d, element0 [template = constants.%Op.d8e]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %a.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %addr: %ptr.019 = addr_of %a.ref
|
||||
// CHECK:STDOUT: %.loc49: %C = converted %b.ref, <error> [template = <error>]
|
||||
// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %Op.bound(%addr, <error>)
|
||||
// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(%addr, <error>)
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -50,11 +50,13 @@ fn Test() {
|
||||
// CHECK:STDOUT: %impl_witness.226: <witness> = impl_witness (@impl.1.%Convert.decl) [template]
|
||||
// CHECK:STDOUT: %Convert.type.853: type = fn_type @Convert.2 [template]
|
||||
// CHECK:STDOUT: %Convert.08a: %Convert.type.853 = struct_value () [template]
|
||||
// CHECK:STDOUT: %ImplicitAs.facet.a10: %ImplicitAs.type.ac8 = facet_value %i32, %impl_witness.226 [template]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [template]
|
||||
// CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [template]
|
||||
// CHECK:STDOUT: %impl_witness.c53: <witness> = impl_witness (@impl.2.%Convert.decl) [template]
|
||||
// CHECK:STDOUT: %Convert.type.8a1: type = fn_type @Convert.3 [template]
|
||||
// CHECK:STDOUT: %Convert.c7a: %Convert.type.8a1 = struct_value () [template]
|
||||
// CHECK:STDOUT: %ImplicitAs.facet.208: %ImplicitAs.type.205 = facet_value %X, %impl_witness.c53 [template]
|
||||
// CHECK:STDOUT: %Sink_i32.type: type = fn_type @Sink_i32 [template]
|
||||
// CHECK:STDOUT: %Sink_i32: %Sink_i32.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Sink_X.type: type = fn_type @Sink_X [template]
|
||||
@@ -68,7 +70,9 @@ fn Test() {
|
||||
// CHECK:STDOUT: %Test.type: type = fn_type @Test [template]
|
||||
// CHECK:STDOUT: %Test: %Test.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Source.specific_fn.363: <specific function> = specific_function %Source, @Source(%X) [template]
|
||||
// CHECK:STDOUT: %.d2d: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.208 [template]
|
||||
// CHECK:STDOUT: %Source.specific_fn.cc7: <specific function> = specific_function %Source, @Source(%i32) [template]
|
||||
// CHECK:STDOUT: %.d10: type = fn_type_with_self_type %Convert.type.665, %ImplicitAs.facet.a10 [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -254,11 +258,11 @@ fn Test() {
|
||||
// CHECK:STDOUT: %Source.specific_fn.loc30: <specific function> = specific_function %Source.ref.loc30, @Source(constants.%X) [template = constants.%Source.specific_fn.363]
|
||||
// CHECK:STDOUT: %.loc30_20.1: ref %X = temporary_storage
|
||||
// CHECK:STDOUT: %Source.call.loc30: init %X = call %Source.specific_fn.loc30() to %.loc30_20.1
|
||||
// CHECK:STDOUT: %impl.elem0.loc30: %Convert.type.1b6 = impl_witness_access constants.%impl_witness.c53, element0 [template = constants.%Convert.c7a]
|
||||
// CHECK:STDOUT: %Convert.bound.loc30: <bound method> = bound_method %Source.call.loc30, %impl.elem0.loc30
|
||||
// CHECK:STDOUT: %impl.elem0.loc30: %.d2d = impl_witness_access constants.%impl_witness.c53, element0 [template = constants.%Convert.c7a]
|
||||
// CHECK:STDOUT: %bound_method.loc30: <bound method> = bound_method %Source.call.loc30, %impl.elem0.loc30
|
||||
// CHECK:STDOUT: %.loc30_20.2: ref %X = temporary %.loc30_20.1, %Source.call.loc30
|
||||
// CHECK:STDOUT: %.loc30_20.3: %X = bind_value %.loc30_20.2
|
||||
// CHECK:STDOUT: %Convert.call.loc30: init %i32 = call %Convert.bound.loc30(%.loc30_20.3)
|
||||
// CHECK:STDOUT: %Convert.call.loc30: init %i32 = call %bound_method.loc30(%.loc30_20.3)
|
||||
// CHECK:STDOUT: %.loc30_20.4: %i32 = value_of_initializer %Convert.call.loc30
|
||||
// CHECK:STDOUT: %.loc30_20.5: %i32 = converted %Source.call.loc30, %.loc30_20.4
|
||||
// CHECK:STDOUT: %Sink_i32.call: init %empty_tuple.type = call %Sink_i32.ref(%.loc30_20.5)
|
||||
@@ -268,12 +272,12 @@ fn Test() {
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %Source.specific_fn.loc31: <specific function> = specific_function %Source.ref.loc31, @Source(constants.%i32) [template = constants.%Source.specific_fn.cc7]
|
||||
// CHECK:STDOUT: %Source.call.loc31: init %i32 = call %Source.specific_fn.loc31()
|
||||
// CHECK:STDOUT: %impl.elem0.loc31: %Convert.type.665 = impl_witness_access constants.%impl_witness.226, element0 [template = constants.%Convert.08a]
|
||||
// CHECK:STDOUT: %Convert.bound.loc31: <bound method> = bound_method %Source.call.loc31, %impl.elem0.loc31
|
||||
// CHECK:STDOUT: %impl.elem0.loc31: %.d10 = impl_witness_access constants.%impl_witness.226, element0 [template = constants.%Convert.08a]
|
||||
// CHECK:STDOUT: %bound_method.loc31: <bound method> = bound_method %Source.call.loc31, %impl.elem0.loc31
|
||||
// CHECK:STDOUT: %.loc31_20.1: ref %X = temporary_storage
|
||||
// CHECK:STDOUT: %.loc31_20.2: %i32 = value_of_initializer %Source.call.loc31
|
||||
// CHECK:STDOUT: %.loc31_20.3: %i32 = converted %Source.call.loc31, %.loc31_20.2
|
||||
// CHECK:STDOUT: %Convert.call.loc31: init %X = call %Convert.bound.loc31(%.loc31_20.3) to %.loc31_20.1
|
||||
// CHECK:STDOUT: %Convert.call.loc31: init %X = call %bound_method.loc31(%.loc31_20.3) to %.loc31_20.1
|
||||
// CHECK:STDOUT: %.loc31_20.4: init %X = converted %Source.call.loc31, %Convert.call.loc31
|
||||
// CHECK:STDOUT: %.loc31_20.5: ref %X = temporary %.loc31_20.1, %.loc31_20.4
|
||||
// CHECK:STDOUT: %.loc31_20.6: %X = bind_value %.loc31_20.5
|
||||
|
||||
@@ -36,9 +36,11 @@ fn TestOp() {
|
||||
// CHECK:STDOUT: %ptr.019: type = ptr_type %C [template]
|
||||
// CHECK:STDOUT: %Op.type.73a: type = fn_type @Op.2 [template]
|
||||
// CHECK:STDOUT: %Op.0c9: %Op.type.73a = struct_value () [template]
|
||||
// CHECK:STDOUT: %Inc.facet: %Inc.type = facet_value %C, %impl_witness [template]
|
||||
// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template]
|
||||
// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %C.val: %C = struct_value () [template]
|
||||
// CHECK:STDOUT: %.e6d: type = fn_type_with_self_type %Op.type.e3a, %Inc.facet [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -110,10 +112,10 @@ fn TestOp() {
|
||||
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
|
||||
// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var
|
||||
// CHECK:STDOUT: %c.ref: ref %C = name_ref c, %c
|
||||
// CHECK:STDOUT: %impl.elem0: %Op.type.e3a = impl_witness_access constants.%impl_witness, element0 [template = constants.%Op.0c9]
|
||||
// CHECK:STDOUT: %Op.bound: <bound method> = bound_method %c.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %impl.elem0: %.e6d = impl_witness_access constants.%impl_witness, element0 [template = constants.%Op.0c9]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %c.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %addr: %ptr.019 = addr_of %c.ref
|
||||
// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %Op.bound(%addr)
|
||||
// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(%addr)
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+30
-21
@@ -92,9 +92,11 @@ let x: i32 = c[0];
|
||||
// CHECK:STDOUT: %impl_witness: <witness> = impl_witness (@impl.%At.decl) [template]
|
||||
// CHECK:STDOUT: %At.type.178: type = fn_type @At.2 [template]
|
||||
// CHECK:STDOUT: %At.d43: %At.type.178 = struct_value () [template]
|
||||
// CHECK:STDOUT: %IndexWith.facet: %IndexWith.type.e80 = facet_value %C, %impl_witness [template]
|
||||
// CHECK:STDOUT: %ElementType.val: %ElementType.e6b = struct_value () [template]
|
||||
// CHECK:STDOUT: %SubscriptType.val: %SubscriptType.8ee = struct_value () [template]
|
||||
// CHECK:STDOUT: %C.val: %C = struct_value () [template]
|
||||
// CHECK:STDOUT: %.1a3: type = fn_type_with_self_type %At.type.b3f, %IndexWith.facet [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -219,11 +221,11 @@ let x: i32 = c[0];
|
||||
// CHECK:STDOUT: %c.ref: ref %C = name_ref c, file.%c
|
||||
// CHECK:STDOUT: %s.ref: ref %SubscriptType.8ee = name_ref s, file.%s
|
||||
// CHECK:STDOUT: %.loc16_24: %SubscriptType.8ee = bind_value %s.ref
|
||||
// CHECK:STDOUT: %impl.elem0: %At.type.b3f = impl_witness_access constants.%impl_witness, element0 [template = constants.%At.d43]
|
||||
// CHECK:STDOUT: %At.bound: <bound method> = bound_method %c.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %impl.elem0: %.1a3 = impl_witness_access constants.%impl_witness, element0 [template = constants.%At.d43]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %c.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %.loc16_25: ref %ElementType.e6b = temporary_storage
|
||||
// CHECK:STDOUT: %.loc16_22: %C = bind_value %c.ref
|
||||
// CHECK:STDOUT: %At.call: init %ElementType.e6b = call %At.bound(%.loc16_22, %.loc16_24) to %.loc16_25
|
||||
// CHECK:STDOUT: %At.call: init %ElementType.e6b = call %bound_method(%.loc16_22, %.loc16_24) to %.loc16_25
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -241,14 +243,18 @@ let x: i32 = c[0];
|
||||
// CHECK:STDOUT: %impl_witness.123: <witness> = impl_witness (@impl.1.%At.decl) [template]
|
||||
// CHECK:STDOUT: %At.type.9ac: type = fn_type @At.2 [template]
|
||||
// CHECK:STDOUT: %At.642: %At.type.9ac = struct_value () [template]
|
||||
// CHECK:STDOUT: %IndexWith.facet: %IndexWith.type.917 = facet_value %tuple.type.d07, %impl_witness.123 [template]
|
||||
// CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [template]
|
||||
// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [template]
|
||||
// CHECK:STDOUT: %int_5.64b: Core.IntLiteral = int_value 5 [template]
|
||||
// CHECK:STDOUT: %tuple.type.f94: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [template]
|
||||
// CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [template]
|
||||
// CHECK:STDOUT: %impl_witness.d39: <witness> = impl_witness (imports.%Core.import_ref.a5b), @impl.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [template]
|
||||
// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, %impl_witness.d39 [template]
|
||||
// CHECK:STDOUT: %.a0b: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [template]
|
||||
// CHECK:STDOUT: %Convert.bound.ab5: <bound method> = bound_method %int_1.5b8, %Convert.956 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.70c: <specific function> = specific_function %Convert.bound.ab5, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [template]
|
||||
@@ -259,6 +265,7 @@ let x: i32 = c[0];
|
||||
// CHECK:STDOUT: %Convert.bound.d04: <bound method> = bound_method %int_0.5c6, %Convert.956 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.d62: <specific function> = specific_function %Convert.bound.d04, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [template]
|
||||
// CHECK:STDOUT: %.252: type = fn_type_with_self_type %At.type.d77, %IndexWith.facet [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -306,16 +313,16 @@ let x: i32 = c[0];
|
||||
// CHECK:STDOUT: %.loc10_17.2: %tuple.type.24b = tuple_literal (%i32.loc10_9, %i32.loc10_14)
|
||||
// CHECK:STDOUT: %.loc10_17.3: type = converted %.loc10_17.2, constants.%tuple.type.d07 [template = constants.%tuple.type.d07]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %impl.elem0.loc10_26.1: %Convert.type.1b6 = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %Convert.bound.loc10_26.1: <bound method> = bound_method @__global_init.%int_1, %impl.elem0.loc10_26.1 [template = constants.%Convert.bound.ab5]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc10_26.1: <specific function> = specific_function %Convert.bound.loc10_26.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.70c]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc10_26.1: init %i32 = call %Convert.specific_fn.loc10_26.1(@__global_init.%int_1) [template = constants.%int_1.5d2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc10_26.1: %.a0b = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %bound_method.loc10_26.1: <bound method> = bound_method @__global_init.%int_1, %impl.elem0.loc10_26.1 [template = constants.%Convert.bound.ab5]
|
||||
// CHECK:STDOUT: %specific_fn.loc10_26.1: <specific function> = specific_function %bound_method.loc10_26.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.70c]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc10_26.1: init %i32 = call %specific_fn.loc10_26.1(@__global_init.%int_1) [template = constants.%int_1.5d2]
|
||||
// CHECK:STDOUT: %.loc10_26.1: %i32 = value_of_initializer %int.convert_checked.loc10_26.1 [template = constants.%int_1.5d2]
|
||||
// CHECK:STDOUT: %.loc10_26.2: %i32 = converted @__global_init.%int_1, %.loc10_26.1 [template = constants.%int_1.5d2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc10_26.2: %Convert.type.1b6 = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %Convert.bound.loc10_26.2: <bound method> = bound_method @__global_init.%int_5, %impl.elem0.loc10_26.2 [template = constants.%Convert.bound.4e6]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc10_26.2: <specific function> = specific_function %Convert.bound.loc10_26.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.ba9]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc10_26.2: init %i32 = call %Convert.specific_fn.loc10_26.2(@__global_init.%int_5) [template = constants.%int_5.0f6]
|
||||
// CHECK:STDOUT: %impl.elem0.loc10_26.2: %.a0b = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %bound_method.loc10_26.2: <bound method> = bound_method @__global_init.%int_5, %impl.elem0.loc10_26.2 [template = constants.%Convert.bound.4e6]
|
||||
// CHECK:STDOUT: %specific_fn.loc10_26.2: <specific function> = specific_function %bound_method.loc10_26.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.ba9]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc10_26.2: init %i32 = call %specific_fn.loc10_26.2(@__global_init.%int_5) [template = constants.%int_5.0f6]
|
||||
// CHECK:STDOUT: %.loc10_26.3: %i32 = value_of_initializer %int.convert_checked.loc10_26.2 [template = constants.%int_5.0f6]
|
||||
// CHECK:STDOUT: %.loc10_26.4: %i32 = converted @__global_init.%int_5, %.loc10_26.3 [template = constants.%int_5.0f6]
|
||||
// CHECK:STDOUT: %tuple: %tuple.type.d07 = tuple_value (%.loc10_26.2, %.loc10_26.4) [template = constants.%tuple]
|
||||
@@ -377,15 +384,15 @@ let x: i32 = c[0];
|
||||
// CHECK:STDOUT: %.loc10: %tuple.type.f94 = tuple_literal (%int_1, %int_5)
|
||||
// CHECK:STDOUT: %s.ref: %tuple.type.d07 = name_ref s, file.%s
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.5c6]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_17.1: %Convert.type.1b6 = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %Convert.bound: <bound method> = bound_method %int_0, %impl.elem0.loc11_17.1 [template = constants.%Convert.bound.d04]
|
||||
// CHECK:STDOUT: %Convert.specific_fn: <specific function> = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.d62]
|
||||
// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.6a9]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_17.1: %.a0b = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %bound_method.loc11_17.1: <bound method> = bound_method %int_0, %impl.elem0.loc11_17.1 [template = constants.%Convert.bound.d04]
|
||||
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %bound_method.loc11_17.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.d62]
|
||||
// CHECK:STDOUT: %int.convert_checked: init %i32 = call %specific_fn(%int_0) [template = constants.%int_0.6a9]
|
||||
// CHECK:STDOUT: %.loc11_17.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_0.6a9]
|
||||
// CHECK:STDOUT: %.loc11_17.2: %i32 = converted %int_0, %.loc11_17.1 [template = constants.%int_0.6a9]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_17.2: %At.type.d77 = impl_witness_access constants.%impl_witness.123, element0 [template = constants.%At.642]
|
||||
// CHECK:STDOUT: %At.bound: <bound method> = bound_method %s.ref, %impl.elem0.loc11_17.2
|
||||
// CHECK:STDOUT: %At.call: init %i32 = call %At.bound(%s.ref, %.loc11_17.2)
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_17.2: %.252 = impl_witness_access constants.%impl_witness.123, element0 [template = constants.%At.642]
|
||||
// CHECK:STDOUT: %bound_method.loc11_17.2: <bound method> = bound_method %s.ref, %impl.elem0.loc11_17.2
|
||||
// CHECK:STDOUT: %At.call: init %i32 = call %bound_method.loc11_17.2(%s.ref, %.loc11_17.2)
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -404,9 +411,11 @@ let x: i32 = c[0];
|
||||
// CHECK:STDOUT: %impl_witness: <witness> = impl_witness (@impl.%At.decl) [template]
|
||||
// CHECK:STDOUT: %At.type.178: type = fn_type @At.2 [template]
|
||||
// CHECK:STDOUT: %At.d43: %At.type.178 = struct_value () [template]
|
||||
// CHECK:STDOUT: %IndexWith.facet: %IndexWith.type.e80 = facet_value %C, %impl_witness [template]
|
||||
// CHECK:STDOUT: %ElementType.val: %ElementType.e6b = struct_value () [template]
|
||||
// CHECK:STDOUT: %C.val: %C = struct_value () [template]
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template]
|
||||
// CHECK:STDOUT: %.1a3: type = fn_type_with_self_type %At.type.b3f, %IndexWith.facet [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -521,11 +530,11 @@ let x: i32 = c[0];
|
||||
// CHECK:STDOUT: %c.ref: ref %C = name_ref c, file.%c
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0]
|
||||
// CHECK:STDOUT: %.loc22_25.1: %SubscriptType.8ee = converted %int_0, <error> [template = <error>]
|
||||
// CHECK:STDOUT: %impl.elem0: %At.type.b3f = impl_witness_access constants.%impl_witness, element0 [template = constants.%At.d43]
|
||||
// CHECK:STDOUT: %At.bound: <bound method> = bound_method %c.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %impl.elem0: %.1a3 = impl_witness_access constants.%impl_witness, element0 [template = constants.%At.d43]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %c.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %.loc22_25.2: ref %ElementType.e6b = temporary_storage
|
||||
// CHECK:STDOUT: %.loc22_22: %C = bind_value %c.ref
|
||||
// CHECK:STDOUT: %At.call: init %ElementType.e6b = call %At.bound(%.loc22_22, <error>) to %.loc22_25.2
|
||||
// CHECK:STDOUT: %At.call: init %ElementType.e6b = call %bound_method(%.loc22_22, <error>) to %.loc22_25.2
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -43,6 +43,7 @@ fn TestAssign(a: C*, b: C) {
|
||||
// CHECK:STDOUT: %impl_witness.df4: <witness> = impl_witness (@impl.1.%Op.decl) [template]
|
||||
// CHECK:STDOUT: %Op.type.de2: type = fn_type @Op.2 [template]
|
||||
// CHECK:STDOUT: %Op.df9: %Op.type.de2 = struct_value () [template]
|
||||
// CHECK:STDOUT: %LeftShift.facet: %LeftShift.type = facet_value %C, %impl_witness.df4 [template]
|
||||
// CHECK:STDOUT: %C.val: %C = struct_value () [template]
|
||||
// CHECK:STDOUT: %LeftShiftAssign.type: type = facet_type <@LeftShiftAssign> [template]
|
||||
// CHECK:STDOUT: %Op.type.1de: type = fn_type @Op.3 [template]
|
||||
@@ -50,10 +51,13 @@ fn TestAssign(a: C*, b: C) {
|
||||
// CHECK:STDOUT: %ptr.019: type = ptr_type %C [template]
|
||||
// CHECK:STDOUT: %Op.type.386: type = fn_type @Op.4 [template]
|
||||
// CHECK:STDOUT: %Op.8fc: %Op.type.386 = struct_value () [template]
|
||||
// CHECK:STDOUT: %LeftShiftAssign.facet: %LeftShiftAssign.type = facet_value %C, %impl_witness.842 [template]
|
||||
// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template]
|
||||
// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.ad2: type = fn_type_with_self_type %Op.type.789, %LeftShift.facet [template]
|
||||
// CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template]
|
||||
// CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.b73: type = fn_type_with_self_type %Op.type.1de, %LeftShiftAssign.facet [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -198,10 +202,10 @@ fn TestAssign(a: C*, b: C) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %a.ref: %C = name_ref a, %a
|
||||
// CHECK:STDOUT: %b.ref: %C = name_ref b, %b
|
||||
// CHECK:STDOUT: %impl.elem0: %Op.type.789 = impl_witness_access constants.%impl_witness.df4, element0 [template = constants.%Op.df9]
|
||||
// CHECK:STDOUT: %Op.bound: <bound method> = bound_method %a.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %impl.elem0: %.ad2 = impl_witness_access constants.%impl_witness.df4, element0 [template = constants.%Op.df9]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %a.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %.loc26: ref %C = splice_block %return {}
|
||||
// CHECK:STDOUT: %Op.call: init %C = call %Op.bound(%a.ref, %b.ref) to %.loc26
|
||||
// CHECK:STDOUT: %Op.call: init %C = call %bound_method(%a.ref, %b.ref) to %.loc26
|
||||
// CHECK:STDOUT: return %Op.call to %return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -210,10 +214,10 @@ fn TestAssign(a: C*, b: C) {
|
||||
// CHECK:STDOUT: %a.ref: %ptr.019 = name_ref a, %a
|
||||
// CHECK:STDOUT: %.loc31: ref %C = deref %a.ref
|
||||
// CHECK:STDOUT: %b.ref: %C = name_ref b, %b
|
||||
// CHECK:STDOUT: %impl.elem0: %Op.type.1de = impl_witness_access constants.%impl_witness.842, element0 [template = constants.%Op.8fc]
|
||||
// CHECK:STDOUT: %Op.bound: <bound method> = bound_method %.loc31, %impl.elem0
|
||||
// CHECK:STDOUT: %impl.elem0: %.b73 = impl_witness_access constants.%impl_witness.842, element0 [template = constants.%Op.8fc]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %.loc31, %impl.elem0
|
||||
// CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc31
|
||||
// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %Op.bound(%addr, %b.ref)
|
||||
// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(%addr, %b.ref)
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+10
-6
@@ -43,6 +43,7 @@ fn TestAssign(a: C*, b: C) {
|
||||
// CHECK:STDOUT: %impl_witness.5d5: <witness> = impl_witness (@impl.1.%Op.decl) [template]
|
||||
// CHECK:STDOUT: %Op.type.fd2: type = fn_type @Op.2 [template]
|
||||
// CHECK:STDOUT: %Op.777: %Op.type.fd2 = struct_value () [template]
|
||||
// CHECK:STDOUT: %Mod.facet: %Mod.type = facet_value %C, %impl_witness.5d5 [template]
|
||||
// CHECK:STDOUT: %C.val: %C = struct_value () [template]
|
||||
// CHECK:STDOUT: %ModAssign.type: type = facet_type <@ModAssign> [template]
|
||||
// CHECK:STDOUT: %Op.type.fae: type = fn_type @Op.3 [template]
|
||||
@@ -50,10 +51,13 @@ fn TestAssign(a: C*, b: C) {
|
||||
// CHECK:STDOUT: %ptr.019: type = ptr_type %C [template]
|
||||
// CHECK:STDOUT: %Op.type.fa2: type = fn_type @Op.4 [template]
|
||||
// CHECK:STDOUT: %Op.d6c: %Op.type.fa2 = struct_value () [template]
|
||||
// CHECK:STDOUT: %ModAssign.facet: %ModAssign.type = facet_value %C, %impl_witness.5ee [template]
|
||||
// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template]
|
||||
// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.86c: type = fn_type_with_self_type %Op.type.860, %Mod.facet [template]
|
||||
// CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template]
|
||||
// CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.e7d: type = fn_type_with_self_type %Op.type.fae, %ModAssign.facet [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -198,10 +202,10 @@ fn TestAssign(a: C*, b: C) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %a.ref: %C = name_ref a, %a
|
||||
// CHECK:STDOUT: %b.ref: %C = name_ref b, %b
|
||||
// CHECK:STDOUT: %impl.elem0: %Op.type.860 = impl_witness_access constants.%impl_witness.5d5, element0 [template = constants.%Op.777]
|
||||
// CHECK:STDOUT: %Op.bound: <bound method> = bound_method %a.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %impl.elem0: %.86c = impl_witness_access constants.%impl_witness.5d5, element0 [template = constants.%Op.777]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %a.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %.loc26: ref %C = splice_block %return {}
|
||||
// CHECK:STDOUT: %Op.call: init %C = call %Op.bound(%a.ref, %b.ref) to %.loc26
|
||||
// CHECK:STDOUT: %Op.call: init %C = call %bound_method(%a.ref, %b.ref) to %.loc26
|
||||
// CHECK:STDOUT: return %Op.call to %return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -210,10 +214,10 @@ fn TestAssign(a: C*, b: C) {
|
||||
// CHECK:STDOUT: %a.ref: %ptr.019 = name_ref a, %a
|
||||
// CHECK:STDOUT: %.loc31: ref %C = deref %a.ref
|
||||
// CHECK:STDOUT: %b.ref: %C = name_ref b, %b
|
||||
// CHECK:STDOUT: %impl.elem0: %Op.type.fae = impl_witness_access constants.%impl_witness.5ee, element0 [template = constants.%Op.d6c]
|
||||
// CHECK:STDOUT: %Op.bound: <bound method> = bound_method %.loc31, %impl.elem0
|
||||
// CHECK:STDOUT: %impl.elem0: %.e7d = impl_witness_access constants.%impl_witness.5ee, element0 [template = constants.%Op.d6c]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %.loc31, %impl.elem0
|
||||
// CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc31
|
||||
// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %Op.bound(%addr, %b.ref)
|
||||
// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(%addr, %b.ref)
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+10
-6
@@ -43,6 +43,7 @@ fn TestAssign(a: C*, b: C) {
|
||||
// CHECK:STDOUT: %impl_witness.289: <witness> = impl_witness (@impl.1.%Op.decl) [template]
|
||||
// CHECK:STDOUT: %Op.type.fa5: type = fn_type @Op.2 [template]
|
||||
// CHECK:STDOUT: %Op.550: %Op.type.fa5 = struct_value () [template]
|
||||
// CHECK:STDOUT: %Mul.facet: %Mul.type = facet_value %C, %impl_witness.289 [template]
|
||||
// CHECK:STDOUT: %C.val: %C = struct_value () [template]
|
||||
// CHECK:STDOUT: %MulAssign.type: type = facet_type <@MulAssign> [template]
|
||||
// CHECK:STDOUT: %Op.type.340: type = fn_type @Op.3 [template]
|
||||
@@ -50,10 +51,13 @@ fn TestAssign(a: C*, b: C) {
|
||||
// CHECK:STDOUT: %ptr.019: type = ptr_type %C [template]
|
||||
// CHECK:STDOUT: %Op.type.c02: type = fn_type @Op.4 [template]
|
||||
// CHECK:STDOUT: %Op.a8c: %Op.type.c02 = struct_value () [template]
|
||||
// CHECK:STDOUT: %MulAssign.facet: %MulAssign.type = facet_value %C, %impl_witness.de9 [template]
|
||||
// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template]
|
||||
// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.221: type = fn_type_with_self_type %Op.type.3ae, %Mul.facet [template]
|
||||
// CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template]
|
||||
// CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.037: type = fn_type_with_self_type %Op.type.340, %MulAssign.facet [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -198,10 +202,10 @@ fn TestAssign(a: C*, b: C) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %a.ref: %C = name_ref a, %a
|
||||
// CHECK:STDOUT: %b.ref: %C = name_ref b, %b
|
||||
// CHECK:STDOUT: %impl.elem0: %Op.type.3ae = impl_witness_access constants.%impl_witness.289, element0 [template = constants.%Op.550]
|
||||
// CHECK:STDOUT: %Op.bound: <bound method> = bound_method %a.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %impl.elem0: %.221 = impl_witness_access constants.%impl_witness.289, element0 [template = constants.%Op.550]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %a.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %.loc26: ref %C = splice_block %return {}
|
||||
// CHECK:STDOUT: %Op.call: init %C = call %Op.bound(%a.ref, %b.ref) to %.loc26
|
||||
// CHECK:STDOUT: %Op.call: init %C = call %bound_method(%a.ref, %b.ref) to %.loc26
|
||||
// CHECK:STDOUT: return %Op.call to %return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -210,10 +214,10 @@ fn TestAssign(a: C*, b: C) {
|
||||
// CHECK:STDOUT: %a.ref: %ptr.019 = name_ref a, %a
|
||||
// CHECK:STDOUT: %.loc31: ref %C = deref %a.ref
|
||||
// CHECK:STDOUT: %b.ref: %C = name_ref b, %b
|
||||
// CHECK:STDOUT: %impl.elem0: %Op.type.340 = impl_witness_access constants.%impl_witness.de9, element0 [template = constants.%Op.a8c]
|
||||
// CHECK:STDOUT: %Op.bound: <bound method> = bound_method %.loc31, %impl.elem0
|
||||
// CHECK:STDOUT: %impl.elem0: %.037 = impl_witness_access constants.%impl_witness.de9, element0 [template = constants.%Op.a8c]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %.loc31, %impl.elem0
|
||||
// CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc31
|
||||
// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %Op.bound(%addr, %b.ref)
|
||||
// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(%addr, %b.ref)
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -35,9 +35,11 @@ fn TestOp(a: C) -> C {
|
||||
// CHECK:STDOUT: %impl_witness: <witness> = impl_witness (@impl.1.%Op.decl) [template]
|
||||
// CHECK:STDOUT: %Op.type.67d: type = fn_type @Op.2 [template]
|
||||
// CHECK:STDOUT: %Op.64c: %Op.type.67d = struct_value () [template]
|
||||
// CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value %C, %impl_witness [template]
|
||||
// CHECK:STDOUT: %C.val: %C = struct_value () [template]
|
||||
// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template]
|
||||
// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.362: type = fn_type_with_self_type %Op.type.e42, %Negate.facet [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -117,10 +119,10 @@ fn TestOp(a: C) -> C {
|
||||
// CHECK:STDOUT: fn @TestOp(%a.param_patt: %C) -> %return.param_patt: %C {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %a.ref: %C = name_ref a, %a
|
||||
// CHECK:STDOUT: %impl.elem0: %Op.type.e42 = impl_witness_access constants.%impl_witness, element0 [template = constants.%Op.64c]
|
||||
// CHECK:STDOUT: %Op.bound: <bound method> = bound_method %a.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %impl.elem0: %.362 = impl_witness_access constants.%impl_witness, element0 [template = constants.%Op.64c]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %a.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %.loc23: ref %C = splice_block %return {}
|
||||
// CHECK:STDOUT: %Op.call: init %C = call %Op.bound(%a.ref) to %.loc23
|
||||
// CHECK:STDOUT: %Op.call: init %C = call %bound_method(%a.ref) to %.loc23
|
||||
// CHECK:STDOUT: return %Op.call to %return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -136,10 +136,11 @@ fn F() { ()[()]; }
|
||||
// CHECK:STDOUT: %impl_witness: <witness> = impl_witness (@impl.%At.decl) [template]
|
||||
// CHECK:STDOUT: %At.type.8fc: type = fn_type @At.2 [template]
|
||||
// CHECK:STDOUT: %At.8ba: %At.type.8fc = struct_value () [template]
|
||||
// CHECK:STDOUT: %IndexWith.facet: %IndexWith.type.518 = facet_value %empty_tuple.type, %impl_witness [symbolic]
|
||||
// CHECK:STDOUT: %IndexWith.facet: %IndexWith.type.4ab = facet_value %empty_tuple.type, %impl_witness [template]
|
||||
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.b91: type = fn_type_with_self_type %At.type.082, %IndexWith.facet [template]
|
||||
// CHECK:STDOUT: %At.bound: <bound method> = bound_method %empty_tuple, %At.8ba [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -272,9 +273,9 @@ fn F() { ()[()]; }
|
||||
// CHECK:STDOUT: %.loc15_11.2: %empty_tuple.type = converted %.loc15_11.1, %empty_tuple.loc15_11 [template = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %empty_tuple.loc15_14: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc15_15: %empty_tuple.type = converted %.loc15_14, %empty_tuple.loc15_14 [template = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %impl.elem0: %At.type.082 = impl_witness_access constants.%impl_witness, element0 [template = constants.%At.8ba]
|
||||
// CHECK:STDOUT: %At.bound: <bound method> = bound_method %.loc15_11.2, %impl.elem0 [template = constants.%At.bound]
|
||||
// CHECK:STDOUT: %At.call: init %empty_tuple.type = call %At.bound(%.loc15_11.2, %.loc15_15)
|
||||
// CHECK:STDOUT: %impl.elem0: %.b91 = impl_witness_access constants.%impl_witness, element0 [template = constants.%At.8ba]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %.loc15_11.2, %impl.elem0 [template = constants.%At.bound]
|
||||
// CHECK:STDOUT: %At.call: init %empty_tuple.type = call %bound_method(%.loc15_11.2, %.loc15_15)
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+17
-12
@@ -97,14 +97,19 @@ fn TestGreaterEqual(a: D, b: D) -> bool {
|
||||
// CHECK:STDOUT: %Greater.afe: %Greater.type.0a1 = struct_value () [template]
|
||||
// CHECK:STDOUT: %GreaterOrEquivalent.type.caf: type = fn_type @GreaterOrEquivalent.2 [template]
|
||||
// CHECK:STDOUT: %GreaterOrEquivalent.03b: %GreaterOrEquivalent.type.caf = struct_value () [template]
|
||||
// CHECK:STDOUT: %Ordered.facet: %Ordered.type = facet_value %C, %impl_witness [template]
|
||||
// CHECK:STDOUT: %TestLess.type: type = fn_type @TestLess [template]
|
||||
// CHECK:STDOUT: %TestLess: %TestLess.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.7d6: type = fn_type_with_self_type %Less.type.341, %Ordered.facet [template]
|
||||
// CHECK:STDOUT: %TestLessEqual.type: type = fn_type @TestLessEqual [template]
|
||||
// CHECK:STDOUT: %TestLessEqual: %TestLessEqual.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.635: type = fn_type_with_self_type %LessOrEquivalent.type.859, %Ordered.facet [template]
|
||||
// CHECK:STDOUT: %TestGreater.type: type = fn_type @TestGreater [template]
|
||||
// CHECK:STDOUT: %TestGreater: %TestGreater.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.104: type = fn_type_with_self_type %Greater.type.270, %Ordered.facet [template]
|
||||
// CHECK:STDOUT: %TestGreaterEqual.type: type = fn_type @TestGreaterEqual [template]
|
||||
// CHECK:STDOUT: %TestGreaterEqual: %TestGreaterEqual.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.086: type = fn_type_with_self_type %GreaterOrEquivalent.type.8af, %Ordered.facet [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -326,9 +331,9 @@ fn TestGreaterEqual(a: D, b: D) -> bool {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %a.ref: %C = name_ref a, %a
|
||||
// CHECK:STDOUT: %b.ref: %C = name_ref b, %b
|
||||
// CHECK:STDOUT: %impl.elem0: %Less.type.341 = impl_witness_access constants.%impl_witness, element0 [template = constants.%Less.738]
|
||||
// CHECK:STDOUT: %Less.bound: <bound method> = bound_method %a.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %Less.call: init bool = call %Less.bound(%a.ref, %b.ref)
|
||||
// CHECK:STDOUT: %impl.elem0: %.7d6 = impl_witness_access constants.%impl_witness, element0 [template = constants.%Less.738]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %a.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %Less.call: init bool = call %bound_method(%a.ref, %b.ref)
|
||||
// CHECK:STDOUT: %.loc14_15.1: bool = value_of_initializer %Less.call
|
||||
// CHECK:STDOUT: %.loc14_15.2: bool = converted %Less.call, %.loc14_15.1
|
||||
// CHECK:STDOUT: return %.loc14_15.2
|
||||
@@ -338,9 +343,9 @@ fn TestGreaterEqual(a: D, b: D) -> bool {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %a.ref: %C = name_ref a, %a
|
||||
// CHECK:STDOUT: %b.ref: %C = name_ref b, %b
|
||||
// CHECK:STDOUT: %impl.elem1: %LessOrEquivalent.type.859 = impl_witness_access constants.%impl_witness, element1 [template = constants.%LessOrEquivalent.010]
|
||||
// CHECK:STDOUT: %LessOrEquivalent.bound: <bound method> = bound_method %a.ref, %impl.elem1
|
||||
// CHECK:STDOUT: %LessOrEquivalent.call: init bool = call %LessOrEquivalent.bound(%a.ref, %b.ref)
|
||||
// CHECK:STDOUT: %impl.elem1: %.635 = impl_witness_access constants.%impl_witness, element1 [template = constants.%LessOrEquivalent.010]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %a.ref, %impl.elem1
|
||||
// CHECK:STDOUT: %LessOrEquivalent.call: init bool = call %bound_method(%a.ref, %b.ref)
|
||||
// CHECK:STDOUT: %.loc18_16.1: bool = value_of_initializer %LessOrEquivalent.call
|
||||
// CHECK:STDOUT: %.loc18_16.2: bool = converted %LessOrEquivalent.call, %.loc18_16.1
|
||||
// CHECK:STDOUT: return %.loc18_16.2
|
||||
@@ -350,9 +355,9 @@ fn TestGreaterEqual(a: D, b: D) -> bool {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %a.ref: %C = name_ref a, %a
|
||||
// CHECK:STDOUT: %b.ref: %C = name_ref b, %b
|
||||
// CHECK:STDOUT: %impl.elem2: %Greater.type.270 = impl_witness_access constants.%impl_witness, element2 [template = constants.%Greater.afe]
|
||||
// CHECK:STDOUT: %Greater.bound: <bound method> = bound_method %a.ref, %impl.elem2
|
||||
// CHECK:STDOUT: %Greater.call: init bool = call %Greater.bound(%a.ref, %b.ref)
|
||||
// CHECK:STDOUT: %impl.elem2: %.104 = impl_witness_access constants.%impl_witness, element2 [template = constants.%Greater.afe]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %a.ref, %impl.elem2
|
||||
// CHECK:STDOUT: %Greater.call: init bool = call %bound_method(%a.ref, %b.ref)
|
||||
// CHECK:STDOUT: %.loc22_15.1: bool = value_of_initializer %Greater.call
|
||||
// CHECK:STDOUT: %.loc22_15.2: bool = converted %Greater.call, %.loc22_15.1
|
||||
// CHECK:STDOUT: return %.loc22_15.2
|
||||
@@ -362,9 +367,9 @@ fn TestGreaterEqual(a: D, b: D) -> bool {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %a.ref: %C = name_ref a, %a
|
||||
// CHECK:STDOUT: %b.ref: %C = name_ref b, %b
|
||||
// CHECK:STDOUT: %impl.elem3: %GreaterOrEquivalent.type.8af = impl_witness_access constants.%impl_witness, element3 [template = constants.%GreaterOrEquivalent.03b]
|
||||
// CHECK:STDOUT: %GreaterOrEquivalent.bound: <bound method> = bound_method %a.ref, %impl.elem3
|
||||
// CHECK:STDOUT: %GreaterOrEquivalent.call: init bool = call %GreaterOrEquivalent.bound(%a.ref, %b.ref)
|
||||
// CHECK:STDOUT: %impl.elem3: %.086 = impl_witness_access constants.%impl_witness, element3 [template = constants.%GreaterOrEquivalent.03b]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %a.ref, %impl.elem3
|
||||
// CHECK:STDOUT: %GreaterOrEquivalent.call: init bool = call %bound_method(%a.ref, %b.ref)
|
||||
// CHECK:STDOUT: %.loc26_16.1: bool = value_of_initializer %GreaterOrEquivalent.call
|
||||
// CHECK:STDOUT: %.loc26_16.2: bool = converted %GreaterOrEquivalent.call, %.loc26_16.1
|
||||
// CHECK:STDOUT: return %.loc26_16.2
|
||||
|
||||
@@ -43,6 +43,7 @@ fn TestAssign(a: C*, b: C) {
|
||||
// CHECK:STDOUT: %impl_witness.404: <witness> = impl_witness (@impl.1.%Op.decl) [template]
|
||||
// CHECK:STDOUT: %Op.type.092: type = fn_type @Op.2 [template]
|
||||
// CHECK:STDOUT: %Op.79a: %Op.type.092 = struct_value () [template]
|
||||
// CHECK:STDOUT: %RightShift.facet: %RightShift.type = facet_value %C, %impl_witness.404 [template]
|
||||
// CHECK:STDOUT: %C.val: %C = struct_value () [template]
|
||||
// CHECK:STDOUT: %RightShiftAssign.type: type = facet_type <@RightShiftAssign> [template]
|
||||
// CHECK:STDOUT: %Op.type.6f6: type = fn_type @Op.3 [template]
|
||||
@@ -50,10 +51,13 @@ fn TestAssign(a: C*, b: C) {
|
||||
// CHECK:STDOUT: %ptr.019: type = ptr_type %C [template]
|
||||
// CHECK:STDOUT: %Op.type.aab: type = fn_type @Op.4 [template]
|
||||
// CHECK:STDOUT: %Op.7b2: %Op.type.aab = struct_value () [template]
|
||||
// CHECK:STDOUT: %RightShiftAssign.facet: %RightShiftAssign.type = facet_value %C, %impl_witness.686 [template]
|
||||
// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template]
|
||||
// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.882: type = fn_type_with_self_type %Op.type.4f4, %RightShift.facet [template]
|
||||
// CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template]
|
||||
// CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.f3e: type = fn_type_with_self_type %Op.type.6f6, %RightShiftAssign.facet [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -198,10 +202,10 @@ fn TestAssign(a: C*, b: C) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %a.ref: %C = name_ref a, %a
|
||||
// CHECK:STDOUT: %b.ref: %C = name_ref b, %b
|
||||
// CHECK:STDOUT: %impl.elem0: %Op.type.4f4 = impl_witness_access constants.%impl_witness.404, element0 [template = constants.%Op.79a]
|
||||
// CHECK:STDOUT: %Op.bound: <bound method> = bound_method %a.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %impl.elem0: %.882 = impl_witness_access constants.%impl_witness.404, element0 [template = constants.%Op.79a]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %a.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %.loc26: ref %C = splice_block %return {}
|
||||
// CHECK:STDOUT: %Op.call: init %C = call %Op.bound(%a.ref, %b.ref) to %.loc26
|
||||
// CHECK:STDOUT: %Op.call: init %C = call %bound_method(%a.ref, %b.ref) to %.loc26
|
||||
// CHECK:STDOUT: return %Op.call to %return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -210,10 +214,10 @@ fn TestAssign(a: C*, b: C) {
|
||||
// CHECK:STDOUT: %a.ref: %ptr.019 = name_ref a, %a
|
||||
// CHECK:STDOUT: %.loc31: ref %C = deref %a.ref
|
||||
// CHECK:STDOUT: %b.ref: %C = name_ref b, %b
|
||||
// CHECK:STDOUT: %impl.elem0: %Op.type.6f6 = impl_witness_access constants.%impl_witness.686, element0 [template = constants.%Op.7b2]
|
||||
// CHECK:STDOUT: %Op.bound: <bound method> = bound_method %.loc31, %impl.elem0
|
||||
// CHECK:STDOUT: %impl.elem0: %.f3e = impl_witness_access constants.%impl_witness.686, element0 [template = constants.%Op.7b2]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %.loc31, %impl.elem0
|
||||
// CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc31
|
||||
// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %Op.bound(%addr, %b.ref)
|
||||
// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(%addr, %b.ref)
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+10
-6
@@ -43,6 +43,7 @@ fn TestAssign(a: C*, b: C) {
|
||||
// CHECK:STDOUT: %impl_witness.3b8: <witness> = impl_witness (@impl.1.%Op.decl) [template]
|
||||
// CHECK:STDOUT: %Op.type.c74: type = fn_type @Op.2 [template]
|
||||
// CHECK:STDOUT: %Op.151: %Op.type.c74 = struct_value () [template]
|
||||
// CHECK:STDOUT: %Sub.facet: %Sub.type = facet_value %C, %impl_witness.3b8 [template]
|
||||
// CHECK:STDOUT: %C.val: %C = struct_value () [template]
|
||||
// CHECK:STDOUT: %SubAssign.type: type = facet_type <@SubAssign> [template]
|
||||
// CHECK:STDOUT: %Op.type.f0d: type = fn_type @Op.3 [template]
|
||||
@@ -50,10 +51,13 @@ fn TestAssign(a: C*, b: C) {
|
||||
// CHECK:STDOUT: %ptr.019: type = ptr_type %C [template]
|
||||
// CHECK:STDOUT: %Op.type.966: type = fn_type @Op.4 [template]
|
||||
// CHECK:STDOUT: %Op.a55: %Op.type.966 = struct_value () [template]
|
||||
// CHECK:STDOUT: %SubAssign.facet: %SubAssign.type = facet_value %C, %impl_witness.91c [template]
|
||||
// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template]
|
||||
// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.f35: type = fn_type_with_self_type %Op.type.111, %Sub.facet [template]
|
||||
// CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template]
|
||||
// CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.3d8: type = fn_type_with_self_type %Op.type.f0d, %SubAssign.facet [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -198,10 +202,10 @@ fn TestAssign(a: C*, b: C) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %a.ref: %C = name_ref a, %a
|
||||
// CHECK:STDOUT: %b.ref: %C = name_ref b, %b
|
||||
// CHECK:STDOUT: %impl.elem0: %Op.type.111 = impl_witness_access constants.%impl_witness.3b8, element0 [template = constants.%Op.151]
|
||||
// CHECK:STDOUT: %Op.bound: <bound method> = bound_method %a.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %impl.elem0: %.f35 = impl_witness_access constants.%impl_witness.3b8, element0 [template = constants.%Op.151]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %a.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %.loc26: ref %C = splice_block %return {}
|
||||
// CHECK:STDOUT: %Op.call: init %C = call %Op.bound(%a.ref, %b.ref) to %.loc26
|
||||
// CHECK:STDOUT: %Op.call: init %C = call %bound_method(%a.ref, %b.ref) to %.loc26
|
||||
// CHECK:STDOUT: return %Op.call to %return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -210,10 +214,10 @@ fn TestAssign(a: C*, b: C) {
|
||||
// CHECK:STDOUT: %a.ref: %ptr.019 = name_ref a, %a
|
||||
// CHECK:STDOUT: %.loc31: ref %C = deref %a.ref
|
||||
// CHECK:STDOUT: %b.ref: %C = name_ref b, %b
|
||||
// CHECK:STDOUT: %impl.elem0: %Op.type.f0d = impl_witness_access constants.%impl_witness.91c, element0 [template = constants.%Op.a55]
|
||||
// CHECK:STDOUT: %Op.bound: <bound method> = bound_method %.loc31, %impl.elem0
|
||||
// CHECK:STDOUT: %impl.elem0: %.3d8 = impl_witness_access constants.%impl_witness.91c, element0 [template = constants.%Op.a55]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %.loc31, %impl.elem0
|
||||
// CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc31
|
||||
// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %Op.bound(%addr, %b.ref)
|
||||
// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(%addr, %b.ref)
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
Reference in New Issue
Block a user