actual.carbon 108 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048
  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/full.carbon
  6. // EXTRA-ARGS: --dump-sem-ir-ranges=if-present
  7. //
  8. // AUTOUPDATE
  9. // TIP: To test this file alone, run:
  10. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/for/actual.carbon
  11. // TIP: To dump output, run:
  12. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/for/actual.carbon
  13. // --- lib.carbon
  14. library "lib";
  15. class IntRange(N:! Core.IntLiteral()) {
  16. fn Make(start: Core.Int(N), end: Core.Int(N)) -> Self {
  17. return {.start = start, .end = end};
  18. }
  19. impl as Core.Iterate where .CursorType = Core.Int(N) and .ElementType = Core.Int(N) {
  20. fn NewCursor[self: Self]() -> Core.Int(N) { return self.start; }
  21. fn Next[self: Self](cursor: Core.Int(N)*) -> Core.Optional(Core.Int(N)) {
  22. var value: Core.Int(N) = *cursor;
  23. if (value < self.end) {
  24. ++*cursor;
  25. return Core.Optional(Core.Int(N)).Some(value);
  26. } else {
  27. return Core.Optional(Core.Int(N)).None();
  28. }
  29. }
  30. }
  31. private var start: Core.Int(N);
  32. private var end: Core.Int(N);
  33. }
  34. fn Range(end: i32) -> IntRange(32) {
  35. return IntRange(32).Make(0, end);
  36. }
  37. // --- trivial.carbon
  38. import library "lib";
  39. fn Read() {
  40. let y:! Core.IntLiteral() = 43;
  41. var x: IntRange(32) = Range(y);
  42. }
  43. // CHECK:STDOUT: --- lib.carbon
  44. // CHECK:STDOUT:
  45. // CHECK:STDOUT: constants {
  46. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  47. // CHECK:STDOUT: %.Self.3b7: %type = symbolic_binding .Self [symbolic_self]
  48. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  49. // CHECK:STDOUT: %IntLiteral.type: type = fn_type @IntLiteral [concrete]
  50. // CHECK:STDOUT: %IntLiteral: %IntLiteral.type = struct_value () [concrete]
  51. // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
  52. // CHECK:STDOUT: %pattern_type.dc0: type = pattern_type Core.IntLiteral [concrete]
  53. // CHECK:STDOUT: %IntRange.type: type = generic_class_type @IntRange [concrete]
  54. // CHECK:STDOUT: %IntRange.generic: %IntRange.type = struct_value () [concrete]
  55. // CHECK:STDOUT: %IntRange.48b: type = class_type @IntRange, @IntRange(%N) [symbolic]
  56. // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
  57. // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
  58. // CHECK:STDOUT: %Int.b50e37.1: type = class_type @Int, @Int(%N) [symbolic]
  59. // CHECK:STDOUT: %pattern_type.60f8e7.1: type = pattern_type %Int.b50e37.1 [symbolic]
  60. // CHECK:STDOUT: %pattern_type.6de: type = pattern_type %IntRange.48b [symbolic]
  61. // CHECK:STDOUT: %IntRange.Make.type.121: type = fn_type @IntRange.Make, @IntRange(%N) [symbolic]
  62. // CHECK:STDOUT: %IntRange.Make.14e: %IntRange.Make.type.121 = struct_value () [symbolic]
  63. // CHECK:STDOUT: %Iterate.type: type = facet_type <@Iterate> [concrete]
  64. // CHECK:STDOUT: %.Self.b7a: %Iterate.type = symbolic_binding .Self [symbolic_self]
  65. // CHECK:STDOUT: %Iterate.assoc_type: type = assoc_entity_type @Iterate [concrete]
  66. // CHECK:STDOUT: %assoc1.02e: %Iterate.assoc_type = assoc_entity element1, imports.%Core.import_ref.9e6 [concrete]
  67. // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self.b7a [symbolic_self]
  68. // CHECK:STDOUT: %Iterate.lookup_impl_witness.0cc: <witness> = lookup_impl_witness %.Self.b7a, @Iterate [symbolic_self]
  69. // CHECK:STDOUT: %impl.elem1.aba: type = impl_witness_access %Iterate.lookup_impl_witness.0cc, element1 [symbolic_self]
  70. // CHECK:STDOUT: %assoc0.0f6: %Iterate.assoc_type = assoc_entity element0, imports.%Core.import_ref.61e [concrete]
  71. // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete]
  72. // CHECK:STDOUT: %impl.elem0.0b5: %Copy.type = impl_witness_access %Iterate.lookup_impl_witness.0cc, element0 [symbolic_self]
  73. // CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete]
  74. // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.24b: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic]
  75. // CHECK:STDOUT: %Int.as.Copy.impl.Op.c95: %Int.as.Copy.impl.Op.type.24b = struct_value () [symbolic]
  76. // CHECK:STDOUT: %require_complete.e66303.1: <witness> = require_complete_type %Int.b50e37.1 [symbolic]
  77. // CHECK:STDOUT: %Copy.lookup_impl_witness.035: <witness> = lookup_impl_witness %Int.b50e37.1, @Copy [symbolic]
  78. // CHECK:STDOUT: %Copy.facet.d3d: %Copy.type = facet_value %Int.b50e37.1, (%Copy.lookup_impl_witness.035) [symbolic]
  79. // CHECK:STDOUT: %Iterate_where.type: type = facet_type <@Iterate where %impl.elem1.aba = %Int.b50e37.1 and %impl.elem0.0b5 = %Copy.facet.d3d> [symbolic]
  80. // CHECK:STDOUT: %require_complete.e76: <witness> = require_complete_type %Iterate_where.type [symbolic]
  81. // CHECK:STDOUT: %OptionalStorage.type: type = facet_type <@OptionalStorage> [concrete]
  82. // CHECK:STDOUT: %Optional.type: type = generic_class_type @Optional [concrete]
  83. // CHECK:STDOUT: %Optional.generic: %Optional.type = struct_value () [concrete]
  84. // CHECK:STDOUT: %T.3fe: %OptionalStorage.type = symbolic_binding T, 0 [symbolic]
  85. // CHECK:STDOUT: %Optional.None.type.193: type = fn_type @Optional.None, @Optional(%T.3fe) [symbolic]
  86. // CHECK:STDOUT: %Optional.None.dc7: %Optional.None.type.193 = struct_value () [symbolic]
  87. // CHECK:STDOUT: %Optional.Some.type.32b: type = fn_type @Optional.Some, @Optional(%T.3fe) [symbolic]
  88. // CHECK:STDOUT: %Optional.Some.249: %Optional.Some.type.32b = struct_value () [symbolic]
  89. // CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanDestroy>> [concrete]
  90. // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
  91. // CHECK:STDOUT: %DestroyT: %type_where = symbolic_binding DestroyT, 0 [symbolic]
  92. // CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete]
  93. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.15c: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%DestroyT) [symbolic]
  94. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.fd5: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.15c = struct_value () [symbolic]
  95. // CHECK:STDOUT: %Iterate.impl_witness: <witness> = impl_witness @IntRange.%Iterate.impl_witness_table, @IntRange.as.Iterate.impl(%N) [symbolic]
  96. // CHECK:STDOUT: %IntRange.as.Iterate.impl.NewCursor.type: type = fn_type @IntRange.as.Iterate.impl.NewCursor, @IntRange.as.Iterate.impl(%N) [symbolic]
  97. // CHECK:STDOUT: %IntRange.as.Iterate.impl.NewCursor: %IntRange.as.Iterate.impl.NewCursor.type = struct_value () [symbolic]
  98. // CHECK:STDOUT: %ptr.1cf: type = ptr_type %Int.b50e37.1 [symbolic]
  99. // CHECK:STDOUT: %pattern_type.054: type = pattern_type %ptr.1cf [symbolic]
  100. // CHECK:STDOUT: %OptionalStorage.lookup_impl_witness.8c6: <witness> = lookup_impl_witness %Int.b50e37.1, @OptionalStorage [symbolic]
  101. // CHECK:STDOUT: %OptionalStorage.facet.ea4: %OptionalStorage.type = facet_value %Int.b50e37.1, (%OptionalStorage.lookup_impl_witness.8c6) [symbolic]
  102. // CHECK:STDOUT: %Optional.23f: type = class_type @Optional, @Optional(%OptionalStorage.facet.ea4) [symbolic]
  103. // CHECK:STDOUT: %pattern_type.9f4: type = pattern_type %Optional.23f [symbolic]
  104. // CHECK:STDOUT: %IntRange.as.Iterate.impl.Next.type: type = fn_type @IntRange.as.Iterate.impl.Next, @IntRange.as.Iterate.impl(%N) [symbolic]
  105. // CHECK:STDOUT: %IntRange.as.Iterate.impl.Next: %IntRange.as.Iterate.impl.Next.type = struct_value () [symbolic]
  106. // CHECK:STDOUT: %IntRange.elem.baf: type = unbound_element_type %IntRange.48b, %Int.b50e37.1 [symbolic]
  107. // CHECK:STDOUT: %struct_type.start.end.cb5: type = struct_type {.start: %Int.b50e37.1, .end: %Int.b50e37.1} [symbolic]
  108. // CHECK:STDOUT: %complete_type.4f0: <witness> = complete_type_witness %struct_type.start.end.cb5 [symbolic]
  109. // CHECK:STDOUT: %require_complete.b4c: <witness> = require_complete_type %IntRange.48b [symbolic]
  110. // CHECK:STDOUT: %.20c: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.d3d [symbolic]
  111. // CHECK:STDOUT: %impl.elem0.625: %.20c = impl_witness_access %Copy.lookup_impl_witness.035, element0 [symbolic]
  112. // CHECK:STDOUT: %specific_impl_fn.c88: <specific function> = specific_impl_function %impl.elem0.625, @Copy.Op(%Copy.facet.d3d) [symbolic]
  113. // CHECK:STDOUT: %Optional.None.type.a39: type = fn_type @Optional.None, @Optional(%OptionalStorage.facet.ea4) [symbolic]
  114. // CHECK:STDOUT: %Optional.None.b0b: %Optional.None.type.a39 = struct_value () [symbolic]
  115. // CHECK:STDOUT: %Optional.Some.type.74c: type = fn_type @Optional.Some, @Optional(%OptionalStorage.facet.ea4) [symbolic]
  116. // CHECK:STDOUT: %Optional.Some.37c: %Optional.Some.type.74c = struct_value () [symbolic]
  117. // CHECK:STDOUT: %require_complete.b49: <witness> = require_complete_type %Optional.23f [symbolic]
  118. // CHECK:STDOUT: %require_complete.6ca: <witness> = require_complete_type %ptr.1cf [symbolic]
  119. // CHECK:STDOUT: %OrderedWith.type.270: type = generic_interface_type @OrderedWith [concrete]
  120. // CHECK:STDOUT: %OrderedWith.generic: %OrderedWith.type.270 = struct_value () [concrete]
  121. // CHECK:STDOUT: %Other: type = symbolic_binding Other, 0 [symbolic]
  122. // CHECK:STDOUT: %OrderedWith.Less.type.fc4: type = fn_type @OrderedWith.Less, @OrderedWith(%Other) [symbolic]
  123. // CHECK:STDOUT: %OrderedWith.Less.bb3: %OrderedWith.Less.type.fc4 = struct_value () [symbolic]
  124. // CHECK:STDOUT: %OrderedWith.assoc_type.72b: type = assoc_entity_type @OrderedWith, @OrderedWith(%Other) [symbolic]
  125. // CHECK:STDOUT: %OrderedWith.type.393: type = facet_type <@OrderedWith, @OrderedWith(%Int.b50e37.1)> [symbolic]
  126. // CHECK:STDOUT: %OrderedWith.Less.type.c6f: type = fn_type @OrderedWith.Less, @OrderedWith(%Int.b50e37.1) [symbolic]
  127. // CHECK:STDOUT: %OrderedWith.assoc_type.72a: type = assoc_entity_type @OrderedWith, @OrderedWith(%Int.b50e37.1) [symbolic]
  128. // CHECK:STDOUT: %assoc0.3f6: %OrderedWith.assoc_type.72a = assoc_entity element0, imports.%Core.import_ref.02d [symbolic]
  129. // CHECK:STDOUT: %require_complete.4f7: <witness> = require_complete_type %OrderedWith.type.393 [symbolic]
  130. // CHECK:STDOUT: %assoc0.7c2: %OrderedWith.assoc_type.72b = assoc_entity element0, imports.%Core.import_ref.e123aa.1 [symbolic]
  131. // CHECK:STDOUT: %M: Core.IntLiteral = symbolic_binding M, 1 [symbolic]
  132. // CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.type.e01: type = fn_type @Int.as.OrderedWith.impl.Less.1, @Int.as.OrderedWith.impl.849(%N, %M) [symbolic]
  133. // CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.7c7: %Int.as.OrderedWith.impl.Less.type.e01 = struct_value () [symbolic]
  134. // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
  135. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
  136. // CHECK:STDOUT: %OrderedWith.impl_witness.586: <witness> = impl_witness imports.%OrderedWith.impl_witness_table.401, @Int.as.OrderedWith.impl.849(%N, %N) [symbolic]
  137. // CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.type.f52: type = fn_type @Int.as.OrderedWith.impl.Less.1, @Int.as.OrderedWith.impl.849(%N, %N) [symbolic]
  138. // CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.af3: %Int.as.OrderedWith.impl.Less.type.f52 = struct_value () [symbolic]
  139. // CHECK:STDOUT: %OrderedWith.facet: %OrderedWith.type.393 = facet_value %Int.b50e37.1, (%OrderedWith.impl_witness.586) [symbolic]
  140. // CHECK:STDOUT: %.db5: type = fn_type_with_self_type %OrderedWith.Less.type.c6f, %OrderedWith.facet [symbolic]
  141. // CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.specific_fn.0ff: <specific function> = specific_function %Int.as.OrderedWith.impl.Less.af3, @Int.as.OrderedWith.impl.Less.1(%N, %N) [symbolic]
  142. // CHECK:STDOUT: %Inc.type: type = facet_type <@Inc> [concrete]
  143. // CHECK:STDOUT: %Inc.Op.type: type = fn_type @Inc.Op [concrete]
  144. // CHECK:STDOUT: %Inc.lookup_impl_witness: <witness> = lookup_impl_witness %Int.b50e37.1, @Inc [symbolic]
  145. // CHECK:STDOUT: %Inc.facet: %Inc.type = facet_value %Int.b50e37.1, (%Inc.lookup_impl_witness) [symbolic]
  146. // CHECK:STDOUT: %.080: type = fn_type_with_self_type %Inc.Op.type, %Inc.facet [symbolic]
  147. // CHECK:STDOUT: %impl.elem0.923: %.080 = impl_witness_access %Inc.lookup_impl_witness, element0 [symbolic]
  148. // CHECK:STDOUT: %specific_impl_fn.173: <specific function> = specific_impl_function %impl.elem0.923, @Inc.Op(%Inc.facet) [symbolic]
  149. // CHECK:STDOUT: %Optional.Some.specific_fn: <specific function> = specific_function %Optional.Some.37c, @Optional.Some(%OptionalStorage.facet.ea4) [symbolic]
  150. // CHECK:STDOUT: %facet_value.4a9: %type_where = facet_value %Int.b50e37.1, () [symbolic]
  151. // CHECK:STDOUT: %Destroy.impl_witness.b47: <witness> = impl_witness imports.%Destroy.impl_witness_table, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.4a9) [symbolic]
  152. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.353: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.4a9) [symbolic]
  153. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.3be: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.353 = struct_value () [symbolic]
  154. // CHECK:STDOUT: %Destroy.facet.11d: %Destroy.type = facet_value %Int.b50e37.1, (%Destroy.impl_witness.b47) [symbolic]
  155. // CHECK:STDOUT: %.a64: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.11d [symbolic]
  156. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.e87: <specific function> = specific_function %DestroyT.binding.as_type.as.Destroy.impl.Op.3be, @DestroyT.binding.as_type.as.Destroy.impl.Op(%facet_value.4a9) [symbolic]
  157. // CHECK:STDOUT: %Optional.None.specific_fn: <specific function> = specific_function %Optional.None.b0b, @Optional.None(%OptionalStorage.facet.ea4) [symbolic]
  158. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  159. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  160. // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete]
  161. // CHECK:STDOUT: %IntRange.365: type = class_type @IntRange, @IntRange(%int_32) [concrete]
  162. // CHECK:STDOUT: %pattern_type.d16: type = pattern_type %IntRange.365 [concrete]
  163. // CHECK:STDOUT: %Range.type: type = fn_type @Range [concrete]
  164. // CHECK:STDOUT: %Range: %Range.type = struct_value () [concrete]
  165. // CHECK:STDOUT: %IntRange.Make.type.cef: type = fn_type @IntRange.Make, @IntRange(%int_32) [concrete]
  166. // CHECK:STDOUT: %IntRange.Make.0dc: %IntRange.Make.type.cef = struct_value () [concrete]
  167. // CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [concrete]
  168. // CHECK:STDOUT: %complete_type.f8a: <witness> = complete_type_witness %i32.builtin [concrete]
  169. // CHECK:STDOUT: %IntRange.elem.e33: type = unbound_element_type %IntRange.365, %i32 [concrete]
  170. // CHECK:STDOUT: %struct_type.start.end.d0a: type = struct_type {.start: %i32, .end: %i32} [concrete]
  171. // CHECK:STDOUT: %complete_type.c45: <witness> = complete_type_witness %struct_type.start.end.d0a [concrete]
  172. // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete]
  173. // CHECK:STDOUT: %IntRange.Make.specific_fn: <specific function> = specific_function %IntRange.Make.0dc, @IntRange.Make(%int_32) [concrete]
  174. // CHECK:STDOUT: %ImplicitAs.type.d14: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
  175. // CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete]
  176. // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
  177. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.f51: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic]
  178. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.2a1: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.f51 = struct_value () [symbolic]
  179. // CHECK:STDOUT: %ImplicitAs.impl_witness.bc9: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.132, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  180. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.51e: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  181. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.e9b: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.51e = struct_value () [concrete]
  182. // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.d14 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.bc9) [concrete]
  183. // CHECK:STDOUT: %.322: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete]
  184. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.e9b [concrete]
  185. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.e9b, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete]
  186. // CHECK:STDOUT: %bound_method: <bound method> = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  187. // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete]
  188. // CHECK:STDOUT: %Copy.impl_witness.fb7: <witness> = impl_witness imports.%Copy.impl_witness_table.b6a, @Int.as.Copy.impl(%int_32) [concrete]
  189. // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.469: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete]
  190. // CHECK:STDOUT: %Int.as.Copy.impl.Op.dfd: %Int.as.Copy.impl.Op.type.469 = struct_value () [concrete]
  191. // CHECK:STDOUT: %Copy.facet.c50: %Copy.type = facet_value %i32, (%Copy.impl_witness.fb7) [concrete]
  192. // CHECK:STDOUT: %.65f: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.c50 [concrete]
  193. // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: <specific function> = specific_function %Int.as.Copy.impl.Op.dfd, @Int.as.Copy.impl.Op(%int_32) [concrete]
  194. // CHECK:STDOUT: }
  195. // CHECK:STDOUT:
  196. // CHECK:STDOUT: imports {
  197. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  198. // CHECK:STDOUT: .IntLiteral = %Core.IntLiteral
  199. // CHECK:STDOUT: .Int = %Core.Int
  200. // CHECK:STDOUT: .Iterate = %Core.Iterate
  201. // CHECK:STDOUT: .Optional = %Core.Optional
  202. // CHECK:STDOUT: .Copy = %Core.Copy
  203. // CHECK:STDOUT: .OrderedWith = %Core.OrderedWith
  204. // CHECK:STDOUT: .Inc = %Core.Inc
  205. // CHECK:STDOUT: .Destroy = %Core.Destroy
  206. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  207. // CHECK:STDOUT: import Core//prelude
  208. // CHECK:STDOUT: import Core//prelude/...
  209. // CHECK:STDOUT: }
  210. // CHECK:STDOUT: %Core.IntLiteral: %IntLiteral.type = import_ref Core//prelude/types/int_literal, IntLiteral, loaded [concrete = constants.%IntLiteral]
  211. // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic]
  212. // CHECK:STDOUT: %Core.Iterate: type = import_ref Core//prelude/iterate, Iterate, loaded [concrete = constants.%Iterate.type]
  213. // CHECK:STDOUT: %Core.import_ref.119: %Iterate.assoc_type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [concrete = constants.%assoc0.0f6]
  214. // CHECK:STDOUT: %Core.import_ref.ed6: %Iterate.assoc_type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [concrete = constants.%assoc1.02e]
  215. // CHECK:STDOUT: %Core.import_ref.9e6: type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [concrete = %CursorType]
  216. // CHECK:STDOUT: %CursorType: type = assoc_const_decl @CursorType [concrete] {}
  217. // CHECK:STDOUT: %Core.import_ref.61e: %Copy.type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [concrete = %ElementType]
  218. // CHECK:STDOUT: %ElementType: %Copy.type = assoc_const_decl @ElementType [concrete] {}
  219. // CHECK:STDOUT: %Core.import_ref.d12: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.24b) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.c95)]
  220. // CHECK:STDOUT: %Copy.impl_witness_table.b6a = impl_witness_table (%Core.import_ref.d12), @Int.as.Copy.impl [concrete]
  221. // CHECK:STDOUT: %Core.import_ref.f2f: @Optional.%Optional.None.type (%Optional.None.type.193) = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.None (constants.%Optional.None.dc7)]
  222. // CHECK:STDOUT: %Core.import_ref.961: @Optional.%Optional.Some.type (%Optional.Some.type.32b) = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.Some (constants.%Optional.Some.249)]
  223. // CHECK:STDOUT: %Core.import_ref.416: @DestroyT.binding.as_type.as.Destroy.impl.%DestroyT.binding.as_type.as.Destroy.impl.Op.type (%DestroyT.binding.as_type.as.Destroy.impl.Op.type.15c) = import_ref Core//prelude/types/optional, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @DestroyT.binding.as_type.as.Destroy.impl.%DestroyT.binding.as_type.as.Destroy.impl.Op (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.fd5)]
  224. // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.416), @DestroyT.binding.as_type.as.Destroy.impl [concrete]
  225. // CHECK:STDOUT: %Core.Optional: %Optional.type = import_ref Core//prelude/types/optional, Optional, loaded [concrete = constants.%Optional.generic]
  226. // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/copy, Copy, loaded [concrete = constants.%Copy.type]
  227. // CHECK:STDOUT: %Core.OrderedWith: %OrderedWith.type.270 = import_ref Core//prelude/operators/comparison, OrderedWith, loaded [concrete = constants.%OrderedWith.generic]
  228. // CHECK:STDOUT: %Core.import_ref.128: @OrderedWith.%OrderedWith.assoc_type (%OrderedWith.assoc_type.72b) = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, loaded [symbolic = @OrderedWith.%assoc0 (constants.%assoc0.7c2)]
  229. // CHECK:STDOUT: %Core.import_ref.02d: @OrderedWith.%OrderedWith.Less.type (%OrderedWith.Less.type.fc4) = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, loaded [symbolic = @OrderedWith.%OrderedWith.Less (constants.%OrderedWith.Less.bb3)]
  230. // CHECK:STDOUT: %Core.import_ref.e123aa.1 = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, unloaded
  231. // CHECK:STDOUT: %Core.import_ref.b35: @Int.as.OrderedWith.impl.849.%Int.as.OrderedWith.impl.Less.type (%Int.as.OrderedWith.impl.Less.type.e01) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.OrderedWith.impl.849.%Int.as.OrderedWith.impl.Less (constants.%Int.as.OrderedWith.impl.Less.7c7)]
  232. // CHECK:STDOUT: %Core.import_ref.2a1 = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, unloaded
  233. // CHECK:STDOUT: %Core.import_ref.3bc = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, unloaded
  234. // CHECK:STDOUT: %Core.import_ref.8fd = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, unloaded
  235. // CHECK:STDOUT: %OrderedWith.impl_witness_table.401 = impl_witness_table (%Core.import_ref.b35, %Core.import_ref.2a1, %Core.import_ref.3bc, %Core.import_ref.8fd), @Int.as.OrderedWith.impl.849 [concrete]
  236. // CHECK:STDOUT: %Core.Inc: type = import_ref Core//prelude/operators/arithmetic, Inc, loaded [concrete = constants.%Inc.type]
  237. // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
  238. // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
  239. // CHECK:STDOUT: %Core.import_ref.e24: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.f51) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.2a1)]
  240. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.132 = impl_witness_table (%Core.import_ref.e24), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
  241. // CHECK:STDOUT: }
  242. // CHECK:STDOUT:
  243. // CHECK:STDOUT: file {
  244. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  245. // CHECK:STDOUT: .Core = imports.%Core
  246. // CHECK:STDOUT: .IntRange = %IntRange.decl
  247. // CHECK:STDOUT: .Range = %Range.decl
  248. // CHECK:STDOUT: }
  249. // CHECK:STDOUT: %Core.import = import Core
  250. // CHECK:STDOUT: %IntRange.decl: %IntRange.type = class_decl @IntRange [concrete = constants.%IntRange.generic] {
  251. // CHECK:STDOUT: %N.patt: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [concrete]
  252. // CHECK:STDOUT: } {
  253. // CHECK:STDOUT: %.loc4_36.1: type = splice_block %.loc4_36.3 [concrete = Core.IntLiteral] {
  254. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.3b7]
  255. // CHECK:STDOUT: %Core.ref.loc4: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  256. // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, imports.%Core.IntLiteral [concrete = constants.%IntLiteral]
  257. // CHECK:STDOUT: %IntLiteral.call: init type = call %IntLiteral.ref() [concrete = Core.IntLiteral]
  258. // CHECK:STDOUT: %.loc4_36.2: type = value_of_initializer %IntLiteral.call [concrete = Core.IntLiteral]
  259. // CHECK:STDOUT: %.loc4_36.3: type = converted %IntLiteral.call, %.loc4_36.2 [concrete = Core.IntLiteral]
  260. // CHECK:STDOUT: }
  261. // CHECK:STDOUT: %N.loc4_16.2: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N.loc4_16.1 (constants.%N)]
  262. // CHECK:STDOUT: }
  263. // CHECK:STDOUT: %Range.decl: %Range.type = fn_decl @Range [concrete = constants.%Range] {
  264. // CHECK:STDOUT: %end.patt: %pattern_type.7ce = value_binding_pattern end [concrete]
  265. // CHECK:STDOUT: %end.param_patt: %pattern_type.7ce = value_param_pattern %end.patt, call_param0 [concrete]
  266. // CHECK:STDOUT: %return.patt: %pattern_type.d16 = return_slot_pattern [concrete]
  267. // CHECK:STDOUT: %return.param_patt: %pattern_type.d16 = out_param_pattern %return.patt, call_param1 [concrete]
  268. // CHECK:STDOUT: } {
  269. // CHECK:STDOUT: %IntRange.ref.loc26: %IntRange.type = name_ref IntRange, file.%IntRange.decl [concrete = constants.%IntRange.generic]
  270. // CHECK:STDOUT: %int_32.loc26_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  271. // CHECK:STDOUT: %IntRange.loc26: type = class_type @IntRange, @IntRange(constants.%int_32) [concrete = constants.%IntRange.365]
  272. // CHECK:STDOUT: %end.param: %i32 = value_param call_param0
  273. // CHECK:STDOUT: %.loc26_15: type = splice_block %i32 [concrete = constants.%i32] {
  274. // CHECK:STDOUT: %int_32.loc26_15: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  275. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  276. // CHECK:STDOUT: }
  277. // CHECK:STDOUT: %end: %i32 = value_binding end, %end.param
  278. // CHECK:STDOUT: %return.param: ref %IntRange.365 = out_param call_param1
  279. // CHECK:STDOUT: %return: ref %IntRange.365 = return_slot %return.param
  280. // CHECK:STDOUT: }
  281. // CHECK:STDOUT: }
  282. // CHECK:STDOUT:
  283. // CHECK:STDOUT: generic impl @IntRange.as.Iterate.impl(@IntRange.%N.loc4_16.2: Core.IntLiteral) {
  284. // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N (constants.%N)]
  285. // CHECK:STDOUT: %IntRange: type = class_type @IntRange, @IntRange(%N) [symbolic = %IntRange (constants.%IntRange.48b)]
  286. // CHECK:STDOUT: %Int.loc9_54.1: type = class_type @Int, @Int(%N) [symbolic = %Int.loc9_54.1 (constants.%Int.b50e37.1)]
  287. // CHECK:STDOUT: %Copy.lookup_impl_witness: <witness> = lookup_impl_witness %Int.loc9_54.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.035)]
  288. // CHECK:STDOUT: %Copy.facet.loc9_85.1: %Copy.type = facet_value %Int.loc9_54.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc9_85.1 (constants.%Copy.facet.d3d)]
  289. // CHECK:STDOUT: %Iterate_where.type: type = facet_type <@Iterate where constants.%impl.elem1.aba = %Int.loc9_54.1 and constants.%impl.elem0.0b5 = %Copy.facet.loc9_85.1> [symbolic = %Iterate_where.type (constants.%Iterate_where.type)]
  290. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Iterate_where.type [symbolic = %require_complete (constants.%require_complete.e76)]
  291. // CHECK:STDOUT: %Iterate.impl_witness: <witness> = impl_witness @IntRange.%Iterate.impl_witness_table, @IntRange.as.Iterate.impl(%N) [symbolic = %Iterate.impl_witness (constants.%Iterate.impl_witness)]
  292. // CHECK:STDOUT:
  293. // CHECK:STDOUT: !definition:
  294. // CHECK:STDOUT: %IntRange.as.Iterate.impl.NewCursor.type: type = fn_type @IntRange.as.Iterate.impl.NewCursor, @IntRange.as.Iterate.impl(%N) [symbolic = %IntRange.as.Iterate.impl.NewCursor.type (constants.%IntRange.as.Iterate.impl.NewCursor.type)]
  295. // CHECK:STDOUT: %IntRange.as.Iterate.impl.NewCursor: @IntRange.as.Iterate.impl.%IntRange.as.Iterate.impl.NewCursor.type (%IntRange.as.Iterate.impl.NewCursor.type) = struct_value () [symbolic = %IntRange.as.Iterate.impl.NewCursor (constants.%IntRange.as.Iterate.impl.NewCursor)]
  296. // CHECK:STDOUT: %IntRange.as.Iterate.impl.Next.type: type = fn_type @IntRange.as.Iterate.impl.Next, @IntRange.as.Iterate.impl(%N) [symbolic = %IntRange.as.Iterate.impl.Next.type (constants.%IntRange.as.Iterate.impl.Next.type)]
  297. // CHECK:STDOUT: %IntRange.as.Iterate.impl.Next: @IntRange.as.Iterate.impl.%IntRange.as.Iterate.impl.Next.type (%IntRange.as.Iterate.impl.Next.type) = struct_value () [symbolic = %IntRange.as.Iterate.impl.Next (constants.%IntRange.as.Iterate.impl.Next)]
  298. // CHECK:STDOUT:
  299. // CHECK:STDOUT: impl: %Self.ref as %.loc9_24 {
  300. // CHECK:STDOUT: %IntRange.as.Iterate.impl.NewCursor.decl: @IntRange.as.Iterate.impl.%IntRange.as.Iterate.impl.NewCursor.type (%IntRange.as.Iterate.impl.NewCursor.type) = fn_decl @IntRange.as.Iterate.impl.NewCursor [symbolic = @IntRange.as.Iterate.impl.%IntRange.as.Iterate.impl.NewCursor (constants.%IntRange.as.Iterate.impl.NewCursor)] {
  301. // CHECK:STDOUT: %self.patt: @IntRange.as.Iterate.impl.NewCursor.%pattern_type.loc10_18 (%pattern_type.6de) = value_binding_pattern self [concrete]
  302. // CHECK:STDOUT: %self.param_patt: @IntRange.as.Iterate.impl.NewCursor.%pattern_type.loc10_18 (%pattern_type.6de) = value_param_pattern %self.patt, call_param0 [concrete]
  303. // CHECK:STDOUT: %return.patt: @IntRange.as.Iterate.impl.NewCursor.%pattern_type.loc10_32 (%pattern_type.60f8e7.1) = return_slot_pattern [concrete]
  304. // CHECK:STDOUT: %return.param_patt: @IntRange.as.Iterate.impl.NewCursor.%pattern_type.loc10_32 (%pattern_type.60f8e7.1) = out_param_pattern %return.patt, call_param1 [concrete]
  305. // CHECK:STDOUT: } {
  306. // CHECK:STDOUT: %Core.ref: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  307. // CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic]
  308. // CHECK:STDOUT: %N.ref: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_16.2 [symbolic = %N (constants.%N)]
  309. // CHECK:STDOUT: %Int.loc10_45.2: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc10_45.1 (constants.%Int.b50e37.1)]
  310. // CHECK:STDOUT: %self.param: @IntRange.as.Iterate.impl.NewCursor.%IntRange (%IntRange.48b) = value_param call_param0
  311. // CHECK:STDOUT: %.loc10_24.1: type = splice_block %Self.ref [symbolic = %IntRange (constants.%IntRange.48b)] {
  312. // CHECK:STDOUT: %.loc10_24.2: type = specific_constant constants.%IntRange.48b, @IntRange(constants.%N) [symbolic = %IntRange (constants.%IntRange.48b)]
  313. // CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc10_24.2 [symbolic = %IntRange (constants.%IntRange.48b)]
  314. // CHECK:STDOUT: }
  315. // CHECK:STDOUT: %self: @IntRange.as.Iterate.impl.NewCursor.%IntRange (%IntRange.48b) = value_binding self, %self.param
  316. // CHECK:STDOUT: %return.param: ref @IntRange.as.Iterate.impl.NewCursor.%Int.loc10_45.1 (%Int.b50e37.1) = out_param call_param1
  317. // CHECK:STDOUT: %return: ref @IntRange.as.Iterate.impl.NewCursor.%Int.loc10_45.1 (%Int.b50e37.1) = return_slot %return.param
  318. // CHECK:STDOUT: }
  319. // CHECK:STDOUT: %IntRange.as.Iterate.impl.Next.decl: @IntRange.as.Iterate.impl.%IntRange.as.Iterate.impl.Next.type (%IntRange.as.Iterate.impl.Next.type) = fn_decl @IntRange.as.Iterate.impl.Next [symbolic = @IntRange.as.Iterate.impl.%IntRange.as.Iterate.impl.Next (constants.%IntRange.as.Iterate.impl.Next)] {
  320. // CHECK:STDOUT: %self.patt: @IntRange.as.Iterate.impl.Next.%pattern_type.loc11_13 (%pattern_type.6de) = value_binding_pattern self [concrete]
  321. // CHECK:STDOUT: %self.param_patt: @IntRange.as.Iterate.impl.Next.%pattern_type.loc11_13 (%pattern_type.6de) = value_param_pattern %self.patt, call_param0 [concrete]
  322. // CHECK:STDOUT: %cursor.patt: @IntRange.as.Iterate.impl.Next.%pattern_type.loc11_25 (%pattern_type.054) = value_binding_pattern cursor [concrete]
  323. // CHECK:STDOUT: %cursor.param_patt: @IntRange.as.Iterate.impl.Next.%pattern_type.loc11_25 (%pattern_type.054) = value_param_pattern %cursor.patt, call_param1 [concrete]
  324. // CHECK:STDOUT: %return.patt: @IntRange.as.Iterate.impl.Next.%pattern_type.loc11_47 (%pattern_type.9f4) = return_slot_pattern [concrete]
  325. // CHECK:STDOUT: %return.param_patt: @IntRange.as.Iterate.impl.Next.%pattern_type.loc11_47 (%pattern_type.9f4) = out_param_pattern %return.patt, call_param2 [concrete]
  326. // CHECK:STDOUT: } {
  327. // CHECK:STDOUT: %Core.ref.loc11_50: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  328. // CHECK:STDOUT: %Optional.ref.loc11: %Optional.type = name_ref Optional, imports.%Core.Optional [concrete = constants.%Optional.generic]
  329. // CHECK:STDOUT: %Core.ref.loc11_64: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  330. // CHECK:STDOUT: %Int.ref.loc11_68: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic]
  331. // CHECK:STDOUT: %N.ref.loc11_73: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_16.2 [symbolic = %N (constants.%N)]
  332. // CHECK:STDOUT: %Int.loc11_74: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc11_43.1 (constants.%Int.b50e37.1)]
  333. // CHECK:STDOUT: %OptionalStorage.facet.loc11_75.2: %OptionalStorage.type = facet_value %Int.loc11_74, (constants.%OptionalStorage.lookup_impl_witness.8c6) [symbolic = %OptionalStorage.facet.loc11_75.1 (constants.%OptionalStorage.facet.ea4)]
  334. // CHECK:STDOUT: %.loc11_75: %OptionalStorage.type = converted %Int.loc11_74, %OptionalStorage.facet.loc11_75.2 [symbolic = %OptionalStorage.facet.loc11_75.1 (constants.%OptionalStorage.facet.ea4)]
  335. // CHECK:STDOUT: %Optional.loc11_75.2: type = class_type @Optional, @Optional(constants.%OptionalStorage.facet.ea4) [symbolic = %Optional.loc11_75.1 (constants.%Optional.23f)]
  336. // CHECK:STDOUT: %self.param: @IntRange.as.Iterate.impl.Next.%IntRange (%IntRange.48b) = value_param call_param0
  337. // CHECK:STDOUT: %.loc11_19.1: type = splice_block %Self.ref [symbolic = %IntRange (constants.%IntRange.48b)] {
  338. // CHECK:STDOUT: %.loc11_19.2: type = specific_constant constants.%IntRange.48b, @IntRange(constants.%N) [symbolic = %IntRange (constants.%IntRange.48b)]
  339. // CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc11_19.2 [symbolic = %IntRange (constants.%IntRange.48b)]
  340. // CHECK:STDOUT: }
  341. // CHECK:STDOUT: %self: @IntRange.as.Iterate.impl.Next.%IntRange (%IntRange.48b) = value_binding self, %self.param
  342. // CHECK:STDOUT: %cursor.param: @IntRange.as.Iterate.impl.Next.%ptr.loc11_44.1 (%ptr.1cf) = value_param call_param1
  343. // CHECK:STDOUT: %.loc11_44: type = splice_block %ptr.loc11_44.2 [symbolic = %ptr.loc11_44.1 (constants.%ptr.1cf)] {
  344. // CHECK:STDOUT: %Core.ref.loc11_33: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  345. // CHECK:STDOUT: %Int.ref.loc11_37: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic]
  346. // CHECK:STDOUT: %N.ref.loc11_42: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_16.2 [symbolic = %N (constants.%N)]
  347. // CHECK:STDOUT: %Int.loc11_43.2: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc11_43.1 (constants.%Int.b50e37.1)]
  348. // CHECK:STDOUT: %ptr.loc11_44.2: type = ptr_type %Int.loc11_43.2 [symbolic = %ptr.loc11_44.1 (constants.%ptr.1cf)]
  349. // CHECK:STDOUT: }
  350. // CHECK:STDOUT: %cursor: @IntRange.as.Iterate.impl.Next.%ptr.loc11_44.1 (%ptr.1cf) = value_binding cursor, %cursor.param
  351. // CHECK:STDOUT: %return.param: ref @IntRange.as.Iterate.impl.Next.%Optional.loc11_75.1 (%Optional.23f) = out_param call_param2
  352. // CHECK:STDOUT: %return: ref @IntRange.as.Iterate.impl.Next.%Optional.loc11_75.1 (%Optional.23f) = return_slot %return.param
  353. // CHECK:STDOUT: }
  354. // CHECK:STDOUT:
  355. // CHECK:STDOUT: !members:
  356. // CHECK:STDOUT: .N = <poisoned>
  357. // CHECK:STDOUT: .NewCursor = %IntRange.as.Iterate.impl.NewCursor.decl
  358. // CHECK:STDOUT: .Next = %IntRange.as.Iterate.impl.Next.decl
  359. // CHECK:STDOUT: witness = @IntRange.%Iterate.impl_witness
  360. // CHECK:STDOUT: }
  361. // CHECK:STDOUT: }
  362. // CHECK:STDOUT:
  363. // CHECK:STDOUT: generic class @IntRange(%N.loc4_16.2: Core.IntLiteral) {
  364. // CHECK:STDOUT: %N.loc4_16.1: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N.loc4_16.1 (constants.%N)]
  365. // CHECK:STDOUT:
  366. // CHECK:STDOUT: !definition:
  367. // CHECK:STDOUT: %IntRange.Make.type: type = fn_type @IntRange.Make, @IntRange(%N.loc4_16.1) [symbolic = %IntRange.Make.type (constants.%IntRange.Make.type.121)]
  368. // CHECK:STDOUT: %IntRange.Make: @IntRange.%IntRange.Make.type (%IntRange.Make.type.121) = struct_value () [symbolic = %IntRange.Make (constants.%IntRange.Make.14e)]
  369. // CHECK:STDOUT: %Int.loc22_32.2: type = class_type @Int, @Int(%N.loc4_16.1) [symbolic = %Int.loc22_32.2 (constants.%Int.b50e37.1)]
  370. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Int.loc22_32.2 [symbolic = %require_complete (constants.%require_complete.e66303.1)]
  371. // CHECK:STDOUT: %IntRange: type = class_type @IntRange, @IntRange(%N.loc4_16.1) [symbolic = %IntRange (constants.%IntRange.48b)]
  372. // CHECK:STDOUT: %IntRange.elem: type = unbound_element_type %IntRange, %Int.loc22_32.2 [symbolic = %IntRange.elem (constants.%IntRange.elem.baf)]
  373. // CHECK:STDOUT: %struct_type.start.end: type = struct_type {.start: @IntRange.%Int.loc22_32.2 (%Int.b50e37.1), .end: @IntRange.%Int.loc22_32.2 (%Int.b50e37.1)} [symbolic = %struct_type.start.end (constants.%struct_type.start.end.cb5)]
  374. // CHECK:STDOUT: %complete_type.loc24_1.2: <witness> = complete_type_witness %struct_type.start.end [symbolic = %complete_type.loc24_1.2 (constants.%complete_type.4f0)]
  375. // CHECK:STDOUT:
  376. // CHECK:STDOUT: class {
  377. // CHECK:STDOUT: %IntRange.Make.decl: @IntRange.%IntRange.Make.type (%IntRange.Make.type.121) = fn_decl @IntRange.Make [symbolic = @IntRange.%IntRange.Make (constants.%IntRange.Make.14e)] {
  378. // CHECK:STDOUT: %start.patt: @IntRange.Make.%pattern_type.loc5_11 (%pattern_type.60f8e7.1) = value_binding_pattern start [concrete]
  379. // CHECK:STDOUT: %start.param_patt: @IntRange.Make.%pattern_type.loc5_11 (%pattern_type.60f8e7.1) = value_param_pattern %start.patt, call_param0 [concrete]
  380. // CHECK:STDOUT: %end.patt: @IntRange.Make.%pattern_type.loc5_11 (%pattern_type.60f8e7.1) = value_binding_pattern end [concrete]
  381. // CHECK:STDOUT: %end.param_patt: @IntRange.Make.%pattern_type.loc5_11 (%pattern_type.60f8e7.1) = value_param_pattern %end.patt, call_param1 [concrete]
  382. // CHECK:STDOUT: %return.patt: @IntRange.Make.%pattern_type.loc5_49 (%pattern_type.6de) = return_slot_pattern [concrete]
  383. // CHECK:STDOUT: %return.param_patt: @IntRange.Make.%pattern_type.loc5_49 (%pattern_type.6de) = out_param_pattern %return.patt, call_param2 [concrete]
  384. // CHECK:STDOUT: } {
  385. // CHECK:STDOUT: %.loc5_52: type = specific_constant constants.%IntRange.48b, @IntRange(constants.%N) [symbolic = %IntRange (constants.%IntRange.48b)]
  386. // CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc5_52 [symbolic = %IntRange (constants.%IntRange.48b)]
  387. // CHECK:STDOUT: %start.param: @IntRange.Make.%Int.loc5_28.1 (%Int.b50e37.1) = value_param call_param0
  388. // CHECK:STDOUT: %.loc5_28: type = splice_block %Int.loc5_28.2 [symbolic = %Int.loc5_28.1 (constants.%Int.b50e37.1)] {
  389. // CHECK:STDOUT: %Core.ref.loc5_18: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  390. // CHECK:STDOUT: %Int.ref.loc5_22: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic]
  391. // CHECK:STDOUT: %N.ref.loc5_27: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_16.2 [symbolic = %N (constants.%N)]
  392. // CHECK:STDOUT: %Int.loc5_28.2: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc5_28.1 (constants.%Int.b50e37.1)]
  393. // CHECK:STDOUT: }
  394. // CHECK:STDOUT: %start: @IntRange.Make.%Int.loc5_28.1 (%Int.b50e37.1) = value_binding start, %start.param
  395. // CHECK:STDOUT: %end.param: @IntRange.Make.%Int.loc5_28.1 (%Int.b50e37.1) = value_param call_param1
  396. // CHECK:STDOUT: %.loc5_46: type = splice_block %Int.loc5_46 [symbolic = %Int.loc5_28.1 (constants.%Int.b50e37.1)] {
  397. // CHECK:STDOUT: %Core.ref.loc5_36: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  398. // CHECK:STDOUT: %Int.ref.loc5_40: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic]
  399. // CHECK:STDOUT: %N.ref.loc5_45: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_16.2 [symbolic = %N (constants.%N)]
  400. // CHECK:STDOUT: %Int.loc5_46: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc5_28.1 (constants.%Int.b50e37.1)]
  401. // CHECK:STDOUT: }
  402. // CHECK:STDOUT: %end: @IntRange.Make.%Int.loc5_28.1 (%Int.b50e37.1) = value_binding end, %end.param
  403. // CHECK:STDOUT: %return.param: ref @IntRange.Make.%IntRange (%IntRange.48b) = out_param call_param2
  404. // CHECK:STDOUT: %return: ref @IntRange.Make.%IntRange (%IntRange.48b) = return_slot %return.param
  405. // CHECK:STDOUT: }
  406. // CHECK:STDOUT: impl_decl @IntRange.as.Iterate.impl [concrete] {} {
  407. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%IntRange.48b [symbolic = %IntRange (constants.%IntRange.48b)]
  408. // CHECK:STDOUT: %Core.ref.loc9_11: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  409. // CHECK:STDOUT: %Iterate.ref: type = name_ref Iterate, imports.%Core.Iterate [concrete = constants.%Iterate.type]
  410. // CHECK:STDOUT: %.Self: %Iterate.type = symbolic_binding .Self [symbolic_self = constants.%.Self.b7a]
  411. // CHECK:STDOUT: %.Self.ref.loc9_30: %Iterate.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.b7a]
  412. // CHECK:STDOUT: %CursorType.ref: %Iterate.assoc_type = name_ref CursorType, imports.%Core.import_ref.ed6 [concrete = constants.%assoc1.02e]
  413. // CHECK:STDOUT: %.Self.as_type.loc9_30: type = facet_access_type %.Self.ref.loc9_30 [symbolic_self = constants.%.Self.binding.as_type]
  414. // CHECK:STDOUT: %.loc9_30: type = converted %.Self.ref.loc9_30, %.Self.as_type.loc9_30 [symbolic_self = constants.%.Self.binding.as_type]
  415. // CHECK:STDOUT: %impl.elem1: type = impl_witness_access constants.%Iterate.lookup_impl_witness.0cc, element1 [symbolic_self = constants.%impl.elem1.aba]
  416. // CHECK:STDOUT: %Core.ref.loc9_44: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  417. // CHECK:STDOUT: %Int.ref.loc9_48: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic]
  418. // CHECK:STDOUT: %N.ref.loc9_53: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_16.2 [symbolic = %N (constants.%N)]
  419. // CHECK:STDOUT: %Int.loc9_54.2: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc9_54.1 (constants.%Int.b50e37.1)]
  420. // CHECK:STDOUT: %.Self.ref.loc9_60: %Iterate.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.b7a]
  421. // CHECK:STDOUT: %ElementType.ref: %Iterate.assoc_type = name_ref ElementType, imports.%Core.import_ref.119 [concrete = constants.%assoc0.0f6]
  422. // CHECK:STDOUT: %.Self.as_type.loc9_60: type = facet_access_type %.Self.ref.loc9_60 [symbolic_self = constants.%.Self.binding.as_type]
  423. // CHECK:STDOUT: %.loc9_60: type = converted %.Self.ref.loc9_60, %.Self.as_type.loc9_60 [symbolic_self = constants.%.Self.binding.as_type]
  424. // CHECK:STDOUT: %impl.elem0: %Copy.type = impl_witness_access constants.%Iterate.lookup_impl_witness.0cc, element0 [symbolic_self = constants.%impl.elem0.0b5]
  425. // CHECK:STDOUT: %Core.ref.loc9_75: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  426. // CHECK:STDOUT: %Int.ref.loc9_79: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic]
  427. // CHECK:STDOUT: %N.ref.loc9_84: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_16.2 [symbolic = %N (constants.%N)]
  428. // CHECK:STDOUT: %Int.loc9_85: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc9_54.1 (constants.%Int.b50e37.1)]
  429. // CHECK:STDOUT: %Copy.facet.loc9_85.2: %Copy.type = facet_value %Int.loc9_85, (constants.%Copy.lookup_impl_witness.035) [symbolic = %Copy.facet.loc9_85.1 (constants.%Copy.facet.d3d)]
  430. // CHECK:STDOUT: %.loc9_85: %Copy.type = converted %Int.loc9_85, %Copy.facet.loc9_85.2 [symbolic = %Copy.facet.loc9_85.1 (constants.%Copy.facet.d3d)]
  431. // CHECK:STDOUT: %.loc9_24: type = where_expr %.Self [symbolic = %Iterate_where.type (constants.%Iterate_where.type)] {
  432. // CHECK:STDOUT: requirement_base_facet_type constants.%Iterate.type
  433. // CHECK:STDOUT: requirement_rewrite %impl.elem1, %Int.loc9_54.2
  434. // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc9_85
  435. // CHECK:STDOUT: }
  436. // CHECK:STDOUT: }
  437. // CHECK:STDOUT: %Iterate.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant.loc9_87.2, %impl_witness_assoc_constant.loc9_87.1, @IntRange.as.Iterate.impl.%IntRange.as.Iterate.impl.NewCursor.decl, @IntRange.as.Iterate.impl.%IntRange.as.Iterate.impl.Next.decl), @IntRange.as.Iterate.impl [concrete]
  438. // CHECK:STDOUT: %Iterate.impl_witness: <witness> = impl_witness %Iterate.impl_witness_table, @IntRange.as.Iterate.impl(constants.%N) [symbolic = @IntRange.as.Iterate.impl.%Iterate.impl_witness (constants.%Iterate.impl_witness)]
  439. // CHECK:STDOUT: %impl_witness_assoc_constant.loc9_87.1: type = impl_witness_assoc_constant constants.%Int.b50e37.1 [symbolic = @IntRange.as.Iterate.impl.%Int.loc9_54.1 (constants.%Int.b50e37.1)]
  440. // CHECK:STDOUT: %impl_witness_assoc_constant.loc9_87.2: %Copy.type = impl_witness_assoc_constant constants.%Copy.facet.d3d [symbolic = @IntRange.as.Iterate.impl.%Copy.facet.loc9_85.1 (constants.%Copy.facet.d3d)]
  441. // CHECK:STDOUT: %Core.ref.loc22: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  442. // CHECK:STDOUT: %Int.ref.loc22: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic]
  443. // CHECK:STDOUT: %N.ref.loc22: Core.IntLiteral = name_ref N, %N.loc4_16.2 [symbolic = %N.loc4_16.1 (constants.%N)]
  444. // CHECK:STDOUT: %Int.loc22_32.1: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc22_32.2 (constants.%Int.b50e37.1)]
  445. // CHECK:STDOUT: %.loc22: @IntRange.%IntRange.elem (%IntRange.elem.baf) = field_decl start, element0 [concrete]
  446. // CHECK:STDOUT: %Core.ref.loc23: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  447. // CHECK:STDOUT: %Int.ref.loc23: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic]
  448. // CHECK:STDOUT: %N.ref.loc23: Core.IntLiteral = name_ref N, %N.loc4_16.2 [symbolic = %N.loc4_16.1 (constants.%N)]
  449. // CHECK:STDOUT: %Int.loc23: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc22_32.2 (constants.%Int.b50e37.1)]
  450. // CHECK:STDOUT: %.loc23: @IntRange.%IntRange.elem (%IntRange.elem.baf) = field_decl end, element1 [concrete]
  451. // CHECK:STDOUT: %complete_type.loc24_1.1: <witness> = complete_type_witness constants.%struct_type.start.end.cb5 [symbolic = %complete_type.loc24_1.2 (constants.%complete_type.4f0)]
  452. // CHECK:STDOUT: complete_type_witness = %complete_type.loc24_1.1
  453. // CHECK:STDOUT:
  454. // CHECK:STDOUT: !members:
  455. // CHECK:STDOUT: .Self = constants.%IntRange.48b
  456. // CHECK:STDOUT: .N = <poisoned>
  457. // CHECK:STDOUT: .Make = %IntRange.Make.decl
  458. // CHECK:STDOUT: .start [private] = %.loc22
  459. // CHECK:STDOUT: .end [private] = %.loc23
  460. // CHECK:STDOUT: }
  461. // CHECK:STDOUT: }
  462. // CHECK:STDOUT:
  463. // CHECK:STDOUT: generic fn @IntRange.Make(@IntRange.%N.loc4_16.2: Core.IntLiteral) {
  464. // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N (constants.%N)]
  465. // CHECK:STDOUT: %Int.loc5_28.1: type = class_type @Int, @Int(%N) [symbolic = %Int.loc5_28.1 (constants.%Int.b50e37.1)]
  466. // CHECK:STDOUT: %pattern_type.loc5_11: type = pattern_type %Int.loc5_28.1 [symbolic = %pattern_type.loc5_11 (constants.%pattern_type.60f8e7.1)]
  467. // CHECK:STDOUT: %IntRange: type = class_type @IntRange, @IntRange(%N) [symbolic = %IntRange (constants.%IntRange.48b)]
  468. // CHECK:STDOUT: %pattern_type.loc5_49: type = pattern_type %IntRange [symbolic = %pattern_type.loc5_49 (constants.%pattern_type.6de)]
  469. // CHECK:STDOUT:
  470. // CHECK:STDOUT: !definition:
  471. // CHECK:STDOUT: %require_complete.loc5_49: <witness> = require_complete_type %IntRange [symbolic = %require_complete.loc5_49 (constants.%require_complete.b4c)]
  472. // CHECK:STDOUT: %require_complete.loc5_16: <witness> = require_complete_type %Int.loc5_28.1 [symbolic = %require_complete.loc5_16 (constants.%require_complete.e66303.1)]
  473. // CHECK:STDOUT: %struct_type.start.end: type = struct_type {.start: @IntRange.Make.%Int.loc5_28.1 (%Int.b50e37.1), .end: @IntRange.Make.%Int.loc5_28.1 (%Int.b50e37.1)} [symbolic = %struct_type.start.end (constants.%struct_type.start.end.cb5)]
  474. // CHECK:STDOUT: %Copy.lookup_impl_witness: <witness> = lookup_impl_witness %Int.loc5_28.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.035)]
  475. // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %Int.loc5_28.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet.d3d)]
  476. // CHECK:STDOUT: %.loc6_22.2: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc6_22.2 (constants.%.20c)]
  477. // CHECK:STDOUT: %impl.elem0.loc6_22.2: @IntRange.Make.%.loc6_22.2 (%.20c) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_22.2 (constants.%impl.elem0.625)]
  478. // CHECK:STDOUT: %specific_impl_fn.loc6_22.2: <specific function> = specific_impl_function %impl.elem0.loc6_22.2, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc6_22.2 (constants.%specific_impl_fn.c88)]
  479. // CHECK:STDOUT:
  480. // CHECK:STDOUT: fn(%start.param: @IntRange.Make.%Int.loc5_28.1 (%Int.b50e37.1), %end.param: @IntRange.Make.%Int.loc5_28.1 (%Int.b50e37.1)) -> %return.param: @IntRange.Make.%IntRange (%IntRange.48b) {
  481. // CHECK:STDOUT: !entry:
  482. // CHECK:STDOUT: %start.ref: @IntRange.Make.%Int.loc5_28.1 (%Int.b50e37.1) = name_ref start, %start
  483. // CHECK:STDOUT: %end.ref: @IntRange.Make.%Int.loc5_28.1 (%Int.b50e37.1) = name_ref end, %end
  484. // CHECK:STDOUT: %.loc6_39.1: @IntRange.Make.%struct_type.start.end (%struct_type.start.end.cb5) = struct_literal (%start.ref, %end.ref)
  485. // CHECK:STDOUT: %impl.elem0.loc6_22.1: @IntRange.Make.%.loc6_22.2 (%.20c) = impl_witness_access constants.%Copy.lookup_impl_witness.035, element0 [symbolic = %impl.elem0.loc6_22.2 (constants.%impl.elem0.625)]
  486. // CHECK:STDOUT: %bound_method.loc6_22.1: <bound method> = bound_method %start.ref, %impl.elem0.loc6_22.1
  487. // CHECK:STDOUT: %specific_impl_fn.loc6_22.1: <specific function> = specific_impl_function %impl.elem0.loc6_22.1, @Copy.Op(constants.%Copy.facet.d3d) [symbolic = %specific_impl_fn.loc6_22.2 (constants.%specific_impl_fn.c88)]
  488. // CHECK:STDOUT: %bound_method.loc6_22.2: <bound method> = bound_method %start.ref, %specific_impl_fn.loc6_22.1
  489. // CHECK:STDOUT: %.loc6_22.1: init @IntRange.Make.%Int.loc5_28.1 (%Int.b50e37.1) = call %bound_method.loc6_22.2(%start.ref)
  490. // CHECK:STDOUT: %.loc6_39.2: ref @IntRange.Make.%Int.loc5_28.1 (%Int.b50e37.1) = class_element_access %return, element0
  491. // CHECK:STDOUT: %.loc6_39.3: init @IntRange.Make.%Int.loc5_28.1 (%Int.b50e37.1) = initialize_from %.loc6_22.1 to %.loc6_39.2
  492. // CHECK:STDOUT: %impl.elem0.loc6_36: @IntRange.Make.%.loc6_22.2 (%.20c) = impl_witness_access constants.%Copy.lookup_impl_witness.035, element0 [symbolic = %impl.elem0.loc6_22.2 (constants.%impl.elem0.625)]
  493. // CHECK:STDOUT: %bound_method.loc6_36.1: <bound method> = bound_method %end.ref, %impl.elem0.loc6_36
  494. // CHECK:STDOUT: %specific_impl_fn.loc6_36: <specific function> = specific_impl_function %impl.elem0.loc6_36, @Copy.Op(constants.%Copy.facet.d3d) [symbolic = %specific_impl_fn.loc6_22.2 (constants.%specific_impl_fn.c88)]
  495. // CHECK:STDOUT: %bound_method.loc6_36.2: <bound method> = bound_method %end.ref, %specific_impl_fn.loc6_36
  496. // CHECK:STDOUT: %.loc6_36: init @IntRange.Make.%Int.loc5_28.1 (%Int.b50e37.1) = call %bound_method.loc6_36.2(%end.ref)
  497. // CHECK:STDOUT: %.loc6_39.4: ref @IntRange.Make.%Int.loc5_28.1 (%Int.b50e37.1) = class_element_access %return, element1
  498. // CHECK:STDOUT: %.loc6_39.5: init @IntRange.Make.%Int.loc5_28.1 (%Int.b50e37.1) = initialize_from %.loc6_36 to %.loc6_39.4
  499. // CHECK:STDOUT: %.loc6_39.6: init @IntRange.Make.%IntRange (%IntRange.48b) = class_init (%.loc6_39.3, %.loc6_39.5), %return
  500. // CHECK:STDOUT: %.loc6_40: init @IntRange.Make.%IntRange (%IntRange.48b) = converted %.loc6_39.1, %.loc6_39.6
  501. // CHECK:STDOUT: return %.loc6_40 to %return
  502. // CHECK:STDOUT: }
  503. // CHECK:STDOUT: }
  504. // CHECK:STDOUT:
  505. // CHECK:STDOUT: generic fn @IntRange.as.Iterate.impl.NewCursor(@IntRange.%N.loc4_16.2: Core.IntLiteral) {
  506. // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N (constants.%N)]
  507. // CHECK:STDOUT: %IntRange: type = class_type @IntRange, @IntRange(%N) [symbolic = %IntRange (constants.%IntRange.48b)]
  508. // CHECK:STDOUT: %pattern_type.loc10_18: type = pattern_type %IntRange [symbolic = %pattern_type.loc10_18 (constants.%pattern_type.6de)]
  509. // CHECK:STDOUT: %Int.loc10_45.1: type = class_type @Int, @Int(%N) [symbolic = %Int.loc10_45.1 (constants.%Int.b50e37.1)]
  510. // CHECK:STDOUT: %pattern_type.loc10_32: type = pattern_type %Int.loc10_45.1 [symbolic = %pattern_type.loc10_32 (constants.%pattern_type.60f8e7.1)]
  511. // CHECK:STDOUT:
  512. // CHECK:STDOUT: !definition:
  513. // CHECK:STDOUT: %require_complete.loc10_22: <witness> = require_complete_type %IntRange [symbolic = %require_complete.loc10_22 (constants.%require_complete.b4c)]
  514. // CHECK:STDOUT: %IntRange.elem: type = unbound_element_type %IntRange, %Int.loc10_45.1 [symbolic = %IntRange.elem (constants.%IntRange.elem.baf)]
  515. // CHECK:STDOUT: %require_complete.loc10_60: <witness> = require_complete_type %Int.loc10_45.1 [symbolic = %require_complete.loc10_60 (constants.%require_complete.e66303.1)]
  516. // CHECK:STDOUT: %Copy.lookup_impl_witness: <witness> = lookup_impl_witness %Int.loc10_45.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.035)]
  517. // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %Int.loc10_45.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet.d3d)]
  518. // CHECK:STDOUT: %.loc10_60.4: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc10_60.4 (constants.%.20c)]
  519. // CHECK:STDOUT: %impl.elem0.loc10_60.2: @IntRange.as.Iterate.impl.NewCursor.%.loc10_60.4 (%.20c) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_60.2 (constants.%impl.elem0.625)]
  520. // CHECK:STDOUT: %specific_impl_fn.loc10_60.2: <specific function> = specific_impl_function %impl.elem0.loc10_60.2, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc10_60.2 (constants.%specific_impl_fn.c88)]
  521. // CHECK:STDOUT:
  522. // CHECK:STDOUT: fn(%self.param: @IntRange.as.Iterate.impl.NewCursor.%IntRange (%IntRange.48b)) -> @IntRange.as.Iterate.impl.NewCursor.%Int.loc10_45.1 (%Int.b50e37.1) {
  523. // CHECK:STDOUT: !entry:
  524. // CHECK:STDOUT: %self.ref: @IntRange.as.Iterate.impl.NewCursor.%IntRange (%IntRange.48b) = name_ref self, %self
  525. // CHECK:STDOUT: %start.ref: @IntRange.as.Iterate.impl.NewCursor.%IntRange.elem (%IntRange.elem.baf) = name_ref start, @IntRange.%.loc22 [concrete = @IntRange.%.loc22]
  526. // CHECK:STDOUT: %.loc10_60.1: ref @IntRange.as.Iterate.impl.NewCursor.%Int.loc10_45.1 (%Int.b50e37.1) = class_element_access %self.ref, element0
  527. // CHECK:STDOUT: %.loc10_60.2: @IntRange.as.Iterate.impl.NewCursor.%Int.loc10_45.1 (%Int.b50e37.1) = acquire_value %.loc10_60.1
  528. // CHECK:STDOUT: %impl.elem0.loc10_60.1: @IntRange.as.Iterate.impl.NewCursor.%.loc10_60.4 (%.20c) = impl_witness_access constants.%Copy.lookup_impl_witness.035, element0 [symbolic = %impl.elem0.loc10_60.2 (constants.%impl.elem0.625)]
  529. // CHECK:STDOUT: %bound_method.loc10_60.1: <bound method> = bound_method %.loc10_60.2, %impl.elem0.loc10_60.1
  530. // CHECK:STDOUT: %specific_impl_fn.loc10_60.1: <specific function> = specific_impl_function %impl.elem0.loc10_60.1, @Copy.Op(constants.%Copy.facet.d3d) [symbolic = %specific_impl_fn.loc10_60.2 (constants.%specific_impl_fn.c88)]
  531. // CHECK:STDOUT: %bound_method.loc10_60.2: <bound method> = bound_method %.loc10_60.2, %specific_impl_fn.loc10_60.1
  532. // CHECK:STDOUT: %.loc10_60.3: init @IntRange.as.Iterate.impl.NewCursor.%Int.loc10_45.1 (%Int.b50e37.1) = call %bound_method.loc10_60.2(%.loc10_60.2)
  533. // CHECK:STDOUT: return %.loc10_60.3 to %return
  534. // CHECK:STDOUT: }
  535. // CHECK:STDOUT: }
  536. // CHECK:STDOUT:
  537. // CHECK:STDOUT: generic fn @IntRange.as.Iterate.impl.Next(@IntRange.%N.loc4_16.2: Core.IntLiteral) {
  538. // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N (constants.%N)]
  539. // CHECK:STDOUT: %IntRange: type = class_type @IntRange, @IntRange(%N) [symbolic = %IntRange (constants.%IntRange.48b)]
  540. // CHECK:STDOUT: %pattern_type.loc11_13: type = pattern_type %IntRange [symbolic = %pattern_type.loc11_13 (constants.%pattern_type.6de)]
  541. // CHECK:STDOUT: %Int.loc11_43.1: type = class_type @Int, @Int(%N) [symbolic = %Int.loc11_43.1 (constants.%Int.b50e37.1)]
  542. // CHECK:STDOUT: %ptr.loc11_44.1: type = ptr_type %Int.loc11_43.1 [symbolic = %ptr.loc11_44.1 (constants.%ptr.1cf)]
  543. // CHECK:STDOUT: %pattern_type.loc11_25: type = pattern_type %ptr.loc11_44.1 [symbolic = %pattern_type.loc11_25 (constants.%pattern_type.054)]
  544. // CHECK:STDOUT: %OptionalStorage.lookup_impl_witness: <witness> = lookup_impl_witness %Int.loc11_43.1, @OptionalStorage [symbolic = %OptionalStorage.lookup_impl_witness (constants.%OptionalStorage.lookup_impl_witness.8c6)]
  545. // CHECK:STDOUT: %OptionalStorage.facet.loc11_75.1: %OptionalStorage.type = facet_value %Int.loc11_43.1, (%OptionalStorage.lookup_impl_witness) [symbolic = %OptionalStorage.facet.loc11_75.1 (constants.%OptionalStorage.facet.ea4)]
  546. // CHECK:STDOUT: %Optional.loc11_75.1: type = class_type @Optional, @Optional(%OptionalStorage.facet.loc11_75.1) [symbolic = %Optional.loc11_75.1 (constants.%Optional.23f)]
  547. // CHECK:STDOUT: %pattern_type.loc11_47: type = pattern_type %Optional.loc11_75.1 [symbolic = %pattern_type.loc11_47 (constants.%pattern_type.9f4)]
  548. // CHECK:STDOUT:
  549. // CHECK:STDOUT: !definition:
  550. // CHECK:STDOUT: %require_complete.loc11_47: <witness> = require_complete_type %Optional.loc11_75.1 [symbolic = %require_complete.loc11_47 (constants.%require_complete.b49)]
  551. // CHECK:STDOUT: %require_complete.loc11_17: <witness> = require_complete_type %IntRange [symbolic = %require_complete.loc11_17 (constants.%require_complete.b4c)]
  552. // CHECK:STDOUT: %require_complete.loc11_31: <witness> = require_complete_type %ptr.loc11_44.1 [symbolic = %require_complete.loc11_31 (constants.%require_complete.6ca)]
  553. // CHECK:STDOUT: %require_complete.loc12: <witness> = require_complete_type %Int.loc11_43.1 [symbolic = %require_complete.loc12 (constants.%require_complete.e66303.1)]
  554. // CHECK:STDOUT: %pattern_type.loc12: type = pattern_type %Int.loc11_43.1 [symbolic = %pattern_type.loc12 (constants.%pattern_type.60f8e7.1)]
  555. // CHECK:STDOUT: %Copy.lookup_impl_witness: <witness> = lookup_impl_witness %Int.loc11_43.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.035)]
  556. // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %Int.loc11_43.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet.d3d)]
  557. // CHECK:STDOUT: %.loc12_32.4: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc12_32.4 (constants.%.20c)]
  558. // CHECK:STDOUT: %impl.elem0.loc12_32.2: @IntRange.as.Iterate.impl.Next.%.loc12_32.4 (%.20c) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc12_32.2 (constants.%impl.elem0.625)]
  559. // CHECK:STDOUT: %specific_impl_fn.loc12_32.2: <specific function> = specific_impl_function %impl.elem0.loc12_32.2, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc12_32.2 (constants.%specific_impl_fn.c88)]
  560. // CHECK:STDOUT: %IntRange.elem: type = unbound_element_type %IntRange, %Int.loc11_43.1 [symbolic = %IntRange.elem (constants.%IntRange.elem.baf)]
  561. // CHECK:STDOUT: %OrderedWith.type.loc13_17.2: type = facet_type <@OrderedWith, @OrderedWith(%Int.loc11_43.1)> [symbolic = %OrderedWith.type.loc13_17.2 (constants.%OrderedWith.type.393)]
  562. // CHECK:STDOUT: %require_complete.loc13: <witness> = require_complete_type %OrderedWith.type.loc13_17.2 [symbolic = %require_complete.loc13 (constants.%require_complete.4f7)]
  563. // CHECK:STDOUT: %OrderedWith.assoc_type: type = assoc_entity_type @OrderedWith, @OrderedWith(%Int.loc11_43.1) [symbolic = %OrderedWith.assoc_type (constants.%OrderedWith.assoc_type.72a)]
  564. // CHECK:STDOUT: %assoc0: @IntRange.as.Iterate.impl.Next.%OrderedWith.assoc_type (%OrderedWith.assoc_type.72a) = assoc_entity element0, imports.%Core.import_ref.02d [symbolic = %assoc0 (constants.%assoc0.3f6)]
  565. // CHECK:STDOUT: %OrderedWith.impl_witness: <witness> = impl_witness imports.%OrderedWith.impl_witness_table.401, @Int.as.OrderedWith.impl.849(%N, %N) [symbolic = %OrderedWith.impl_witness (constants.%OrderedWith.impl_witness.586)]
  566. // CHECK:STDOUT: %OrderedWith.Less.type: type = fn_type @OrderedWith.Less, @OrderedWith(%Int.loc11_43.1) [symbolic = %OrderedWith.Less.type (constants.%OrderedWith.Less.type.c6f)]
  567. // CHECK:STDOUT: %OrderedWith.facet: @IntRange.as.Iterate.impl.Next.%OrderedWith.type.loc13_17.2 (%OrderedWith.type.393) = facet_value %Int.loc11_43.1, (%OrderedWith.impl_witness) [symbolic = %OrderedWith.facet (constants.%OrderedWith.facet)]
  568. // CHECK:STDOUT: %.loc13_17.2: type = fn_type_with_self_type %OrderedWith.Less.type, %OrderedWith.facet [symbolic = %.loc13_17.2 (constants.%.db5)]
  569. // CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.type: type = fn_type @Int.as.OrderedWith.impl.Less.1, @Int.as.OrderedWith.impl.849(%N, %N) [symbolic = %Int.as.OrderedWith.impl.Less.type (constants.%Int.as.OrderedWith.impl.Less.type.f52)]
  570. // CHECK:STDOUT: %Int.as.OrderedWith.impl.Less: @IntRange.as.Iterate.impl.Next.%Int.as.OrderedWith.impl.Less.type (%Int.as.OrderedWith.impl.Less.type.f52) = struct_value () [symbolic = %Int.as.OrderedWith.impl.Less (constants.%Int.as.OrderedWith.impl.Less.af3)]
  571. // CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.specific_fn: <specific function> = specific_function %Int.as.OrderedWith.impl.Less, @Int.as.OrderedWith.impl.Less.1(%N, %N) [symbolic = %Int.as.OrderedWith.impl.Less.specific_fn (constants.%Int.as.OrderedWith.impl.Less.specific_fn.0ff)]
  572. // CHECK:STDOUT: %Inc.lookup_impl_witness: <witness> = lookup_impl_witness %Int.loc11_43.1, @Inc [symbolic = %Inc.lookup_impl_witness (constants.%Inc.lookup_impl_witness)]
  573. // CHECK:STDOUT: %Inc.facet: %Inc.type = facet_value %Int.loc11_43.1, (%Inc.lookup_impl_witness) [symbolic = %Inc.facet (constants.%Inc.facet)]
  574. // CHECK:STDOUT: %.loc14_9.2: type = fn_type_with_self_type constants.%Inc.Op.type, %Inc.facet [symbolic = %.loc14_9.2 (constants.%.080)]
  575. // CHECK:STDOUT: %impl.elem0.loc14_9.2: @IntRange.as.Iterate.impl.Next.%.loc14_9.2 (%.080) = impl_witness_access %Inc.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_9.2 (constants.%impl.elem0.923)]
  576. // CHECK:STDOUT: %specific_impl_fn.loc14_9.2: <specific function> = specific_impl_function %impl.elem0.loc14_9.2, @Inc.Op(%Inc.facet) [symbolic = %specific_impl_fn.loc14_9.2 (constants.%specific_impl_fn.173)]
  577. // CHECK:STDOUT: %Optional.Some.type: type = fn_type @Optional.Some, @Optional(%OptionalStorage.facet.loc11_75.1) [symbolic = %Optional.Some.type (constants.%Optional.Some.type.74c)]
  578. // CHECK:STDOUT: %Optional.Some: @IntRange.as.Iterate.impl.Next.%Optional.Some.type (%Optional.Some.type.74c) = struct_value () [symbolic = %Optional.Some (constants.%Optional.Some.37c)]
  579. // CHECK:STDOUT: %Optional.Some.specific_fn.loc15_42.2: <specific function> = specific_function %Optional.Some, @Optional.Some(%OptionalStorage.facet.loc11_75.1) [symbolic = %Optional.Some.specific_fn.loc15_42.2 (constants.%Optional.Some.specific_fn)]
  580. // CHECK:STDOUT: %facet_value: %type_where = facet_value %Int.loc11_43.1, () [symbolic = %facet_value (constants.%facet_value.4a9)]
  581. // CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness imports.%Destroy.impl_witness_table, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value) [symbolic = %Destroy.impl_witness (constants.%Destroy.impl_witness.b47)]
  582. // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Int.loc11_43.1, (%Destroy.impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.11d)]
  583. // CHECK:STDOUT: %.loc12_7: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc12_7 (constants.%.a64)]
  584. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value) [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op.type (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.type.353)]
  585. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op: @IntRange.as.Iterate.impl.Next.%DestroyT.binding.as_type.as.Destroy.impl.Op.type (%DestroyT.binding.as_type.as.Destroy.impl.Op.type.353) = struct_value () [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.3be)]
  586. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function %DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl.Op(%facet_value) [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.e87)]
  587. // CHECK:STDOUT: %Optional.None.type: type = fn_type @Optional.None, @Optional(%OptionalStorage.facet.loc11_75.1) [symbolic = %Optional.None.type (constants.%Optional.None.type.a39)]
  588. // CHECK:STDOUT: %Optional.None: @IntRange.as.Iterate.impl.Next.%Optional.None.type (%Optional.None.type.a39) = struct_value () [symbolic = %Optional.None (constants.%Optional.None.b0b)]
  589. // CHECK:STDOUT: %Optional.None.specific_fn.loc17_42.2: <specific function> = specific_function %Optional.None, @Optional.None(%OptionalStorage.facet.loc11_75.1) [symbolic = %Optional.None.specific_fn.loc17_42.2 (constants.%Optional.None.specific_fn)]
  590. // CHECK:STDOUT:
  591. // CHECK:STDOUT: fn(%self.param: @IntRange.as.Iterate.impl.Next.%IntRange (%IntRange.48b), %cursor.param: @IntRange.as.Iterate.impl.Next.%ptr.loc11_44.1 (%ptr.1cf)) -> %return.param: @IntRange.as.Iterate.impl.Next.%Optional.loc11_75.1 (%Optional.23f) {
  592. // CHECK:STDOUT: !entry:
  593. // CHECK:STDOUT: name_binding_decl {
  594. // CHECK:STDOUT: %value.patt: @IntRange.as.Iterate.impl.Next.%pattern_type.loc12 (%pattern_type.60f8e7.1) = ref_binding_pattern value [concrete]
  595. // CHECK:STDOUT: %value.var_patt: @IntRange.as.Iterate.impl.Next.%pattern_type.loc12 (%pattern_type.60f8e7.1) = var_pattern %value.patt [concrete]
  596. // CHECK:STDOUT: }
  597. // CHECK:STDOUT: %value.var: ref @IntRange.as.Iterate.impl.Next.%Int.loc11_43.1 (%Int.b50e37.1) = var %value.var_patt
  598. // CHECK:STDOUT: %cursor.ref.loc12: @IntRange.as.Iterate.impl.Next.%ptr.loc11_44.1 (%ptr.1cf) = name_ref cursor, %cursor
  599. // CHECK:STDOUT: %.loc12_32.1: ref @IntRange.as.Iterate.impl.Next.%Int.loc11_43.1 (%Int.b50e37.1) = deref %cursor.ref.loc12
  600. // CHECK:STDOUT: %.loc12_32.2: @IntRange.as.Iterate.impl.Next.%Int.loc11_43.1 (%Int.b50e37.1) = acquire_value %.loc12_32.1
  601. // CHECK:STDOUT: %impl.elem0.loc12_32.1: @IntRange.as.Iterate.impl.Next.%.loc12_32.4 (%.20c) = impl_witness_access constants.%Copy.lookup_impl_witness.035, element0 [symbolic = %impl.elem0.loc12_32.2 (constants.%impl.elem0.625)]
  602. // CHECK:STDOUT: %bound_method.loc12_32.1: <bound method> = bound_method %.loc12_32.2, %impl.elem0.loc12_32.1
  603. // CHECK:STDOUT: %specific_impl_fn.loc12_32.1: <specific function> = specific_impl_function %impl.elem0.loc12_32.1, @Copy.Op(constants.%Copy.facet.d3d) [symbolic = %specific_impl_fn.loc12_32.2 (constants.%specific_impl_fn.c88)]
  604. // CHECK:STDOUT: %bound_method.loc12_32.2: <bound method> = bound_method %.loc12_32.2, %specific_impl_fn.loc12_32.1
  605. // CHECK:STDOUT: %.loc12_32.3: init @IntRange.as.Iterate.impl.Next.%Int.loc11_43.1 (%Int.b50e37.1) = call %bound_method.loc12_32.2(%.loc12_32.2)
  606. // CHECK:STDOUT: assign %value.var, %.loc12_32.3
  607. // CHECK:STDOUT: %.loc12_28: type = splice_block %Int.loc12 [symbolic = %Int.loc11_43.1 (constants.%Int.b50e37.1)] {
  608. // CHECK:STDOUT: %Core.ref.loc12: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  609. // CHECK:STDOUT: %Int.ref.loc12: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic]
  610. // CHECK:STDOUT: %N.ref.loc12: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_16.2 [symbolic = %N (constants.%N)]
  611. // CHECK:STDOUT: %Int.loc12: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc11_43.1 (constants.%Int.b50e37.1)]
  612. // CHECK:STDOUT: }
  613. // CHECK:STDOUT: %value: ref @IntRange.as.Iterate.impl.Next.%Int.loc11_43.1 (%Int.b50e37.1) = ref_binding value, %value.var
  614. // CHECK:STDOUT: %value.ref.loc13: ref @IntRange.as.Iterate.impl.Next.%Int.loc11_43.1 (%Int.b50e37.1) = name_ref value, %value
  615. // CHECK:STDOUT: %self.ref: @IntRange.as.Iterate.impl.Next.%IntRange (%IntRange.48b) = name_ref self, %self
  616. // CHECK:STDOUT: %end.ref: @IntRange.as.Iterate.impl.Next.%IntRange.elem (%IntRange.elem.baf) = name_ref end, @IntRange.%.loc23 [concrete = @IntRange.%.loc23]
  617. // CHECK:STDOUT: %.loc13_23.1: ref @IntRange.as.Iterate.impl.Next.%Int.loc11_43.1 (%Int.b50e37.1) = class_element_access %self.ref, element1
  618. // CHECK:STDOUT: %.loc13_23.2: @IntRange.as.Iterate.impl.Next.%Int.loc11_43.1 (%Int.b50e37.1) = acquire_value %.loc13_23.1
  619. // CHECK:STDOUT: %OrderedWith.type.loc13_17.1: type = facet_type <@OrderedWith, @OrderedWith(constants.%Int.b50e37.1)> [symbolic = %OrderedWith.type.loc13_17.2 (constants.%OrderedWith.type.393)]
  620. // CHECK:STDOUT: %.loc13_17.1: @IntRange.as.Iterate.impl.Next.%OrderedWith.assoc_type (%OrderedWith.assoc_type.72a) = specific_constant imports.%Core.import_ref.128, @OrderedWith(constants.%Int.b50e37.1) [symbolic = %assoc0 (constants.%assoc0.3f6)]
  621. // CHECK:STDOUT: %Less.ref: @IntRange.as.Iterate.impl.Next.%OrderedWith.assoc_type (%OrderedWith.assoc_type.72a) = name_ref Less, %.loc13_17.1 [symbolic = %assoc0 (constants.%assoc0.3f6)]
  622. // CHECK:STDOUT: %impl.elem0.loc13: @IntRange.as.Iterate.impl.Next.%.loc13_17.2 (%.db5) = impl_witness_access constants.%OrderedWith.impl_witness.586, element0 [symbolic = %Int.as.OrderedWith.impl.Less (constants.%Int.as.OrderedWith.impl.Less.af3)]
  623. // CHECK:STDOUT: %bound_method.loc13_17.1: <bound method> = bound_method %value.ref.loc13, %impl.elem0.loc13
  624. // CHECK:STDOUT: %specific_fn.loc13: <specific function> = specific_function %impl.elem0.loc13, @Int.as.OrderedWith.impl.Less.1(constants.%N, constants.%N) [symbolic = %Int.as.OrderedWith.impl.Less.specific_fn (constants.%Int.as.OrderedWith.impl.Less.specific_fn.0ff)]
  625. // CHECK:STDOUT: %bound_method.loc13_17.2: <bound method> = bound_method %value.ref.loc13, %specific_fn.loc13
  626. // CHECK:STDOUT: %.loc13_11: @IntRange.as.Iterate.impl.Next.%Int.loc11_43.1 (%Int.b50e37.1) = acquire_value %value.ref.loc13
  627. // CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.call: init bool = call %bound_method.loc13_17.2(%.loc13_11, %.loc13_23.2)
  628. // CHECK:STDOUT: %.loc13_27.1: bool = value_of_initializer %Int.as.OrderedWith.impl.Less.call
  629. // CHECK:STDOUT: %.loc13_27.2: bool = converted %Int.as.OrderedWith.impl.Less.call, %.loc13_27.1
  630. // CHECK:STDOUT: if %.loc13_27.2 br !if.then else br !if.else
  631. // CHECK:STDOUT:
  632. // CHECK:STDOUT: !if.then:
  633. // CHECK:STDOUT: %cursor.ref.loc14: @IntRange.as.Iterate.impl.Next.%ptr.loc11_44.1 (%ptr.1cf) = name_ref cursor, %cursor
  634. // CHECK:STDOUT: %.loc14_11: ref @IntRange.as.Iterate.impl.Next.%Int.loc11_43.1 (%Int.b50e37.1) = deref %cursor.ref.loc14
  635. // CHECK:STDOUT: %impl.elem0.loc14_9.1: @IntRange.as.Iterate.impl.Next.%.loc14_9.2 (%.080) = impl_witness_access constants.%Inc.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_9.2 (constants.%impl.elem0.923)]
  636. // CHECK:STDOUT: %bound_method.loc14_9.1: <bound method> = bound_method %.loc14_11, %impl.elem0.loc14_9.1
  637. // CHECK:STDOUT: %specific_impl_fn.loc14_9.1: <specific function> = specific_impl_function %impl.elem0.loc14_9.1, @Inc.Op(constants.%Inc.facet) [symbolic = %specific_impl_fn.loc14_9.2 (constants.%specific_impl_fn.173)]
  638. // CHECK:STDOUT: %bound_method.loc14_9.2: <bound method> = bound_method %.loc14_11, %specific_impl_fn.loc14_9.1
  639. // CHECK:STDOUT: %.loc14_9.1: init %empty_tuple.type = call %bound_method.loc14_9.2(%.loc14_11)
  640. // CHECK:STDOUT: %Core.ref.loc15_16: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  641. // CHECK:STDOUT: %Optional.ref.loc15: %Optional.type = name_ref Optional, imports.%Core.Optional [concrete = constants.%Optional.generic]
  642. // CHECK:STDOUT: %Core.ref.loc15_30: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  643. // CHECK:STDOUT: %Int.ref.loc15: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic]
  644. // CHECK:STDOUT: %N.ref.loc15: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_16.2 [symbolic = %N (constants.%N)]
  645. // CHECK:STDOUT: %Int.loc15: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc11_43.1 (constants.%Int.b50e37.1)]
  646. // CHECK:STDOUT: %OptionalStorage.facet.loc15_41: %OptionalStorage.type = facet_value %Int.loc15, (constants.%OptionalStorage.lookup_impl_witness.8c6) [symbolic = %OptionalStorage.facet.loc11_75.1 (constants.%OptionalStorage.facet.ea4)]
  647. // CHECK:STDOUT: %.loc15_41: %OptionalStorage.type = converted %Int.loc15, %OptionalStorage.facet.loc15_41 [symbolic = %OptionalStorage.facet.loc11_75.1 (constants.%OptionalStorage.facet.ea4)]
  648. // CHECK:STDOUT: %Optional.loc15: type = class_type @Optional, @Optional(constants.%OptionalStorage.facet.ea4) [symbolic = %Optional.loc11_75.1 (constants.%Optional.23f)]
  649. // CHECK:STDOUT: %.loc15_42: @IntRange.as.Iterate.impl.Next.%Optional.Some.type (%Optional.Some.type.74c) = specific_constant imports.%Core.import_ref.961, @Optional(constants.%OptionalStorage.facet.ea4) [symbolic = %Optional.Some (constants.%Optional.Some.37c)]
  650. // CHECK:STDOUT: %Some.ref: @IntRange.as.Iterate.impl.Next.%Optional.Some.type (%Optional.Some.type.74c) = name_ref Some, %.loc15_42 [symbolic = %Optional.Some (constants.%Optional.Some.37c)]
  651. // CHECK:STDOUT: %value.ref.loc15: ref @IntRange.as.Iterate.impl.Next.%Int.loc11_43.1 (%Int.b50e37.1) = name_ref value, %value
  652. // CHECK:STDOUT: %OptionalStorage.facet.loc15_53.1: %OptionalStorage.type = facet_value constants.%Int.b50e37.1, (constants.%OptionalStorage.lookup_impl_witness.8c6) [symbolic = %OptionalStorage.facet.loc11_75.1 (constants.%OptionalStorage.facet.ea4)]
  653. // CHECK:STDOUT: %.loc15_53.1: %OptionalStorage.type = converted constants.%Int.b50e37.1, %OptionalStorage.facet.loc15_53.1 [symbolic = %OptionalStorage.facet.loc11_75.1 (constants.%OptionalStorage.facet.ea4)]
  654. // CHECK:STDOUT: %OptionalStorage.facet.loc15_53.2: %OptionalStorage.type = facet_value constants.%Int.b50e37.1, (constants.%OptionalStorage.lookup_impl_witness.8c6) [symbolic = %OptionalStorage.facet.loc11_75.1 (constants.%OptionalStorage.facet.ea4)]
  655. // CHECK:STDOUT: %.loc15_53.2: %OptionalStorage.type = converted constants.%Int.b50e37.1, %OptionalStorage.facet.loc15_53.2 [symbolic = %OptionalStorage.facet.loc11_75.1 (constants.%OptionalStorage.facet.ea4)]
  656. // CHECK:STDOUT: %Optional.Some.specific_fn.loc15_42.1: <specific function> = specific_function %Some.ref, @Optional.Some(constants.%OptionalStorage.facet.ea4) [symbolic = %Optional.Some.specific_fn.loc15_42.2 (constants.%Optional.Some.specific_fn)]
  657. // CHECK:STDOUT: %.loc11_47.1: ref @IntRange.as.Iterate.impl.Next.%Optional.loc11_75.1 (%Optional.23f) = splice_block %return {}
  658. // CHECK:STDOUT: %.loc15_48: @IntRange.as.Iterate.impl.Next.%Int.loc11_43.1 (%Int.b50e37.1) = acquire_value %value.ref.loc15
  659. // CHECK:STDOUT: %Optional.Some.call: init @IntRange.as.Iterate.impl.Next.%Optional.loc11_75.1 (%Optional.23f) = call %Optional.Some.specific_fn.loc15_42.1(%.loc15_48) to %.loc11_47.1
  660. // CHECK:STDOUT: %impl.elem0.loc12_7.1: @IntRange.as.Iterate.impl.Next.%.loc12_7 (%.a64) = impl_witness_access constants.%Destroy.impl_witness.b47, element0 [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.3be)]
  661. // CHECK:STDOUT: %bound_method.loc12_7.1: <bound method> = bound_method %value.var, %impl.elem0.loc12_7.1
  662. // CHECK:STDOUT: %specific_fn.loc12_7.1: <specific function> = specific_function %impl.elem0.loc12_7.1, @DestroyT.binding.as_type.as.Destroy.impl.Op(constants.%facet_value.4a9) [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.e87)]
  663. // CHECK:STDOUT: %bound_method.loc12_7.2: <bound method> = bound_method %value.var, %specific_fn.loc12_7.1
  664. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc12_7.1: init %empty_tuple.type = call %bound_method.loc12_7.2(%value.var)
  665. // CHECK:STDOUT: return %Optional.Some.call to %return
  666. // CHECK:STDOUT:
  667. // CHECK:STDOUT: !if.else:
  668. // CHECK:STDOUT: %Core.ref.loc17_16: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  669. // CHECK:STDOUT: %Optional.ref.loc17: %Optional.type = name_ref Optional, imports.%Core.Optional [concrete = constants.%Optional.generic]
  670. // CHECK:STDOUT: %Core.ref.loc17_30: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  671. // CHECK:STDOUT: %Int.ref.loc17: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic]
  672. // CHECK:STDOUT: %N.ref.loc17: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_16.2 [symbolic = %N (constants.%N)]
  673. // CHECK:STDOUT: %Int.loc17: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc11_43.1 (constants.%Int.b50e37.1)]
  674. // CHECK:STDOUT: %OptionalStorage.facet.loc17: %OptionalStorage.type = facet_value %Int.loc17, (constants.%OptionalStorage.lookup_impl_witness.8c6) [symbolic = %OptionalStorage.facet.loc11_75.1 (constants.%OptionalStorage.facet.ea4)]
  675. // CHECK:STDOUT: %.loc17_41: %OptionalStorage.type = converted %Int.loc17, %OptionalStorage.facet.loc17 [symbolic = %OptionalStorage.facet.loc11_75.1 (constants.%OptionalStorage.facet.ea4)]
  676. // CHECK:STDOUT: %Optional.loc17: type = class_type @Optional, @Optional(constants.%OptionalStorage.facet.ea4) [symbolic = %Optional.loc11_75.1 (constants.%Optional.23f)]
  677. // CHECK:STDOUT: %.loc17_42: @IntRange.as.Iterate.impl.Next.%Optional.None.type (%Optional.None.type.a39) = specific_constant imports.%Core.import_ref.f2f, @Optional(constants.%OptionalStorage.facet.ea4) [symbolic = %Optional.None (constants.%Optional.None.b0b)]
  678. // CHECK:STDOUT: %None.ref: @IntRange.as.Iterate.impl.Next.%Optional.None.type (%Optional.None.type.a39) = name_ref None, %.loc17_42 [symbolic = %Optional.None (constants.%Optional.None.b0b)]
  679. // CHECK:STDOUT: %Optional.None.specific_fn.loc17_42.1: <specific function> = specific_function %None.ref, @Optional.None(constants.%OptionalStorage.facet.ea4) [symbolic = %Optional.None.specific_fn.loc17_42.2 (constants.%Optional.None.specific_fn)]
  680. // CHECK:STDOUT: %.loc11_47.2: ref @IntRange.as.Iterate.impl.Next.%Optional.loc11_75.1 (%Optional.23f) = splice_block %return {}
  681. // CHECK:STDOUT: %Optional.None.call: init @IntRange.as.Iterate.impl.Next.%Optional.loc11_75.1 (%Optional.23f) = call %Optional.None.specific_fn.loc17_42.1() to %.loc11_47.2
  682. // CHECK:STDOUT: %impl.elem0.loc12_7.2: @IntRange.as.Iterate.impl.Next.%.loc12_7 (%.a64) = impl_witness_access constants.%Destroy.impl_witness.b47, element0 [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.3be)]
  683. // CHECK:STDOUT: %bound_method.loc12_7.3: <bound method> = bound_method %value.var, %impl.elem0.loc12_7.2
  684. // CHECK:STDOUT: %specific_fn.loc12_7.2: <specific function> = specific_function %impl.elem0.loc12_7.2, @DestroyT.binding.as_type.as.Destroy.impl.Op(constants.%facet_value.4a9) [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.e87)]
  685. // CHECK:STDOUT: %bound_method.loc12_7.4: <bound method> = bound_method %value.var, %specific_fn.loc12_7.2
  686. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc12_7.2: init %empty_tuple.type = call %bound_method.loc12_7.4(%value.var)
  687. // CHECK:STDOUT: return %Optional.None.call to %return
  688. // CHECK:STDOUT: }
  689. // CHECK:STDOUT: }
  690. // CHECK:STDOUT:
  691. // CHECK:STDOUT: fn @Range(%end.param: %i32) -> %return.param: %IntRange.365 {
  692. // CHECK:STDOUT: !entry:
  693. // CHECK:STDOUT: %IntRange.ref.loc27: %IntRange.type = name_ref IntRange, file.%IntRange.decl [concrete = constants.%IntRange.generic]
  694. // CHECK:STDOUT: %int_32.loc27: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  695. // CHECK:STDOUT: %IntRange.loc27: type = class_type @IntRange, @IntRange(constants.%int_32) [concrete = constants.%IntRange.365]
  696. // CHECK:STDOUT: %.loc27_22: %IntRange.Make.type.cef = specific_constant @IntRange.%IntRange.Make.decl, @IntRange(constants.%int_32) [concrete = constants.%IntRange.Make.0dc]
  697. // CHECK:STDOUT: %Make.ref: %IntRange.Make.type.cef = name_ref Make, %.loc27_22 [concrete = constants.%IntRange.Make.0dc]
  698. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6]
  699. // CHECK:STDOUT: %end.ref: %i32 = name_ref end, %end
  700. // CHECK:STDOUT: %IntRange.Make.specific_fn: <specific function> = specific_function %Make.ref, @IntRange.Make(constants.%int_32) [concrete = constants.%IntRange.Make.specific_fn]
  701. // CHECK:STDOUT: %.loc26_20: ref %IntRange.365 = splice_block %return {}
  702. // CHECK:STDOUT: %impl.elem0: %.322 = impl_witness_access constants.%ImplicitAs.impl_witness.bc9, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e9b]
  703. // CHECK:STDOUT: %bound_method.loc27_28.1: <bound method> = bound_method %int_0, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
  704. // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  705. // CHECK:STDOUT: %bound_method.loc27_28.2: <bound method> = bound_method %int_0, %specific_fn [concrete = constants.%bound_method]
  706. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc27_28.2(%int_0) [concrete = constants.%int_0.6a9]
  707. // CHECK:STDOUT: %.loc27_28.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_0.6a9]
  708. // CHECK:STDOUT: %.loc27_28.2: %i32 = converted %int_0, %.loc27_28.1 [concrete = constants.%int_0.6a9]
  709. // CHECK:STDOUT: %IntRange.Make.call: init %IntRange.365 = call %IntRange.Make.specific_fn(%.loc27_28.2, %end.ref) to %.loc26_20
  710. // CHECK:STDOUT: return %IntRange.Make.call to %return
  711. // CHECK:STDOUT: }
  712. // CHECK:STDOUT:
  713. // CHECK:STDOUT: specific @IntRange(constants.%N) {
  714. // CHECK:STDOUT: %N.loc4_16.1 => constants.%N
  715. // CHECK:STDOUT:
  716. // CHECK:STDOUT: !definition:
  717. // CHECK:STDOUT: %IntRange.Make.type => constants.%IntRange.Make.type.121
  718. // CHECK:STDOUT: %IntRange.Make => constants.%IntRange.Make.14e
  719. // CHECK:STDOUT: %Int.loc22_32.2 => constants.%Int.b50e37.1
  720. // CHECK:STDOUT: %require_complete => constants.%require_complete.e66303.1
  721. // CHECK:STDOUT: %IntRange => constants.%IntRange.48b
  722. // CHECK:STDOUT: %IntRange.elem => constants.%IntRange.elem.baf
  723. // CHECK:STDOUT: %struct_type.start.end => constants.%struct_type.start.end.cb5
  724. // CHECK:STDOUT: %complete_type.loc24_1.2 => constants.%complete_type.4f0
  725. // CHECK:STDOUT: }
  726. // CHECK:STDOUT:
  727. // CHECK:STDOUT: specific @IntRange.Make(constants.%N) {
  728. // CHECK:STDOUT: %N => constants.%N
  729. // CHECK:STDOUT: %Int.loc5_28.1 => constants.%Int.b50e37.1
  730. // CHECK:STDOUT: %pattern_type.loc5_11 => constants.%pattern_type.60f8e7.1
  731. // CHECK:STDOUT: %IntRange => constants.%IntRange.48b
  732. // CHECK:STDOUT: %pattern_type.loc5_49 => constants.%pattern_type.6de
  733. // CHECK:STDOUT: }
  734. // CHECK:STDOUT:
  735. // CHECK:STDOUT: specific @IntRange.as.Iterate.impl(constants.%N) {
  736. // CHECK:STDOUT: %N => constants.%N
  737. // CHECK:STDOUT: %IntRange => constants.%IntRange.48b
  738. // CHECK:STDOUT: %Int.loc9_54.1 => constants.%Int.b50e37.1
  739. // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.lookup_impl_witness.035
  740. // CHECK:STDOUT: %Copy.facet.loc9_85.1 => constants.%Copy.facet.d3d
  741. // CHECK:STDOUT: %Iterate_where.type => constants.%Iterate_where.type
  742. // CHECK:STDOUT: %require_complete => constants.%require_complete.e76
  743. // CHECK:STDOUT: %Iterate.impl_witness => constants.%Iterate.impl_witness
  744. // CHECK:STDOUT:
  745. // CHECK:STDOUT: !definition:
  746. // CHECK:STDOUT: %IntRange.as.Iterate.impl.NewCursor.type => constants.%IntRange.as.Iterate.impl.NewCursor.type
  747. // CHECK:STDOUT: %IntRange.as.Iterate.impl.NewCursor => constants.%IntRange.as.Iterate.impl.NewCursor
  748. // CHECK:STDOUT: %IntRange.as.Iterate.impl.Next.type => constants.%IntRange.as.Iterate.impl.Next.type
  749. // CHECK:STDOUT: %IntRange.as.Iterate.impl.Next => constants.%IntRange.as.Iterate.impl.Next
  750. // CHECK:STDOUT: }
  751. // CHECK:STDOUT:
  752. // CHECK:STDOUT: specific @IntRange.as.Iterate.impl.NewCursor(constants.%N) {
  753. // CHECK:STDOUT: %N => constants.%N
  754. // CHECK:STDOUT: %IntRange => constants.%IntRange.48b
  755. // CHECK:STDOUT: %pattern_type.loc10_18 => constants.%pattern_type.6de
  756. // CHECK:STDOUT: %Int.loc10_45.1 => constants.%Int.b50e37.1
  757. // CHECK:STDOUT: %pattern_type.loc10_32 => constants.%pattern_type.60f8e7.1
  758. // CHECK:STDOUT: }
  759. // CHECK:STDOUT:
  760. // CHECK:STDOUT: specific @IntRange.as.Iterate.impl.Next(constants.%N) {
  761. // CHECK:STDOUT: %N => constants.%N
  762. // CHECK:STDOUT: %IntRange => constants.%IntRange.48b
  763. // CHECK:STDOUT: %pattern_type.loc11_13 => constants.%pattern_type.6de
  764. // CHECK:STDOUT: %Int.loc11_43.1 => constants.%Int.b50e37.1
  765. // CHECK:STDOUT: %ptr.loc11_44.1 => constants.%ptr.1cf
  766. // CHECK:STDOUT: %pattern_type.loc11_25 => constants.%pattern_type.054
  767. // CHECK:STDOUT: %OptionalStorage.lookup_impl_witness => constants.%OptionalStorage.lookup_impl_witness.8c6
  768. // CHECK:STDOUT: %OptionalStorage.facet.loc11_75.1 => constants.%OptionalStorage.facet.ea4
  769. // CHECK:STDOUT: %Optional.loc11_75.1 => constants.%Optional.23f
  770. // CHECK:STDOUT: %pattern_type.loc11_47 => constants.%pattern_type.9f4
  771. // CHECK:STDOUT: }
  772. // CHECK:STDOUT:
  773. // CHECK:STDOUT: specific @IntRange(constants.%int_32) {
  774. // CHECK:STDOUT: %N.loc4_16.1 => constants.%int_32
  775. // CHECK:STDOUT:
  776. // CHECK:STDOUT: !definition:
  777. // CHECK:STDOUT: %IntRange.Make.type => constants.%IntRange.Make.type.cef
  778. // CHECK:STDOUT: %IntRange.Make => constants.%IntRange.Make.0dc
  779. // CHECK:STDOUT: %Int.loc22_32.2 => constants.%i32
  780. // CHECK:STDOUT: %require_complete => constants.%complete_type.f8a
  781. // CHECK:STDOUT: %IntRange => constants.%IntRange.365
  782. // CHECK:STDOUT: %IntRange.elem => constants.%IntRange.elem.e33
  783. // CHECK:STDOUT: %struct_type.start.end => constants.%struct_type.start.end.d0a
  784. // CHECK:STDOUT: %complete_type.loc24_1.2 => constants.%complete_type.c45
  785. // CHECK:STDOUT: }
  786. // CHECK:STDOUT:
  787. // CHECK:STDOUT: specific @IntRange.Make(constants.%int_32) {
  788. // CHECK:STDOUT: %N => constants.%int_32
  789. // CHECK:STDOUT: %Int.loc5_28.1 => constants.%i32
  790. // CHECK:STDOUT: %pattern_type.loc5_11 => constants.%pattern_type.7ce
  791. // CHECK:STDOUT: %IntRange => constants.%IntRange.365
  792. // CHECK:STDOUT: %pattern_type.loc5_49 => constants.%pattern_type.d16
  793. // CHECK:STDOUT:
  794. // CHECK:STDOUT: !definition:
  795. // CHECK:STDOUT: %require_complete.loc5_49 => constants.%complete_type.c45
  796. // CHECK:STDOUT: %require_complete.loc5_16 => constants.%complete_type.f8a
  797. // CHECK:STDOUT: %struct_type.start.end => constants.%struct_type.start.end.d0a
  798. // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.impl_witness.fb7
  799. // CHECK:STDOUT: %Copy.facet => constants.%Copy.facet.c50
  800. // CHECK:STDOUT: %.loc6_22.2 => constants.%.65f
  801. // CHECK:STDOUT: %impl.elem0.loc6_22.2 => constants.%Int.as.Copy.impl.Op.dfd
  802. // CHECK:STDOUT: %specific_impl_fn.loc6_22.2 => constants.%Int.as.Copy.impl.Op.specific_fn
  803. // CHECK:STDOUT: }
  804. // CHECK:STDOUT:
  805. // CHECK:STDOUT: --- trivial.carbon
  806. // CHECK:STDOUT:
  807. // CHECK:STDOUT: constants {
  808. // CHECK:STDOUT: %Read.type: type = fn_type @Read [concrete]
  809. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  810. // CHECK:STDOUT: %Read: %Read.type = struct_value () [concrete]
  811. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  812. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
  813. // CHECK:STDOUT: %IntLiteral.type: type = fn_type @IntLiteral [concrete]
  814. // CHECK:STDOUT: %IntLiteral: %IntLiteral.type = struct_value () [concrete]
  815. // CHECK:STDOUT: %y: Core.IntLiteral = symbolic_binding y, 0 [symbolic]
  816. // CHECK:STDOUT: %pattern_type.dc0: type = pattern_type Core.IntLiteral [concrete]
  817. // CHECK:STDOUT: %int_43: Core.IntLiteral = int_value 43 [concrete]
  818. // CHECK:STDOUT: %IntRange.type: type = generic_class_type @IntRange [concrete]
  819. // CHECK:STDOUT: %IntRange.generic: %IntRange.type = struct_value () [concrete]
  820. // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
  821. // CHECK:STDOUT: %Int.f4f02c.1: type = class_type @Int, @Int(%N) [symbolic]
  822. // CHECK:STDOUT: %struct_type.start.end.fb5: type = struct_type {.start: %Int.f4f02c.1, .end: %Int.f4f02c.1} [symbolic]
  823. // CHECK:STDOUT: %complete_type.655: <witness> = complete_type_witness %struct_type.start.end.fb5 [symbolic]
  824. // CHECK:STDOUT: %IntRange.48b: type = class_type @IntRange, @IntRange(%N) [symbolic]
  825. // CHECK:STDOUT: %IntRange.Make.type.121: type = fn_type @IntRange.Make, @IntRange(%N) [symbolic]
  826. // CHECK:STDOUT: %IntRange.Make.14e: %IntRange.Make.type.121 = struct_value () [symbolic]
  827. // CHECK:STDOUT: %pattern_type.6de: type = pattern_type %IntRange.48b [symbolic]
  828. // CHECK:STDOUT: %pattern_type.e3e33e.1: type = pattern_type %Int.f4f02c.1 [symbolic]
  829. // CHECK:STDOUT: %require_complete.001e59.1: <witness> = require_complete_type %Int.f4f02c.1 [symbolic]
  830. // CHECK:STDOUT: %IntRange.elem.4f4: type = unbound_element_type %IntRange.48b, %Int.f4f02c.1 [symbolic]
  831. // CHECK:STDOUT: %require_complete.b4c: <witness> = require_complete_type %IntRange.48b [symbolic]
  832. // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete]
  833. // CHECK:STDOUT: %Copy.lookup_impl_witness.d1a: <witness> = lookup_impl_witness %Int.f4f02c.1, @Copy [symbolic]
  834. // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %Int.f4f02c.1, (%Copy.lookup_impl_witness.d1a) [symbolic]
  835. // CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete]
  836. // CHECK:STDOUT: %.b90: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [symbolic]
  837. // CHECK:STDOUT: %impl.elem0.305: %.b90 = impl_witness_access %Copy.lookup_impl_witness.d1a, element0 [symbolic]
  838. // CHECK:STDOUT: %specific_impl_fn.3a3: <specific function> = specific_impl_function %impl.elem0.305, @Copy.Op(%Copy.facet) [symbolic]
  839. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  840. // CHECK:STDOUT: %IntRange.365: type = class_type @IntRange, @IntRange(%int_32) [concrete]
  841. // CHECK:STDOUT: %IntRange.Make.type.cef: type = fn_type @IntRange.Make, @IntRange(%int_32) [concrete]
  842. // CHECK:STDOUT: %IntRange.Make.0dc: %IntRange.Make.type.cef = struct_value () [concrete]
  843. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  844. // CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [concrete]
  845. // CHECK:STDOUT: %complete_type.f8a: <witness> = complete_type_witness %i32.builtin [concrete]
  846. // CHECK:STDOUT: %IntRange.elem.f21: type = unbound_element_type %IntRange.365, %i32 [concrete]
  847. // CHECK:STDOUT: %struct_type.start.end.0fe: type = struct_type {.start: %i32, .end: %i32} [concrete]
  848. // CHECK:STDOUT: %complete_type.a43: <witness> = complete_type_witness %struct_type.start.end.0fe [concrete]
  849. // CHECK:STDOUT: %pattern_type.d16: type = pattern_type %IntRange.365 [concrete]
  850. // CHECK:STDOUT: %Range.type: type = fn_type @Range [concrete]
  851. // CHECK:STDOUT: %Range: %Range.type = struct_value () [concrete]
  852. // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
  853. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
  854. // CHECK:STDOUT: %ImplicitAs.type.bd9: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
  855. // CHECK:STDOUT: %ImplicitAs.Convert.type.6da: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete]
  856. // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
  857. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.365: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic]
  858. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.8cf: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.365 = struct_value () [symbolic]
  859. // CHECK:STDOUT: %ImplicitAs.impl_witness.09b: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.04e, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  860. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.069: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  861. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.13e: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.069 = struct_value () [concrete]
  862. // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.bd9 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.09b) [concrete]
  863. // CHECK:STDOUT: %.1a5: type = fn_type_with_self_type %ImplicitAs.Convert.type.6da, %ImplicitAs.facet [concrete]
  864. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %y, %Core.IntLiteral.as.ImplicitAs.impl.Convert.13e [symbolic]
  865. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.13e, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete]
  866. // CHECK:STDOUT: %bound_method: <bound method> = bound_method %y, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [symbolic]
  867. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method(%y) [symbolic]
  868. // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
  869. // CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanDestroy>> [concrete]
  870. // CHECK:STDOUT: %facet_value: %type_where = facet_value %IntRange.365, () [concrete]
  871. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.fef: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value) [concrete]
  872. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.875: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.fef = struct_value () [concrete]
  873. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function %DestroyT.binding.as_type.as.Destroy.impl.Op.875, @DestroyT.binding.as_type.as.Destroy.impl.Op(%facet_value) [concrete]
  874. // CHECK:STDOUT: }
  875. // CHECK:STDOUT:
  876. // CHECK:STDOUT: imports {
  877. // CHECK:STDOUT: %Main.IntRange: %IntRange.type = import_ref Main//lib, IntRange, loaded [concrete = constants.%IntRange.generic]
  878. // CHECK:STDOUT: %Main.Range: %Range.type = import_ref Main//lib, Range, loaded [concrete = constants.%Range]
  879. // CHECK:STDOUT: %Core.ece: <namespace> = namespace file.%Core.import, [concrete] {
  880. // CHECK:STDOUT: .IntLiteral = %Core.IntLiteral
  881. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  882. // CHECK:STDOUT: .Destroy = %Core.Destroy
  883. // CHECK:STDOUT: import Core//prelude
  884. // CHECK:STDOUT: import Core//prelude/...
  885. // CHECK:STDOUT: }
  886. // CHECK:STDOUT: %Core.IntLiteral: %IntLiteral.type = import_ref Core//prelude/types/int_literal, IntLiteral, loaded [concrete = constants.%IntLiteral]
  887. // CHECK:STDOUT: %Main.import_ref.40af26.1: Core.IntLiteral = import_ref Main//lib, loc4_16, loaded [symbolic = @IntRange.%N (constants.%N)]
  888. // CHECK:STDOUT: %Main.import_ref.80d: <witness> = import_ref Main//lib, loc24_1, loaded [symbolic = @IntRange.%complete_type (constants.%complete_type.655)]
  889. // CHECK:STDOUT: %Main.import_ref.b1b = import_ref Main//lib, inst{{[0-9A-F]+}} [no loc], unloaded
  890. // CHECK:STDOUT: %Main.import_ref.765 = import_ref Main//lib, loc5_57, unloaded
  891. // CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//lib, loc22_20, unloaded
  892. // CHECK:STDOUT: %Main.import_ref.997 = import_ref Main//lib, loc23_18, unloaded
  893. // CHECK:STDOUT: %Main.import_ref.40af26.2: Core.IntLiteral = import_ref Main//lib, loc4_16, loaded [symbolic = @IntRange.%N (constants.%N)]
  894. // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
  895. // CHECK:STDOUT: %Core.import_ref.7d5: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.365) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.8cf)]
  896. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.04e = impl_witness_table (%Core.import_ref.7d5), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
  897. // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
  898. // CHECK:STDOUT: }
  899. // CHECK:STDOUT:
  900. // CHECK:STDOUT: file {
  901. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  902. // CHECK:STDOUT: .IntRange = imports.%Main.IntRange
  903. // CHECK:STDOUT: .Range = imports.%Main.Range
  904. // CHECK:STDOUT: .Core = imports.%Core.ece
  905. // CHECK:STDOUT: .Read = %Read.decl
  906. // CHECK:STDOUT: }
  907. // CHECK:STDOUT: %Core.import = import Core
  908. // CHECK:STDOUT: %default.import = import <none>
  909. // CHECK:STDOUT: %Read.decl: %Read.type = fn_decl @Read [concrete = constants.%Read] {} {}
  910. // CHECK:STDOUT: }
  911. // CHECK:STDOUT:
  912. // CHECK:STDOUT: generic class @IntRange(imports.%Main.import_ref.40af26.1: Core.IntLiteral) [from "lib.carbon"] {
  913. // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N (constants.%N)]
  914. // CHECK:STDOUT:
  915. // CHECK:STDOUT: !definition:
  916. // CHECK:STDOUT: %IntRange.Make.type: type = fn_type @IntRange.Make, @IntRange(%N) [symbolic = %IntRange.Make.type (constants.%IntRange.Make.type.121)]
  917. // CHECK:STDOUT: %IntRange.Make: @IntRange.%IntRange.Make.type (%IntRange.Make.type.121) = struct_value () [symbolic = %IntRange.Make (constants.%IntRange.Make.14e)]
  918. // CHECK:STDOUT: %Int: type = class_type @Int, @Int(%N) [symbolic = %Int (constants.%Int.f4f02c.1)]
  919. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Int [symbolic = %require_complete (constants.%require_complete.001e59.1)]
  920. // CHECK:STDOUT: %IntRange: type = class_type @IntRange, @IntRange(%N) [symbolic = %IntRange (constants.%IntRange.48b)]
  921. // CHECK:STDOUT: %IntRange.elem: type = unbound_element_type %IntRange, %Int [symbolic = %IntRange.elem (constants.%IntRange.elem.4f4)]
  922. // CHECK:STDOUT: %struct_type.start.end: type = struct_type {.start: @IntRange.%Int (%Int.f4f02c.1), .end: @IntRange.%Int (%Int.f4f02c.1)} [symbolic = %struct_type.start.end (constants.%struct_type.start.end.fb5)]
  923. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %struct_type.start.end [symbolic = %complete_type (constants.%complete_type.655)]
  924. // CHECK:STDOUT:
  925. // CHECK:STDOUT: class {
  926. // CHECK:STDOUT: complete_type_witness = imports.%Main.import_ref.80d
  927. // CHECK:STDOUT:
  928. // CHECK:STDOUT: !members:
  929. // CHECK:STDOUT: .Self = imports.%Main.import_ref.b1b
  930. // CHECK:STDOUT: .Make = imports.%Main.import_ref.765
  931. // CHECK:STDOUT: .start [private] = imports.%Main.import_ref.e5d
  932. // CHECK:STDOUT: .end [private] = imports.%Main.import_ref.997
  933. // CHECK:STDOUT: }
  934. // CHECK:STDOUT: }
  935. // CHECK:STDOUT:
  936. // CHECK:STDOUT: fn @Read() {
  937. // CHECK:STDOUT: !entry:
  938. // CHECK:STDOUT: name_binding_decl {
  939. // CHECK:STDOUT: %y.patt: %pattern_type.dc0 = symbolic_binding_pattern y, 0 [concrete]
  940. // CHECK:STDOUT: }
  941. // CHECK:STDOUT: %int_43: Core.IntLiteral = int_value 43 [concrete = constants.%int_43]
  942. // CHECK:STDOUT: %.loc5_27.1: type = splice_block %.loc5_27.3 [concrete = Core.IntLiteral] {
  943. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  944. // CHECK:STDOUT: %Core.ref: <namespace> = name_ref Core, imports.%Core.ece [concrete = imports.%Core.ece]
  945. // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, imports.%Core.IntLiteral [concrete = constants.%IntLiteral]
  946. // CHECK:STDOUT: %IntLiteral.call: init type = call %IntLiteral.ref() [concrete = Core.IntLiteral]
  947. // CHECK:STDOUT: %.loc5_27.2: type = value_of_initializer %IntLiteral.call [concrete = Core.IntLiteral]
  948. // CHECK:STDOUT: %.loc5_27.3: type = converted %IntLiteral.call, %.loc5_27.2 [concrete = Core.IntLiteral]
  949. // CHECK:STDOUT: }
  950. // CHECK:STDOUT: %y: Core.IntLiteral = symbolic_binding y, 0, %int_43 [symbolic = constants.%y]
  951. // CHECK:STDOUT: name_binding_decl {
  952. // CHECK:STDOUT: %x.patt: %pattern_type.d16 = ref_binding_pattern x [concrete]
  953. // CHECK:STDOUT: %x.var_patt: %pattern_type.d16 = var_pattern %x.patt [concrete]
  954. // CHECK:STDOUT: }
  955. // CHECK:STDOUT: %x.var: ref %IntRange.365 = var %x.var_patt
  956. // CHECK:STDOUT: %Range.ref: %Range.type = name_ref Range, imports.%Main.Range [concrete = constants.%Range]
  957. // CHECK:STDOUT: %y.ref: Core.IntLiteral = name_ref y, %y [symbolic = constants.%y]
  958. // CHECK:STDOUT: %.loc6_3: ref %IntRange.365 = splice_block %x.var {}
  959. // CHECK:STDOUT: %impl.elem0: %.1a5 = impl_witness_access constants.%ImplicitAs.impl_witness.09b, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.13e]
  960. // CHECK:STDOUT: %bound_method.loc6_31.1: <bound method> = bound_method %y.ref, %impl.elem0 [symbolic = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
  961. // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  962. // CHECK:STDOUT: %bound_method.loc6_31.2: <bound method> = bound_method %y.ref, %specific_fn [symbolic = constants.%bound_method]
  963. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc6_31.2(%y.ref) [symbolic = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.call]
  964. // CHECK:STDOUT: %.loc6_31.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [symbolic = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.call]
  965. // CHECK:STDOUT: %.loc6_31.2: %i32 = converted %y.ref, %.loc6_31.1 [symbolic = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.call]
  966. // CHECK:STDOUT: %Range.call: init %IntRange.365 = call %Range.ref(%.loc6_31.2) to %.loc6_3
  967. // CHECK:STDOUT: assign %x.var, %Range.call
  968. // CHECK:STDOUT: %.loc6_21: type = splice_block %IntRange [concrete = constants.%IntRange.365] {
  969. // CHECK:STDOUT: %IntRange.ref: %IntRange.type = name_ref IntRange, imports.%Main.IntRange [concrete = constants.%IntRange.generic]
  970. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  971. // CHECK:STDOUT: %IntRange: type = class_type @IntRange, @IntRange(constants.%int_32) [concrete = constants.%IntRange.365]
  972. // CHECK:STDOUT: }
  973. // CHECK:STDOUT: %x: ref %IntRange.365 = ref_binding x, %x.var
  974. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound: <bound method> = bound_method %x.var, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.875
  975. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.875, @DestroyT.binding.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn]
  976. // CHECK:STDOUT: %bound_method.loc6_3: <bound method> = bound_method %x.var, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn
  977. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc6_3(%x.var)
  978. // CHECK:STDOUT: return
  979. // CHECK:STDOUT: }
  980. // CHECK:STDOUT:
  981. // CHECK:STDOUT: generic fn @IntRange.Make(imports.%Main.import_ref.40af26.2: Core.IntLiteral) [from "lib.carbon"] {
  982. // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N (constants.%N)]
  983. // CHECK:STDOUT: %Int: type = class_type @Int, @Int(%N) [symbolic = %Int (constants.%Int.f4f02c.1)]
  984. // CHECK:STDOUT: %pattern_type.1: type = pattern_type %Int [symbolic = %pattern_type.1 (constants.%pattern_type.e3e33e.1)]
  985. // CHECK:STDOUT: %IntRange: type = class_type @IntRange, @IntRange(%N) [symbolic = %IntRange (constants.%IntRange.48b)]
  986. // CHECK:STDOUT: %pattern_type.2: type = pattern_type %IntRange [symbolic = %pattern_type.2 (constants.%pattern_type.6de)]
  987. // CHECK:STDOUT:
  988. // CHECK:STDOUT: !definition:
  989. // CHECK:STDOUT: %require_complete.1: <witness> = require_complete_type %IntRange [symbolic = %require_complete.1 (constants.%require_complete.b4c)]
  990. // CHECK:STDOUT: %require_complete.2: <witness> = require_complete_type %Int [symbolic = %require_complete.2 (constants.%require_complete.001e59.1)]
  991. // CHECK:STDOUT: %struct_type.start.end: type = struct_type {.start: @IntRange.Make.%Int (%Int.f4f02c.1), .end: @IntRange.Make.%Int (%Int.f4f02c.1)} [symbolic = %struct_type.start.end (constants.%struct_type.start.end.fb5)]
  992. // CHECK:STDOUT: %Copy.lookup_impl_witness: <witness> = lookup_impl_witness %Int, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.d1a)]
  993. // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %Int, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet)]
  994. // CHECK:STDOUT: %.1: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.1 (constants.%.b90)]
  995. // CHECK:STDOUT: %impl.elem0: @IntRange.Make.%.1 (%.b90) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0 (constants.%impl.elem0.305)]
  996. // CHECK:STDOUT: %specific_impl_fn: <specific function> = specific_impl_function %impl.elem0, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn (constants.%specific_impl_fn.3a3)]
  997. // CHECK:STDOUT:
  998. // CHECK:STDOUT: fn;
  999. // CHECK:STDOUT: }
  1000. // CHECK:STDOUT:
  1001. // CHECK:STDOUT: fn @Range [from "lib.carbon"];
  1002. // CHECK:STDOUT:
  1003. // CHECK:STDOUT: specific @IntRange(constants.%N) {
  1004. // CHECK:STDOUT: %N => constants.%N
  1005. // CHECK:STDOUT:
  1006. // CHECK:STDOUT: !definition:
  1007. // CHECK:STDOUT: %IntRange.Make.type => constants.%IntRange.Make.type.121
  1008. // CHECK:STDOUT: %IntRange.Make => constants.%IntRange.Make.14e
  1009. // CHECK:STDOUT: %Int => constants.%Int.f4f02c.1
  1010. // CHECK:STDOUT: %require_complete => constants.%require_complete.001e59.1
  1011. // CHECK:STDOUT: %IntRange => constants.%IntRange.48b
  1012. // CHECK:STDOUT: %IntRange.elem => constants.%IntRange.elem.4f4
  1013. // CHECK:STDOUT: %struct_type.start.end => constants.%struct_type.start.end.fb5
  1014. // CHECK:STDOUT: %complete_type => constants.%complete_type.655
  1015. // CHECK:STDOUT: }
  1016. // CHECK:STDOUT:
  1017. // CHECK:STDOUT: specific @IntRange.Make(constants.%N) {
  1018. // CHECK:STDOUT: %N => constants.%N
  1019. // CHECK:STDOUT: %Int => constants.%Int.f4f02c.1
  1020. // CHECK:STDOUT: %pattern_type.1 => constants.%pattern_type.e3e33e.1
  1021. // CHECK:STDOUT: %IntRange => constants.%IntRange.48b
  1022. // CHECK:STDOUT: %pattern_type.2 => constants.%pattern_type.6de
  1023. // CHECK:STDOUT: }
  1024. // CHECK:STDOUT:
  1025. // CHECK:STDOUT: specific @IntRange(constants.%int_32) {
  1026. // CHECK:STDOUT: %N => constants.%int_32
  1027. // CHECK:STDOUT:
  1028. // CHECK:STDOUT: !definition:
  1029. // CHECK:STDOUT: %IntRange.Make.type => constants.%IntRange.Make.type.cef
  1030. // CHECK:STDOUT: %IntRange.Make => constants.%IntRange.Make.0dc
  1031. // CHECK:STDOUT: %Int => constants.%i32
  1032. // CHECK:STDOUT: %require_complete => constants.%complete_type.f8a
  1033. // CHECK:STDOUT: %IntRange => constants.%IntRange.365
  1034. // CHECK:STDOUT: %IntRange.elem => constants.%IntRange.elem.f21
  1035. // CHECK:STDOUT: %struct_type.start.end => constants.%struct_type.start.end.0fe
  1036. // CHECK:STDOUT: %complete_type => constants.%complete_type.a43
  1037. // CHECK:STDOUT: }
  1038. // CHECK:STDOUT: