generic_method.carbon 90 KB

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