actual.carbon 115 KB

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