COMPILATION LISTING OF SEGMENT create_symbol Compiled by: Multics PL/I Compiler, Release 28d, of September 14, 1983 Compiled at: Honeywell LCPD Phoenix, System M Compiled on: 10/03/83 1604.9 mst Mon Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* *********************************************************** */ 6 7 /* ****************************************************** 8* * * 9* * * 10* * Copyright (c) 1972 by Massachusetts Institute of * 11* * Technology and Honeywell Information Systems, Inc. * 12* * * 13* * * 14* ****************************************************** */ 15 16 /* Originally coded by Paul Green, July, 1970 */ 17 /* Modified on: 5 January 1971 by BLW for new node format */ 18 /* Modified on: 30 October 1970 by PG for updated node format */ 19 /* Modified on: 14 September 1970 by P. Green for Version II */ 20 /* Modified on: April 1977 by RHS for new allocation methods */ 21 /* This procedure is called to create a symbol table in 22* cblock, pointed to by token, and having the given type. 23* If cblock is null, the symbol is left floating. 24* If token is null, create_identifier is called to produce a 25* uniquely named identifier. */ 26 27 create_symbol: 28 proc (cblock, token, type) returns (ptr); 29 dcl 1 pl1_nodes_template_$symbol_template external like symbol aligned; 30 31 dcl (cblock, token, tok_pt, p) pointer, 32 type bit (3) aligned, 33 k fixed bin (21) init (0), /* this is used only by the "token" incl file */ 34 (n, nodetype) fixed bin (15); 35 36 dcl pl1_stat_$free_ptr (18) ptr ext static; 37 dcl pl1_stat_$node_uses (32) fixed bin ext; 38 39 dcl create_identifier external entry returns (ptr), 40 create_reference$for_symbol external entry (ptr) returns (ptr); 41 42 dcl (addr, fixed, null, string) builtin; 43 1 1 /* BEGIN INCLUDE FILE ... pl1_tree_areas.incl.pl1 */ 1 2 1 3 /* format: style3 */ 1 4 dcl tree_area area based (pl1_stat_$tree_area_ptr); 1 5 dcl xeq_tree_area area based (pl1_stat_$xeq_tree_area_ptr); 1 6 1 7 dcl pl1_stat_$tree_area_ptr 1 8 ptr ext static, 1 9 pl1_stat_$xeq_tree_area_ptr 1 10 ptr ext static; 1 11 1 12 /* END INCLUDE FILE ... op_codes.incl.pl1 */ 44 2 1 /* BEGIN INCLUDE FILE ... symbol.incl.pl1 */ 2 2 2 3 dcl 1 symbol based aligned, 2 4 2 node_type bit(9) unal, 2 5 2 source_id structure unal, 2 6 3 file_number bit(8), 2 7 3 line_number bit(14), 2 8 3 statement_number bit(5), 2 9 2 location fixed(18) unal unsigned, 2 10 2 allocated bit(1) unal, 2 11 2 dcl_type bit(3) unal, 2 12 2 reserved bit(6) unal, 2 13 2 pix unal, 2 14 3 pic_fixed bit(1) unal, 2 15 3 pic_float bit(1) unal, 2 16 3 pic_char bit(1) unal, 2 17 3 pic_scale fixed(7) unal, 2 18 3 pic_size fixed(7) unal, 2 19 2 level fixed(8) unal, 2 20 2 boundary fixed(3) unal, 2 21 2 size_units fixed(3) unal, 2 22 2 scale fixed(7) unal, 2 23 2 runtime bit(18) unal, 2 24 2 runtime_offset bit(18) unal, 2 25 2 block_node ptr unal, 2 26 2 token ptr unal, 2 27 2 next ptr unal, 2 28 2 multi_use ptr unal, 2 29 2 cross_references ptr unal, 2 30 2 initial ptr unal, 2 31 2 array ptr unal, 2 32 2 descriptor ptr unal, 2 33 2 equivalence ptr unal, 2 34 2 reference ptr unal, 2 35 2 general ptr unal, 2 36 2 father ptr unal, 2 37 2 brother ptr unal, 2 38 2 son ptr unal, 2 39 2 word_size ptr unal, 2 40 2 bit_size ptr unal, 2 41 2 dcl_size ptr unal, 2 42 2 symtab_size ptr unal, 2 43 2 c_word_size fixed(24), 2 44 2 c_bit_size fixed(24), 2 45 2 c_dcl_size fixed(24), 2 46 2 47 2 attributes structure aligned, 2 48 3 data_type structure unal, 2 49 4 structure bit(1) , 2 50 4 fixed bit(1), 2 51 4 float bit(1), 2 52 4 bit bit(1), 2 53 4 char bit(1), 2 54 4 ptr bit(1), 2 55 4 offset bit(1), 2 56 4 area bit(1), 2 57 4 label bit(1), 2 58 4 entry bit(1), 2 59 4 file bit(1), 2 60 4 arg_descriptor bit(1), 2 61 4 storage_block bit(1), 2 62 4 explicit_packed bit(1), /* options(packed) */ 2 63 4 condition bit(1), 2 64 4 format bit(1), 2 65 4 builtin bit(1), 2 66 4 generic bit(1), 2 67 4 picture bit(1), 2 68 2 69 3 misc_attributes structure unal, 2 70 4 dimensioned bit(1), 2 71 4 initialed bit(1), 2 72 4 aligned bit(1), 2 73 4 unaligned bit(1), 2 74 4 signed bit(1), 2 75 4 unsigned bit(1), 2 76 4 precision bit(1), 2 77 4 varying bit(1), 2 78 4 local bit(1), 2 79 4 decimal bit(1), 2 80 4 binary bit(1), 2 81 4 real bit(1), 2 82 4 complex bit(1), 2 83 4 variable bit(1), 2 84 4 reducible bit(1), 2 85 4 irreducible bit(1), 2 86 4 returns bit(1), 2 87 4 position bit(1), 2 88 4 internal bit(1), 2 89 4 external bit(1), 2 90 4 like bit(1), 2 91 4 member bit(1), 2 92 4 non_varying bit(1), 2 93 4 options bit(1), 2 94 4 variable_arg_list bit(1), /* options(variable) */ 2 95 4 alloc_in_text bit(1), /* options(constant) */ 2 96 2 97 3 storage_class structure unal, 2 98 4 auto bit(1), 2 99 4 based bit(1), 2 100 4 static bit(1), 2 101 4 controlled bit(1), 2 102 4 defined bit(1), 2 103 4 parameter bit(1), 2 104 4 param_desc bit(1), 2 105 4 constant bit(1), 2 106 4 temporary bit(1), 2 107 4 return_value bit(1), 2 108 2 109 3 file_attributes structure unal, 2 110 4 print bit(1), 2 111 4 input bit(1), 2 112 4 output bit(1), 2 113 4 update bit(1), 2 114 4 stream bit(1), 2 115 4 reserved_1 bit(1), 2 116 4 record bit(1), 2 117 4 sequential bit(1), 2 118 4 direct bit(1), 2 119 4 interactive bit(1), /* env(interactive) */ 2 120 4 reserved_2 bit(1), 2 121 4 reserved_3 bit(1), 2 122 4 stringvalue bit(1), /* env(stringvalue) */ 2 123 4 keyed bit(1), 2 124 4 reserved_4 bit(1), 2 125 4 environment bit(1), 2 126 2 127 3 compiler_developed structure unal, 2 128 4 aliasable bit(1), 2 129 4 packed bit(1), 2 130 4 passed_as_arg bit(1), 2 131 4 allocate bit(1), 2 132 4 set bit(1), 2 133 4 exp_extents bit(1), 2 134 4 refer_extents bit(1), 2 135 4 star_extents bit(1), 2 136 4 isub bit(1), 2 137 4 put_in_symtab bit(1), 2 138 4 contiguous bit(1), 2 139 4 put_data bit(1), 2 140 4 overlayed bit(1), 2 141 4 error bit(1), 2 142 4 symtab_processed bit(1), 2 143 4 overlayed_by_builtin bit(1), 2 144 4 defaulted bit(1), 2 145 4 connected bit(1); 2 146 2 147 /* END INCLUDE FILE ... symbol.incl.pl1 */ 45 3 1 /* BEGIN INCLUDE FILE ... block.incl.pl1 */ 3 2 /* Modified 22 Ocober 1980 by M. N. Davidoff to increase max block.number to 511 */ 3 3 /* format: style3,idind30 */ 3 4 3 5 declare 1 block aligned based, 3 6 2 node_type bit (9) unaligned, 3 7 2 source_id structure unaligned, 3 8 3 file_number bit (8), 3 9 3 line_number bit (14), 3 10 3 statement_number bit (5), 3 11 2 father ptr unaligned, 3 12 2 brother ptr unaligned, 3 13 2 son ptr unaligned, 3 14 2 declaration ptr unaligned, 3 15 2 end_declaration ptr unaligned, 3 16 2 default ptr unaligned, 3 17 2 end_default ptr unaligned, 3 18 2 context ptr unaligned, 3 19 2 prologue ptr unaligned, 3 20 2 end_prologue ptr unaligned, 3 21 2 main ptr unaligned, 3 22 2 end_main ptr unaligned, 3 23 2 return_values ptr unaligned, 3 24 2 return_count ptr unaligned, 3 25 2 plio_ps ptr unaligned, 3 26 2 plio_fa ptr unaligned, 3 27 2 plio_ffsb ptr unaligned, 3 28 2 plio_ssl ptr unaligned, 3 29 2 plio_fab2 ptr unaligned, 3 30 2 block_type bit (9) unaligned, 3 31 2 prefix bit (12) unaligned, 3 32 2 like_attribute bit (1) unaligned, 3 33 2 no_stack bit (1) unaligned, 3 34 2 get_data bit (1) unaligned, 3 35 2 flush_at_call bit (1) unaligned, 3 36 2 processed bit (1) unaligned, 3 37 2 text_displayed bit (1) unaligned, 3 38 2 number fixed bin (9) unsigned unaligned, 3 39 2 free_temps dimension (3) ptr, /* these fields are used by the code generator */ 3 40 2 temp_list ptr, 3 41 2 entry_list ptr, 3 42 2 o_and_s ptr, 3 43 2 why_nonquick aligned, 3 44 3 auto_adjustable_storage bit (1) unaligned, 3 45 3 returns_star_extents bit (1) unaligned, 3 46 3 stack_extended_by_args bit (1) unaligned, 3 47 3 invoked_by_format bit (1) unaligned, 3 48 3 format_statement bit (1) unaligned, 3 49 3 io_statements bit (1) unaligned, 3 50 3 assigned_to_entry_var bit (1) unaligned, 3 51 3 condition_statements bit (1) unaligned, 3 52 3 no_owner bit (1) unaligned, 3 53 3 recursive_call bit (1) unaligned, 3 54 3 options_non_quick bit (1) unaligned, 3 55 3 options_variable bit (1) unaligned, 3 56 3 never_referenced bit (1) unaligned, 3 57 3 pad_nonquick bit (5) unaligned, 3 58 2 prologue_flag bit (1) unaligned, 3 59 2 options_main bit (1) unaligned, 3 60 2 pad bit (16) unaligned, 3 61 2 number_of_entries fixed bin (17), 3 62 2 level fixed bin (17), 3 63 2 last_auto_loc fixed bin (17), 3 64 2 symbol_block fixed bin (17), 3 65 2 entry_info fixed bin (18), 3 66 2 enter structure unaligned, 3 67 3 start fixed bin (17), 3 68 3 end fixed bin (17), 3 69 2 leave structure unaligned, 3 70 3 start fixed bin (17), 3 71 3 end fixed bin (17), 3 72 2 owner ptr; 3 73 3 74 declare max_block_number fixed bin internal static options (constant) initial (511); 3 75 3 76 /* END INCLUDE FILE ... block.incl.pl1 */ 46 4 1 dcl pl1_stat_$token_list_ptr ptr external static; /* pointer to token list */ 4 2 dcl token_list(token_list_length) ptr based(token_list_pointer); 4 3 dcl token_list_pointer ptr initial(pl1_stat_$token_list_ptr); /* for efficiency only */ 4 4 dcl token_list_length fixed(15) internal static initial(3000) options(constant); 4 5 4 6 dcl 1 pl1_stat_$statement_id external static, 4 7 2 file_number bit(8), 4 8 2 line_number bit(14), 4 9 2 statement_number bit(5); 4 10 4 11 dcl 1 t_table based(token_list(k)) aligned, 4 12 2 node_type bit(9) unaligned, 4 13 2 type bit(9) unaligned, 4 14 2 loc bit(18) unaligned, 4 15 2 declaration ptr unaligned, 4 16 2 next ptr unaligned, 4 17 2 size fixed(9), 4 18 2 string char(n refer(t_table.size)); 47 48 49 5 1 /* BEGIN INCLUDE FILE ... nodes.incl.pl1 */ 5 2 5 3 /* Modified: 26 Dec 1979 by PCK to implement by name assignment */ 5 4 5 5 dcl ( block_node initial("000000001"b), 5 6 statement_node initial("000000010"b), 5 7 operator_node initial("000000011"b), 5 8 reference_node initial("000000100"b), 5 9 token_node initial("000000101"b), 5 10 symbol_node initial("000000110"b), 5 11 context_node initial("000000111"b), 5 12 array_node initial("000001000"b), 5 13 bound_node initial("000001001"b), 5 14 format_value_node initial("000001010"b), 5 15 list_node initial("000001011"b), 5 16 default_node initial("000001100"b), 5 17 machine_state_node initial("000001101"b), 5 18 source_node initial("000001110"b), 5 19 label_node initial("000001111"b), 5 20 cross_reference_node initial("000010000"b), 5 21 sf_par_node initial("000010001"b), 5 22 temporary_node initial("000010010"b), 5 23 label_array_element_node initial("000010011"b), 5 24 by_name_agg_node initial("000010100"b)) 5 25 bit(9) internal static aligned options(constant); 5 26 5 27 dcl 1 node based aligned, 5 28 2 type unal bit(9), 5 29 2 source_id unal structure, 5 30 3 file_number bit(8), 5 31 3 line_number bit(14), 5 32 3 statement_number bit(5); 5 33 5 34 /* END INCLUDE FILE ... nodes.incl.pl1 */ 50 51 /* Begin processing */ 52 53 if token = null then tok_pt = create_identifier (); else tok_pt = token; 54 55 nodetype = fixed (symbol_node, 15, 0); 56 p = pl1_stat_$free_ptr (nodetype); 57 58 if p ^= null 59 then pl1_stat_$free_ptr (nodetype) = p -> symbol.next; 60 else do; 61 pl1_stat_$node_uses (6) = pl1_stat_$node_uses (6) + 1; 62 allocate symbol in (tree_area) set (p); 63 end; 64 p -> symbol = pl1_nodes_template_$symbol_template; 65 66 if cblock = null 67 then p -> symbol.block_node = null; 68 else do; 69 p -> symbol.block_node = cblock; 70 71 if cblock -> block.end_declaration = null 72 then cblock -> block.declaration = p; 73 else cblock -> block.end_declaration -> symbol.next = p; 74 75 cblock -> block.end_declaration = p; 76 end; 77 78 p -> symbol.multi_use = tok_pt -> t_table.declaration; /* push this symbol onto multi_use chain */ 79 tok_pt -> t_table.declaration = p; /* update pointer to first symbol */ 80 81 p -> symbol.token = tok_pt; /* set pointer back to token table */ 82 p -> symbol.dcl_type = type; /* assign type as passed to us */ 83 p -> symbol.node_type = symbol_node; /* identify this node */ 84 85 p -> symbol.reference = create_reference$for_symbol (p); 86 87 return (p); 88 89 end create_symbol; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 10/03/83 1007.3 create_symbol.pl1 >spec>on>pl128d>create_symbol.pl1 44 1 07/21/80 1546.3 pl1_tree_areas.incl.pl1 >ldd>include>pl1_tree_areas.incl.pl1 45 2 10/02/83 0828.4 symbol.incl.pl1 >spec>on>pl128d>symbol.incl.pl1 46 3 08/13/81 2043.5 block.incl.pl1 >ldd>include>block.incl.pl1 47 4 09/14/77 1705.7 token_list.incl.pl1 >ldd>include>token_list.incl.pl1 50 5 07/21/80 1546.3 nodes.incl.pl1 >ldd>include>nodes.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. block based structure level 1 dcl 3-5 block_node 4 based pointer level 2 packed unaligned dcl 2-3 set ref 66* 69* cblock parameter pointer dcl 31 ref 27 66 69 71 71 73 75 create_identifier 000016 constant entry external dcl 39 ref 53 create_reference$for_symbol 000020 constant entry external dcl 39 ref 85 dcl_type 1(19) based bit(3) level 2 packed unaligned dcl 2-3 set ref 82* declaration 1 based pointer level 2 in structure "t_table" packed unaligned dcl 4-11 in procedure "create_symbol" set ref 78 79* declaration 4 based pointer level 2 in structure "block" packed unaligned dcl 3-5 in procedure "create_symbol" set ref 71* end_declaration 5 based pointer level 2 packed unaligned dcl 3-5 set ref 71 73 75* fixed builtin function dcl 42 ref 55 k 000104 automatic fixed bin(21,0) initial dcl 31 set ref 31* multi_use 7 based pointer level 2 packed unaligned dcl 2-3 set ref 78* next 6 based pointer level 2 packed unaligned dcl 2-3 set ref 58 73* node_type based bit(9) level 2 packed unaligned dcl 2-3 set ref 83* nodetype 000105 automatic fixed bin(15,0) dcl 31 set ref 55* 56 58 null builtin function dcl 42 ref 53 58 66 66 71 p 000102 automatic pointer dcl 31 set ref 56* 58 58 62* 64 66 69 71 73 75 78 79 81 82 83 85 85* 87 pl1_nodes_template_$symbol_template 000010 external static structure level 1 dcl 29 ref 64 pl1_stat_$free_ptr 000012 external static pointer array dcl 36 set ref 56 58* pl1_stat_$node_uses 000014 external static fixed bin(17,0) array dcl 37 set ref 61* 61 pl1_stat_$token_list_ptr 000024 external static pointer dcl 4-1 ref 4-3 pl1_stat_$tree_area_ptr 000022 external static pointer dcl 1-7 ref 62 reference 15 based pointer level 2 packed unaligned dcl 2-3 set ref 85* symbol based structure level 1 dcl 2-3 set ref 62 64* symbol_node constant bit(9) initial dcl 5-5 ref 55 83 t_table based structure level 1 dcl 4-11 tok_pt 000100 automatic pointer dcl 31 set ref 53* 53* 78 79 81 token 5 based pointer level 2 in structure "symbol" packed unaligned dcl 2-3 in procedure "create_symbol" set ref 81* token parameter pointer dcl 31 in procedure "create_symbol" ref 27 53 53 token_list_pointer 000106 automatic pointer initial dcl 4-3 set ref 4-3* tree_area based area(1024) dcl 1-4 ref 62 type parameter bit(3) dcl 31 ref 27 82 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. addr builtin function dcl 42 array_node internal static bit(9) initial dcl 5-5 block_node internal static bit(9) initial dcl 5-5 bound_node internal static bit(9) initial dcl 5-5 by_name_agg_node internal static bit(9) initial dcl 5-5 context_node internal static bit(9) initial dcl 5-5 cross_reference_node internal static bit(9) initial dcl 5-5 default_node internal static bit(9) initial dcl 5-5 format_value_node internal static bit(9) initial dcl 5-5 label_array_element_node internal static bit(9) initial dcl 5-5 label_node internal static bit(9) initial dcl 5-5 list_node internal static bit(9) initial dcl 5-5 machine_state_node internal static bit(9) initial dcl 5-5 max_block_number internal static fixed bin(17,0) initial dcl 3-74 n automatic fixed bin(15,0) dcl 31 node based structure level 1 dcl 5-27 operator_node internal static bit(9) initial dcl 5-5 pl1_stat_$statement_id external static structure level 1 packed unaligned dcl 4-6 pl1_stat_$xeq_tree_area_ptr external static pointer dcl 1-7 reference_node internal static bit(9) initial dcl 5-5 sf_par_node internal static bit(9) initial dcl 5-5 source_node internal static bit(9) initial dcl 5-5 statement_node internal static bit(9) initial dcl 5-5 string builtin function dcl 42 temporary_node internal static bit(9) initial dcl 5-5 token_list based pointer array dcl 4-2 token_list_length internal static fixed bin(15,0) initial dcl 4-4 token_node internal static bit(9) initial dcl 5-5 xeq_tree_area based area(1024) dcl 1-5 NAME DECLARED BY EXPLICIT CONTEXT. create_symbol 000011 constant entry external dcl 27 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 302 330 160 312 Length 602 160 26 235 121 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME create_symbol 86 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME create_symbol 000100 tok_pt create_symbol 000102 p create_symbol 000104 k create_symbol 000105 nodetype create_symbol 000106 token_list_pointer create_symbol THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out return ext_entry alloc_based THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. create_identifier create_reference$for_symbol THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. pl1_nodes_template_$symbol_template pl1_stat_$free_ptr pl1_stat_$node_uses pl1_stat_$token_list_ptr pl1_stat_$tree_area_ptr LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 27 000004 31 000016 4 3 000017 53 000022 53 000036 55 000041 56 000044 58 000051 61 000063 62 000065 64 000074 66 000102 69 000112 71 000115 73 000122 75 000124 78 000125 79 000130 81 000131 82 000132 83 000137 85 000141 87 000154 ----------------------------------------------------------- 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