actual.carbon 130 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322
  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: %IntLiteral.type: type = fn_type @IntLiteral [concrete]
  47. // CHECK:STDOUT: %IntLiteral: %IntLiteral.type = struct_value () [concrete]
  48. // CHECK:STDOUT: %N.c80: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic]
  49. // CHECK:STDOUT: %pattern_type.dc0: type = pattern_type Core.IntLiteral [concrete]
  50. // CHECK:STDOUT: %IntRange.type: type = generic_class_type @IntRange [concrete]
  51. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  52. // CHECK:STDOUT: %IntRange.generic: %IntRange.type = struct_value () [concrete]
  53. // CHECK:STDOUT: %IntRange.349: type = class_type @IntRange, @IntRange(%N.c80) [symbolic]
  54. // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
  55. // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
  56. // CHECK:STDOUT: %Int.49d0e6.1: type = class_type @Int, @Int(%N.c80) [symbolic]
  57. // CHECK:STDOUT: %pattern_type.8963eb.1: type = pattern_type %Int.49d0e6.1 [symbolic]
  58. // CHECK:STDOUT: %pattern_type.dcd: type = pattern_type %IntRange.349 [symbolic]
  59. // CHECK:STDOUT: %IntRange.Make.type.51f: type = fn_type @IntRange.Make, @IntRange(%N.c80) [symbolic]
  60. // CHECK:STDOUT: %IntRange.Make.2ec: %IntRange.Make.type.51f = struct_value () [symbolic]
  61. // CHECK:STDOUT: %Iterate.type: type = facet_type <@Iterate> [concrete]
  62. // CHECK:STDOUT: %Self.a96: %Iterate.type = bind_symbolic_name Self, 0 [symbolic]
  63. // CHECK:STDOUT: %.Self.ef1: %Iterate.type = bind_symbolic_name .Self [symbolic_self]
  64. // CHECK:STDOUT: %Iterate.assoc_type: type = assoc_entity_type @Iterate [concrete]
  65. // CHECK:STDOUT: %assoc1.02e: %Iterate.assoc_type = assoc_entity element1, imports.%Core.import_ref.9e6 [concrete]
  66. // CHECK:STDOUT: %.Self.as_type.935: type = facet_access_type %.Self.ef1 [symbolic_self]
  67. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  68. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  69. // CHECK:STDOUT: %Iterate.lookup_impl_witness.65a: <witness> = lookup_impl_witness %.Self.ef1, @Iterate [symbolic_self]
  70. // CHECK:STDOUT: %impl.elem1.164: type = impl_witness_access %Iterate.lookup_impl_witness.65a, element1 [symbolic_self]
  71. // CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic]
  72. // CHECK:STDOUT: %impl.elem0.19f: type = impl_witness_access %Iterate.lookup_impl_witness.65a, element0 [symbolic_self]
  73. // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete]
  74. // CHECK:STDOUT: %Optional.type: type = generic_class_type @Optional [concrete]
  75. // CHECK:STDOUT: %Optional.generic: %Optional.type = struct_value () [concrete]
  76. // CHECK:STDOUT: %Optional.None.type.ef2: type = fn_type @Optional.None, @Optional(%T.8b3) [symbolic]
  77. // CHECK:STDOUT: %Optional.None.fd6: %Optional.None.type.ef2 = struct_value () [symbolic]
  78. // CHECK:STDOUT: %Optional.Some.type.b2c: type = fn_type @Optional.Some, @Optional(%T.8b3) [symbolic]
  79. // CHECK:STDOUT: %Optional.Some.d0d: %Optional.Some.type.b2c = struct_value () [symbolic]
  80. // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic]
  81. // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
  82. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
  83. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.0f9: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To.c80) [symbolic]
  84. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.f06: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.0f9 = struct_value () [symbolic]
  85. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.035: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  86. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.956: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.035 = struct_value () [concrete]
  87. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.956, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete]
  88. // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
  89. // CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete]
  90. // CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
  91. // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
  92. // CHECK:STDOUT: %ImplicitAs.impl_witness.1fb: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.2b9, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  93. // CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [concrete]
  94. // CHECK:STDOUT: %complete_type.f8a: <witness> = complete_type_witness %i32.builtin [concrete]
  95. // CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete]
  96. // CHECK:STDOUT: %Destroy.impl_witness.3a2: <witness> = impl_witness imports.%Destroy.impl_witness_table.1b4, @Int.as.Destroy.impl(%N.c80) [symbolic]
  97. // CHECK:STDOUT: %Int.as.Destroy.impl.Op.type: type = fn_type @Int.as.Destroy.impl.Op, @Int.as.Destroy.impl(%N.c80) [symbolic]
  98. // CHECK:STDOUT: %Int.as.Destroy.impl.Op: %Int.as.Destroy.impl.Op.type = struct_value () [symbolic]
  99. // CHECK:STDOUT: %ptr.784: type = ptr_type %Int.49d0e6.1 [symbolic]
  100. // CHECK:STDOUT: %pattern_type.4dc: type = pattern_type %ptr.784 [symbolic]
  101. // CHECK:STDOUT: %M: Core.IntLiteral = bind_symbolic_name M, 1 [symbolic]
  102. // CHECK:STDOUT: %Other: type = bind_symbolic_name Other, 0 [symbolic]
  103. // CHECK:STDOUT: %require_complete.b4f426.3: <witness> = require_complete_type %Int.49d0e6.1 [symbolic]
  104. // CHECK:STDOUT: %OrderedWith.type.270: type = generic_interface_type @OrderedWith [concrete]
  105. // CHECK:STDOUT: %OrderedWith.generic: %OrderedWith.type.270 = struct_value () [concrete]
  106. // CHECK:STDOUT: %OrderedWith.Less.type.f19: type = fn_type @OrderedWith.Less, @OrderedWith(%Other) [symbolic]
  107. // CHECK:STDOUT: %OrderedWith.Less.02e: %OrderedWith.Less.type.f19 = struct_value () [symbolic]
  108. // CHECK:STDOUT: %OrderedWith.assoc_type.03c: type = assoc_entity_type @OrderedWith, @OrderedWith(%Other) [symbolic]
  109. // CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.type.2c7: type = fn_type @Int.as.OrderedWith.impl.Less.1, @Int.as.OrderedWith.impl.db3(%N.c80, %M) [symbolic]
  110. // CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.a5a: %Int.as.OrderedWith.impl.Less.type.2c7 = struct_value () [symbolic]
  111. // CHECK:STDOUT: %OrderedWith.type.872: type = facet_type <@OrderedWith, @OrderedWith(%Int.49d0e6.1)> [symbolic]
  112. // CHECK:STDOUT: %require_complete.66b6: <witness> = require_complete_type %OrderedWith.type.872 [symbolic]
  113. // CHECK:STDOUT: %OrderedWith.Less.type.8fe: type = fn_type @OrderedWith.Less, @OrderedWith(%Int.49d0e6.1) [symbolic]
  114. // CHECK:STDOUT: %OrderedWith.assoc_type.d92: type = assoc_entity_type @OrderedWith, @OrderedWith(%Int.49d0e6.1) [symbolic]
  115. // CHECK:STDOUT: %assoc0.8dc: %OrderedWith.assoc_type.d92 = assoc_entity element0, imports.%Core.import_ref.13d [symbolic]
  116. // CHECK:STDOUT: %require_complete.0f5: <witness> = require_complete_type %ptr.784 [symbolic]
  117. // CHECK:STDOUT: %Inc.type: type = facet_type <@Inc> [concrete]
  118. // CHECK:STDOUT: %Iterate.facet.7f1: %Iterate.type = facet_value %.Self.as_type.935, (%Iterate.lookup_impl_witness.65a) [symbolic_self]
  119. // CHECK:STDOUT: %assoc0.724: %Iterate.assoc_type = assoc_entity element0, imports.%Core.import_ref.4f9 [concrete]
  120. // CHECK:STDOUT: %Iterate_where.type.fce: type = facet_type <@Iterate where %impl.elem1.164 = %Int.49d0e6.1 and %impl.elem0.19f = %Int.49d0e6.1> [symbolic]
  121. // CHECK:STDOUT: %require_complete.d96: <witness> = require_complete_type %Iterate_where.type.fce [symbolic]
  122. // CHECK:STDOUT: %Iterate.impl_witness.48e: <witness> = impl_witness @IntRange.%Iterate.impl_witness_table, @IntRange.as.Iterate.impl(%N.c80) [symbolic]
  123. // CHECK:STDOUT: %IntRange.as.Iterate.impl.NewCursor.type: type = fn_type @IntRange.as.Iterate.impl.NewCursor, @IntRange.as.Iterate.impl(%N.c80) [symbolic]
  124. // CHECK:STDOUT: %IntRange.as.Iterate.impl.NewCursor: %IntRange.as.Iterate.impl.NewCursor.type = struct_value () [symbolic]
  125. // CHECK:STDOUT: %Optional.708: type = class_type @Optional, @Optional(%Int.49d0e6.1) [symbolic]
  126. // CHECK:STDOUT: %pattern_type.4b1: type = pattern_type %Optional.708 [symbolic]
  127. // CHECK:STDOUT: %IntRange.as.Iterate.impl.Next.type: type = fn_type @IntRange.as.Iterate.impl.Next, @IntRange.as.Iterate.impl(%N.c80) [symbolic]
  128. // CHECK:STDOUT: %IntRange.as.Iterate.impl.Next: %IntRange.as.Iterate.impl.Next.type = struct_value () [symbolic]
  129. // CHECK:STDOUT: %IntRange.elem.e7c: type = unbound_element_type %IntRange.349, %Int.49d0e6.1 [symbolic]
  130. // CHECK:STDOUT: %Destroy.impl_witness.0ef: <witness> = impl_witness @IntRange.%Destroy.impl_witness_table, @IntRange.as.Destroy.impl(%N.c80) [symbolic]
  131. // CHECK:STDOUT: %ptr.710: type = ptr_type %IntRange.349 [symbolic]
  132. // CHECK:STDOUT: %pattern_type.99f: type = pattern_type %ptr.710 [symbolic]
  133. // CHECK:STDOUT: %IntRange.as.Destroy.impl.Op.type: type = fn_type @IntRange.as.Destroy.impl.Op, @IntRange.as.Destroy.impl(%N.c80) [symbolic]
  134. // CHECK:STDOUT: %IntRange.as.Destroy.impl.Op: %IntRange.as.Destroy.impl.Op.type = struct_value () [symbolic]
  135. // CHECK:STDOUT: %struct_type.start.end.78d: type = struct_type {.start: %Int.49d0e6.1, .end: %Int.49d0e6.1} [symbolic]
  136. // CHECK:STDOUT: %complete_type.9d5: <witness> = complete_type_witness %struct_type.start.end.78d [symbolic]
  137. // CHECK:STDOUT: %require_complete.524: <witness> = require_complete_type %IntRange.349 [symbolic]
  138. // CHECK:STDOUT: %Optional.None.type.73a: type = fn_type @Optional.None, @Optional(%Int.49d0e6.1) [symbolic]
  139. // CHECK:STDOUT: %Optional.None.83e: %Optional.None.type.73a = struct_value () [symbolic]
  140. // CHECK:STDOUT: %Optional.Some.type.185: type = fn_type @Optional.Some, @Optional(%Int.49d0e6.1) [symbolic]
  141. // CHECK:STDOUT: %Optional.Some.58a: %Optional.Some.type.185 = struct_value () [symbolic]
  142. // CHECK:STDOUT: %require_complete.b74: <witness> = require_complete_type %Optional.708 [symbolic]
  143. // CHECK:STDOUT: %assoc0.5db: %OrderedWith.assoc_type.03c = assoc_entity element0, imports.%Core.import_ref.d49 [symbolic]
  144. // CHECK:STDOUT: %OrderedWith.impl_witness.bea: <witness> = impl_witness imports.%OrderedWith.impl_witness_table.476, @Int.as.OrderedWith.impl.db3(%N.c80, %N.c80) [symbolic]
  145. // CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.type.98c: type = fn_type @Int.as.OrderedWith.impl.Less.1, @Int.as.OrderedWith.impl.db3(%N.c80, %N.c80) [symbolic]
  146. // CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.4be: %Int.as.OrderedWith.impl.Less.type.98c = struct_value () [symbolic]
  147. // CHECK:STDOUT: %OrderedWith.facet: %OrderedWith.type.872 = facet_value %Int.49d0e6.1, (%OrderedWith.impl_witness.bea) [symbolic]
  148. // CHECK:STDOUT: %.64e: type = fn_type_with_self_type %OrderedWith.Less.type.8fe, %OrderedWith.facet [symbolic]
  149. // CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.specific_fn.bb3: <specific function> = specific_function %Int.as.OrderedWith.impl.Less.4be, @Int.as.OrderedWith.impl.Less.1(%N.c80, %N.c80) [symbolic]
  150. // CHECK:STDOUT: %Inc.Op.type: type = fn_type @Inc.Op [concrete]
  151. // CHECK:STDOUT: %Inc.lookup_impl_witness: <witness> = lookup_impl_witness %Int.49d0e6.1, @Inc [symbolic]
  152. // CHECK:STDOUT: %Inc.facet: %Inc.type = facet_value %Int.49d0e6.1, (%Inc.lookup_impl_witness) [symbolic]
  153. // CHECK:STDOUT: %.a0d: type = fn_type_with_self_type %Inc.Op.type, %Inc.facet [symbolic]
  154. // CHECK:STDOUT: %impl.elem0.437: %.a0d = impl_witness_access %Inc.lookup_impl_witness, element0 [symbolic]
  155. // CHECK:STDOUT: %specific_impl_fn.a5f: <specific function> = specific_impl_function %impl.elem0.437, @Inc.Op(%Inc.facet) [symbolic]
  156. // CHECK:STDOUT: %Optional.Some.specific_fn.6f1: <specific function> = specific_function %Optional.Some.58a, @Optional.Some(%Int.49d0e6.1) [symbolic]
  157. // CHECK:STDOUT: %ptr.2aa: type = ptr_type %Optional.708 [symbolic]
  158. // CHECK:STDOUT: %require_complete.a5e: <witness> = require_complete_type %ptr.2aa [symbolic]
  159. // CHECK:STDOUT: %Destroy.lookup_impl_witness: <witness> = lookup_impl_witness %Optional.708, @Destroy [symbolic]
  160. // CHECK:STDOUT: %Destroy.facet.be9: %Destroy.type = facet_value %Optional.708, (%Destroy.lookup_impl_witness) [symbolic]
  161. // CHECK:STDOUT: %.1ee: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.be9 [symbolic]
  162. // CHECK:STDOUT: %impl.elem0.5fd: %.1ee = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic]
  163. // CHECK:STDOUT: %specific_impl_fn.79e: <specific function> = specific_impl_function %impl.elem0.5fd, @Destroy.Op(%Destroy.facet.be9) [symbolic]
  164. // CHECK:STDOUT: %Destroy.facet.d3b: %Destroy.type = facet_value %Int.49d0e6.1, (%Destroy.impl_witness.3a2) [symbolic]
  165. // CHECK:STDOUT: %.ffb: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.d3b [symbolic]
  166. // CHECK:STDOUT: %Int.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function %Int.as.Destroy.impl.Op, @Int.as.Destroy.impl.Op(%N.c80) [symbolic]
  167. // CHECK:STDOUT: %Optional.None.specific_fn.82b: <specific function> = specific_function %Optional.None.83e, @Optional.None(%Int.49d0e6.1) [symbolic]
  168. // CHECK:STDOUT: %IntRange.365: type = class_type @IntRange, @IntRange(%int_32) [concrete]
  169. // CHECK:STDOUT: %pattern_type.d16: type = pattern_type %IntRange.365 [concrete]
  170. // CHECK:STDOUT: %Range.type: type = fn_type @Range [concrete]
  171. // CHECK:STDOUT: %Range: %Range.type = struct_value () [concrete]
  172. // CHECK:STDOUT: %IntRange.Make.type.cef: type = fn_type @IntRange.Make, @IntRange(%int_32) [concrete]
  173. // CHECK:STDOUT: %IntRange.Make.0dc: %IntRange.Make.type.cef = struct_value () [concrete]
  174. // CHECK:STDOUT: %IntRange.elem.e33: type = unbound_element_type %IntRange.365, %i32 [concrete]
  175. // CHECK:STDOUT: %struct_type.start.end.d0a: type = struct_type {.start: %i32, .end: %i32} [concrete]
  176. // CHECK:STDOUT: %complete_type.c45: <witness> = complete_type_witness %struct_type.start.end.d0a [concrete]
  177. // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete]
  178. // CHECK:STDOUT: %IntRange.Make.specific_fn: <specific function> = specific_function %IntRange.Make.0dc, @IntRange.Make(%int_32) [concrete]
  179. // CHECK:STDOUT: %ImplicitAs.facet.fd2: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.1fb) [concrete]
  180. // CHECK:STDOUT: %.509: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet.fd2 [concrete]
  181. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.d04: <bound method> = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.956 [concrete]
  182. // CHECK:STDOUT: %bound_method.b6e: <bound method> = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  183. // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete]
  184. // CHECK:STDOUT: %Destroy.impl_witness.378: <witness> = impl_witness @IntRange.%Destroy.impl_witness_table, @IntRange.as.Destroy.impl(%int_32) [concrete]
  185. // CHECK:STDOUT: %T.as.Destroy.impl.Op.type.2d1: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%IntRange.365) [concrete]
  186. // CHECK:STDOUT: %T.as.Destroy.impl.Op.fa8: %T.as.Destroy.impl.Op.type.2d1 = struct_value () [concrete]
  187. // CHECK:STDOUT: %ptr.049: type = ptr_type %IntRange.365 [concrete]
  188. // CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function %T.as.Destroy.impl.Op.fa8, @T.as.Destroy.impl.Op(%IntRange.365) [concrete]
  189. // CHECK:STDOUT: }
  190. // CHECK:STDOUT:
  191. // CHECK:STDOUT: imports {
  192. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  193. // CHECK:STDOUT: .IntLiteral = %Core.IntLiteral
  194. // CHECK:STDOUT: .Int = %Core.Int
  195. // CHECK:STDOUT: .Iterate = %Core.Iterate
  196. // CHECK:STDOUT: .Optional = %Core.Optional
  197. // CHECK:STDOUT: .Destroy = %Core.Destroy
  198. // CHECK:STDOUT: .OrderedWith = %Core.OrderedWith
  199. // CHECK:STDOUT: .Inc = %Core.Inc
  200. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  201. // CHECK:STDOUT: import Core//prelude
  202. // CHECK:STDOUT: import Core//prelude/...
  203. // CHECK:STDOUT: }
  204. // CHECK:STDOUT: %Core.IntLiteral: %IntLiteral.type = import_ref Core//prelude/types/int_literal, IntLiteral, loaded [concrete = constants.%IntLiteral]
  205. // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic]
  206. // CHECK:STDOUT: %Core.Iterate: type = import_ref Core//prelude/iterate, Iterate, loaded [concrete = constants.%Iterate.type]
  207. // CHECK:STDOUT: %Core.import_ref.1c9: %Iterate.assoc_type = import_ref Core//prelude/iterate, loc12_18, loaded [concrete = constants.%assoc0.724]
  208. // CHECK:STDOUT: %Core.import_ref.ed6: %Iterate.assoc_type = import_ref Core//prelude/iterate, loc13_17, loaded [concrete = constants.%assoc1.02e]
  209. // CHECK:STDOUT: %Core.import_ref.9e6: type = import_ref Core//prelude/iterate, loc13_17, loaded [concrete = %CursorType]
  210. // CHECK:STDOUT: %Core.import_ref.f49c: @Optional.%Optional.None.type (%Optional.None.type.ef2) = import_ref Core//prelude/iterate, inst134 [indirect], loaded [symbolic = @Optional.%Optional.None (constants.%Optional.None.fd6)]
  211. // CHECK:STDOUT: %Core.import_ref.1a8: @Optional.%Optional.Some.type (%Optional.Some.type.b2c) = import_ref Core//prelude/iterate, inst135 [indirect], loaded [symbolic = @Optional.%Optional.Some (constants.%Optional.Some.d0d)]
  212. // CHECK:STDOUT: %Core.import_ref.cf4: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.0f9) = import_ref Core//prelude/iterate, inst474 [indirect], loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f06)]
  213. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.2b9 = impl_witness_table (%Core.import_ref.cf4), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
  214. // CHECK:STDOUT: %Core.import_ref.741: @Int.as.Destroy.impl.%Int.as.Destroy.impl.Op.type (%Int.as.Destroy.impl.Op.type) = import_ref Core//prelude/iterate, inst443 [indirect], loaded [symbolic = @Int.as.Destroy.impl.%Int.as.Destroy.impl.Op (constants.%Int.as.Destroy.impl.Op)]
  215. // CHECK:STDOUT: %Destroy.impl_witness_table.1b4 = impl_witness_table (%Core.import_ref.741), @Int.as.Destroy.impl [concrete]
  216. // CHECK:STDOUT: %Core.import_ref.19a: @OrderedWith.%OrderedWith.assoc_type (%OrderedWith.assoc_type.03c) = import_ref Core//prelude/iterate, inst854 [indirect], loaded [symbolic = @OrderedWith.%assoc0 (constants.%assoc0.5db)]
  217. // CHECK:STDOUT: %Core.import_ref.b2b: @Int.as.OrderedWith.impl.db3.%Int.as.OrderedWith.impl.Less.type (%Int.as.OrderedWith.impl.Less.type.2c7) = import_ref Core//prelude/iterate, inst943 [indirect], loaded [symbolic = @Int.as.OrderedWith.impl.db3.%Int.as.OrderedWith.impl.Less (constants.%Int.as.OrderedWith.impl.Less.a5a)]
  218. // CHECK:STDOUT: %Core.import_ref.ab6 = import_ref Core//prelude/iterate, inst944 [indirect], unloaded
  219. // CHECK:STDOUT: %Core.import_ref.875 = import_ref Core//prelude/iterate, inst945 [indirect], unloaded
  220. // CHECK:STDOUT: %Core.import_ref.82b = import_ref Core//prelude/iterate, inst946 [indirect], unloaded
  221. // CHECK:STDOUT: %OrderedWith.impl_witness_table.476 = impl_witness_table (%Core.import_ref.b2b, %Core.import_ref.ab6, %Core.import_ref.875, %Core.import_ref.82b), @Int.as.OrderedWith.impl.db3 [concrete]
  222. // CHECK:STDOUT: %Core.import_ref.13d: @OrderedWith.%OrderedWith.Less.type (%OrderedWith.Less.type.f19) = import_ref Core//prelude/iterate, inst1918 [indirect], loaded [symbolic = @OrderedWith.%OrderedWith.Less (constants.%OrderedWith.Less.02e)]
  223. // CHECK:STDOUT: %CursorType: type = assoc_const_decl @CursorType [concrete] {}
  224. // CHECK:STDOUT: %Core.import_ref.4f9: type = import_ref Core//prelude/iterate, loc12_18, loaded [concrete = %ElementType]
  225. // CHECK:STDOUT: %ElementType: type = assoc_const_decl @ElementType [concrete] {}
  226. // CHECK:STDOUT: %Core.Optional: %Optional.type = import_ref Core//prelude/types/optional, Optional, loaded [concrete = constants.%Optional.generic]
  227. // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
  228. // CHECK:STDOUT: %Core.OrderedWith: %OrderedWith.type.270 = import_ref Core//prelude/operators/comparison, OrderedWith, loaded [concrete = constants.%OrderedWith.generic]
  229. // CHECK:STDOUT: %Core.import_ref.d49 = import_ref Core//prelude/iterate, inst6636 [indirect], unloaded
  230. // CHECK:STDOUT: %Core.Inc: type = import_ref Core//prelude/operators/arithmetic, Inc, loaded [concrete = constants.%Inc.type]
  231. // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
  232. // CHECK:STDOUT: }
  233. // CHECK:STDOUT:
  234. // CHECK:STDOUT: file {
  235. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  236. // CHECK:STDOUT: .Core = imports.%Core
  237. // CHECK:STDOUT: .IntRange = %IntRange.decl
  238. // CHECK:STDOUT: .Range = %Range.decl
  239. // CHECK:STDOUT: }
  240. // CHECK:STDOUT: %Core.import = import Core
  241. // CHECK:STDOUT: %IntRange.decl: %IntRange.type = class_decl @IntRange [concrete = constants.%IntRange.generic] {
  242. // CHECK:STDOUT: %N.patt: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [concrete]
  243. // CHECK:STDOUT: } {
  244. // CHECK:STDOUT: %.loc4_36.1: type = splice_block %.loc4_36.3 [concrete = Core.IntLiteral] {
  245. // CHECK:STDOUT: %Core.ref.loc4: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  246. // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, imports.%Core.IntLiteral [concrete = constants.%IntLiteral]
  247. // CHECK:STDOUT: %IntLiteral.call: init type = call %IntLiteral.ref() [concrete = Core.IntLiteral]
  248. // CHECK:STDOUT: %.loc4_36.2: type = value_of_initializer %IntLiteral.call [concrete = Core.IntLiteral]
  249. // CHECK:STDOUT: %.loc4_36.3: type = converted %IntLiteral.call, %.loc4_36.2 [concrete = Core.IntLiteral]
  250. // CHECK:STDOUT: }
  251. // CHECK:STDOUT: %N.loc4_16.2: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N.loc4_16.1 (constants.%N.c80)]
  252. // CHECK:STDOUT: }
  253. // CHECK:STDOUT: %Range.decl: %Range.type = fn_decl @Range [concrete = constants.%Range] {
  254. // CHECK:STDOUT: %end.patt: %pattern_type.7ce = binding_pattern end [concrete]
  255. // CHECK:STDOUT: %end.param_patt: %pattern_type.7ce = value_param_pattern %end.patt, call_param0 [concrete]
  256. // CHECK:STDOUT: %return.patt: %pattern_type.d16 = return_slot_pattern [concrete]
  257. // CHECK:STDOUT: %return.param_patt: %pattern_type.d16 = out_param_pattern %return.patt, call_param1 [concrete]
  258. // CHECK:STDOUT: } {
  259. // CHECK:STDOUT: %IntRange.ref.loc26: %IntRange.type = name_ref IntRange, file.%IntRange.decl [concrete = constants.%IntRange.generic]
  260. // CHECK:STDOUT: %int_32.loc26_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  261. // CHECK:STDOUT: %IntRange.loc26: type = class_type @IntRange, @IntRange(constants.%int_32) [concrete = constants.%IntRange.365]
  262. // CHECK:STDOUT: %end.param: %i32 = value_param call_param0
  263. // CHECK:STDOUT: %.loc26_15: type = splice_block %i32 [concrete = constants.%i32] {
  264. // CHECK:STDOUT: %int_32.loc26_15: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  265. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  266. // CHECK:STDOUT: }
  267. // CHECK:STDOUT: %end: %i32 = bind_name end, %end.param
  268. // CHECK:STDOUT: %return.param: ref %IntRange.365 = out_param call_param1
  269. // CHECK:STDOUT: %return: ref %IntRange.365 = return_slot %return.param
  270. // CHECK:STDOUT: }
  271. // CHECK:STDOUT: }
  272. // CHECK:STDOUT:
  273. // CHECK:STDOUT: generic impl @IntRange.as.Iterate.impl(@IntRange.%N.loc4_16.2: Core.IntLiteral) {
  274. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N.c80)]
  275. // CHECK:STDOUT: %IntRange: type = class_type @IntRange, @IntRange(%N) [symbolic = %IntRange (constants.%IntRange.349)]
  276. // CHECK:STDOUT: %Int.loc9_54.1: type = class_type @Int, @Int(%N) [symbolic = %Int.loc9_54.1 (constants.%Int.49d0e6.1)]
  277. // CHECK:STDOUT: %Iterate_where.type: type = facet_type <@Iterate where constants.%impl.elem1.164 = %Int.loc9_54.1 and constants.%impl.elem0.19f = %Int.loc9_54.1> [symbolic = %Iterate_where.type (constants.%Iterate_where.type.fce)]
  278. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Iterate_where.type [symbolic = %require_complete (constants.%require_complete.d96)]
  279. // 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.48e)]
  280. // CHECK:STDOUT:
  281. // CHECK:STDOUT: !definition:
  282. // 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)]
  283. // 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)]
  284. // 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)]
  285. // 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)]
  286. // CHECK:STDOUT:
  287. // CHECK:STDOUT: impl: %Self.ref as %.loc9_24 {
  288. // 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)] {
  289. // CHECK:STDOUT: %self.patt: @IntRange.as.Iterate.impl.NewCursor.%pattern_type.loc10_18 (%pattern_type.dcd) = binding_pattern self [concrete]
  290. // 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]
  291. // CHECK:STDOUT: %return.patt: @IntRange.as.Iterate.impl.NewCursor.%pattern_type.loc10_32 (%pattern_type.8963eb.1) = return_slot_pattern [concrete]
  292. // 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]
  293. // CHECK:STDOUT: } {
  294. // CHECK:STDOUT: %Core.ref: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  295. // CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic]
  296. // CHECK:STDOUT: %N.ref: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_16.2 [symbolic = %N (constants.%N.c80)]
  297. // CHECK:STDOUT: %Int.loc10_45.2: type = class_type @Int, @Int(constants.%N.c80) [symbolic = %Int.loc10_45.1 (constants.%Int.49d0e6.1)]
  298. // CHECK:STDOUT: %self.param: @IntRange.as.Iterate.impl.NewCursor.%IntRange (%IntRange.349) = value_param call_param0
  299. // CHECK:STDOUT: %.loc10_24.1: type = splice_block %Self.ref [symbolic = %IntRange (constants.%IntRange.349)] {
  300. // CHECK:STDOUT: %.loc10_24.2: type = specific_constant constants.%IntRange.349, @IntRange(constants.%N.c80) [symbolic = %IntRange (constants.%IntRange.349)]
  301. // CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc10_24.2 [symbolic = %IntRange (constants.%IntRange.349)]
  302. // CHECK:STDOUT: }
  303. // CHECK:STDOUT: %self: @IntRange.as.Iterate.impl.NewCursor.%IntRange (%IntRange.349) = bind_name self, %self.param
  304. // CHECK:STDOUT: %return.param: ref @IntRange.as.Iterate.impl.NewCursor.%Int.loc10_45.1 (%Int.49d0e6.1) = out_param call_param1
  305. // CHECK:STDOUT: %return: ref @IntRange.as.Iterate.impl.NewCursor.%Int.loc10_45.1 (%Int.49d0e6.1) = return_slot %return.param
  306. // CHECK:STDOUT: }
  307. // 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)] {
  308. // CHECK:STDOUT: %self.patt: @IntRange.as.Iterate.impl.Next.%pattern_type.loc11_13 (%pattern_type.dcd) = binding_pattern self [concrete]
  309. // 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]
  310. // CHECK:STDOUT: %cursor.patt: @IntRange.as.Iterate.impl.Next.%pattern_type.loc11_25 (%pattern_type.4dc) = binding_pattern cursor [concrete]
  311. // 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]
  312. // CHECK:STDOUT: %return.patt: @IntRange.as.Iterate.impl.Next.%pattern_type.loc11_47 (%pattern_type.4b1) = return_slot_pattern [concrete]
  313. // CHECK:STDOUT: %return.param_patt: @IntRange.as.Iterate.impl.Next.%pattern_type.loc11_47 (%pattern_type.4b1) = out_param_pattern %return.patt, call_param2 [concrete]
  314. // CHECK:STDOUT: } {
  315. // CHECK:STDOUT: %Core.ref.loc11_50: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  316. // CHECK:STDOUT: %Optional.ref.loc11: %Optional.type = name_ref Optional, imports.%Core.Optional [concrete = constants.%Optional.generic]
  317. // CHECK:STDOUT: %Core.ref.loc11_64: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  318. // CHECK:STDOUT: %Int.ref.loc11_68: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic]
  319. // CHECK:STDOUT: %N.ref.loc11_73: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_16.2 [symbolic = %N (constants.%N.c80)]
  320. // CHECK:STDOUT: %Int.loc11_74: type = class_type @Int, @Int(constants.%N.c80) [symbolic = %Int.loc11_43.1 (constants.%Int.49d0e6.1)]
  321. // CHECK:STDOUT: %Optional.loc11_75.2: type = class_type @Optional, @Optional(constants.%Int.49d0e6.1) [symbolic = %Optional.loc11_75.1 (constants.%Optional.708)]
  322. // CHECK:STDOUT: %self.param: @IntRange.as.Iterate.impl.Next.%IntRange (%IntRange.349) = value_param call_param0
  323. // CHECK:STDOUT: %.loc11_19.1: type = splice_block %Self.ref [symbolic = %IntRange (constants.%IntRange.349)] {
  324. // CHECK:STDOUT: %.loc11_19.2: type = specific_constant constants.%IntRange.349, @IntRange(constants.%N.c80) [symbolic = %IntRange (constants.%IntRange.349)]
  325. // CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc11_19.2 [symbolic = %IntRange (constants.%IntRange.349)]
  326. // CHECK:STDOUT: }
  327. // CHECK:STDOUT: %self: @IntRange.as.Iterate.impl.Next.%IntRange (%IntRange.349) = bind_name self, %self.param
  328. // CHECK:STDOUT: %cursor.param: @IntRange.as.Iterate.impl.Next.%ptr.loc11_44.1 (%ptr.784) = value_param call_param1
  329. // CHECK:STDOUT: %.loc11_44: type = splice_block %ptr.loc11_44.2 [symbolic = %ptr.loc11_44.1 (constants.%ptr.784)] {
  330. // CHECK:STDOUT: %Core.ref.loc11_33: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  331. // CHECK:STDOUT: %Int.ref.loc11_37: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic]
  332. // CHECK:STDOUT: %N.ref.loc11_42: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_16.2 [symbolic = %N (constants.%N.c80)]
  333. // CHECK:STDOUT: %Int.loc11_43.2: type = class_type @Int, @Int(constants.%N.c80) [symbolic = %Int.loc11_43.1 (constants.%Int.49d0e6.1)]
  334. // CHECK:STDOUT: %ptr.loc11_44.2: type = ptr_type %Int.loc11_43.2 [symbolic = %ptr.loc11_44.1 (constants.%ptr.784)]
  335. // CHECK:STDOUT: }
  336. // CHECK:STDOUT: %cursor: @IntRange.as.Iterate.impl.Next.%ptr.loc11_44.1 (%ptr.784) = bind_name cursor, %cursor.param
  337. // CHECK:STDOUT: %return.param: ref @IntRange.as.Iterate.impl.Next.%Optional.loc11_75.1 (%Optional.708) = out_param call_param2
  338. // CHECK:STDOUT: %return: ref @IntRange.as.Iterate.impl.Next.%Optional.loc11_75.1 (%Optional.708) = return_slot %return.param
  339. // CHECK:STDOUT: }
  340. // CHECK:STDOUT:
  341. // CHECK:STDOUT: !members:
  342. // CHECK:STDOUT: .N = <poisoned>
  343. // CHECK:STDOUT: .NewCursor = %IntRange.as.Iterate.impl.NewCursor.decl
  344. // CHECK:STDOUT: .Next = %IntRange.as.Iterate.impl.Next.decl
  345. // CHECK:STDOUT: witness = @IntRange.%Iterate.impl_witness
  346. // CHECK:STDOUT: }
  347. // CHECK:STDOUT: }
  348. // CHECK:STDOUT:
  349. // CHECK:STDOUT: generic impl @IntRange.as.Destroy.impl(@IntRange.%N.loc4_16.2: Core.IntLiteral) {
  350. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N.c80)]
  351. // 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.0ef)]
  352. // CHECK:STDOUT:
  353. // CHECK:STDOUT: !definition:
  354. // 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)]
  355. // 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)]
  356. // CHECK:STDOUT:
  357. // CHECK:STDOUT: impl: constants.%IntRange.349 as constants.%Destroy.type {
  358. // 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)] {
  359. // CHECK:STDOUT: %self.patt: @IntRange.as.Destroy.impl.Op.%pattern_type (%pattern_type.99f) = binding_pattern self [concrete]
  360. // CHECK:STDOUT: %self.param_patt: @IntRange.as.Destroy.impl.Op.%pattern_type (%pattern_type.99f) = value_param_pattern %self.patt, call_param0 [concrete]
  361. // CHECK:STDOUT: %.loc4_39.1: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
  362. // CHECK:STDOUT: } {
  363. // CHECK:STDOUT: %self.param: @IntRange.as.Destroy.impl.Op.%ptr (%ptr.710) = value_param call_param0
  364. // CHECK:STDOUT: %.loc4_39.2: type = splice_block %Self.ref [symbolic = %IntRange (constants.%IntRange.349)] {
  365. // CHECK:STDOUT: %.loc4_39.3: type = specific_constant constants.%IntRange.349, @IntRange(constants.%N.c80) [symbolic = %IntRange (constants.%IntRange.349)]
  366. // CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc4_39.3 [symbolic = %IntRange (constants.%IntRange.349)]
  367. // CHECK:STDOUT: }
  368. // CHECK:STDOUT: %self: @IntRange.as.Destroy.impl.Op.%ptr (%ptr.710) = bind_name self, %self.param
  369. // CHECK:STDOUT: }
  370. // CHECK:STDOUT:
  371. // CHECK:STDOUT: !members:
  372. // CHECK:STDOUT: .Op = %IntRange.as.Destroy.impl.Op.decl
  373. // CHECK:STDOUT: witness = @IntRange.%Destroy.impl_witness
  374. // CHECK:STDOUT: }
  375. // CHECK:STDOUT: }
  376. // CHECK:STDOUT:
  377. // CHECK:STDOUT: generic class @IntRange(%N.loc4_16.2: Core.IntLiteral) {
  378. // CHECK:STDOUT: %N.loc4_16.1: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N.loc4_16.1 (constants.%N.c80)]
  379. // CHECK:STDOUT:
  380. // CHECK:STDOUT: !definition:
  381. // CHECK:STDOUT: %IntRange.Make.type: type = fn_type @IntRange.Make, @IntRange(%N.loc4_16.1) [symbolic = %IntRange.Make.type (constants.%IntRange.Make.type.51f)]
  382. // CHECK:STDOUT: %IntRange.Make: @IntRange.%IntRange.Make.type (%IntRange.Make.type.51f) = struct_value () [symbolic = %IntRange.Make (constants.%IntRange.Make.2ec)]
  383. // CHECK:STDOUT: %Int.loc22_32.2: type = class_type @Int, @Int(%N.loc4_16.1) [symbolic = %Int.loc22_32.2 (constants.%Int.49d0e6.1)]
  384. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Int.loc22_32.2 [symbolic = %require_complete (constants.%require_complete.b4f426.3)]
  385. // CHECK:STDOUT: %IntRange: type = class_type @IntRange, @IntRange(%N.loc4_16.1) [symbolic = %IntRange (constants.%IntRange.349)]
  386. // CHECK:STDOUT: %IntRange.elem: type = unbound_element_type %IntRange, %Int.loc22_32.2 [symbolic = %IntRange.elem (constants.%IntRange.elem.e7c)]
  387. // CHECK:STDOUT: %struct_type.start.end.loc24_1.2: 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.loc24_1.2 (constants.%struct_type.start.end.78d)]
  388. // CHECK:STDOUT: %complete_type.loc24_1.2: <witness> = complete_type_witness %struct_type.start.end.loc24_1.2 [symbolic = %complete_type.loc24_1.2 (constants.%complete_type.9d5)]
  389. // CHECK:STDOUT:
  390. // CHECK:STDOUT: class {
  391. // 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)] {
  392. // CHECK:STDOUT: %start.patt: @IntRange.Make.%pattern_type.loc5_11 (%pattern_type.8963eb.1) = binding_pattern start [concrete]
  393. // CHECK:STDOUT: %start.param_patt: @IntRange.Make.%pattern_type.loc5_11 (%pattern_type.8963eb.1) = value_param_pattern %start.patt, call_param0 [concrete]
  394. // CHECK:STDOUT: %end.patt: @IntRange.Make.%pattern_type.loc5_11 (%pattern_type.8963eb.1) = binding_pattern end [concrete]
  395. // CHECK:STDOUT: %end.param_patt: @IntRange.Make.%pattern_type.loc5_11 (%pattern_type.8963eb.1) = value_param_pattern %end.patt, call_param1 [concrete]
  396. // CHECK:STDOUT: %return.patt: @IntRange.Make.%pattern_type.loc5_49 (%pattern_type.dcd) = return_slot_pattern [concrete]
  397. // CHECK:STDOUT: %return.param_patt: @IntRange.Make.%pattern_type.loc5_49 (%pattern_type.dcd) = out_param_pattern %return.patt, call_param2 [concrete]
  398. // CHECK:STDOUT: } {
  399. // CHECK:STDOUT: %.loc5_52: type = specific_constant constants.%IntRange.349, @IntRange(constants.%N.c80) [symbolic = %IntRange (constants.%IntRange.349)]
  400. // CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc5_52 [symbolic = %IntRange (constants.%IntRange.349)]
  401. // CHECK:STDOUT: %start.param: @IntRange.Make.%Int.loc5_28.1 (%Int.49d0e6.1) = value_param call_param0
  402. // CHECK:STDOUT: %.loc5_28: type = splice_block %Int.loc5_28.2 [symbolic = %Int.loc5_28.1 (constants.%Int.49d0e6.1)] {
  403. // CHECK:STDOUT: %Core.ref.loc5_18: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  404. // CHECK:STDOUT: %Int.ref.loc5_22: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic]
  405. // CHECK:STDOUT: %N.ref.loc5_27: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_16.2 [symbolic = %N (constants.%N.c80)]
  406. // CHECK:STDOUT: %Int.loc5_28.2: type = class_type @Int, @Int(constants.%N.c80) [symbolic = %Int.loc5_28.1 (constants.%Int.49d0e6.1)]
  407. // CHECK:STDOUT: }
  408. // CHECK:STDOUT: %start: @IntRange.Make.%Int.loc5_28.1 (%Int.49d0e6.1) = bind_name start, %start.param
  409. // CHECK:STDOUT: %end.param: @IntRange.Make.%Int.loc5_28.1 (%Int.49d0e6.1) = value_param call_param1
  410. // CHECK:STDOUT: %.loc5_46: type = splice_block %Int.loc5_46 [symbolic = %Int.loc5_28.1 (constants.%Int.49d0e6.1)] {
  411. // CHECK:STDOUT: %Core.ref.loc5_36: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  412. // CHECK:STDOUT: %Int.ref.loc5_40: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic]
  413. // CHECK:STDOUT: %N.ref.loc5_45: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_16.2 [symbolic = %N (constants.%N.c80)]
  414. // CHECK:STDOUT: %Int.loc5_46: type = class_type @Int, @Int(constants.%N.c80) [symbolic = %Int.loc5_28.1 (constants.%Int.49d0e6.1)]
  415. // CHECK:STDOUT: }
  416. // CHECK:STDOUT: %end: @IntRange.Make.%Int.loc5_28.1 (%Int.49d0e6.1) = bind_name end, %end.param
  417. // CHECK:STDOUT: %return.param: ref @IntRange.Make.%IntRange (%IntRange.349) = out_param call_param2
  418. // CHECK:STDOUT: %return: ref @IntRange.Make.%IntRange (%IntRange.349) = return_slot %return.param
  419. // CHECK:STDOUT: }
  420. // CHECK:STDOUT: impl_decl @IntRange.as.Iterate.impl [concrete] {} {
  421. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%IntRange.349 [symbolic = %IntRange (constants.%IntRange.349)]
  422. // CHECK:STDOUT: %Core.ref.loc9_11: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  423. // CHECK:STDOUT: %Iterate.ref: type = name_ref Iterate, imports.%Core.Iterate [concrete = constants.%Iterate.type]
  424. // CHECK:STDOUT: %.Self: %Iterate.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.ef1]
  425. // CHECK:STDOUT: %.Self.ref.loc9_30: %Iterate.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.ef1]
  426. // CHECK:STDOUT: %CursorType.ref: %Iterate.assoc_type = name_ref CursorType, imports.%Core.import_ref.ed6 [concrete = constants.%assoc1.02e]
  427. // CHECK:STDOUT: %.Self.as_type.loc9_30: type = facet_access_type %.Self.ref.loc9_30 [symbolic_self = constants.%.Self.as_type.935]
  428. // CHECK:STDOUT: %.loc9_30: type = converted %.Self.ref.loc9_30, %.Self.as_type.loc9_30 [symbolic_self = constants.%.Self.as_type.935]
  429. // CHECK:STDOUT: %impl.elem1: type = impl_witness_access constants.%Iterate.lookup_impl_witness.65a, element1 [symbolic_self = constants.%impl.elem1.164]
  430. // CHECK:STDOUT: %Core.ref.loc9_44: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  431. // CHECK:STDOUT: %Int.ref.loc9_48: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic]
  432. // CHECK:STDOUT: %N.ref.loc9_53: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_16.2 [symbolic = %N (constants.%N.c80)]
  433. // CHECK:STDOUT: %Int.loc9_54.2: type = class_type @Int, @Int(constants.%N.c80) [symbolic = %Int.loc9_54.1 (constants.%Int.49d0e6.1)]
  434. // CHECK:STDOUT: %.Self.ref.loc9_60: %Iterate.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.ef1]
  435. // CHECK:STDOUT: %ElementType.ref: %Iterate.assoc_type = name_ref ElementType, imports.%Core.import_ref.1c9 [concrete = constants.%assoc0.724]
  436. // CHECK:STDOUT: %.Self.as_type.loc9_60: type = facet_access_type %.Self.ref.loc9_60 [symbolic_self = constants.%.Self.as_type.935]
  437. // CHECK:STDOUT: %.loc9_60: type = converted %.Self.ref.loc9_60, %.Self.as_type.loc9_60 [symbolic_self = constants.%.Self.as_type.935]
  438. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Iterate.lookup_impl_witness.65a, element0 [symbolic_self = constants.%impl.elem0.19f]
  439. // CHECK:STDOUT: %Core.ref.loc9_75: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  440. // CHECK:STDOUT: %Int.ref.loc9_79: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic]
  441. // CHECK:STDOUT: %N.ref.loc9_84: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_16.2 [symbolic = %N (constants.%N.c80)]
  442. // CHECK:STDOUT: %Int.loc9_85: type = class_type @Int, @Int(constants.%N.c80) [symbolic = %Int.loc9_54.1 (constants.%Int.49d0e6.1)]
  443. // CHECK:STDOUT: %.loc9_24: type = where_expr %.Self [symbolic = %Iterate_where.type (constants.%Iterate_where.type.fce)] {
  444. // CHECK:STDOUT: requirement_rewrite %impl.elem1, %Int.loc9_54.2
  445. // CHECK:STDOUT: requirement_rewrite %impl.elem0, %Int.loc9_85
  446. // CHECK:STDOUT: }
  447. // CHECK:STDOUT: }
  448. // 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]
  449. // CHECK:STDOUT: %Iterate.impl_witness: <witness> = impl_witness %Iterate.impl_witness_table, @IntRange.as.Iterate.impl(constants.%N.c80) [symbolic = @IntRange.as.Iterate.impl.%Iterate.impl_witness (constants.%Iterate.impl_witness.48e)]
  450. // 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)]
  451. // CHECK:STDOUT: %impl_witness_assoc_constant.loc9_87.2: type = impl_witness_assoc_constant constants.%Int.49d0e6.1 [symbolic = @IntRange.as.Iterate.impl.%Int.loc9_54.1 (constants.%Int.49d0e6.1)]
  452. // CHECK:STDOUT: %Core.ref.loc22: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  453. // CHECK:STDOUT: %Int.ref.loc22: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic]
  454. // CHECK:STDOUT: %N.ref.loc22: Core.IntLiteral = name_ref N, %N.loc4_16.2 [symbolic = %N.loc4_16.1 (constants.%N.c80)]
  455. // CHECK:STDOUT: %Int.loc22_32.1: type = class_type @Int, @Int(constants.%N.c80) [symbolic = %Int.loc22_32.2 (constants.%Int.49d0e6.1)]
  456. // CHECK:STDOUT: %.loc22: @IntRange.%IntRange.elem (%IntRange.elem.e7c) = field_decl start, element0 [concrete]
  457. // CHECK:STDOUT: %Core.ref.loc23: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  458. // CHECK:STDOUT: %Int.ref.loc23: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic]
  459. // CHECK:STDOUT: %N.ref.loc23: Core.IntLiteral = name_ref N, %N.loc4_16.2 [symbolic = %N.loc4_16.1 (constants.%N.c80)]
  460. // CHECK:STDOUT: %Int.loc23: type = class_type @Int, @Int(constants.%N.c80) [symbolic = %Int.loc22_32.2 (constants.%Int.49d0e6.1)]
  461. // CHECK:STDOUT: %.loc23: @IntRange.%IntRange.elem (%IntRange.elem.e7c) = field_decl end, element1 [concrete]
  462. // CHECK:STDOUT: impl_decl @IntRange.as.Destroy.impl [concrete] {} {}
  463. // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@IntRange.as.Destroy.impl.%IntRange.as.Destroy.impl.Op.decl), @IntRange.as.Destroy.impl [concrete]
  464. // CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table, @IntRange.as.Destroy.impl(constants.%N.c80) [symbolic = @IntRange.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness.0ef)]
  465. // CHECK:STDOUT: %struct_type.start.end.loc24_1.1: type = struct_type {.start: %Int.49d0e6.1, .end: %Int.49d0e6.1} [symbolic = %struct_type.start.end.loc24_1.2 (constants.%struct_type.start.end.78d)]
  466. // CHECK:STDOUT: %complete_type.loc24_1.1: <witness> = complete_type_witness %struct_type.start.end.loc24_1.1 [symbolic = %complete_type.loc24_1.2 (constants.%complete_type.9d5)]
  467. // CHECK:STDOUT: complete_type_witness = %complete_type.loc24_1.1
  468. // CHECK:STDOUT:
  469. // CHECK:STDOUT: !members:
  470. // CHECK:STDOUT: .Self = constants.%IntRange.349
  471. // CHECK:STDOUT: .N = <poisoned>
  472. // CHECK:STDOUT: .Make = %IntRange.Make.decl
  473. // CHECK:STDOUT: .start [private] = %.loc22
  474. // CHECK:STDOUT: .end [private] = %.loc23
  475. // CHECK:STDOUT: }
  476. // CHECK:STDOUT: }
  477. // CHECK:STDOUT:
  478. // CHECK:STDOUT: generic fn @IntRange.Make(@IntRange.%N.loc4_16.2: Core.IntLiteral) {
  479. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N.c80)]
  480. // CHECK:STDOUT: %Int.loc5_28.1: type = class_type @Int, @Int(%N) [symbolic = %Int.loc5_28.1 (constants.%Int.49d0e6.1)]
  481. // CHECK:STDOUT: %pattern_type.loc5_11: type = pattern_type %Int.loc5_28.1 [symbolic = %pattern_type.loc5_11 (constants.%pattern_type.8963eb.1)]
  482. // CHECK:STDOUT: %IntRange: type = class_type @IntRange, @IntRange(%N) [symbolic = %IntRange (constants.%IntRange.349)]
  483. // CHECK:STDOUT: %pattern_type.loc5_49: type = pattern_type %IntRange [symbolic = %pattern_type.loc5_49 (constants.%pattern_type.dcd)]
  484. // CHECK:STDOUT:
  485. // CHECK:STDOUT: !definition:
  486. // CHECK:STDOUT: %require_complete.loc5_49: <witness> = require_complete_type %IntRange [symbolic = %require_complete.loc5_49 (constants.%require_complete.524)]
  487. // CHECK:STDOUT: %require_complete.loc5_16: <witness> = require_complete_type %Int.loc5_28.1 [symbolic = %require_complete.loc5_16 (constants.%require_complete.b4f426.3)]
  488. // 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)]
  489. // CHECK:STDOUT:
  490. // 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) {
  491. // CHECK:STDOUT: !entry:
  492. // CHECK:STDOUT: %start.ref: @IntRange.Make.%Int.loc5_28.1 (%Int.49d0e6.1) = name_ref start, %start
  493. // CHECK:STDOUT: %end.ref: @IntRange.Make.%Int.loc5_28.1 (%Int.49d0e6.1) = name_ref end, %end
  494. // CHECK:STDOUT: %.loc6_39.1: @IntRange.Make.%struct_type.start.end (%struct_type.start.end.78d) = struct_literal (%start.ref, %end.ref)
  495. // CHECK:STDOUT: %.loc6_39.2: ref @IntRange.Make.%Int.loc5_28.1 (%Int.49d0e6.1) = class_element_access %return, element0
  496. // CHECK:STDOUT: %.loc6_39.3: init @IntRange.Make.%Int.loc5_28.1 (%Int.49d0e6.1) = initialize_from %start.ref to %.loc6_39.2
  497. // CHECK:STDOUT: %.loc6_39.4: ref @IntRange.Make.%Int.loc5_28.1 (%Int.49d0e6.1) = class_element_access %return, element1
  498. // CHECK:STDOUT: %.loc6_39.5: init @IntRange.Make.%Int.loc5_28.1 (%Int.49d0e6.1) = initialize_from %end.ref to %.loc6_39.4
  499. // CHECK:STDOUT: %.loc6_39.6: init @IntRange.Make.%IntRange (%IntRange.349) = class_init (%.loc6_39.3, %.loc6_39.5), %return
  500. // CHECK:STDOUT: %.loc6_40: init @IntRange.Make.%IntRange (%IntRange.349) = converted %.loc6_39.1, %.loc6_39.6
  501. // CHECK:STDOUT: return %.loc6_40 to %return
  502. // CHECK:STDOUT: }
  503. // CHECK:STDOUT: }
  504. // CHECK:STDOUT:
  505. // CHECK:STDOUT: generic fn @IntRange.as.Iterate.impl.NewCursor(@IntRange.%N.loc4_16.2: Core.IntLiteral) {
  506. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N.c80)]
  507. // CHECK:STDOUT: %IntRange: type = class_type @IntRange, @IntRange(%N) [symbolic = %IntRange (constants.%IntRange.349)]
  508. // CHECK:STDOUT: %pattern_type.loc10_18: type = pattern_type %IntRange [symbolic = %pattern_type.loc10_18 (constants.%pattern_type.dcd)]
  509. // CHECK:STDOUT: %Int.loc10_45.1: type = class_type @Int, @Int(%N) [symbolic = %Int.loc10_45.1 (constants.%Int.49d0e6.1)]
  510. // CHECK:STDOUT: %pattern_type.loc10_32: type = pattern_type %Int.loc10_45.1 [symbolic = %pattern_type.loc10_32 (constants.%pattern_type.8963eb.1)]
  511. // CHECK:STDOUT:
  512. // CHECK:STDOUT: !definition:
  513. // CHECK:STDOUT: %require_complete.loc10_22: <witness> = require_complete_type %IntRange [symbolic = %require_complete.loc10_22 (constants.%require_complete.524)]
  514. // CHECK:STDOUT: %IntRange.elem: type = unbound_element_type %IntRange, %Int.loc10_45.1 [symbolic = %IntRange.elem (constants.%IntRange.elem.e7c)]
  515. // CHECK:STDOUT: %require_complete.loc10_60: <witness> = require_complete_type %Int.loc10_45.1 [symbolic = %require_complete.loc10_60 (constants.%require_complete.b4f426.3)]
  516. // CHECK:STDOUT:
  517. // 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) {
  518. // CHECK:STDOUT: !entry:
  519. // CHECK:STDOUT: %self.ref: @IntRange.as.Iterate.impl.NewCursor.%IntRange (%IntRange.349) = name_ref self, %self
  520. // CHECK:STDOUT: %start.ref: @IntRange.as.Iterate.impl.NewCursor.%IntRange.elem (%IntRange.elem.e7c) = name_ref start, @IntRange.%.loc22 [concrete = @IntRange.%.loc22]
  521. // CHECK:STDOUT: %.loc10_60.1: ref @IntRange.as.Iterate.impl.NewCursor.%Int.loc10_45.1 (%Int.49d0e6.1) = class_element_access %self.ref, element0
  522. // CHECK:STDOUT: %.loc10_60.2: @IntRange.as.Iterate.impl.NewCursor.%Int.loc10_45.1 (%Int.49d0e6.1) = bind_value %.loc10_60.1
  523. // CHECK:STDOUT: return %.loc10_60.2
  524. // CHECK:STDOUT: }
  525. // CHECK:STDOUT: }
  526. // CHECK:STDOUT:
  527. // CHECK:STDOUT: generic fn @IntRange.as.Iterate.impl.Next(@IntRange.%N.loc4_16.2: Core.IntLiteral) {
  528. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N.c80)]
  529. // CHECK:STDOUT: %IntRange: type = class_type @IntRange, @IntRange(%N) [symbolic = %IntRange (constants.%IntRange.349)]
  530. // CHECK:STDOUT: %pattern_type.loc11_13: type = pattern_type %IntRange [symbolic = %pattern_type.loc11_13 (constants.%pattern_type.dcd)]
  531. // CHECK:STDOUT: %Int.loc11_43.1: type = class_type @Int, @Int(%N) [symbolic = %Int.loc11_43.1 (constants.%Int.49d0e6.1)]
  532. // CHECK:STDOUT: %ptr.loc11_44.1: type = ptr_type %Int.loc11_43.1 [symbolic = %ptr.loc11_44.1 (constants.%ptr.784)]
  533. // CHECK:STDOUT: %pattern_type.loc11_25: type = pattern_type %ptr.loc11_44.1 [symbolic = %pattern_type.loc11_25 (constants.%pattern_type.4dc)]
  534. // CHECK:STDOUT: %Optional.loc11_75.1: type = class_type @Optional, @Optional(%Int.loc11_43.1) [symbolic = %Optional.loc11_75.1 (constants.%Optional.708)]
  535. // CHECK:STDOUT: %pattern_type.loc11_47: type = pattern_type %Optional.loc11_75.1 [symbolic = %pattern_type.loc11_47 (constants.%pattern_type.4b1)]
  536. // CHECK:STDOUT:
  537. // CHECK:STDOUT: !definition:
  538. // CHECK:STDOUT: %require_complete.loc11_47.1: <witness> = require_complete_type %Optional.loc11_75.1 [symbolic = %require_complete.loc11_47.1 (constants.%require_complete.b74)]
  539. // CHECK:STDOUT: %require_complete.loc11_17: <witness> = require_complete_type %IntRange [symbolic = %require_complete.loc11_17 (constants.%require_complete.524)]
  540. // CHECK:STDOUT: %require_complete.loc11_31: <witness> = require_complete_type %ptr.loc11_44.1 [symbolic = %require_complete.loc11_31 (constants.%require_complete.0f5)]
  541. // CHECK:STDOUT: %require_complete.loc12: <witness> = require_complete_type %Int.loc11_43.1 [symbolic = %require_complete.loc12 (constants.%require_complete.b4f426.3)]
  542. // CHECK:STDOUT: %pattern_type.loc12: type = pattern_type %Int.loc11_43.1 [symbolic = %pattern_type.loc12 (constants.%pattern_type.8963eb.1)]
  543. // CHECK:STDOUT: %IntRange.elem: type = unbound_element_type %IntRange, %Int.loc11_43.1 [symbolic = %IntRange.elem (constants.%IntRange.elem.e7c)]
  544. // 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.872)]
  545. // CHECK:STDOUT: %require_complete.loc13: <witness> = require_complete_type %OrderedWith.type.loc13_17.2 [symbolic = %require_complete.loc13 (constants.%require_complete.66b6)]
  546. // CHECK:STDOUT: %OrderedWith.assoc_type: type = assoc_entity_type @OrderedWith, @OrderedWith(%Int.loc11_43.1) [symbolic = %OrderedWith.assoc_type (constants.%OrderedWith.assoc_type.d92)]
  547. // CHECK:STDOUT: %assoc0: @IntRange.as.Iterate.impl.Next.%OrderedWith.assoc_type (%OrderedWith.assoc_type.d92) = assoc_entity element0, imports.%Core.import_ref.13d [symbolic = %assoc0 (constants.%assoc0.8dc)]
  548. // CHECK:STDOUT: %OrderedWith.impl_witness: <witness> = impl_witness imports.%OrderedWith.impl_witness_table.476, @Int.as.OrderedWith.impl.db3(%N, %N) [symbolic = %OrderedWith.impl_witness (constants.%OrderedWith.impl_witness.bea)]
  549. // CHECK:STDOUT: %OrderedWith.Less.type: type = fn_type @OrderedWith.Less, @OrderedWith(%Int.loc11_43.1) [symbolic = %OrderedWith.Less.type (constants.%OrderedWith.Less.type.8fe)]
  550. // CHECK:STDOUT: %OrderedWith.facet: @IntRange.as.Iterate.impl.Next.%OrderedWith.type.loc13_17.2 (%OrderedWith.type.872) = facet_value %Int.loc11_43.1, (%OrderedWith.impl_witness) [symbolic = %OrderedWith.facet (constants.%OrderedWith.facet)]
  551. // CHECK:STDOUT: %.loc13_17.2: type = fn_type_with_self_type %OrderedWith.Less.type, %OrderedWith.facet [symbolic = %.loc13_17.2 (constants.%.64e)]
  552. // CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.type: type = fn_type @Int.as.OrderedWith.impl.Less.1, @Int.as.OrderedWith.impl.db3(%N, %N) [symbolic = %Int.as.OrderedWith.impl.Less.type (constants.%Int.as.OrderedWith.impl.Less.type.98c)]
  553. // CHECK:STDOUT: %Int.as.OrderedWith.impl.Less: @IntRange.as.Iterate.impl.Next.%Int.as.OrderedWith.impl.Less.type (%Int.as.OrderedWith.impl.Less.type.98c) = struct_value () [symbolic = %Int.as.OrderedWith.impl.Less (constants.%Int.as.OrderedWith.impl.Less.4be)]
  554. // 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.bb3)]
  555. // 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)]
  556. // CHECK:STDOUT: %Inc.facet: %Inc.type = facet_value %Int.loc11_43.1, (%Inc.lookup_impl_witness) [symbolic = %Inc.facet (constants.%Inc.facet)]
  557. // CHECK:STDOUT: %.loc14_9.2: type = fn_type_with_self_type constants.%Inc.Op.type, %Inc.facet [symbolic = %.loc14_9.2 (constants.%.a0d)]
  558. // CHECK:STDOUT: %impl.elem0.loc14_9.2: @IntRange.as.Iterate.impl.Next.%.loc14_9.2 (%.a0d) = impl_witness_access %Inc.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_9.2 (constants.%impl.elem0.437)]
  559. // 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.a5f)]
  560. // CHECK:STDOUT: %Optional.Some.type: type = fn_type @Optional.Some, @Optional(%Int.loc11_43.1) [symbolic = %Optional.Some.type (constants.%Optional.Some.type.185)]
  561. // CHECK:STDOUT: %Optional.Some: @IntRange.as.Iterate.impl.Next.%Optional.Some.type (%Optional.Some.type.185) = struct_value () [symbolic = %Optional.Some (constants.%Optional.Some.58a)]
  562. // CHECK:STDOUT: %Optional.Some.specific_fn.loc15_42.2: <specific function> = specific_function %Optional.Some, @Optional.Some(%Int.loc11_43.1) [symbolic = %Optional.Some.specific_fn.loc15_42.2 (constants.%Optional.Some.specific_fn.6f1)]
  563. // CHECK:STDOUT: %Destroy.lookup_impl_witness: <witness> = lookup_impl_witness %Optional.loc11_75.1, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)]
  564. // CHECK:STDOUT: %Destroy.facet.loc11: %Destroy.type = facet_value %Optional.loc11_75.1, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet.loc11 (constants.%Destroy.facet.be9)]
  565. // CHECK:STDOUT: %.loc11_47.6: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet.loc11 [symbolic = %.loc11_47.6 (constants.%.1ee)]
  566. // CHECK:STDOUT: %impl.elem0.loc11_47.4: @IntRange.as.Iterate.impl.Next.%.loc11_47.6 (%.1ee) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_47.4 (constants.%impl.elem0.5fd)]
  567. // CHECK:STDOUT: %specific_impl_fn.loc11_47.4: <specific function> = specific_impl_function %impl.elem0.loc11_47.4, @Destroy.Op(%Destroy.facet.loc11) [symbolic = %specific_impl_fn.loc11_47.4 (constants.%specific_impl_fn.79e)]
  568. // CHECK:STDOUT: %ptr.loc11_47: type = ptr_type %Optional.loc11_75.1 [symbolic = %ptr.loc11_47 (constants.%ptr.2aa)]
  569. // CHECK:STDOUT: %require_complete.loc11_47.2: <witness> = require_complete_type %ptr.loc11_47 [symbolic = %require_complete.loc11_47.2 (constants.%require_complete.a5e)]
  570. // CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness imports.%Destroy.impl_witness_table.1b4, @Int.as.Destroy.impl(%N) [symbolic = %Destroy.impl_witness (constants.%Destroy.impl_witness.3a2)]
  571. // CHECK:STDOUT: %Destroy.facet.loc12: %Destroy.type = facet_value %Int.loc11_43.1, (%Destroy.impl_witness) [symbolic = %Destroy.facet.loc12 (constants.%Destroy.facet.d3b)]
  572. // CHECK:STDOUT: %.loc12_7: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet.loc12 [symbolic = %.loc12_7 (constants.%.ffb)]
  573. // 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)]
  574. // 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)]
  575. // 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)]
  576. // CHECK:STDOUT: %Optional.None.type: type = fn_type @Optional.None, @Optional(%Int.loc11_43.1) [symbolic = %Optional.None.type (constants.%Optional.None.type.73a)]
  577. // CHECK:STDOUT: %Optional.None: @IntRange.as.Iterate.impl.Next.%Optional.None.type (%Optional.None.type.73a) = struct_value () [symbolic = %Optional.None (constants.%Optional.None.83e)]
  578. // CHECK:STDOUT: %Optional.None.specific_fn.loc17_42.2: <specific function> = specific_function %Optional.None, @Optional.None(%Int.loc11_43.1) [symbolic = %Optional.None.specific_fn.loc17_42.2 (constants.%Optional.None.specific_fn.82b)]
  579. // CHECK:STDOUT:
  580. // 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.708) {
  581. // CHECK:STDOUT: !entry:
  582. // CHECK:STDOUT: name_binding_decl {
  583. // CHECK:STDOUT: %value.patt: @IntRange.as.Iterate.impl.Next.%pattern_type.loc12 (%pattern_type.8963eb.1) = binding_pattern value [concrete]
  584. // CHECK:STDOUT: %value.var_patt: @IntRange.as.Iterate.impl.Next.%pattern_type.loc12 (%pattern_type.8963eb.1) = var_pattern %value.patt [concrete]
  585. // CHECK:STDOUT: }
  586. // CHECK:STDOUT: %value.var: ref @IntRange.as.Iterate.impl.Next.%Int.loc11_43.1 (%Int.49d0e6.1) = var %value.var_patt
  587. // CHECK:STDOUT: %cursor.ref.loc12: @IntRange.as.Iterate.impl.Next.%ptr.loc11_44.1 (%ptr.784) = name_ref cursor, %cursor
  588. // CHECK:STDOUT: %.loc12_32.1: ref @IntRange.as.Iterate.impl.Next.%Int.loc11_43.1 (%Int.49d0e6.1) = deref %cursor.ref.loc12
  589. // CHECK:STDOUT: %.loc12_32.2: @IntRange.as.Iterate.impl.Next.%Int.loc11_43.1 (%Int.49d0e6.1) = bind_value %.loc12_32.1
  590. // CHECK:STDOUT: assign %value.var, %.loc12_32.2
  591. // CHECK:STDOUT: %.loc12_28: type = splice_block %Int.loc12 [symbolic = %Int.loc11_43.1 (constants.%Int.49d0e6.1)] {
  592. // CHECK:STDOUT: %Core.ref.loc12: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  593. // CHECK:STDOUT: %Int.ref.loc12: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic]
  594. // CHECK:STDOUT: %N.ref.loc12: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_16.2 [symbolic = %N (constants.%N.c80)]
  595. // CHECK:STDOUT: %Int.loc12: type = class_type @Int, @Int(constants.%N.c80) [symbolic = %Int.loc11_43.1 (constants.%Int.49d0e6.1)]
  596. // CHECK:STDOUT: }
  597. // CHECK:STDOUT: %value: ref @IntRange.as.Iterate.impl.Next.%Int.loc11_43.1 (%Int.49d0e6.1) = bind_name value, %value.var
  598. // CHECK:STDOUT: %value.ref.loc13: ref @IntRange.as.Iterate.impl.Next.%Int.loc11_43.1 (%Int.49d0e6.1) = name_ref value, %value
  599. // CHECK:STDOUT: %self.ref: @IntRange.as.Iterate.impl.Next.%IntRange (%IntRange.349) = name_ref self, %self
  600. // CHECK:STDOUT: %end.ref: @IntRange.as.Iterate.impl.Next.%IntRange.elem (%IntRange.elem.e7c) = name_ref end, @IntRange.%.loc23 [concrete = @IntRange.%.loc23]
  601. // CHECK:STDOUT: %.loc13_23.1: ref @IntRange.as.Iterate.impl.Next.%Int.loc11_43.1 (%Int.49d0e6.1) = class_element_access %self.ref, element1
  602. // CHECK:STDOUT: %.loc13_23.2: @IntRange.as.Iterate.impl.Next.%Int.loc11_43.1 (%Int.49d0e6.1) = bind_value %.loc13_23.1
  603. // 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.872)]
  604. // CHECK:STDOUT: %.loc13_17.1: @IntRange.as.Iterate.impl.Next.%OrderedWith.assoc_type (%OrderedWith.assoc_type.d92) = specific_constant imports.%Core.import_ref.19a, @OrderedWith(constants.%Int.49d0e6.1) [symbolic = %assoc0 (constants.%assoc0.8dc)]
  605. // 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.8dc)]
  606. // CHECK:STDOUT: %impl.elem0.loc13: @IntRange.as.Iterate.impl.Next.%.loc13_17.2 (%.64e) = impl_witness_access constants.%OrderedWith.impl_witness.bea, element0 [symbolic = %Int.as.OrderedWith.impl.Less (constants.%Int.as.OrderedWith.impl.Less.4be)]
  607. // CHECK:STDOUT: %bound_method.loc13_17.1: <bound method> = bound_method %value.ref.loc13, %impl.elem0.loc13
  608. // CHECK:STDOUT: %specific_fn.loc13: <specific function> = specific_function %impl.elem0.loc13, @Int.as.OrderedWith.impl.Less.1(constants.%N.c80, constants.%N.c80) [symbolic = %Int.as.OrderedWith.impl.Less.specific_fn (constants.%Int.as.OrderedWith.impl.Less.specific_fn.bb3)]
  609. // CHECK:STDOUT: %bound_method.loc13_17.2: <bound method> = bound_method %value.ref.loc13, %specific_fn.loc13
  610. // CHECK:STDOUT: %.loc13_11: @IntRange.as.Iterate.impl.Next.%Int.loc11_43.1 (%Int.49d0e6.1) = bind_value %value.ref.loc13
  611. // CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.call: init bool = call %bound_method.loc13_17.2(%.loc13_11, %.loc13_23.2)
  612. // CHECK:STDOUT: %.loc13_27.1: bool = value_of_initializer %Int.as.OrderedWith.impl.Less.call
  613. // CHECK:STDOUT: %.loc13_27.2: bool = converted %Int.as.OrderedWith.impl.Less.call, %.loc13_27.1
  614. // CHECK:STDOUT: if %.loc13_27.2 br !if.then else br !if.else
  615. // CHECK:STDOUT:
  616. // CHECK:STDOUT: !if.then:
  617. // CHECK:STDOUT: %cursor.ref.loc14: @IntRange.as.Iterate.impl.Next.%ptr.loc11_44.1 (%ptr.784) = name_ref cursor, %cursor
  618. // CHECK:STDOUT: %.loc14_11: ref @IntRange.as.Iterate.impl.Next.%Int.loc11_43.1 (%Int.49d0e6.1) = deref %cursor.ref.loc14
  619. // CHECK:STDOUT: %impl.elem0.loc14_9.1: @IntRange.as.Iterate.impl.Next.%.loc14_9.2 (%.a0d) = impl_witness_access constants.%Inc.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_9.2 (constants.%impl.elem0.437)]
  620. // CHECK:STDOUT: %bound_method.loc14_9.1: <bound method> = bound_method %.loc14_11, %impl.elem0.loc14_9.1
  621. // 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.a5f)]
  622. // CHECK:STDOUT: %bound_method.loc14_9.2: <bound method> = bound_method %.loc14_11, %specific_impl_fn.loc14_9.1
  623. // CHECK:STDOUT: %addr.loc14: @IntRange.as.Iterate.impl.Next.%ptr.loc11_44.1 (%ptr.784) = addr_of %.loc14_11
  624. // CHECK:STDOUT: %.loc14_9.1: init %empty_tuple.type = call %bound_method.loc14_9.2(%addr.loc14)
  625. // CHECK:STDOUT: %Core.ref.loc15_16: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  626. // CHECK:STDOUT: %Optional.ref.loc15: %Optional.type = name_ref Optional, imports.%Core.Optional [concrete = constants.%Optional.generic]
  627. // CHECK:STDOUT: %Core.ref.loc15_30: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  628. // CHECK:STDOUT: %Int.ref.loc15: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic]
  629. // CHECK:STDOUT: %N.ref.loc15: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_16.2 [symbolic = %N (constants.%N.c80)]
  630. // CHECK:STDOUT: %Int.loc15: type = class_type @Int, @Int(constants.%N.c80) [symbolic = %Int.loc11_43.1 (constants.%Int.49d0e6.1)]
  631. // CHECK:STDOUT: %Optional.loc15: type = class_type @Optional, @Optional(constants.%Int.49d0e6.1) [symbolic = %Optional.loc11_75.1 (constants.%Optional.708)]
  632. // CHECK:STDOUT: %.loc15_42: @IntRange.as.Iterate.impl.Next.%Optional.Some.type (%Optional.Some.type.185) = specific_constant imports.%Core.import_ref.1a8, @Optional(constants.%Int.49d0e6.1) [symbolic = %Optional.Some (constants.%Optional.Some.58a)]
  633. // CHECK:STDOUT: %Some.ref: @IntRange.as.Iterate.impl.Next.%Optional.Some.type (%Optional.Some.type.185) = name_ref Some, %.loc15_42 [symbolic = %Optional.Some (constants.%Optional.Some.58a)]
  634. // CHECK:STDOUT: %value.ref.loc15: ref @IntRange.as.Iterate.impl.Next.%Int.loc11_43.1 (%Int.49d0e6.1) = name_ref value, %value
  635. // CHECK:STDOUT: %Optional.Some.specific_fn.loc15_42.1: <specific function> = specific_function %Some.ref, @Optional.Some(constants.%Int.49d0e6.1) [symbolic = %Optional.Some.specific_fn.loc15_42.2 (constants.%Optional.Some.specific_fn.6f1)]
  636. // CHECK:STDOUT: %.loc11_47.1: ref @IntRange.as.Iterate.impl.Next.%Optional.loc11_75.1 (%Optional.708) = splice_block %return {}
  637. // CHECK:STDOUT: %.loc15_48: @IntRange.as.Iterate.impl.Next.%Int.loc11_43.1 (%Int.49d0e6.1) = bind_value %value.ref.loc15
  638. // CHECK:STDOUT: %Optional.Some.call: init @IntRange.as.Iterate.impl.Next.%Optional.loc11_75.1 (%Optional.708) = call %Optional.Some.specific_fn.loc15_42.1(%.loc15_48) to %.loc11_47.1
  639. // CHECK:STDOUT: %impl.elem0.loc11_47.1: @IntRange.as.Iterate.impl.Next.%.loc11_47.6 (%.1ee) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_47.4 (constants.%impl.elem0.5fd)]
  640. // CHECK:STDOUT: %bound_method.loc11_47.1: <bound method> = bound_method %.loc11_47.1, %impl.elem0.loc11_47.1
  641. // CHECK:STDOUT: %specific_impl_fn.loc11_47.1: <specific function> = specific_impl_function %impl.elem0.loc11_47.1, @Destroy.Op(constants.%Destroy.facet.be9) [symbolic = %specific_impl_fn.loc11_47.4 (constants.%specific_impl_fn.79e)]
  642. // CHECK:STDOUT: %bound_method.loc11_47.2: <bound method> = bound_method %.loc11_47.1, %specific_impl_fn.loc11_47.1
  643. // CHECK:STDOUT: %addr.loc11_47.1: @IntRange.as.Iterate.impl.Next.%ptr.loc11_47 (%ptr.2aa) = addr_of %.loc11_47.1
  644. // CHECK:STDOUT: %.loc11_47.2: init %empty_tuple.type = call %bound_method.loc11_47.2(%addr.loc11_47.1)
  645. // CHECK:STDOUT: %impl.elem0.loc12_7.1: @IntRange.as.Iterate.impl.Next.%.loc12_7 (%.ffb) = impl_witness_access constants.%Destroy.impl_witness.3a2, element0 [symbolic = %Int.as.Destroy.impl.Op (constants.%Int.as.Destroy.impl.Op)]
  646. // CHECK:STDOUT: %bound_method.loc12_7.1: <bound method> = bound_method %value.var, %impl.elem0.loc12_7.1
  647. // CHECK:STDOUT: %specific_fn.loc12_7.1: <specific function> = specific_function %impl.elem0.loc12_7.1, @Int.as.Destroy.impl.Op(constants.%N.c80) [symbolic = %Int.as.Destroy.impl.Op.specific_fn (constants.%Int.as.Destroy.impl.Op.specific_fn)]
  648. // CHECK:STDOUT: %bound_method.loc12_7.2: <bound method> = bound_method %value.var, %specific_fn.loc12_7.1
  649. // CHECK:STDOUT: %addr.loc12_7.1: @IntRange.as.Iterate.impl.Next.%ptr.loc11_44.1 (%ptr.784) = addr_of %value.var
  650. // 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)
  651. // CHECK:STDOUT: return %Optional.Some.call to %return
  652. // CHECK:STDOUT:
  653. // CHECK:STDOUT: !if.else:
  654. // CHECK:STDOUT: %Core.ref.loc17_16: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  655. // CHECK:STDOUT: %Optional.ref.loc17: %Optional.type = name_ref Optional, imports.%Core.Optional [concrete = constants.%Optional.generic]
  656. // CHECK:STDOUT: %Core.ref.loc17_30: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  657. // CHECK:STDOUT: %Int.ref.loc17: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic]
  658. // CHECK:STDOUT: %N.ref.loc17: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_16.2 [symbolic = %N (constants.%N.c80)]
  659. // CHECK:STDOUT: %Int.loc17: type = class_type @Int, @Int(constants.%N.c80) [symbolic = %Int.loc11_43.1 (constants.%Int.49d0e6.1)]
  660. // CHECK:STDOUT: %Optional.loc17: type = class_type @Optional, @Optional(constants.%Int.49d0e6.1) [symbolic = %Optional.loc11_75.1 (constants.%Optional.708)]
  661. // CHECK:STDOUT: %.loc17: @IntRange.as.Iterate.impl.Next.%Optional.None.type (%Optional.None.type.73a) = specific_constant imports.%Core.import_ref.f49c, @Optional(constants.%Int.49d0e6.1) [symbolic = %Optional.None (constants.%Optional.None.83e)]
  662. // CHECK:STDOUT: %None.ref: @IntRange.as.Iterate.impl.Next.%Optional.None.type (%Optional.None.type.73a) = name_ref None, %.loc17 [symbolic = %Optional.None (constants.%Optional.None.83e)]
  663. // CHECK:STDOUT: %Optional.None.specific_fn.loc17_42.1: <specific function> = specific_function %None.ref, @Optional.None(constants.%Int.49d0e6.1) [symbolic = %Optional.None.specific_fn.loc17_42.2 (constants.%Optional.None.specific_fn.82b)]
  664. // CHECK:STDOUT: %.loc11_47.3: ref @IntRange.as.Iterate.impl.Next.%Optional.loc11_75.1 (%Optional.708) = splice_block %return {}
  665. // CHECK:STDOUT: %Optional.None.call: init @IntRange.as.Iterate.impl.Next.%Optional.loc11_75.1 (%Optional.708) = call %Optional.None.specific_fn.loc17_42.1() to %.loc11_47.3
  666. // CHECK:STDOUT: %impl.elem0.loc11_47.2: @IntRange.as.Iterate.impl.Next.%.loc11_47.6 (%.1ee) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_47.4 (constants.%impl.elem0.5fd)]
  667. // CHECK:STDOUT: %bound_method.loc11_47.3: <bound method> = bound_method %.loc11_47.3, %impl.elem0.loc11_47.2
  668. // CHECK:STDOUT: %specific_impl_fn.loc11_47.2: <specific function> = specific_impl_function %impl.elem0.loc11_47.2, @Destroy.Op(constants.%Destroy.facet.be9) [symbolic = %specific_impl_fn.loc11_47.4 (constants.%specific_impl_fn.79e)]
  669. // CHECK:STDOUT: %bound_method.loc11_47.4: <bound method> = bound_method %.loc11_47.3, %specific_impl_fn.loc11_47.2
  670. // CHECK:STDOUT: %addr.loc11_47.2: @IntRange.as.Iterate.impl.Next.%ptr.loc11_47 (%ptr.2aa) = addr_of %.loc11_47.3
  671. // CHECK:STDOUT: %.loc11_47.4: init %empty_tuple.type = call %bound_method.loc11_47.4(%addr.loc11_47.2)
  672. // CHECK:STDOUT: %impl.elem0.loc11_47.3: @IntRange.as.Iterate.impl.Next.%.loc11_47.6 (%.1ee) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_47.4 (constants.%impl.elem0.5fd)]
  673. // CHECK:STDOUT: %bound_method.loc11_47.5: <bound method> = bound_method %.loc11_47.1, %impl.elem0.loc11_47.3
  674. // CHECK:STDOUT: %specific_impl_fn.loc11_47.3: <specific function> = specific_impl_function %impl.elem0.loc11_47.3, @Destroy.Op(constants.%Destroy.facet.be9) [symbolic = %specific_impl_fn.loc11_47.4 (constants.%specific_impl_fn.79e)]
  675. // CHECK:STDOUT: %bound_method.loc11_47.6: <bound method> = bound_method %.loc11_47.1, %specific_impl_fn.loc11_47.3
  676. // CHECK:STDOUT: %addr.loc11_47.3: @IntRange.as.Iterate.impl.Next.%ptr.loc11_47 (%ptr.2aa) = addr_of %.loc11_47.1
  677. // CHECK:STDOUT: %.loc11_47.5: init %empty_tuple.type = call %bound_method.loc11_47.6(%addr.loc11_47.3)
  678. // CHECK:STDOUT: %impl.elem0.loc12_7.2: @IntRange.as.Iterate.impl.Next.%.loc12_7 (%.ffb) = impl_witness_access constants.%Destroy.impl_witness.3a2, element0 [symbolic = %Int.as.Destroy.impl.Op (constants.%Int.as.Destroy.impl.Op)]
  679. // CHECK:STDOUT: %bound_method.loc12_7.3: <bound method> = bound_method %value.var, %impl.elem0.loc12_7.2
  680. // CHECK:STDOUT: %specific_fn.loc12_7.2: <specific function> = specific_function %impl.elem0.loc12_7.2, @Int.as.Destroy.impl.Op(constants.%N.c80) [symbolic = %Int.as.Destroy.impl.Op.specific_fn (constants.%Int.as.Destroy.impl.Op.specific_fn)]
  681. // CHECK:STDOUT: %bound_method.loc12_7.4: <bound method> = bound_method %value.var, %specific_fn.loc12_7.2
  682. // CHECK:STDOUT: %addr.loc12_7.2: @IntRange.as.Iterate.impl.Next.%ptr.loc11_44.1 (%ptr.784) = addr_of %value.var
  683. // 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)
  684. // CHECK:STDOUT: return %Optional.None.call to %return
  685. // CHECK:STDOUT: }
  686. // CHECK:STDOUT: }
  687. // CHECK:STDOUT:
  688. // CHECK:STDOUT: generic fn @IntRange.as.Destroy.impl.Op(@IntRange.%N.loc4_16.2: Core.IntLiteral) {
  689. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N.c80)]
  690. // CHECK:STDOUT: %IntRange: type = class_type @IntRange, @IntRange(%N) [symbolic = %IntRange (constants.%IntRange.349)]
  691. // CHECK:STDOUT: %ptr: type = ptr_type %IntRange [symbolic = %ptr (constants.%ptr.710)]
  692. // CHECK:STDOUT: %pattern_type: type = pattern_type %ptr [symbolic = %pattern_type (constants.%pattern_type.99f)]
  693. // CHECK:STDOUT:
  694. // CHECK:STDOUT: !definition:
  695. // CHECK:STDOUT:
  696. // CHECK:STDOUT: fn(%self.param: @IntRange.as.Destroy.impl.Op.%ptr (%ptr.710)) = "no_op";
  697. // CHECK:STDOUT: }
  698. // CHECK:STDOUT:
  699. // CHECK:STDOUT: fn @Range(%end.param: %i32) -> %return.param: %IntRange.365 {
  700. // CHECK:STDOUT: !entry:
  701. // CHECK:STDOUT: %IntRange.ref.loc27: %IntRange.type = name_ref IntRange, file.%IntRange.decl [concrete = constants.%IntRange.generic]
  702. // CHECK:STDOUT: %int_32.loc27: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  703. // CHECK:STDOUT: %IntRange.loc27: type = class_type @IntRange, @IntRange(constants.%int_32) [concrete = constants.%IntRange.365]
  704. // CHECK:STDOUT: %.loc27_22: %IntRange.Make.type.cef = specific_constant @IntRange.%IntRange.Make.decl, @IntRange(constants.%int_32) [concrete = constants.%IntRange.Make.0dc]
  705. // CHECK:STDOUT: %Make.ref: %IntRange.Make.type.cef = name_ref Make, %.loc27_22 [concrete = constants.%IntRange.Make.0dc]
  706. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6]
  707. // CHECK:STDOUT: %end.ref: %i32 = name_ref end, %end
  708. // CHECK:STDOUT: %IntRange.Make.specific_fn: <specific function> = specific_function %Make.ref, @IntRange.Make(constants.%int_32) [concrete = constants.%IntRange.Make.specific_fn]
  709. // CHECK:STDOUT: %.loc26_20: ref %IntRange.365 = splice_block %return {}
  710. // CHECK:STDOUT: %impl.elem0: %.509 = impl_witness_access constants.%ImplicitAs.impl_witness.1fb, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.956]
  711. // CHECK:STDOUT: %bound_method.loc27_28.1: <bound method> = bound_method %int_0, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.d04]
  712. // 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]
  713. // CHECK:STDOUT: %bound_method.loc27_28.2: <bound method> = bound_method %int_0, %specific_fn [concrete = constants.%bound_method.b6e]
  714. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc27_28.2(%int_0) [concrete = constants.%int_0.6a9]
  715. // CHECK:STDOUT: %.loc27_28.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_0.6a9]
  716. // CHECK:STDOUT: %.loc27_28.2: %i32 = converted %int_0, %.loc27_28.1 [concrete = constants.%int_0.6a9]
  717. // CHECK:STDOUT: %IntRange.Make.call: init %IntRange.365 = call %IntRange.Make.specific_fn(%.loc27_28.2, %end.ref) to %.loc26_20
  718. // CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: <bound method> = bound_method %.loc26_20, constants.%T.as.Destroy.impl.Op.fa8
  719. // CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function constants.%T.as.Destroy.impl.Op.fa8, @T.as.Destroy.impl.Op(constants.%IntRange.365) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn]
  720. // CHECK:STDOUT: %bound_method.loc26: <bound method> = bound_method %.loc26_20, %T.as.Destroy.impl.Op.specific_fn
  721. // CHECK:STDOUT: %addr: %ptr.049 = addr_of %.loc26_20
  722. // CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc26(%addr)
  723. // CHECK:STDOUT: return %IntRange.Make.call to %return
  724. // CHECK:STDOUT: }
  725. // CHECK:STDOUT:
  726. // CHECK:STDOUT: specific @IntRange(constants.%N.c80) {
  727. // CHECK:STDOUT: %N.loc4_16.1 => constants.%N.c80
  728. // CHECK:STDOUT:
  729. // CHECK:STDOUT: !definition:
  730. // CHECK:STDOUT: %IntRange.Make.type => constants.%IntRange.Make.type.51f
  731. // CHECK:STDOUT: %IntRange.Make => constants.%IntRange.Make.2ec
  732. // CHECK:STDOUT: %Int.loc22_32.2 => constants.%Int.49d0e6.1
  733. // CHECK:STDOUT: %require_complete => constants.%require_complete.b4f426.3
  734. // CHECK:STDOUT: %IntRange => constants.%IntRange.349
  735. // CHECK:STDOUT: %IntRange.elem => constants.%IntRange.elem.e7c
  736. // CHECK:STDOUT: %struct_type.start.end.loc24_1.2 => constants.%struct_type.start.end.78d
  737. // CHECK:STDOUT: %complete_type.loc24_1.2 => constants.%complete_type.9d5
  738. // CHECK:STDOUT: }
  739. // CHECK:STDOUT:
  740. // CHECK:STDOUT: specific @IntRange.Make(constants.%N.c80) {
  741. // CHECK:STDOUT: %N => constants.%N.c80
  742. // CHECK:STDOUT: %Int.loc5_28.1 => constants.%Int.49d0e6.1
  743. // CHECK:STDOUT: %pattern_type.loc5_11 => constants.%pattern_type.8963eb.1
  744. // CHECK:STDOUT: %IntRange => constants.%IntRange.349
  745. // CHECK:STDOUT: %pattern_type.loc5_49 => constants.%pattern_type.dcd
  746. // CHECK:STDOUT: }
  747. // CHECK:STDOUT:
  748. // CHECK:STDOUT: specific @CursorType(constants.%Self.a96) {}
  749. // CHECK:STDOUT:
  750. // CHECK:STDOUT: specific @CursorType(constants.%Iterate.facet.7f1) {}
  751. // CHECK:STDOUT:
  752. // CHECK:STDOUT: specific @ElementType(constants.%Self.a96) {}
  753. // CHECK:STDOUT:
  754. // CHECK:STDOUT: specific @ElementType(constants.%Iterate.facet.7f1) {}
  755. // CHECK:STDOUT:
  756. // CHECK:STDOUT: specific @IntRange.as.Iterate.impl(constants.%N.c80) {
  757. // CHECK:STDOUT: %N => constants.%N.c80
  758. // CHECK:STDOUT: %IntRange => constants.%IntRange.349
  759. // CHECK:STDOUT: %Int.loc9_54.1 => constants.%Int.49d0e6.1
  760. // CHECK:STDOUT: %Iterate_where.type => constants.%Iterate_where.type.fce
  761. // CHECK:STDOUT: %require_complete => constants.%require_complete.d96
  762. // CHECK:STDOUT: %Iterate.impl_witness => constants.%Iterate.impl_witness.48e
  763. // CHECK:STDOUT:
  764. // CHECK:STDOUT: !definition:
  765. // CHECK:STDOUT: %IntRange.as.Iterate.impl.NewCursor.type => constants.%IntRange.as.Iterate.impl.NewCursor.type
  766. // CHECK:STDOUT: %IntRange.as.Iterate.impl.NewCursor => constants.%IntRange.as.Iterate.impl.NewCursor
  767. // CHECK:STDOUT: %IntRange.as.Iterate.impl.Next.type => constants.%IntRange.as.Iterate.impl.Next.type
  768. // CHECK:STDOUT: %IntRange.as.Iterate.impl.Next => constants.%IntRange.as.Iterate.impl.Next
  769. // CHECK:STDOUT: }
  770. // CHECK:STDOUT:
  771. // CHECK:STDOUT: specific @IntRange.as.Iterate.impl.NewCursor(constants.%N.c80) {
  772. // CHECK:STDOUT: %N => constants.%N.c80
  773. // CHECK:STDOUT: %IntRange => constants.%IntRange.349
  774. // CHECK:STDOUT: %pattern_type.loc10_18 => constants.%pattern_type.dcd
  775. // CHECK:STDOUT: %Int.loc10_45.1 => constants.%Int.49d0e6.1
  776. // CHECK:STDOUT: %pattern_type.loc10_32 => constants.%pattern_type.8963eb.1
  777. // CHECK:STDOUT: }
  778. // CHECK:STDOUT:
  779. // CHECK:STDOUT: specific @IntRange.as.Iterate.impl.Next(constants.%N.c80) {
  780. // CHECK:STDOUT: %N => constants.%N.c80
  781. // CHECK:STDOUT: %IntRange => constants.%IntRange.349
  782. // CHECK:STDOUT: %pattern_type.loc11_13 => constants.%pattern_type.dcd
  783. // CHECK:STDOUT: %Int.loc11_43.1 => constants.%Int.49d0e6.1
  784. // CHECK:STDOUT: %ptr.loc11_44.1 => constants.%ptr.784
  785. // CHECK:STDOUT: %pattern_type.loc11_25 => constants.%pattern_type.4dc
  786. // CHECK:STDOUT: %Optional.loc11_75.1 => constants.%Optional.708
  787. // CHECK:STDOUT: %pattern_type.loc11_47 => constants.%pattern_type.4b1
  788. // CHECK:STDOUT: }
  789. // CHECK:STDOUT:
  790. // CHECK:STDOUT: specific @IntRange.as.Destroy.impl(constants.%N.c80) {
  791. // CHECK:STDOUT: %N => constants.%N.c80
  792. // CHECK:STDOUT: %Destroy.impl_witness => constants.%Destroy.impl_witness.0ef
  793. // CHECK:STDOUT: }
  794. // CHECK:STDOUT:
  795. // CHECK:STDOUT: specific @IntRange.as.Destroy.impl.Op(constants.%N.c80) {
  796. // CHECK:STDOUT: %N => constants.%N.c80
  797. // CHECK:STDOUT: %IntRange => constants.%IntRange.349
  798. // CHECK:STDOUT: %ptr => constants.%ptr.710
  799. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.99f
  800. // CHECK:STDOUT: }
  801. // CHECK:STDOUT:
  802. // CHECK:STDOUT: specific @IntRange(constants.%int_32) {
  803. // CHECK:STDOUT: %N.loc4_16.1 => constants.%int_32
  804. // CHECK:STDOUT:
  805. // CHECK:STDOUT: !definition:
  806. // CHECK:STDOUT: %IntRange.Make.type => constants.%IntRange.Make.type.cef
  807. // CHECK:STDOUT: %IntRange.Make => constants.%IntRange.Make.0dc
  808. // CHECK:STDOUT: %Int.loc22_32.2 => constants.%i32
  809. // CHECK:STDOUT: %require_complete => constants.%complete_type.f8a
  810. // CHECK:STDOUT: %IntRange => constants.%IntRange.365
  811. // CHECK:STDOUT: %IntRange.elem => constants.%IntRange.elem.e33
  812. // CHECK:STDOUT: %struct_type.start.end.loc24_1.2 => constants.%struct_type.start.end.d0a
  813. // CHECK:STDOUT: %complete_type.loc24_1.2 => constants.%complete_type.c45
  814. // CHECK:STDOUT: }
  815. // CHECK:STDOUT:
  816. // CHECK:STDOUT: specific @IntRange.Make(constants.%int_32) {
  817. // CHECK:STDOUT: %N => constants.%int_32
  818. // CHECK:STDOUT: %Int.loc5_28.1 => constants.%i32
  819. // CHECK:STDOUT: %pattern_type.loc5_11 => constants.%pattern_type.7ce
  820. // CHECK:STDOUT: %IntRange => constants.%IntRange.365
  821. // CHECK:STDOUT: %pattern_type.loc5_49 => constants.%pattern_type.d16
  822. // CHECK:STDOUT:
  823. // CHECK:STDOUT: !definition:
  824. // CHECK:STDOUT: %require_complete.loc5_49 => constants.%complete_type.c45
  825. // CHECK:STDOUT: %require_complete.loc5_16 => constants.%complete_type.f8a
  826. // CHECK:STDOUT: %struct_type.start.end => constants.%struct_type.start.end.d0a
  827. // CHECK:STDOUT: }
  828. // CHECK:STDOUT:
  829. // CHECK:STDOUT: specific @IntRange.as.Destroy.impl(constants.%int_32) {
  830. // CHECK:STDOUT: %N => constants.%int_32
  831. // CHECK:STDOUT: %Destroy.impl_witness => constants.%Destroy.impl_witness.378
  832. // CHECK:STDOUT: }
  833. // CHECK:STDOUT:
  834. // CHECK:STDOUT: --- trivial.carbon
  835. // CHECK:STDOUT:
  836. // CHECK:STDOUT: constants {
  837. // CHECK:STDOUT: %Read.type: type = fn_type @Read [concrete]
  838. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  839. // CHECK:STDOUT: %Read: %Read.type = struct_value () [concrete]
  840. // CHECK:STDOUT: %IntLiteral.type: type = fn_type @IntLiteral [concrete]
  841. // CHECK:STDOUT: %IntLiteral: %IntLiteral.type = struct_value () [concrete]
  842. // CHECK:STDOUT: %y: Core.IntLiteral = bind_symbolic_name y, 0 [symbolic]
  843. // CHECK:STDOUT: %pattern_type.dc0: type = pattern_type Core.IntLiteral [concrete]
  844. // CHECK:STDOUT: %int_43: Core.IntLiteral = int_value 43 [concrete]
  845. // CHECK:STDOUT: %IntRange.type: type = generic_class_type @IntRange [concrete]
  846. // CHECK:STDOUT: %IntRange.generic: %IntRange.type = struct_value () [concrete]
  847. // CHECK:STDOUT: %N.c80: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic]
  848. // CHECK:STDOUT: %Int.7ff11f.1: type = class_type @Int, @Int(%N.c80) [symbolic]
  849. // CHECK:STDOUT: %struct_type.start.end.434: type = struct_type {.start: %Int.7ff11f.1, .end: %Int.7ff11f.1} [symbolic]
  850. // CHECK:STDOUT: %complete_type.c76: <witness> = complete_type_witness %struct_type.start.end.434 [symbolic]
  851. // CHECK:STDOUT: %IntRange.349: type = class_type @IntRange, @IntRange(%N.c80) [symbolic]
  852. // CHECK:STDOUT: %IntRange.Make.type.51f: type = fn_type @IntRange.Make, @IntRange(%N.c80) [symbolic]
  853. // CHECK:STDOUT: %IntRange.Make.2ec: %IntRange.Make.type.51f = struct_value () [symbolic]
  854. // CHECK:STDOUT: %pattern_type.dcd: type = pattern_type %IntRange.349 [symbolic]
  855. // CHECK:STDOUT: %pattern_type.0ede7b.1: type = pattern_type %Int.7ff11f.1 [symbolic]
  856. // CHECK:STDOUT: %require_complete.ffde5f.1: <witness> = require_complete_type %Int.7ff11f.1 [symbolic]
  857. // CHECK:STDOUT: %IntRange.elem.ecb: type = unbound_element_type %IntRange.349, %Int.7ff11f.1 [symbolic]
  858. // CHECK:STDOUT: %require_complete.524: <witness> = require_complete_type %IntRange.349 [symbolic]
  859. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  860. // CHECK:STDOUT: %IntRange.365: type = class_type @IntRange, @IntRange(%int_32) [concrete]
  861. // CHECK:STDOUT: %IntRange.Make.type.cef: type = fn_type @IntRange.Make, @IntRange(%int_32) [concrete]
  862. // CHECK:STDOUT: %IntRange.Make.0dc: %IntRange.Make.type.cef = struct_value () [concrete]
  863. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  864. // CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [concrete]
  865. // CHECK:STDOUT: %complete_type.f8a: <witness> = complete_type_witness %i32.builtin [concrete]
  866. // CHECK:STDOUT: %IntRange.elem.f21: type = unbound_element_type %IntRange.365, %i32 [concrete]
  867. // CHECK:STDOUT: %struct_type.start.end.0fe: type = struct_type {.start: %i32, .end: %i32} [concrete]
  868. // CHECK:STDOUT: %complete_type.a43: <witness> = complete_type_witness %struct_type.start.end.0fe [concrete]
  869. // CHECK:STDOUT: %pattern_type.d16: type = pattern_type %IntRange.365 [concrete]
  870. // CHECK:STDOUT: %Range.type: type = fn_type @Range [concrete]
  871. // CHECK:STDOUT: %Range: %Range.type = struct_value () [concrete]
  872. // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
  873. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
  874. // CHECK:STDOUT: %ImplicitAs.type.9ba: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
  875. // CHECK:STDOUT: %ImplicitAs.Convert.type.6da: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete]
  876. // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
  877. // CHECK:STDOUT: %Destroy.impl_witness.382: <witness> = impl_witness imports.%Destroy.impl_witness_table.14b, @Int.as.Destroy.impl(%N.c80) [symbolic]
  878. // CHECK:STDOUT: %Int.as.Destroy.impl.Op.type: type = fn_type @Int.as.Destroy.impl.Op, @Int.as.Destroy.impl(%N.c80) [symbolic]
  879. // CHECK:STDOUT: %Int.as.Destroy.impl.Op: %Int.as.Destroy.impl.Op.type = struct_value () [symbolic]
  880. // CHECK:STDOUT: %ptr.58a: type = ptr_type %Int.7ff11f.1 [symbolic]
  881. // CHECK:STDOUT: %pattern_type.6d0: type = pattern_type %ptr.58a [symbolic]
  882. // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic]
  883. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.0b2: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To.c80) [symbolic]
  884. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.6d7: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.0b2 = struct_value () [symbolic]
  885. // CHECK:STDOUT: %OrderedWith.type.256: type = facet_type <@OrderedWith, @OrderedWith(%Int.7ff11f.1)> [symbolic]
  886. // CHECK:STDOUT: %require_complete.10b: <witness> = require_complete_type %OrderedWith.type.256 [symbolic]
  887. // CHECK:STDOUT: %OrderedWith.Less.type.016: type = fn_type @OrderedWith.Less, @OrderedWith(%Int.7ff11f.1) [symbolic]
  888. // CHECK:STDOUT: %OrderedWith.assoc_type.e53: type = assoc_entity_type @OrderedWith, @OrderedWith(%Int.7ff11f.1) [symbolic]
  889. // CHECK:STDOUT: %require_complete.656: <witness> = require_complete_type %ptr.58a [symbolic]
  890. // CHECK:STDOUT: %Inc.type: type = facet_type <@Inc> [concrete]
  891. // CHECK:STDOUT: %ImplicitAs.impl_witness.e34: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.e36, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  892. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.ed5: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  893. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.16d: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.ed5 = struct_value () [concrete]
  894. // CHECK:STDOUT: %ImplicitAs.facet.2e7: %ImplicitAs.type.9ba = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.e34) [concrete]
  895. // CHECK:STDOUT: %.d6a: type = fn_type_with_self_type %ImplicitAs.Convert.type.6da, %ImplicitAs.facet.2e7 [concrete]
  896. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.971: <bound method> = bound_method %y, %Core.IntLiteral.as.ImplicitAs.impl.Convert.16d [symbolic]
  897. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.16d, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete]
  898. // CHECK:STDOUT: %bound_method.d68: <bound method> = bound_method %y, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [symbolic]
  899. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.58b: init %i32 = call %bound_method.d68(%y) [symbolic]
  900. // CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete]
  901. // CHECK:STDOUT: %Iterate.type: type = facet_type <@Iterate> [concrete]
  902. // CHECK:STDOUT: %.Self.36d: %Iterate.type = bind_symbolic_name .Self [symbolic_self]
  903. // CHECK:STDOUT: %Iterate.lookup_impl_witness: <witness> = lookup_impl_witness %.Self.36d, @Iterate [symbolic_self]
  904. // CHECK:STDOUT: %impl.elem0.a12: type = impl_witness_access %Iterate.lookup_impl_witness, element0 [symbolic_self]
  905. // CHECK:STDOUT: %impl.elem1: type = impl_witness_access %Iterate.lookup_impl_witness, element1 [symbolic_self]
  906. // CHECK:STDOUT: %Iterate_where.type.2cb: type = facet_type <@Iterate where %impl.elem0.a12 = %Int.7ff11f.1 and %impl.elem1 = %Int.7ff11f.1> [symbolic]
  907. // CHECK:STDOUT: %require_complete.6f5: <witness> = require_complete_type %Iterate_where.type.2cb [symbolic]
  908. // CHECK:STDOUT: %Iterate.impl_witness.d2b: <witness> = impl_witness imports.%Iterate.impl_witness_table.b32, @IntRange.as.Iterate.impl(%N.c80) [symbolic]
  909. // CHECK:STDOUT: %IntRange.as.Iterate.impl.NewCursor.type: type = fn_type @IntRange.as.Iterate.impl.NewCursor, @IntRange.as.Iterate.impl(%N.c80) [symbolic]
  910. // CHECK:STDOUT: %IntRange.as.Iterate.impl.NewCursor: %IntRange.as.Iterate.impl.NewCursor.type = struct_value () [symbolic]
  911. // CHECK:STDOUT: %IntRange.as.Iterate.impl.Next.type: type = fn_type @IntRange.as.Iterate.impl.Next, @IntRange.as.Iterate.impl(%N.c80) [symbolic]
  912. // CHECK:STDOUT: %IntRange.as.Iterate.impl.Next: %IntRange.as.Iterate.impl.Next.type = struct_value () [symbolic]
  913. // CHECK:STDOUT: %Optional.e9f: type = class_type @Optional, @Optional(%Int.7ff11f.1) [symbolic]
  914. // CHECK:STDOUT: %pattern_type.fd8: type = pattern_type %Optional.e9f [symbolic]
  915. // CHECK:STDOUT: %require_complete.5a1: <witness> = require_complete_type %Optional.e9f [symbolic]
  916. // CHECK:STDOUT: %assoc0.4a4: %OrderedWith.assoc_type.e53 = assoc_entity element0, imports.%Main.import_ref.026 [symbolic]
  917. // CHECK:STDOUT: %OrderedWith.impl_witness.350: <witness> = impl_witness imports.%OrderedWith.impl_witness_table.0e1, @Int.as.OrderedWith.impl.5b6(%N.c80, %N.c80) [symbolic]
  918. // CHECK:STDOUT: %OrderedWith.facet: %OrderedWith.type.256 = facet_value %Int.7ff11f.1, (%OrderedWith.impl_witness.350) [symbolic]
  919. // CHECK:STDOUT: %.3bd: type = fn_type_with_self_type %OrderedWith.Less.type.016, %OrderedWith.facet [symbolic]
  920. // CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.type.4f5: type = fn_type @Int.as.OrderedWith.impl.Less.1, @Int.as.OrderedWith.impl.5b6(%N.c80, %N.c80) [symbolic]
  921. // CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.3b5: %Int.as.OrderedWith.impl.Less.type.4f5 = struct_value () [symbolic]
  922. // CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.specific_fn.5e2: <specific function> = specific_function %Int.as.OrderedWith.impl.Less.3b5, @Int.as.OrderedWith.impl.Less.1(%N.c80, %N.c80) [symbolic]
  923. // CHECK:STDOUT: %Inc.lookup_impl_witness: <witness> = lookup_impl_witness %Int.7ff11f.1, @Inc [symbolic]
  924. // CHECK:STDOUT: %Inc.facet: %Inc.type = facet_value %Int.7ff11f.1, (%Inc.lookup_impl_witness) [symbolic]
  925. // CHECK:STDOUT: %Inc.Op.type: type = fn_type @Inc.Op [concrete]
  926. // CHECK:STDOUT: %.15d: type = fn_type_with_self_type %Inc.Op.type, %Inc.facet [symbolic]
  927. // CHECK:STDOUT: %impl.elem0.181: %.15d = impl_witness_access %Inc.lookup_impl_witness, element0 [symbolic]
  928. // CHECK:STDOUT: %specific_impl_fn.be7: <specific function> = specific_impl_function %impl.elem0.181, @Inc.Op(%Inc.facet) [symbolic]
  929. // CHECK:STDOUT: %Optional.Some.type.fe1: type = fn_type @Optional.Some, @Optional(%Int.7ff11f.1) [symbolic]
  930. // CHECK:STDOUT: %Optional.Some.aae: %Optional.Some.type.fe1 = struct_value () [symbolic]
  931. // CHECK:STDOUT: %Optional.Some.specific_fn.b8a: <specific function> = specific_function %Optional.Some.aae, @Optional.Some(%Int.7ff11f.1) [symbolic]
  932. // CHECK:STDOUT: %Destroy.lookup_impl_witness: <witness> = lookup_impl_witness %Optional.e9f, @Destroy [symbolic]
  933. // CHECK:STDOUT: %Destroy.facet.82c: %Destroy.type = facet_value %Optional.e9f, (%Destroy.lookup_impl_witness) [symbolic]
  934. // CHECK:STDOUT: %.485: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.82c [symbolic]
  935. // CHECK:STDOUT: %impl.elem0.c7c: %.485 = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic]
  936. // CHECK:STDOUT: %specific_impl_fn.ebe: <specific function> = specific_impl_function %impl.elem0.c7c, @Destroy.Op(%Destroy.facet.82c) [symbolic]
  937. // CHECK:STDOUT: %ptr.d1d: type = ptr_type %Optional.e9f [symbolic]
  938. // CHECK:STDOUT: %require_complete.c68: <witness> = require_complete_type %ptr.d1d [symbolic]
  939. // CHECK:STDOUT: %Destroy.facet.168: %Destroy.type = facet_value %Int.7ff11f.1, (%Destroy.impl_witness.382) [symbolic]
  940. // CHECK:STDOUT: %.a07: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.168 [symbolic]
  941. // CHECK:STDOUT: %Int.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function %Int.as.Destroy.impl.Op, @Int.as.Destroy.impl.Op(%N.c80) [symbolic]
  942. // CHECK:STDOUT: %Optional.None.type.8c4: type = fn_type @Optional.None, @Optional(%Int.7ff11f.1) [symbolic]
  943. // CHECK:STDOUT: %Optional.None.7a7: %Optional.None.type.8c4 = struct_value () [symbolic]
  944. // CHECK:STDOUT: %Optional.None.specific_fn.9e7: <specific function> = specific_function %Optional.None.7a7, @Optional.None(%Int.7ff11f.1) [symbolic]
  945. // CHECK:STDOUT: %Destroy.impl_witness.881: <witness> = impl_witness imports.%Destroy.impl_witness_table.901, @IntRange.as.Destroy.impl(%N.c80) [symbolic]
  946. // CHECK:STDOUT: %IntRange.as.Destroy.impl.Op.type: type = fn_type @IntRange.as.Destroy.impl.Op, @IntRange.as.Destroy.impl(%N.c80) [symbolic]
  947. // CHECK:STDOUT: %IntRange.as.Destroy.impl.Op: %IntRange.as.Destroy.impl.Op.type = struct_value () [symbolic]
  948. // CHECK:STDOUT: %ptr.710: type = ptr_type %IntRange.349 [symbolic]
  949. // CHECK:STDOUT: %pattern_type.99f: type = pattern_type %ptr.710 [symbolic]
  950. // CHECK:STDOUT: %Destroy.impl_witness.bb5: <witness> = impl_witness imports.%Destroy.impl_witness_table.901, @IntRange.as.Destroy.impl(%int_32) [concrete]
  951. // CHECK:STDOUT: %T.as.Destroy.impl.Op.type.2d1: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%IntRange.365) [concrete]
  952. // CHECK:STDOUT: %T.as.Destroy.impl.Op.fa8: %T.as.Destroy.impl.Op.type.2d1 = struct_value () [concrete]
  953. // CHECK:STDOUT: %ptr.049: type = ptr_type %IntRange.365 [concrete]
  954. // CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function %T.as.Destroy.impl.Op.fa8, @T.as.Destroy.impl.Op(%IntRange.365) [concrete]
  955. // CHECK:STDOUT: }
  956. // CHECK:STDOUT:
  957. // CHECK:STDOUT: imports {
  958. // CHECK:STDOUT: %Main.IntRange: %IntRange.type = import_ref Main//lib, IntRange, loaded [concrete = constants.%IntRange.generic]
  959. // CHECK:STDOUT: %Main.Range: %Range.type = import_ref Main//lib, Range, loaded [concrete = constants.%Range]
  960. // CHECK:STDOUT: %Core.ece: <namespace> = namespace file.%Core.import, [concrete] {
  961. // CHECK:STDOUT: .IntLiteral = %Core.IntLiteral
  962. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  963. // CHECK:STDOUT: .Destroy = %Core.Destroy
  964. // CHECK:STDOUT: import Core//prelude
  965. // CHECK:STDOUT: import Core//prelude/...
  966. // CHECK:STDOUT: }
  967. // CHECK:STDOUT: %Core.IntLiteral: %IntLiteral.type = import_ref Core//prelude/types/int_literal, IntLiteral, loaded [concrete = constants.%IntLiteral]
  968. // CHECK:STDOUT: %Main.import_ref.f1e294.1: Core.IntLiteral = import_ref Main//lib, loc4_16, loaded [symbolic = @IntRange.%N (constants.%N.c80)]
  969. // CHECK:STDOUT: %Main.import_ref.30f: <witness> = import_ref Main//lib, loc24_1, loaded [symbolic = @IntRange.%complete_type (constants.%complete_type.c76)]
  970. // CHECK:STDOUT: %Main.import_ref.d13 = import_ref Main//lib, inst40 [no loc], unloaded
  971. // CHECK:STDOUT: %Main.import_ref.d98 = import_ref Main//lib, loc5_57, unloaded
  972. // CHECK:STDOUT: %Main.import_ref.e58 = import_ref Main//lib, loc22_20, unloaded
  973. // CHECK:STDOUT: %Main.import_ref.261 = import_ref Main//lib, loc23_18, unloaded
  974. // CHECK:STDOUT: %Main.import_ref.f1e294.2: Core.IntLiteral = import_ref Main//lib, loc4_16, loaded [symbolic = @IntRange.%N (constants.%N.c80)]
  975. // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
  976. // CHECK:STDOUT: %Core.import_ref.45b = import_ref Core//prelude/types/int, loc13_29, unloaded
  977. // CHECK:STDOUT: %Destroy.impl_witness_table.14b = impl_witness_table (%Core.import_ref.45b), @Int.as.Destroy.impl [concrete]
  978. // CHECK:STDOUT: %Core.import_ref.a86c: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.0b2) = import_ref Core//prelude/types/int, loc20_39, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6d7)]
  979. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.e36 = impl_witness_table (%Core.import_ref.a86c), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
  980. // CHECK:STDOUT: %Core.import_ref.e33 = import_ref Core//prelude/types/int, loc52_46, unloaded
  981. // CHECK:STDOUT: %Core.import_ref.a58 = import_ref Core//prelude/types/int, loc53_58, unloaded
  982. // CHECK:STDOUT: %Core.import_ref.a39 = import_ref Core//prelude/types/int, loc54_49, unloaded
  983. // CHECK:STDOUT: %Core.import_ref.c4c = import_ref Core//prelude/types/int, loc55_61, unloaded
  984. // CHECK:STDOUT: %OrderedWith.impl_witness_table.0e1 = impl_witness_table (%Core.import_ref.e33, %Core.import_ref.a58, %Core.import_ref.a39, %Core.import_ref.c4c), @Int.as.OrderedWith.impl.5b6 [concrete]
  985. // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
  986. // CHECK:STDOUT: %Main.import_ref.0c8 = import_ref Main//lib, loc9_87, unloaded
  987. // CHECK:STDOUT: %Main.import_ref.f1e294.3: Core.IntLiteral = import_ref Main//lib, loc4_16, loaded [symbolic = @IntRange.%N (constants.%N.c80)]
  988. // CHECK:STDOUT: %Main.import_ref.dae: type = import_ref Main//lib, loc9_8, loaded [symbolic = @IntRange.as.Iterate.impl.%IntRange (constants.%IntRange.349)]
  989. // CHECK:STDOUT: %Main.import_ref.35b: type = import_ref Main//lib, loc9_24, loaded [symbolic = @IntRange.as.Iterate.impl.%Iterate_where.type (constants.%Iterate_where.type.2cb)]
  990. // CHECK:STDOUT: %Main.import_ref.e3faa9.1 = import_ref Main//lib, loc9_87, unloaded
  991. // CHECK:STDOUT: %Main.import_ref.e3faa9.2 = import_ref Main//lib, loc9_87, unloaded
  992. // CHECK:STDOUT: %Main.import_ref.11c = import_ref Main//lib, loc10_47, unloaded
  993. // CHECK:STDOUT: %Main.import_ref.f97 = import_ref Main//lib, loc11_77, unloaded
  994. // CHECK:STDOUT: %Iterate.impl_witness_table.b32 = impl_witness_table (%Main.import_ref.e3faa9.1, %Main.import_ref.e3faa9.2, %Main.import_ref.11c, %Main.import_ref.f97), @IntRange.as.Iterate.impl [concrete]
  995. // CHECK:STDOUT: %Main.import_ref.f1e294.4: Core.IntLiteral = import_ref Main//lib, loc4_16, loaded [symbolic = @IntRange.%N (constants.%N.c80)]
  996. // CHECK:STDOUT: %Main.import_ref.f1e294.5: Core.IntLiteral = import_ref Main//lib, loc4_16, loaded [symbolic = @IntRange.%N (constants.%N.c80)]
  997. // CHECK:STDOUT: %Main.import_ref.026 = import_ref Main//lib, inst1891 [indirect], unloaded
  998. // CHECK:STDOUT: %Main.import_ref.921 = import_ref Main//lib, loc4_39, unloaded
  999. // CHECK:STDOUT: %Main.import_ref.f1e294.6: Core.IntLiteral = import_ref Main//lib, loc4_16, loaded [symbolic = @IntRange.%N (constants.%N.c80)]
  1000. // CHECK:STDOUT: %Main.import_ref.e9a: type = import_ref Main//lib, inst40 [no loc], loaded [symbolic = constants.%IntRange.349]
  1001. // CHECK:STDOUT: %Main.import_ref.cb9: type = import_ref Main//lib, inst298 [no loc], loaded [concrete = constants.%Destroy.type]
  1002. // CHECK:STDOUT: %Main.import_ref.b63 = import_ref Main//lib, loc4_39, unloaded
  1003. // CHECK:STDOUT: %Destroy.impl_witness_table.901 = impl_witness_table (%Main.import_ref.b63), @IntRange.as.Destroy.impl [concrete]
  1004. // CHECK:STDOUT: %Main.import_ref.f1e294.7: Core.IntLiteral = import_ref Main//lib, loc4_16, loaded [symbolic = @IntRange.%N (constants.%N.c80)]
  1005. // CHECK:STDOUT: }
  1006. // CHECK:STDOUT:
  1007. // CHECK:STDOUT: file {
  1008. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  1009. // CHECK:STDOUT: .IntRange = imports.%Main.IntRange
  1010. // CHECK:STDOUT: .Range = imports.%Main.Range
  1011. // CHECK:STDOUT: .Core = imports.%Core.ece
  1012. // CHECK:STDOUT: .Read = %Read.decl
  1013. // CHECK:STDOUT: }
  1014. // CHECK:STDOUT: %Core.import = import Core
  1015. // CHECK:STDOUT: %default.import = import <none>
  1016. // CHECK:STDOUT: %Read.decl: %Read.type = fn_decl @Read [concrete = constants.%Read] {} {}
  1017. // CHECK:STDOUT: }
  1018. // CHECK:STDOUT:
  1019. // CHECK:STDOUT: generic impl @IntRange.as.Iterate.impl(imports.%Main.import_ref.f1e294.3: Core.IntLiteral) [from "lib.carbon"] {
  1020. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N.c80)]
  1021. // CHECK:STDOUT: %IntRange: type = class_type @IntRange, @IntRange(%N) [symbolic = %IntRange (constants.%IntRange.349)]
  1022. // CHECK:STDOUT: %Int: type = class_type @Int, @Int(%N) [symbolic = %Int (constants.%Int.7ff11f.1)]
  1023. // CHECK:STDOUT: %Iterate_where.type: type = facet_type <@Iterate where constants.%impl.elem0.a12 = %Int and constants.%impl.elem1 = %Int> [symbolic = %Iterate_where.type (constants.%Iterate_where.type.2cb)]
  1024. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Iterate_where.type [symbolic = %require_complete (constants.%require_complete.6f5)]
  1025. // CHECK:STDOUT: %Iterate.impl_witness: <witness> = impl_witness imports.%Iterate.impl_witness_table.b32, @IntRange.as.Iterate.impl(%N) [symbolic = %Iterate.impl_witness (constants.%Iterate.impl_witness.d2b)]
  1026. // CHECK:STDOUT:
  1027. // CHECK:STDOUT: !definition:
  1028. // 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)]
  1029. // 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)]
  1030. // 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)]
  1031. // 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)]
  1032. // CHECK:STDOUT:
  1033. // CHECK:STDOUT: impl: imports.%Main.import_ref.dae as imports.%Main.import_ref.35b {
  1034. // CHECK:STDOUT: !members:
  1035. // CHECK:STDOUT: witness = imports.%Main.import_ref.0c8
  1036. // CHECK:STDOUT: }
  1037. // CHECK:STDOUT: }
  1038. // CHECK:STDOUT:
  1039. // CHECK:STDOUT: generic impl @IntRange.as.Destroy.impl(imports.%Main.import_ref.f1e294.6: Core.IntLiteral) [from "lib.carbon"] {
  1040. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N.c80)]
  1041. // CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness imports.%Destroy.impl_witness_table.901, @IntRange.as.Destroy.impl(%N) [symbolic = %Destroy.impl_witness (constants.%Destroy.impl_witness.881)]
  1042. // CHECK:STDOUT:
  1043. // CHECK:STDOUT: !definition:
  1044. // 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)]
  1045. // 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)]
  1046. // CHECK:STDOUT:
  1047. // CHECK:STDOUT: impl: imports.%Main.import_ref.e9a as imports.%Main.import_ref.cb9 {
  1048. // CHECK:STDOUT: !members:
  1049. // CHECK:STDOUT: witness = imports.%Main.import_ref.921
  1050. // CHECK:STDOUT: }
  1051. // CHECK:STDOUT: }
  1052. // CHECK:STDOUT:
  1053. // CHECK:STDOUT: generic class @IntRange(imports.%Main.import_ref.f1e294.1: Core.IntLiteral) [from "lib.carbon"] {
  1054. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N.c80)]
  1055. // CHECK:STDOUT:
  1056. // CHECK:STDOUT: !definition:
  1057. // CHECK:STDOUT: %IntRange.Make.type: type = fn_type @IntRange.Make, @IntRange(%N) [symbolic = %IntRange.Make.type (constants.%IntRange.Make.type.51f)]
  1058. // CHECK:STDOUT: %IntRange.Make: @IntRange.%IntRange.Make.type (%IntRange.Make.type.51f) = struct_value () [symbolic = %IntRange.Make (constants.%IntRange.Make.2ec)]
  1059. // CHECK:STDOUT: %Int: type = class_type @Int, @Int(%N) [symbolic = %Int (constants.%Int.7ff11f.1)]
  1060. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Int [symbolic = %require_complete (constants.%require_complete.ffde5f.1)]
  1061. // CHECK:STDOUT: %IntRange: type = class_type @IntRange, @IntRange(%N) [symbolic = %IntRange (constants.%IntRange.349)]
  1062. // CHECK:STDOUT: %IntRange.elem: type = unbound_element_type %IntRange, %Int [symbolic = %IntRange.elem (constants.%IntRange.elem.ecb)]
  1063. // 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)]
  1064. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %struct_type.start.end [symbolic = %complete_type (constants.%complete_type.c76)]
  1065. // CHECK:STDOUT:
  1066. // CHECK:STDOUT: class {
  1067. // CHECK:STDOUT: complete_type_witness = imports.%Main.import_ref.30f
  1068. // CHECK:STDOUT:
  1069. // CHECK:STDOUT: !members:
  1070. // CHECK:STDOUT: .Self = imports.%Main.import_ref.d13
  1071. // CHECK:STDOUT: .Make = imports.%Main.import_ref.d98
  1072. // CHECK:STDOUT: .start [private] = imports.%Main.import_ref.e58
  1073. // CHECK:STDOUT: .end [private] = imports.%Main.import_ref.261
  1074. // CHECK:STDOUT: }
  1075. // CHECK:STDOUT: }
  1076. // CHECK:STDOUT:
  1077. // CHECK:STDOUT: fn @Read() {
  1078. // CHECK:STDOUT: !entry:
  1079. // CHECK:STDOUT: name_binding_decl {
  1080. // CHECK:STDOUT: %y.patt: %pattern_type.dc0 = symbolic_binding_pattern y, 0 [concrete]
  1081. // CHECK:STDOUT: }
  1082. // CHECK:STDOUT: %int_43: Core.IntLiteral = int_value 43 [concrete = constants.%int_43]
  1083. // CHECK:STDOUT: %.loc5_27.1: type = splice_block %.loc5_27.3 [concrete = Core.IntLiteral] {
  1084. // CHECK:STDOUT: %Core.ref: <namespace> = name_ref Core, imports.%Core.ece [concrete = imports.%Core.ece]
  1085. // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, imports.%Core.IntLiteral [concrete = constants.%IntLiteral]
  1086. // CHECK:STDOUT: %IntLiteral.call: init type = call %IntLiteral.ref() [concrete = Core.IntLiteral]
  1087. // CHECK:STDOUT: %.loc5_27.2: type = value_of_initializer %IntLiteral.call [concrete = Core.IntLiteral]
  1088. // CHECK:STDOUT: %.loc5_27.3: type = converted %IntLiteral.call, %.loc5_27.2 [concrete = Core.IntLiteral]
  1089. // CHECK:STDOUT: }
  1090. // CHECK:STDOUT: %y: Core.IntLiteral = bind_symbolic_name y, 0, %int_43 [symbolic = constants.%y]
  1091. // CHECK:STDOUT: name_binding_decl {
  1092. // CHECK:STDOUT: %x.patt: %pattern_type.d16 = binding_pattern x [concrete]
  1093. // CHECK:STDOUT: %x.var_patt: %pattern_type.d16 = var_pattern %x.patt [concrete]
  1094. // CHECK:STDOUT: }
  1095. // CHECK:STDOUT: %x.var: ref %IntRange.365 = var %x.var_patt
  1096. // CHECK:STDOUT: %Range.ref: %Range.type = name_ref Range, imports.%Main.Range [concrete = constants.%Range]
  1097. // CHECK:STDOUT: %y.ref: Core.IntLiteral = name_ref y, %y [symbolic = constants.%y]
  1098. // CHECK:STDOUT: %.loc6_3: ref %IntRange.365 = splice_block %x.var {}
  1099. // CHECK:STDOUT: %impl.elem0: %.d6a = impl_witness_access constants.%ImplicitAs.impl_witness.e34, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.16d]
  1100. // CHECK:STDOUT: %bound_method.loc6_31.1: <bound method> = bound_method %y.ref, %impl.elem0 [symbolic = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.971]
  1101. // 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]
  1102. // CHECK:STDOUT: %bound_method.loc6_31.2: <bound method> = bound_method %y.ref, %specific_fn [symbolic = constants.%bound_method.d68]
  1103. // 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.58b]
  1104. // 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.58b]
  1105. // CHECK:STDOUT: %.loc6_31.2: %i32 = converted %y.ref, %.loc6_31.1 [symbolic = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.call.58b]
  1106. // CHECK:STDOUT: %Range.call: init %IntRange.365 = call %Range.ref(%.loc6_31.2) to %.loc6_3
  1107. // CHECK:STDOUT: assign %x.var, %Range.call
  1108. // CHECK:STDOUT: %.loc6_21: type = splice_block %IntRange [concrete = constants.%IntRange.365] {
  1109. // CHECK:STDOUT: %IntRange.ref: %IntRange.type = name_ref IntRange, imports.%Main.IntRange [concrete = constants.%IntRange.generic]
  1110. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  1111. // CHECK:STDOUT: %IntRange: type = class_type @IntRange, @IntRange(constants.%int_32) [concrete = constants.%IntRange.365]
  1112. // CHECK:STDOUT: }
  1113. // CHECK:STDOUT: %x: ref %IntRange.365 = bind_name x, %x.var
  1114. // CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc6_3.1: <bound method> = bound_method %.loc6_3, constants.%T.as.Destroy.impl.Op.fa8
  1115. // CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.1: <specific function> = specific_function constants.%T.as.Destroy.impl.Op.fa8, @T.as.Destroy.impl.Op(constants.%IntRange.365) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn]
  1116. // CHECK:STDOUT: %bound_method.loc6_3.1: <bound method> = bound_method %.loc6_3, %T.as.Destroy.impl.Op.specific_fn.1
  1117. // CHECK:STDOUT: %addr.loc6_3.1: %ptr.049 = addr_of %.loc6_3
  1118. // CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc6_3.1: init %empty_tuple.type = call %bound_method.loc6_3.1(%addr.loc6_3.1)
  1119. // CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc6_3.2: <bound method> = bound_method %x.var, constants.%T.as.Destroy.impl.Op.fa8
  1120. // CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.2: <specific function> = specific_function constants.%T.as.Destroy.impl.Op.fa8, @T.as.Destroy.impl.Op(constants.%IntRange.365) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn]
  1121. // CHECK:STDOUT: %bound_method.loc6_3.2: <bound method> = bound_method %x.var, %T.as.Destroy.impl.Op.specific_fn.2
  1122. // CHECK:STDOUT: %addr.loc6_3.2: %ptr.049 = addr_of %x.var
  1123. // CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc6_3.2: init %empty_tuple.type = call %bound_method.loc6_3.2(%addr.loc6_3.2)
  1124. // CHECK:STDOUT: return
  1125. // CHECK:STDOUT: }
  1126. // CHECK:STDOUT:
  1127. // CHECK:STDOUT: generic fn @IntRange.Make(imports.%Main.import_ref.f1e294.2: Core.IntLiteral) [from "lib.carbon"] {
  1128. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N.c80)]
  1129. // CHECK:STDOUT: %Int: type = class_type @Int, @Int(%N) [symbolic = %Int (constants.%Int.7ff11f.1)]
  1130. // CHECK:STDOUT: %pattern_type.1: type = pattern_type %Int [symbolic = %pattern_type.1 (constants.%pattern_type.0ede7b.1)]
  1131. // CHECK:STDOUT: %IntRange: type = class_type @IntRange, @IntRange(%N) [symbolic = %IntRange (constants.%IntRange.349)]
  1132. // CHECK:STDOUT: %pattern_type.2: type = pattern_type %IntRange [symbolic = %pattern_type.2 (constants.%pattern_type.dcd)]
  1133. // CHECK:STDOUT:
  1134. // CHECK:STDOUT: !definition:
  1135. // CHECK:STDOUT: %require_complete.1: <witness> = require_complete_type %IntRange [symbolic = %require_complete.1 (constants.%require_complete.524)]
  1136. // CHECK:STDOUT: %require_complete.2: <witness> = require_complete_type %Int [symbolic = %require_complete.2 (constants.%require_complete.ffde5f.1)]
  1137. // 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)]
  1138. // CHECK:STDOUT:
  1139. // CHECK:STDOUT: fn;
  1140. // CHECK:STDOUT: }
  1141. // CHECK:STDOUT:
  1142. // CHECK:STDOUT: fn @Range [from "lib.carbon"];
  1143. // CHECK:STDOUT:
  1144. // CHECK:STDOUT: generic fn @IntRange.as.Iterate.impl.NewCursor(imports.%Main.import_ref.f1e294.4: Core.IntLiteral) [from "lib.carbon"] {
  1145. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N.c80)]
  1146. // CHECK:STDOUT: %IntRange: type = class_type @IntRange, @IntRange(%N) [symbolic = %IntRange (constants.%IntRange.349)]
  1147. // CHECK:STDOUT: %pattern_type.1: type = pattern_type %IntRange [symbolic = %pattern_type.1 (constants.%pattern_type.dcd)]
  1148. // CHECK:STDOUT: %Int: type = class_type @Int, @Int(%N) [symbolic = %Int (constants.%Int.7ff11f.1)]
  1149. // CHECK:STDOUT: %pattern_type.2: type = pattern_type %Int [symbolic = %pattern_type.2 (constants.%pattern_type.0ede7b.1)]
  1150. // CHECK:STDOUT:
  1151. // CHECK:STDOUT: !definition:
  1152. // CHECK:STDOUT: %require_complete.1: <witness> = require_complete_type %IntRange [symbolic = %require_complete.1 (constants.%require_complete.524)]
  1153. // CHECK:STDOUT: %IntRange.elem: type = unbound_element_type %IntRange, %Int [symbolic = %IntRange.elem (constants.%IntRange.elem.ecb)]
  1154. // CHECK:STDOUT: %require_complete.2: <witness> = require_complete_type %Int [symbolic = %require_complete.2 (constants.%require_complete.ffde5f.1)]
  1155. // CHECK:STDOUT:
  1156. // CHECK:STDOUT: fn;
  1157. // CHECK:STDOUT: }
  1158. // CHECK:STDOUT:
  1159. // CHECK:STDOUT: generic fn @IntRange.as.Iterate.impl.Next(imports.%Main.import_ref.f1e294.5: Core.IntLiteral) [from "lib.carbon"] {
  1160. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N.c80)]
  1161. // CHECK:STDOUT: %IntRange: type = class_type @IntRange, @IntRange(%N) [symbolic = %IntRange (constants.%IntRange.349)]
  1162. // CHECK:STDOUT: %pattern_type.1: type = pattern_type %IntRange [symbolic = %pattern_type.1 (constants.%pattern_type.dcd)]
  1163. // CHECK:STDOUT: %Int: type = class_type @Int, @Int(%N) [symbolic = %Int (constants.%Int.7ff11f.1)]
  1164. // CHECK:STDOUT: %ptr.1: type = ptr_type %Int [symbolic = %ptr.1 (constants.%ptr.58a)]
  1165. // CHECK:STDOUT: %pattern_type.2: type = pattern_type %ptr.1 [symbolic = %pattern_type.2 (constants.%pattern_type.6d0)]
  1166. // CHECK:STDOUT: %Optional: type = class_type @Optional, @Optional(%Int) [symbolic = %Optional (constants.%Optional.e9f)]
  1167. // CHECK:STDOUT: %pattern_type.3: type = pattern_type %Optional [symbolic = %pattern_type.3 (constants.%pattern_type.fd8)]
  1168. // CHECK:STDOUT:
  1169. // CHECK:STDOUT: !definition:
  1170. // CHECK:STDOUT: %require_complete.1: <witness> = require_complete_type %Optional [symbolic = %require_complete.1 (constants.%require_complete.5a1)]
  1171. // CHECK:STDOUT: %require_complete.2: <witness> = require_complete_type %IntRange [symbolic = %require_complete.2 (constants.%require_complete.524)]
  1172. // CHECK:STDOUT: %require_complete.3: <witness> = require_complete_type %ptr.1 [symbolic = %require_complete.3 (constants.%require_complete.656)]
  1173. // CHECK:STDOUT: %require_complete.4: <witness> = require_complete_type %Int [symbolic = %require_complete.4 (constants.%require_complete.ffde5f.1)]
  1174. // CHECK:STDOUT: %pattern_type.4: type = pattern_type %Int [symbolic = %pattern_type.4 (constants.%pattern_type.0ede7b.1)]
  1175. // CHECK:STDOUT: %IntRange.elem: type = unbound_element_type %IntRange, %Int [symbolic = %IntRange.elem (constants.%IntRange.elem.ecb)]
  1176. // CHECK:STDOUT: %OrderedWith.type: type = facet_type <@OrderedWith, @OrderedWith(%Int)> [symbolic = %OrderedWith.type (constants.%OrderedWith.type.256)]
  1177. // CHECK:STDOUT: %require_complete.5: <witness> = require_complete_type %OrderedWith.type [symbolic = %require_complete.5 (constants.%require_complete.10b)]
  1178. // CHECK:STDOUT: %OrderedWith.assoc_type: type = assoc_entity_type @OrderedWith, @OrderedWith(%Int) [symbolic = %OrderedWith.assoc_type (constants.%OrderedWith.assoc_type.e53)]
  1179. // CHECK:STDOUT: %assoc0: @IntRange.as.Iterate.impl.Next.%OrderedWith.assoc_type (%OrderedWith.assoc_type.e53) = assoc_entity element0, imports.%Main.import_ref.026 [symbolic = %assoc0 (constants.%assoc0.4a4)]
  1180. // CHECK:STDOUT: %OrderedWith.impl_witness: <witness> = impl_witness imports.%OrderedWith.impl_witness_table.0e1, @Int.as.OrderedWith.impl.5b6(%N, %N) [symbolic = %OrderedWith.impl_witness (constants.%OrderedWith.impl_witness.350)]
  1181. // CHECK:STDOUT: %OrderedWith.Less.type: type = fn_type @OrderedWith.Less, @OrderedWith(%Int) [symbolic = %OrderedWith.Less.type (constants.%OrderedWith.Less.type.016)]
  1182. // CHECK:STDOUT: %OrderedWith.facet: @IntRange.as.Iterate.impl.Next.%OrderedWith.type (%OrderedWith.type.256) = facet_value %Int, (%OrderedWith.impl_witness) [symbolic = %OrderedWith.facet (constants.%OrderedWith.facet)]
  1183. // CHECK:STDOUT: %.1: type = fn_type_with_self_type %OrderedWith.Less.type, %OrderedWith.facet [symbolic = %.1 (constants.%.3bd)]
  1184. // CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.type: type = fn_type @Int.as.OrderedWith.impl.Less.1, @Int.as.OrderedWith.impl.5b6(%N, %N) [symbolic = %Int.as.OrderedWith.impl.Less.type (constants.%Int.as.OrderedWith.impl.Less.type.4f5)]
  1185. // CHECK:STDOUT: %Int.as.OrderedWith.impl.Less: @IntRange.as.Iterate.impl.Next.%Int.as.OrderedWith.impl.Less.type (%Int.as.OrderedWith.impl.Less.type.4f5) = struct_value () [symbolic = %Int.as.OrderedWith.impl.Less (constants.%Int.as.OrderedWith.impl.Less.3b5)]
  1186. // 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.5e2)]
  1187. // CHECK:STDOUT: %Inc.lookup_impl_witness: <witness> = lookup_impl_witness %Int, @Inc [symbolic = %Inc.lookup_impl_witness (constants.%Inc.lookup_impl_witness)]
  1188. // CHECK:STDOUT: %Inc.facet: %Inc.type = facet_value %Int, (%Inc.lookup_impl_witness) [symbolic = %Inc.facet (constants.%Inc.facet)]
  1189. // CHECK:STDOUT: %.2: type = fn_type_with_self_type constants.%Inc.Op.type, %Inc.facet [symbolic = %.2 (constants.%.15d)]
  1190. // CHECK:STDOUT: %impl.elem0.1: @IntRange.as.Iterate.impl.Next.%.2 (%.15d) = impl_witness_access %Inc.lookup_impl_witness, element0 [symbolic = %impl.elem0.1 (constants.%impl.elem0.181)]
  1191. // CHECK:STDOUT: %specific_impl_fn.1: <specific function> = specific_impl_function %impl.elem0.1, @Inc.Op(%Inc.facet) [symbolic = %specific_impl_fn.1 (constants.%specific_impl_fn.be7)]
  1192. // CHECK:STDOUT: %Optional.Some.type: type = fn_type @Optional.Some, @Optional(%Int) [symbolic = %Optional.Some.type (constants.%Optional.Some.type.fe1)]
  1193. // CHECK:STDOUT: %Optional.Some: @IntRange.as.Iterate.impl.Next.%Optional.Some.type (%Optional.Some.type.fe1) = struct_value () [symbolic = %Optional.Some (constants.%Optional.Some.aae)]
  1194. // CHECK:STDOUT: %Optional.Some.specific_fn: <specific function> = specific_function %Optional.Some, @Optional.Some(%Int) [symbolic = %Optional.Some.specific_fn (constants.%Optional.Some.specific_fn.b8a)]
  1195. // CHECK:STDOUT: %Destroy.lookup_impl_witness: <witness> = lookup_impl_witness %Optional, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)]
  1196. // CHECK:STDOUT: %Destroy.facet.1: %Destroy.type = facet_value %Optional, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet.1 (constants.%Destroy.facet.82c)]
  1197. // CHECK:STDOUT: %.3: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet.1 [symbolic = %.3 (constants.%.485)]
  1198. // CHECK:STDOUT: %impl.elem0.2: @IntRange.as.Iterate.impl.Next.%.3 (%.485) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.2 (constants.%impl.elem0.c7c)]
  1199. // CHECK:STDOUT: %specific_impl_fn.2: <specific function> = specific_impl_function %impl.elem0.2, @Destroy.Op(%Destroy.facet.1) [symbolic = %specific_impl_fn.2 (constants.%specific_impl_fn.ebe)]
  1200. // CHECK:STDOUT: %ptr.2: type = ptr_type %Optional [symbolic = %ptr.2 (constants.%ptr.d1d)]
  1201. // CHECK:STDOUT: %require_complete.6: <witness> = require_complete_type %ptr.2 [symbolic = %require_complete.6 (constants.%require_complete.c68)]
  1202. // CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness imports.%Destroy.impl_witness_table.14b, @Int.as.Destroy.impl(%N) [symbolic = %Destroy.impl_witness (constants.%Destroy.impl_witness.382)]
  1203. // CHECK:STDOUT: %Destroy.facet.2: %Destroy.type = facet_value %Int, (%Destroy.impl_witness) [symbolic = %Destroy.facet.2 (constants.%Destroy.facet.168)]
  1204. // CHECK:STDOUT: %.4: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet.2 [symbolic = %.4 (constants.%.a07)]
  1205. // 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)]
  1206. // 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)]
  1207. // 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)]
  1208. // CHECK:STDOUT: %Optional.None.type: type = fn_type @Optional.None, @Optional(%Int) [symbolic = %Optional.None.type (constants.%Optional.None.type.8c4)]
  1209. // CHECK:STDOUT: %Optional.None: @IntRange.as.Iterate.impl.Next.%Optional.None.type (%Optional.None.type.8c4) = struct_value () [symbolic = %Optional.None (constants.%Optional.None.7a7)]
  1210. // CHECK:STDOUT: %Optional.None.specific_fn: <specific function> = specific_function %Optional.None, @Optional.None(%Int) [symbolic = %Optional.None.specific_fn (constants.%Optional.None.specific_fn.9e7)]
  1211. // CHECK:STDOUT:
  1212. // CHECK:STDOUT: fn;
  1213. // CHECK:STDOUT: }
  1214. // CHECK:STDOUT:
  1215. // CHECK:STDOUT: generic fn @IntRange.as.Destroy.impl.Op(imports.%Main.import_ref.f1e294.7: Core.IntLiteral) [from "lib.carbon"] {
  1216. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N.c80)]
  1217. // CHECK:STDOUT: %IntRange: type = class_type @IntRange, @IntRange(%N) [symbolic = %IntRange (constants.%IntRange.349)]
  1218. // CHECK:STDOUT: %ptr: type = ptr_type %IntRange [symbolic = %ptr (constants.%ptr.710)]
  1219. // CHECK:STDOUT: %pattern_type: type = pattern_type %ptr [symbolic = %pattern_type (constants.%pattern_type.99f)]
  1220. // CHECK:STDOUT:
  1221. // CHECK:STDOUT: !definition:
  1222. // CHECK:STDOUT:
  1223. // CHECK:STDOUT: fn = "no_op";
  1224. // CHECK:STDOUT: }
  1225. // CHECK:STDOUT:
  1226. // CHECK:STDOUT: specific @IntRange(constants.%N.c80) {
  1227. // CHECK:STDOUT: %N => constants.%N.c80
  1228. // CHECK:STDOUT:
  1229. // CHECK:STDOUT: !definition:
  1230. // CHECK:STDOUT: %IntRange.Make.type => constants.%IntRange.Make.type.51f
  1231. // CHECK:STDOUT: %IntRange.Make => constants.%IntRange.Make.2ec
  1232. // CHECK:STDOUT: %Int => constants.%Int.7ff11f.1
  1233. // CHECK:STDOUT: %require_complete => constants.%require_complete.ffde5f.1
  1234. // CHECK:STDOUT: %IntRange => constants.%IntRange.349
  1235. // CHECK:STDOUT: %IntRange.elem => constants.%IntRange.elem.ecb
  1236. // CHECK:STDOUT: %struct_type.start.end => constants.%struct_type.start.end.434
  1237. // CHECK:STDOUT: %complete_type => constants.%complete_type.c76
  1238. // CHECK:STDOUT: }
  1239. // CHECK:STDOUT:
  1240. // CHECK:STDOUT: specific @IntRange.Make(constants.%N.c80) {
  1241. // CHECK:STDOUT: %N => constants.%N.c80
  1242. // CHECK:STDOUT: %Int => constants.%Int.7ff11f.1
  1243. // CHECK:STDOUT: %pattern_type.1 => constants.%pattern_type.0ede7b.1
  1244. // CHECK:STDOUT: %IntRange => constants.%IntRange.349
  1245. // CHECK:STDOUT: %pattern_type.2 => constants.%pattern_type.dcd
  1246. // CHECK:STDOUT: }
  1247. // CHECK:STDOUT:
  1248. // CHECK:STDOUT: specific @IntRange(constants.%int_32) {
  1249. // CHECK:STDOUT: %N => constants.%int_32
  1250. // CHECK:STDOUT:
  1251. // CHECK:STDOUT: !definition:
  1252. // CHECK:STDOUT: %IntRange.Make.type => constants.%IntRange.Make.type.cef
  1253. // CHECK:STDOUT: %IntRange.Make => constants.%IntRange.Make.0dc
  1254. // CHECK:STDOUT: %Int => constants.%i32
  1255. // CHECK:STDOUT: %require_complete => constants.%complete_type.f8a
  1256. // CHECK:STDOUT: %IntRange => constants.%IntRange.365
  1257. // CHECK:STDOUT: %IntRange.elem => constants.%IntRange.elem.f21
  1258. // CHECK:STDOUT: %struct_type.start.end => constants.%struct_type.start.end.0fe
  1259. // CHECK:STDOUT: %complete_type => constants.%complete_type.a43
  1260. // CHECK:STDOUT: }
  1261. // CHECK:STDOUT:
  1262. // CHECK:STDOUT: specific @IntRange.as.Iterate.impl(constants.%N.c80) {
  1263. // CHECK:STDOUT: %N => constants.%N.c80
  1264. // CHECK:STDOUT: %IntRange => constants.%IntRange.349
  1265. // CHECK:STDOUT: %Int => constants.%Int.7ff11f.1
  1266. // CHECK:STDOUT: %Iterate_where.type => constants.%Iterate_where.type.2cb
  1267. // CHECK:STDOUT: %require_complete => constants.%require_complete.6f5
  1268. // CHECK:STDOUT: %Iterate.impl_witness => constants.%Iterate.impl_witness.d2b
  1269. // CHECK:STDOUT:
  1270. // CHECK:STDOUT: !definition:
  1271. // CHECK:STDOUT: %IntRange.as.Iterate.impl.NewCursor.type => constants.%IntRange.as.Iterate.impl.NewCursor.type
  1272. // CHECK:STDOUT: %IntRange.as.Iterate.impl.NewCursor => constants.%IntRange.as.Iterate.impl.NewCursor
  1273. // CHECK:STDOUT: %IntRange.as.Iterate.impl.Next.type => constants.%IntRange.as.Iterate.impl.Next.type
  1274. // CHECK:STDOUT: %IntRange.as.Iterate.impl.Next => constants.%IntRange.as.Iterate.impl.Next
  1275. // CHECK:STDOUT: }
  1276. // CHECK:STDOUT:
  1277. // CHECK:STDOUT: specific @IntRange.as.Iterate.impl.NewCursor(constants.%N.c80) {
  1278. // CHECK:STDOUT: %N => constants.%N.c80
  1279. // CHECK:STDOUT: %IntRange => constants.%IntRange.349
  1280. // CHECK:STDOUT: %pattern_type.1 => constants.%pattern_type.dcd
  1281. // CHECK:STDOUT: %Int => constants.%Int.7ff11f.1
  1282. // CHECK:STDOUT: %pattern_type.2 => constants.%pattern_type.0ede7b.1
  1283. // CHECK:STDOUT: }
  1284. // CHECK:STDOUT:
  1285. // CHECK:STDOUT: specific @IntRange.as.Iterate.impl.Next(constants.%N.c80) {
  1286. // CHECK:STDOUT: %N => constants.%N.c80
  1287. // CHECK:STDOUT: %IntRange => constants.%IntRange.349
  1288. // CHECK:STDOUT: %pattern_type.1 => constants.%pattern_type.dcd
  1289. // CHECK:STDOUT: %Int => constants.%Int.7ff11f.1
  1290. // CHECK:STDOUT: %ptr.1 => constants.%ptr.58a
  1291. // CHECK:STDOUT: %pattern_type.2 => constants.%pattern_type.6d0
  1292. // CHECK:STDOUT: %Optional => constants.%Optional.e9f
  1293. // CHECK:STDOUT: %pattern_type.3 => constants.%pattern_type.fd8
  1294. // CHECK:STDOUT: }
  1295. // CHECK:STDOUT:
  1296. // CHECK:STDOUT: specific @IntRange.as.Destroy.impl(constants.%N.c80) {
  1297. // CHECK:STDOUT: %N => constants.%N.c80
  1298. // CHECK:STDOUT: %Destroy.impl_witness => constants.%Destroy.impl_witness.881
  1299. // CHECK:STDOUT: }
  1300. // CHECK:STDOUT:
  1301. // CHECK:STDOUT: specific @IntRange.as.Destroy.impl.Op(constants.%N.c80) {
  1302. // CHECK:STDOUT: %N => constants.%N.c80
  1303. // CHECK:STDOUT: %IntRange => constants.%IntRange.349
  1304. // CHECK:STDOUT: %ptr => constants.%ptr.710
  1305. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.99f
  1306. // CHECK:STDOUT: }
  1307. // CHECK:STDOUT:
  1308. // CHECK:STDOUT: specific @IntRange.as.Destroy.impl(constants.%int_32) {
  1309. // CHECK:STDOUT: %N => constants.%int_32
  1310. // CHECK:STDOUT: %Destroy.impl_witness => constants.%Destroy.impl_witness.bb5
  1311. // CHECK:STDOUT: }
  1312. // CHECK:STDOUT: