.namespace [] .sub "anon" :subid("post23") .end .HLL "close" .namespace [] .sub "_init_namespace_close" :anon :init :load :subid("10_1244223846") .annotate "line", 4 get_hll_global $P12, "_Crt_started" unless_null $P12, vivify_24 new $P12, "Integer" assign $P12, 0 set_hll_global "_Crt_started", $P12 vivify_24: .annotate "line", 0 .return ($P12) .end .HLL "close" .namespace [] .sub "_crt_start" :subid("11_1244223846") .annotate "line", 10 get_hll_global $P16, "_Crt_started" unless $P16, unless_15 set $P14, $P16 goto unless_15_end unless_15: .annotate "line", 11 new $P17, "Integer" assign $P17, 1 set_hll_global "_Crt_started", $P17 .annotate "line", 13 $P18 = "crt_init"() .annotate "line", 10 set $P14, $P18 unless_15_end: .annotate "line", 8 .return ($P14) .end .HLL "close" .namespace [] .sub "_crt_start_init" :init :subid("12_1244223846") .annotate "line", 17 $P20 = "_crt_start"() .return ($P20) .end .HLL "close" .namespace [] .sub "_crt_start_load" :load :subid("13_1244223846") .annotate "line", 18 $P22 = "_crt_start"() .return ($P22) .end .HLL "close" .namespace [] .sub "load" :subid("14_1244223846") .param pmc param_24 .annotate "line", 20 .lex "filename", param_24 .annotate "line", 22 .local pmc fname find_lex $P25, "filename" set fname, $P25 .annotate "line", 23 push_eh failed $S0 = fname load_bytecode $S0 pop_eh .return() failed: pop_eh die "image not found" .annotate "line", 20 .return () .end .HLL "close" .namespace [] .sub "crt_init" :subid("15_1244223846") .annotate "line", 39 print "Loading close library\n" .annotate "line", 40 $P27 = "load"("close_lib.pir") .annotate "line", 37 .return ($P27) .end .HLL "close" .namespace ["close";"TypeInfo"] .sub "_init_namespace_TypeInfo" :anon :init :load :subid("16_1244223846") .annotate "line", 55 get_hll_global $P30, ["close";"TypeInfo"], "type_info" unless_null $P30, vivify_25 new $P29, "String" assign $P29, "Hash" $P30 = new $P29 set_hll_global ["close";"TypeInfo"], "type_info", $P30 vivify_25: .annotate "line", 56 get_hll_global $P31, ["close"], "TypeInfo" .annotate "line", 37 .return ($P31) .end .HLL "close" .namespace ["close";"TypeInfo"] .sub "_init_class_TypeInfo" :init :load :anon :subid("17_1244223846") .annotate "line", 66 .local pmc clas $P33 = newclass [ 'close' ; 'TypeInfo' ] set clas, $P33 .annotate "line", 70 set_hll_global ["close"], "TypeInfo", clas .annotate "line", 72 .local pmc is_class new $P34, "Integer" assign $P34, 0 set is_class, $P34 .annotate "line", 74 $I0 = isa clas, 'Class' $P35 = box $I0 set is_class, $P35 .annotate "line", 79 clas."add_attribute"("name") .annotate "line", 80 clas."add_attribute"("rtype") .annotate "line", 81 get_hll_global $P36, ["close";"TypeInfo"], "new" $P37 = clas."add_method"("new", $P36) .annotate "line", 60 .return ($P37) .end .HLL "close" .namespace ["close";"TypeInfo"] .sub "new" :method :subid("18_1244223846") .param pmc param_39 .annotate "line", 84 .lex "self", self .annotate "line", 85 .lex "name", param_39 .annotate "line", 88 .local pmc it get_hll_global $P40, ["close"], "TypeInfo" $P41 = new $P40 set it, $P41 .annotate "line", 89 find_lex $P42, "name" setattribute it, "name", $P42 .annotate "line", 91 .return (it) .annotate "line", 84 .return () .end .HLL "close" .namespace ["close";"TypeInfo"] .sub "get_array_composite" :method :subid("19_1244223846") .param pmc param_44 .annotate "line", 94 .lex "self", self .annotate "line", 95 .lex "dimension", param_44 .annotate "line", 98 .local pmc key new $P45, "String" assign $P45, "array[" set key, $P45 .annotate "line", 100 find_lex $P47, "dimension" unless $P47, if_46_end .annotate "line", 101 find_lex $P48, "dimension" $P49 = concat key, $P48 set key, $P49 if_46_end: .annotate "line", 104 new $P50, "String" assign $P50, "]" $P51 = concat key, $P50 .return ($P51) .annotate "line", 94 .return () .end .HLL "close" .namespace ["close";"TypeInfo"] .sub "get_function_composite" :method :subid("20_1244223846") .param pmc param_53 :slurpy .annotate "line", 108 .lex "self", self .annotate "line", 109 .lex "params", param_53 .annotate "line", 112 .local pmc key new $P54, "String" assign $P54, "func(" set key, $P54 .annotate "line", 114 .local pmc comma new $P55, "String" assign $P55, "" set comma, $P55 .annotate "line", 116 .local pmc param .annotate "line", 117 .local pmc iter new $P56, "String" assign $P56, "Iterator" find_lex $P57, "params" $P58 = new $P56, $P57 set iter, $P58 .annotate "line", 118 new $P64, 'ExceptionHandler' set_addr $P64, loop63_handler $P64."handle_types"(65, 67, 66) push_eh $P64 loop63_test: unless iter, loop63_done loop63_redo: .annotate "line", 119 $P59 = shift iter set param, $P59 .annotate "line", 120 getattribute $P60, $P60, "name" $P61 = concat key, comma set key, $P61 .annotate "line", 121 new $P62, "String" assign $P62, ", " set comma, $P62 loop63_next: .annotate "line", 118 goto loop63_test loop63_handler: .local pmc exception .get_results (exception) getattribute $P65, exception, 'type' eq $P65, 65, loop63_next eq $P65, 67, loop63_redo loop63_done: pop_eh .annotate "line", 124 new $P66, "String" assign $P66, ")" $P67 = concat key, $P66 .return ($P67) .annotate "line", 108 .return () .end .HLL "close" .namespace ["close";"TypeInfo"] .sub "main" :main :subid("21_1244223846") .annotate "line", 130 "say"("*** MAIN ***") .annotate "line", 131 .local pmc clas get_hll_global $P69, ["close"], "TypeInfo" set clas, $P69 .annotate "line", 133 "say"("Class name: ", clas) .annotate "line", 135 .local pmc is_class $I0 = isa clas, 'Class' $P70 = box $I0 set is_class, $P70 .annotate "line", 140 "say"("Is a class?: ", is_class) .annotate "line", 142 .local pmc type $P71 = typeof clas set type, $P71 .annotate "line", 143 "say"("Type name: ", type) .annotate "line", 145 .local pmc meth $P72 = clas."find_method"("new") set meth, $P72 .annotate "line", 147 "say"("New method is: ", meth) .annotate "line", 149 .local pmc is_same get_hll_global $P73, ["close";"TypeInfo"], "new" $I0 = issame meth, $P73 $P74 = box $I0 set is_same, $P74 .annotate "line", 153 "say"("New method is what I want?: ", is_same) .annotate "line", 155 "say"("Calling ctor") .annotate "line", 156 .local pmc x1 $P75 = meth('object ref', 'first object') set x1, $P75 .annotate "line", 160 .local pmc x get_hll_global $P76, ["close"], "TypeInfo" $P77 = $P76."new"("name-x") set x, $P77 .annotate "line", 161 "say"("Back from ctor") .annotate "line", 163 $P78 = "print"(x) .annotate "line", 127 .return ($P78) .end .HLL "close" .namespace ["close";"TypeInfo"] .sub "init" :init :load :subid("22_1244223846") .annotate "line", 168 $P80 = "main"() .annotate "line", 166 .return ($P80) .end