COMPILATION LISTING OF SEGMENT make_lisp_xref_ Compiled by: Multics PL/I Compiler, Release 28b, of April 11, 1983 Compiled at: Honeywell LCPD Phoenix, System M Compiled on: 06/30/83 0843.1 mst Thu Options: map single_symbol_list 1 /* ************************************************************** 2* * * 3* * Copyright, (C) Massachusetts Institute of Technology, 1973 * 4* * * 5* ************************************************************** */ 6 /* protect old protection notice */ 7 /* (c) Copyright 1973, Massachusetts Institute of Technology. 8* All rights reserved. */ 9 10 make_lisp_xref_: 11 procedure (a_table_p, stream); 12 13 declare a_table_p pointer parameter, 14 stream ptr parameter; 15 16 /* this procedure puts useful information about functions 17* defined and referenced at the end of a listing made 18* by make_lisp_listing. 19* 20* Written 1 Dec 1973 by DAM 21* Modified 18 January 1980 by J. Spencer Love for PL/1 compiler changes. 22* */ 23 24 declare tablep pointer, 25 (i, j, k, m, n) fixed bin, 26 null_name char (4) varying static init (""), 27 tp unaligned pointer, 28 defx fixed bin, 29 linkx fixed bin, 30 num_funs_def fixed bin init (0), 31 num_fns_ref fixed bin init (0); 32 33 declare 1 name_struc based aligned, 34 2 len fixed bin, 35 2 name char (0 refer (len)) unaligned; 36 37 declare 1 link_info (1000) aligned based (link_table_ptr), 38 2 address fixed bin (14) unaligned, 39 2 snap bit (1) unaligned, 40 2 constant bit (1) unaligned, 41 2 f bit (1) unaligned, 42 2 nargs bit (9) unaligned, 43 2 pad bit (9) unaligned; /* PL/I bug - can take out when EIS compiler is installed */ 44 45 declare 1 table aligned structure based (tablep), 46 2 stack_height fixed bin (17), /* add to ap offset to get 2 * temp number */ 47 2 atom_table_size fixed bin, /* size of atom_table array */ 48 2 link_table_ptr unaligned pointer, /* -> array of itp link info */ 49 2 link_table_lbound 50 fixed bin (18), /* first lp| offset of itp link */ 51 2 link_table_hbound 52 fixed bin (18), /* last lp| offset of itp link */ 53 2 array_link_table_ptr 54 unaligned pointer, /* -> array of array_link control words */ 55 2 array_link_table_lbound 56 fixed bin (18), /* first lp| offset of array link */ 57 2 array_link_table_hbound 58 fixed bin (18), /* last lp| offset of array link */ 59 2 definition_table_size 60 fixed bin, /* size of definition_table array */ 61 2 constant_table_size 62 fixed bin, /* size of constant_table array */ 63 2 constant_table_lbound 64 fixed bin (18), /* first lp| offset of constant */ 65 2 constant_table_hbound 66 fixed bin (18), /* last lp| offset of constant */ 67 2 bind_stack_ptr fixed bin, /* index of first unused entry in bind_stack */ 68 2 arg_twiddle fixed bin (18), /* eax5 hacker */ 69 2 seg_ptr unaligned pointer, /* -> text section */ 70 2 bind_stack (100) fixed bin, /* table of sizes of nested binding blocks */ 71 2 atom_table (0 refer (atom_table_size)), /* pointers to atomic symbols */ 72 3 ptr_to_name unaligned pointer, /* -> varying string */ 73 2 definition_table 74 (0 refer (definition_table_size)), 75 /* entries defined... */ 76 3 arg_pdl bit (18) unaligned, /* number of pdl cells occupied by args */ 77 3 entrypoint bit (18) unaligned, /* location of entry */ 78 3 ptr_to_name unaligned pointer, /* -> varying string */ 79 2 constant_table (0 refer (constant_table_size)), 80 3 atom_table_index 81 fixed bin; /* 0 if this constant not an atom */ 82 83 declare (divide, mod, addr, lbound, hbound) 84 builtin; 85 86 declare ioa_$ioa_switch entry options (variable); 87 88 89 /* BEGIN */ 90 91 tablep = a_table_p; 92 call list_defined_functions (); 93 call list_referenced_functions (); 94 return; 95 96 list_defined_functions: 97 procedure (); 98 99 declare (def_sn, def_sv) fixed bin dimension (definition_table_size); 100 /* definitions sorted by (name, value) */ 101 102 call ioa_$ioa_switch (stream, "^3-Functions Defined^2/Name^3-Offset^2-Offset^2-Name^2/"); 103 104 /* sort the definitions by name and by value. */ 105 106 do defx = 1 to hbound (def_sn, 1); 107 def_sn (defx) = defx; 108 def_sv (defx) = defx; 109 end; 110 111 /* simultaneous shell sort by name (def_sn) and by entry address (def_sv) */ 112 113 do m = divide (hbound (def_sn, 1), 2, 17, 0) repeat m - 1 while (m > 0); 114 n = hbound (def_sn, 1) - m; 115 do i = lbound (def_sn, 1) by 1 while (i <= n); 116 if definition_table (def_sn (i)).ptr_to_name -> name 117 > definition_table (def_sn (i + m)).ptr_to_name -> name then do; 118 k = def_sn (i); 119 def_sn (i) = def_sn (i + m); 120 def_sn (i + m) = k; 121 end; 122 123 if definition_table (def_sv (i)).entrypoint > definition_table (def_sv (i + m)).entrypoint then do; 124 k = def_sv (i); 125 def_sv (i) = def_sv (i + m); 126 def_sv (i + m) = k; 127 end; 128 end; 129 end; 130 131 /* now print it out */ 132 133 do defx = lbound (def_sn, 1) to hbound (def_sn, 1); 134 call ioa_$ioa_switch (stream, "^29a^4x^o^2-^3x^o^2-^a", definition_table (def_sn (defx)).ptr_to_name -> name, 135 fixed (definition_table (def_sn (defx)).entrypoint, 18), 136 fixed (definition_table (def_sv (defx)).entrypoint, 18), 137 definition_table (def_sv (defx)).ptr_to_name -> name); 138 end; 139 end list_defined_functions; 140 141 list_referenced_functions: 142 procedure (); /* now we generate a list of all the functions referenced */ 143 144 declare fn_ref unaligned pointer dimension (3 + divide (link_table_hbound - link_table_lbound + 2, 2, 17, 0)); 145 /* -> names of referenced functions */ 146 call ioa_$ioa_switch (stream, "^5/^3-Functions Referenced^/"); 147 148 do linkx = lbound (fn_ref, 1) to hbound (fn_ref, 1) - 3; 149 if link_info (linkx).constant 150 then if link_info (linkx).snap 151 then if link_info (linkx).address >= constant_table_lbound 152 then if link_info (linkx).address <= constant_table_hbound 153 then if constant_table (1 154 + divide (link_info (linkx).address - constant_table_lbound, 2, 17, 0)) 155 .atom_table_index ^= 0 then do; 156 /* if it meets all these conditions, it's OK to list */ 157 num_fns_ref = num_fns_ref + 1; 158 fn_ref (num_fns_ref) = 159 atom_table ( 160 constant_table (1 161 + divide (link_info (linkx).address - constant_table_lbound, 2, 17, 0)) 162 .atom_table_index).ptr_to_name; 163 end; 164 end; 165 166 /* we have found the referenced functions. Next step is to sort this list */ 167 168 do m = divide (num_fns_ref, 2, 17, 0) by -1 while (m > 0); 169 n = num_fns_ref - m; 170 do i = 1 by 1 while (i <= n); 171 if fn_ref (i) -> name > fn_ref (i + m) -> name then do; 172 tp = fn_ref (i); 173 fn_ref (i) = fn_ref (i + m); 174 fn_ref (i + m) = tp; 175 end; 176 end; 177 end; 178 179 /* now print it out, in three columns */ 180 181 n = divide (num_fns_ref, 3, 17, 0); 182 go to case (num_fns_ref - 3 * n); 183 184 case (2): 185 fn_ref (num_fns_ref + 1) = addr (null_name); 186 n = n + 1; 187 go to case_x; 188 189 case (1): /* need two gaps in table. have to open one up */ 190 n = n + 1; 191 fn_ref (num_fns_ref + 2) = addr (null_name); 192 do i = num_fns_ref + 1 by -1 to 2 * n + 1; 193 fn_ref (i) = fn_ref (i - 1); 194 end; 195 fn_ref (2 * n) = addr (null_name); 196 go to case_x; 197 198 case (0): 199 case_x: 200 do i = 1 by 1 while (i <= n); 201 call ioa_$ioa_switch (stream, "^38a^2x^38a^2x^a", fn_ref (i) -> name, fn_ref (i + n) -> name, 202 fn_ref ((i + n) + n) -> name); 203 end; 204 end list_referenced_functions; 205 end; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 06/29/83 1542.1 make_lisp_xref_.pl1 >special_ldd>on>06/27/83>make_lisp_xref_.pl1 NAMES DECLARED IN THIS COMPILATION. IDENTIFIER OFFSET LOC STORAGE CLASS DATA TYPE ATTRIBUTES AND REFERENCES (* indicates a set context) a_table_p parameter pointer dcl 13 ref 10 91 addr builtin function dcl 83 ref 184 191 195 address based fixed bin(14,0) array level 2 packed unaligned dcl 37 ref 149 149 149 158 atom_table 163 based structure array level 2 dcl 45 atom_table_index based fixed bin(17,0) array level 3 dcl 45 ref 149 158 atom_table_size 1 based fixed bin(17,0) level 2 dcl 45 ref 116 116 123 123 134 134 134 134 134 134 149 158 case 000000 constant label array(0:2) dcl 184 ref 182 case_x 001002 constant label dcl 198 ref 187 196 constant 0(16) based bit(1) array level 2 packed unaligned dcl 37 ref 149 constant_table based structure array level 2 dcl 45 constant_table_hbound 13 based fixed bin(18,0) level 2 dcl 45 ref 149 constant_table_lbound 12 based fixed bin(18,0) level 2 dcl 45 ref 149 149 158 def_sn 000100 automatic fixed bin(17,0) array dcl 99 set ref 106 107* 113 114 115 116 116 118 119* 119 120* 133 133 134 134 134 def_sv 000100 automatic fixed bin(17,0) array dcl 99 set ref 108* 123 123 124 125* 125 126* 134 134 134 definition_table based structure array level 2 dcl 45 definition_table_size 10 based fixed bin(17,0) level 2 dcl 45 ref 99 99 149 158 defx 000107 automatic fixed bin(17,0) dcl 24 set ref 106* 107 107 108 108* 133* 134 134 134 134 134 134* divide builtin function dcl 83 ref 113 144 149 158 168 181 entrypoint based bit(18) array level 3 packed unaligned dcl 45 ref 123 123 134 134 134 134 fixed builtin function ref 134 134 134 134 fn_ref 000100 automatic pointer array unaligned dcl 144 set ref 148 148 158* 171 171 172 173* 173 174* 184* 191* 193* 193 195* 201 201 201 hbound builtin function dcl 83 ref 106 113 114 133 148 i 000102 automatic fixed bin(17,0) dcl 24 set ref 115* 115* 116 116 118 119 119 120 123 123 124 125 125 126* 170* 170* 171 171 172 173 173 174* 192* 193 193* 198* 198* 201 201 201* ioa_$ioa_switch 000012 constant entry external dcl 86 ref 102 134 146 201 j automatic fixed bin(17,0) dcl 24 k 000103 automatic fixed bin(17,0) dcl 24 set ref 118* 120 124* 126 lbound builtin function dcl 83 ref 115 133 148 len based fixed bin(17,0) level 2 dcl 33 ref 116 116 134 134 134 134 171 171 201 201 201 201 201 201 link_info based structure array level 1 dcl 37 link_table_hbound 4 based fixed bin(18,0) level 2 dcl 45 ref 144 link_table_lbound 3 based fixed bin(18,0) level 2 dcl 45 ref 144 link_table_ptr 2 based pointer level 2 packed unaligned dcl 45 ref 149 149 149 149 149 158 linkx 000110 automatic fixed bin(17,0) dcl 24 set ref 148* 149 149 149 149 149 158* list_defined_functions 000102 constant entry internal dcl 96 ref 92 list_referenced_functions 000500 constant entry internal dcl 141 ref 93 m 000104 automatic fixed bin(17,0) dcl 24 set ref 113* 113* 114 116 119 120 123 125 126* 129 168* 168* 169 171 173 174* make_lisp_xref_ 000055 constant entry external dcl 10 mod builtin function dcl 83 n 000105 automatic fixed bin(17,0) dcl 24 set ref 114* 115 169* 170 181* 182 186* 186 189* 189 192 195 198 201 201 201 name 1 based char level 2 packed unaligned dcl 33 set ref 116 116 134* 134* 171 171 201* 201* 201* name_struc based structure level 1 dcl 33 null_name 000010 internal static varying char(4) initial dcl 24 set ref 184 191 195 num_fns_ref 000112 automatic fixed bin(17,0) initial dcl 24 set ref 24* 157* 157 158 168 169 181 182 184 191 192 num_funs_def 000111 automatic fixed bin(17,0) initial dcl 24 set ref 24* ptr_to_name 163 based pointer array level 3 in structure "table" packed unaligned dcl 45 in procedure "make_lisp_xref_" ref 158 ptr_to_name based pointer array level 3 in structure "table" packed unaligned dcl 45 in procedure "make_lisp_xref_" ref 116 116 134 134 snap 0(15) based bit(1) array level 2 packed unaligned dcl 37 ref 149 stream parameter pointer dcl 13 set ref 10 102* 134* 146* 201* table based structure level 1 dcl 45 tablep 000100 automatic pointer dcl 24 set ref 91* 99 99 116 116 123 123 134 134 134 134 134 134 144 144 149 149 149 149 149 149 149 149 149 158 158 158 158 tp 000106 automatic pointer unaligned dcl 24 set ref 172* 174 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1156 1172 1076 1166 Length 1350 1076 14 142 60 2 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME make_lisp_xref_ 75 external procedure is an external procedure. list_defined_functions 128 internal procedure uses auto adjustable storage. list_referenced_functions 112 internal procedure uses auto adjustable storage. STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 null_name make_lisp_xref_ STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME list_defined_functions 000100 def_sn list_defined_functions 000100 def_sv list_defined_functions list_referenced_functions 000100 fn_ref list_referenced_functions make_lisp_xref_ 000100 tablep make_lisp_xref_ 000102 i make_lisp_xref_ 000103 k make_lisp_xref_ 000104 m make_lisp_xref_ 000105 n make_lisp_xref_ 000106 tp make_lisp_xref_ 000107 defx make_lisp_xref_ 000110 linkx make_lisp_xref_ 000111 num_funs_def make_lisp_xref_ 000112 num_fns_ref make_lisp_xref_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_int_this return alloc_auto_adj ext_entry int_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. ioa_$ioa_switch NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 10 000051 24 000062 91 000064 92 000070 93 000074 94 000100 96 000101 99 000107 102 000123 106 000143 107 000154 108 000156 109 000160 113 000162 114 000171 115 000174 116 000202 118 000233 119 000237 120 000243 123 000250 124 000305 125 000307 126 000313 128 000320 129 000322 133 000325 134 000336 138 000473 139 000476 141 000477 144 000505 146 000520 148 000540 149 000552 157 000621 158 000622 164 000645 168 000647 169 000655 170 000660 171 000666 172 000702 173 000706 174 000712 176 000717 177 000721 181 000724 182 000727 184 000734 186 000740 187 000741 189 000742 191 000743 192 000750 193 000764 194 000770 195 000773 196 001001 198 001002 201 001010 203 001072 204 001075 ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved