import.carbon 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736
  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. // AUTOUPDATE
  6. // TIP: To test this file alone, run:
  7. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/pointer/import.carbon
  8. // TIP: To dump output, run:
  9. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/pointer/import.carbon
  10. // --- implicit.carbon
  11. package Implicit;
  12. var a_orig: i32 = 0;
  13. var a_ref: i32* = &a_orig;
  14. // --- implicit.impl.carbon
  15. impl package Implicit;
  16. var a: i32* = a_ref;
  17. // CHECK:STDOUT: --- implicit.carbon
  18. // CHECK:STDOUT:
  19. // CHECK:STDOUT: constants {
  20. // CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template]
  21. // CHECK:STDOUT: %Int.type: type = fn_type @Int [template]
  22. // CHECK:STDOUT: %Int: %Int.type = struct_value () [template]
  23. // CHECK:STDOUT: %i32: type = int_type signed, %.1 [template]
  24. // CHECK:STDOUT: %.2: Core.IntLiteral = int_value 0 [template]
  25. // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template]
  26. // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template]
  27. // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template]
  28. // CHECK:STDOUT: %.22: <witness> = interface_witness (%Convert.14) [template]
  29. // CHECK:STDOUT: %.23: <bound method> = bound_method %.2, %Convert.14 [template]
  30. // CHECK:STDOUT: %.24: <specific function> = specific_function %.23, @Convert.2(%.1) [template]
  31. // CHECK:STDOUT: %.25: %i32 = int_value 0 [template]
  32. // CHECK:STDOUT: %.26: type = ptr_type %i32 [template]
  33. // CHECK:STDOUT: }
  34. // CHECK:STDOUT:
  35. // CHECK:STDOUT: imports {
  36. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
  37. // CHECK:STDOUT: .Int = %import_ref.1
  38. // CHECK:STDOUT: .ImplicitAs = %import_ref.2
  39. // CHECK:STDOUT: import Core//prelude
  40. // CHECK:STDOUT: import Core//prelude/...
  41. // CHECK:STDOUT: }
  42. // CHECK:STDOUT: }
  43. // CHECK:STDOUT:
  44. // CHECK:STDOUT: file {
  45. // CHECK:STDOUT: package: <namespace> = namespace [template] {
  46. // CHECK:STDOUT: .Core = imports.%Core
  47. // CHECK:STDOUT: .a_orig = %a_orig
  48. // CHECK:STDOUT: .a_ref = %a_ref
  49. // CHECK:STDOUT: }
  50. // CHECK:STDOUT: %Core.import = import Core
  51. // CHECK:STDOUT: %.loc4_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1]
  52. // CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%.loc4_13.1) [template = constants.%i32]
  53. // CHECK:STDOUT: %.loc4_13.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32]
  54. // CHECK:STDOUT: %.loc4_13.3: type = converted %int.make_type_signed.loc4, %.loc4_13.2 [template = constants.%i32]
  55. // CHECK:STDOUT: %a_orig.var: ref %i32 = var a_orig
  56. // CHECK:STDOUT: %a_orig: ref %i32 = bind_name a_orig, %a_orig.var
  57. // CHECK:STDOUT: %.loc5_12: Core.IntLiteral = int_value 32 [template = constants.%.1]
  58. // CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_12) [template = constants.%i32]
  59. // CHECK:STDOUT: %.loc5_15.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32]
  60. // CHECK:STDOUT: %.loc5_15.2: type = converted %int.make_type_signed.loc5, %.loc5_15.1 [template = constants.%i32]
  61. // CHECK:STDOUT: %.loc5_15.3: type = ptr_type %i32 [template = constants.%.26]
  62. // CHECK:STDOUT: %a_ref.var: ref %.26 = var a_ref
  63. // CHECK:STDOUT: %a_ref: ref %.26 = bind_name a_ref, %a_ref.var
  64. // CHECK:STDOUT: }
  65. // CHECK:STDOUT:
  66. // CHECK:STDOUT: fn @__global_init() {
  67. // CHECK:STDOUT: !entry:
  68. // CHECK:STDOUT: %.loc4_19: Core.IntLiteral = int_value 0 [template = constants.%.2]
  69. // CHECK:STDOUT: %.loc4_20.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14]
  70. // CHECK:STDOUT: %.loc4_20.2: <bound method> = bound_method %.loc4_19, %.loc4_20.1 [template = constants.%.23]
  71. // CHECK:STDOUT: %.loc4_20.3: <specific function> = specific_function %.loc4_20.2, @Convert.2(constants.%.1) [template = constants.%.24]
  72. // CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc4_20.3(%.loc4_19) [template = constants.%.25]
  73. // CHECK:STDOUT: %.loc4_20.4: init %i32 = converted %.loc4_19, %int.convert_checked [template = constants.%.25]
  74. // CHECK:STDOUT: assign file.%a_orig.var, %.loc4_20.4
  75. // CHECK:STDOUT: %a_orig.ref: ref %i32 = name_ref a_orig, file.%a_orig
  76. // CHECK:STDOUT: %.loc5: %.26 = addr_of %a_orig.ref
  77. // CHECK:STDOUT: assign file.%a_ref.var, %.loc5
  78. // CHECK:STDOUT: return
  79. // CHECK:STDOUT: }
  80. // CHECK:STDOUT:
  81. // CHECK:STDOUT: --- implicit.impl.carbon
  82. // CHECK:STDOUT:
  83. // CHECK:STDOUT: constants {
  84. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic]
  85. // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic]
  86. // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic]
  87. // CHECK:STDOUT: %ImplicitAs.type.2: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic]
  88. // CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic]
  89. // CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic]
  90. // CHECK:STDOUT: %ImplicitAs.type.3: type = facet_type <@ImplicitAs, @ImplicitAs(%iN)> [symbolic]
  91. // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic]
  92. // CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic]
  93. // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic]
  94. // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic]
  95. // CHECK:STDOUT: %.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic]
  96. // CHECK:STDOUT: %.2: %.1 = assoc_entity element0, imports.%import_ref.9 [symbolic]
  97. // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2, @impl.1(%N) [symbolic]
  98. // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [symbolic]
  99. // CHECK:STDOUT: %.3: <witness> = interface_witness (%Convert.2) [symbolic]
  100. // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic]
  101. // CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic]
  102. // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.3, @impl.2(%N) [symbolic]
  103. // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [symbolic]
  104. // CHECK:STDOUT: %.4: <witness> = interface_witness (%Convert.3) [symbolic]
  105. // CHECK:STDOUT: %ImplicitAs.type.5: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template]
  106. // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.4, @impl.3(%N) [symbolic]
  107. // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [symbolic]
  108. // CHECK:STDOUT: %.5: <witness> = interface_witness (%Convert.4) [symbolic]
  109. // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template]
  110. // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template]
  111. // CHECK:STDOUT: %.6: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template]
  112. // CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.16 [template]
  113. // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.5, @impl.4(%N) [symbolic]
  114. // CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [symbolic]
  115. // CHECK:STDOUT: %.8: <witness> = interface_witness (%Convert.6) [symbolic]
  116. // CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%Dest)> [symbolic]
  117. // CHECK:STDOUT: %Self.3: @As.%As.type (%As.type.2) = bind_symbolic_name Self, 1 [symbolic]
  118. // CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%iN)> [symbolic]
  119. // CHECK:STDOUT: %Self.4: %As.type.2 = bind_symbolic_name Self, 1 [symbolic]
  120. // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.6, @As(%Dest) [symbolic]
  121. // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [symbolic]
  122. // CHECK:STDOUT: %.9: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic]
  123. // CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.26 [symbolic]
  124. // CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.7, @impl.5(%N) [symbolic]
  125. // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [symbolic]
  126. // CHECK:STDOUT: %.11: <witness> = interface_witness (%Convert.8) [symbolic]
  127. // CHECK:STDOUT: %As.type.4: type = facet_type <@As, @As(%uN)> [symbolic]
  128. // CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.8, @impl.6(%N) [symbolic]
  129. // CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [symbolic]
  130. // CHECK:STDOUT: %.12: <witness> = interface_witness (%Convert.9) [symbolic]
  131. // CHECK:STDOUT: %As.type.5: type = facet_type <@As, @As(Core.IntLiteral)> [template]
  132. // CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.9, @impl.7(%N) [symbolic]
  133. // CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [symbolic]
  134. // CHECK:STDOUT: %.13: <witness> = interface_witness (%Convert.10) [symbolic]
  135. // CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.6, @As(Core.IntLiteral) [template]
  136. // CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template]
  137. // CHECK:STDOUT: %.14: type = assoc_entity_type %As.type.5, %Convert.type.11 [template]
  138. // CHECK:STDOUT: %.15: %.14 = assoc_entity element0, imports.%import_ref.33 [template]
  139. // CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.10, @impl.8(%N) [symbolic]
  140. // CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [symbolic]
  141. // CHECK:STDOUT: %.16: <witness> = interface_witness (%Convert.12) [symbolic]
  142. // CHECK:STDOUT: %.17: Core.IntLiteral = int_value 32 [template]
  143. // CHECK:STDOUT: %Int.type: type = fn_type @Int [template]
  144. // CHECK:STDOUT: %Int: %Int.type = struct_value () [template]
  145. // CHECK:STDOUT: %i32: type = int_type signed, %.17 [template]
  146. // CHECK:STDOUT: %.18: type = ptr_type %i32 [template]
  147. // CHECK:STDOUT: }
  148. // CHECK:STDOUT:
  149. // CHECK:STDOUT: imports {
  150. // CHECK:STDOUT: %import_ref.1 = import_ref Implicit//default, inst+22, unloaded
  151. // CHECK:STDOUT: %import_ref.2: ref %.18 = import_ref Implicit//default, inst+368, loaded
  152. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
  153. // CHECK:STDOUT: .Int = %import_ref.37
  154. // CHECK:STDOUT: import Core//prelude
  155. // CHECK:STDOUT: import Core//prelude/...
  156. // CHECK:STDOUT: }
  157. // CHECK:STDOUT: %import_ref.3 = import_ref Implicit//default, inst+37, unloaded
  158. // CHECK:STDOUT: %import_ref.4 = import_ref Implicit//default, inst+38, unloaded
  159. // CHECK:STDOUT: %import_ref.5 = import_ref Implicit//default, inst+39, unloaded
  160. // CHECK:STDOUT: %import_ref.6: type = import_ref Implicit//default, inst+81, loaded [template = Core.IntLiteral]
  161. // CHECK:STDOUT: %import_ref.7: type = import_ref Implicit//default, inst+82, loaded [symbolic = @impl.1.%ImplicitAs.type (constants.%ImplicitAs.type.3)]
  162. // CHECK:STDOUT: %import_ref.8 = import_ref Implicit//default, inst+83, unloaded
  163. // CHECK:STDOUT: %import_ref.9 = import_ref Implicit//default, inst+54, unloaded
  164. // CHECK:STDOUT: %import_ref.10: type = import_ref Implicit//default, inst+111, loaded [template = Core.IntLiteral]
  165. // CHECK:STDOUT: %import_ref.11: type = import_ref Implicit//default, inst+112, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.4)]
  166. // CHECK:STDOUT: %import_ref.12 = import_ref Implicit//default, inst+113, unloaded
  167. // CHECK:STDOUT: %import_ref.13: type = import_ref Implicit//default, inst+140, loaded [symbolic = @impl.3.%iN (constants.%iN)]
  168. // CHECK:STDOUT: %import_ref.14: type = import_ref Implicit//default, inst+141, loaded [template = constants.%ImplicitAs.type.5]
  169. // CHECK:STDOUT: %import_ref.15 = import_ref Implicit//default, inst+142, unloaded
  170. // CHECK:STDOUT: %import_ref.17: type = import_ref Implicit//default, inst+172, loaded [symbolic = @impl.4.%uN (constants.%uN)]
  171. // CHECK:STDOUT: %import_ref.18: type = import_ref Implicit//default, inst+173, loaded [template = constants.%ImplicitAs.type.5]
  172. // CHECK:STDOUT: %import_ref.19 = import_ref Implicit//default, inst+174, unloaded
  173. // CHECK:STDOUT: %import_ref.20 = import_ref Implicit//default, inst+204, unloaded
  174. // CHECK:STDOUT: %import_ref.21 = import_ref Implicit//default, inst+205, unloaded
  175. // CHECK:STDOUT: %import_ref.22 = import_ref Implicit//default, inst+206, unloaded
  176. // CHECK:STDOUT: %import_ref.23: type = import_ref Implicit//default, inst+212, loaded [template = Core.IntLiteral]
  177. // CHECK:STDOUT: %import_ref.24: type = import_ref Implicit//default, inst+213, loaded [symbolic = @impl.5.%As.type (constants.%As.type.3)]
  178. // CHECK:STDOUT: %import_ref.25 = import_ref Implicit//default, inst+214, unloaded
  179. // CHECK:STDOUT: %import_ref.26 = import_ref Implicit//default, inst+229, unloaded
  180. // CHECK:STDOUT: %import_ref.27: type = import_ref Implicit//default, inst+266, loaded [template = Core.IntLiteral]
  181. // CHECK:STDOUT: %import_ref.28: type = import_ref Implicit//default, inst+267, loaded [symbolic = @impl.6.%As.type (constants.%As.type.4)]
  182. // CHECK:STDOUT: %import_ref.29 = import_ref Implicit//default, inst+268, unloaded
  183. // CHECK:STDOUT: %import_ref.30: type = import_ref Implicit//default, inst+295, loaded [symbolic = @impl.7.%iN (constants.%iN)]
  184. // CHECK:STDOUT: %import_ref.31: type = import_ref Implicit//default, inst+296, loaded [template = constants.%As.type.5]
  185. // CHECK:STDOUT: %import_ref.32 = import_ref Implicit//default, inst+297, unloaded
  186. // CHECK:STDOUT: %import_ref.34: type = import_ref Implicit//default, inst+327, loaded [symbolic = @impl.8.%uN (constants.%uN)]
  187. // CHECK:STDOUT: %import_ref.35: type = import_ref Implicit//default, inst+328, loaded [template = constants.%As.type.5]
  188. // CHECK:STDOUT: %import_ref.36 = import_ref Implicit//default, inst+329, unloaded
  189. // CHECK:STDOUT: }
  190. // CHECK:STDOUT:
  191. // CHECK:STDOUT: file {
  192. // CHECK:STDOUT: package: <namespace> = namespace [template] {
  193. // CHECK:STDOUT: .a_orig = imports.%import_ref.1
  194. // CHECK:STDOUT: .a_ref = imports.%import_ref.2
  195. // CHECK:STDOUT: .Core = imports.%Core
  196. // CHECK:STDOUT: .a = %a
  197. // CHECK:STDOUT: }
  198. // CHECK:STDOUT: %Implicit.import = import Implicit
  199. // CHECK:STDOUT: %default.import = import <invalid>
  200. // CHECK:STDOUT: %Core.import = import Core
  201. // CHECK:STDOUT: %.loc4_8: Core.IntLiteral = int_value 32 [template = constants.%.17]
  202. // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc4_8) [template = constants.%i32]
  203. // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32]
  204. // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed, %.loc4_11.1 [template = constants.%i32]
  205. // CHECK:STDOUT: %.loc4_11.3: type = ptr_type %i32 [template = constants.%.18]
  206. // CHECK:STDOUT: %a.var: ref %.18 = var a
  207. // CHECK:STDOUT: %a: ref %.18 = bind_name a, %a.var
  208. // CHECK:STDOUT: }
  209. // CHECK:STDOUT:
  210. // CHECK:STDOUT: generic interface @ImplicitAs(constants.%Dest: type) {
  211. // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
  212. // CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt (constants.%Dest.patt)]
  213. // CHECK:STDOUT:
  214. // CHECK:STDOUT: !definition:
  215. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)]
  216. // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)]
  217. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)]
  218. // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)]
  219. // CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.1)]
  220. // CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.1) = assoc_entity element0, imports.%import_ref.9 [symbolic = %.2 (constants.%.2)]
  221. // CHECK:STDOUT:
  222. // CHECK:STDOUT: interface {
  223. // CHECK:STDOUT: !members:
  224. // CHECK:STDOUT: .Self = imports.%import_ref.3
  225. // CHECK:STDOUT: .Convert = imports.%import_ref.4
  226. // CHECK:STDOUT: witness = (imports.%import_ref.5)
  227. // CHECK:STDOUT: }
  228. // CHECK:STDOUT: }
  229. // CHECK:STDOUT:
  230. // CHECK:STDOUT: generic interface @As(constants.%Dest: type) {
  231. // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
  232. // CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt (constants.%Dest.patt)]
  233. // CHECK:STDOUT:
  234. // CHECK:STDOUT: !definition:
  235. // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)]
  236. // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)]
  237. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.6, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.7)]
  238. // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.7) = struct_value () [symbolic = %Convert (constants.%Convert.7)]
  239. // CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %.1 (constants.%.9)]
  240. // CHECK:STDOUT: %.2: @As.%.1 (%.9) = assoc_entity element0, imports.%import_ref.26 [symbolic = %.2 (constants.%.10)]
  241. // CHECK:STDOUT:
  242. // CHECK:STDOUT: interface {
  243. // CHECK:STDOUT: !members:
  244. // CHECK:STDOUT: .Self = imports.%import_ref.20
  245. // CHECK:STDOUT: .Convert = imports.%import_ref.21
  246. // CHECK:STDOUT: witness = (imports.%import_ref.22)
  247. // CHECK:STDOUT: }
  248. // CHECK:STDOUT: }
  249. // CHECK:STDOUT:
  250. // CHECK:STDOUT: generic impl @impl.1(constants.%N: Core.IntLiteral) {
  251. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  252. // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
  253. // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
  254. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%iN)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.3)]
  255. // CHECK:STDOUT:
  256. // CHECK:STDOUT: !definition:
  257. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @impl.1(%N) [symbolic = %Convert.type (constants.%Convert.type.2)]
  258. // CHECK:STDOUT: %Convert: @impl.1.%Convert.type (%Convert.type.2) = struct_value () [symbolic = %Convert (constants.%Convert.2)]
  259. // CHECK:STDOUT: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.3)]
  260. // CHECK:STDOUT:
  261. // CHECK:STDOUT: impl: imports.%import_ref.6 as imports.%import_ref.7 {
  262. // CHECK:STDOUT: !members:
  263. // CHECK:STDOUT: witness = imports.%import_ref.8
  264. // CHECK:STDOUT: }
  265. // CHECK:STDOUT: }
  266. // CHECK:STDOUT:
  267. // CHECK:STDOUT: generic impl @impl.2(constants.%N: Core.IntLiteral) {
  268. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  269. // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
  270. // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
  271. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.4)]
  272. // CHECK:STDOUT:
  273. // CHECK:STDOUT: !definition:
  274. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.3, @impl.2(%N) [symbolic = %Convert.type (constants.%Convert.type.3)]
  275. // CHECK:STDOUT: %Convert: @impl.2.%Convert.type (%Convert.type.3) = struct_value () [symbolic = %Convert (constants.%Convert.3)]
  276. // CHECK:STDOUT: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.4)]
  277. // CHECK:STDOUT:
  278. // CHECK:STDOUT: impl: imports.%import_ref.10 as imports.%import_ref.11 {
  279. // CHECK:STDOUT: !members:
  280. // CHECK:STDOUT: witness = imports.%import_ref.12
  281. // CHECK:STDOUT: }
  282. // CHECK:STDOUT: }
  283. // CHECK:STDOUT:
  284. // CHECK:STDOUT: generic impl @impl.3(constants.%N: Core.IntLiteral) {
  285. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  286. // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
  287. // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
  288. // CHECK:STDOUT:
  289. // CHECK:STDOUT: !definition:
  290. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.4, @impl.3(%N) [symbolic = %Convert.type (constants.%Convert.type.4)]
  291. // CHECK:STDOUT: %Convert: @impl.3.%Convert.type (%Convert.type.4) = struct_value () [symbolic = %Convert (constants.%Convert.4)]
  292. // CHECK:STDOUT: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.5)]
  293. // CHECK:STDOUT:
  294. // CHECK:STDOUT: impl: imports.%import_ref.13 as imports.%import_ref.14 {
  295. // CHECK:STDOUT: !members:
  296. // CHECK:STDOUT: witness = imports.%import_ref.15
  297. // CHECK:STDOUT: }
  298. // CHECK:STDOUT: }
  299. // CHECK:STDOUT:
  300. // CHECK:STDOUT: generic impl @impl.4(constants.%N: Core.IntLiteral) {
  301. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  302. // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
  303. // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
  304. // CHECK:STDOUT:
  305. // CHECK:STDOUT: !definition:
  306. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.5, @impl.4(%N) [symbolic = %Convert.type (constants.%Convert.type.6)]
  307. // CHECK:STDOUT: %Convert: @impl.4.%Convert.type (%Convert.type.6) = struct_value () [symbolic = %Convert (constants.%Convert.6)]
  308. // CHECK:STDOUT: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.8)]
  309. // CHECK:STDOUT:
  310. // CHECK:STDOUT: impl: imports.%import_ref.17 as imports.%import_ref.18 {
  311. // CHECK:STDOUT: !members:
  312. // CHECK:STDOUT: witness = imports.%import_ref.19
  313. // CHECK:STDOUT: }
  314. // CHECK:STDOUT: }
  315. // CHECK:STDOUT:
  316. // CHECK:STDOUT: generic impl @impl.5(constants.%N: Core.IntLiteral) {
  317. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  318. // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
  319. // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
  320. // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%iN)> [symbolic = %As.type (constants.%As.type.3)]
  321. // CHECK:STDOUT:
  322. // CHECK:STDOUT: !definition:
  323. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.7, @impl.5(%N) [symbolic = %Convert.type (constants.%Convert.type.8)]
  324. // CHECK:STDOUT: %Convert: @impl.5.%Convert.type (%Convert.type.8) = struct_value () [symbolic = %Convert (constants.%Convert.8)]
  325. // CHECK:STDOUT: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.11)]
  326. // CHECK:STDOUT:
  327. // CHECK:STDOUT: impl: imports.%import_ref.23 as imports.%import_ref.24 {
  328. // CHECK:STDOUT: !members:
  329. // CHECK:STDOUT: witness = imports.%import_ref.25
  330. // CHECK:STDOUT: }
  331. // CHECK:STDOUT: }
  332. // CHECK:STDOUT:
  333. // CHECK:STDOUT: generic impl @impl.6(constants.%N: Core.IntLiteral) {
  334. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  335. // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
  336. // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
  337. // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%uN)> [symbolic = %As.type (constants.%As.type.4)]
  338. // CHECK:STDOUT:
  339. // CHECK:STDOUT: !definition:
  340. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.8, @impl.6(%N) [symbolic = %Convert.type (constants.%Convert.type.9)]
  341. // CHECK:STDOUT: %Convert: @impl.6.%Convert.type (%Convert.type.9) = struct_value () [symbolic = %Convert (constants.%Convert.9)]
  342. // CHECK:STDOUT: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.12)]
  343. // CHECK:STDOUT:
  344. // CHECK:STDOUT: impl: imports.%import_ref.27 as imports.%import_ref.28 {
  345. // CHECK:STDOUT: !members:
  346. // CHECK:STDOUT: witness = imports.%import_ref.29
  347. // CHECK:STDOUT: }
  348. // CHECK:STDOUT: }
  349. // CHECK:STDOUT:
  350. // CHECK:STDOUT: generic impl @impl.7(constants.%N: Core.IntLiteral) {
  351. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  352. // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
  353. // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
  354. // CHECK:STDOUT:
  355. // CHECK:STDOUT: !definition:
  356. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.9, @impl.7(%N) [symbolic = %Convert.type (constants.%Convert.type.10)]
  357. // CHECK:STDOUT: %Convert: @impl.7.%Convert.type (%Convert.type.10) = struct_value () [symbolic = %Convert (constants.%Convert.10)]
  358. // CHECK:STDOUT: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.13)]
  359. // CHECK:STDOUT:
  360. // CHECK:STDOUT: impl: imports.%import_ref.30 as imports.%import_ref.31 {
  361. // CHECK:STDOUT: !members:
  362. // CHECK:STDOUT: witness = imports.%import_ref.32
  363. // CHECK:STDOUT: }
  364. // CHECK:STDOUT: }
  365. // CHECK:STDOUT:
  366. // CHECK:STDOUT: generic impl @impl.8(constants.%N: Core.IntLiteral) {
  367. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  368. // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
  369. // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
  370. // CHECK:STDOUT:
  371. // CHECK:STDOUT: !definition:
  372. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.10, @impl.8(%N) [symbolic = %Convert.type (constants.%Convert.type.12)]
  373. // CHECK:STDOUT: %Convert: @impl.8.%Convert.type (%Convert.type.12) = struct_value () [symbolic = %Convert (constants.%Convert.12)]
  374. // CHECK:STDOUT: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.16)]
  375. // CHECK:STDOUT:
  376. // CHECK:STDOUT: impl: imports.%import_ref.34 as imports.%import_ref.35 {
  377. // CHECK:STDOUT: !members:
  378. // CHECK:STDOUT: witness = imports.%import_ref.36
  379. // CHECK:STDOUT: }
  380. // CHECK:STDOUT: }
  381. // CHECK:STDOUT:
  382. // CHECK:STDOUT: generic fn @Convert.1(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) {
  383. // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
  384. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)]
  385. // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)]
  386. // CHECK:STDOUT:
  387. // CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self (%Self.2)]() -> @Convert.1.%Dest (%Dest);
  388. // CHECK:STDOUT: }
  389. // CHECK:STDOUT:
  390. // CHECK:STDOUT: generic fn @Convert.2(constants.%N: Core.IntLiteral) {
  391. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  392. // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
  393. // CHECK:STDOUT:
  394. // CHECK:STDOUT: !definition:
  395. // CHECK:STDOUT:
  396. // CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.2.%iN (%iN) = "int.convert_checked";
  397. // CHECK:STDOUT: }
  398. // CHECK:STDOUT:
  399. // CHECK:STDOUT: generic fn @Convert.3(constants.%N: Core.IntLiteral) {
  400. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  401. // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
  402. // CHECK:STDOUT:
  403. // CHECK:STDOUT: !definition:
  404. // CHECK:STDOUT:
  405. // CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.3.%uN (%uN) = "int.convert_checked";
  406. // CHECK:STDOUT: }
  407. // CHECK:STDOUT:
  408. // CHECK:STDOUT: generic fn @Convert.4(constants.%N: Core.IntLiteral) {
  409. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  410. // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
  411. // CHECK:STDOUT:
  412. // CHECK:STDOUT: !definition:
  413. // CHECK:STDOUT:
  414. // CHECK:STDOUT: fn[%self.param_patt: @Convert.4.%iN (%iN)]() -> Core.IntLiteral = "int.convert_checked";
  415. // CHECK:STDOUT: }
  416. // CHECK:STDOUT:
  417. // CHECK:STDOUT: generic fn @Convert.5(constants.%N: Core.IntLiteral) {
  418. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  419. // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
  420. // CHECK:STDOUT:
  421. // CHECK:STDOUT: !definition:
  422. // CHECK:STDOUT:
  423. // CHECK:STDOUT: fn[%self.param_patt: @Convert.5.%uN (%uN)]() -> Core.IntLiteral = "int.convert_checked";
  424. // CHECK:STDOUT: }
  425. // CHECK:STDOUT:
  426. // CHECK:STDOUT: generic fn @Convert.6(constants.%Dest: type, constants.%Self.3: @As.%As.type (%As.type.2)) {
  427. // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
  428. // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)]
  429. // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)]
  430. // CHECK:STDOUT:
  431. // CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%Self (%Self.4)]() -> @Convert.6.%Dest (%Dest);
  432. // CHECK:STDOUT: }
  433. // CHECK:STDOUT:
  434. // CHECK:STDOUT: generic fn @Convert.7(constants.%N: Core.IntLiteral) {
  435. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  436. // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
  437. // CHECK:STDOUT:
  438. // CHECK:STDOUT: !definition:
  439. // CHECK:STDOUT:
  440. // CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.7.%iN (%iN) = "int.convert_checked";
  441. // CHECK:STDOUT: }
  442. // CHECK:STDOUT:
  443. // CHECK:STDOUT: generic fn @Convert.8(constants.%N: Core.IntLiteral) {
  444. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  445. // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
  446. // CHECK:STDOUT:
  447. // CHECK:STDOUT: !definition:
  448. // CHECK:STDOUT:
  449. // CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.8.%uN (%uN) = "int.convert_checked";
  450. // CHECK:STDOUT: }
  451. // CHECK:STDOUT:
  452. // CHECK:STDOUT: generic fn @Convert.9(constants.%N: Core.IntLiteral) {
  453. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  454. // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
  455. // CHECK:STDOUT:
  456. // CHECK:STDOUT: !definition:
  457. // CHECK:STDOUT:
  458. // CHECK:STDOUT: fn[%self.param_patt: @Convert.9.%iN (%iN)]() -> Core.IntLiteral = "int.convert_checked";
  459. // CHECK:STDOUT: }
  460. // CHECK:STDOUT:
  461. // CHECK:STDOUT: generic fn @Convert.10(constants.%N: Core.IntLiteral) {
  462. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  463. // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
  464. // CHECK:STDOUT:
  465. // CHECK:STDOUT: !definition:
  466. // CHECK:STDOUT:
  467. // CHECK:STDOUT: fn[%self.param_patt: @Convert.10.%uN (%uN)]() -> Core.IntLiteral = "int.convert_checked";
  468. // CHECK:STDOUT: }
  469. // CHECK:STDOUT:
  470. // CHECK:STDOUT: fn @__global_init() {
  471. // CHECK:STDOUT: !entry:
  472. // CHECK:STDOUT: %a_ref.ref: ref %.18 = name_ref a_ref, imports.%import_ref.2
  473. // CHECK:STDOUT: %.loc4: %.18 = bind_value %a_ref.ref
  474. // CHECK:STDOUT: assign file.%a.var, %.loc4
  475. // CHECK:STDOUT: return
  476. // CHECK:STDOUT: }
  477. // CHECK:STDOUT:
  478. // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
  479. // CHECK:STDOUT: %Dest => constants.%Dest
  480. // CHECK:STDOUT: %Dest.patt => constants.%Dest
  481. // CHECK:STDOUT: }
  482. // CHECK:STDOUT:
  483. // CHECK:STDOUT: specific @ImplicitAs(constants.%iN) {
  484. // CHECK:STDOUT: %Dest => constants.%iN
  485. // CHECK:STDOUT: %Dest.patt => constants.%iN
  486. // CHECK:STDOUT: }
  487. // CHECK:STDOUT:
  488. // CHECK:STDOUT: specific @ImplicitAs(%Dest) {
  489. // CHECK:STDOUT: %Dest => constants.%Dest
  490. // CHECK:STDOUT: %Dest.patt => constants.%Dest
  491. // CHECK:STDOUT: }
  492. // CHECK:STDOUT:
  493. // CHECK:STDOUT: specific @ImplicitAs(@impl.1.%iN) {
  494. // CHECK:STDOUT: %Dest => constants.%iN
  495. // CHECK:STDOUT: %Dest.patt => constants.%iN
  496. // CHECK:STDOUT: }
  497. // CHECK:STDOUT:
  498. // CHECK:STDOUT: specific @impl.1(constants.%N) {
  499. // CHECK:STDOUT: %N => constants.%N
  500. // CHECK:STDOUT: %N.patt => constants.%N
  501. // CHECK:STDOUT: %iN => constants.%iN
  502. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3
  503. // CHECK:STDOUT: }
  504. // CHECK:STDOUT:
  505. // CHECK:STDOUT: specific @impl.1(%N) {
  506. // CHECK:STDOUT: %N => constants.%N
  507. // CHECK:STDOUT: %N.patt => constants.%N
  508. // CHECK:STDOUT: %iN => constants.%iN
  509. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3
  510. // CHECK:STDOUT: }
  511. // CHECK:STDOUT:
  512. // CHECK:STDOUT: specific @ImplicitAs(@Convert.1.%Dest) {
  513. // CHECK:STDOUT: %Dest => constants.%Dest
  514. // CHECK:STDOUT: %Dest.patt => constants.%Dest
  515. // CHECK:STDOUT: }
  516. // CHECK:STDOUT:
  517. // CHECK:STDOUT: specific @Convert.1(constants.%Dest, constants.%Self.1) {
  518. // CHECK:STDOUT: %Dest => constants.%Dest
  519. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2
  520. // CHECK:STDOUT: %Self => constants.%Self.1
  521. // CHECK:STDOUT: }
  522. // CHECK:STDOUT:
  523. // CHECK:STDOUT: specific @Convert.2(constants.%N) {
  524. // CHECK:STDOUT: %N => constants.%N
  525. // CHECK:STDOUT: %iN => constants.%iN
  526. // CHECK:STDOUT: }
  527. // CHECK:STDOUT:
  528. // CHECK:STDOUT: specific @ImplicitAs(constants.%uN) {
  529. // CHECK:STDOUT: %Dest => constants.%uN
  530. // CHECK:STDOUT: %Dest.patt => constants.%uN
  531. // CHECK:STDOUT: }
  532. // CHECK:STDOUT:
  533. // CHECK:STDOUT: specific @ImplicitAs(@impl.2.%uN) {
  534. // CHECK:STDOUT: %Dest => constants.%uN
  535. // CHECK:STDOUT: %Dest.patt => constants.%uN
  536. // CHECK:STDOUT: }
  537. // CHECK:STDOUT:
  538. // CHECK:STDOUT: specific @impl.2(constants.%N) {
  539. // CHECK:STDOUT: %N => constants.%N
  540. // CHECK:STDOUT: %N.patt => constants.%N
  541. // CHECK:STDOUT: %uN => constants.%uN
  542. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4
  543. // CHECK:STDOUT: }
  544. // CHECK:STDOUT:
  545. // CHECK:STDOUT: specific @impl.2(%N) {
  546. // CHECK:STDOUT: %N => constants.%N
  547. // CHECK:STDOUT: %N.patt => constants.%N
  548. // CHECK:STDOUT: %uN => constants.%uN
  549. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4
  550. // CHECK:STDOUT: }
  551. // CHECK:STDOUT:
  552. // CHECK:STDOUT: specific @Convert.3(constants.%N) {
  553. // CHECK:STDOUT: %N => constants.%N
  554. // CHECK:STDOUT: %uN => constants.%uN
  555. // CHECK:STDOUT: }
  556. // CHECK:STDOUT:
  557. // CHECK:STDOUT: specific @ImplicitAs(Core.IntLiteral) {
  558. // CHECK:STDOUT: %Dest => Core.IntLiteral
  559. // CHECK:STDOUT: %Dest.patt => Core.IntLiteral
  560. // CHECK:STDOUT:
  561. // CHECK:STDOUT: !definition:
  562. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.5
  563. // CHECK:STDOUT: %Self => constants.%Self.2
  564. // CHECK:STDOUT: %Convert.type => constants.%Convert.type.5
  565. // CHECK:STDOUT: %Convert => constants.%Convert.5
  566. // CHECK:STDOUT: %.1 => constants.%.6
  567. // CHECK:STDOUT: %.2 => constants.%.7
  568. // CHECK:STDOUT: }
  569. // CHECK:STDOUT:
  570. // CHECK:STDOUT: specific @impl.3(constants.%N) {
  571. // CHECK:STDOUT: %N => constants.%N
  572. // CHECK:STDOUT: %N.patt => constants.%N
  573. // CHECK:STDOUT: %iN => constants.%iN
  574. // CHECK:STDOUT: }
  575. // CHECK:STDOUT:
  576. // CHECK:STDOUT: specific @impl.3(%N) {
  577. // CHECK:STDOUT: %N => constants.%N
  578. // CHECK:STDOUT: %N.patt => constants.%N
  579. // CHECK:STDOUT: %iN => constants.%iN
  580. // CHECK:STDOUT: }
  581. // CHECK:STDOUT:
  582. // CHECK:STDOUT: specific @Convert.4(constants.%N) {
  583. // CHECK:STDOUT: %N => constants.%N
  584. // CHECK:STDOUT: %iN => constants.%iN
  585. // CHECK:STDOUT: }
  586. // CHECK:STDOUT:
  587. // CHECK:STDOUT: specific @impl.4(constants.%N) {
  588. // CHECK:STDOUT: %N => constants.%N
  589. // CHECK:STDOUT: %N.patt => constants.%N
  590. // CHECK:STDOUT: %uN => constants.%uN
  591. // CHECK:STDOUT: }
  592. // CHECK:STDOUT:
  593. // CHECK:STDOUT: specific @impl.4(%N) {
  594. // CHECK:STDOUT: %N => constants.%N
  595. // CHECK:STDOUT: %N.patt => constants.%N
  596. // CHECK:STDOUT: %uN => constants.%uN
  597. // CHECK:STDOUT: }
  598. // CHECK:STDOUT:
  599. // CHECK:STDOUT: specific @Convert.5(constants.%N) {
  600. // CHECK:STDOUT: %N => constants.%N
  601. // CHECK:STDOUT: %uN => constants.%uN
  602. // CHECK:STDOUT: }
  603. // CHECK:STDOUT:
  604. // CHECK:STDOUT: specific @As(constants.%Dest) {
  605. // CHECK:STDOUT: %Dest => constants.%Dest
  606. // CHECK:STDOUT: %Dest.patt => constants.%Dest
  607. // CHECK:STDOUT: }
  608. // CHECK:STDOUT:
  609. // CHECK:STDOUT: specific @As(constants.%iN) {
  610. // CHECK:STDOUT: %Dest => constants.%iN
  611. // CHECK:STDOUT: %Dest.patt => constants.%iN
  612. // CHECK:STDOUT: }
  613. // CHECK:STDOUT:
  614. // CHECK:STDOUT: specific @As(%Dest) {
  615. // CHECK:STDOUT: %Dest => constants.%Dest
  616. // CHECK:STDOUT: %Dest.patt => constants.%Dest
  617. // CHECK:STDOUT: }
  618. // CHECK:STDOUT:
  619. // CHECK:STDOUT: specific @As(@impl.5.%iN) {
  620. // CHECK:STDOUT: %Dest => constants.%iN
  621. // CHECK:STDOUT: %Dest.patt => constants.%iN
  622. // CHECK:STDOUT: }
  623. // CHECK:STDOUT:
  624. // CHECK:STDOUT: specific @impl.5(constants.%N) {
  625. // CHECK:STDOUT: %N => constants.%N
  626. // CHECK:STDOUT: %N.patt => constants.%N
  627. // CHECK:STDOUT: %iN => constants.%iN
  628. // CHECK:STDOUT: %As.type => constants.%As.type.3
  629. // CHECK:STDOUT: }
  630. // CHECK:STDOUT:
  631. // CHECK:STDOUT: specific @impl.5(%N) {
  632. // CHECK:STDOUT: %N => constants.%N
  633. // CHECK:STDOUT: %N.patt => constants.%N
  634. // CHECK:STDOUT: %iN => constants.%iN
  635. // CHECK:STDOUT: %As.type => constants.%As.type.3
  636. // CHECK:STDOUT: }
  637. // CHECK:STDOUT:
  638. // CHECK:STDOUT: specific @As(@Convert.6.%Dest) {
  639. // CHECK:STDOUT: %Dest => constants.%Dest
  640. // CHECK:STDOUT: %Dest.patt => constants.%Dest
  641. // CHECK:STDOUT: }
  642. // CHECK:STDOUT:
  643. // CHECK:STDOUT: specific @Convert.6(constants.%Dest, constants.%Self.3) {
  644. // CHECK:STDOUT: %Dest => constants.%Dest
  645. // CHECK:STDOUT: %As.type => constants.%As.type.2
  646. // CHECK:STDOUT: %Self => constants.%Self.3
  647. // CHECK:STDOUT: }
  648. // CHECK:STDOUT:
  649. // CHECK:STDOUT: specific @Convert.7(constants.%N) {
  650. // CHECK:STDOUT: %N => constants.%N
  651. // CHECK:STDOUT: %iN => constants.%iN
  652. // CHECK:STDOUT: }
  653. // CHECK:STDOUT:
  654. // CHECK:STDOUT: specific @As(constants.%uN) {
  655. // CHECK:STDOUT: %Dest => constants.%uN
  656. // CHECK:STDOUT: %Dest.patt => constants.%uN
  657. // CHECK:STDOUT: }
  658. // CHECK:STDOUT:
  659. // CHECK:STDOUT: specific @As(@impl.6.%uN) {
  660. // CHECK:STDOUT: %Dest => constants.%uN
  661. // CHECK:STDOUT: %Dest.patt => constants.%uN
  662. // CHECK:STDOUT: }
  663. // CHECK:STDOUT:
  664. // CHECK:STDOUT: specific @impl.6(constants.%N) {
  665. // CHECK:STDOUT: %N => constants.%N
  666. // CHECK:STDOUT: %N.patt => constants.%N
  667. // CHECK:STDOUT: %uN => constants.%uN
  668. // CHECK:STDOUT: %As.type => constants.%As.type.4
  669. // CHECK:STDOUT: }
  670. // CHECK:STDOUT:
  671. // CHECK:STDOUT: specific @impl.6(%N) {
  672. // CHECK:STDOUT: %N => constants.%N
  673. // CHECK:STDOUT: %N.patt => constants.%N
  674. // CHECK:STDOUT: %uN => constants.%uN
  675. // CHECK:STDOUT: %As.type => constants.%As.type.4
  676. // CHECK:STDOUT: }
  677. // CHECK:STDOUT:
  678. // CHECK:STDOUT: specific @Convert.8(constants.%N) {
  679. // CHECK:STDOUT: %N => constants.%N
  680. // CHECK:STDOUT: %uN => constants.%uN
  681. // CHECK:STDOUT: }
  682. // CHECK:STDOUT:
  683. // CHECK:STDOUT: specific @As(Core.IntLiteral) {
  684. // CHECK:STDOUT: %Dest => Core.IntLiteral
  685. // CHECK:STDOUT: %Dest.patt => Core.IntLiteral
  686. // CHECK:STDOUT:
  687. // CHECK:STDOUT: !definition:
  688. // CHECK:STDOUT: %As.type => constants.%As.type.5
  689. // CHECK:STDOUT: %Self => constants.%Self.4
  690. // CHECK:STDOUT: %Convert.type => constants.%Convert.type.11
  691. // CHECK:STDOUT: %Convert => constants.%Convert.11
  692. // CHECK:STDOUT: %.1 => constants.%.14
  693. // CHECK:STDOUT: %.2 => constants.%.15
  694. // CHECK:STDOUT: }
  695. // CHECK:STDOUT:
  696. // CHECK:STDOUT: specific @impl.7(constants.%N) {
  697. // CHECK:STDOUT: %N => constants.%N
  698. // CHECK:STDOUT: %N.patt => constants.%N
  699. // CHECK:STDOUT: %iN => constants.%iN
  700. // CHECK:STDOUT: }
  701. // CHECK:STDOUT:
  702. // CHECK:STDOUT: specific @impl.7(%N) {
  703. // CHECK:STDOUT: %N => constants.%N
  704. // CHECK:STDOUT: %N.patt => constants.%N
  705. // CHECK:STDOUT: %iN => constants.%iN
  706. // CHECK:STDOUT: }
  707. // CHECK:STDOUT:
  708. // CHECK:STDOUT: specific @Convert.9(constants.%N) {
  709. // CHECK:STDOUT: %N => constants.%N
  710. // CHECK:STDOUT: %iN => constants.%iN
  711. // CHECK:STDOUT: }
  712. // CHECK:STDOUT:
  713. // CHECK:STDOUT: specific @impl.8(constants.%N) {
  714. // CHECK:STDOUT: %N => constants.%N
  715. // CHECK:STDOUT: %N.patt => constants.%N
  716. // CHECK:STDOUT: %uN => constants.%uN
  717. // CHECK:STDOUT: }
  718. // CHECK:STDOUT:
  719. // CHECK:STDOUT: specific @impl.8(%N) {
  720. // CHECK:STDOUT: %N => constants.%N
  721. // CHECK:STDOUT: %N.patt => constants.%N
  722. // CHECK:STDOUT: %uN => constants.%uN
  723. // CHECK:STDOUT: }
  724. // CHECK:STDOUT:
  725. // CHECK:STDOUT: specific @Convert.10(constants.%N) {
  726. // CHECK:STDOUT: %N => constants.%N
  727. // CHECK:STDOUT: %uN => constants.%uN
  728. // CHECK:STDOUT: }
  729. // CHECK:STDOUT: