actual.carbon 112 KB

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