COMPILATION LISTING OF SEGMENT cref_sort_ Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/17/82 1630.4 mst Wed Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* * Copyright (c) 1972 by Massachusetts Institute of * 6* * Technology and Honeywell Information Systems, Inc. * 7* * * 8* *********************************************************** */ 9 10 11 cref_sort_: procedure; 12 13 /* This module performs the actual cross-referencing operation on the database 14* previously set up by cref_analyze_. It loops through 15* all the known names, seeing what each calls. Each module called has a crossref block assigned to 16* it giving the node number of the block under consideration, i.e., the calling procedure. 17* This completes the real crossreferencing procedure. A check is made after 18* each successful crossreference to make sure that the definition being referenced 19* actually existed in the segment being referenced. If not, we create an implicit definition 20* which cref_filegen_ will later mark with an asterisk. 21* If there were any include files defined by cref_analyze_, it crossrefs those too. 22* 23* Rewritten totally by C. D. Tavares, 02/03/76 */ 24 25 dcl node pointer; 26 27 dcl bucket fixed bin; 28 29 dcl cref_listman_$get_consecutive_segnames ext entry (pointer, fixed bin) returns (pointer), 30 cref_listman_$get_refs ext entry (pointer, pointer dimension (*), fixed bin), 31 cref_listman_$assign_crossref ext entry (pointer, pointer), 32 cref_listman_$get_defs ext entry (pointer, pointer dimension (*), fixed bin), 33 cref_listman_$get_implicit_defs ext entry (pointer, pointer dimension (*), fixed bin), 34 cref_listman_$create_implicit_def ext entry (pointer, pointer); 35 36 dcl cref_listman_$get_include_files ext entry (pointer, pointer dimension (*), fixed bin), 37 cref_listman_$assign_include_file_crossref ext entry (pointer, pointer); 38 39 dcl (i, j) fixed bin; 40 41 dcl (ref_array, def_array, imp_def_array) (1000) pointer, 42 (ref_array_len, def_array_len, imp_def_array_len) fixed bin; 43 44 dcl com_err_ ext entry options (variable), 45 null builtin, 46 cref_abort_ condition; 47 48 49 bucket = 0; /* start from the beginning */ 50 51 node = cref_listman_$get_consecutive_segnames (null, bucket); /* get the first good node */ 52 53 do while (node ^= null); /* until database exhausted */ 54 55 call cref_listman_$get_refs (node, ref_array, ref_array_len); /* see what it calls */ 56 if ref_array_len < 0 then goto out_of_room; /* let's hope not */ 57 58 do i = 1 to ref_array_len by 2; /* assign the actual crossrefs */ 59 60 call cref_listman_$assign_crossref (ref_array (i+1), node); 61 /* plug on "node" as a caller of entrypoint ref_array (i+1) */ 62 63 call cref_listman_$get_defs (ref_array (i), def_array, def_array_len); 64 /* get the existing defs for the called segment */ 65 if def_array_len < 0 then goto out_of_room; /* oh well */ 66 67 do j = 1 to def_array_len while (def_array (j) ^= ref_array (i+1)); 68 end; /* the one "node" called better be defined */ 69 70 if j > def_array_len then do; /* but it's not, must create an implicit def */ 71 72 call cref_listman_$get_implicit_defs (ref_array (i), imp_def_array, imp_def_array_len); 73 /* have we already created this implicit def? */ 74 if imp_def_array_len < 0 then goto out_of_room; 75 76 do j = 1 to imp_def_array_len while (imp_def_array (j) ^= ref_array (i+1)); 77 end; /* try to find it there */ 78 79 if j > imp_def_array_len then /* nope, this is a new non-existent entry */ 80 call cref_listman_$create_implicit_def (ref_array (i), ref_array (i+1)); 81 end; 82 end; 83 84 call cref_listman_$get_include_files (node, ref_array, ref_array_len); /* see if there are any include files */ 85 if ref_array_len < 0 then goto out_of_room; 86 87 do i = 1 to ref_array_len; 88 89 call cref_listman_$assign_include_file_crossref (ref_array (i), node); 90 end; 91 92 node = cref_listman_$get_consecutive_segnames (node, bucket); /* grab the next one */ 93 end; 94 95 return; 96 97 98 out_of_room: /* indigestion of the internal storage */ 99 call com_err_ (0, "cref_sort_", "Internal data area overflow."); 100 signal cref_abort_; /* let daddy know we lost */ 101 102 end cref_sort_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/17/82 1626.4 cref_sort_.pl1 >spec>on>11/17/82>cref_sort_.pl1 NAMES DECLARED IN THIS COMPILATION. IDENTIFIER OFFSET LOC STORAGE CLASS DATA TYPE ATTRIBUTES AND REFERENCES (* indicates a set context) NAMES DECLARED BY DECLARE STATEMENT. bucket 000102 automatic fixed bin(17,0) dcl 27 set ref 49* 51* 92* com_err_ 000030 constant entry external dcl 44 ref 98 cref_abort_ 013672 stack reference condition dcl 44 ref 100 cref_listman_$assign_crossref 000014 constant entry external dcl 29 ref 60 cref_listman_$assign_include_file_crossref 000026 constant entry external dcl 36 ref 89 cref_listman_$create_implicit_def 000022 constant entry external dcl 29 ref 79 cref_listman_$get_consecutive_segnames 000010 constant entry external dcl 29 ref 51 92 cref_listman_$get_defs 000016 constant entry external dcl 29 ref 63 cref_listman_$get_implicit_defs 000020 constant entry external dcl 29 ref 72 cref_listman_$get_include_files 000024 constant entry external dcl 36 ref 84 cref_listman_$get_refs 000012 constant entry external dcl 29 ref 55 def_array 004026 automatic pointer array dcl 41 set ref 63* 67 def_array_len 013667 automatic fixed bin(17,0) dcl 41 set ref 63* 65 67 70 i 000103 automatic fixed bin(17,0) dcl 39 set ref 58* 60 63 67 72 76 79 79* 87* 89* imp_def_array 007746 automatic pointer array dcl 41 set ref 72* 76 imp_def_array_len 013670 automatic fixed bin(17,0) dcl 41 set ref 72* 74 76 79 j 000104 automatic fixed bin(17,0) dcl 39 set ref 67* 67* 70 76* 76* 79 node 000100 automatic pointer dcl 25 set ref 51* 53 55* 60* 84* 89* 92* 92* null builtin function dcl 44 ref 51 51 53 ref_array 000106 automatic pointer array dcl 41 set ref 55* 60* 63* 67 72* 76 79* 79* 84* 89* ref_array_len 013666 automatic fixed bin(17,0) dcl 41 set ref 55* 56 58 84* 85 87 NAMES DECLARED BY EXPLICIT CONTEXT. cref_sort_ 000032 constant entry external dcl 11 out_of_room 000345 constant label dcl 98 ref 56 65 74 85 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 540 572 402 550 Length 750 402 32 141 136 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME cref_sort_ 6124 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME cref_sort_ 000100 node cref_sort_ 000102 bucket cref_sort_ 000103 i cref_sort_ 000104 j cref_sort_ 000106 ref_array cref_sort_ 004026 def_array cref_sort_ 007746 imp_def_array cref_sort_ 013666 ref_array_len cref_sort_ 013667 def_array_len cref_sort_ 013670 imp_def_array_len cref_sort_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return signal ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ cref_listman_$assign_crossref cref_listman_$assign_include_file_crossref cref_listman_$create_implicit_def cref_listman_$get_consecutive_segnames cref_listman_$get_defs cref_listman_$get_implicit_defs cref_listman_$get_include_files cref_listman_$get_refs NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000031 49 000037 51 000040 53 000054 55 000060 56 000101 58 000103 60 000111 63 000124 65 000146 67 000150 68 000167 70 000171 72 000174 74 000217 76 000221 77 000240 79 000242 82 000260 84 000263 85 000304 87 000306 89 000314 90 000326 92 000330 93 000343 95 000344 98 000345 100 000376 102 000401 ----------------------------------------------------------- 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