COMPILATION LISTING OF SEGMENT adjust_ref_count Compiled by: Multics PL/I Compiler, Release 28d, of September 14, 1983 Compiled at: Honeywell LCPD Phoenix, System M Compiled on: 10/03/83 1621.1 mst Mon 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 /* This procedure is called to adjust the reference count of a node up or down. 12* It also adjusts the reference counts of any length, qualifier, or offset expressions. 13* 14* Initial Version: 29 January 1972 by BLW 15* Modified: 12 February 1973 by RAB to conform to reference_count design 16* Modified: 9 March 1977 by RAB to change mod_word handling 17* Modified: 9 April 1977 by RAB to remove mod_word operator */ 18 19 adjust_ref_count: proc(pt,delta); 20 21 dcl pt ptr, /* points at a reference node */ 22 delta fixed bin; /* amount of change */ 23 24 dcl (p,q) ptr, 25 n fixed bin, 26 stack_temp$free_temp entry(ptr), 27 (null,substr) builtin; 28 29 dcl cg_stat$cur_statement ptr ext; 30 dcl error entry(fixed bin,ptr,ptr); 31 1 1 /* BEGIN INCLUDE FILE ... reference.incl.pl1 */ 1 2 1 3 dcl 1 reference based aligned, 1 4 2 node_type bit(9) unaligned, 1 5 2 array_ref bit(1) unaligned, 1 6 2 varying_ref bit(1) unaligned, 1 7 2 shared bit(1) unaligned, 1 8 2 put_data_sw bit(1) unaligned, 1 9 2 processed bit(1) unaligned, 1 10 2 units fixed(3) unaligned, 1 11 2 ref_count fixed(17) unaligned, 1 12 2 c_offset fixed(24), 1 13 2 c_length fixed(24), 1 14 2 symbol ptr unaligned, 1 15 2 qualifier ptr unaligned, 1 16 2 offset ptr unaligned, 1 17 2 length ptr unaligned, 1 18 2 subscript_list ptr unaligned, 1 19 /* these fields are used by the 645 code generator */ 1 20 2 address structure unaligned, 1 21 3 base bit(3), 1 22 3 offset bit(15), 1 23 3 op bit(9), 1 24 3 no_address bit(1), 1 25 3 inhibit bit(1), 1 26 3 ext_base bit(1), 1 27 3 tag bit(6), 1 28 2 info structure unaligned, 1 29 3 address_in structure, 1 30 4 b dimension(0:7) bit(1), 1 31 4 storage bit(1), 1 32 3 value_in structure, 1 33 4 a bit(1), 1 34 4 q bit(1), 1 35 4 aq bit(1), 1 36 4 string_aq bit(1), 1 37 4 complex_aq bit(1), 1 38 4 decimal_aq bit(1), 1 39 4 b dimension(0:7) bit(1), 1 40 4 storage bit(1), 1 41 4 indicators bit(1), 1 42 4 x dimension(0:7) bit(1), 1 43 3 other structure, 1 44 4 big_offset bit(1), 1 45 4 big_length bit(1), 1 46 4 modword_in_offset bit(1), 1 47 2 data_type fixed(5) unaligned, 1 48 2 bits structure unaligned, 1 49 3 padded_ref bit(1), 1 50 3 aligned_ref bit(1), 1 51 3 long_ref bit(1), 1 52 3 forward_ref bit(1), 1 53 3 ic_ref bit(1), 1 54 3 temp_ref bit(1), 1 55 3 defined_ref bit(1), 1 56 3 evaluated bit(1), 1 57 3 allocate bit(1), 1 58 3 allocated bit(1), 1 59 3 aliasable bit(1), 1 60 3 even bit(1), 1 61 3 perm_address bit(1), 1 62 3 aggregate bit(1), 1 63 3 hit_zero bit(1), 1 64 3 dont_save bit(1), 1 65 3 fo_in_qual bit(1), 1 66 3 hard_to_load bit(1), 1 67 2 relocation bit(12) unaligned, 1 68 2 more_bits structure unaligned, 1 69 3 substr bit(1), 1 70 3 padded_for_store_ref bit(1), 1 71 3 aligned_for_store_ref bit(1), 1 72 3 mbz bit(15), 1 73 2 store_ins bit(18) unaligned; 1 74 1 75 /* END INCLUDE FILE ... reference.incl.pl1 */ 32 2 1 /* BEGIN INCLUDE FILE ... operator.incl.pl1 */ 2 2 2 3 /* Modified: 2 Apr 1980 by PCK to add max_number_of_operands */ 2 4 2 5 /* format: style3 */ 2 6 dcl 1 operator based aligned, 2 7 2 node_type bit (9) unaligned, 2 8 2 op_code bit (9) unaligned, 2 9 2 shared bit (1) unaligned, 2 10 2 processed bit (1) unaligned, 2 11 2 optimized bit (1) unaligned, 2 12 2 number fixed (14) unaligned, 2 13 2 operand dimension (n refer (operator.number)) ptr unaligned; 2 14 2 15 dcl max_number_of_operands 2 16 fixed bin (15) int static options (constant) initial (32767); 2 17 2 18 /* END INCLUDE FILE ... operator.incl.pl1 */ 33 3 1 /* BEGIN INCLUDE FILE ... nodes.incl.pl1 */ 3 2 3 3 /* Modified: 26 Dec 1979 by PCK to implement by name assignment */ 3 4 3 5 dcl ( block_node initial("000000001"b), 3 6 statement_node initial("000000010"b), 3 7 operator_node initial("000000011"b), 3 8 reference_node initial("000000100"b), 3 9 token_node initial("000000101"b), 3 10 symbol_node initial("000000110"b), 3 11 context_node initial("000000111"b), 3 12 array_node initial("000001000"b), 3 13 bound_node initial("000001001"b), 3 14 format_value_node initial("000001010"b), 3 15 list_node initial("000001011"b), 3 16 default_node initial("000001100"b), 3 17 machine_state_node initial("000001101"b), 3 18 source_node initial("000001110"b), 3 19 label_node initial("000001111"b), 3 20 cross_reference_node initial("000010000"b), 3 21 sf_par_node initial("000010001"b), 3 22 temporary_node initial("000010010"b), 3 23 label_array_element_node initial("000010011"b), 3 24 by_name_agg_node initial("000010100"b)) 3 25 bit(9) internal static aligned options(constant); 3 26 3 27 dcl 1 node based aligned, 3 28 2 type unal bit(9), 3 29 2 source_id unal structure, 3 30 3 file_number bit(8), 3 31 3 line_number bit(14), 3 32 3 statement_number bit(5); 3 33 3 34 /* END INCLUDE FILE ... nodes.incl.pl1 */ 34 4 1 /* BEGIN INCLUDE FILE ... temporary.incl.pl1 */ 4 2 4 3 dcl 1 temporary based, 4 4 2 node_type bit(9), /* type is "000001010"b */ 4 5 2 size fixed bin(18), 4 6 2 next ptr, 4 7 2 location fixed bin(18), 4 8 2 ref_count fixed bin, 4 9 2 symbol ptr unal, 4 10 2 last_freed fixed bin(18); 4 11 4 12 /* END INCLUDE FILE ... temporary.incl.pl1 */ 35 36 37 p = pt; 38 n = delta; 39 40 if p -> node.type = operator_node then p = p -> operand(1); 41 42 if ^ p -> reference.shared 43 then do; 44 p -> reference.ref_count = p -> reference.ref_count + n; 45 46 if p -> reference.hit_zero 47 then do; 48 call error(313,cg_stat$cur_statement,p); 49 return; 50 end; 51 52 if p -> reference.ref_count = 0 53 then do; 54 if p -> reference.symbol ^= null 55 then p -> reference.hit_zero = "1"b; 56 end; 57 else if p -> reference.ref_count < 0 58 then if p -> reference.symbol ^= null 59 then do; 60 call error(316,cg_stat$cur_statement,p); 61 return; 62 end; 63 else; 64 else return; 65 end; 66 else return; 67 68 q = p -> reference.length; 69 if q ^= null 70 then do; 71 if q -> node.type = operator_node then q = q -> operand(1); 72 73 if ^ q -> reference.shared then call adjust_ref_count(q,-1); 74 end; 75 76 q = p -> reference.qualifier; 77 if q ^= null 78 then do; 79 if q -> node.type = temporary_node 80 then call check_temp; 81 else do; 82 if q -> node.type = operator_node 83 then q = q -> operand(1); 84 if ^q -> reference.shared 85 then call adjust_ref_count(q,-1); 86 end; 87 end; 88 89 q = p -> reference.offset; 90 if q = null then return; 91 92 if q -> node.type = operator_node 93 then q = q -> operand(1); 94 95 if ^ q -> reference.shared then call adjust_ref_count(q,-1); 96 return; 97 98 99 check_temp: proc; 100 101 p -> reference.qualifier -> temporary.ref_count 102 = p -> reference.qualifier -> temporary.ref_count - 1; 103 if p -> reference.qualifier -> temporary.ref_count > 0 104 then p -> reference.qualifier = null; 105 else call stack_temp$free_temp(p); 106 107 end; 108 109 end; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 10/03/83 1007.8 adjust_ref_count.pl1 >spec>on>pl128d>adjust_ref_count.pl1 32 1 07/21/80 1546.3 reference.incl.pl1 >ldd>include>reference.incl.pl1 33 2 07/21/80 1546.3 operator.incl.pl1 >ldd>include>operator.incl.pl1 34 3 07/21/80 1546.3 nodes.incl.pl1 >ldd>include>nodes.incl.pl1 35 4 11/30/78 1227.4 temporary.incl.pl1 >ldd>include>temporary.incl.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. bits 12(06) based structure level 2 packed unaligned dcl 1-3 cg_stat$cur_statement 000012 external static pointer dcl 29 set ref 48* 60* delta parameter fixed bin(17,0) dcl 21 ref 19 38 error 000014 constant entry external dcl 30 ref 48 60 hit_zero 12(20) based bit(1) level 3 packed unaligned dcl 1-3 set ref 46 54* length 6 based pointer level 2 packed unaligned dcl 1-3 ref 68 n 000104 automatic fixed bin(17,0) dcl 24 set ref 38* 44 node based structure level 1 dcl 3-27 null builtin function dcl 24 ref 54 57 69 77 90 103 offset 5 based pointer level 2 packed unaligned dcl 1-3 ref 89 operand 1 based pointer array level 2 packed unaligned dcl 2-6 ref 40 71 82 92 operator based structure level 1 dcl 2-6 operator_node constant bit(9) initial dcl 3-5 ref 40 71 82 92 p 000100 automatic pointer dcl 24 set ref 37* 40 40* 40 42 44 44 46 48* 52 54 54 57 57 60* 68 76 89 101 101 103 103 105* pt parameter pointer dcl 21 ref 19 37 q 000102 automatic pointer dcl 24 set ref 68* 69 71 71* 71 73 73* 76* 77 79 82 82* 82 84 84* 89* 90 92 92* 92 95 95* qualifier 4 based pointer level 2 packed unaligned dcl 1-3 set ref 76 101 101 103 103* ref_count 0(18) based fixed bin(17,0) level 2 in structure "reference" packed unaligned dcl 1-3 in procedure "adjust_ref_count" set ref 44* 44 52 57 ref_count 5 based fixed bin(17,0) level 2 in structure "temporary" dcl 4-3 in procedure "adjust_ref_count" set ref 101* 101 103 reference based structure level 1 dcl 1-3 shared 0(11) based bit(1) level 2 packed unaligned dcl 1-3 ref 42 73 84 95 stack_temp$free_temp 000010 constant entry external dcl 24 ref 105 symbol 3 based pointer level 2 packed unaligned dcl 1-3 ref 54 57 temporary based structure level 1 unaligned dcl 4-3 temporary_node constant bit(9) initial dcl 3-5 ref 79 type based bit(9) level 2 packed unaligned dcl 3-27 ref 40 71 79 82 92 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. array_node internal static bit(9) initial dcl 3-5 block_node internal static bit(9) initial dcl 3-5 bound_node internal static bit(9) initial dcl 3-5 by_name_agg_node internal static bit(9) initial dcl 3-5 context_node internal static bit(9) initial dcl 3-5 cross_reference_node internal static bit(9) initial dcl 3-5 default_node internal static bit(9) initial dcl 3-5 format_value_node internal static bit(9) initial dcl 3-5 label_array_element_node internal static bit(9) initial dcl 3-5 label_node internal static bit(9) initial dcl 3-5 list_node internal static bit(9) initial dcl 3-5 machine_state_node internal static bit(9) initial dcl 3-5 max_number_of_operands internal static fixed bin(15,0) initial dcl 2-15 reference_node internal static bit(9) initial dcl 3-5 sf_par_node internal static bit(9) initial dcl 3-5 source_node internal static bit(9) initial dcl 3-5 statement_node internal static bit(9) initial dcl 3-5 substr builtin function dcl 24 symbol_node internal static bit(9) initial dcl 3-5 token_node internal static bit(9) initial dcl 3-5 NAMES DECLARED BY EXPLICIT CONTEXT. adjust_ref_count 000010 constant entry external dcl 19 ref 73 84 95 check_temp 000245 constant entry internal dcl 99 ref 79 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 346 364 271 356 Length 614 271 16 213 55 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME adjust_ref_count 90 external procedure is an external procedure. check_temp internal procedure shares stack frame of external procedure adjust_ref_count. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME adjust_ref_count 000100 p adjust_ref_count 000102 q adjust_ref_count 000104 n adjust_ref_count THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_in call_ext_out return ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. error stack_temp$free_temp THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. cg_stat$cur_statement LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 19 000004 37 000015 38 000021 40 000023 42 000031 44 000034 46 000042 48 000047 49 000063 52 000064 54 000066 56 000073 57 000074 60 000100 61 000114 63 000115 64 000116 65 000117 66 000120 68 000121 69 000124 71 000130 73 000136 76 000153 77 000156 79 000162 82 000171 84 000175 89 000212 90 000215 92 000221 95 000227 96 000244 99 000245 101 000246 103 000252 105 000260 107 000267 ----------------------------------------------------------- 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