COMPILATION LISTING OF SEGMENT linus_eval_scal_func Compiled by: Multics PL/I Compiler, Release 33a, of May 30, 1990 Compiled at: ACTC Technologies Inc. Compiled on: 10/14/90 0920.5 mdt Sun Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) BULL HN Information Systems Inc., 1990 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1981 * 6* * * 7* * Copyright (c) 1972 by Massachusetts Institute of * 8* * Technology and Honeywell Information Systems, Inc. * 9* * * 10* *********************************************************** */ 11 12 13 14 /****^ HISTORY COMMENTS: 15* 1) change(90-04-23,Leskiw), approve(90-10-05,MCR8202), 16* audit(90-10-11,Bubric), install(90-10-14,MR12.4-1039): 17* Changed calls from assign_ to assign_round_ so that data extracted from 18* scalar functions is rounded. 19* END HISTORY COMMENTS */ 20 21 22 linus_eval_scal_func: 23 proc (lcb_ptr, sclf_ptr, icode); 24 25 26 /* DESCRIPTION: 27* 28* Evaluate scalar functions. 29* 30* 31* 32* HISTORY: 33* 34* 77-07-01 J. C. C. Jagernuath: Initially written. 35* 36* 78-03-01 J. C. C. Jagernauth: Modified to recognize the function_err 37* condition. 38* 39* 81-07-13 Rickie E. Brinegar: Removed conversion condition trapping. This 40* is now relegated to higher level routines. 41* 42**/ 43 1 1 /* BEGIN INCLUDE FILE linus_lcb.incl.pl1 -- jaw 8/30/77 */ 1 2 1 3 1 4 1 5 /****^ HISTORY COMMENTS: 1 6* 1) change(86-04-23,Dupuis), approve(86-05-23,MCR7188), audit(86-07-23,GWMay), 1 7* install(86-07-29,MR12.0-1106): 1 8* Added general_work_area_ptr and renamed sfr_ptr to 1 9* force_retrieve_scope_ptr. 1 10* END HISTORY COMMENTS */ 1 11 1 12 1 13 /* HISTORY: 1 14* 1 15* 78-09-29 J. C. C. Jagernauth: Modified for MR7.0. 1 16* 1 17* 81-05-11 Rickie E. Brinegar: added security bit and andministrator bit as 1 18* a part of the attribute level control work. 1 19* 1 20* 81-06-17 Rickie E. Brinegar: deleted the sd_ptr as a part of removing the 1 21* scope_data structure from LINUS. LINUS now depends totally on MRDS for 1 22* scope information. 1 23* 1 24* 81-11-11 Rickie E. Brinegar: added the timing bit and three fields for 1 25* retaining various vcpu times to be collected when in timing mode. The 1 26* times to be collected are: LINUS parsing time, LINUS processing time, and 1 27* MRDS processing time. 1 28* 1 29* 82-01-15 DJ Schimke: Added the build_increment and build_start fields as 1 30* part of the line numbering implementation. This allows for possible later 1 31* LINUS control of the build defaults. 1 32* 1 33* 82-03-01 Paul W. Benjamin: Removed linus_prompt_chars_ptr, as that 1 34* information is now retained by ssu_. Removed parse_timer as no longer 1 35* meaningful. Added linus_version. Added iteration bit. Added 6 entry 1 36* variables for ssu_ replaceable procedures. Added actual_input_iocbp. 1 37* 1 38* 82-06-23 Al Dupuis: Added subsystem_control_info_ptr, 1 39* subsystem_invocation_level, and selection_expression_identifier. 1 40* 1 41* 82-08-26 DJ Schimke: Added report_control_info_ptr, and 1 42* table_control_info_ptr. 1 43* 1 44* 82-10-19 DJ Schimke: Added ssu_abort_line. 1 45* 1 46* 83-06-06 Bert Moberg: Added print_search_order (pso) and no_optimize (no_ot) 1 47* 1 48* 83-04-07 DJ Schimke: Added temp_seg_info_ptr. 1 49* 1 50* 83-08-26 Al Dupuis: Added query_temp_segment_ptr. 1 51**/ 1 52 1 53 dcl 1 lcb aligned based (lcb_ptr), /* LINUS control block */ 1 54 2 db_index fixed bin (35), /* index of open data base, or 0 */ 1 55 2 rb_len fixed bin (21), /* length of request buffer */ 1 56 2 lila_count fixed bin (35), /* number of LILA text lines */ 1 57 2 lila_chars fixed bin (35), /* number of LILA source test chars */ 1 58 2 trans_id fixed bin (35), /* used by checkpoint and rollback facilities (MR7.0) */ 1 59 2 lila_fn char (32) unal, /* entry name of lila data file */ 1 60 2 prompt_flag bit (1) unal, /* on if in prompt mode */ 1 61 2 test_flag bit (1) unal, /* on if in test mode */ 1 62 2 new_version bit (1) unal init (1), /* on for new version data base (MR7.0) */ 1 63 2 secured_db bit (1) unal, /* on if the db is in a secure state */ 1 64 2 administrator bit (1) unal, /* on if the user is a db administrator */ 1 65 2 timing_mode bit (1) unal, /* on if timing is to be done */ 1 66 2 iteration bit (1) unal, /* interpret parens as iteration sets */ 1 67 2 pso_flag bit (1) unal, /* add print_search_order to select */ 1 68 2 no_ot_flag bit (1) unal, /* add no_optimize to select */ 1 69 2 reserved bit (27) unal, 1 70 2 liocb_ptr ptr, /* iocb ptr for lila file */ 1 71 2 rb_ptr ptr, /* ptr to request buffer */ 1 72 2 is_ptr ptr, /* iocb ptr for currentinput stream switch */ 1 73 2 cal_ptr ptr, /* ptr to current arg list for invoke (or null) */ 1 74 2 ttn_ptr ptr, /* pointer to table info structure */ 1 75 2 force_retrieve_scope_info_ptr ptr, /* structure pointer to force retrieve scope operation */ 1 76 2 lv_ptr ptr, /* pointer linus variables */ 1 77 2 si_ptr ptr, /* pointer to select_info structure */ 1 78 2 setfi_ptr ptr, /* pointer to set function information */ 1 79 2 sclfi_ptr ptr, /* pointer to user declared scalar fun. names */ 1 80 2 ivs_ptr ptr, /* pointer to stack of invoke iocb pointers */ 1 81 2 lit_ptr ptr, /* pointer to literal pool */ 1 82 2 lvv_ptr ptr, /* pointer to linus variable alloc. pool */ 1 83 2 rd_ptr ptr, /* point to readied files mode information (MR7.0) */ 1 84 2 rt_ptr ptr, /* point to table of relation names and their readied modes 1 85* (MR7.0) */ 1 86 2 actual_input_iocbp ptr, /* ptr to input while in macros */ 1 87 2 lila_promp_chars_ptr ptr, /* pointer to the prompt characters for lila */ 1 88 2 linus_area_ptr ptr, /* LINUS temporary segment pointer */ 1 89 2 lila_area_ptr ptr, /* LILA temporary segment pointer */ 1 90 2 i_o_area_ptr ptr, /* temporary segment pointer used by write, print, create_list */ 1 91 2 rel_array_ptr ptr, /* ptr to array of names rslt info structure 1 92* for current lila expression */ 1 93 2 unused_timer float bin (63), /* future expansion */ 1 94 2 request_time float bin (63), /* How much request time was spent 1 95* in LINUS. (-1 = user has just enabled 1 96* timing, do not report) */ 1 97 2 mrds_time float bin (63), /* How much time was spent in MRDS */ 1 98 2 build_increment fixed bin, /* default increment for build mode */ 1 99 2 build_start fixed bin, /* default start count for build mode */ 1 100 2 linus_version char (4), /* current version of LINUS */ 1 101 2 subsystem_control_info_ptr ptr, /* the same ptr passed by ssu_ to each request procedure */ 1 102 2 subsystem_invocation_level fixed bin, /* identifies this invocation of LINUS */ 1 103 2 selection_expression_identifier fixed bin, /* identifies the current processed selection expression */ 1 104 2 report_control_info_ptr ptr, /* pointer to linus_report_control_info structure */ 1 105 2 table_control_info_ptr ptr, /* pointer to linus_table control structure */ 1 106 2 temp_seg_info_ptr ptr, /* pointer to linus_temp_seg_mgr control structure */ 1 107 2 query_temp_segment_ptr ptr, /* points to temp seg used for manipulating query */ 1 108 2 general_work_area_ptr ptr, /* a freeing area for general use */ 1 109 2 word_pad (6) bit (36) unal, 1 110 /* procedures that will be optionally */ 1 111 /* replaced by the user. Saved so they */ 1 112 /* can be reinstated if desired. */ 1 113 2 ssu_abort_line entry options (variable), 1 114 2 ssu_post_request_line variable entry (ptr), 1 115 2 ssu_pre_request_line variable entry (ptr), 1 116 1 117 2 curr_lit_offset fixed bin (35), /* index of first free bit in lit. pool */ 1 118 2 curr_lv_val_offset fixed bin (35), /* index of first free bit lv. val. pool */ 1 119 2 static_area area (sys_info$max_seg_size - fixed (rel (addr (lcb.static_area))) + 1); 1 120 1 121 dcl lcb_ptr ptr; 1 122 1 123 /* END INCLUDE FILE linus_lcb.incl.pl1 */ 44 45 2 1 /* BEGIN INCLUDE FILE linus_scal_fn.incl.pl1 -- jaw 6/29/77 */ 2 2 2 3 dcl 1 scal_fn aligned based (sclf_ptr), /* internal rep. of scalar func. */ 2 4 2 entry_ptr ptr, /* pointer to entry to be called */ 2 5 2 arg_list_ptr ptr, /* pointer to arg list for entry call */ 2 6 2 rslt_desc bit (36), /* descriptor for result */ 2 7 2 nargs fixed bin, /* number of input args */ 2 8 2 arg (nsclf_args_init refer (scal_fn.nargs)), 2 9 3 type fixed bin (4) unal, /* 1 => constant, 2 10* 2 => linus variable 2 11* 3 => scalar function 2 12* 4 => set function 2 13* 5 => expression 2 14* 6 => data base item */ 2 15 3 must_convert bit (1) unal, /* on if source data must be converted prior to call */ 2 16 3 reserved bit (30) unal, 2 17 3 desc bit (36), /* descriptor of source data */ 2 18 3 assn_ptr ptr, /* pointer to data or result */ 2 19 3 assn_type fixed bin, /* assign_ type code of source data */ 2 20 3 assn_len fixed bin (35), /* assign_ length of source data */ 2 21 3 arg_desc bit (36), /* descriptor for converted arg */ 2 22 3 arg_assn_ptr ptr, /* assign_ ptr for converted arg */ 2 23 3 arg_assn_type fixed bin, /* assign_ type code of converted arg */ 2 24 3 arg_assn_len fixed bin (35), /* assign_ length of converted arg */ 2 25 3 ef_ptr ptr; /* pointer to expression or function structure */ 2 26 2 27 dcl sclf_ptr ptr; 2 28 dcl nsclf_args_init fixed bin; 2 29 2 30 /* END INCLUDE FILE linus_scal_fn.incl.pl1 */ 46 47 48 dcl (i, caller) fixed bin; 49 50 dcl icode fixed bin (35); 51 52 dcl linus_data_$eval_scal_func_id fixed bin (35) ext; 53 54 dcl destination_ptr ptr; 55 56 dcl linus_eval_set_func entry (ptr, ptr, fixed bin (35)); 57 dcl linus_eval_expr 58 entry (ptr, ptr, ptr, fixed bin, fixed bin, fixed bin (35)); 59 dcl cu_$gen_call entry (ptr, ptr); 60 dcl assign_round_ 61 entry (ptr, fixed bin, fixed bin (35), ptr, fixed bin, fixed bin (35)); 62 63 icode = 0; 64 caller = 2; /* Inform eval_expr that a scalar function called */ 65 destination_ptr = sclf_ptr; /* Result of eval_expr must be placed in the 66* scalar function structure */ 67 68 do i = 1 to scal_fn.nargs while (icode = 0); 69 70 go to case (scal_fn.arg.type (i)); 71 72 case (3): 73 call linus_eval_scal_func (lcb_ptr, scal_fn.arg.ef_ptr (i), icode); 74 /* Process scalar function */ 75 go to case (6); 76 77 case (4): 78 call linus_eval_set_func (lcb_ptr, scal_fn.arg.ef_ptr (i), icode); 79 /* Process setfunction */ 80 go to case (6); 81 82 case (5): 83 call 84 linus_eval_expr (lcb_ptr, scal_fn.arg.ef_ptr (i), destination_ptr, 85 caller, i, icode); /* Process expression */ 86 87 case (1): 88 case (2): 89 case (6): 90 if icode = 0 then 91 if scal_fn.arg.must_convert (i) then 92 call 93 assign_round_ (scal_fn.arg.arg_assn_ptr (i), 94 scal_fn.arg.arg_assn_type (i), 95 scal_fn.arg.arg_assn_len (i), scal_fn.arg.assn_ptr (i), 96 scal_fn.arg.assn_type (i), scal_fn.arg.assn_len (i)); 97 /* Convert */ 98 end; 99 100 if icode ^= 0 then 101 call error (icode); 102 call cu_$gen_call (scal_fn.entry_ptr, scal_fn.arg_list_ptr); 103 /* Call scalar function */ 104 105 exit: 106 ; 107 108 109 110 error: 111 proc (err_code); 112 113 dcl (err_code, out_code) fixed bin (35); 114 115 dcl linus_convert_code entry (fixed bin (35), fixed bin (35), fixed bin (35)); 116 dcl linus_print_error entry (fixed bin (35), char (*)); 117 118 call 119 linus_convert_code (err_code, out_code, linus_data_$eval_scal_func_id); 120 call linus_print_error (out_code, ""); 121 122 go to exit; 123 124 end error; 125 126 end linus_eval_scal_func; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 10/14/90 0915.0 linus_eval_scal_func.pl1 >spec>install>1039>linus_eval_scal_func.pl1 44 1 07/29/86 1248.4 linus_lcb.incl.pl1 >ldd>include>linus_lcb.incl.pl1 46 2 03/27/82 0534.5 linus_scal_fn.incl.pl1 >ldd>include>linus_scal_fn.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. arg 6 based structure array level 2 dcl 2-3 arg_assn_len 21 based fixed bin(35,0) array level 3 dcl 2-3 set ref 87* arg_assn_ptr 16 based pointer array level 3 dcl 2-3 set ref 87* arg_assn_type 20 based fixed bin(17,0) array level 3 dcl 2-3 set ref 87* arg_list_ptr 2 based pointer level 2 dcl 2-3 set ref 102* assign_round_ 000020 constant entry external dcl 60 ref 87 assn_len 13 based fixed bin(35,0) array level 3 dcl 2-3 set ref 87* assn_ptr 10 based pointer array level 3 dcl 2-3 set ref 87* assn_type 12 based fixed bin(17,0) array level 3 dcl 2-3 set ref 87* caller 000101 automatic fixed bin(17,0) dcl 48 set ref 64* 82* cu_$gen_call 000016 constant entry external dcl 59 ref 102 destination_ptr 000102 automatic pointer dcl 54 set ref 65* 82* ef_ptr 22 based pointer array level 3 dcl 2-3 set ref 72* 77* 82* entry_ptr based pointer level 2 dcl 2-3 set ref 102* err_code parameter fixed bin(35,0) dcl 113 set ref 110 118* i 000100 automatic fixed bin(17,0) dcl 48 set ref 68* 70 72 77 82 82* 87 87 87 87 87 87 87* icode parameter fixed bin(35,0) dcl 50 set ref 22 63* 68 72* 77* 82* 87 100 100* lcb_ptr parameter pointer dcl 1-121 set ref 22 72* 77* 82* linus_convert_code 000022 constant entry external dcl 115 ref 118 linus_data_$eval_scal_func_id 000010 external static fixed bin(35,0) dcl 52 set ref 118* linus_eval_expr 000014 constant entry external dcl 57 ref 82 linus_eval_set_func 000012 constant entry external dcl 56 ref 77 linus_print_error 000024 constant entry external dcl 116 ref 120 must_convert 6(05) based bit(1) array level 3 packed packed unaligned dcl 2-3 ref 87 nargs 5 based fixed bin(17,0) level 2 dcl 2-3 ref 68 out_code 000114 automatic fixed bin(35,0) dcl 113 set ref 118* 120* scal_fn based structure level 1 dcl 2-3 sclf_ptr parameter pointer dcl 2-27 ref 22 65 68 70 72 77 82 87 87 87 87 87 87 87 102 102 type 6 based fixed bin(4,0) array level 3 packed packed unaligned dcl 2-3 ref 70 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. lcb based structure level 1 dcl 1-53 nsclf_args_init automatic fixed bin(17,0) dcl 2-28 NAMES DECLARED BY EXPLICIT CONTEXT. case 000000 constant label array(6) dcl 72 ref 70 75 80 error 000214 constant entry internal dcl 110 ref 100 exit 000212 constant label dcl 105 ref 122 linus_eval_scal_func 000015 constant entry external dcl 22 ref 72 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 366 414 247 376 Length 622 247 26 172 117 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME linus_eval_scal_func 122 external procedure is an external procedure. error internal procedure shares stack frame of external procedure linus_eval_scal_func. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME linus_eval_scal_func 000100 i linus_eval_scal_func 000101 caller linus_eval_scal_func 000102 destination_ptr linus_eval_scal_func 000114 out_code error THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_in call_ext_out_desc call_ext_out return_mac ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. assign_round_ cu_$gen_call linus_convert_code linus_eval_expr linus_eval_set_func linus_print_error THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. linus_data_$eval_scal_func_id LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 22 000011 63 000022 64 000024 65 000026 68 000031 70 000044 72 000054 75 000067 77 000070 80 000104 82 000105 87 000127 98 000163 100 000165 102 000176 105 000212 126 000213 110 000214 118 000216 120 000231 122 000246 ----------------------------------------------------------- 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