generic_method.carbon 106 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. //
  5. // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon
  6. // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only".
  7. // EXTRA-ARGS: --dump-sem-ir-ranges=if-present
  8. //
  9. // AUTOUPDATE
  10. // TIP: To test this file alone, run:
  11. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/interface/generic_method.carbon
  12. // TIP: To dump output, run:
  13. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/generic_method.carbon
  14. // --- generic_method_fewer_params.carbon
  15. library "[[@TEST_NAME]]";
  16. // T has index 0, Self has index 1, U has index 2.
  17. interface A(T:! type) {
  18. fn F(U:! type, u: U*) -> (T, Self, U*);
  19. }
  20. class X {}
  21. class Y {}
  22. class Z {}
  23. impl Y as A(X) {
  24. // Here, U has index 0. The specific used for A.F needs to renumber its U from
  25. // index 2 to index 0.
  26. fn F(U:! type, u: U*) -> (X, Y, U*) {
  27. return ({}, {}, u);
  28. }
  29. }
  30. fn Call() {
  31. var u: Z;
  32. (Y as A(X)).F(Z, &u);
  33. }
  34. fn CallGeneric(T:! A(X)) {
  35. var u: Z;
  36. T.F(Z, &u);
  37. }
  38. fn CallIndirect() {
  39. CallGeneric(Y);
  40. }
  41. // --- generic_method_more_params.carbon
  42. library "[[@TEST_NAME]]";
  43. // T has index 0, Self has index 1, U has index 2.
  44. interface A(T:! type) {
  45. fn F(U:! type, u: U) -> (T, Self, U);
  46. }
  47. class X {}
  48. class Y1 {}
  49. class Y2 {}
  50. class Z {}
  51. impl forall [V1:! type, V2:! type, W:! type] (V1, V2) as A(W) {
  52. // Here, U has index 3. The specific used for A.F needs to renumber its U from
  53. // index 2 to index 3.
  54. fn F(U:! type, u: U) -> (W, (V1, V2), U) {
  55. return F(U, u);
  56. }
  57. }
  58. fn Call() {
  59. // TODO: The `as type` here should not be necessary.
  60. (((Y1, Y2) as type) as A(X)).F(Z, {});
  61. }
  62. fn CallGeneric(T:! A(X)) {
  63. T.F(Z, {});
  64. }
  65. fn CallIndirect() {
  66. // TODO: The `as type` here should not be necessary.
  67. CallGeneric((Y1, Y2) as type);
  68. }
  69. // CHECK:STDOUT: --- generic_method_fewer_params.carbon
  70. // CHECK:STDOUT:
  71. // CHECK:STDOUT: constants {
  72. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  73. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self]
  74. // CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic]
  75. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  76. // CHECK:STDOUT: %A.type.495: type = generic_interface_type @A [concrete]
  77. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  78. // CHECK:STDOUT: %A.generic: %A.type.495 = struct_value () [concrete]
  79. // CHECK:STDOUT: %A.type.d88: type = facet_type <@A, @A(%T.8b3)> [symbolic]
  80. // CHECK:STDOUT: %Self.c6b: %A.type.d88 = bind_symbolic_name Self, 1 [symbolic]
  81. // CHECK:STDOUT: %U.2cb: type = bind_symbolic_name U, 2 [symbolic]
  82. // CHECK:STDOUT: %ptr.204: type = ptr_type %U.2cb [symbolic]
  83. // CHECK:STDOUT: %pattern_type.eee: type = pattern_type %ptr.204 [symbolic]
  84. // CHECK:STDOUT: %tuple.type.098: type = tuple_type (type, %A.type.d88, type) [symbolic]
  85. // CHECK:STDOUT: %Self.as_type.707: type = facet_access_type %Self.c6b [symbolic]
  86. // CHECK:STDOUT: %tuple.type.cb0: type = tuple_type (%T.8b3, %Self.as_type.707, %ptr.204) [symbolic]
  87. // CHECK:STDOUT: %pattern_type.44d: type = pattern_type %tuple.type.cb0 [symbolic]
  88. // CHECK:STDOUT: %A.F.type.17a: type = fn_type @A.F, @A(%T.8b3) [symbolic]
  89. // CHECK:STDOUT: %A.F.0d8: %A.F.type.17a = struct_value () [symbolic]
  90. // CHECK:STDOUT: %A.assoc_type.ed3: type = assoc_entity_type @A, @A(%T.8b3) [symbolic]
  91. // CHECK:STDOUT: %assoc0.fcb: %A.assoc_type.ed3 = assoc_entity element0, @A.%A.F.decl [symbolic]
  92. // CHECK:STDOUT: %X: type = class_type @X [concrete]
  93. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  94. // CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
  95. // CHECK:STDOUT: %Y: type = class_type @Y [concrete]
  96. // CHECK:STDOUT: %Z: type = class_type @Z [concrete]
  97. // CHECK:STDOUT: %A.type.0a4: type = facet_type <@A, @A(%X)> [concrete]
  98. // CHECK:STDOUT: %Self.08e: %A.type.0a4 = bind_symbolic_name Self, 1 [symbolic]
  99. // CHECK:STDOUT: %A.F.type.13d: type = fn_type @A.F, @A(%X) [concrete]
  100. // CHECK:STDOUT: %A.F.d83: %A.F.type.13d = struct_value () [concrete]
  101. // CHECK:STDOUT: %A.assoc_type.296: type = assoc_entity_type @A, @A(%X) [concrete]
  102. // CHECK:STDOUT: %assoc0.5f6: %A.assoc_type.296 = assoc_entity element0, @A.%A.F.decl [concrete]
  103. // CHECK:STDOUT: %A.impl_witness: <witness> = impl_witness file.%A.impl_witness_table [concrete]
  104. // CHECK:STDOUT: %U.8b3: type = bind_symbolic_name U, 0 [symbolic]
  105. // CHECK:STDOUT: %ptr.79f131.1: type = ptr_type %U.8b3 [symbolic]
  106. // CHECK:STDOUT: %pattern_type.afe393.1: type = pattern_type %ptr.79f131.1 [symbolic]
  107. // CHECK:STDOUT: %tuple.type.ff9: type = tuple_type (type, type, type) [concrete]
  108. // CHECK:STDOUT: %tuple.type.c14: type = tuple_type (%X, %Y, %ptr.79f131.1) [symbolic]
  109. // CHECK:STDOUT: %pattern_type.ac9: type = pattern_type %tuple.type.c14 [symbolic]
  110. // CHECK:STDOUT: %Y.as.A.impl.F.type: type = fn_type @Y.as.A.impl.F [concrete]
  111. // CHECK:STDOUT: %Y.as.A.impl.F: %Y.as.A.impl.F.type = struct_value () [concrete]
  112. // CHECK:STDOUT: %A.facet: %A.type.0a4 = facet_value %Y, (%A.impl_witness) [concrete]
  113. // CHECK:STDOUT: %tuple.type.5a1: type = tuple_type (type, %A.type.0a4, type) [concrete]
  114. // CHECK:STDOUT: %require_complete.86f: <witness> = require_complete_type %tuple.type.c14 [symbolic]
  115. // CHECK:STDOUT: %require_complete.6e5e64.1: <witness> = require_complete_type %ptr.79f131.1 [symbolic]
  116. // CHECK:STDOUT: %tuple.type.e44: type = tuple_type (%empty_struct_type, %empty_struct_type, %ptr.79f131.1) [symbolic]
  117. // CHECK:STDOUT: %X.val: %X = struct_value () [concrete]
  118. // CHECK:STDOUT: %Y.val: %Y = struct_value () [concrete]
  119. // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete]
  120. // CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete]
  121. // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.31ff4e.1: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.8b3) [symbolic]
  122. // CHECK:STDOUT: %ptr.as.Copy.impl.Op.8a8b1a.1: %ptr.as.Copy.impl.Op.type.31ff4e.1 = struct_value () [symbolic]
  123. // CHECK:STDOUT: %Copy.lookup_impl_witness.cb2: <witness> = lookup_impl_witness %ptr.79f131.1, @Copy [symbolic]
  124. // CHECK:STDOUT: %Copy.facet.2d1: %Copy.type = facet_value %ptr.79f131.1, (%Copy.lookup_impl_witness.cb2) [symbolic]
  125. // CHECK:STDOUT: %.1cc: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.2d1 [symbolic]
  126. // CHECK:STDOUT: %impl.elem0.751: %.1cc = impl_witness_access %Copy.lookup_impl_witness.cb2, element0 [symbolic]
  127. // CHECK:STDOUT: %specific_impl_fn.f44: <specific function> = specific_impl_function %impl.elem0.751, @Copy.Op(%Copy.facet.2d1) [symbolic]
  128. // CHECK:STDOUT: %Call.type: type = fn_type @Call [concrete]
  129. // CHECK:STDOUT: %Call: %Call.type = struct_value () [concrete]
  130. // CHECK:STDOUT: %pattern_type.8f9: type = pattern_type %Z [concrete]
  131. // CHECK:STDOUT: %.d35: type = fn_type_with_self_type %A.F.type.13d, %A.facet [concrete]
  132. // CHECK:STDOUT: %ptr.fb6: type = ptr_type %Z [concrete]
  133. // CHECK:STDOUT: %pattern_type.f76: type = pattern_type %ptr.fb6 [concrete]
  134. // CHECK:STDOUT: %tuple.type.092: type = tuple_type (%X, %Y, %ptr.fb6) [concrete]
  135. // CHECK:STDOUT: %pattern_type.48d: type = pattern_type %tuple.type.092 [concrete]
  136. // CHECK:STDOUT: %Y.as.A.impl.F.specific_fn: <specific function> = specific_function %Y.as.A.impl.F, @Y.as.A.impl.F(%Z) [concrete]
  137. // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
  138. // CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete]
  139. // CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanDestroy>> [concrete]
  140. // CHECK:STDOUT: %DestroyT: %type_where = bind_symbolic_name DestroyT, 0 [symbolic]
  141. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.type.190: type = fn_type @DestroyT.as_type.as.Destroy.impl.Op, @DestroyT.as_type.as.Destroy.impl(%DestroyT) [symbolic]
  142. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.8a0: %DestroyT.as_type.as.Destroy.impl.Op.type.190 = struct_value () [symbolic]
  143. // CHECK:STDOUT: %facet_value.352: %type_where = facet_value %tuple.type.092, () [concrete]
  144. // CHECK:STDOUT: %Destroy.impl_witness.89a: <witness> = impl_witness imports.%Destroy.impl_witness_table, @DestroyT.as_type.as.Destroy.impl(%facet_value.352) [concrete]
  145. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.type.ec5: type = fn_type @DestroyT.as_type.as.Destroy.impl.Op, @DestroyT.as_type.as.Destroy.impl(%facet_value.352) [concrete]
  146. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.ed3: %DestroyT.as_type.as.Destroy.impl.Op.type.ec5 = struct_value () [concrete]
  147. // CHECK:STDOUT: %ptr.5df: type = ptr_type %tuple.type.092 [concrete]
  148. // CHECK:STDOUT: %complete_type.aab: <witness> = complete_type_witness %ptr.5df [concrete]
  149. // CHECK:STDOUT: %Destroy.facet.d0e: %Destroy.type = facet_value %tuple.type.092, (%Destroy.impl_witness.89a) [concrete]
  150. // CHECK:STDOUT: %.f61: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.d0e [concrete]
  151. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.specific_fn.71f: <specific function> = specific_function %DestroyT.as_type.as.Destroy.impl.Op.ed3, @DestroyT.as_type.as.Destroy.impl.Op(%facet_value.352) [concrete]
  152. // CHECK:STDOUT: %facet_value.4e3: %type_where = facet_value %Z, () [concrete]
  153. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.type.18a: type = fn_type @DestroyT.as_type.as.Destroy.impl.Op, @DestroyT.as_type.as.Destroy.impl(%facet_value.4e3) [concrete]
  154. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.dd5: %DestroyT.as_type.as.Destroy.impl.Op.type.18a = struct_value () [concrete]
  155. // CHECK:STDOUT: %complete_type.d3e: <witness> = complete_type_witness %ptr.fb6 [concrete]
  156. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.specific_fn.e7d: <specific function> = specific_function %DestroyT.as_type.as.Destroy.impl.Op.dd5, @DestroyT.as_type.as.Destroy.impl.Op(%facet_value.4e3) [concrete]
  157. // CHECK:STDOUT: %T.7bf: %A.type.0a4 = bind_symbolic_name T, 0 [symbolic]
  158. // CHECK:STDOUT: %pattern_type.809: type = pattern_type %A.type.0a4 [concrete]
  159. // CHECK:STDOUT: %CallGeneric.type: type = fn_type @CallGeneric [concrete]
  160. // CHECK:STDOUT: %CallGeneric: %CallGeneric.type = struct_value () [concrete]
  161. // CHECK:STDOUT: %T.as_type.b3a: type = facet_access_type %T.7bf [symbolic]
  162. // CHECK:STDOUT: %A.lookup_impl_witness: <witness> = lookup_impl_witness %T.7bf, @A, @A(%X) [symbolic]
  163. // CHECK:STDOUT: %.0c6: type = fn_type_with_self_type %A.F.type.13d, %T.7bf [symbolic]
  164. // CHECK:STDOUT: %impl.elem0.dd2: %.0c6 = impl_witness_access %A.lookup_impl_witness, element0 [symbolic]
  165. // CHECK:STDOUT: %tuple.type.af6: type = tuple_type (%X, %T.as_type.b3a, %ptr.fb6) [symbolic]
  166. // CHECK:STDOUT: %pattern_type.512: type = pattern_type %tuple.type.af6 [symbolic]
  167. // CHECK:STDOUT: %specific_impl_fn.304: <specific function> = specific_impl_function %impl.elem0.dd2, @A.F(%X, %T.7bf, %Z) [symbolic]
  168. // CHECK:STDOUT: %require_complete.6ed: <witness> = require_complete_type %tuple.type.af6 [symbolic]
  169. // CHECK:STDOUT: %facet_value.caf: %type_where = facet_value %tuple.type.af6, () [symbolic]
  170. // CHECK:STDOUT: %Destroy.impl_witness.cbf: <witness> = impl_witness imports.%Destroy.impl_witness_table, @DestroyT.as_type.as.Destroy.impl(%facet_value.caf) [symbolic]
  171. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.type.a49: type = fn_type @DestroyT.as_type.as.Destroy.impl.Op, @DestroyT.as_type.as.Destroy.impl(%facet_value.caf) [symbolic]
  172. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.5ab: %DestroyT.as_type.as.Destroy.impl.Op.type.a49 = struct_value () [symbolic]
  173. // CHECK:STDOUT: %ptr.fd2: type = ptr_type %tuple.type.af6 [symbolic]
  174. // CHECK:STDOUT: %require_complete.b2a: <witness> = require_complete_type %ptr.fd2 [symbolic]
  175. // CHECK:STDOUT: %Destroy.facet.679: %Destroy.type = facet_value %tuple.type.af6, (%Destroy.impl_witness.cbf) [symbolic]
  176. // CHECK:STDOUT: %.b6d: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.679 [symbolic]
  177. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.specific_fn.b61: <specific function> = specific_function %DestroyT.as_type.as.Destroy.impl.Op.5ab, @DestroyT.as_type.as.Destroy.impl.Op(%facet_value.caf) [symbolic]
  178. // CHECK:STDOUT: %CallIndirect.type: type = fn_type @CallIndirect [concrete]
  179. // CHECK:STDOUT: %CallIndirect: %CallIndirect.type = struct_value () [concrete]
  180. // CHECK:STDOUT: %CallGeneric.specific_fn: <specific function> = specific_function %CallGeneric, @CallGeneric(%A.facet) [concrete]
  181. // CHECK:STDOUT: %complete_type.05d: <witness> = complete_type_witness %tuple.type.092 [concrete]
  182. // CHECK:STDOUT: %tuple.type.953: type = tuple_type (%empty_struct_type, %empty_struct_type, %ptr.fb6) [concrete]
  183. // CHECK:STDOUT: %Copy.impl_witness.4b2: <witness> = impl_witness imports.%Copy.impl_witness_table.53c, @ptr.as.Copy.impl(%Z) [concrete]
  184. // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.8a3: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%Z) [concrete]
  185. // CHECK:STDOUT: %ptr.as.Copy.impl.Op.0c5: %ptr.as.Copy.impl.Op.type.8a3 = struct_value () [concrete]
  186. // CHECK:STDOUT: %Copy.facet.cd8: %Copy.type = facet_value %ptr.fb6, (%Copy.impl_witness.4b2) [concrete]
  187. // CHECK:STDOUT: %.7f9: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.cd8 [concrete]
  188. // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: <specific function> = specific_function %ptr.as.Copy.impl.Op.0c5, @ptr.as.Copy.impl.Op(%Z) [concrete]
  189. // CHECK:STDOUT: }
  190. // CHECK:STDOUT:
  191. // CHECK:STDOUT: imports {
  192. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  193. // CHECK:STDOUT: .Copy = %Core.Copy
  194. // CHECK:STDOUT: .Destroy = %Core.Destroy
  195. // CHECK:STDOUT: import Core//prelude
  196. // CHECK:STDOUT: import Core//prelude/...
  197. // CHECK:STDOUT: }
  198. // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type]
  199. // CHECK:STDOUT: %Core.import_ref.0e4: @ptr.as.Copy.impl.%ptr.as.Copy.impl.Op.type (%ptr.as.Copy.impl.Op.type.31ff4e.1) = import_ref Core//prelude/parts/copy, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.Copy.impl.%ptr.as.Copy.impl.Op (constants.%ptr.as.Copy.impl.Op.8a8b1a.1)]
  200. // CHECK:STDOUT: %Copy.impl_witness_table.53c = impl_witness_table (%Core.import_ref.0e4), @ptr.as.Copy.impl [concrete]
  201. // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
  202. // CHECK:STDOUT: %Core.import_ref.d51: @DestroyT.as_type.as.Destroy.impl.%DestroyT.as_type.as.Destroy.impl.Op.type (%DestroyT.as_type.as.Destroy.impl.Op.type.190) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @DestroyT.as_type.as.Destroy.impl.%DestroyT.as_type.as.Destroy.impl.Op (constants.%DestroyT.as_type.as.Destroy.impl.Op.8a0)]
  203. // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.d51), @DestroyT.as_type.as.Destroy.impl [concrete]
  204. // CHECK:STDOUT: }
  205. // CHECK:STDOUT:
  206. // CHECK:STDOUT: file {
  207. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  208. // CHECK:STDOUT: .Core = imports.%Core
  209. // CHECK:STDOUT: .A = %A.decl
  210. // CHECK:STDOUT: .X = %X.decl
  211. // CHECK:STDOUT: .Y = %Y.decl
  212. // CHECK:STDOUT: .Z = %Z.decl
  213. // CHECK:STDOUT: .Call = %Call.decl
  214. // CHECK:STDOUT: .CallGeneric = %CallGeneric.decl
  215. // CHECK:STDOUT: .CallIndirect = %CallIndirect.decl
  216. // CHECK:STDOUT: }
  217. // CHECK:STDOUT: %Core.import = import Core
  218. // CHECK:STDOUT: %A.decl: %A.type.495 = interface_decl @A [concrete = constants.%A.generic] {
  219. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  220. // CHECK:STDOUT: } {
  221. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  222. // CHECK:STDOUT: %T.loc5_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc5_13.1 (constants.%T.8b3)]
  223. // CHECK:STDOUT: }
  224. // CHECK:STDOUT: %X.decl: type = class_decl @X [concrete = constants.%X] {} {}
  225. // CHECK:STDOUT: %Y.decl: type = class_decl @Y [concrete = constants.%Y] {} {}
  226. // CHECK:STDOUT: %Z.decl: type = class_decl @Z [concrete = constants.%Z] {} {}
  227. // CHECK:STDOUT: impl_decl @Y.as.A.impl [concrete] {} {
  228. // CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y]
  229. // CHECK:STDOUT: %A.ref: %A.type.495 = name_ref A, file.%A.decl [concrete = constants.%A.generic]
  230. // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X]
  231. // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(constants.%X)> [concrete = constants.%A.type.0a4]
  232. // CHECK:STDOUT: }
  233. // CHECK:STDOUT: %A.impl_witness_table = impl_witness_table (@Y.as.A.impl.%Y.as.A.impl.F.decl), @Y.as.A.impl [concrete]
  234. // CHECK:STDOUT: %A.impl_witness: <witness> = impl_witness %A.impl_witness_table [concrete = constants.%A.impl_witness]
  235. // CHECK:STDOUT: %Call.decl: %Call.type = fn_decl @Call [concrete = constants.%Call] {} {}
  236. // CHECK:STDOUT: %CallGeneric.decl: %CallGeneric.type = fn_decl @CallGeneric [concrete = constants.%CallGeneric] {
  237. // CHECK:STDOUT: %T.patt: %pattern_type.809 = symbolic_binding_pattern T, 0 [concrete]
  238. // CHECK:STDOUT: } {
  239. // CHECK:STDOUT: %.loc26: type = splice_block %A.type [concrete = constants.%A.type.0a4] {
  240. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  241. // CHECK:STDOUT: %A.ref: %A.type.495 = name_ref A, file.%A.decl [concrete = constants.%A.generic]
  242. // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X]
  243. // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(constants.%X)> [concrete = constants.%A.type.0a4]
  244. // CHECK:STDOUT: }
  245. // CHECK:STDOUT: %T.loc26_16.2: %A.type.0a4 = bind_symbolic_name T, 0 [symbolic = %T.loc26_16.1 (constants.%T.7bf)]
  246. // CHECK:STDOUT: }
  247. // CHECK:STDOUT: %CallIndirect.decl: %CallIndirect.type = fn_decl @CallIndirect [concrete = constants.%CallIndirect] {} {}
  248. // CHECK:STDOUT: }
  249. // CHECK:STDOUT:
  250. // CHECK:STDOUT: generic interface @A(%T.loc5_13.2: type) {
  251. // CHECK:STDOUT: %T.loc5_13.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc5_13.1 (constants.%T.8b3)]
  252. // CHECK:STDOUT:
  253. // CHECK:STDOUT: !definition:
  254. // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(%T.loc5_13.1)> [symbolic = %A.type (constants.%A.type.d88)]
  255. // CHECK:STDOUT: %Self.2: @A.%A.type (%A.type.d88) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.c6b)]
  256. // CHECK:STDOUT: %A.F.type: type = fn_type @A.F, @A(%T.loc5_13.1) [symbolic = %A.F.type (constants.%A.F.type.17a)]
  257. // CHECK:STDOUT: %A.F: @A.%A.F.type (%A.F.type.17a) = struct_value () [symbolic = %A.F (constants.%A.F.0d8)]
  258. // CHECK:STDOUT: %A.assoc_type: type = assoc_entity_type @A, @A(%T.loc5_13.1) [symbolic = %A.assoc_type (constants.%A.assoc_type.ed3)]
  259. // CHECK:STDOUT: %assoc0.loc6_41.2: @A.%A.assoc_type (%A.assoc_type.ed3) = assoc_entity element0, %A.F.decl [symbolic = %assoc0.loc6_41.2 (constants.%assoc0.fcb)]
  260. // CHECK:STDOUT:
  261. // CHECK:STDOUT: interface {
  262. // CHECK:STDOUT: %Self.1: @A.%A.type (%A.type.d88) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.c6b)]
  263. // CHECK:STDOUT: %A.F.decl: @A.%A.F.type (%A.F.type.17a) = fn_decl @A.F [symbolic = @A.%A.F (constants.%A.F.0d8)] {
  264. // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 2 [concrete]
  265. // CHECK:STDOUT: %u.patt: @A.F.%pattern_type.loc6_18 (%pattern_type.eee) = binding_pattern u [concrete]
  266. // CHECK:STDOUT: %u.param_patt: @A.F.%pattern_type.loc6_18 (%pattern_type.eee) = value_param_pattern %u.patt, call_param0 [concrete]
  267. // CHECK:STDOUT: %return.patt: @A.F.%pattern_type.loc6_25 (%pattern_type.44d) = return_slot_pattern [concrete]
  268. // CHECK:STDOUT: %return.param_patt: @A.F.%pattern_type.loc6_25 (%pattern_type.44d) = out_param_pattern %return.patt, call_param1 [concrete]
  269. // CHECK:STDOUT: } {
  270. // CHECK:STDOUT: %T.ref: type = name_ref T, @A.%T.loc5_13.2 [symbolic = %T (constants.%T.8b3)]
  271. // CHECK:STDOUT: %.loc6_32: @A.F.%A.type (%A.type.d88) = specific_constant @A.%Self.1, @A(constants.%T.8b3) [symbolic = %Self (constants.%Self.c6b)]
  272. // CHECK:STDOUT: %Self.ref: @A.F.%A.type (%A.type.d88) = name_ref Self, %.loc6_32 [symbolic = %Self (constants.%Self.c6b)]
  273. // CHECK:STDOUT: %U.ref.loc6_38: type = name_ref U, %U.loc6_8.2 [symbolic = %U.loc6_8.1 (constants.%U.2cb)]
  274. // CHECK:STDOUT: %ptr.loc6_39: type = ptr_type %U.ref.loc6_38 [symbolic = %ptr.loc6_22.1 (constants.%ptr.204)]
  275. // CHECK:STDOUT: %.loc6_40.1: @A.F.%tuple.type.loc6_40.1 (%tuple.type.098) = tuple_literal (%T.ref, %Self.ref, %ptr.loc6_39)
  276. // CHECK:STDOUT: %Self.as_type.loc6_40.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc6_40.1 (constants.%Self.as_type.707)]
  277. // CHECK:STDOUT: %.loc6_40.2: type = converted %Self.ref, %Self.as_type.loc6_40.2 [symbolic = %Self.as_type.loc6_40.1 (constants.%Self.as_type.707)]
  278. // CHECK:STDOUT: %.loc6_40.3: type = converted %.loc6_40.1, constants.%tuple.type.cb0 [symbolic = %tuple.type.loc6_40.2 (constants.%tuple.type.cb0)]
  279. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  280. // CHECK:STDOUT: %U.loc6_8.2: type = bind_symbolic_name U, 2 [symbolic = %U.loc6_8.1 (constants.%U.2cb)]
  281. // CHECK:STDOUT: %u.param: @A.F.%ptr.loc6_22.1 (%ptr.204) = value_param call_param0
  282. // CHECK:STDOUT: %.loc6_22: type = splice_block %ptr.loc6_22.2 [symbolic = %ptr.loc6_22.1 (constants.%ptr.204)] {
  283. // CHECK:STDOUT: %U.ref.loc6_21: type = name_ref U, %U.loc6_8.2 [symbolic = %U.loc6_8.1 (constants.%U.2cb)]
  284. // CHECK:STDOUT: %ptr.loc6_22.2: type = ptr_type %U.ref.loc6_21 [symbolic = %ptr.loc6_22.1 (constants.%ptr.204)]
  285. // CHECK:STDOUT: }
  286. // CHECK:STDOUT: %u: @A.F.%ptr.loc6_22.1 (%ptr.204) = bind_name u, %u.param
  287. // CHECK:STDOUT: %return.param: ref @A.F.%tuple.type.loc6_40.2 (%tuple.type.cb0) = out_param call_param1
  288. // CHECK:STDOUT: %return: ref @A.F.%tuple.type.loc6_40.2 (%tuple.type.cb0) = return_slot %return.param
  289. // CHECK:STDOUT: }
  290. // CHECK:STDOUT: %assoc0.loc6_41.1: @A.%A.assoc_type (%A.assoc_type.ed3) = assoc_entity element0, %A.F.decl [symbolic = %assoc0.loc6_41.2 (constants.%assoc0.fcb)]
  291. // CHECK:STDOUT:
  292. // CHECK:STDOUT: !members:
  293. // CHECK:STDOUT: .Self = %Self.1
  294. // CHECK:STDOUT: .T = <poisoned>
  295. // CHECK:STDOUT: .F = %assoc0.loc6_41.1
  296. // CHECK:STDOUT: witness = (%A.F.decl)
  297. // CHECK:STDOUT: }
  298. // CHECK:STDOUT: }
  299. // CHECK:STDOUT:
  300. // CHECK:STDOUT: impl @Y.as.A.impl: %Y.ref as %A.type {
  301. // CHECK:STDOUT: %Y.as.A.impl.F.decl: %Y.as.A.impl.F.type = fn_decl @Y.as.A.impl.F [concrete = constants.%Y.as.A.impl.F] {
  302. // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 0 [concrete]
  303. // CHECK:STDOUT: %u.patt: @Y.as.A.impl.F.%pattern_type.loc16_18 (%pattern_type.afe393.1) = binding_pattern u [concrete]
  304. // CHECK:STDOUT: %u.param_patt: @Y.as.A.impl.F.%pattern_type.loc16_18 (%pattern_type.afe393.1) = value_param_pattern %u.patt, call_param0 [concrete]
  305. // CHECK:STDOUT: %return.patt: @Y.as.A.impl.F.%pattern_type.loc16_25 (%pattern_type.ac9) = return_slot_pattern [concrete]
  306. // CHECK:STDOUT: %return.param_patt: @Y.as.A.impl.F.%pattern_type.loc16_25 (%pattern_type.ac9) = out_param_pattern %return.patt, call_param1 [concrete]
  307. // CHECK:STDOUT: } {
  308. // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X]
  309. // CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y]
  310. // CHECK:STDOUT: %U.ref.loc16_35: type = name_ref U, %U.loc16_8.2 [symbolic = %U.loc16_8.1 (constants.%U.8b3)]
  311. // CHECK:STDOUT: %ptr.loc16_36: type = ptr_type %U.ref.loc16_35 [symbolic = %ptr.loc16_22.1 (constants.%ptr.79f131.1)]
  312. // CHECK:STDOUT: %.loc16_37.1: %tuple.type.ff9 = tuple_literal (%X.ref, %Y.ref, %ptr.loc16_36)
  313. // CHECK:STDOUT: %.loc16_37.2: type = converted %.loc16_37.1, constants.%tuple.type.c14 [symbolic = %tuple.type.loc16 (constants.%tuple.type.c14)]
  314. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  315. // CHECK:STDOUT: %U.loc16_8.2: type = bind_symbolic_name U, 0 [symbolic = %U.loc16_8.1 (constants.%U.8b3)]
  316. // CHECK:STDOUT: %u.param: @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.79f131.1) = value_param call_param0
  317. // CHECK:STDOUT: %.loc16_22: type = splice_block %ptr.loc16_22.2 [symbolic = %ptr.loc16_22.1 (constants.%ptr.79f131.1)] {
  318. // CHECK:STDOUT: %U.ref.loc16_21: type = name_ref U, %U.loc16_8.2 [symbolic = %U.loc16_8.1 (constants.%U.8b3)]
  319. // CHECK:STDOUT: %ptr.loc16_22.2: type = ptr_type %U.ref.loc16_21 [symbolic = %ptr.loc16_22.1 (constants.%ptr.79f131.1)]
  320. // CHECK:STDOUT: }
  321. // CHECK:STDOUT: %u: @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.79f131.1) = bind_name u, %u.param
  322. // CHECK:STDOUT: %return.param: ref @Y.as.A.impl.F.%tuple.type.loc16 (%tuple.type.c14) = out_param call_param1
  323. // CHECK:STDOUT: %return: ref @Y.as.A.impl.F.%tuple.type.loc16 (%tuple.type.c14) = return_slot %return.param
  324. // CHECK:STDOUT: }
  325. // CHECK:STDOUT:
  326. // CHECK:STDOUT: !members:
  327. // CHECK:STDOUT: .X = <poisoned>
  328. // CHECK:STDOUT: .Y = <poisoned>
  329. // CHECK:STDOUT: .F = %Y.as.A.impl.F.decl
  330. // CHECK:STDOUT: witness = file.%A.impl_witness
  331. // CHECK:STDOUT: }
  332. // CHECK:STDOUT:
  333. // CHECK:STDOUT: class @X {
  334. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
  335. // CHECK:STDOUT: complete_type_witness = %complete_type
  336. // CHECK:STDOUT:
  337. // CHECK:STDOUT: !members:
  338. // CHECK:STDOUT: .Self = constants.%X
  339. // CHECK:STDOUT: }
  340. // CHECK:STDOUT:
  341. // CHECK:STDOUT: class @Y {
  342. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
  343. // CHECK:STDOUT: complete_type_witness = %complete_type
  344. // CHECK:STDOUT:
  345. // CHECK:STDOUT: !members:
  346. // CHECK:STDOUT: .Self = constants.%Y
  347. // CHECK:STDOUT: }
  348. // CHECK:STDOUT:
  349. // CHECK:STDOUT: class @Z {
  350. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
  351. // CHECK:STDOUT: complete_type_witness = %complete_type
  352. // CHECK:STDOUT:
  353. // CHECK:STDOUT: !members:
  354. // CHECK:STDOUT: .Self = constants.%Z
  355. // CHECK:STDOUT: }
  356. // CHECK:STDOUT:
  357. // CHECK:STDOUT: generic fn @A.F(@A.%T.loc5_13.2: type, @A.%Self.1: @A.%A.type (%A.type.d88), %U.loc6_8.2: type) {
  358. // CHECK:STDOUT: %U.loc6_8.1: type = bind_symbolic_name U, 2 [symbolic = %U.loc6_8.1 (constants.%U.2cb)]
  359. // CHECK:STDOUT: %ptr.loc6_22.1: type = ptr_type %U.loc6_8.1 [symbolic = %ptr.loc6_22.1 (constants.%ptr.204)]
  360. // CHECK:STDOUT: %pattern_type.loc6_18: type = pattern_type %ptr.loc6_22.1 [symbolic = %pattern_type.loc6_18 (constants.%pattern_type.eee)]
  361. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T.8b3)]
  362. // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(%T)> [symbolic = %A.type (constants.%A.type.d88)]
  363. // CHECK:STDOUT: %Self: @A.F.%A.type (%A.type.d88) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.c6b)]
  364. // CHECK:STDOUT: %tuple.type.loc6_40.1: type = tuple_type (type, %A.type, type) [symbolic = %tuple.type.loc6_40.1 (constants.%tuple.type.098)]
  365. // CHECK:STDOUT: %Self.as_type.loc6_40.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc6_40.1 (constants.%Self.as_type.707)]
  366. // CHECK:STDOUT: %tuple.type.loc6_40.2: type = tuple_type (%T, %Self.as_type.loc6_40.1, %ptr.loc6_22.1) [symbolic = %tuple.type.loc6_40.2 (constants.%tuple.type.cb0)]
  367. // CHECK:STDOUT: %pattern_type.loc6_25: type = pattern_type %tuple.type.loc6_40.2 [symbolic = %pattern_type.loc6_25 (constants.%pattern_type.44d)]
  368. // CHECK:STDOUT:
  369. // CHECK:STDOUT: fn(%u.param: @A.F.%ptr.loc6_22.1 (%ptr.204)) -> @A.F.%tuple.type.loc6_40.2 (%tuple.type.cb0);
  370. // CHECK:STDOUT: }
  371. // CHECK:STDOUT:
  372. // CHECK:STDOUT: generic fn @Y.as.A.impl.F(%U.loc16_8.2: type) {
  373. // CHECK:STDOUT: %U.loc16_8.1: type = bind_symbolic_name U, 0 [symbolic = %U.loc16_8.1 (constants.%U.8b3)]
  374. // CHECK:STDOUT: %ptr.loc16_22.1: type = ptr_type %U.loc16_8.1 [symbolic = %ptr.loc16_22.1 (constants.%ptr.79f131.1)]
  375. // CHECK:STDOUT: %pattern_type.loc16_18: type = pattern_type %ptr.loc16_22.1 [symbolic = %pattern_type.loc16_18 (constants.%pattern_type.afe393.1)]
  376. // CHECK:STDOUT: %tuple.type.loc16: type = tuple_type (constants.%X, constants.%Y, %ptr.loc16_22.1) [symbolic = %tuple.type.loc16 (constants.%tuple.type.c14)]
  377. // CHECK:STDOUT: %pattern_type.loc16_25: type = pattern_type %tuple.type.loc16 [symbolic = %pattern_type.loc16_25 (constants.%pattern_type.ac9)]
  378. // CHECK:STDOUT:
  379. // CHECK:STDOUT: !definition:
  380. // CHECK:STDOUT: %require_complete.loc16_25: <witness> = require_complete_type %tuple.type.loc16 [symbolic = %require_complete.loc16_25 (constants.%require_complete.86f)]
  381. // CHECK:STDOUT: %require_complete.loc16_19: <witness> = require_complete_type %ptr.loc16_22.1 [symbolic = %require_complete.loc16_19 (constants.%require_complete.6e5e64.1)]
  382. // CHECK:STDOUT: %tuple.type.loc17: type = tuple_type (constants.%empty_struct_type, constants.%empty_struct_type, %ptr.loc16_22.1) [symbolic = %tuple.type.loc17 (constants.%tuple.type.e44)]
  383. // CHECK:STDOUT: %Copy.lookup_impl_witness: <witness> = lookup_impl_witness %ptr.loc16_22.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.cb2)]
  384. // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.loc16_22.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet.2d1)]
  385. // CHECK:STDOUT: %.loc17_21.2: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc17_21.2 (constants.%.1cc)]
  386. // CHECK:STDOUT: %impl.elem0.loc17_21.2: @Y.as.A.impl.F.%.loc17_21.2 (%.1cc) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc17_21.2 (constants.%impl.elem0.751)]
  387. // CHECK:STDOUT: %specific_impl_fn.loc17_21.2: <specific function> = specific_impl_function %impl.elem0.loc17_21.2, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc17_21.2 (constants.%specific_impl_fn.f44)]
  388. // CHECK:STDOUT:
  389. // CHECK:STDOUT: fn(%u.param: @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.79f131.1)) -> %return.param: @Y.as.A.impl.F.%tuple.type.loc16 (%tuple.type.c14) {
  390. // CHECK:STDOUT: !entry:
  391. // CHECK:STDOUT: %.loc17_14.1: %empty_struct_type = struct_literal ()
  392. // CHECK:STDOUT: %.loc17_18.1: %empty_struct_type = struct_literal ()
  393. // CHECK:STDOUT: %u.ref: @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.79f131.1) = name_ref u, %u
  394. // CHECK:STDOUT: %.loc17_22.1: @Y.as.A.impl.F.%tuple.type.loc17 (%tuple.type.e44) = tuple_literal (%.loc17_14.1, %.loc17_18.1, %u.ref)
  395. // CHECK:STDOUT: %tuple.elem0: ref %X = tuple_access %return, element0
  396. // CHECK:STDOUT: %.loc17_14.2: init %X = class_init (), %tuple.elem0 [concrete = constants.%X.val]
  397. // CHECK:STDOUT: %.loc17_22.2: init %X = converted %.loc17_14.1, %.loc17_14.2 [concrete = constants.%X.val]
  398. // CHECK:STDOUT: %tuple.elem1: ref %Y = tuple_access %return, element1
  399. // CHECK:STDOUT: %.loc17_18.2: init %Y = class_init (), %tuple.elem1 [concrete = constants.%Y.val]
  400. // CHECK:STDOUT: %.loc17_22.3: init %Y = converted %.loc17_18.1, %.loc17_18.2 [concrete = constants.%Y.val]
  401. // CHECK:STDOUT: %impl.elem0.loc17_21.1: @Y.as.A.impl.F.%.loc17_21.2 (%.1cc) = impl_witness_access constants.%Copy.lookup_impl_witness.cb2, element0 [symbolic = %impl.elem0.loc17_21.2 (constants.%impl.elem0.751)]
  402. // CHECK:STDOUT: %bound_method.loc17_21.1: <bound method> = bound_method %u.ref, %impl.elem0.loc17_21.1
  403. // CHECK:STDOUT: %specific_impl_fn.loc17_21.1: <specific function> = specific_impl_function %impl.elem0.loc17_21.1, @Copy.Op(constants.%Copy.facet.2d1) [symbolic = %specific_impl_fn.loc17_21.2 (constants.%specific_impl_fn.f44)]
  404. // CHECK:STDOUT: %bound_method.loc17_21.2: <bound method> = bound_method %u.ref, %specific_impl_fn.loc17_21.1
  405. // CHECK:STDOUT: %.loc17_21.1: init @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.79f131.1) = call %bound_method.loc17_21.2(%u.ref)
  406. // CHECK:STDOUT: %tuple.elem2: ref @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.79f131.1) = tuple_access %return, element2
  407. // CHECK:STDOUT: %.loc17_22.4: init @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.79f131.1) = initialize_from %.loc17_21.1 to %tuple.elem2
  408. // CHECK:STDOUT: %.loc17_22.5: init @Y.as.A.impl.F.%tuple.type.loc16 (%tuple.type.c14) = tuple_init (%.loc17_22.2, %.loc17_22.3, %.loc17_22.4) to %return
  409. // CHECK:STDOUT: %.loc17_23: init @Y.as.A.impl.F.%tuple.type.loc16 (%tuple.type.c14) = converted %.loc17_22.1, %.loc17_22.5
  410. // CHECK:STDOUT: return %.loc17_23 to %return
  411. // CHECK:STDOUT: }
  412. // CHECK:STDOUT: }
  413. // CHECK:STDOUT:
  414. // CHECK:STDOUT: fn @Call() {
  415. // CHECK:STDOUT: !entry:
  416. // CHECK:STDOUT: name_binding_decl {
  417. // CHECK:STDOUT: %u.patt: %pattern_type.8f9 = binding_pattern u [concrete]
  418. // CHECK:STDOUT: %u.var_patt: %pattern_type.8f9 = var_pattern %u.patt [concrete]
  419. // CHECK:STDOUT: }
  420. // CHECK:STDOUT: %u.var: ref %Z = var %u.var_patt
  421. // CHECK:STDOUT: %Z.ref.loc22: type = name_ref Z, file.%Z.decl [concrete = constants.%Z]
  422. // CHECK:STDOUT: %u: ref %Z = bind_name u, %u.var
  423. // CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y]
  424. // CHECK:STDOUT: %A.ref: %A.type.495 = name_ref A, file.%A.decl [concrete = constants.%A.generic]
  425. // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X]
  426. // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(constants.%X)> [concrete = constants.%A.type.0a4]
  427. // CHECK:STDOUT: %A.facet: %A.type.0a4 = facet_value %Y.ref, (constants.%A.impl_witness) [concrete = constants.%A.facet]
  428. // CHECK:STDOUT: %.loc23_6: %A.type.0a4 = converted %Y.ref, %A.facet [concrete = constants.%A.facet]
  429. // CHECK:STDOUT: %.loc23_14.1: %A.assoc_type.296 = specific_constant @A.%assoc0.loc6_41.1, @A(constants.%X) [concrete = constants.%assoc0.5f6]
  430. // CHECK:STDOUT: %F.ref: %A.assoc_type.296 = name_ref F, %.loc23_14.1 [concrete = constants.%assoc0.5f6]
  431. // CHECK:STDOUT: %as_type: type = facet_access_type %.loc23_6 [concrete = constants.%Y]
  432. // CHECK:STDOUT: %.loc23_14.2: type = converted %.loc23_6, %as_type [concrete = constants.%Y]
  433. // CHECK:STDOUT: %impl.elem0: %.d35 = impl_witness_access constants.%A.impl_witness, element0 [concrete = constants.%Y.as.A.impl.F]
  434. // CHECK:STDOUT: %Z.ref.loc23: type = name_ref Z, file.%Z.decl [concrete = constants.%Z]
  435. // CHECK:STDOUT: %u.ref: ref %Z = name_ref u, %u
  436. // CHECK:STDOUT: %addr.loc23_20: %ptr.fb6 = addr_of %u.ref
  437. // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Y.as.A.impl.F(constants.%Z) [concrete = constants.%Y.as.A.impl.F.specific_fn]
  438. // CHECK:STDOUT: %.loc23_22.1: ref %tuple.type.092 = temporary_storage
  439. // CHECK:STDOUT: %Y.as.A.impl.F.call: init %tuple.type.092 = call %specific_fn(%addr.loc23_20) to %.loc23_22.1
  440. // CHECK:STDOUT: %.loc23_22.2: ref %tuple.type.092 = temporary %.loc23_22.1, %Y.as.A.impl.F.call
  441. // CHECK:STDOUT: %facet_value.loc23: %type_where = facet_value constants.%tuple.type.092, () [concrete = constants.%facet_value.352]
  442. // CHECK:STDOUT: %.loc23_22.3: %type_where = converted constants.%tuple.type.092, %facet_value.loc23 [concrete = constants.%facet_value.352]
  443. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.bound.loc23: <bound method> = bound_method %.loc23_22.2, constants.%DestroyT.as_type.as.Destroy.impl.Op.ed3
  444. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.specific_fn.1: <specific function> = specific_function constants.%DestroyT.as_type.as.Destroy.impl.Op.ed3, @DestroyT.as_type.as.Destroy.impl.Op(constants.%facet_value.352) [concrete = constants.%DestroyT.as_type.as.Destroy.impl.Op.specific_fn.71f]
  445. // CHECK:STDOUT: %bound_method.loc23: <bound method> = bound_method %.loc23_22.2, %DestroyT.as_type.as.Destroy.impl.Op.specific_fn.1
  446. // CHECK:STDOUT: %addr.loc23_22: %ptr.5df = addr_of %.loc23_22.2
  447. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.call.loc23: init %empty_tuple.type = call %bound_method.loc23(%addr.loc23_22)
  448. // CHECK:STDOUT: %facet_value.loc22: %type_where = facet_value constants.%Z, () [concrete = constants.%facet_value.4e3]
  449. // CHECK:STDOUT: %.loc22: %type_where = converted constants.%Z, %facet_value.loc22 [concrete = constants.%facet_value.4e3]
  450. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.bound.loc22: <bound method> = bound_method %u.var, constants.%DestroyT.as_type.as.Destroy.impl.Op.dd5
  451. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.specific_fn.2: <specific function> = specific_function constants.%DestroyT.as_type.as.Destroy.impl.Op.dd5, @DestroyT.as_type.as.Destroy.impl.Op(constants.%facet_value.4e3) [concrete = constants.%DestroyT.as_type.as.Destroy.impl.Op.specific_fn.e7d]
  452. // CHECK:STDOUT: %bound_method.loc22: <bound method> = bound_method %u.var, %DestroyT.as_type.as.Destroy.impl.Op.specific_fn.2
  453. // CHECK:STDOUT: %addr.loc22: %ptr.fb6 = addr_of %u.var
  454. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.call.loc22: init %empty_tuple.type = call %bound_method.loc22(%addr.loc22)
  455. // CHECK:STDOUT: return
  456. // CHECK:STDOUT: }
  457. // CHECK:STDOUT:
  458. // CHECK:STDOUT: generic fn @CallGeneric(%T.loc26_16.2: %A.type.0a4) {
  459. // CHECK:STDOUT: %T.loc26_16.1: %A.type.0a4 = bind_symbolic_name T, 0 [symbolic = %T.loc26_16.1 (constants.%T.7bf)]
  460. // CHECK:STDOUT:
  461. // CHECK:STDOUT: !definition:
  462. // CHECK:STDOUT: %T.as_type.loc28_4.2: type = facet_access_type %T.loc26_16.1 [symbolic = %T.as_type.loc28_4.2 (constants.%T.as_type.b3a)]
  463. // CHECK:STDOUT: %A.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc26_16.1, @A, @A(constants.%X) [symbolic = %A.lookup_impl_witness (constants.%A.lookup_impl_witness)]
  464. // CHECK:STDOUT: %.loc28_4.3: type = fn_type_with_self_type constants.%A.F.type.13d, %T.loc26_16.1 [symbolic = %.loc28_4.3 (constants.%.0c6)]
  465. // CHECK:STDOUT: %impl.elem0.loc28_4.2: @CallGeneric.%.loc28_4.3 (%.0c6) = impl_witness_access %A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_4.2 (constants.%impl.elem0.dd2)]
  466. // CHECK:STDOUT: %specific_impl_fn.loc28_4.2: <specific function> = specific_impl_function %impl.elem0.loc28_4.2, @A.F(constants.%X, %T.loc26_16.1, constants.%Z) [symbolic = %specific_impl_fn.loc28_4.2 (constants.%specific_impl_fn.304)]
  467. // CHECK:STDOUT: %tuple.type: type = tuple_type (constants.%X, %T.as_type.loc28_4.2, constants.%ptr.fb6) [symbolic = %tuple.type (constants.%tuple.type.af6)]
  468. // CHECK:STDOUT: %require_complete.loc28_12.1: <witness> = require_complete_type %tuple.type [symbolic = %require_complete.loc28_12.1 (constants.%require_complete.6ed)]
  469. // CHECK:STDOUT: %facet_value.loc28_12.2: %type_where = facet_value %tuple.type, () [symbolic = %facet_value.loc28_12.2 (constants.%facet_value.caf)]
  470. // CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness imports.%Destroy.impl_witness_table, @DestroyT.as_type.as.Destroy.impl(%facet_value.loc28_12.2) [symbolic = %Destroy.impl_witness (constants.%Destroy.impl_witness.cbf)]
  471. // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %tuple.type, (%Destroy.impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.679)]
  472. // CHECK:STDOUT: %.loc28_12.5: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc28_12.5 (constants.%.b6d)]
  473. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.type: type = fn_type @DestroyT.as_type.as.Destroy.impl.Op, @DestroyT.as_type.as.Destroy.impl(%facet_value.loc28_12.2) [symbolic = %DestroyT.as_type.as.Destroy.impl.Op.type (constants.%DestroyT.as_type.as.Destroy.impl.Op.type.a49)]
  474. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op: @CallGeneric.%DestroyT.as_type.as.Destroy.impl.Op.type (%DestroyT.as_type.as.Destroy.impl.Op.type.a49) = struct_value () [symbolic = %DestroyT.as_type.as.Destroy.impl.Op (constants.%DestroyT.as_type.as.Destroy.impl.Op.5ab)]
  475. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.specific_fn.loc28: <specific function> = specific_function %DestroyT.as_type.as.Destroy.impl.Op, @DestroyT.as_type.as.Destroy.impl.Op(%facet_value.loc28_12.2) [symbolic = %DestroyT.as_type.as.Destroy.impl.Op.specific_fn.loc28 (constants.%DestroyT.as_type.as.Destroy.impl.Op.specific_fn.b61)]
  476. // CHECK:STDOUT: %ptr: type = ptr_type %tuple.type [symbolic = %ptr (constants.%ptr.fd2)]
  477. // CHECK:STDOUT: %require_complete.loc28_12.2: <witness> = require_complete_type %ptr [symbolic = %require_complete.loc28_12.2 (constants.%require_complete.b2a)]
  478. // CHECK:STDOUT:
  479. // CHECK:STDOUT: fn() {
  480. // CHECK:STDOUT: !entry:
  481. // CHECK:STDOUT: name_binding_decl {
  482. // CHECK:STDOUT: %u.patt: %pattern_type.8f9 = binding_pattern u [concrete]
  483. // CHECK:STDOUT: %u.var_patt: %pattern_type.8f9 = var_pattern %u.patt [concrete]
  484. // CHECK:STDOUT: }
  485. // CHECK:STDOUT: %u.var: ref %Z = var %u.var_patt
  486. // CHECK:STDOUT: %Z.ref.loc27: type = name_ref Z, file.%Z.decl [concrete = constants.%Z]
  487. // CHECK:STDOUT: %u: ref %Z = bind_name u, %u.var
  488. // CHECK:STDOUT: %T.ref: %A.type.0a4 = name_ref T, %T.loc26_16.2 [symbolic = %T.loc26_16.1 (constants.%T.7bf)]
  489. // CHECK:STDOUT: %.loc28_4.1: %A.assoc_type.296 = specific_constant @A.%assoc0.loc6_41.1, @A(constants.%X) [concrete = constants.%assoc0.5f6]
  490. // CHECK:STDOUT: %F.ref: %A.assoc_type.296 = name_ref F, %.loc28_4.1 [concrete = constants.%assoc0.5f6]
  491. // CHECK:STDOUT: %T.as_type.loc28_4.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc28_4.2 (constants.%T.as_type.b3a)]
  492. // CHECK:STDOUT: %.loc28_4.2: type = converted %T.ref, %T.as_type.loc28_4.1 [symbolic = %T.as_type.loc28_4.2 (constants.%T.as_type.b3a)]
  493. // CHECK:STDOUT: %impl.elem0.loc28_4.1: @CallGeneric.%.loc28_4.3 (%.0c6) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_4.2 (constants.%impl.elem0.dd2)]
  494. // CHECK:STDOUT: %Z.ref.loc28: type = name_ref Z, file.%Z.decl [concrete = constants.%Z]
  495. // CHECK:STDOUT: %u.ref: ref %Z = name_ref u, %u
  496. // CHECK:STDOUT: %addr.loc28_10: %ptr.fb6 = addr_of %u.ref
  497. // CHECK:STDOUT: %specific_impl_fn.loc28_4.1: <specific function> = specific_impl_function %impl.elem0.loc28_4.1, @A.F(constants.%X, constants.%T.7bf, constants.%Z) [symbolic = %specific_impl_fn.loc28_4.2 (constants.%specific_impl_fn.304)]
  498. // CHECK:STDOUT: %.loc28_12.1: ref @CallGeneric.%tuple.type (%tuple.type.af6) = temporary_storage
  499. // CHECK:STDOUT: %.loc28_12.2: init @CallGeneric.%tuple.type (%tuple.type.af6) = call %specific_impl_fn.loc28_4.1(%addr.loc28_10) to %.loc28_12.1
  500. // CHECK:STDOUT: %.loc28_12.3: ref @CallGeneric.%tuple.type (%tuple.type.af6) = temporary %.loc28_12.1, %.loc28_12.2
  501. // CHECK:STDOUT: %facet_value.loc28_12.1: %type_where = facet_value constants.%tuple.type.af6, () [symbolic = %facet_value.loc28_12.2 (constants.%facet_value.caf)]
  502. // CHECK:STDOUT: %.loc28_12.4: %type_where = converted constants.%tuple.type.af6, %facet_value.loc28_12.1 [symbolic = %facet_value.loc28_12.2 (constants.%facet_value.caf)]
  503. // CHECK:STDOUT: %impl.elem0.loc28_12: @CallGeneric.%.loc28_12.5 (%.b6d) = impl_witness_access constants.%Destroy.impl_witness.cbf, element0 [symbolic = %DestroyT.as_type.as.Destroy.impl.Op (constants.%DestroyT.as_type.as.Destroy.impl.Op.5ab)]
  504. // CHECK:STDOUT: %bound_method.loc28_12.1: <bound method> = bound_method %.loc28_12.3, %impl.elem0.loc28_12
  505. // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0.loc28_12, @DestroyT.as_type.as.Destroy.impl.Op(constants.%facet_value.caf) [symbolic = %DestroyT.as_type.as.Destroy.impl.Op.specific_fn.loc28 (constants.%DestroyT.as_type.as.Destroy.impl.Op.specific_fn.b61)]
  506. // CHECK:STDOUT: %bound_method.loc28_12.2: <bound method> = bound_method %.loc28_12.3, %specific_fn
  507. // CHECK:STDOUT: %addr.loc28_12: @CallGeneric.%ptr (%ptr.fd2) = addr_of %.loc28_12.3
  508. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.call.loc28: init %empty_tuple.type = call %bound_method.loc28_12.2(%addr.loc28_12)
  509. // CHECK:STDOUT: %facet_value.loc27: %type_where = facet_value constants.%Z, () [concrete = constants.%facet_value.4e3]
  510. // CHECK:STDOUT: %.loc27: %type_where = converted constants.%Z, %facet_value.loc27 [concrete = constants.%facet_value.4e3]
  511. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.bound: <bound method> = bound_method %u.var, constants.%DestroyT.as_type.as.Destroy.impl.Op.dd5
  512. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.specific_fn.1: <specific function> = specific_function constants.%DestroyT.as_type.as.Destroy.impl.Op.dd5, @DestroyT.as_type.as.Destroy.impl.Op(constants.%facet_value.4e3) [concrete = constants.%DestroyT.as_type.as.Destroy.impl.Op.specific_fn.e7d]
  513. // CHECK:STDOUT: %bound_method.loc27: <bound method> = bound_method %u.var, %DestroyT.as_type.as.Destroy.impl.Op.specific_fn.1
  514. // CHECK:STDOUT: %addr.loc27: %ptr.fb6 = addr_of %u.var
  515. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.call.loc27: init %empty_tuple.type = call %bound_method.loc27(%addr.loc27)
  516. // CHECK:STDOUT: return
  517. // CHECK:STDOUT: }
  518. // CHECK:STDOUT: }
  519. // CHECK:STDOUT:
  520. // CHECK:STDOUT: fn @CallIndirect() {
  521. // CHECK:STDOUT: !entry:
  522. // CHECK:STDOUT: %CallGeneric.ref: %CallGeneric.type = name_ref CallGeneric, file.%CallGeneric.decl [concrete = constants.%CallGeneric]
  523. // CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y]
  524. // CHECK:STDOUT: %A.facet: %A.type.0a4 = facet_value %Y.ref, (constants.%A.impl_witness) [concrete = constants.%A.facet]
  525. // CHECK:STDOUT: %.loc32: %A.type.0a4 = converted %Y.ref, %A.facet [concrete = constants.%A.facet]
  526. // CHECK:STDOUT: %CallGeneric.specific_fn: <specific function> = specific_function %CallGeneric.ref, @CallGeneric(constants.%A.facet) [concrete = constants.%CallGeneric.specific_fn]
  527. // CHECK:STDOUT: %CallGeneric.call: init %empty_tuple.type = call %CallGeneric.specific_fn()
  528. // CHECK:STDOUT: return
  529. // CHECK:STDOUT: }
  530. // CHECK:STDOUT:
  531. // CHECK:STDOUT: specific @A(constants.%T.8b3) {
  532. // CHECK:STDOUT: %T.loc5_13.1 => constants.%T.8b3
  533. // CHECK:STDOUT: }
  534. // CHECK:STDOUT:
  535. // CHECK:STDOUT: specific @A.F(constants.%T.8b3, constants.%Self.c6b, constants.%U.2cb) {
  536. // CHECK:STDOUT: %U.loc6_8.1 => constants.%U.2cb
  537. // CHECK:STDOUT: %ptr.loc6_22.1 => constants.%ptr.204
  538. // CHECK:STDOUT: %pattern_type.loc6_18 => constants.%pattern_type.eee
  539. // CHECK:STDOUT: %T => constants.%T.8b3
  540. // CHECK:STDOUT: %A.type => constants.%A.type.d88
  541. // CHECK:STDOUT: %Self => constants.%Self.c6b
  542. // CHECK:STDOUT: %tuple.type.loc6_40.1 => constants.%tuple.type.098
  543. // CHECK:STDOUT: %Self.as_type.loc6_40.1 => constants.%Self.as_type.707
  544. // CHECK:STDOUT: %tuple.type.loc6_40.2 => constants.%tuple.type.cb0
  545. // CHECK:STDOUT: %pattern_type.loc6_25 => constants.%pattern_type.44d
  546. // CHECK:STDOUT: }
  547. // CHECK:STDOUT:
  548. // CHECK:STDOUT: specific @A(constants.%X) {
  549. // CHECK:STDOUT: %T.loc5_13.1 => constants.%X
  550. // CHECK:STDOUT:
  551. // CHECK:STDOUT: !definition:
  552. // CHECK:STDOUT: %A.type => constants.%A.type.0a4
  553. // CHECK:STDOUT: %Self.2 => constants.%Self.08e
  554. // CHECK:STDOUT: %A.F.type => constants.%A.F.type.13d
  555. // CHECK:STDOUT: %A.F => constants.%A.F.d83
  556. // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.296
  557. // CHECK:STDOUT: %assoc0.loc6_41.2 => constants.%assoc0.5f6
  558. // CHECK:STDOUT: }
  559. // CHECK:STDOUT:
  560. // CHECK:STDOUT: specific @Y.as.A.impl.F(constants.%U.8b3) {
  561. // CHECK:STDOUT: %U.loc16_8.1 => constants.%U.8b3
  562. // CHECK:STDOUT: %ptr.loc16_22.1 => constants.%ptr.79f131.1
  563. // CHECK:STDOUT: %pattern_type.loc16_18 => constants.%pattern_type.afe393.1
  564. // CHECK:STDOUT: %tuple.type.loc16 => constants.%tuple.type.c14
  565. // CHECK:STDOUT: %pattern_type.loc16_25 => constants.%pattern_type.ac9
  566. // CHECK:STDOUT: }
  567. // CHECK:STDOUT:
  568. // CHECK:STDOUT: specific @A.F(constants.%X, constants.%A.facet, constants.%U.8b3) {
  569. // CHECK:STDOUT: %U.loc6_8.1 => constants.%U.8b3
  570. // CHECK:STDOUT: %ptr.loc6_22.1 => constants.%ptr.79f131.1
  571. // CHECK:STDOUT: %pattern_type.loc6_18 => constants.%pattern_type.afe393.1
  572. // CHECK:STDOUT: %T => constants.%X
  573. // CHECK:STDOUT: %A.type => constants.%A.type.0a4
  574. // CHECK:STDOUT: %Self => constants.%A.facet
  575. // CHECK:STDOUT: %tuple.type.loc6_40.1 => constants.%tuple.type.5a1
  576. // CHECK:STDOUT: %Self.as_type.loc6_40.1 => constants.%Y
  577. // CHECK:STDOUT: %tuple.type.loc6_40.2 => constants.%tuple.type.c14
  578. // CHECK:STDOUT: %pattern_type.loc6_25 => constants.%pattern_type.ac9
  579. // CHECK:STDOUT: }
  580. // CHECK:STDOUT:
  581. // CHECK:STDOUT: specific @Y.as.A.impl.F(constants.%Z) {
  582. // CHECK:STDOUT: %U.loc16_8.1 => constants.%Z
  583. // CHECK:STDOUT: %ptr.loc16_22.1 => constants.%ptr.fb6
  584. // CHECK:STDOUT: %pattern_type.loc16_18 => constants.%pattern_type.f76
  585. // CHECK:STDOUT: %tuple.type.loc16 => constants.%tuple.type.092
  586. // CHECK:STDOUT: %pattern_type.loc16_25 => constants.%pattern_type.48d
  587. // CHECK:STDOUT:
  588. // CHECK:STDOUT: !definition:
  589. // CHECK:STDOUT: %require_complete.loc16_25 => constants.%complete_type.05d
  590. // CHECK:STDOUT: %require_complete.loc16_19 => constants.%complete_type.d3e
  591. // CHECK:STDOUT: %tuple.type.loc17 => constants.%tuple.type.953
  592. // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.impl_witness.4b2
  593. // CHECK:STDOUT: %Copy.facet => constants.%Copy.facet.cd8
  594. // CHECK:STDOUT: %.loc17_21.2 => constants.%.7f9
  595. // CHECK:STDOUT: %impl.elem0.loc17_21.2 => constants.%ptr.as.Copy.impl.Op.0c5
  596. // CHECK:STDOUT: %specific_impl_fn.loc17_21.2 => constants.%ptr.as.Copy.impl.Op.specific_fn
  597. // CHECK:STDOUT: }
  598. // CHECK:STDOUT:
  599. // CHECK:STDOUT: specific @CallGeneric(constants.%T.7bf) {
  600. // CHECK:STDOUT: %T.loc26_16.1 => constants.%T.7bf
  601. // CHECK:STDOUT: }
  602. // CHECK:STDOUT:
  603. // CHECK:STDOUT: specific @A.F(constants.%X, constants.%T.7bf, constants.%Z) {
  604. // CHECK:STDOUT: %U.loc6_8.1 => constants.%Z
  605. // CHECK:STDOUT: %ptr.loc6_22.1 => constants.%ptr.fb6
  606. // CHECK:STDOUT: %pattern_type.loc6_18 => constants.%pattern_type.f76
  607. // CHECK:STDOUT: %T => constants.%X
  608. // CHECK:STDOUT: %A.type => constants.%A.type.0a4
  609. // CHECK:STDOUT: %Self => constants.%T.7bf
  610. // CHECK:STDOUT: %tuple.type.loc6_40.1 => constants.%tuple.type.5a1
  611. // CHECK:STDOUT: %Self.as_type.loc6_40.1 => constants.%T.as_type.b3a
  612. // CHECK:STDOUT: %tuple.type.loc6_40.2 => constants.%tuple.type.af6
  613. // CHECK:STDOUT: %pattern_type.loc6_25 => constants.%pattern_type.512
  614. // CHECK:STDOUT: }
  615. // CHECK:STDOUT:
  616. // CHECK:STDOUT: specific @CallGeneric(constants.%A.facet) {
  617. // CHECK:STDOUT: %T.loc26_16.1 => constants.%A.facet
  618. // CHECK:STDOUT:
  619. // CHECK:STDOUT: !definition:
  620. // CHECK:STDOUT: %T.as_type.loc28_4.2 => constants.%Y
  621. // CHECK:STDOUT: %A.lookup_impl_witness => constants.%A.impl_witness
  622. // CHECK:STDOUT: %.loc28_4.3 => constants.%.d35
  623. // CHECK:STDOUT: %impl.elem0.loc28_4.2 => constants.%Y.as.A.impl.F
  624. // CHECK:STDOUT: %specific_impl_fn.loc28_4.2 => constants.%Y.as.A.impl.F.specific_fn
  625. // CHECK:STDOUT: %tuple.type => constants.%tuple.type.092
  626. // CHECK:STDOUT: %require_complete.loc28_12.1 => constants.%complete_type.05d
  627. // CHECK:STDOUT: %facet_value.loc28_12.2 => constants.%facet_value.352
  628. // CHECK:STDOUT: %Destroy.impl_witness => constants.%Destroy.impl_witness.89a
  629. // CHECK:STDOUT: %Destroy.facet => constants.%Destroy.facet.d0e
  630. // CHECK:STDOUT: %.loc28_12.5 => constants.%.f61
  631. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.type => constants.%DestroyT.as_type.as.Destroy.impl.Op.type.ec5
  632. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op => constants.%DestroyT.as_type.as.Destroy.impl.Op.ed3
  633. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.specific_fn.loc28 => constants.%DestroyT.as_type.as.Destroy.impl.Op.specific_fn.71f
  634. // CHECK:STDOUT: %ptr => constants.%ptr.5df
  635. // CHECK:STDOUT: %require_complete.loc28_12.2 => constants.%complete_type.aab
  636. // CHECK:STDOUT: }
  637. // CHECK:STDOUT:
  638. // CHECK:STDOUT: specific @A.F(constants.%X, constants.%A.facet, constants.%Z) {
  639. // CHECK:STDOUT: %U.loc6_8.1 => constants.%Z
  640. // CHECK:STDOUT: %ptr.loc6_22.1 => constants.%ptr.fb6
  641. // CHECK:STDOUT: %pattern_type.loc6_18 => constants.%pattern_type.f76
  642. // CHECK:STDOUT: %T => constants.%X
  643. // CHECK:STDOUT: %A.type => constants.%A.type.0a4
  644. // CHECK:STDOUT: %Self => constants.%A.facet
  645. // CHECK:STDOUT: %tuple.type.loc6_40.1 => constants.%tuple.type.5a1
  646. // CHECK:STDOUT: %Self.as_type.loc6_40.1 => constants.%Y
  647. // CHECK:STDOUT: %tuple.type.loc6_40.2 => constants.%tuple.type.092
  648. // CHECK:STDOUT: %pattern_type.loc6_25 => constants.%pattern_type.48d
  649. // CHECK:STDOUT: }
  650. // CHECK:STDOUT:
  651. // CHECK:STDOUT: --- generic_method_more_params.carbon
  652. // CHECK:STDOUT:
  653. // CHECK:STDOUT: constants {
  654. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  655. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self]
  656. // CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic]
  657. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  658. // CHECK:STDOUT: %A.type.495: type = generic_interface_type @A [concrete]
  659. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  660. // CHECK:STDOUT: %A.generic: %A.type.495 = struct_value () [concrete]
  661. // CHECK:STDOUT: %A.type.d88: type = facet_type <@A, @A(%T.8b3)> [symbolic]
  662. // CHECK:STDOUT: %Self.c6b: %A.type.d88 = bind_symbolic_name Self, 1 [symbolic]
  663. // CHECK:STDOUT: %U.2cb: type = bind_symbolic_name U, 2 [symbolic]
  664. // CHECK:STDOUT: %pattern_type.20f: type = pattern_type %U.2cb [symbolic]
  665. // CHECK:STDOUT: %tuple.type.098: type = tuple_type (type, %A.type.d88, type) [symbolic]
  666. // CHECK:STDOUT: %Self.as_type.707: type = facet_access_type %Self.c6b [symbolic]
  667. // CHECK:STDOUT: %tuple.type.325: type = tuple_type (%T.8b3, %Self.as_type.707, %U.2cb) [symbolic]
  668. // CHECK:STDOUT: %pattern_type.491: type = pattern_type %tuple.type.325 [symbolic]
  669. // CHECK:STDOUT: %A.F.type.17a: type = fn_type @A.F, @A(%T.8b3) [symbolic]
  670. // CHECK:STDOUT: %A.F.0d8: %A.F.type.17a = struct_value () [symbolic]
  671. // CHECK:STDOUT: %A.assoc_type.ed3: type = assoc_entity_type @A, @A(%T.8b3) [symbolic]
  672. // CHECK:STDOUT: %assoc0.fcb: %A.assoc_type.ed3 = assoc_entity element0, @A.%A.F.decl [symbolic]
  673. // CHECK:STDOUT: %X: type = class_type @X [concrete]
  674. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  675. // CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
  676. // CHECK:STDOUT: %Y1: type = class_type @Y1 [concrete]
  677. // CHECK:STDOUT: %Y2: type = class_type @Y2 [concrete]
  678. // CHECK:STDOUT: %Z: type = class_type @Z [concrete]
  679. // CHECK:STDOUT: %V1: type = bind_symbolic_name V1, 0 [symbolic]
  680. // CHECK:STDOUT: %V2: type = bind_symbolic_name V2, 1 [symbolic]
  681. // CHECK:STDOUT: %W: type = bind_symbolic_name W, 2 [symbolic]
  682. // CHECK:STDOUT: %tuple.type.24b: type = tuple_type (type, type) [concrete]
  683. // CHECK:STDOUT: %tuple.type.30b: type = tuple_type (%V1, %V2) [symbolic]
  684. // CHECK:STDOUT: %A.type.ff4: type = facet_type <@A, @A(%W)> [symbolic]
  685. // CHECK:STDOUT: %Self.6c5: %A.type.ff4 = bind_symbolic_name Self, 1 [symbolic]
  686. // CHECK:STDOUT: %A.F.type.904: type = fn_type @A.F, @A(%W) [symbolic]
  687. // CHECK:STDOUT: %A.F.1ee: %A.F.type.904 = struct_value () [symbolic]
  688. // CHECK:STDOUT: %A.assoc_type.b05: type = assoc_entity_type @A, @A(%W) [symbolic]
  689. // CHECK:STDOUT: %assoc0.c82: %A.assoc_type.b05 = assoc_entity element0, @A.%A.F.decl [symbolic]
  690. // CHECK:STDOUT: %require_complete.651: <witness> = require_complete_type %A.type.ff4 [symbolic]
  691. // CHECK:STDOUT: %A.impl_witness.4bf: <witness> = impl_witness file.%A.impl_witness_table, @tuple.type.as.A.impl(%V1, %V2, %W) [symbolic]
  692. // CHECK:STDOUT: %U.753: type = bind_symbolic_name U, 3 [symbolic]
  693. // CHECK:STDOUT: %pattern_type.549: type = pattern_type %U.753 [symbolic]
  694. // CHECK:STDOUT: %tuple.type.11f: type = tuple_type (type, %tuple.type.24b, type) [concrete]
  695. // CHECK:STDOUT: %tuple.type.8ae: type = tuple_type (%W, %tuple.type.30b, %U.753) [symbolic]
  696. // CHECK:STDOUT: %pattern_type.d4a: type = pattern_type %tuple.type.8ae [symbolic]
  697. // CHECK:STDOUT: %tuple.type.as.A.impl.F.type.ce1: type = fn_type @tuple.type.as.A.impl.F, @tuple.type.as.A.impl(%V1, %V2, %W) [symbolic]
  698. // CHECK:STDOUT: %tuple.type.as.A.impl.F.cb7: %tuple.type.as.A.impl.F.type.ce1 = struct_value () [symbolic]
  699. // CHECK:STDOUT: %A.facet.452: %A.type.ff4 = facet_value %tuple.type.30b, (%A.impl_witness.4bf) [symbolic]
  700. // CHECK:STDOUT: %tuple.type.42f: type = tuple_type (type, %A.type.ff4, type) [symbolic]
  701. // CHECK:STDOUT: %require_complete.d4d: <witness> = require_complete_type %tuple.type.8ae [symbolic]
  702. // CHECK:STDOUT: %require_complete.ed4: <witness> = require_complete_type %U.753 [symbolic]
  703. // CHECK:STDOUT: %tuple.type.as.A.impl.F.specific_fn.0dd: <specific function> = specific_function %tuple.type.as.A.impl.F.cb7, @tuple.type.as.A.impl.F(%V1, %V2, %W, %U.753) [symbolic]
  704. // CHECK:STDOUT: %Call.type: type = fn_type @Call [concrete]
  705. // CHECK:STDOUT: %Call: %Call.type = struct_value () [concrete]
  706. // CHECK:STDOUT: %tuple.type.a46: type = tuple_type (%Y1, %Y2) [concrete]
  707. // CHECK:STDOUT: %A.type.0a4: type = facet_type <@A, @A(%X)> [concrete]
  708. // CHECK:STDOUT: %Self.08e: %A.type.0a4 = bind_symbolic_name Self, 1 [symbolic]
  709. // CHECK:STDOUT: %A.F.type.13d: type = fn_type @A.F, @A(%X) [concrete]
  710. // CHECK:STDOUT: %A.F.d83: %A.F.type.13d = struct_value () [concrete]
  711. // CHECK:STDOUT: %A.assoc_type.296: type = assoc_entity_type @A, @A(%X) [concrete]
  712. // CHECK:STDOUT: %assoc0.5f6: %A.assoc_type.296 = assoc_entity element0, @A.%A.F.decl [concrete]
  713. // CHECK:STDOUT: %complete_type.e2d: <witness> = complete_type_witness %A.type.0a4 [concrete]
  714. // CHECK:STDOUT: %A.impl_witness.c8b: <witness> = impl_witness file.%A.impl_witness_table, @tuple.type.as.A.impl(%Y1, %Y2, %X) [concrete]
  715. // CHECK:STDOUT: %tuple.type.as.A.impl.F.type.bdb: type = fn_type @tuple.type.as.A.impl.F, @tuple.type.as.A.impl(%Y1, %Y2, %X) [concrete]
  716. // CHECK:STDOUT: %tuple.type.as.A.impl.F.e39: %tuple.type.as.A.impl.F.type.bdb = struct_value () [concrete]
  717. // CHECK:STDOUT: %A.facet.cdd: %A.type.0a4 = facet_value %tuple.type.a46, (%A.impl_witness.c8b) [concrete]
  718. // CHECK:STDOUT: %.9b3: type = fn_type_with_self_type %A.F.type.13d, %A.facet.cdd [concrete]
  719. // CHECK:STDOUT: %pattern_type.8f9: type = pattern_type %Z [concrete]
  720. // CHECK:STDOUT: %tuple.type.415: type = tuple_type (%X, %tuple.type.a46, %Z) [concrete]
  721. // CHECK:STDOUT: %pattern_type.0b2: type = pattern_type %tuple.type.415 [concrete]
  722. // CHECK:STDOUT: %tuple.type.as.A.impl.F.specific_fn.417: <specific function> = specific_function %tuple.type.as.A.impl.F.e39, @tuple.type.as.A.impl.F(%Y1, %Y2, %X, %Z) [concrete]
  723. // CHECK:STDOUT: %Z.val: %Z = struct_value () [concrete]
  724. // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
  725. // CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete]
  726. // CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanDestroy>> [concrete]
  727. // CHECK:STDOUT: %DestroyT: %type_where = bind_symbolic_name DestroyT, 0 [symbolic]
  728. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.type.190: type = fn_type @DestroyT.as_type.as.Destroy.impl.Op, @DestroyT.as_type.as.Destroy.impl(%DestroyT) [symbolic]
  729. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.8a0: %DestroyT.as_type.as.Destroy.impl.Op.type.190 = struct_value () [symbolic]
  730. // CHECK:STDOUT: %facet_value.71a: %type_where = facet_value %tuple.type.415, () [concrete]
  731. // CHECK:STDOUT: %Destroy.impl_witness.37a: <witness> = impl_witness imports.%Destroy.impl_witness_table, @DestroyT.as_type.as.Destroy.impl(%facet_value.71a) [concrete]
  732. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.type.d92: type = fn_type @DestroyT.as_type.as.Destroy.impl.Op, @DestroyT.as_type.as.Destroy.impl(%facet_value.71a) [concrete]
  733. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.f1a: %DestroyT.as_type.as.Destroy.impl.Op.type.d92 = struct_value () [concrete]
  734. // CHECK:STDOUT: %ptr.ad9: type = ptr_type %tuple.type.415 [concrete]
  735. // CHECK:STDOUT: %complete_type.e23: <witness> = complete_type_witness %ptr.ad9 [concrete]
  736. // CHECK:STDOUT: %Destroy.facet.684: %Destroy.type = facet_value %tuple.type.415, (%Destroy.impl_witness.37a) [concrete]
  737. // CHECK:STDOUT: %.27f: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.684 [concrete]
  738. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.specific_fn.578: <specific function> = specific_function %DestroyT.as_type.as.Destroy.impl.Op.f1a, @DestroyT.as_type.as.Destroy.impl.Op(%facet_value.71a) [concrete]
  739. // CHECK:STDOUT: %facet_value.4e3: %type_where = facet_value %Z, () [concrete]
  740. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.type.18a: type = fn_type @DestroyT.as_type.as.Destroy.impl.Op, @DestroyT.as_type.as.Destroy.impl(%facet_value.4e3) [concrete]
  741. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.dd5: %DestroyT.as_type.as.Destroy.impl.Op.type.18a = struct_value () [concrete]
  742. // CHECK:STDOUT: %ptr.fb6: type = ptr_type %Z [concrete]
  743. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.specific_fn.e7d: <specific function> = specific_function %DestroyT.as_type.as.Destroy.impl.Op.dd5, @DestroyT.as_type.as.Destroy.impl.Op(%facet_value.4e3) [concrete]
  744. // CHECK:STDOUT: %T.7bf: %A.type.0a4 = bind_symbolic_name T, 0 [symbolic]
  745. // CHECK:STDOUT: %pattern_type.809: type = pattern_type %A.type.0a4 [concrete]
  746. // CHECK:STDOUT: %CallGeneric.type: type = fn_type @CallGeneric [concrete]
  747. // CHECK:STDOUT: %CallGeneric: %CallGeneric.type = struct_value () [concrete]
  748. // CHECK:STDOUT: %T.as_type: type = facet_access_type %T.7bf [symbolic]
  749. // CHECK:STDOUT: %A.lookup_impl_witness: <witness> = lookup_impl_witness %T.7bf, @A, @A(%X) [symbolic]
  750. // CHECK:STDOUT: %.0c6: type = fn_type_with_self_type %A.F.type.13d, %T.7bf [symbolic]
  751. // CHECK:STDOUT: %impl.elem0: %.0c6 = impl_witness_access %A.lookup_impl_witness, element0 [symbolic]
  752. // CHECK:STDOUT: %tuple.type.5a1: type = tuple_type (type, %A.type.0a4, type) [concrete]
  753. // CHECK:STDOUT: %tuple.type.780: type = tuple_type (%X, %T.as_type, %Z) [symbolic]
  754. // CHECK:STDOUT: %pattern_type.f87: type = pattern_type %tuple.type.780 [symbolic]
  755. // CHECK:STDOUT: %specific_impl_fn: <specific function> = specific_impl_function %impl.elem0, @A.F(%X, %T.7bf, %Z) [symbolic]
  756. // CHECK:STDOUT: %require_complete.4ef: <witness> = require_complete_type %tuple.type.780 [symbolic]
  757. // CHECK:STDOUT: %facet_value.52b: %type_where = facet_value %tuple.type.780, () [symbolic]
  758. // CHECK:STDOUT: %Destroy.impl_witness.aa0: <witness> = impl_witness imports.%Destroy.impl_witness_table, @DestroyT.as_type.as.Destroy.impl(%facet_value.52b) [symbolic]
  759. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.type.7cc: type = fn_type @DestroyT.as_type.as.Destroy.impl.Op, @DestroyT.as_type.as.Destroy.impl(%facet_value.52b) [symbolic]
  760. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.24b: %DestroyT.as_type.as.Destroy.impl.Op.type.7cc = struct_value () [symbolic]
  761. // CHECK:STDOUT: %ptr.563: type = ptr_type %tuple.type.780 [symbolic]
  762. // CHECK:STDOUT: %require_complete.147: <witness> = require_complete_type %ptr.563 [symbolic]
  763. // CHECK:STDOUT: %Destroy.facet.324: %Destroy.type = facet_value %tuple.type.780, (%Destroy.impl_witness.aa0) [symbolic]
  764. // CHECK:STDOUT: %.a30: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.324 [symbolic]
  765. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.specific_fn.2bf: <specific function> = specific_function %DestroyT.as_type.as.Destroy.impl.Op.24b, @DestroyT.as_type.as.Destroy.impl.Op(%facet_value.52b) [symbolic]
  766. // CHECK:STDOUT: %CallIndirect.type: type = fn_type @CallIndirect [concrete]
  767. // CHECK:STDOUT: %CallIndirect: %CallIndirect.type = struct_value () [concrete]
  768. // CHECK:STDOUT: %CallGeneric.specific_fn: <specific function> = specific_function %CallGeneric, @CallGeneric(%A.facet.cdd) [concrete]
  769. // CHECK:STDOUT: %complete_type.aa8: <witness> = complete_type_witness %tuple.type.415 [concrete]
  770. // CHECK:STDOUT: }
  771. // CHECK:STDOUT:
  772. // CHECK:STDOUT: imports {
  773. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  774. // CHECK:STDOUT: .Destroy = %Core.Destroy
  775. // CHECK:STDOUT: import Core//prelude
  776. // CHECK:STDOUT: import Core//prelude/...
  777. // CHECK:STDOUT: }
  778. // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
  779. // CHECK:STDOUT: %Core.import_ref.d51: @DestroyT.as_type.as.Destroy.impl.%DestroyT.as_type.as.Destroy.impl.Op.type (%DestroyT.as_type.as.Destroy.impl.Op.type.190) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @DestroyT.as_type.as.Destroy.impl.%DestroyT.as_type.as.Destroy.impl.Op (constants.%DestroyT.as_type.as.Destroy.impl.Op.8a0)]
  780. // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.d51), @DestroyT.as_type.as.Destroy.impl [concrete]
  781. // CHECK:STDOUT: }
  782. // CHECK:STDOUT:
  783. // CHECK:STDOUT: file {
  784. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  785. // CHECK:STDOUT: .Core = imports.%Core
  786. // CHECK:STDOUT: .A = %A.decl
  787. // CHECK:STDOUT: .X = %X.decl
  788. // CHECK:STDOUT: .Y1 = %Y1.decl
  789. // CHECK:STDOUT: .Y2 = %Y2.decl
  790. // CHECK:STDOUT: .Z = %Z.decl
  791. // CHECK:STDOUT: .Call = %Call.decl
  792. // CHECK:STDOUT: .CallGeneric = %CallGeneric.decl
  793. // CHECK:STDOUT: .CallIndirect = %CallIndirect.decl
  794. // CHECK:STDOUT: }
  795. // CHECK:STDOUT: %Core.import = import Core
  796. // CHECK:STDOUT: %A.decl: %A.type.495 = interface_decl @A [concrete = constants.%A.generic] {
  797. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  798. // CHECK:STDOUT: } {
  799. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  800. // CHECK:STDOUT: %T.loc5_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc5_13.1 (constants.%T.8b3)]
  801. // CHECK:STDOUT: }
  802. // CHECK:STDOUT: %X.decl: type = class_decl @X [concrete = constants.%X] {} {}
  803. // CHECK:STDOUT: %Y1.decl: type = class_decl @Y1 [concrete = constants.%Y1] {} {}
  804. // CHECK:STDOUT: %Y2.decl: type = class_decl @Y2 [concrete = constants.%Y2] {} {}
  805. // CHECK:STDOUT: %Z.decl: type = class_decl @Z [concrete = constants.%Z] {} {}
  806. // CHECK:STDOUT: impl_decl @tuple.type.as.A.impl [concrete] {
  807. // CHECK:STDOUT: %V1.patt: %pattern_type.98f = symbolic_binding_pattern V1, 0 [concrete]
  808. // CHECK:STDOUT: %V2.patt: %pattern_type.98f = symbolic_binding_pattern V2, 1 [concrete]
  809. // CHECK:STDOUT: %W.patt: %pattern_type.98f = symbolic_binding_pattern W, 2 [concrete]
  810. // CHECK:STDOUT: } {
  811. // CHECK:STDOUT: %V1.ref: type = name_ref V1, %V1.loc14_14.2 [symbolic = %V1.loc14_14.1 (constants.%V1)]
  812. // CHECK:STDOUT: %V2.ref: type = name_ref V2, %V2.loc14_25.2 [symbolic = %V2.loc14_25.1 (constants.%V2)]
  813. // CHECK:STDOUT: %.loc14_53.1: %tuple.type.24b = tuple_literal (%V1.ref, %V2.ref)
  814. // CHECK:STDOUT: %.loc14_53.2: type = converted %.loc14_53.1, constants.%tuple.type.30b [symbolic = %tuple.type (constants.%tuple.type.30b)]
  815. // CHECK:STDOUT: %A.ref: %A.type.495 = name_ref A, file.%A.decl [concrete = constants.%A.generic]
  816. // CHECK:STDOUT: %W.ref: type = name_ref W, %W.loc14_36.2 [symbolic = %W.loc14_36.1 (constants.%W)]
  817. // CHECK:STDOUT: %A.type.loc14_61.2: type = facet_type <@A, @A(constants.%W)> [symbolic = %A.type.loc14_61.1 (constants.%A.type.ff4)]
  818. // CHECK:STDOUT: %.Self.1: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  819. // CHECK:STDOUT: %V1.loc14_14.2: type = bind_symbolic_name V1, 0 [symbolic = %V1.loc14_14.1 (constants.%V1)]
  820. // CHECK:STDOUT: %.Self.2: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  821. // CHECK:STDOUT: %V2.loc14_25.2: type = bind_symbolic_name V2, 1 [symbolic = %V2.loc14_25.1 (constants.%V2)]
  822. // CHECK:STDOUT: %.Self.3: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  823. // CHECK:STDOUT: %W.loc14_36.2: type = bind_symbolic_name W, 2 [symbolic = %W.loc14_36.1 (constants.%W)]
  824. // CHECK:STDOUT: }
  825. // CHECK:STDOUT: %A.impl_witness_table = impl_witness_table (@tuple.type.as.A.impl.%tuple.type.as.A.impl.F.decl), @tuple.type.as.A.impl [concrete]
  826. // CHECK:STDOUT: %A.impl_witness: <witness> = impl_witness %A.impl_witness_table, @tuple.type.as.A.impl(constants.%V1, constants.%V2, constants.%W) [symbolic = @tuple.type.as.A.impl.%A.impl_witness (constants.%A.impl_witness.4bf)]
  827. // CHECK:STDOUT: %Call.decl: %Call.type = fn_decl @Call [concrete = constants.%Call] {} {}
  828. // CHECK:STDOUT: %CallGeneric.decl: %CallGeneric.type = fn_decl @CallGeneric [concrete = constants.%CallGeneric] {
  829. // CHECK:STDOUT: %T.patt: %pattern_type.809 = symbolic_binding_pattern T, 0 [concrete]
  830. // CHECK:STDOUT: } {
  831. // CHECK:STDOUT: %.loc27: type = splice_block %A.type [concrete = constants.%A.type.0a4] {
  832. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  833. // CHECK:STDOUT: %A.ref: %A.type.495 = name_ref A, file.%A.decl [concrete = constants.%A.generic]
  834. // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X]
  835. // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(constants.%X)> [concrete = constants.%A.type.0a4]
  836. // CHECK:STDOUT: }
  837. // CHECK:STDOUT: %T.loc27_16.2: %A.type.0a4 = bind_symbolic_name T, 0 [symbolic = %T.loc27_16.1 (constants.%T.7bf)]
  838. // CHECK:STDOUT: }
  839. // CHECK:STDOUT: %CallIndirect.decl: %CallIndirect.type = fn_decl @CallIndirect [concrete = constants.%CallIndirect] {} {}
  840. // CHECK:STDOUT: }
  841. // CHECK:STDOUT:
  842. // CHECK:STDOUT: generic interface @A(%T.loc5_13.2: type) {
  843. // CHECK:STDOUT: %T.loc5_13.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc5_13.1 (constants.%T.8b3)]
  844. // CHECK:STDOUT:
  845. // CHECK:STDOUT: !definition:
  846. // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(%T.loc5_13.1)> [symbolic = %A.type (constants.%A.type.d88)]
  847. // CHECK:STDOUT: %Self.2: @A.%A.type (%A.type.d88) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.c6b)]
  848. // CHECK:STDOUT: %A.F.type: type = fn_type @A.F, @A(%T.loc5_13.1) [symbolic = %A.F.type (constants.%A.F.type.17a)]
  849. // CHECK:STDOUT: %A.F: @A.%A.F.type (%A.F.type.17a) = struct_value () [symbolic = %A.F (constants.%A.F.0d8)]
  850. // CHECK:STDOUT: %A.assoc_type: type = assoc_entity_type @A, @A(%T.loc5_13.1) [symbolic = %A.assoc_type (constants.%A.assoc_type.ed3)]
  851. // CHECK:STDOUT: %assoc0.loc6_39.2: @A.%A.assoc_type (%A.assoc_type.ed3) = assoc_entity element0, %A.F.decl [symbolic = %assoc0.loc6_39.2 (constants.%assoc0.fcb)]
  852. // CHECK:STDOUT:
  853. // CHECK:STDOUT: interface {
  854. // CHECK:STDOUT: %Self.1: @A.%A.type (%A.type.d88) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.c6b)]
  855. // CHECK:STDOUT: %A.F.decl: @A.%A.F.type (%A.F.type.17a) = fn_decl @A.F [symbolic = @A.%A.F (constants.%A.F.0d8)] {
  856. // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 2 [concrete]
  857. // CHECK:STDOUT: %u.patt: @A.F.%pattern_type.loc6_18 (%pattern_type.20f) = binding_pattern u [concrete]
  858. // CHECK:STDOUT: %u.param_patt: @A.F.%pattern_type.loc6_18 (%pattern_type.20f) = value_param_pattern %u.patt, call_param0 [concrete]
  859. // CHECK:STDOUT: %return.patt: @A.F.%pattern_type.loc6_24 (%pattern_type.491) = return_slot_pattern [concrete]
  860. // CHECK:STDOUT: %return.param_patt: @A.F.%pattern_type.loc6_24 (%pattern_type.491) = out_param_pattern %return.patt, call_param1 [concrete]
  861. // CHECK:STDOUT: } {
  862. // CHECK:STDOUT: %T.ref: type = name_ref T, @A.%T.loc5_13.2 [symbolic = %T (constants.%T.8b3)]
  863. // CHECK:STDOUT: %.loc6_31: @A.F.%A.type (%A.type.d88) = specific_constant @A.%Self.1, @A(constants.%T.8b3) [symbolic = %Self (constants.%Self.c6b)]
  864. // CHECK:STDOUT: %Self.ref: @A.F.%A.type (%A.type.d88) = name_ref Self, %.loc6_31 [symbolic = %Self (constants.%Self.c6b)]
  865. // CHECK:STDOUT: %U.ref.loc6_37: type = name_ref U, %U.loc6_8.2 [symbolic = %U.loc6_8.1 (constants.%U.2cb)]
  866. // CHECK:STDOUT: %.loc6_38.1: @A.F.%tuple.type.loc6_38.1 (%tuple.type.098) = tuple_literal (%T.ref, %Self.ref, %U.ref.loc6_37)
  867. // CHECK:STDOUT: %Self.as_type.loc6_38.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc6_38.1 (constants.%Self.as_type.707)]
  868. // CHECK:STDOUT: %.loc6_38.2: type = converted %Self.ref, %Self.as_type.loc6_38.2 [symbolic = %Self.as_type.loc6_38.1 (constants.%Self.as_type.707)]
  869. // CHECK:STDOUT: %.loc6_38.3: type = converted %.loc6_38.1, constants.%tuple.type.325 [symbolic = %tuple.type.loc6_38.2 (constants.%tuple.type.325)]
  870. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  871. // CHECK:STDOUT: %U.loc6_8.2: type = bind_symbolic_name U, 2 [symbolic = %U.loc6_8.1 (constants.%U.2cb)]
  872. // CHECK:STDOUT: %u.param: @A.F.%U.loc6_8.1 (%U.2cb) = value_param call_param0
  873. // CHECK:STDOUT: %U.ref.loc6_21: type = name_ref U, %U.loc6_8.2 [symbolic = %U.loc6_8.1 (constants.%U.2cb)]
  874. // CHECK:STDOUT: %u: @A.F.%U.loc6_8.1 (%U.2cb) = bind_name u, %u.param
  875. // CHECK:STDOUT: %return.param: ref @A.F.%tuple.type.loc6_38.2 (%tuple.type.325) = out_param call_param1
  876. // CHECK:STDOUT: %return: ref @A.F.%tuple.type.loc6_38.2 (%tuple.type.325) = return_slot %return.param
  877. // CHECK:STDOUT: }
  878. // CHECK:STDOUT: %assoc0.loc6_39.1: @A.%A.assoc_type (%A.assoc_type.ed3) = assoc_entity element0, %A.F.decl [symbolic = %assoc0.loc6_39.2 (constants.%assoc0.fcb)]
  879. // CHECK:STDOUT:
  880. // CHECK:STDOUT: !members:
  881. // CHECK:STDOUT: .Self = %Self.1
  882. // CHECK:STDOUT: .T = <poisoned>
  883. // CHECK:STDOUT: .F = %assoc0.loc6_39.1
  884. // CHECK:STDOUT: witness = (%A.F.decl)
  885. // CHECK:STDOUT: }
  886. // CHECK:STDOUT: }
  887. // CHECK:STDOUT:
  888. // CHECK:STDOUT: generic impl @tuple.type.as.A.impl(%V1.loc14_14.2: type, %V2.loc14_25.2: type, %W.loc14_36.2: type) {
  889. // CHECK:STDOUT: %V1.loc14_14.1: type = bind_symbolic_name V1, 0 [symbolic = %V1.loc14_14.1 (constants.%V1)]
  890. // CHECK:STDOUT: %V2.loc14_25.1: type = bind_symbolic_name V2, 1 [symbolic = %V2.loc14_25.1 (constants.%V2)]
  891. // CHECK:STDOUT: %W.loc14_36.1: type = bind_symbolic_name W, 2 [symbolic = %W.loc14_36.1 (constants.%W)]
  892. // CHECK:STDOUT: %tuple.type: type = tuple_type (%V1.loc14_14.1, %V2.loc14_25.1) [symbolic = %tuple.type (constants.%tuple.type.30b)]
  893. // CHECK:STDOUT: %A.type.loc14_61.1: type = facet_type <@A, @A(%W.loc14_36.1)> [symbolic = %A.type.loc14_61.1 (constants.%A.type.ff4)]
  894. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %A.type.loc14_61.1 [symbolic = %require_complete (constants.%require_complete.651)]
  895. // CHECK:STDOUT: %A.impl_witness: <witness> = impl_witness file.%A.impl_witness_table, @tuple.type.as.A.impl(%V1.loc14_14.1, %V2.loc14_25.1, %W.loc14_36.1) [symbolic = %A.impl_witness (constants.%A.impl_witness.4bf)]
  896. // CHECK:STDOUT:
  897. // CHECK:STDOUT: !definition:
  898. // CHECK:STDOUT: %tuple.type.as.A.impl.F.type: type = fn_type @tuple.type.as.A.impl.F, @tuple.type.as.A.impl(%V1.loc14_14.1, %V2.loc14_25.1, %W.loc14_36.1) [symbolic = %tuple.type.as.A.impl.F.type (constants.%tuple.type.as.A.impl.F.type.ce1)]
  899. // CHECK:STDOUT: %tuple.type.as.A.impl.F: @tuple.type.as.A.impl.%tuple.type.as.A.impl.F.type (%tuple.type.as.A.impl.F.type.ce1) = struct_value () [symbolic = %tuple.type.as.A.impl.F (constants.%tuple.type.as.A.impl.F.cb7)]
  900. // CHECK:STDOUT:
  901. // CHECK:STDOUT: impl: %.loc14_53.2 as %A.type.loc14_61.2 {
  902. // CHECK:STDOUT: %tuple.type.as.A.impl.F.decl: @tuple.type.as.A.impl.%tuple.type.as.A.impl.F.type (%tuple.type.as.A.impl.F.type.ce1) = fn_decl @tuple.type.as.A.impl.F [symbolic = @tuple.type.as.A.impl.%tuple.type.as.A.impl.F (constants.%tuple.type.as.A.impl.F.cb7)] {
  903. // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 3 [concrete]
  904. // CHECK:STDOUT: %u.patt: @tuple.type.as.A.impl.F.%pattern_type.loc17_18 (%pattern_type.549) = binding_pattern u [concrete]
  905. // CHECK:STDOUT: %u.param_patt: @tuple.type.as.A.impl.F.%pattern_type.loc17_18 (%pattern_type.549) = value_param_pattern %u.patt, call_param0 [concrete]
  906. // CHECK:STDOUT: %return.patt: @tuple.type.as.A.impl.F.%pattern_type.loc17_24 (%pattern_type.d4a) = return_slot_pattern [concrete]
  907. // CHECK:STDOUT: %return.param_patt: @tuple.type.as.A.impl.F.%pattern_type.loc17_24 (%pattern_type.d4a) = out_param_pattern %return.patt, call_param1 [concrete]
  908. // CHECK:STDOUT: } {
  909. // CHECK:STDOUT: %W.ref: type = name_ref W, @tuple.type.as.A.impl.%W.loc14_36.2 [symbolic = %W (constants.%W)]
  910. // CHECK:STDOUT: %V1.ref: type = name_ref V1, @tuple.type.as.A.impl.%V1.loc14_14.2 [symbolic = %V1 (constants.%V1)]
  911. // CHECK:STDOUT: %V2.ref: type = name_ref V2, @tuple.type.as.A.impl.%V2.loc14_25.2 [symbolic = %V2 (constants.%V2)]
  912. // CHECK:STDOUT: %.loc17_38: %tuple.type.24b = tuple_literal (%V1.ref, %V2.ref)
  913. // CHECK:STDOUT: %U.ref.loc17_41: type = name_ref U, %U.loc17_8.2 [symbolic = %U.loc17_8.1 (constants.%U.753)]
  914. // CHECK:STDOUT: %.loc17_42.1: %tuple.type.11f = tuple_literal (%W.ref, %.loc17_38, %U.ref.loc17_41)
  915. // CHECK:STDOUT: %.loc17_42.2: type = converted %.loc17_38, constants.%tuple.type.30b [symbolic = %tuple.type.loc17_42.1 (constants.%tuple.type.30b)]
  916. // CHECK:STDOUT: %.loc17_42.3: type = converted %.loc17_42.1, constants.%tuple.type.8ae [symbolic = %tuple.type.loc17_42.2 (constants.%tuple.type.8ae)]
  917. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  918. // CHECK:STDOUT: %U.loc17_8.2: type = bind_symbolic_name U, 3 [symbolic = %U.loc17_8.1 (constants.%U.753)]
  919. // CHECK:STDOUT: %u.param: @tuple.type.as.A.impl.F.%U.loc17_8.1 (%U.753) = value_param call_param0
  920. // CHECK:STDOUT: %U.ref.loc17_21: type = name_ref U, %U.loc17_8.2 [symbolic = %U.loc17_8.1 (constants.%U.753)]
  921. // CHECK:STDOUT: %u: @tuple.type.as.A.impl.F.%U.loc17_8.1 (%U.753) = bind_name u, %u.param
  922. // CHECK:STDOUT: %return.param: ref @tuple.type.as.A.impl.F.%tuple.type.loc17_42.2 (%tuple.type.8ae) = out_param call_param1
  923. // CHECK:STDOUT: %return: ref @tuple.type.as.A.impl.F.%tuple.type.loc17_42.2 (%tuple.type.8ae) = return_slot %return.param
  924. // CHECK:STDOUT: }
  925. // CHECK:STDOUT:
  926. // CHECK:STDOUT: !members:
  927. // CHECK:STDOUT: .W = <poisoned>
  928. // CHECK:STDOUT: .V1 = <poisoned>
  929. // CHECK:STDOUT: .V2 = <poisoned>
  930. // CHECK:STDOUT: .F = %tuple.type.as.A.impl.F.decl
  931. // CHECK:STDOUT: witness = file.%A.impl_witness
  932. // CHECK:STDOUT: }
  933. // CHECK:STDOUT: }
  934. // CHECK:STDOUT:
  935. // CHECK:STDOUT: class @X {
  936. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
  937. // CHECK:STDOUT: complete_type_witness = %complete_type
  938. // CHECK:STDOUT:
  939. // CHECK:STDOUT: !members:
  940. // CHECK:STDOUT: .Self = constants.%X
  941. // CHECK:STDOUT: }
  942. // CHECK:STDOUT:
  943. // CHECK:STDOUT: class @Y1 {
  944. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
  945. // CHECK:STDOUT: complete_type_witness = %complete_type
  946. // CHECK:STDOUT:
  947. // CHECK:STDOUT: !members:
  948. // CHECK:STDOUT: .Self = constants.%Y1
  949. // CHECK:STDOUT: }
  950. // CHECK:STDOUT:
  951. // CHECK:STDOUT: class @Y2 {
  952. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
  953. // CHECK:STDOUT: complete_type_witness = %complete_type
  954. // CHECK:STDOUT:
  955. // CHECK:STDOUT: !members:
  956. // CHECK:STDOUT: .Self = constants.%Y2
  957. // CHECK:STDOUT: }
  958. // CHECK:STDOUT:
  959. // CHECK:STDOUT: class @Z {
  960. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
  961. // CHECK:STDOUT: complete_type_witness = %complete_type
  962. // CHECK:STDOUT:
  963. // CHECK:STDOUT: !members:
  964. // CHECK:STDOUT: .Self = constants.%Z
  965. // CHECK:STDOUT: }
  966. // CHECK:STDOUT:
  967. // CHECK:STDOUT: generic fn @A.F(@A.%T.loc5_13.2: type, @A.%Self.1: @A.%A.type (%A.type.d88), %U.loc6_8.2: type) {
  968. // CHECK:STDOUT: %U.loc6_8.1: type = bind_symbolic_name U, 2 [symbolic = %U.loc6_8.1 (constants.%U.2cb)]
  969. // CHECK:STDOUT: %pattern_type.loc6_18: type = pattern_type %U.loc6_8.1 [symbolic = %pattern_type.loc6_18 (constants.%pattern_type.20f)]
  970. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T.8b3)]
  971. // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(%T)> [symbolic = %A.type (constants.%A.type.d88)]
  972. // CHECK:STDOUT: %Self: @A.F.%A.type (%A.type.d88) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.c6b)]
  973. // CHECK:STDOUT: %tuple.type.loc6_38.1: type = tuple_type (type, %A.type, type) [symbolic = %tuple.type.loc6_38.1 (constants.%tuple.type.098)]
  974. // CHECK:STDOUT: %Self.as_type.loc6_38.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc6_38.1 (constants.%Self.as_type.707)]
  975. // CHECK:STDOUT: %tuple.type.loc6_38.2: type = tuple_type (%T, %Self.as_type.loc6_38.1, %U.loc6_8.1) [symbolic = %tuple.type.loc6_38.2 (constants.%tuple.type.325)]
  976. // CHECK:STDOUT: %pattern_type.loc6_24: type = pattern_type %tuple.type.loc6_38.2 [symbolic = %pattern_type.loc6_24 (constants.%pattern_type.491)]
  977. // CHECK:STDOUT:
  978. // CHECK:STDOUT: fn(%u.param: @A.F.%U.loc6_8.1 (%U.2cb)) -> @A.F.%tuple.type.loc6_38.2 (%tuple.type.325);
  979. // CHECK:STDOUT: }
  980. // CHECK:STDOUT:
  981. // CHECK:STDOUT: generic fn @tuple.type.as.A.impl.F(@tuple.type.as.A.impl.%V1.loc14_14.2: type, @tuple.type.as.A.impl.%V2.loc14_25.2: type, @tuple.type.as.A.impl.%W.loc14_36.2: type, %U.loc17_8.2: type) {
  982. // CHECK:STDOUT: %U.loc17_8.1: type = bind_symbolic_name U, 3 [symbolic = %U.loc17_8.1 (constants.%U.753)]
  983. // CHECK:STDOUT: %pattern_type.loc17_18: type = pattern_type %U.loc17_8.1 [symbolic = %pattern_type.loc17_18 (constants.%pattern_type.549)]
  984. // CHECK:STDOUT: %W: type = bind_symbolic_name W, 2 [symbolic = %W (constants.%W)]
  985. // CHECK:STDOUT: %V1: type = bind_symbolic_name V1, 0 [symbolic = %V1 (constants.%V1)]
  986. // CHECK:STDOUT: %V2: type = bind_symbolic_name V2, 1 [symbolic = %V2 (constants.%V2)]
  987. // CHECK:STDOUT: %tuple.type.loc17_42.1: type = tuple_type (%V1, %V2) [symbolic = %tuple.type.loc17_42.1 (constants.%tuple.type.30b)]
  988. // CHECK:STDOUT: %tuple.type.loc17_42.2: type = tuple_type (%W, %tuple.type.loc17_42.1, %U.loc17_8.1) [symbolic = %tuple.type.loc17_42.2 (constants.%tuple.type.8ae)]
  989. // CHECK:STDOUT: %pattern_type.loc17_24: type = pattern_type %tuple.type.loc17_42.2 [symbolic = %pattern_type.loc17_24 (constants.%pattern_type.d4a)]
  990. // CHECK:STDOUT:
  991. // CHECK:STDOUT: !definition:
  992. // CHECK:STDOUT: %require_complete.loc17_24: <witness> = require_complete_type %tuple.type.loc17_42.2 [symbolic = %require_complete.loc17_24 (constants.%require_complete.d4d)]
  993. // CHECK:STDOUT: %require_complete.loc17_19: <witness> = require_complete_type %U.loc17_8.1 [symbolic = %require_complete.loc17_19 (constants.%require_complete.ed4)]
  994. // CHECK:STDOUT: %tuple.type.as.A.impl.F.type: type = fn_type @tuple.type.as.A.impl.F, @tuple.type.as.A.impl(%V1, %V2, %W) [symbolic = %tuple.type.as.A.impl.F.type (constants.%tuple.type.as.A.impl.F.type.ce1)]
  995. // CHECK:STDOUT: %tuple.type.as.A.impl.F: @tuple.type.as.A.impl.F.%tuple.type.as.A.impl.F.type (%tuple.type.as.A.impl.F.type.ce1) = struct_value () [symbolic = %tuple.type.as.A.impl.F (constants.%tuple.type.as.A.impl.F.cb7)]
  996. // CHECK:STDOUT: %tuple.type.as.A.impl.F.specific_fn.loc18_12.2: <specific function> = specific_function %tuple.type.as.A.impl.F, @tuple.type.as.A.impl.F(%V1, %V2, %W, %U.loc17_8.1) [symbolic = %tuple.type.as.A.impl.F.specific_fn.loc18_12.2 (constants.%tuple.type.as.A.impl.F.specific_fn.0dd)]
  997. // CHECK:STDOUT:
  998. // CHECK:STDOUT: fn(%u.param: @tuple.type.as.A.impl.F.%U.loc17_8.1 (%U.753)) -> %return.param: @tuple.type.as.A.impl.F.%tuple.type.loc17_42.2 (%tuple.type.8ae) {
  999. // CHECK:STDOUT: !entry:
  1000. // CHECK:STDOUT: %.loc18: @tuple.type.as.A.impl.F.%tuple.type.as.A.impl.F.type (%tuple.type.as.A.impl.F.type.ce1) = specific_constant @tuple.type.as.A.impl.%tuple.type.as.A.impl.F.decl, @tuple.type.as.A.impl(constants.%V1, constants.%V2, constants.%W) [symbolic = %tuple.type.as.A.impl.F (constants.%tuple.type.as.A.impl.F.cb7)]
  1001. // CHECK:STDOUT: %F.ref: @tuple.type.as.A.impl.F.%tuple.type.as.A.impl.F.type (%tuple.type.as.A.impl.F.type.ce1) = name_ref F, %.loc18 [symbolic = %tuple.type.as.A.impl.F (constants.%tuple.type.as.A.impl.F.cb7)]
  1002. // CHECK:STDOUT: %U.ref.loc18: type = name_ref U, %U.loc17_8.2 [symbolic = %U.loc17_8.1 (constants.%U.753)]
  1003. // CHECK:STDOUT: %u.ref: @tuple.type.as.A.impl.F.%U.loc17_8.1 (%U.753) = name_ref u, %u
  1004. // CHECK:STDOUT: %tuple.type.as.A.impl.F.specific_fn.loc18_12.1: <specific function> = specific_function %F.ref, @tuple.type.as.A.impl.F(constants.%V1, constants.%V2, constants.%W, constants.%U.753) [symbolic = %tuple.type.as.A.impl.F.specific_fn.loc18_12.2 (constants.%tuple.type.as.A.impl.F.specific_fn.0dd)]
  1005. // CHECK:STDOUT: %.loc17_24: ref @tuple.type.as.A.impl.F.%tuple.type.loc17_42.2 (%tuple.type.8ae) = splice_block %return {}
  1006. // CHECK:STDOUT: %tuple.type.as.A.impl.F.call: init @tuple.type.as.A.impl.F.%tuple.type.loc17_42.2 (%tuple.type.8ae) = call %tuple.type.as.A.impl.F.specific_fn.loc18_12.1(%u.ref) to %.loc17_24
  1007. // CHECK:STDOUT: return %tuple.type.as.A.impl.F.call to %return
  1008. // CHECK:STDOUT: }
  1009. // CHECK:STDOUT: }
  1010. // CHECK:STDOUT:
  1011. // CHECK:STDOUT: fn @Call() {
  1012. // CHECK:STDOUT: !entry:
  1013. // CHECK:STDOUT: %Y1.ref: type = name_ref Y1, file.%Y1.decl [concrete = constants.%Y1]
  1014. // CHECK:STDOUT: %Y2.ref: type = name_ref Y2, file.%Y2.decl [concrete = constants.%Y2]
  1015. // CHECK:STDOUT: %.loc24_12: %tuple.type.24b = tuple_literal (%Y1.ref, %Y2.ref)
  1016. // CHECK:STDOUT: %.loc24_14: type = converted %.loc24_12, constants.%tuple.type.a46 [concrete = constants.%tuple.type.a46]
  1017. // CHECK:STDOUT: %A.ref: %A.type.495 = name_ref A, file.%A.decl [concrete = constants.%A.generic]
  1018. // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X]
  1019. // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(constants.%X)> [concrete = constants.%A.type.0a4]
  1020. // CHECK:STDOUT: %A.facet: %A.type.0a4 = facet_value %.loc24_14, (constants.%A.impl_witness.c8b) [concrete = constants.%A.facet.cdd]
  1021. // CHECK:STDOUT: %.loc24_23: %A.type.0a4 = converted %.loc24_14, %A.facet [concrete = constants.%A.facet.cdd]
  1022. // CHECK:STDOUT: %.loc24_31.1: %A.assoc_type.296 = specific_constant @A.%assoc0.loc6_39.1, @A(constants.%X) [concrete = constants.%assoc0.5f6]
  1023. // CHECK:STDOUT: %F.ref: %A.assoc_type.296 = name_ref F, %.loc24_31.1 [concrete = constants.%assoc0.5f6]
  1024. // CHECK:STDOUT: %as_type: type = facet_access_type %.loc24_23 [concrete = constants.%tuple.type.a46]
  1025. // CHECK:STDOUT: %.loc24_31.2: type = converted %.loc24_23, %as_type [concrete = constants.%tuple.type.a46]
  1026. // CHECK:STDOUT: %impl.elem0: %.9b3 = impl_witness_access constants.%A.impl_witness.c8b, element0 [concrete = constants.%tuple.type.as.A.impl.F.e39]
  1027. // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z]
  1028. // CHECK:STDOUT: %.loc24_38.1: %empty_struct_type = struct_literal ()
  1029. // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @tuple.type.as.A.impl.F(constants.%Y1, constants.%Y2, constants.%X, constants.%Z) [concrete = constants.%tuple.type.as.A.impl.F.specific_fn.417]
  1030. // CHECK:STDOUT: %.loc24_39.1: ref %tuple.type.415 = temporary_storage
  1031. // CHECK:STDOUT: %.loc24_38.2: ref %Z = temporary_storage
  1032. // CHECK:STDOUT: %.loc24_38.3: init %Z = class_init (), %.loc24_38.2 [concrete = constants.%Z.val]
  1033. // CHECK:STDOUT: %.loc24_38.4: ref %Z = temporary %.loc24_38.2, %.loc24_38.3
  1034. // CHECK:STDOUT: %.loc24_38.5: ref %Z = converted %.loc24_38.1, %.loc24_38.4
  1035. // CHECK:STDOUT: %.loc24_38.6: %Z = bind_value %.loc24_38.5
  1036. // CHECK:STDOUT: %tuple.type.as.A.impl.F.call: init %tuple.type.415 = call %specific_fn(%.loc24_38.6) to %.loc24_39.1
  1037. // CHECK:STDOUT: %.loc24_39.2: ref %tuple.type.415 = temporary %.loc24_39.1, %tuple.type.as.A.impl.F.call
  1038. // CHECK:STDOUT: %facet_value.loc24_39: %type_where = facet_value constants.%tuple.type.415, () [concrete = constants.%facet_value.71a]
  1039. // CHECK:STDOUT: %.loc24_39.3: %type_where = converted constants.%tuple.type.415, %facet_value.loc24_39 [concrete = constants.%facet_value.71a]
  1040. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.bound.loc24_39: <bound method> = bound_method %.loc24_39.2, constants.%DestroyT.as_type.as.Destroy.impl.Op.f1a
  1041. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.specific_fn.1: <specific function> = specific_function constants.%DestroyT.as_type.as.Destroy.impl.Op.f1a, @DestroyT.as_type.as.Destroy.impl.Op(constants.%facet_value.71a) [concrete = constants.%DestroyT.as_type.as.Destroy.impl.Op.specific_fn.578]
  1042. // CHECK:STDOUT: %bound_method.loc24_39: <bound method> = bound_method %.loc24_39.2, %DestroyT.as_type.as.Destroy.impl.Op.specific_fn.1
  1043. // CHECK:STDOUT: %addr.loc24_39: %ptr.ad9 = addr_of %.loc24_39.2
  1044. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.call.loc24_39: init %empty_tuple.type = call %bound_method.loc24_39(%addr.loc24_39)
  1045. // CHECK:STDOUT: %facet_value.loc24_38: %type_where = facet_value constants.%Z, () [concrete = constants.%facet_value.4e3]
  1046. // CHECK:STDOUT: %.loc24_38.7: %type_where = converted constants.%Z, %facet_value.loc24_38 [concrete = constants.%facet_value.4e3]
  1047. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.bound.loc24_38: <bound method> = bound_method %.loc24_38.4, constants.%DestroyT.as_type.as.Destroy.impl.Op.dd5
  1048. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.specific_fn.2: <specific function> = specific_function constants.%DestroyT.as_type.as.Destroy.impl.Op.dd5, @DestroyT.as_type.as.Destroy.impl.Op(constants.%facet_value.4e3) [concrete = constants.%DestroyT.as_type.as.Destroy.impl.Op.specific_fn.e7d]
  1049. // CHECK:STDOUT: %bound_method.loc24_38: <bound method> = bound_method %.loc24_38.4, %DestroyT.as_type.as.Destroy.impl.Op.specific_fn.2
  1050. // CHECK:STDOUT: %addr.loc24_38: %ptr.fb6 = addr_of %.loc24_38.4
  1051. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.call.loc24_38: init %empty_tuple.type = call %bound_method.loc24_38(%addr.loc24_38)
  1052. // CHECK:STDOUT: return
  1053. // CHECK:STDOUT: }
  1054. // CHECK:STDOUT:
  1055. // CHECK:STDOUT: generic fn @CallGeneric(%T.loc27_16.2: %A.type.0a4) {
  1056. // CHECK:STDOUT: %T.loc27_16.1: %A.type.0a4 = bind_symbolic_name T, 0 [symbolic = %T.loc27_16.1 (constants.%T.7bf)]
  1057. // CHECK:STDOUT:
  1058. // CHECK:STDOUT: !definition:
  1059. // CHECK:STDOUT: %T.as_type.loc28_4.2: type = facet_access_type %T.loc27_16.1 [symbolic = %T.as_type.loc28_4.2 (constants.%T.as_type)]
  1060. // CHECK:STDOUT: %A.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc27_16.1, @A, @A(constants.%X) [symbolic = %A.lookup_impl_witness (constants.%A.lookup_impl_witness)]
  1061. // CHECK:STDOUT: %.loc28_4.3: type = fn_type_with_self_type constants.%A.F.type.13d, %T.loc27_16.1 [symbolic = %.loc28_4.3 (constants.%.0c6)]
  1062. // CHECK:STDOUT: %impl.elem0.loc28_4.2: @CallGeneric.%.loc28_4.3 (%.0c6) = impl_witness_access %A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_4.2 (constants.%impl.elem0)]
  1063. // CHECK:STDOUT: %specific_impl_fn.loc28_4.2: <specific function> = specific_impl_function %impl.elem0.loc28_4.2, @A.F(constants.%X, %T.loc27_16.1, constants.%Z) [symbolic = %specific_impl_fn.loc28_4.2 (constants.%specific_impl_fn)]
  1064. // CHECK:STDOUT: %tuple.type: type = tuple_type (constants.%X, %T.as_type.loc28_4.2, constants.%Z) [symbolic = %tuple.type (constants.%tuple.type.780)]
  1065. // CHECK:STDOUT: %require_complete.loc28_12.1: <witness> = require_complete_type %tuple.type [symbolic = %require_complete.loc28_12.1 (constants.%require_complete.4ef)]
  1066. // CHECK:STDOUT: %facet_value.loc28_12.2: %type_where = facet_value %tuple.type, () [symbolic = %facet_value.loc28_12.2 (constants.%facet_value.52b)]
  1067. // CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness imports.%Destroy.impl_witness_table, @DestroyT.as_type.as.Destroy.impl(%facet_value.loc28_12.2) [symbolic = %Destroy.impl_witness (constants.%Destroy.impl_witness.aa0)]
  1068. // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %tuple.type, (%Destroy.impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.324)]
  1069. // CHECK:STDOUT: %.loc28_12.5: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc28_12.5 (constants.%.a30)]
  1070. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.type: type = fn_type @DestroyT.as_type.as.Destroy.impl.Op, @DestroyT.as_type.as.Destroy.impl(%facet_value.loc28_12.2) [symbolic = %DestroyT.as_type.as.Destroy.impl.Op.type (constants.%DestroyT.as_type.as.Destroy.impl.Op.type.7cc)]
  1071. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op: @CallGeneric.%DestroyT.as_type.as.Destroy.impl.Op.type (%DestroyT.as_type.as.Destroy.impl.Op.type.7cc) = struct_value () [symbolic = %DestroyT.as_type.as.Destroy.impl.Op (constants.%DestroyT.as_type.as.Destroy.impl.Op.24b)]
  1072. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.specific_fn.loc28: <specific function> = specific_function %DestroyT.as_type.as.Destroy.impl.Op, @DestroyT.as_type.as.Destroy.impl.Op(%facet_value.loc28_12.2) [symbolic = %DestroyT.as_type.as.Destroy.impl.Op.specific_fn.loc28 (constants.%DestroyT.as_type.as.Destroy.impl.Op.specific_fn.2bf)]
  1073. // CHECK:STDOUT: %ptr: type = ptr_type %tuple.type [symbolic = %ptr (constants.%ptr.563)]
  1074. // CHECK:STDOUT: %require_complete.loc28_12.2: <witness> = require_complete_type %ptr [symbolic = %require_complete.loc28_12.2 (constants.%require_complete.147)]
  1075. // CHECK:STDOUT:
  1076. // CHECK:STDOUT: fn() {
  1077. // CHECK:STDOUT: !entry:
  1078. // CHECK:STDOUT: %T.ref: %A.type.0a4 = name_ref T, %T.loc27_16.2 [symbolic = %T.loc27_16.1 (constants.%T.7bf)]
  1079. // CHECK:STDOUT: %.loc28_4.1: %A.assoc_type.296 = specific_constant @A.%assoc0.loc6_39.1, @A(constants.%X) [concrete = constants.%assoc0.5f6]
  1080. // CHECK:STDOUT: %F.ref: %A.assoc_type.296 = name_ref F, %.loc28_4.1 [concrete = constants.%assoc0.5f6]
  1081. // CHECK:STDOUT: %T.as_type.loc28_4.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc28_4.2 (constants.%T.as_type)]
  1082. // CHECK:STDOUT: %.loc28_4.2: type = converted %T.ref, %T.as_type.loc28_4.1 [symbolic = %T.as_type.loc28_4.2 (constants.%T.as_type)]
  1083. // CHECK:STDOUT: %impl.elem0.loc28_4.1: @CallGeneric.%.loc28_4.3 (%.0c6) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_4.2 (constants.%impl.elem0)]
  1084. // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z]
  1085. // CHECK:STDOUT: %.loc28_11.1: %empty_struct_type = struct_literal ()
  1086. // CHECK:STDOUT: %specific_impl_fn.loc28_4.1: <specific function> = specific_impl_function %impl.elem0.loc28_4.1, @A.F(constants.%X, constants.%T.7bf, constants.%Z) [symbolic = %specific_impl_fn.loc28_4.2 (constants.%specific_impl_fn)]
  1087. // CHECK:STDOUT: %.loc28_12.1: ref @CallGeneric.%tuple.type (%tuple.type.780) = temporary_storage
  1088. // CHECK:STDOUT: %.loc28_11.2: ref %Z = temporary_storage
  1089. // CHECK:STDOUT: %.loc28_11.3: init %Z = class_init (), %.loc28_11.2 [concrete = constants.%Z.val]
  1090. // CHECK:STDOUT: %.loc28_11.4: ref %Z = temporary %.loc28_11.2, %.loc28_11.3
  1091. // CHECK:STDOUT: %.loc28_11.5: ref %Z = converted %.loc28_11.1, %.loc28_11.4
  1092. // CHECK:STDOUT: %.loc28_11.6: %Z = bind_value %.loc28_11.5
  1093. // CHECK:STDOUT: %.loc28_12.2: init @CallGeneric.%tuple.type (%tuple.type.780) = call %specific_impl_fn.loc28_4.1(%.loc28_11.6) to %.loc28_12.1
  1094. // CHECK:STDOUT: %.loc28_12.3: ref @CallGeneric.%tuple.type (%tuple.type.780) = temporary %.loc28_12.1, %.loc28_12.2
  1095. // CHECK:STDOUT: %facet_value.loc28_12.1: %type_where = facet_value constants.%tuple.type.780, () [symbolic = %facet_value.loc28_12.2 (constants.%facet_value.52b)]
  1096. // CHECK:STDOUT: %.loc28_12.4: %type_where = converted constants.%tuple.type.780, %facet_value.loc28_12.1 [symbolic = %facet_value.loc28_12.2 (constants.%facet_value.52b)]
  1097. // CHECK:STDOUT: %impl.elem0.loc28_12: @CallGeneric.%.loc28_12.5 (%.a30) = impl_witness_access constants.%Destroy.impl_witness.aa0, element0 [symbolic = %DestroyT.as_type.as.Destroy.impl.Op (constants.%DestroyT.as_type.as.Destroy.impl.Op.24b)]
  1098. // CHECK:STDOUT: %bound_method.loc28_12.1: <bound method> = bound_method %.loc28_12.3, %impl.elem0.loc28_12
  1099. // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0.loc28_12, @DestroyT.as_type.as.Destroy.impl.Op(constants.%facet_value.52b) [symbolic = %DestroyT.as_type.as.Destroy.impl.Op.specific_fn.loc28 (constants.%DestroyT.as_type.as.Destroy.impl.Op.specific_fn.2bf)]
  1100. // CHECK:STDOUT: %bound_method.loc28_12.2: <bound method> = bound_method %.loc28_12.3, %specific_fn
  1101. // CHECK:STDOUT: %addr.loc28_12: @CallGeneric.%ptr (%ptr.563) = addr_of %.loc28_12.3
  1102. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.call.loc28_12: init %empty_tuple.type = call %bound_method.loc28_12.2(%addr.loc28_12)
  1103. // CHECK:STDOUT: %facet_value.loc28_11: %type_where = facet_value constants.%Z, () [concrete = constants.%facet_value.4e3]
  1104. // CHECK:STDOUT: %.loc28_11.7: %type_where = converted constants.%Z, %facet_value.loc28_11 [concrete = constants.%facet_value.4e3]
  1105. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.bound: <bound method> = bound_method %.loc28_11.4, constants.%DestroyT.as_type.as.Destroy.impl.Op.dd5
  1106. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.specific_fn.1: <specific function> = specific_function constants.%DestroyT.as_type.as.Destroy.impl.Op.dd5, @DestroyT.as_type.as.Destroy.impl.Op(constants.%facet_value.4e3) [concrete = constants.%DestroyT.as_type.as.Destroy.impl.Op.specific_fn.e7d]
  1107. // CHECK:STDOUT: %bound_method.loc28_11: <bound method> = bound_method %.loc28_11.4, %DestroyT.as_type.as.Destroy.impl.Op.specific_fn.1
  1108. // CHECK:STDOUT: %addr.loc28_11: %ptr.fb6 = addr_of %.loc28_11.4
  1109. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.call.loc28_11: init %empty_tuple.type = call %bound_method.loc28_11(%addr.loc28_11)
  1110. // CHECK:STDOUT: return
  1111. // CHECK:STDOUT: }
  1112. // CHECK:STDOUT: }
  1113. // CHECK:STDOUT:
  1114. // CHECK:STDOUT: fn @CallIndirect() {
  1115. // CHECK:STDOUT: !entry:
  1116. // CHECK:STDOUT: %CallGeneric.ref: %CallGeneric.type = name_ref CallGeneric, file.%CallGeneric.decl [concrete = constants.%CallGeneric]
  1117. // CHECK:STDOUT: %Y1.ref: type = name_ref Y1, file.%Y1.decl [concrete = constants.%Y1]
  1118. // CHECK:STDOUT: %Y2.ref: type = name_ref Y2, file.%Y2.decl [concrete = constants.%Y2]
  1119. // CHECK:STDOUT: %.loc33_22: %tuple.type.24b = tuple_literal (%Y1.ref, %Y2.ref)
  1120. // CHECK:STDOUT: %.loc33_24: type = converted %.loc33_22, constants.%tuple.type.a46 [concrete = constants.%tuple.type.a46]
  1121. // CHECK:STDOUT: %A.facet: %A.type.0a4 = facet_value %.loc33_24, (constants.%A.impl_witness.c8b) [concrete = constants.%A.facet.cdd]
  1122. // CHECK:STDOUT: %.loc33_31: %A.type.0a4 = converted %.loc33_24, %A.facet [concrete = constants.%A.facet.cdd]
  1123. // CHECK:STDOUT: %CallGeneric.specific_fn: <specific function> = specific_function %CallGeneric.ref, @CallGeneric(constants.%A.facet.cdd) [concrete = constants.%CallGeneric.specific_fn]
  1124. // CHECK:STDOUT: %CallGeneric.call: init %empty_tuple.type = call %CallGeneric.specific_fn()
  1125. // CHECK:STDOUT: return
  1126. // CHECK:STDOUT: }
  1127. // CHECK:STDOUT:
  1128. // CHECK:STDOUT: specific @A(constants.%T.8b3) {
  1129. // CHECK:STDOUT: %T.loc5_13.1 => constants.%T.8b3
  1130. // CHECK:STDOUT: }
  1131. // CHECK:STDOUT:
  1132. // CHECK:STDOUT: specific @A.F(constants.%T.8b3, constants.%Self.c6b, constants.%U.2cb) {
  1133. // CHECK:STDOUT: %U.loc6_8.1 => constants.%U.2cb
  1134. // CHECK:STDOUT: %pattern_type.loc6_18 => constants.%pattern_type.20f
  1135. // CHECK:STDOUT: %T => constants.%T.8b3
  1136. // CHECK:STDOUT: %A.type => constants.%A.type.d88
  1137. // CHECK:STDOUT: %Self => constants.%Self.c6b
  1138. // CHECK:STDOUT: %tuple.type.loc6_38.1 => constants.%tuple.type.098
  1139. // CHECK:STDOUT: %Self.as_type.loc6_38.1 => constants.%Self.as_type.707
  1140. // CHECK:STDOUT: %tuple.type.loc6_38.2 => constants.%tuple.type.325
  1141. // CHECK:STDOUT: %pattern_type.loc6_24 => constants.%pattern_type.491
  1142. // CHECK:STDOUT: }
  1143. // CHECK:STDOUT:
  1144. // CHECK:STDOUT: specific @A(constants.%W) {
  1145. // CHECK:STDOUT: %T.loc5_13.1 => constants.%W
  1146. // CHECK:STDOUT:
  1147. // CHECK:STDOUT: !definition:
  1148. // CHECK:STDOUT: %A.type => constants.%A.type.ff4
  1149. // CHECK:STDOUT: %Self.2 => constants.%Self.6c5
  1150. // CHECK:STDOUT: %A.F.type => constants.%A.F.type.904
  1151. // CHECK:STDOUT: %A.F => constants.%A.F.1ee
  1152. // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.b05
  1153. // CHECK:STDOUT: %assoc0.loc6_39.2 => constants.%assoc0.c82
  1154. // CHECK:STDOUT: }
  1155. // CHECK:STDOUT:
  1156. // CHECK:STDOUT: specific @tuple.type.as.A.impl(constants.%V1, constants.%V2, constants.%W) {
  1157. // CHECK:STDOUT: %V1.loc14_14.1 => constants.%V1
  1158. // CHECK:STDOUT: %V2.loc14_25.1 => constants.%V2
  1159. // CHECK:STDOUT: %W.loc14_36.1 => constants.%W
  1160. // CHECK:STDOUT: %tuple.type => constants.%tuple.type.30b
  1161. // CHECK:STDOUT: %A.type.loc14_61.1 => constants.%A.type.ff4
  1162. // CHECK:STDOUT: %require_complete => constants.%require_complete.651
  1163. // CHECK:STDOUT: %A.impl_witness => constants.%A.impl_witness.4bf
  1164. // CHECK:STDOUT:
  1165. // CHECK:STDOUT: !definition:
  1166. // CHECK:STDOUT: %tuple.type.as.A.impl.F.type => constants.%tuple.type.as.A.impl.F.type.ce1
  1167. // CHECK:STDOUT: %tuple.type.as.A.impl.F => constants.%tuple.type.as.A.impl.F.cb7
  1168. // CHECK:STDOUT: }
  1169. // CHECK:STDOUT:
  1170. // CHECK:STDOUT: specific @tuple.type.as.A.impl.F(constants.%V1, constants.%V2, constants.%W, constants.%U.753) {
  1171. // CHECK:STDOUT: %U.loc17_8.1 => constants.%U.753
  1172. // CHECK:STDOUT: %pattern_type.loc17_18 => constants.%pattern_type.549
  1173. // CHECK:STDOUT: %W => constants.%W
  1174. // CHECK:STDOUT: %V1 => constants.%V1
  1175. // CHECK:STDOUT: %V2 => constants.%V2
  1176. // CHECK:STDOUT: %tuple.type.loc17_42.1 => constants.%tuple.type.30b
  1177. // CHECK:STDOUT: %tuple.type.loc17_42.2 => constants.%tuple.type.8ae
  1178. // CHECK:STDOUT: %pattern_type.loc17_24 => constants.%pattern_type.d4a
  1179. // CHECK:STDOUT:
  1180. // CHECK:STDOUT: !definition:
  1181. // CHECK:STDOUT: %require_complete.loc17_24 => constants.%require_complete.d4d
  1182. // CHECK:STDOUT: %require_complete.loc17_19 => constants.%require_complete.ed4
  1183. // CHECK:STDOUT: %tuple.type.as.A.impl.F.type => constants.%tuple.type.as.A.impl.F.type.ce1
  1184. // CHECK:STDOUT: %tuple.type.as.A.impl.F => constants.%tuple.type.as.A.impl.F.cb7
  1185. // CHECK:STDOUT: %tuple.type.as.A.impl.F.specific_fn.loc18_12.2 => constants.%tuple.type.as.A.impl.F.specific_fn.0dd
  1186. // CHECK:STDOUT: }
  1187. // CHECK:STDOUT:
  1188. // CHECK:STDOUT: specific @A.F(constants.%W, constants.%A.facet.452, constants.%U.753) {
  1189. // CHECK:STDOUT: %U.loc6_8.1 => constants.%U.753
  1190. // CHECK:STDOUT: %pattern_type.loc6_18 => constants.%pattern_type.549
  1191. // CHECK:STDOUT: %T => constants.%W
  1192. // CHECK:STDOUT: %A.type => constants.%A.type.ff4
  1193. // CHECK:STDOUT: %Self => constants.%A.facet.452
  1194. // CHECK:STDOUT: %tuple.type.loc6_38.1 => constants.%tuple.type.42f
  1195. // CHECK:STDOUT: %Self.as_type.loc6_38.1 => constants.%tuple.type.30b
  1196. // CHECK:STDOUT: %tuple.type.loc6_38.2 => constants.%tuple.type.8ae
  1197. // CHECK:STDOUT: %pattern_type.loc6_24 => constants.%pattern_type.d4a
  1198. // CHECK:STDOUT: }
  1199. // CHECK:STDOUT:
  1200. // CHECK:STDOUT: specific @A(constants.%X) {
  1201. // CHECK:STDOUT: %T.loc5_13.1 => constants.%X
  1202. // CHECK:STDOUT:
  1203. // CHECK:STDOUT: !definition:
  1204. // CHECK:STDOUT: %A.type => constants.%A.type.0a4
  1205. // CHECK:STDOUT: %Self.2 => constants.%Self.08e
  1206. // CHECK:STDOUT: %A.F.type => constants.%A.F.type.13d
  1207. // CHECK:STDOUT: %A.F => constants.%A.F.d83
  1208. // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.296
  1209. // CHECK:STDOUT: %assoc0.loc6_39.2 => constants.%assoc0.5f6
  1210. // CHECK:STDOUT: }
  1211. // CHECK:STDOUT:
  1212. // CHECK:STDOUT: specific @tuple.type.as.A.impl(constants.%Y1, constants.%Y2, constants.%X) {
  1213. // CHECK:STDOUT: %V1.loc14_14.1 => constants.%Y1
  1214. // CHECK:STDOUT: %V2.loc14_25.1 => constants.%Y2
  1215. // CHECK:STDOUT: %W.loc14_36.1 => constants.%X
  1216. // CHECK:STDOUT: %tuple.type => constants.%tuple.type.a46
  1217. // CHECK:STDOUT: %A.type.loc14_61.1 => constants.%A.type.0a4
  1218. // CHECK:STDOUT: %require_complete => constants.%complete_type.e2d
  1219. // CHECK:STDOUT: %A.impl_witness => constants.%A.impl_witness.c8b
  1220. // CHECK:STDOUT:
  1221. // CHECK:STDOUT: !definition:
  1222. // CHECK:STDOUT: %tuple.type.as.A.impl.F.type => constants.%tuple.type.as.A.impl.F.type.bdb
  1223. // CHECK:STDOUT: %tuple.type.as.A.impl.F => constants.%tuple.type.as.A.impl.F.e39
  1224. // CHECK:STDOUT: }
  1225. // CHECK:STDOUT:
  1226. // CHECK:STDOUT: specific @tuple.type.as.A.impl.F(constants.%Y1, constants.%Y2, constants.%X, constants.%Z) {
  1227. // CHECK:STDOUT: %U.loc17_8.1 => constants.%Z
  1228. // CHECK:STDOUT: %pattern_type.loc17_18 => constants.%pattern_type.8f9
  1229. // CHECK:STDOUT: %W => constants.%X
  1230. // CHECK:STDOUT: %V1 => constants.%Y1
  1231. // CHECK:STDOUT: %V2 => constants.%Y2
  1232. // CHECK:STDOUT: %tuple.type.loc17_42.1 => constants.%tuple.type.a46
  1233. // CHECK:STDOUT: %tuple.type.loc17_42.2 => constants.%tuple.type.415
  1234. // CHECK:STDOUT: %pattern_type.loc17_24 => constants.%pattern_type.0b2
  1235. // CHECK:STDOUT:
  1236. // CHECK:STDOUT: !definition:
  1237. // CHECK:STDOUT: %require_complete.loc17_24 => constants.%complete_type.aa8
  1238. // CHECK:STDOUT: %require_complete.loc17_19 => constants.%complete_type.357
  1239. // CHECK:STDOUT: %tuple.type.as.A.impl.F.type => constants.%tuple.type.as.A.impl.F.type.bdb
  1240. // CHECK:STDOUT: %tuple.type.as.A.impl.F => constants.%tuple.type.as.A.impl.F.e39
  1241. // CHECK:STDOUT: %tuple.type.as.A.impl.F.specific_fn.loc18_12.2 => constants.%tuple.type.as.A.impl.F.specific_fn.417
  1242. // CHECK:STDOUT: }
  1243. // CHECK:STDOUT:
  1244. // CHECK:STDOUT: specific @CallGeneric(constants.%T.7bf) {
  1245. // CHECK:STDOUT: %T.loc27_16.1 => constants.%T.7bf
  1246. // CHECK:STDOUT: }
  1247. // CHECK:STDOUT:
  1248. // CHECK:STDOUT: specific @A.F(constants.%X, constants.%T.7bf, constants.%Z) {
  1249. // CHECK:STDOUT: %U.loc6_8.1 => constants.%Z
  1250. // CHECK:STDOUT: %pattern_type.loc6_18 => constants.%pattern_type.8f9
  1251. // CHECK:STDOUT: %T => constants.%X
  1252. // CHECK:STDOUT: %A.type => constants.%A.type.0a4
  1253. // CHECK:STDOUT: %Self => constants.%T.7bf
  1254. // CHECK:STDOUT: %tuple.type.loc6_38.1 => constants.%tuple.type.5a1
  1255. // CHECK:STDOUT: %Self.as_type.loc6_38.1 => constants.%T.as_type
  1256. // CHECK:STDOUT: %tuple.type.loc6_38.2 => constants.%tuple.type.780
  1257. // CHECK:STDOUT: %pattern_type.loc6_24 => constants.%pattern_type.f87
  1258. // CHECK:STDOUT: }
  1259. // CHECK:STDOUT:
  1260. // CHECK:STDOUT: specific @CallGeneric(constants.%A.facet.cdd) {
  1261. // CHECK:STDOUT: %T.loc27_16.1 => constants.%A.facet.cdd
  1262. // CHECK:STDOUT:
  1263. // CHECK:STDOUT: !definition:
  1264. // CHECK:STDOUT: %T.as_type.loc28_4.2 => constants.%tuple.type.a46
  1265. // CHECK:STDOUT: %A.lookup_impl_witness => constants.%A.impl_witness.c8b
  1266. // CHECK:STDOUT: %.loc28_4.3 => constants.%.9b3
  1267. // CHECK:STDOUT: %impl.elem0.loc28_4.2 => constants.%tuple.type.as.A.impl.F.e39
  1268. // CHECK:STDOUT: %specific_impl_fn.loc28_4.2 => constants.%tuple.type.as.A.impl.F.specific_fn.417
  1269. // CHECK:STDOUT: %tuple.type => constants.%tuple.type.415
  1270. // CHECK:STDOUT: %require_complete.loc28_12.1 => constants.%complete_type.aa8
  1271. // CHECK:STDOUT: %facet_value.loc28_12.2 => constants.%facet_value.71a
  1272. // CHECK:STDOUT: %Destroy.impl_witness => constants.%Destroy.impl_witness.37a
  1273. // CHECK:STDOUT: %Destroy.facet => constants.%Destroy.facet.684
  1274. // CHECK:STDOUT: %.loc28_12.5 => constants.%.27f
  1275. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.type => constants.%DestroyT.as_type.as.Destroy.impl.Op.type.d92
  1276. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op => constants.%DestroyT.as_type.as.Destroy.impl.Op.f1a
  1277. // CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.specific_fn.loc28 => constants.%DestroyT.as_type.as.Destroy.impl.Op.specific_fn.578
  1278. // CHECK:STDOUT: %ptr => constants.%ptr.ad9
  1279. // CHECK:STDOUT: %require_complete.loc28_12.2 => constants.%complete_type.e23
  1280. // CHECK:STDOUT: }
  1281. // CHECK:STDOUT:
  1282. // CHECK:STDOUT: specific @A.F(constants.%X, constants.%A.facet.cdd, constants.%Z) {
  1283. // CHECK:STDOUT: %U.loc6_8.1 => constants.%Z
  1284. // CHECK:STDOUT: %pattern_type.loc6_18 => constants.%pattern_type.8f9
  1285. // CHECK:STDOUT: %T => constants.%X
  1286. // CHECK:STDOUT: %A.type => constants.%A.type.0a4
  1287. // CHECK:STDOUT: %Self => constants.%A.facet.cdd
  1288. // CHECK:STDOUT: %tuple.type.loc6_38.1 => constants.%tuple.type.5a1
  1289. // CHECK:STDOUT: %Self.as_type.loc6_38.1 => constants.%tuple.type.a46
  1290. // CHECK:STDOUT: %tuple.type.loc6_38.2 => constants.%tuple.type.415
  1291. // CHECK:STDOUT: %pattern_type.loc6_24 => constants.%pattern_type.0b2
  1292. // CHECK:STDOUT: }
  1293. // CHECK:STDOUT: