816816struct X
817817 x
818818 f () = new (1 )
819- # X() = f() # FIXME : this X() captures `f` (in flisp, as a Box :-/ )
819+ X () = f () # this X() captures `f` (in flisp, as a Box :-/ )
820820 X (x) = new (x)
821821 X (y,z):: ReallyXIPromise = new (y+ z)
822822 """
@@ -825,7 +825,7 @@ struct X
825825 X (a,b,c) = new (a)
826826end
827827# ---------------------
828- 1 (newvar slot₂/ f)
828+ 1 (= slot₂/ f (call core . Box) )
8298292 (global TestMod. X)
8308303 (const TestMod. X)
8318314 (call core. svec)
@@ -855,35 +855,57 @@ end
85585528 (call JuliaLowering. eval_closure_type TestMod :# f##0 %₂₆ %₂₇)
85685629 TestMod.# f##0
85785730 (new % ₂₉)
858- 31 (= slot₂/ f % ₃₀)
859- 32 TestMod.# f##0
860- 33 (call core. svec % ₃₂)
861- 34 (call core. svec)
862- 35 SourceLocation: :3 : 5
863- 36 (call core. svec % ₃₃ % ₃₄ % ₃₅)
864- 37 --- method core. nothing % ₃₆
858+ 31 slot₂/ f
859+ 32 (call core. setfield! % ₃₁ :contents % ₃₀)
860+ 33 TestMod.# f##0
861+ 34 (call core. svec % ₃₃)
862+ 35 (call core. svec)
863+ 36 SourceLocation: :3 : 5
864+ 37 (call core. svec % ₃₄ % ₃₅ % ₃₆)
865+ 38 --- method core. nothing % ₃₇
865866 slots: [slot₁/ # self#(!read)]
866867 1 TestMod. X
867868 2 (new % ₁ 1 )
868869 3 (return % ₂)
869- 38 TestMod. X
870- 39 (call core. apply_type core. Type % ₃₈)
871- 40 (call core. svec % ₃₉ core. Any)
872- 41 (call core. svec)
873- 42 SourceLocation: :5 : 5
874- 43 (call core. svec % ₄₀ % ₄₁ % ₄₂)
875- 44 --- method core. nothing % ₄₃
870+ 39 TestMod. X
871+ 40 (call core. apply_type core. Type % ₃₉)
872+ 41 (call core. svec % ₄₀)
873+ 42 (call core. svec)
874+ 43 SourceLocation: :4 : 5
875+ 44 (call core. svec % ₄₁ % ₄₂ % ₄₃)
876+ 45 --- code_info
877+ slots: [slot₁/ # ctor-self#(!read) slot₂/f(!read)]
878+ 1 (captured_local 1 )
879+ 2 (call core. isdefined % ₁ :contents )
880+ 3 (gotoifnot % ₂ label₅)
881+ 4 (goto label₇)
882+ 5 (newvar slot₂/ f)
883+ 6 slot₂/ f
884+ 7 (call core. getfield % ₁ :contents )
885+ 8 (call % ₇)
886+ 9 (return % ₈)
887+ 46 slot₂/ f
888+ 47 (call core. svec % ₄₆)
889+ 48 (call JuliaLowering. replace_captured_locals! % ₄₅ % ₄₇)
890+ 49 --- method core. nothing % ₄₄ % ₄₈
891+ 50 TestMod. X
892+ 51 (call core. apply_type core. Type % ₅₀)
893+ 52 (call core. svec % ₅₁ core. Any)
894+ 53 (call core. svec)
895+ 54 SourceLocation: :5 : 5
896+ 55 (call core. svec % ₅₂ % ₅₃ % ₅₄)
897+ 56 --- method core. nothing % ₅₅
876898 slots: [slot₁/ # ctor-self# slot₂/x]
877899 1 slot₁/ # ctor-self#
878900 2 (new % ₁ slot₂/ x)
879901 3 (return % ₂)
880- 45 TestMod. X
881- 46 (call core. apply_type core. Type % ₄₅ )
882- 47 (call core. svec % ₄₆ core. Any core. Any)
883- 48 (call core. svec)
884- 49 SourceLocation: :6 : 5
885- 50 (call core. svec % ₄₇ % ₄₈ % ₄₉ )
886- 51 --- method core. nothing % ₅₀
902+ 57 TestMod. X
903+ 58 (call core. apply_type core. Type % ₅₇ )
904+ 59 (call core. svec % ₅₈ core. Any core. Any)
905+ 60 (call core. svec)
906+ 61 SourceLocation: :6 : 5
907+ 62 (call core. svec % ₅₉ % ₆₀ % ₆₁ )
908+ 63 --- method core. nothing % ₆₂
887909 slots: [slot₁/ # ctor-self# slot₂/y slot₃/z slot₄/tmp(!read)]
888910 1 TestMod. ReallyXIPromise
889911 2 slot₁/ # ctor-self#
@@ -899,21 +921,21 @@ end
899921 12 (= slot₄/ tmp (call core. typeassert % ₁₁ % ₁))
900922 13 slot₄/ tmp
901923 14 (return % ₁₃)
902- 52 TestMod. X
903- 53 (call core. apply_type core. Type % ₅₂ )
904- 54 (call core. svec % ₅₃ core. Any core. Any core. Any)
905- 55 (call core. svec)
906- 56 SourceLocation: :10 : 5
907- 57 (call core. svec % ₅₄ % ₅₅ % ₅₆ )
908- 58 --- method core. nothing % ₅₇
924+ 64 TestMod. X
925+ 65 (call core. apply_type core. Type % ₆₄ )
926+ 66 (call core. svec % ₆₅ core. Any core. Any core. Any)
927+ 67 (call core. svec)
928+ 68 SourceLocation: :10 : 5
929+ 69 (call core. svec % ₆₆ % ₆₇ % ₆₈ )
930+ 70 --- method core. nothing % ₆₉
909931 slots: [slot₁/ # ctor-self# slot₂/a slot₃/b(!read) slot₄/c(!read)]
910932 1 slot₁/ # ctor-self#
911933 2 (new % ₁ slot₂/ a)
912934 3 (return % ₂)
913- 59 TestMod. X
914- 60 (call core. apply_type core. Type % ₅₉ )
915- 61 (call JuliaLowering. bind_docs! % ₆₀ " Docs for X constructor\n " % ₅₇ )
916- 62 (return core. nothing )
935+ 71 TestMod. X
936+ 72 (call core. apply_type core. Type % ₇₁ )
937+ 73 (call JuliaLowering. bind_docs! % ₇₂ " Docs for X constructor\n " % ₆₉ )
938+ 74 (return core. nothing )
917939
918940# #######################################
919941# User defined inner constructors and helper functions for structs with type params
0 commit comments