1999-08-30 Kaveh R. Ghazi * parse.c (language_string): Constify. 1999-08-30 Kaveh R. Ghazi * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a. Remove hacks for stuff which now comes from libiberty. 1999-08-29 Kaveh R. Ghazi * lang.c (chill_print_error_function): Constify a char*. 1999-08-29 Kaveh R. Ghazi * Makefile.in (ch-version.c): Constify a char*. * actions.c (id_cmp, warn_unhandled, adjust_return_value, update_else_range_for_int_const, update_else_range_for_range, update_else_range_for_range_expr, update_else_range_for_type, compute_else_range, check_case_value, chill_handle_case_label_range, chill_handle_multi_case_label_range, chill_handle_multi_case_else_label, chill_handle_multi_case_label, chill_handle_multi_case_label_list print_missing_cases): Add static prototypes. (build_exception_variant): Cast the function argument of qsort. (build_rts_call, warn_unhandled, chill_convert_for_assignment, adjust_return_value, chill_expand_result, build_multi_case_selector_expression, print_missing_cases): Constify a char*. (print_missing_cases): Introduce an intermediary non-const ptr. Add brackets and indent. * ch-tree.h (maybe_building_objc_message_expr, maybe_objc_comptypes, comptypes_record_hook): Remove declarations. (push_handler, pop_handler): Add prototypes. (builtin_function, valid_array_index_p, build_chill_exception_decl, build_rts_call, chill_convert_for_assignment, display_int_cst, build_chill_addr_expr, check_have_mode, get_identifier3, build_chill_string, register_seize_path, get_unique_identifier, add_taskstuff_to_list, gnuchill_version): Constify a char*. (finish_chill_function): Add void prototype argument. * convert.c (convert_to_reference, convert_to_boolean, convert_to_char, base_type_size_in_bytes, remove_tree_element, check_ps_range, digest_powerset_tuple, digest_structure_tuple, digest_array_tuple, convert1): Add static prototypes. (base_type_size_in_bytes): Hide unused function. (display_int_cst, digest_array_tuple): Constify a char*. * decl.c (set_nesting_level, make_chill_variants, fix_identifier, proclaim_decl, maybe_acons, push_scope_decls, pop_scope_decls, build_implied_names, bind_sub_modules, layout_array_type, do_based_decl, handle_one_level, label_value_cmp, find_implied_types): Add static prototypes. (boolean_code_name, chill_tree_code_type, chill_tree_code_name): Constify a char*. (layout_chill_variants): Cast the function argument of qsort. (start_chill_function, fix_identifier, init_decl_processing): Constify a char*. (init_decl_processing): Prefer memcpy over bcopy to avoid casts. Use xcalloc instead of xmalloc/bzero. (builtin_function, build_chill_exception_decl, finish_outer_function): Constify a char*. * except.c (start_handler_array, finish_handler_array): Add static prototypes. * expr.c (chill_expand_expr, chill_expand_case_expr, check_arglist_length, internal_build_compound_expr, is_really_instance, invalid_operand, invalid_right_operand, build_chill_abstime, build_allocate_memory_call, build_allocate_global_memory_call, build_return_memory, build_chill_duration, build_chill_floatcall, build_allocate_getstack, build_chill_allocate, build_chill_getstack, build_chill_terminate, build_chill_inttime, build_chill_lower_or_upper, build_max_min, build_chill_pred_or_succ, expand_packed_set, fold_set_expr, build_compare_set_expr, scalar_to_string, build_concat_expr, build_compare_string_expr, compare_records, string_char_rep, build_boring_bitstring): Add static prototypes. (check_have_mode, chill_expand_expr, build_chill_floatcall, build_allocate_getstack, build_max_min, build_chill_function_call, expand_packed_set, build_compare_set_expr, build_chill_addr_expr, string_char_rep): Constify a char*. * gperf (hash, in_word_set): Add prototypes. * grant.c (newstring, strfree, append, prepend, grant_use_seizefile, decode_layout, grant_array_type, grant_array_type_selective, get_tag_value, get_tag_value_selective, print_enumeral, print_enumeral_selective, print_integer_type, find_enum_parent, print_integer_selective, print_struct, print_struct_selective, print_proc_exceptions, print_proc_tail, print_proc_tail_selective, find_in_decls, in_ridpointers, grant_seized_identifier, globalize_decl, grant_one_decl_selective, compare_memory_file, search_in_list, really_grant_this): Add static prototypes. (newstring, append, prepend, grant_use_seizefile, print_integer_type, decode_constant, grant_one_decl_selective, header_template): Constify a char *. * inout.c (add_enum_to_list, build_chill_io_list_type, build_io_types, declare_predefined_file, build_access_part, textlocation_mode, check_assoc, assoc_call, check_transfer, connect_process_optionals, connect_text, connect_access, check_access, check_text, get_final_type_and_range, process_io_list, check_format_string, get_max_size, check_exprlist): Add static prototypes. (declare_predefined_file, check_assoc, assoc_call, check_transfer, check_access, check_text, process_io_list): Constify a char*. * lang.c (deep_const_expr, chill_print_error_function): Add static prototypes. * lex.c (close_input_file, maybe_number, string_or_char): Constify a char*. (ch_lex_init, skip_directive, same_file, getlc, yywrap, yy_refill): Add static prototypes. (build_chill_string, same_file, register_seize_path): Constify a char*. * lex.h (finish_chill_seizes): Remove unused prototypes. * loop.c (build_temporary_variable, maybe_make_for_temp, get_unique_identifier): Constify a char*. * parse.c (ch_parse_init, check_end_label, end_function, build_prefix_clause, PEEK_TOKEN, peek_token_, pushback_token, forward_token_, require, check_token, expect, define__PROCNAME__): Add static prototypes. (build_prefix_clause, expect): Constify a char*. (parse_expression, parse_primval, parse_untyped_expr, parse_opt_untyped_expr, parse_opt_actions): Add void prototype argument. (parse_opt_name_string, parse_simple_name_string, parse_name_string, parse_defining_occurrence, parse_name, parse_optlabel, parse_opt_end_label_semi_colon, parse_modulion, parse_spec_module, parse_semi_colon, parse_defining_occurrence_list, parse_mode_definition, parse_mode_definition_statement, parse_synonym_definition, parse_synonym_definition_statement, parse_on_exception_list, parse_on_alternatives, parse_loc_declaration, parse_declaration_statement, parse_optforbid, parse_postfix, parse_postfix_list, parse_rename_clauses, parse_opt_prefix_clause, parse_grant_statement, parse_seize_statement, parse_param_name_list, parse_param_attr, parse_formpar, parse_formparlist, parse_opt_result_spec, parse_opt_except, parse_opt_recursive, parse_procedureattr, parse_proc_body, parse_procedure_definition, parse_processpar, parse_processparlist, parse_process_definition, parse_signal_definition, parse_signal_definition_statement, parse_then_clause, parse_opt_else_clause, parse_expr_list, parse_range_list_clause, pushback_paren_expr, parse_case_label, parse_case_label_list, parse_case_label_specification, parse_single_dimension_case_action, parse_multi_dimension_case_action, parse_case_action, parse_asm_operands, parse_asm_clobbers, ch_expand_asm_operands, parse_asm_action, parse_begin_end_block, parse_if_action, parse_iteration, parse_delay_case_event_list, parse_delay_case_action, parse_do_action, parse_receive_spec, parse_receive_case_action, parse_send_action, parse_start_action, parse_call, parse_tuple_fieldname_list, parse_tuple_element, parse_opt_element_list, parse_tuple, parse_operand6, parse_operand5, parse_operand4, parse_operand3, parse_operand2, parse_operand1, parse_operand0, parse_case_expression, parse_then_alternative, parse_else_alternative, parse_if_expression, parse_index_mode, parse_set_mode, parse_pos, parse_step, parse_opt_layout, parse_field_name_list, parse_fixed_field, parse_variant_field_list, parse_variant_alternative, parse_field, parse_structure_mode, parse_opt_queue_size, parse_procedure_mode, parse_program, parse_pass_1_2): Add static prototypes. (parse_process_definition): Remove extra argument in function call. (parse_range_list_clause): Likewise. * satisfy.c (satisfy, cycle_error_print, safe_satisfy_decl, satisfy_list, satisfy_list_values): Add static prototype. (safe_satisfy_decl): Cast DECL_TASKING_CODE_DECL() to (tree). * tasking.c (make_process_struct): Remove unused prototype. (validate_process_parameters, get_struct_variable_name, decl_tasking_code_variable, get_struct_debug_type_name, get_process_wrapper_name, build_tasking_enum, build_tasking_message_type, build_receive_signal_case_label, build_receive_buffer_case_label, build_receive_buffer_case_end, build_receive_signal_case_end): Add static prototypes. (struct_name, struct_debug_name, data_name, wrapper_name, get_struct_type_name, get_struct_debug_type_name, get_tasking_code_name, get_struct_variable_name, get_process_wrapper_name): Constify a char*. (validate_process_parameters, get_struct_variable_name, decl_tasking_code_variable): Hide unused functions. (build_start_process, add_taskstuff_to_list, build_queue_length): Constify a char*. * tree.c (make_powerset_type): Add static prototype. (get_identifier3, build_alias_decl, decl_check_rename): Constify a char*. * typeck.c (extract_constant_from_buffer, expand_constant_to_buffer, build_empty_string, make_chill_pointer_type, make_chill_range_type, apply_chill_array_layout, field_decl_cmp, make_chill_struct_type, apply_chill_field_layout): Add static prototype. (valid_array_index_p, extract_constant_from_buffer, chill_expand_tuple): Constify a char*. (layout_chill_struct_type): Cast the function argument of qsort. 1999-08-09 Kaveh R. Ghazi * actions.c (lang_identify): Constify a char*. * lang.c (chill_print_error_function): Likewise. (lang_init): Remove redundant prototype for `print_error_function'. 1999-07-25 Richard Henderson * decl.c (va_list_type_node): New. 1999-06-25 Kaveh R. Ghazi * Make-lang.in (CHILL.stage1): Depend on stage1-start. (CHILL.stage2): Likewise for stage2-start. (CHILL.stage3): Likewise for stage3-start. (CHILL.stage4): Likewise for stage4-start. Tue May 18 00:21:34 1999 Zack Weinberg * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc was not given. 1999-05-10 18:21 -0400 Zack Weinberg * lang-specs.h: Pass -$ to the preprocessor. Tue May 4 14:52:53 1999 Dave Brolley * actions.c (chill_expand_assignment): Use powersetlen to calculate the length of an array of packed bits. Tue Apr 20 23:37:01 1999 Nathan Sidwell * Make-lang.in (ch/chill.info): Put MAKEINFO parameters in correct order. Wed Apr 14 21:07:30 1999 Mumit Khan * config-lang.in (compilers): Add exeext. (stagestuff): Likewise. Fri Apr 2 15:49:44 1999 Jeffrey A Law (law@cygnus.com) * Make-lang.in (CHILL_FLAGS_TO_PASS): Do not pass $(CC). Wed Mar 31 10:44:47 1999 Kaveh R. Ghazi * Makefile.in (hash.h): Generate using gperf language 'C', not 'KR-C', so gperf uses the `const' keyword on strings. * gperf (resword): Const-ify a char*. Sun Mar 28 00:30:36 1999 Jeffrey A Law (law@cygnus.com) * Make-lang.in (CHILL.dvi): New target. (CHILL.mostlyclean): Remove remnants of old runtime library structure. 1999-02-20 Craig Burley * Make-lang.in (CHILL.info): Depend on intermediate ch/chill.info target instead of the chill.texi file. (ch/chill.info): New target, depends on the chill.texi source file. Its command writes ch/chill.info instead of chill.info. (CHILL.install-info): Install from ch/chill.info instead of chill.info. If any ch/chill.info* files exist, delete *all* chill.info* files in $infodir first, not just the ones corresponding to the files to be installed (just in case the docs get smaller). Sun Jan 31 20:34:29 1999 Zack Weinberg * decl2.c: Don't define flag_no_ident here. Don't process -f(no-)ident here. * ch-tree.h: Don't declare flag_no_ident here. * lang-specs.h: Map -Qn to -fno-ident. Tue Jan 19 23:24:36 1999 Jeffrey A Law (law@cygnus.com) * Makefile.in (typeck.o): Depend on insn-codes.h. * actions.c (chill_handle_multi_case_label): Initialize "expr". * decl.c (poplevel): Initialize "block_previously_created". * expr.c (chill_expand_expr): Initialize "size0" and "size1". (fold_set_expr): Initialize "buffer1". * inout.c (process_io_list): Initialize "to_assign". (check_exprlist): Initialize "result". * parse.c (expand_expr): Declare. (parse_multi_dimension_case_action): Initialize "end_case_label". * tasking.c (build_start_process): Initialize "struct_type_node". * typeck.c (apply_chill_field_layout): Initialize "word". (type_for_mode); Unconditionally cast RHS & LHS to ints to shut up signed/unsigned comparison warning. Mon Jan 18 11:55:06 1999 Kaveh R. Ghazi * ch-tree.h: Remove conflicting prototypes for pedwarn, warning_with_decl, and make_dcl_rtl. Sun Jan 17 21:53:23 1999 Jeffrey A Law (law@cygnus.com) * Makefile.in: Do not put ^Ls at the start of a line. Wed Jan 6 02:53:38 1999 Jeffrey A Law (law@cygnus.com) * Makefile.in: Add some missing $(exeext). Remove some obsolete runtime stuff. * Make-lang.in: Similarly. Tue Nov 24 09:57:34 1998 Jeffrey A Law (law@cygnus.com) * Makefile.in (lex.c): Do not depend on hash.h. (lex.o): Depend on hash.h. Mon Oct 19 12:13:47 1998 Kaveh R. Ghazi * Makefile.in (lex.o): Depend on dwarfout.h. * lang-specs.h: Add missing braces in initializer. * lex.c: Include dwarfout.h, if DWARF_DEBUGGING_INFO is defined. Thu Oct 15 09:25:21 1998 Kaveh R. Ghazi * expr.c (build_chill_card): Use &&, not &, when comparing truth values. * parse.c (parse_spec_module): Remove unused variable `module_name', but preserve function call from initialization. (parse_operand6): Mark variable `location' with ATTRIBUTE_UNUSED. * inout.c (init_text_location): Remove unused variable `textlength'. Wed Oct 14 22:19:48 1998 Kaveh R. Ghazi * typeck.c (build_chill_cast): Fix typo in assignment statement. * tasking.c (build_signal_descriptor): Use IDENTIFIER_POINTER() when printing a `tree'. Fri Oct 9 13:01:23 1998 Kaveh R. Ghazi * ch-tree.h (build_delay_case_end): Remove unused parameter. (build_receive_case_end): Likewise. (check_queue_size): Likewise. * parse.c: Callers changed. * satisfy.c: Likewise. * tasking.c (build_receive_buffer_case_end): Remove unused parameter `label_cnt'. (build_receive_signal_case_end): Likewise. (build_receive_case_end): Likewise. (build_delay_case_end): Likewise. (check_queue_size): Likewise for parameter `type'. All callers changed. Thu Oct 8 05:57:41 1998 Jeffrey A Law (law@cygnus.com) * typeck (type_for_mode): Only return TItype nodes when HOST_BITS_PER_WIDE_INT is >= 64 bits. (type_for_size): Similarly. * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare when HOST_BITS_PER_WIDE_INT is >= 64 bits. (init_decl_processing): Only create TItype nodes when HOST_BITS_PER_WIDE_INT is >= 64 bits. Wed Oct 7 12:19:21 1998 Kaveh R. Ghazi * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0, 0' flags to gperf. (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs). Thu Oct 1 10:43:45 1998 Nick Clifton * lex.c: Replace occurances of HANDLE_SYSV_PRAGMA with HANDLE_GENERIC_PRAGMAS. (handle_generic_pragma): New function: Parse generic pragmas. Wed Sep 30 20:22:34 1998 Kaveh R. Ghazi * parse.c (emit_label): Fix return-type of prototype. Wed Sep 30 19:41:36 1998 Kaveh R. Ghazi * actions.c (chill_handle_multi_case_label): Always return a value in function returning non-void. * except.c: Include OS headers before any local ones. * typeck.c (layout_chill_range_type): Change type of variable `negprecision' to int. (apply_chill_array_layout): Initialize variables `stepsize' and `start_bit'. (layout_chill_struct_type): Change type of variable `min_align' to unsigned int. (smash_dummy_type): Change name of variable `main' to `main_tree'. Wed Sep 30 19:24:41 1998 Kaveh R. Ghazi * actions.c (id_cmp): Do pointer arithmetic as `long' not `int' to ensure enough bits for calculation. * ch-tree.h (check_text_length): Remove unused parameter. * convert.c (display_int_cst): Cast a HOST_WIDE_INT argument to function sprintf into the appropriate type for printing. * decl.c (print_lang_decl): Use HOST_WIDE_INT_PRINT_DEC as the format specifier. (print_mode): Likewise. (init_decl_processing): Cast the arguments of bcopy/bzero to char *. * grant.c (grant_array_type): Use HOST_WIDE_INT_PRINT_DEC as the format specifier. * inout.c (check_text_length): Remove unused parameter `type'. (build_chill_associate): Initialize variables `arg1', `arg2', `arg3', `arg4' and `arg5'. (build_chill_modify): Likewise. (scanformcont): Change type of variable `curr' to `unsigned char'. * lex.c (maybe_downcase): Cast the argument of `tolower' to `unsigned char'. * satisfy.c (satisfy): Remove unused parameter in call to `check_text_length'. * tasking.c (generate_tasking_code_variable): Pass a HOST_WIDE_INT as a `long' in call to function `error'. (decl_tasking_code_variable): Likewise. Wed Sep 30 19:03:02 1998 Kaveh R. Ghazi * grant.c (decode_decl_selective): Cast switch's enum argument to an int. (really_grant_this): Add default case in switch. * typeck.c (chill_resulting_class): Add default cases in switch. Also add `break' statements after each case. Tue Sep 29 21:37:33 1998 Kaveh R. Ghazi * ch-tree.h (build_compare_expr): Change first argument's type from `enum chill_tree_code' to `enum tree_code'. (build_compare_discrete_expr): Likewise. * expr.c (build_compare_set_expr): Likewise. (build_compare_string_expr): Likewise. (build_compare_expr): Likewise. (build_compare_discrete_expr): Likewise. Also add default case in switch statement. (compare_int_csts): Add default case in switch statement. Sun Sep 20 11:02:55 1998 Robert Lipe * except.c: Include system.h. * Makefile.in (except.o): Depend on system.h. Sun Sep 20 09:25:13 1998 Kaveh R. Ghazi * Makefile.in (actions.o, convert.o, decl.o, expr.o, lang.o, lex.o, loop.o, parse.o, satisfy.o, timing.o, tasking.o, tree.o, typeck.o): Depend on system.h and toplev.h. (except.o): Depend on toplev.h. (grant.o): Depend on system.h, toplev.h and output.h. * actions.c: Include system.h and toplev.h. Remove redundant prototypes. (build_cause_exception): Add default case in switch. (update_else_range_for_range): Add parentheses around && within ||. (chill_handle_multi_case_label_list): Remove unused variable `selector_value'. (print_missing_cases): Reconcile format specifiers vs arguments in calls to sprintf. * ch-tree.h: Don't include stdio.h. Wrap prototypes using FILE* with macro BUFSIZ. Add missing prototypes. * convert.c: Include system.h and toplev.h. Remove redundant prototypes. (convert): Remove unused variable `errstr'. * decl.c: Include system.h and toplev.h. Remove redundant prototypes. (builtin_scope): Add missing initializers. (clear_scope): Likewise. (allocate_lang_decl): Mark parameter `t' with ATTRIBUTE_UNUSED. (copy_lang_decl): Likewise for parameter `node'. (c_decode_option): Likewise for parameter `argc'. (push_extern_function): Likewise for parameter `granting'. (switch_to_pass_2): Hide declaration of errorcount/sorrycount. (pushdecl): Remove unused variable `t'. (lookup_name_current_level): Make static and hide. (lookup_name_for_seizing): Make static. (finish_decl): Remove unused variable `type'. (maybe_build_cleanup): Mark parameter `decl' with ATTRIBUTE_UNUSED. (complete_array_type): Mark parameters `type', `initial_value' and `do_default' with ATTRIBUTE_UNUSED. (start_struct): Mark parameter `name' with ATTRIBUTE_UNUSED. (start_enum): Likewise. (shadow_record_fields): Remove unused variables `type' and `parent'. * except.c: Include toplev.h. Remove redundant prototypes. * expr.c: Include system.h and toplev.h. Don't define NULL. Remove redundant prototypes. (internal_build_compound_expr): Mark parameter `first_p' with ATTRIBUTE_UNUSED. (build_allocate_getstack): Remove unused variable `init'. (build_chill_pred_or_succ): Likewise for variable `limit'. (varying_to_slice): Likewise for variable `doamin' [sic]. (finish_chill_binary_op): Likewise for variables `code0' and `code1'. Remove unused label `finish'. Add explicit braces to avoid ambiguous `else'. (build_chill_addr_expr): Remove extra parameter in call to `error'. (build_chill_unary_op): Remove unused variables `class' and `type0'. (powersetlen): Remove unused variables `domain' and `temp'. * grant.c: Include system.h, toplev.h and output.h. Don't handle strchr/strrchr. Remove redundant prototypes. (decode_constant_selective): Remove unused variables `op' and `wrk'. (push_granted): Mark parameters `name' and `decl' with ATTRIBUTE_UNUSED. * inout.c: Include system.h and toplev.h. Remove redundant prototypes. (textlocation_mode): Use &&, not &, when comparing two truth values. (scanformcont): Remove unused label `do_the_action'. * lang.c: Include system.h and toplev.h. Remove redundant prototypes. (lookup_interface): Mark parameter `arg' with ATTRIBUTE_UNUSED. (maybe_objc_comptypes): Likewise for parameters `lhs' and `rhs'. (lang_print_xnode): Likewise for parameters `file', `node' and `indent'. (lang_decode_option): Explicitly declare `explicit_ignore_case'. (incomplete_type_error): Mark parameters `value' and `type' with ATTRIBUTE_UNUSED. * lex.c: Include system.h and toplev.h. Remove redundant prototypes. Don't handle strchr/strrchr. Use CAPITALIZED versions of ctype macros from system.h. Cast ctype arguments to unsigned char when necessary. (last_token, RETURN_TOKEN): Hide definition. (push_back): Remove unused function. (readstring): Change variable `i' to unsigned. (yywrap): Remove unused variable `node'. * loop.c: Include system.h and toplev.h. Remove redundant prototypes. (chill_unsigned_type): Hide prototype and definition. (begin_loop_scope): Remove unused variable `firstp'. (nonvalue_begin_loop_scope): Likewise. * parse.c: Include system.h and toplev.h. Remove redundant prototypes. (quasi_signal): Hide. (PEEK_TOKEN): Change return type to `enum terminal'. (parse_mode_definition_statement): Remove unused variable `names'. (parse_formpar): Remove unused parameter `in_spec_module'. All callers changed. (parse_formparlist): Likewise. (parse_processpar): Remove unused variable `parms'. (parse_definition): Add explicit braces to avoid ambiguous `else'. (parse_multi_dimension_case_action): Initialize variable `begin_test_label'. Remove unused variable `new_test'. (parse_case_action): Remove unused variable `caseaction_flag'. (parse_asm_clobbers): Remove unused variable `expr'. (parse_delay_case_action): Initialize variable `label_cnt'. (parse_action): Make function static. (parse_tuple_element): Remove unused variable `list'. (parse_primval): Add default case in switch. (parse_variant_alternative): Remove unused variables `x' and `variant_fields'. * satisfy.c: Include system.h and toplev.h. Remove redundant prototypes. * tasking.c Include system.h and toplev.h. Remove redundant prototypes. (data_name): Hide. (get_struct_variable_name): Likewise. (validate_process_parameters): Mark parameter `parms' with ATTRIBUTE_UNUSED. (build_start_process): Initialize variable `tuple'. (build_receive_buffer_case_end): Remove unused variable `buffer_ptr'. * timing.c: Include system.h and toplev.h. (build_after_timeout_start): Remove unused variable `goto_where'. * tree.c: Include system.h and toplev.h. Remove redundant prototypes. * typeck.c: Include system.h and toplev.h. Remove redundant prototypes. (extract_constant_from_buffer): Make function static. Add explicit braces to avoid ambiguous `else'. (expand_constant_to_buffer): Likewise. (build_chill_slice): remove unused variable `is_static'. (chill_compatible): Add explicit braces to avoid ambiguous `else'. (apply_chill_array_layout): Remove unused variable `offset'. (smash_dummy_type): Remove unused variable `save_lang_specific'. (initializer_constant_valid_p): Add default case in switch. Mon Sep 14 16:46:36 1998 Dave Brolley * typeck.c (build_chill_slice): Always use TYPE_DOMAIN to get the domain type of the array. * expr.c (build_chill_function_call): Remove redundant call to chill_convert_to_assignment Thu Sep 10 17:52:36 1998 Dave Brolley * actions.c (chill_convert_for_assignment): Make a copy of the result node before modifying it. Sat Sep 5 16:55:37 1998 John Carr * Make-lang.in: Comment ^L characters. Sun make doesn't like them. Sat Sep 5 23:49:50 1998 Jeffrey A Law (law@cygnus.com) * Makefile.in (INCLUDES): Update after recent reorganization at the toplevel gcc directory. Sat Sep 5 22:25:51 1998 Richard Henderson * Makefile.in: Update dependancies for top-level gcc files that moved. Sat Sep 5 02:21:08 1998 Jeffrey A Law (law@cygnus.com) * Makefile.in: Tweak to avoid building runtime. It's built elsewhere now. Thu Sep 3 15:32:03 1998 Dave Brolley * typeck.c (layout_chill_range_type): set TYPE_SIZE_UNIT. Wed Sep 02 09:25:29 1998 Nick Clifton * lex.c (check_newline): Change how HANDLE_PRAGMA is called. Generate warning messages if unknown pragmas are encountered. (pragma_getc): New function: retrieves characters from the input stream. Defined when HANDLE_PRAGMA is defined. (pragma_ungetc): New function: replaces characters back into the input stream. Defined when HANDLE_PRAGMA is defined. Mon Aug 31 15:35:16 1998 Dave Brolley * decl.c (layout_chill_variants): Calculate nlables properly. Mon Jul 27 17:21:01 1998 Dave Brolley * typeck.c (apply_chill_array_layout): Don't set TYPE_SIZE of the element type. Mon Jul 13 14:20:12 1998 Nick Clifton * lang-options.h: Format changed to match changes in gcc/toplev.c to implement a --help option. Wed Jul 8 02:58:35 1998 Jeffrey A Law (law@cygnus.com) * lang.c (lang_init_options): New function. Wed Jun 10 12:08:09 1998 Dave Brolley * lang-options.h: Remove -I. * ch-tree.h (c_decode_option): New argc/argv interface. * decl.c (c_decode_option): New argc/argv interface. * lang.c (lang_decode_option): New argc/argv interface. Wed May 27 10:33:41 1998 Dave Brolley * actions.c (chill_handle_multi_case_label): Arguments 1 and 2 to chill_handle_multi_case_label_range were reversed. * Make-lang.in (chill): Use the correct gcc in the driver script. Thu May 21 14:40:44 1998 Dave Brolley * convert.c (digest_array_tuple): Move conversion to chill_convert_for_assignment. * actions.c (chill_convert_for_assignment): Allow conversion of array constructor to bitstring constructor for assignment to array of packed bits. Thu May 14 13:57:51 1998 Dave Brolley * Make-lang.in (chill-runtime): Depend on stmp-headers to build float.h. Wed May 13 14:07:51 1998 Dave Brolley * typeck.c (build_chill_slice): Adjust slice index to account for the lower bound of the array. * actions.c (chill_expand_assignment): Convert function arguments to the correct types. (chill_expand_assignment): Ditto. Mon May 11 16:20:57 1998 Dave Brolley * typeck.c (build_chill_slice): Propogate the TYPE_PACKED setting of the array_type to the slice_type. (build_chill_slice): Use SLICE_EXPR to represent a slice of an array of bits. * loop.c (build_loop_iterator): Disallow location enumeration for bit-packed arrays. * convert.c (digest_array_tuple): Allow conversion of an array tuple to a bitstring for assignment to a packed array of bits. Mon May 4 16:28:58 1998 Dave Brolley * ch-tree.def (PACKED_ARRAY_REF): New tree code. * typeck.c (build_chill_array_ref_1): Build PACKED_ARRAY_REF if array is packed. (chill_location): Handle PACKED_ARRAY_REF. (apply_chill_array_layout): Allow PACK for arrays of single bits. * expr.c (chill_expand_expr): Expand PACKED_ARRAY_REF. (invalid_operand): Check PACKED_ARRAY_REF operands. * actions.c (chill_expand_assignment): Expand PACKED_ARRAY_REF. Thu Apr 23 15:33:20 1998 Dave Brolley * typeck.c (apply_chill_field_layout): Only integral fields can be packed to the bit level. Tue Apr 21 14:30:10 1998 Jeffrey A Law (law@cygnus.com) * decl.c (intTI_type_node, unsigned_intTI_type_node): Define. (init_decl_processing): Handle TI types. * typeck.c (intTI_type_node, unsigned_intTI_type_node): Declare. (type_for_size): Handle TI types. (type_for_mode): Handle TI types. Mon Apr 20 13:12:26 1998 Dave Brolley * typeck.c (layout_chill_struct_type): Don't promote bitfield types to int. * actions.c (chill_convert_for_assignment): Check that the rhs is not a type declaration. Tue Apr 14 13:17:44 1998 Dave Brolley * lex.c (init_parse): Now returns char* containing the filename. * typeck.c (get_type_precision): Declare. (apply_chill_field_layout): Use the minimum number of bits necessary to represent discrete types as the natural length of the field. Thu Apr 9 12:46:55 1998 Dave Brolley * lex.c (finput): Move definition here from toplev.c (init_parse): New function replaces init_lex. (init_parse): Add code to open source file. (finish_parse): New function. (close_input_file): File was being closed more than once. * lang.c (finput): Declare. * ch-tree.h (init_lex): Remove. Wed Apr 8 14:47:33 1998 Dave Brolley * actions.c (compute_else_range): Fix loop index error. (chill_handle_multi_case_label_range): Move error checking to chill_handle_multi_case_label. (chill_handle_multi_case_else_label): Convert ELSE range values to the type of the corrersponding CASE selector. Wed Apr 8 13:02:50 1998 Jeffrey A Law (law@cygnus.com) * actions.c (sizetype_tab): Do not declare. * lang.c (lang_print_xnode): New function. Mon Mar 23 14:43:06 1998 Dave Brolley * grant.c (decode_layout): New function. (grant_array_type): Call decode_layout to export layout information to the grant file. (decode_decl): Ditto Fri Mar 20 16:06:41 1998 Dave Brolley * parse.c (parse_tuple_element): Call had arguments in wrong order. Thu Mar 19 13:42:33 1998 Dave Brolley * typeck.c (apply_chill_array_layout): Use TYPE_PRECISION (chill_integer_type_node) in stead of BITS_PER_WORD for the word size. Wed Mar 18 16:25:48 1998 Dave Brolley * typeck.c (apply_chill_field_layout): Only set DECL_BIT_FIELD for discrete fields. * parse.c (parse_multi_dimension_case_action): Call emit_line_note at the proper places. Tue Mar 17 14:16:08 1998 Dave Brolley * parse.c (gen_label_rtx): Declare before use. (emit_jump): Declare before use. (emit_label): Declare before use. (parse_case_label_list): Pass in CASE selector so we can mark it as having an (ELSE) label if necessary. (parse_case_label_specification): Pass in the CASE selector list so that the CASE selectors can be passed to parse_case_label_list. (parse_multi_dimension_case_action): Modify to generate branching code in one pass. (parse_case_expression): Compute (ELSE) range before generating CASE expression. (parse_variant_alternative): Remove error for (ELSE) specified. * expr.c (check_case_selector_list): Preserve TREE_PURPOSE of selector list. * decl.c (layout_chill_variants): Add code to check compatibility of ranges and discrete mode names. * ch-tree.h (ELSE_LABEL_SPECIFIED): New Chill specific flag. * actions.h (build_multi_case_selector_expression): Make it extern. (chill_handle_multi_dimension_case_label): Remove. (compute_else_ranges): New function. * actions.c (update_else_range_for_int_const): New function. (update_else_range_for_range): New function. (update_else_range_for_range_expr): New function. (update_else_range_for_type): New function. (compute_else_range): New function. (compute_else_ranges): New function. (chill_handle_multi_case_else_label): New function (chill_handle_multi_case_label_range): Don't generate tests for conditions which are always true or false. (chill_handle_multi_case_label): Ditto. (chill_handle_multi_case_label): Implement (ELSE) label support. (chill_handle_multi_case_label): First argument is now the selector tree not its VALUE. (chill_handle_multi_dimension_case_label): Removed. (build_chill_multi_dimension_case_expr): List of CASE alternatives is no longer reversed on entry, so reverse it here. Tue Mar 10 15:02:26 1998 Dave Brolley * actions.c (chill_handle_multi_case_label_range): Add more error checking. (chill_handle_multi_case_label): Implement (*) for multi dimensional CASE. (chill_handle_multi_case_label): Improve Error handling. Mon Mar 9 12:39:00 1998 Dave Brolley * actions.c (chill_handle_multi_case_label_range): Added. (chill_handle_multi_case_label): Add support for discrete ranges and discrete modes. * typeck.c (apply_chill_array_layout): Added more error checking. (apply_chill_field_layout): Added more error checking. Wed Mar 4 16:08:26 1998 Dave Brolley * convert.c (convert): Call build_simple_array_type with new argument. * ch-tree.h(build_simple_array_type): Add argument for array layout. * typeck.c (build_chill_slice): Call build_simple_array_type with new argument. (build_simple_array_type): Attach array layout to TYPE_ATTRIBUTES. (apply_chill_array_layout): New function to implement array layout. (layout_chill_array_type): Call apply_chill_array_layout and reset TYPE_ATTRIBUTES to NULL_TREE. (build_chill_array_type): Extend to handle one array layout per index mode. (smash_dummy_type): Call build_simple_array_type with new argument. * satisfy.c (satisfy): Call SATISFY on array layout tree. Wed Feb 25 14:36:41 1998 Dave Brolley * typeck.c (next_struct_offset): Added. (apply_chill_field_layout): New function to check and apply PACK, NOPACK, or POS layout to a structure field. (layout_chill_struct_type): Add call to apply_chill_field_layout. * satisfy.c (satisfy): Call satisfy recursively to handle the expressions in the field layout tree. * parse.c (pack_warn_printed): Remove. (nopack_warn_printed): Remove. (step_warn_printed): Remove. (pos_warn_printed): Remove. (parse_opt_layout): Remove warnings about POS, STEP, PACK and NOPACK usage. * decl.c (grok_chill_fixedfields): Check for POS specified for a list of field declarations. Thu Feb 19 17:33:06 1998 Dave Brolley * parse.c (parse_opt_layout): Generate syntax errors in pass 1 only. (parse_opt_mode): Removed incorrect comment about association of array layouts with nested array elements. (parse_opt_mode): Allow for one layout per index mode specified. Wed Feb 18 23:48:57 1998 Richard Henderson * Make-lang.in (cc1chill): Kill lingering bc-opcode.h dependancy. Wed Feb 18 17:35:05 1998 Dave Brolley * parse.c (parse_field): Get rid of warning for multiple case selectors. * decl.c (layout_chill_variants): Fix loop indexing error. Mon Feb 16 15:54:47 1998 Dave Brolley * parse.c (parse_case_expression): Remove code which checked for unimplemented (ELSE) label. (parse_case_expression): Add code to handle multi dimensional case expression. * expr.c (check_case_selector_list): Fixed to return a list of the selectors which were checked. (chill_expand_case_expr): Remove "sorry" message for multi dimension case. (chill_expand_case_expr): Reverse order of case alternatives. (chill_expand_case_expr): Add "error" message for multiple case selectors. * actions.h (build_chill_multi_dimension_case_expr): Added. * actions.c (build_multi_case_selector_expression): Renamed from build_multi_case_expression. (chill_handle_multi_dimension_case_label): Call above function by its new name. (build_chill_case_expr): Don't reverse the list elements here. It may not be necessary. (build_chill_multi_dimension_case_expr): New function implements multi dimensional case expression. Thu Feb 12 15:44:50 1998 Dave Brolley * parse.c (parse_case_action): Implement multi-dimension CASE action. (parse_multi_dimension_case_action): Added. (parse_single_dimension_case_action): Added based on code moved from parse_case_action. * expr.c (check_case_selector_list): Added. * ch-tree.h (check_case_selector_list): Added. * actions.h (chill_handle_single_dimension_case_label): Added. (chill_handle_multi_dimension_case_label): Added. * actions.c (chill_handle_single_dimension_case_label): Added. (chill_handle_multi_case_label): Added. (chill_handle_multi_case_label_list): Added. (build_multi_case_expression): Added. (chill_handle_multi_dimension_case_label): Added Fri Feb 6 16:43:41 1998 Dave Brolley * actions.c (sizetype_tab): Fix declaration to match gcc changes. Thu Feb 5 14:03:00 1998 Dave Brolley * decl.c (chill_tree_code_type): Change this to be an array of char like the tree_code_type in the rest of gcc. * ch-tree.def (chill_tree_code_type): See decl.c. Thu Jan 29 15:34:18 1998 Dave Brolley * tasking.c (error_with_decl): Correct prototype. (build_gen_ptype): Reverse arguments. * lang.c (chill_real_input_filename): Add definition. (chill_print_error_function): Correct second argument. (lang_init): Set chill_real_input_filename. * expr.c (NULL): Protect definition with #ifndef. * decl.c (init_decl_processing): Don't allocate chill_tree_code_... (init_decl_processing): Change last argument to 'sizeof(char)'. Tue Nov 25 10:44:19 1997 Nick Clifton * Make-lang.in (mostlyclean): Use && to separate commands, so that if the directory change fails, the rule will not loop. Mon Mar 3 12:08:19 1997 Fred Fish * Make-lang.in (CHILL_FLAGS_TO_PASS): Remove extraneous leading spaces and use single tab character on some lines. (cc1chill): Ditto. Tue Nov 26 05:12:40 1996 Wilfried Moser * tasking.c (build_receive_buffer_case_label): Rework in a manner, that the buffer location gets evaluated only once, in build_receive_buffer_case_end. * typeck.c (build_chill_bin_type): Rework. (layout_chill_range_type): Process BIN mode. (build_chill_array_type): Remove checking of layout. This is done at the parse. * parse.c (parse_on_exception_list): Don't allow ON name:. (parse_opt_layout): Parse POS and STEP and return a tree instead of int. * lex.c (init_lex), lex.h: Define and initialise RID_BIN. * grant.c (print_integer_type): Take care of BIN. * expr.c (build_chill_descr): Make descr static if requested location is static. (build_chill_length): Process text mode name and text location as described in Z.200/1992. (build_compare_expr): Don't allow < <= > >= for composite modes. * decl.c (grok_chill_fixedfields): Remove checking of layout. This is done at the parser. * convert.c (digest_structure_tuple): Take care of wrong (probably array) tuple. Printing error may cause sigsegv. * ch-tree.h: Change prototypes of grok_chill_fixedfields and build_chill_array_type (layout is passed now as a tree instead of int). Fri Nov 15 15:17:44 1996 Per Bothner * convert.c (display_int_cst): Check that val is INTEGER_CST. (digest_array_tuple): Some extra error checks (i.e. that indexes are constant). If dynamic mode, result is not constant. Mon Oct 28 12:48:06 1996 Jeffrey A Law (law@cygnus.com) * typeck.c (signed_or_unsigned_type): If the given type already as the correct signedness, then just return it. * typeck.c ({un,}signed_type): If can't do anything, call signed_or_unsigned_type. Fri Sep 6 02:50:08 1996 Wilfried Moser * typeck.c (build_chill_cast): In case of rangecheck, take care of constant expression (when defining a SYN). Thu Sep 5 04:30:32 1996 Wilfried Moser * parse.c (define__PROCNAME__): New function to define a SYNONYM __PROCNAME__ (__procname__) which is a character string containing the name of the current procedure. This is quit the same as __FUNCTION__ in C. (parse_proc_body): Add call to define__PROCNAME__. * typeck.c (chill_equivalent): Take care of NEWMODE'd procedure modes on one side and procedures on the other side.. Wed Jul 24 01:13:51 1996 Wilfried Moser * typeck.c: Replace all local variables and arguments named `index' with `idx', `index' gets replaced by `strchr' which makes debugging somehow difficult. (valid_array_index_p): New argument to indicate that we are processing LENGTH (varying string) on the lefthand side of an assignment. The index check is different in this case. (build_chill_cast): In case of expression conversion do an OVERFLOW check with the limits of the target mode. * ch-tree.h: New prototype for valid_array_index_p. * actions.c (expand_varying_length_assignment): Add new argument to call to valid_array_index_p to indicate we are processing LENGTH on the lefthand side of an assignment. * loop.c: Rename loop_stack to loopstack to avoid clashes with global variable ../stmt.c:loop_stack. Tue Jun 18 23:04:06 1996 Per Bothner * expr.c (resolve_component_ref): Set TREE_SIDE_EFFECTS properly. Mon Jun 10 15:01:51 1996 Per Bothner * typeck.c (build_chill_reference_type): Copy novelty for reference. * satisfy.c (satisfy): If REFERENCE_TYPE, copy novelty. Thu May 30 04:55:27 1996 Wilfried Moser * typeck.c (valid_array_index_p): For varying character strings we must check if the index is less then the actual length instead of less equal. Wed May 15 06:07:10 1996 Wilfried Moser * ch-tree.h: Add prototype for test_range. * inout.c (process_io_list): Fix duplicate function call if writetext argument is a function returning a varying string. Tue May 14 21:08:47 1996 Per Bothner Re-do string comparisons. Old way could re-use temporary (SAVE_EXPR created for an argumnet is variable) prematurely. * ch-tree.def (STRING_EQ_EXPR, STRING_LT_EXPR): New codes. * decl.c (init_decl_processing): Remove __eqstring, __gestring, __gtstring, __lestring, __ltstring, __nestring declarations. * expr.c (build_char_array_expr): Rename to build_compare_string_expr. Create STRING_EQ_EXPR, STRING_LT_EXPR nodes, instead of CALL_EXPRs. (chill_expand_expr): Implement STRING_EQ_EXPR, STRING_LT_EXPR. (build_compare_expr): Use new build_char_array_expr name. Mon Apr 8 14:08:30 1996 Per Bothner Cleanup of April 5 fix: * actions.c (test_range): New function. (check_range): Simplify to use test_range. * convert.c (digest_powerset_tuple): Move error message from here ... (check_ps_range): ... to here. Also, simplify to use test_range. Fri Apr 5 03:41:05 1996 Wilfried Moser * convert.c (check_ps_range): New function to perform range check of powerset tuple elements. This is quite the same as check_range, however, the actions on rangefail are different. (digest_powerset_tuple): Call check_ps_range. * loop.c (build_loop_iterator): Chaeck if location enumeration is requested for BOOLS(n) and print an error message. Wed Mar 6 17:46:48 1996 Per Bothner * parse.c (parse_primval): Emit error if !ignore (before: pass==2). Implement parameterised array and string modes (using LANG_TYPE). * parse.c (parse_opt_mode): Handle parameterized arrays and strings. * grant.c (decode_mode): Support extended use of LANG_TYPE. * satisfy.c (cycle_error_print): Ignore non-decls in chain. (safe_satisfy_decl): No error if non-decl (pointer type) in cycle. (satisfy): Return immediately if laid out non-pointer type. (satisfy case LANG_TYPE): Handle paramertised mode. (satisfy case POINTER_TYPE/REFERENCE_TYPE): Push type on chain; return immediately if already in chain. * typeck.c (smash_dummy_type): Handle parameterized modes and CHAR(N). Change return type (can now return error_mark_node). (build_readonly_type): Return return value from smash_dummy_type. * ch-tree.h: Change smash_dummy_type return type. Tue Mar 5 22:31:20 1996 Per Bothner * typeck.c (build_chill_slice): Re-do index_type calculation. * typeck.c (layout_chill_range_type): Use compare_int_csts rather than tree_int_cst_lt to avoid signed/unsigned problems. * typeck.c (copy_novelty): Use copy_node rather than build_type_node. * typeck.c (smash_dummy_type): Use copy_novelty for NEWMODE of range. * decl.c (init_decl_processing): More portable sizetype initialization. * tree.c (build_string_type): Generalize to also create bitstrings. Return error_mark_node if an argument is an ERROR_MARK. (build_bitstring_type): Simplify - just call build_string_type. Tue Mar 5 03:48:32 1996 Wilfried Moser * actions.c (warn_unhandled): Add missing assignment. * loop.c (build_loop_iterator): In case of IN, check if expression has a mode, otherwise make an error. Mon Mar 4 23:12:03 1996 Per Bothner * convert.c (digest_powerset_tuple): Check tuple elements for compatibility; if compatible, call convert. Thu Feb 29 23:39:54 1996 Per Bothner Simplify NOVELTY representation. * ch-tree.h (CH_NOVELTY): Re-implement as plain TYPE_CONTEXT. (CH_NOVELTY_FLAG): Removed. (Just use CH_NOVELTY.) * decl.c (push_modedef): Make copy even for SYNMODE. but not for internal typedefs (indicated by make_newmode==-1). * tasking.c: Call push_modedef with make_newmode==-1. * typeck.c (chill_novelty): Remove. (smash_dummy_type): Removed unused event/buffer stuff. Update. * grant.c (decode_decl), inout.c (build_io_types), expr.c (build_concat_expr), typeck.c (build_chill_slice, copy_novelty), tasking.c (build_instance_type): Simplify using new CH_NOVELTY. Solidify READ mode handling. * decl.c (do_decl, push_syndecl, start_chill_function): Possibly set TREE_READONLY for a VAR_DECL, CONST_DECL, or PARM_DECL. * typeck.c (build_chill_slice): Set TREE_READONLY appropriately. (build_chill_array_ref_1, build_chill_bitref): Likewise. (build_chill_cast): Set TREE_READONLY depending on result type (only). * convert (convert_from_reference, convert): Likewise. * expr.c (resolve_component_ref): Set TREE_READONLY appropriately. (build_chill_function_call): Error if OUT/INOUT arg is TREE_READONLY. * actions.c (chill_expand_assignment): Also error if TREE_READONLY. Use convert_from_reference. Thu Feb 29 11:14:09 1996 Per Bothner * parse.c (parse_do_action): DO WITH expressions are evaluated in outer scope. Also call save_if_needed. * decl.c (shadow_record_fields); Fix and simplify. Tue Feb 27 22:19:40 1996 Per Bothner * convert.c (display_int_cst): Gereralize to wider range of ints. Thu Feb 22 06:12:59 1996 Wilfried Moser * convert.c (digest_array_tuple): Take care of type == error_mark_node. * decl.c (do_decl): In case of chill_varying_type_p, check if type of fixed part is error mark and do nothing in this case. * lex.c (convert_bitstring): Don't complain when length of bitstring is 0 (BOOLS(0) is a valid mode). * tree.c (layout_powerset_type): Add check for TYPE_MAX/MIN_VALUE (domain) is error mark. * typeck.c (layout_chill_range_type): If lowvalue or highvalue == error_mark_node, just return. Tue Feb 20 00:01:10 1996 Wilfried Moser * parse.c (parse_variant_alternative): When checking for ELSE take care of tagless variants. Mon Feb 19 05:54:45 1996 Wilfried Moser * parse.c (parse_case_action): Check if ELSE was specified in a case label list (this is only valid for array tuples). (parse_case_expression): Deto. (parse_variant_alternative): Deto. Tue Feb 13 17:08:16 1996 Per Bothner * typeck.c (chill_location): Cleanup. Neither SLICE_EXPR nor BIT_FIELD_REF are referable, even if their base strings are. Fri Feb 9 02:25:33 1996 Wilfried Moser * actions.c (chill_expand_result): Do CH_FUNCTION_SETS_RESULT after checking the expression. * convert.c (convert): Set TREE_CONSTANT when taking the address of a function. * decl.c (start_chill_function): Check if the mode is really a mode to avoid subsequent segfaults. * typeck.c (string_assignment_condition): Add checking of bitstring length. Thu Feb 8 01:37:59 1996 Wilfried Moser * actions.c (build_cause_exception): Print warning of unhandled exception only once for each exception. Mon Feb 5 22:17:13 1996 Per Bothner * tree.c (discrete_count), ch-tree.h: New function. * expr.c (build_concate_expr, build_chill_repetition_op, chill_expand_expr): Use discrete_count; make sure arguments to size_binop are sizetype. (powersetlen): Trvialize using discrete_count. * inout.c (process_io_list): Use new assign_temp function. * inout.c (build_enum_tables): Avoid taking address of array_ref, which sometimes gets optimized to a constant. * expr.c (finish_chill_unary_op): Call convert_to_class on argument. Remove some obsolete TREE_UNSIGNED stuff. * lex.c (convert_integer): Removed more TREE_UNSIGNED stuff. Thu Feb 1 15:11:20 1996 Doug Evans * lex.c (check_newline): Return result of HANDLE_PRAGMA. Wed Jan 31 17:13:25 1996 Per Bothner * decl.c (char_array_type_node, wchar_array_type_node): Removed. (init_decl_processing): Remove array_domain_type; don't set char_array_type_node or wchar_array_type_node. * decl.c (init_decl_processing): Use fixup_unsigned_type to simplify code to create boolean_type_node and char_type_node. Mon Jan 29 14:20:10 1996 Doug Evans * lex.c (check_newline): Pass character after `#pragma' to HANDLE_PRAGMA. Don't call get_directive_line if at end of line. Fri Jan 26 05:56:27 1996 Wilfried Moser * expr.c (build_chill_function_call): Add check and error for actual argument is a TYPE_DECL. * parse.c (parse_set_mode): Print a warning if the set mode contains numbered and unnumbered set elements. Wed Jan 24 05:10:08 1996 Wilfried Moser * Make-lang.in: Change GNUCHILL_VERSION to 1.5.2. * decl.c (layout_enum): Add check for negative values if enum is numbered and duplicate values in an enum. Mon Jan 15 06:21:52 1996 Wilfried Moser * actions.c (chill_expand_assignment): Add check for lefthand side of an assignment is a location. * ch-tree.def: Name of SET_IN_EXPR is really "set_in_expr" and not "concat_expr". * expr.c (is_really_instance): New function to check if a datum is really an instance. CH_IS_INSTANCE_MODE seems to be to weak for this case. (build_chill_component_ref): call is_really_instance. Wed Jan 10 13:47:14 1996 Per Bothner * ch-tree.h (TYPE_ARRAY_MAX_SIZE): Removed; now in ../tree.h. Mon Jan 8 15:29:20 1996 Per Bothner * expr.c (build_char_array_expr): Add save_if_needed's if varying. Also, remove unused len0 and len1. Mon Dec 11 17:36:44 1995 Per Bothner * inout.c (build_chill_associate, assoc_call, build_chill_readrecord, build_chill_getassociation, build_chill_getusage, build_chill_gettextrecord, build_chill_gettextaccess: Simplify - modify TREE_TYPE of CALL_EXPR, instead of building a CONVERT_EXPR. * parse.c (parse_action): Minor simplification. Thu Dec 7 00:02:47 1995 Wilfried Moser * parse.c (parse_action): In case of CALL, do a check if there is really a function call. Tue Dec 5 05:06:02 1995 Wilfried Moser * convert.c (display_int_cst): Fix printing of control sequence. Thu Nov 30 21:07:57 1995 Per Bothner * grant.c (decode_constant, decode_constant_selective): Make work for REAL_IS_NOT_DOUBLE case. * decl.c (CHILL_INT_IS_SHORT): New macro. (init_decl_processing): Use CHILL_INT_IS_SHORT. Change name of integer_type_node from _cint to long. Mon Nov 27 17:07:05 1995 Per Bothner * loop.c (top_loop_end_check): Check while condition *after* getting next powerset element. Mon Nov 27 05:29:52 1995 Wilfried Moser * parse.c (parse_receive_case_action): Fix typo in error message. * convert.c (display_int_cst): Format characters like strings in grant.c(decode_constant). * grant.c: Remove the old forbid stuff. * lex.c (readstring): Fix reading of '^^'. * parse.c (parse_procedure_mode): nreverse param_types. Thu Nov 23 05:39:57 1995 Wilfried Moser * actions.c (chill_expand_assignment): Check for assigning to location with non-value mode. * ch-tree.h: New macro CH_TYPE_NONVALUE_P. Add new and change some prototypes. * decl.c (init_nonvalue_struct): New function to generate initialisation code for non-value structs. (init_nonvalue_array): New function to generate initialisation code for non-value array's. (do_decl): Call one of the above mentioned functions in case we have a mode with the non-value property. (start_chill_function): Print error message if a non-value mode gets returned without LOC and check for arguments of non-value modes only gets passed by LOC. * grant.c (print_proc_tail): Fix for procedure returning LOC. * inout.c (build_io_types): Set CH_TYPE__NONVALUE_P on association_type_node. (invalidate_access_recordmode): New function to set the record mode of an ACCESS to error_mark_node in case of record mode has the non-value property. (build_text_mode): Set CH_TYPE_NONNVALUE_P. (build_access_mode, build_chill_gettextaccess): Deto. (check_exprlist): Correct processing of repetition factor. * lex.c (readstring): Correct processing of control sequences of the form '^([H | D | O | B]'xx)'. * loop.c: Cleanup iterator handling (done by Per). (nonvalue_begin_loop_scope, nonvalue_end_loop_scope): New functions for starting and ending a loop scope in case of initialising an array with non-value property. * parse.c (check_end_label): Remove '\n' from error message. (parse_loc_declaration): Print error in case of loc-identity declaration without initialisation or with keyword INIT. (parse_do_action): Clean up iterator handling (done by Per). * satisfy.c (safe_satisfy_decl (case TYPE_DECL)): Print an error message in case of TYPE_DECL is a signal and the mode has the non-value property. (satisfy (case ARRAY_TYPE)): Set CH_TYPE_NONVALUE_P of the the array type if the array element mode has the non-value property. (satisfy case RECORD_TYPE)): Set CH_NONVALUE_P on the record type if one of the fields have the non-value property. If the record is a buffer mode and the element mode of the buffer has the non-value-p., invalidate it (see tasking.c (invalidate_buffer_element_mode). Same for access modes. * tasking.c (build_signal_descriptor): If the signal type have the non-value property, do nothing. (build_receive_signal_case_label): Don't do an assignment if the signal type have the non-value property. (build_receive_buffer_case_label): Add check for buffer element mode is ERROR_MARK. (expand_send_buffer): Deto. (build_buffer_type): Set CH_TYPE_NONVALUE_P on buffer mode. (invalidate_buffer_element_mode): New function to set type of buffer element mode to error_mark_node. (build_event_type): Set CH_TYPE_NONVALUE_P on event mode. Wed Nov 15 13:26:20 1995 Jeffrey A Law (law@cygnus.com) * inout.c (intsize_of_charsexpr): Move declaration to top of file to avoid error from solaris2.5 cc. Thu Nov 9 02:50:40 1995 Wilfried Moser * satisfy.c (satisfy): For a RECORD_TYPE, which is an ACCESS or TEXT mode, temporarily reset maximum_field_alignment to 0 before layouting it to be compatible with the runtime library. * inout.c (build_chill_gettextaccess): Deto. Mon Nov 6 04:12:06 1995 Wilfried Moser * decl.c (do_decl): If type is READonly, add check if an ASSOCIATION, ACCESS, TEXT, BUFFER, or EVENT will be declared and print an error if this is true. Variables of this modes may not be declared READonly. Add check for mode is one of the above and an init value was given. This is also not allowed. Add initialisation of variables of the above modes during runtime. This influence the mechanism for detecting to build a constructor. (push_modedef): NEW- or SYNMODES of ASSOCIATION, ACCESS, TEXT, BUFFER, and EVENT mode must not be READonly. (start_chill_function): Arguments of modes ASSOCIATION, ACCESS, TEXT, BUFFER, or EVENT may be passed only by LOC. Add this check. (declare_predefined_file): Move to inout.c. (init_decl_processing): Add definitions for new built-in's. (finish_outer_function): Build a constructor only if build_constructor is set. * except.c: On Linux native, setjmp is __setjmp. * expr.c (build_chill_component_ref): New function. It gets called from parse.c instead of build_component_ref. Functions checks if the user tries to access a field of an ACCESS, ASSOCIATION, BUFFER, EVENT, INSTANCE, or TEXT mode, which actually is not allowed. (build_chill_floatcall): New function to resolve CHILL's floating point builtin calls (SIN, COS, TAN, etc.). (build_allocate_getstack, build_chill_allocate, build_chill_getstack, build_chill_terminate): New functions to resolve CHILL's ALLOCATE, GETSTACK, and TERMINATE built-in's. (build_generalized_call): Process new built-in's. * grant.c (decode_mode): Add processing of ACCESS and TEXT modes. (decode_mode_selective): deto. * inout.c: Completely rewritten for implementing Chapter 7 of Z.200 (input and output). * lex.c (yylex): An '_' after a '.' doesn't mean, that we are parsing numbers. * lex.h (enum rid): Add RID_ASSOCIATION. * parse.c: New flag build_constructor to indicate if a constructor should be generated at the end of compilation or not. See decl.c(do_decl). (parse_begin_end_block): Don't emit a line note. (parse_primval): Call build_chill_component_ref instead of build_component_ref. (parse_opt_mode): Process ACCESS modes, ASSOCIATION modes, TEXT modes, USAGE modes, WHERE modes. * satisfy.c (safe_satisfy_decl): Check if a SYN is of mode ASSOCIATION, ACCESS, TEXT, BUFFER, or EVENT and print an error in this case. (satisfy (case RECORD_TYPE)): If exp is TEXT mode, check the text length. * typeck.c (extract_constant_from_buffer): Fix thinko in case of ! BYTES_BIG_ENDIAN. (build_chill_cast): Implement representation conversion between INT's and REAL's. (chill_similar): Add check of ACCESSes. (layout_chill_range_type): Check for real ranges and print sorry message. * Make-lang.in: Change compiler version. chill also depends on Makefile. * chill.in: Process command line option -Xlinker like -Tdata. * ch-tree.h: New macros CH_IS_ASSOCIATION_MODE, CH_IS_ACCESS_MODE, CH_IS_USAGE_MODE, CH_IS_WHERE_MODE, and CH_IS_TEXT_MODE. Add some prototypes. (enum chill_built_in_function): Add BUILT_IN_ARCCOS, BUILT_IN_ARCSIN, BUILT_IN_CH_DELETE, BUILT_IN_LOG, BUILT_IN_SQRT. Remove BUILT_IN_READLEN, BUILT_IN_ROUND, BUILT_IN_SKIPRECORD. * gperf, hash.h: Remove definition of WHERE. Thu Oct 5 06:22:19 1995 Wilfried Moser * grant.c (decode_constant_selective): Add some newlines to generated SPEC MODULE. Wed Oct 4 18:16:44 1995 Per Bothner * decl.c (pop_chill_function_context): Remove some bogosity. Wed Oct 4 05:14:00 1995 Wilfried Moser * grant.c (print_integer_selective): In case of a RANGE of a SET mode, try to find and grant the parent mode. (grant_seized_identifier): Dont write it out, if the identifier doesn't have a seize file (it may come from a SPEC MODULE defined in the compilation unit). Fri Sep 22 14:04:40 1995 Per Bothner * actions.c (check_non_null): Wrap expr in SAVE_EXPR if needed. Wed Sep 20 13:51:54 1995 Per Bothner * expr.c (force_addr_of): Optimize an INDIRECT_REF using convert_to_pointer rather than convert (which in case of a REFERENCE_TYPE would losingly call convert_from_reference). Wed Sep 20 04:03:58 1995 Wilfried Moser * inout.c (build_chill_writetext): In case of character string: Add processing of a concatenation including varying character strings. (intsize_of_charsexpr, get_max_size): New functions to determine the maximum size of varying character strings. * grant.c (decode_constant, decode_constant_selective): Add processing of COMPONENT_REF. * satisfy.c (satisfy (case COMPONENT_REF)): Correct handling for SYNONYM's with STRUCT mode. Mon Sep 18 17:25:11 1995 Per Bothner * expr.c (force_addr_of): Optimize of value is INDIRECT_REF. * typeck.c (build_chill_slice): Call mark_addressable. Mon Sep 18 14:38:15 1995 Per Bothner * expr.c (chill_expand_expr): Make a copy before calling __psslice if the array is neither referable nor BLKmode. (build_set_expr): Renamed to ... (build_compare_set_expr): Allow one opperand to be boolean. (build_compare_expr): Check both operands for SET_EXPR, before checking for discrete types (for -fold-strings). Fri Sep 15 11:35:43 1995 Per Bothner * satisfy.c (safe_satisfy_decl): For a CONST_DECL, set TREE_TYPE to error_mark_node or error. Fri Sep 15 00:26:02 1995 Wilfried Moser * grant.c (decode_constant_selective): Add processing of TREE_OPERAND (val, 0). Wed Sep 13 14:24:12 1995 Per Bothner * ch-tree.h (CH_IS_INSTANCE_MODE): Redefine to use CH_SIMILAR. * convert.c (convert): Use CH_IS_INSTANCE_MODE. * inout.c (build_chill_writetext): Likewise. * tasking.c (build_receive_case_start, build_delay_case_start): Ditto. * parse.c (parse_start_action): Remove redundant tests. * tasking.c (build_start_process): Also test that optset is instance. (build_copy_number, build_proc_type, expand_send_signal): Use CH_IS_INSTANCE_MODE, not CH_COMPATIBLE. * actions.c, convert.c (instance_type_node): Remove redundant extern declaration. Wed Sep 13 14:19:37 1995 Per Bothner * regression.awk2: Use \ line-continuation-markers to remove gratuitous gawk dependency. Mon Sep 11 17:26:53 1995 Per Bothner * typeck.c (build_chill_modify_expr): Use force_addr_of. (mark_addressable): Handle INDIRECT_REF of ADDR_EXPR. * typeck.c (check_case_value), ch-tree.h: Moved to ... * actions.c (check_case_value): ... here. Also check for compatibility with selector (which is passed as extra argument). (chill_handle_case_label_range): Take selector argument, and use it to call check_case_value. (chill_handle_case_label): Take extra selector argument. * ch-tree.h (chill_handle_case_labe): Add prototype. * except.c expr.c, parse.c: Remove chill_handle_case_label prototypes. * actions.c, except.c, expr.c, parse.c: Pass extra selector argument to function calls as needed. Mon Aug 28 02:47:54 1995 Wilfried Moser * grant.c (decode_constant_selective): Fix a bug in writing items to grant file. Thu Aug 24 04:52:28 1995 Wilfried Moser * parse.c (parse_case_expression): Print warning only in pass 1. * actions.c (print_missing_cases): Correct printing of character ranges. Wed Aug 23 15:26:12 1995 Per Bothner * parse.c (parse_case_label_list): Take extra parameter to indicate if we're parsing a tuple or a case-label-spec. If former, don't allow '(' EXPR ')' ',' but backup instead. (parse_case_label_specification, parse_tuple_element): Pass appropriate new argument to parse_case_label_list. Wed Aug 23 06:08:28 1995 Wilfried Moser * inout.c (build_chill_readtext): Add processing of BOOL's and CHARS(n). * grant.c (decode_constant): Process nonprintable characters in a STRING_CST. Fri Aug 11 15:26:13 1995 Per Bothner * except.c (initialize_exceptions): Name setjmp "setjmp" and not "__builtin_setjmp" (which is not recognized by expand_call). Wed Aug 9 23:35:36 1995 Per Bothner * loop.c (end_loop_scope): Need to call kept_level_p, in argument to poplevel. Wed Aug 9 05:48:30 1995 Wilfried Moser * Make-lang.in (CHILL.install-common): Don't install chill-cross (this file might be empty). Install chill.install instead. Tue Aug 8 21:46:30 1995 Per Bothner * loop.c (end_loop_scope): Do poplevel *after* expand_end_bindings. Tue Aug 8 00:51:09 1995 Wilfried Moser * tasking.c (build_process_header): Also set DECL_ASSEMBLER_NAME of PARAM_DECL, since otherwise dbxout_symbol_name may barf. * decl.c (start_chill_function): Likewise ... Mon Aug 7 18:35:35 1995 Per Bothner * tasking.c (build_process_wrapper): Also set DECL_ASSEMBLER_NAME of PARM_DECL, since otherwise dbxout_symbol_name may barf. Mon Jul 31 14:32:33 1995 Per Bothner * loop.c: Re-written implementation of powerset iteration. (declare_temps): iter_var is now integer index into bitstring, and powerset_temp just uses save_expr (normally needs no temp). (top_loop_end_check): Pass index to start searching (from iter_var) to library function, instead of dependning on latter to clear old bits. (increment_temps): UNless DOWN, increment iter_var. * decl.c (init_decl_processing): Declare new types for __ffsetclrpowerset and __flsetclrpowerset (now misnamed...). Mon Jul 31 12:47:28 1995 Per Bothner * convert.c (digest_array_tuple): Set TREE_STATIC if possible. Fri Jul 28 05:11:56 1995 Wilfried Moser * lex.c (readstring): Process integer literals starting with H', D', or B' within a control sequence. Thu Jul 27 23:08:51 1995 Per Bothner * parse.c (parse_do_action): Don't call push_action, but defer push_handler until begin_loop_scope. Call parse_opt_handler here, to move handler scope inside loop block. (parse_action): After do_action, nothing to do now. * loop.c (begin_loop_scope): Also call push_handler here. (declare_temps): Copy derived flag to user_var. (declare_temps): For POWERSET, always copy to temporary (even if constant), since the runtime clears bits from it. * expr.c (build_chill_sizeof): Use convert_to_class. * satisfy.c (safe_satisfy_decl): Cleanup handling of CONST_DECL - set proper value of CH_DECL_FLAG on both the decl and its value. * convert.c (digest_array_tuple); Slightly better errors. Wed Jul 26 22:13:39 1995 Per Bothner * expr.c (expand_packed_set): Also allocate the CONSTRUCTOR itself. (fold_set_expr): Simplify accordingly. (build_concat_expr): Constant fold bitstring CONCAT_EXPRs. Thu Jul 13 12:21:22 1995 Per Bothner * typeck.c (build_chill_slice): Use build1 instead of build. * typeck.c (xtract_constant_from_buffer): Pass correct precision to lshift_double. * typeck.c (expand_constant_to_buffer): Handle RANGE_EXPR index. * convert.c (digest_array_tuple): Generate RANGE_EXPR as index for tuples with ranges. Thu Jun 29 23:41:15 1995 Per Bothner * typeck.c (build_chill_slice): Re-implement to use casts instead of build_chill_array_ref_1 (which doesn't always work). * convert.c (convert): Remove old bugs code. Tue Jun 27 05:00:04 1995 Wilfried Moser * parse.c (parse_if_action): Do PUSH_ACTION before parsing the expression so that a possible handler at the if action will be found. (parse_proc_body): New argument to indicate if the function raises exceptions or not. In case the function will raise exception: start a handler, parse the function and generate code for reraising the exceptions (call chill_reraise_exceptions). * except.c (chill_reraise_exceptions): New function to generate code for reraising exceptions are specified at the function definition. * ch-tree.h: Add prototype for chill_reraise_exceptions. * decl.c (build_chill_function_type): When the function (type) raise an exception, generate two new arguments (additional to the formal parameters), the filename and linenumber of the caller. (start_chill_function): likewise... * expr.c (build_chill_function_call): If the called function raises exceptions, give current filename and linnumber as aditional arguments. * actions.c (build_cause_exception): Handle case when function propagates the exception. * grant.c (print_proc_tail, print_proc_tail_selective): If the function(type) raises exceptions, don't process the last to parmeters of the formal argument list, they are compiler generated. * typeck.c (chill_similar): In case of FUNCTION_TYPE: check if the exception lists are equal. Thu Jun 22 19:27:47 1995 Per Bothner * loop.c (flag_local_loop_counter): Change default to 1. (end_loop_scope): Set 'keep' parameter in poplevel call. (declare)_temps): Don't set IDENTIFIER_LOCAL_VALUE, since that is handled (correctly!) by pushdecl. (begin_loop_scope): Call pushlevel here, * parse.c (parse_do_action): Move pushlevel so only called for WITH. * decl.c (struct scope): Remove n_incomplete field and its uses. (pushdecl): Re-write to use proclaim_decl. Remove old C-isms. (init_decl_processing): Re-name integer_type_node as "_cint" to remove complaint from pushdecl about chill_integer_type_node as "int". Tue Jun 20 18:15:58 1995 Doug Evans * Make-lang.in (chill-runtime): Restore patch to disable building of runtime libraries for cross compilers. This patch should remain until a build of a freshly checked out devo "just works". Mon Jun 19 06:01:42 1995 Wilfried Moser * Make-lang.in: Update GNUCHILL_VERSION to 1.4.4. * decl.c (init_decl_processing): Remove builtin function __cause_exception. New builtin functions __cause_ex1 and __unhandled_ex. * except.c (is_handled): Return 0 when no handler found, 1, if the handler is in local scope and 2, if function may propagate the exception. * actions.c (build_cause_exception): New argument to indicate if a warning should be printed when causing an unhandled exception. Call is_handled here. * ch-tree.h: Change prototype for build_cause_exception. New marco CH_ALREADY_GRANTED. Used in grant.c to determine if an identifier already has been written to grant file. * grant.c (write_spec_module): If not GRANT ALL specified, write only this identifiers to grant file which are neccessary to form a prober grant file. This will shorten grant files and speed up compilation. (decode_constant_selective, decode_mode_selective, get_type_selective, decode_decl_selective, grant_array_type_selective, get_tag_value_selective, print_enumeral_selective, print_integer_selective, print_struct_selective, print_proc_tail_selective, grant_one_decl_selective): New functions. * lex.c (yywrap): Remove writing of not yet written USE_SEIZE_FILE directives to grant file. * parse.c (parse_on_exception_list): Fis constructing of exceptions list. Wed Jun 14 15:21:54 1995 Per Bothner * typeck.c (valid_array_index_p): Check for syntax error, where index is a mode, rather than a value. * expr.c (build_chill_binary_op_1): Remove unused function. Sat Jun 10 11:36:52 1995 Per Bothner * except.c (is_handled): New function. Various fixes here and there to make it work. * parse.c (parse_param_name_list): Set DECL_ASSEMBLER_NAME. (Otherwise dbxout may crash.) * satisfy.c (satisfy case FUNCTION_TYPE): Check for non-type result. * decl.c (start_chill_function): If result type was error_mark, kludge type chill_os result_decl to avoid extra errors. * actions.c (chill_expand_result, chill_expand_return): If type of chill_result_decl is error_mark, do nothing. * typeck.c (chill_similar): Fix thinko in recent change. * config-lang.in (diff_exclude): Remove ch/lex.c - now it's a true source file, and is never longer generated with [f]lex. * regression.sh: Pass -s to make clean (to make it silent). Explicitly call gawk, instead of depending of '#!' to work. Add --objdir flags. Never send mail to bill. Thu Jun 8 15:08:35 1995 Per Bothner * typeck.c (chill_similar): Add extra parameter. Use to to prevent infinite recursion. (chill_equivalent, chill_l_equivalent): Also add new parameter. * ch-tree.h (CH_SIMILAR, CH_EQUIVALENT): Modify to match. Tue Jun 6 17:14:49 1995 Per Bothner * loop.c (declare_temps): If -flocal-loop-counter, make sure to pushdecl the new variable (created with decl_temp1). And fix the type of the local variable for powerset iteration. Tue Jun 6 15:07:19 1995 Per Bothner * typeck.c (mark_addressable): Handle ADDR_EXPR inside NOP_EXPR inside INDIRECT_EXPR. For TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR, and COMPOUND_EXPR mark operand 1, not operand 0 (which is used for range-checks and suchlike). Thu Jun 1 02:45:54 1995 Wilfried Moser * expr.c (build_set_expr): Do some optimizations for LE_EXPR and GE_EXPR (don't do invert_truthvalue, just switch operands). Wed May 31 14:00:38 1995 Doug Evans * lang-options.h: New file. * lang-specs.h: New file. Wed May 24 01:45:18 1995 Per Bothner * actions.c (assign_stack_temp): Remove unneeded declaration. Tue May 23 00:17:38 1995 Per Bothner * parse.c (parse_on_exception_list): Return list of exception names in pass 1, not in pass 2. (Return non-NULL dummy if pass 2.) (parse_on_alternatives): Call chill_handle_on_labels even if ignoring. (parse_opt_handler): Likewise for chill_start_default_handler. * except.c (push_handler): Clear on_alt_list only if pass 1. (chill_handle_on_labels): Build on_alt_list in pass 1, retrieve it in pass 2. Fix so that decl_temp1 does not expand_decl_init, which calls free_temp_slots, which loses in the middle on an expression. * decl.c (finish_decl): Don't call expand_decl_init. (do-decl): Do initialization assignment even if stack variable. * parse.c (parse_loc_declaration): Call free_temp_slots. * decl.c (finish_decl), ch-tree.h: Remove last two always-NULL parameters. Cleanup never-used code. * decl.c, except.c: Update calls to finish_decl. * decl.c (case_else_node): Define new variable. (init_decl_processing): Initialize it. (make_chill_variants): If variant label is case_else_node (i.e. it is (ELSE):), treat that as an ELSE variant. * ch-tree.h (case_else_node): Declare case_else_node. * parse.c (parse_case_label): Use case_else_node. Mon May 22 10:18:11 1995 Per Bothner * grant.c (print_proc_tail): Also call print_proc_exceptions. (decode_decl): Don't explicitly call print_proc_exceptions for FUNCTION_DECL. (Net effect is that now exceptions are printed for FUNCTION_TYPE too.) * actions.c (chill_convert_for_assignment): Use save_if_needed, instead of save_expr, in case value is a reference. * typeck.c (build_chill_slice): Fix old thinko (missing call to build_pointer_type). * actions.c (size_int): Remove unused and conflicting prototype. Wed May 17 16:23:20 1995 Per Bothner * actions.c (chill_convert_for_assignment): Call save_expr if range_checking (twice). Tue May 16 11:33:41 1995 Per Bothner * typeck.c (layout_chill_range_type): Re-organize error checking. Add extra parameter to indicate if non-constant bounds are allowed. If bounds are bad, set them to the min_value of the parent. * ch-tree.h (layout_chill_range_type): Update declaration. * satisfy.c (satisfy): Update call of layout_chill_range_type. * typeck.c (build_chill_range_type): Likewise. * tree.c (build_string_type): Likewise. Tue May 16 00:37:51 1995 Wilfried Moser * expr.c (build_chill_sizeof): Fix bug in case of SIGNAL. Mon May 15 12:54:32 1995 Per Bothner * satisfy.c (satisfy): Supress error message for REF . * decl.c (push_modedef): Check for TREE_CODE != ERROR_MARK, instead of against error_mark_node. (smash_dummy_type can copy error marks.) (finish_decl): Simplify C-derived check for incomplete type, and suppress if it is an ERROR_MARK. Don't call rest_of_decl_compilation if type is an ERROR_MARK. Sun May 14 22:52:40 1995 Per Bothner * convert.c (convert): Handle array types with different modes. Thu May 11 15:52:12 1995 Per Bothner * loop.c (build_loop_iterator): Handle the case of a non-local loop counter having reference type. Thu May 11 07:04:29 1995 Wilfried Moser * tasking.c (build_copy_number, build_gen_code, build_gen_inst, build_gen_ptype, build_proc_type): Set CH_DERIVED_FLAG on result to avoid erros when assigning to (comparing with) NEWMODEd INT's. Mon May 8 15:27:16 1995 Per Bothner * expr.c (build_chill_card): Do constant folding, if possible. (build_max_min): Do constant folding for MIN/MAX of powersets. Mon May 8 06:57:21 1995 Wilfried Moser * expr.c (build_chill_sizeof): Add corect processing of a SIGNAL definition without data. Sat May 6 16:27:10 1995 Doug Evans * Make-lang.in (maintainer-clean): Renamed from realclean. Tue May 2 06:16:23 1995 Wilfried Moser * parse.c (parse_asm_action): Do PUSH_ACTION unconditionally, otherwise "handler stack" will get out of sync. Mon Apr 24 09:51:07 1995 Per Bothner Fixes to support module-level non-static temporary variables. * parse.c (parse_loc_declaration): If all_static_flag and not resursive, tell do_decls to make new decl static. * decl.c (do_decl): Don't use maybe_static function to force static. (do_decl): Don't let initialization count as "using" the variable. (maybe_static): Removed. (finish_decl): Call expand_decl and expand_decl_init if needed (as it will be for non-static temporaries). Fri Apr 21 21:02:30 1995 Per Bothner * convert.c, expr,c typeck.c (expand_decl): Remove usused declaration. Fri Apr 21 02:27:12 1995 Wilfried Moser * expr.c (build_set_expr): Fix thinko: GE(x,y) is not eqivalent to LT(y,x) its rather equivalent to NOT (LT(x,y)). Same is true for GT(x,y), its not equiv. to LE(y,x), its equiv. to NOT (LE(x,y)). Thu Apr 20 15:29:05 1995 Per Bothner * parse.c (yytext, finput): Remove unused declarations. * parse.c (proc_action_level): New variable. (parse_proc_body): New function. Common code from parse_procedure_definition and parse_process_definition moved here. Save, set, and restore proc_action_level from action_nesting_level. (parse_action case RETURN): Pass proc_action_level to expand_goto_except_cleanup. Thu Apr 20 06:02:20 1995 Wilfried Moser * grant.c (really_grant_this): Add processing of LABEL_DECL's (don't grant them). Tue Apr 18 18:16:28 1995 Per Bothner * lex.c ( convert_bitstring): Use BYTES_BIG_ENDIAN rather than BITS_BIG_ENDIAN to layout bits within bitstring. * typeck.c (expand_constant_to_buffer, extract_constant_from_buffer): Likewise. Sun Apr 16 19:55:51 1995 Per Bothner * decl.c (finish_chill_function): If currently global_function_decl, don't set outer_function to global_function_decl. Wed Apr 12 22:45:06 1995 Per Bothner * decl.c (start_chill_function): Normal functions are nested. (finish_chill_function): No longer takes a 'nested' parameter. Normal functions are nested. Never call permanent_allocation, since it does little good (all normal functions are nested), and trashes some things we need. (finish_outer_function): Update call to finish_chill_function. * grant.c (chill_finish_compile): Likewise. * tasking.c (build_process_wrapper): Likewise. * parse.c (end_function): Likewise. * ch-tree.h (finish_chill_function): Update declaration. * parse.c (parse_asm_clobbers): Re-enable. (expand_asm_operands): function. (parse_asm_action): Re-enable. Don't do anything in pass 1. * typeck.c (build_chill_slice): Do constant folding. Also, work around problem where expand_expr constant folds ARRAY_REF. (sort_constructor): Remove unused function. * expr.c (chill_expand_expr case CONCAT_EXPR): Make sure we emit_block_move if needed with correct size. * inout.c (build_chill_io_list_type): Simplify. * lex.c (check_newline): Uncomment some dwarf stuff, which needs get_directive_line, which we no longer have. Wed Apr 5 16:05:15 1995 Per Bothner * Makefile.in (C_OBJS, xcc1chill): Removed. We no longer link cc1chill with ../c-typeck.o ../c-aux-info.o ../c-common.o. * expr.c (build_chill_component_ref): Renamed to build_component_ref. (chill_truthvalue_conversion): Renamed to truthvalue_conversion. * decl.c, expr.c, inout.c, loop.c, parse.c, tasking.c, timing.c, typeck.c: Update accordingly. * typeck.c (valid_array_index_p): We only need to save_expr (index) if we're range-checking. * typeck.c (unsigned_type, signed_type, signed_or_unsigned_type, mark_addressable, initializer_constant_valid_p, check_case_value, type_for_size, type_for_mode): New functions, copied from ../c-common.c and ../c-typeck.c. * lang.c (incomplete_type_error): New. (Was in c-common.o.) * decl.c (constant_expression_warning): New. (Was in c-common.o.) * lang.c (string_index_type_dummy): Remove definition from here. * tree.c (string_index_type_dummy): Define here instead. * lang.c (lang_init): Move init of string_index_type_dummy (which is too late) from here ... * decl.c (init_decl_processing): ... to here. * decl.c (signed_boolean_type_node): New variable. (init_decl_processing): Initialize it. * parse.c: Comment out ASM action support, for now. * loop.c (maybe_skip_loop): Make return void, not int. Use build_compare_discrete_expr. (increment_temps): Use chill_expand_assignment. Thu Mar 30 23:28:28 1995 Per Bothner * decl.c (do_decl): If default-initializing variable-length string to "" (or []), make it lifetime_bound. Thu Mar 30 02:51:59 1995 Wilfried Moser * parse.h, hash.h, gperf: New compiler directives EMPTY_ON and EMPTY_OFF. * lex.c: New variables empty_checking and runtime_checking_flag. (ch_lex_init): Initialize empty_checking and range_checking when switching from pass 1 to 2. (read_directive): Add processing of EMPTY_OFF/ON. * expr.c (build_chill_indirect_ref): New argument do_empty_check to indicate if null pointer checking should be done or not. It's not always necessary to do a null pointer check. * decl.c (lookup_name): Add argument to call to build_chill_indirect_ref. (shadow_record_fields): ... * parse.c (parse_primval): ... * tasking.c (build_process_wrapper): ... (build_receive_buffer_case_label): ... * ch-tree.h: Change prototype of build_chill_indirect_ref. Add declaration of runtime_checking_flag and empty_checking. * actions.c (check_non_null): Do null pointer checking only when enabled (empty_checking != 0). Wed Mar 29 15:18:23 1995 Per Bothner * actions.c (chill_expand_assignment): Add 'else' so we don't do regular assignment in addition to spacial assignment (e.g. for slices). * ch-tree.h (convert_to_discrete): Add declaration. * typeck.c (convert_to_discrete): New function. (valid_array_index_p): Use convert_to_discrete. Also simplify. (build_chill_slice): Say sorry if variable-length bitstring. (build_chill_slice_with_length): Re-do bounds check. * expr.c (check_case_selector): Re-write to use convert_to_discrete. (build_chill_num, build_chill_pred_or_succ): Use convert_to_discrete. * decl.c (do_decl): Don't do redundant chill_convert_for_assignment. Wed Mar 29 00:00:29 1995 Wilfried Moser * expr.c (build_chill_num): need_unsigned have to be set for characyer strings of length 1 too. Happens when compiling with -fold-strings and do NUM(a(i)). * parse.c (parse_loc_declaration): Print error message only in pass 1. (parse_mode): Likewise ... * tasking.c (build_tasking_message_type): Temporarily reset maximum_field_alignment to get proper aligned temp. variables gets passed to runtime system. Tue Mar 28 00:08:06 1995 Per Bothner * typeck.c (my_build_array-ref): Merged into build_chill_array_ref_1. But don't convert index to integer_type_node. And we don't need to check the we're given an array. * typeck.c (valid_array_index_p): If flag_old_strings, convert chars(1) to char and bools(1) to bool before index checking. Sun Mar 26 22:42:39 1995 Per Bothner * ch-tree.h (struct module): Added next module field. * decl.c (first_mdoule, next_module): New global variables. (switch_to_pass_2): Re-initialize next_module. (push_module): In pass 2, reuse the same module objects from pass 1. * decl.c (declare_predefined_file): Set DECL_IN_SYSTEM_HEADER. * typeck.c (valid_array_index_p): Do range check on original index, before we convert to domain type. Fri Mar 24 11:43:39 1995 Per Bothner * parse.c (parse_fixed_field): New function. (parse_variant_field_list): New function replaces parse_simple_fields. (parse_variant_alternative, parse_field): Update to use new functions. (parse_field): Error message if neither CASE nor NAME. * actions.c (check_non_null): New function - checks for NULL pointers. * ch-tree.h (check_non_null): New declaration. * tasking.c (expand_send_signal): Call check_non_null. * expr.c (build_chill_indirect_ref, build_chill_function_call): Same. * lex.h (enum rid): Add RID_EMPTY. * lex.c (init_lex): Initialize ridpointers[RID_EMPTY]. * lex.c (read_directive): Remove 2 calls of to_global_binding_level Wed Mar 22 16:36:46 1995 Per Bothner * tasking.c (tasking_list): Change to chain of TREE_VEcs, rather than chain of (nested) TREE_LIST nodes. (TASK_INFO_PDECL, TASK_INFO_ENTRY, TASK_INFO_CODE_DECL, TASK_INFO_STUFF_NUM, TASK_INFO_STUFF_TYPE): New macros. (tasking_setup, tasking_registry, add_taskstuff_to_list): Use them. * ch-tree.h (C_TYPE_FIELDS_READONLY): Rename to TYPE_FIELDS_READONLY. (TYPE_READONLY_PROPERTY): New macro, to match Z.200 concept. * typeck.c (build_chill_modify_expr): Don't check for read-only-ness, since it is redundant for chill_expand_assignment and breaks reach-bound initialization in do_decl. (my_build_array_ref): Simplify by using TYPE_READONLY_PROPERTY. (layout_chill_array_type): Set TYPE_FIELDS_READONLY if appropriate. * actions.c (chill_expand_assignment): Check TYPE_READONLY_PROPERTY instead of TREE_READONLY of the target's type. * expr.c (build_chill_function_call): Likewise. * inout.c (build_chill_readtext): Likewise. * decl.c (do_decl): Likewise, to check if init is required. * typeck.c (build_chill_bitref): Removed unused RANGE_EXPR hack. Wed Mar 22 07:52:52 1995 Wilfried Moser * tasking.c (build_start_process): Get a unique identifier for the start arguments. Tue Mar 21 07:36:40 1995 Wilfried Moser * expr.c (fold_set_expr): At label build_result: Add setting unused bits to 0. This is the same as the runtime library does. * parse.c (expect): Function returns now int, 0, if the expected token was not got, 1 when it was found. (parse_synonym_definition): In case of syntax error (missing =), set expr to NULL_TREE and mode to error_mark to avoid subsequent segfaults. * chill.texi: Add chapter about differences to Z.200/1988. Mon Mar 20 18:01:11 1995 Per Bothner * lang.c (chill_print_error_function): New function, to report module name if not inside a function. (lang_init): Set print_error_function to chill_print_error_function. * tasking.c (max_queue_size, buffer_element_mode): Cleanup to remove unreachable code. * grant.c (chill_finish_compile): Avoid doing a lookup_name to find init function (which got broken by recent nesting re-org). * decl.c (poplevel): Push and pop function context around call to output_inline_function (as done for C and C++). Thu Mar 16 17:56:07 1995 Per Bothner * parse.c (parse_pass_1_2): If unknown top-level token, skip pass 2. Wed Mar 8 13:54:33 1995 Doug Evans * Make-lang.in (chill-runtime): Temporarily disable building of runtime libraries for cross compilers. Mon Mar 6 23:36:19 1995 Per Bothner * parse.c, decl.c: Remove use of FUNCTION_NEEDS_STATIC_CHAIN. * configure: Merge in tolerance for new flags (e.g. --x-libraries). Sat Mar 4 15:47:35 1995 Per Bothner * expr.c (build_chill_arrow_expr): Error if pass == 1. Thu Mar 2 19:28:07 1995 Per Bothner * decl.c (do_decl): Setting seen_action must be done in pass 1. (save_decl): Don't set DECL_CONTEXT to global_function_decl. (start_chill_function): Simplify due to above change. * parse.c (parse_case_label): Hack to distinguish (ELSE) from (*). * grant.c (decode_constant): Emit ELSE in case label. * parse.c (serious_errors): New global variable. * parse.c (to_global_binding_level): Set serious_errors. (parse_pass_1_2): Exit after pass 1 if serious_errors > 0. * lex.c (readstring): Recover from unterminstaed control sequence. Tue Feb 28 17:08:08 1995 Per Bothner Re-write of module-level actions. No longer generate a module function for module-level actions. Instead, put them inside a new global dummy function. Nest everything logically inside it. * lex.h, grant.c (chill_module_name): Removed declaration. * grant.c (write_spec_module): Instead use current_module->name. * grant.c (chill_start_module_code, chill_finish_module_code): Removed. * grant.c (chill_finish_compile): Make rtl for global function. * actions,c (push_action): Don't call chill_start_module_code. * expr.c (build_chill_function_call, build_generalized_call): Likewise. * parse.c (INIT_ACTION): Likewise. * parse.c (seen_action): New variable. * parse.c (end_function): Always call pop_chill_function_context. (parse_procedure_definition): Always call push_chill_function_context. (parse_modulion): Parse optional handler. (parse_modulion, parse_spec_module): Do find_granted_decls. (parse_action): Set seen_action if global and a real action. ([arse_program): Call start_outer_function and finish_outer_function. * ch-tree.h: Appropriate updates. * tasking.c (generate_tasking_code_variable): Make it lifetime-bound. (build_process_header): Always push_chill_function_context; we are now always nested. (build_process_wrapper): Always pop_chill_function_context. * tasking.c (build_start_process): Only expand_start_bindings and expand_end_bindings if pass 2. * decl.c (global_function_decl): New variable. (do_decl): Implement reach-bound initialization of static variables. (start_chill_function): Set DECL_CONTEXT to NULL if it would be global_function_decl (so as to not confuse gcc backend). (start_chill_function, finish_chill_function): If compiling global_function_decl in pass 2 and !seen_action, suppress it. (set_module_name): New function. (global_bindings_p): Re-defined to check against global_function_decl. (start_outer_function, finish_outer_function): New functions. Tue Feb 28 16:00:03 1995 Per Bothner * typeck.c (build_chill_modify_expr): Inline logic from chill_expand_array_assignment, * actions.c (chill_expand_array_assignment): Removed. (chill_expand_assignment): Remove call to removed function. * lex.c (reinit_parse_for_function): Removed empty unused function. * decl.c (start_chill_function): Don't call removed function. Tue Feb 28 00:29:51 1995 Per Bothner * configure: Merge in code for calculating host, build, and target and canon_{host,build,target} from ../configure. Fix calculation of mainsrcdir. Host canon_* variables to merge in build-make (as in ../configure). Sun Feb 26 18:59:02 1995 Per Bothner * typeck.c (expand_constant_to_buffer): Use new function get_set_constructor_bytes. Tue Feb 21 01:41:56 1995 Wilfried Moser * inout.c (build_chill_writetext): Add processing of conditional expressions in argument list. * parse.c (parse_opt_name_string): Print error message only in pass 1. * chill.texi: Add chapter about compiler directives. Tue Feb 14 16:45:19 1995 Per Bothner * decl.c (start_chill_function): Set FUNCTION_NEEDS_STATIC_CHAIN unless nested. * decl.c (decl_temp1): Make lifetime_bound iff static. Fri Feb 3 04:30:28 1995 Wilfried Moser * grant.c (really_grant_this, search_in_list): New static functions to determine if a decl should be written to grant file. (write_spec_module): Add call to really_grant_this. Fri Jan 27 00:06:12 1995 Wilfried Moser * actions.c (check_expression): Apply Per's patch. (chill_expand_result): New argument to indicate if we come from a RETURN or RESULT action. Change various error messages. * ch-tree.h: New macro CH_USE_SEIZEFILE_RESTRICTED. New argument for chill_expand_result. * chill.in: In case of -fgrant-only, clear library, libpath and startfile to avoid warnings from gcc. * gperf, hash.h: New compiler directive USE_SEIZE_FILE_RESTRICTED. * parse.h (enum terminal): Add USE_SEIZE_FILE_RESTRICTED. * grant.c (decode_decl): Don't write USE_SEIZE_FILE directive and subsequent SEIZEs to grant file, if the seize file is used restricted. * lex.c (read_directive): Process new compiler directive USE_SEIZE_FILE_RESTRICTED. (handle_use_seizefile_directive): Same as above. (yywrap): Don't write USE_SEIZE_FILE directive to grant file if this seize file is used restricted. * parse.c (parse_action, case RETURN): Change RETURN expr action to RESULT expr; RETURN. This enables range checking and exception delivery in case of rangefail. Tue Jan 17 07:38:27 1995 Wilfried Moser * decl.c (init_decl_processing): Add definition of library function __inbitstring (see expr.c). * expr.c (chill_expand_expr case SET_IN_EXPR): Call function __inpowerset fir POWERSET's and function __inbitstring for BITSTRING's. In case of POWERSET's we must not do a rangecheck, in case of BITSTRING's we have to do one. (build_compare_expr): Fix typo CH_DERIVED_FLAG (tmp); (warning statement with no effect). Fri Jan 13 13:35:30 1995 Per Bothner * actions.c (check_expression): Simplify result. * ch-tree.h (SET_CH_NOVELTY_NONNIL): New macro. * expr.c, timing.c, typeck.c: Use SET_CH_NOVELTY_NONNIL. * typeck.c (valid_array_index_p), ch-tree.h: Change interface to return modified index expression. Call error if out-of-range. * actions.c, typeck.c: Modify for new valid_array_index_p interface. * actions.c (build_chill_slice): Copy novelty of index type. Fri Jan 13 13:04:41 1995 Per Bothner * convert.c (digest_array_tuple): Allow mode name in array tuple label. Print error message instead of aborting. * parse.c (parse_body): Error message only if pass 1. * decl.c (check_identifier), ch-tree.h: Remove. Unused. Wed Jan 11 14:03:47 1995 Per Bothner * parse.c (parse_modulion): Undo yesterday's change (to allow an ON-handler to follow) until we re-implement module. Tue Jan 10 17:23:55 1995 Per Bothner * loop.c (declare_temps): Remove bogus prohibition against iterating over BOOL arrays. * parse.c (parse_semi_colon): Make it a pedwarn (instead of an error) if a semi-colon is missing before an END. (parse_action): Likewise. * parse.c (parse_modulion): Allow an ON-handler to follow. * parse.c (parse_set_mode): Use parse_expression to get values for number set elements. * expr.c (build_compare_expr): Make sure result has CH_DERIVED_FLAG set, since it is supposed to be BOOL-derived. (finish_chill_binary_op): Likewise for IN_EXPR. Tue Jan 10 04:46:42 1995 Wilfried Moser * actions.c (lookup_and_expand_goto, lookup_and_handle_exit): Add checking the argument. (chill_expand_assignment): Take care of a newmoded dst_offset when calling __pscpy and a newmoded from_pos when calling __setpowersetbits. * expr.c (chill_expand_expr): When calling __psslice take care of a newmoded min_value. * parse.c (parse_name_string): Print error message only in pass 1. Tue Jan 3 19:56:36 1995 Per Bothner * typeck.c (build_chill_array_ref_1): Use varying_to_slice instead of building a VRAY_ARRAY_REF node. * ch-tree.def (VARY_ARRAY_REF): Removed. * actions.c (chill_expand_assignment): Will never call expand_assignment_to_varying_array for a VARY_ARRAY_REF, so don't. (expand_assignment_to_varying_array): Removed. * convert.c (convert): Remove unneeded VARY_ARRAY_REF support. * expr.c (chill_expand_expr): Likewise. Tue Jan 3 19:50:18 1995 Per Bothner * parse.c (parse_iteration): Set step_value to NULL if missing. * loop.c (ITER_TYPE): Remove DO_RANGE. (build_loop_iterator): Implement old DO_RANGE in terms of DO_STEP. (begin_loop_scope): Don't return on error. (build_loop_iterator): Calculate loop variable type using resulting classes (as in Z200), rather than precision. * loop.c (initialzie_iter_var, bottom_loop_end_check): For DO_STEP, make iter_var one less to avoid overflow. * loop.c (build_loop_iterator): If !flag_local_loop_counter, declare a new variable if needed, as allowed by Z200 (1984). * ch-tree.h (ch_class): Add typedef. * typeck.c (chill_resulting_class): New function. (chill_root_resulting_class): Remove. * ch-tree.h (CH_RESULTING_CLASS): New macro. (CH_ROOT_RESULTING_CLASS): Re-implement using CH_RESULTING_CLASS. Tue Jan 3 19:36:27 1995 Per Bothner * actions.c (build_cause_exception, expand_cause_exception), ch-tree.h: Change interface to take IDENTIFIER tree node, rather char char*. (check_expression): Change (simplify) callers appropriately. * parse.c (parse_action), typeck.c (valid_array_index_p): Likewise. * lex.h (enum rid): Add RID_ASSERTFAIL. * lex.c (init_lex): Enter RID_ASSERTFAIL. * parse.c (parse_action case ASSERT): Fix thinko TRUTH_ANDIF_EXPR to TRUTH_ORIF_EXPR. Use RID_ASSERTFAIL. * typeck.c (discrete_type_p): Re-implement using INTEGRAL_TYPE_P. Tue Jan 3 19:20:35 1995 Per Bothner Move checking for modeless tuples in invalid contexts from parser to semantic function check_have_mode (for better error recovery): * expr.c (check_have_mode), ch-tree.h: New function. * satisfy.c (safe_satisfy_decl): Use check_have_mode. * expr.c (build_compare_expr, finish_chill_binary_op, finish_chill_unary_op): Likewise. * parse.c (parse_primval): Don't complain about mode-less tuple here. Tue Jan 3 17:36:48 1995 Per Bothner * expr.c (varying_to_slice): Support varying arrays whose lower bound is non-zero. * parse.c (parse_body): Allow (with warning) definition to follow action. * expr.c (check_case_selector), ch-tree.h: New function. (chill_expand_case_expr): Use it. * parse.c (parse_case_action): Likewise. Fri Dec 23 00:47:54 1994 Wilfried Moser * actions.c (chill_expand_return): Change error message. * ch-tree.h: Change prototypes of do_decl and do_decls. * convert.c (convert): Add missing initialisation of variable orig_e_constant. * decl.c: Change all calls to do_decl. (maybe_static): New function to process the ALL_STATIC_ON/OFF compiler directives. (do_decls): New argument. (do_decl): New argument and process reachbound and lifetime bound initialisation. * gperf, hash.h: Add compiler directives ALL_STATIC_ON and ALL_STATIC_OFF. * grant.c: Change all calls to do_decl. * lex.c (read_directive): Process ALL_STATIC_ON/OFF compiler directive. * parse.c (parse_loc_declaration): Pass lifetime_bound flag to do_decls. * parse.h (enum terminal): Add ALL_STATIC_ON and ALL_STATIC_OFF. * tasking.c: Change all calls to do_decl. Mon Dec 19 23:13:58 1994 Wilfried Moser * parse.c (parse_procedure_definition): Save chill_at_module_level flag, set ot to 0 and restore it at the end of function. A sequence BEGIN x: PROC () RETURN; END x; END; at module level have produced an error. * expr.c (build_chill_repetition_op): Fix typo in error message. Tue Dec 13 12:26:38 1994 Per Bothner * actions.c (expand_assignment_to_varying_array): Fix thinko: build_chill_array_ref -> build_chill_array_ref_1. Sun Dec 11 23:04:27 1994 Per Bothner * actions.c (chill_expand_assignment): Simplify the lhs if it is a COMPOUND_EXPR, so we can better handle SLICE_EXPR in lhs. Thu Dec 8 13:45:38 1994 Per Bothner * loop.c, ch-tree.h (build_loop_iterator): Fix to return void. If start_exp is ERROR_MARK, return. * expr.c (build_generalized_call): More robust on syntax errors. Tue Dec 6 02:33:23 1994 Wilfried Moser * inout.c (build_chill_readtext): In case of reading a SET mode pass ignore_case flag to runtime library. Tue Nov 29 14:41:38 1994 Per Bothner * parse.c (parse_receive_case_action): Print error only if pass==1. * decl.c (push_scope_decls): Use error_with_file_and_line to get correct line number of SEIZE. Mon Nov 28 16:59:18 1994 Per Bothner * expr.c (resolve_component_ref): Call fold on result. * expr.c (resolve_component_ref): Use check_expression. * actions.c (chill_convert_for_assignment): Likewise. * actions.c (cond_exception), ch-tree.h: Removed. * actions.c (check_expression): First part of COMPOUND_EXPR should be boolean_type_node; void_type_node loses in SAVE_EXPRs. * actions.c (chill_convert_for_assignment): Check string_assignment_condition for varying strings too. * typeck.c (build_chill_cast): If the types have different sizes, don't allow nondiscrete->discrete conversion, and only allow discrete->nondiscrete if input expression is constant. * typeck.c (chill_similar): Don't use losing array_type_nelts. * ch-tree.h (ELSE_VARIANT_NAME): New. * convert.c, decl.c, grant.c: Use ELSE_VARIANT_NAME. * decl.c (handle_one_level): Recurse on ELSE_VARIANT_NAME too. Reduce dependencies on ../c-typeck.c: * expr.c: Fix c_expand_start_case -> expand_start_case. Fix c_expand_expr_stmt -> expand_expr_stmt. (build_chill_indirect_ref): Call convert instead of build_c_cast. * loop.c (bottom_loop_end_check): Don't use build_modify_statement. * expr.c, except.c, typeck.c: Don't call default_conversion. * typeck.c (string_assignment_condition): Fix build_component_ref -> build_chill_component_ref. * decl.c: Fix build_indirect_ref -> build_chill_indirect_ref (twice). * decl.c: Don't set unused constructor_no_implicit (from c-typeck.c). * decl.c: Don't call declare_function_name. * parse.c: Don't always keep a valid token in terminal_buffer[0]. The extra look-ahead may have made the parser faster, but caused some problems synchronizing with the lexer. Specifically: (PEEK_TOKEN): Now calls an optimized variant of peek_token_(0). (next_token_): Don't call peek_token_. Renamed to forward_token_. (NEXT_TOKEN): Renamed to FORWARD_TOKEN. (parse_program): Don't call yylex yet. * parse.c (parse_action): Re-do case ASSERT. Fix c_expand_expr_stmt -> expand_expr_stmt. * lex.l: Re-written to not use [f]lex, and renamed to ... * lex.c: ... new lexer. * Makefile.in, Make-lang.in: Remove [f]lex crud. * lex.h (enum rid), lex.c (init_lex): Added RID_ELSE. Tue Nov 22 15:19:03 1994 Wilfried Moser (moser@rtl.cygnus.com) * Make-lang.in: Let chill-runtime depend on $(GCC_PASSES). Fri Nov 18 14:27:32 1994 Per Bothner * parse.c (parse_structure_node): Simpler, and more robust. Wed Nov 16 14:40:52 1994 Ian Lance Taylor (ian@cygnus.com) * lex.l (convert_bitstring): Check BITS_BIG_ENDIAN at run time, not at compile time. * typeck.c (expand_constant_to_buffer): Likewise. extract_constant_from_buffer): Likewise. Tue Nov 15 14:41:53 1994 Per Bothner * convert.c (convert): Call build_chill_range_type rather than build_index_2_type (which has obstack and canonicalization problems). * expr.c (build_chill_pred_or_succ): Convert expr to root class before arithmetic. * loop.c (declare_temps): If location iterated over is not a location, make a temporary variable for it. Mon Nov 14 16:33:47 1994 Per Bothner * typeck.c, ch-tree.h (chill_equivalent): Change to return a tree (a Boolean expression). Also, add some missing tests. * ch-tree.h (CH_EQUIVALENT): Modify accordingly. * expr.c (chill_expand_expr case CONCAT_EXPR): When the 2nd operand is an UNDEFINED_EXPR, handle mode-mismatch with whole expr. Also, replace MEM (which is not a mode) by Pmode. * ch-tree.h, typeck.c (chill_comptypes): Removed. * convert.c (convert): Remove calls to chill_comptypes. Fri Nov 11 13:06:29 1994 Wilfried Moser (moser@rtl.cygnus.com) * grant.c (write_grant_file): Call pfatal_with_name instead of abort when something goes wrong when opening or writing the grant file. unlink grant file if something goes wrong during writing (i.e. device full). * Make-lang.in (CHILL_SRCS): Add timing.c * ch-tree.h: Add prototype for chill_tasking_type_node. * lex.l (equal_number): Use chill_tasking_type_node instead of integer_type_node for converting the result. Print error messages in pass 2, in pass 1 no error will be detected. * tasking.c: New variable chill_tasking_type_node for all generated tasking related variables. Use chill_tasking_type_node instead of chill_unsigned_type_node. * expr.c (chill_expand_expr): Apply Per's change. * expr.c (build_chill_sizeof): In case of error just return error_makr_node. Set CH_DERIVED_FLAG at the result. * timing.c (build_after_timeout_start): Clear the the timeout level to know if we are in the action part of AFTER statement or in the TIMEOUT part. * typeck.c (build_chill_slice_with_length): Convert the class of the result to class of first value in expression. * inout.c (build_chill_writetext, build_chill_readtext): Use stack temporary variables for the iolist so that they can get reused in subsequent calls. Emit code immediately instead of building a compound expr. Fri Nov 4 12:00:54 1994 Per Bothner * expr.c (build_chill_function_call): Don't set TREE_TYPE of assignment to void_type_node - it confuses save_expr. * decl.c (init_decl_processing): Removed unused code. * parse.c: Changes to avoid warnings. * grant.c (chill_finish_module_code): Minor simplification. * lex.l (readstring): Set *len to 1 on error. Thu Nov 3 01:05:17 1994 Wilfried Moser (moser@rtl.cygnus.com) * grant.c (decode_decl): Add granting of BASED declarations. Wed Nov 2 12:14:31 1994 Per Bothner * expr.c (build_chill_lower_or_upper): Take more care to ensure result has the right class. (build_chill_pred_or_succ): Be more careful to get the right resulting class, and check bounds using *root* mode. * typeck.c (build_chill_slice_with_range): Check that array really is an array or string. (build_chill_slice_with_length): Likewise. * typeck.c (extract_constant_from_buffer): Fix calculation of SET_TYPE size. (Cannot depend on 1-byte TYPE_PRECISION field.) Wed Nov 2 05:33:03 1994 Wilfried Moser (moser@rtl.cygnus.com) * Make-lang.in: Change version of compiler. * ch-tree.h: Add new prototypes. * decl.c (init_decl_processing): Remove timing related initialisations. Add call to timing_init. * parse.c (parse_action): Process AFTER action. * tasking.c (build_receive_case_start, build_receive_signal_case_label, build_receive_buffer_case_label, build_delay_case_start, build_delay_action, expand_send_buffer): Add processing of timesupervision. (tasking_init): Change definitions of runtime functions. * timing.c (timing_init): New function for initialisation of timing related stuff. (build_cycle_start, build_cycle_end): Changed due to implementation of timesupervision. (build_after_start, build_after_timeout_start, build_after_end): Implement the AFTER action. (build_timeout_preface, build_timesupervised_call): New functions to handle timesupervision in case of blocking system calls (i.e. SEND buffer action, RECEIVE CASE action etc.). Thu Oct 27 12:50:24 1994 Per Bothner * expr.c (build_chill_repetition_op): Fix repeating all-zero bitstring with orig_len!=1. Also, call build_boring_bitstring if original string was all ones, using one range. Also: Cannot use one-bit TYPE_PRECISION to get bitstring length. Tue Oct 25 14:11:07 1994 Per Bothner * convert.c (convert): When converting BOOL constant to bit-string, bit_one_node and bit_zero_node were switched. * actions.c (chill_expand_assignment): Use force_addr_of, not build_chill_addr_expr - latter yields bogus error. Fri Oct 21 14:26:52 1994 Per Bothner * expr.c (build_chill_indirect_ref): Check for POINTER_TYPE (only) after converting from REFERENCE_TYPE. * expr.c (build_compare_expr): Convert to common mode *after* we've checked compatibility. Fri Oct 21 02:29:15 1994 Wilfried Moser (moser@rtl.cygnus.com) * lex.l (check_newline): Use getc instead of getlc to read the filename in a # line name directive to avoid possibly downcaseing of a filename. Thu Oct 20 05:37:17 1994 Wilfried Moser (moser@rtl.cygnus.com) * expr.c (build_chill_indirect_ref): Add check for really dereferencing a pointer. * convert.c (convert): Take care of TREE_CONSTANT of a SYNONYM having mode ARRAY () VARYING something. Mon Oct 17 02:30:38 1994 Wilfried Moser (moser@rtl.cygnus.com) * decl.c (init_decl_processing): Set CH_DERIVED_FLAG for boolean_true_node and boolean_false_node. TRUE and FALSE have the BOOL derived class. * expr.c (build_chill_num): Set CH_DERIVED_FLAG at the result of NUM. NUM delivers the INT derived class. * grant.c (write_spec_module): Add writing of <> USE_SEIZE_FILE "x.grt" <> SEIZE ALL; to generated grant file. Thu Oct 13 14:45:12 1994 Per Bothner (bothner@kalessin.cygnus.com) * convert.c (convert_from_reference): Make non-static. * ch-tree.h (convert_from_reference): Add prototype. * parse.c (parse_name): If the decl is a REFERENCE_TYPE, just call convert_from_reference - and not a full-scale convert. * convert.c (convert): Only call digest_array_tuple if ARRAY_TYPE. * typeck.c (chill_expand_tuple): Print error if type is neither array, struct, or powerset. * expr.c (chill_expand_expr cases CONCAT_EXPR, SET_*_EXPR, UNDEFINED_EXPR): Call preserve_temp_slots for temp targets. If target is not MEM, make temp (even if not REG) to simplify - and don't copy original target to temp target first. (Not needed.) * lang.c (maybe_objc_comptypes): Just return -1. Wed Oct 12 12:24:20 1994 Per Bothner (bothner@kalessin.cygnus.com) * tasking.c (tasking_setup): Fix breakage from previous check-in. Tue Oct 11 16:00:37 1994 Per Bothner (bothner@kalessin.cygnus.com) * actions.c, convert.c, except.c, expr.c, inout.c, loop.c, tasking.c, timing.c, typeck.c: Change build1 (ADDR_EXPR, ptr_type_node, XX) to force_addr_of (XX). Add call to mark_addressable where needed for other calls to build 1 (ADDR_EXPR, TYPE, XX). Thu Oct 6 06:36:28 1994 Wilfried Moser (moser@rtl.cygnus.com) * inout.c (build_chill_writetext): Remove processing of POWERSET's. Tue Oct 4 14:08:26 1994 Per Bothner (bothner@kalessin.cygnus.com) * convert.c (convert): If flag_old_strings, support converting CHARS(1) and BOOLS(1) to INT. Fri Sep 30 01:44:51 1994 Wilfried Moser (moser@rtl.cygnus.com) * inout.c (build_chill_readtext): Add check for item is referable and not READonly. Add processing of BITSTRINGs. Mon Sep 26 16:19:36 1994 Per Bothner (bothner@kalessin.cygnus.com) * expr.c (build_chill_descr): Add missing call to mark_addressable. * loop.c (toop_loop_end_check): Replace build1 (ADDR_EXPR ...) with call to force_addr_of (which calls mark_addressable). * expr.c (build_chill_descr, build_chill_inttime): Likewise. * inout.c (build_chill_writetext): Likewise. Mon Sep 26 05:19:21 1994 Wilfried Moser (moser@rtl.cygnus.com) * grant.c (print_struct): Move printing of VARYING from here ... * grant.c (grant_array_type): ... to here. Mon Sep 26 00:09:08 1994 Per Bothner (bothner@kalessin.cygnus.com) * ch-tree.h (force_addr_of): New prototype. * expr.c (force_addr_of): Call mark_addressable. Make non-static. * inout.c (build_chill_writetext): Use force_addr_of. Sun Sep 25 23:41:59 1994 Per Bothner (bothner@kalessin.cygnus.com) * except.c (push_handler), actions.h: Removed unused parameter. * actions.c (push_action): Remove unused paramater. * parse.c, actions.c: Remove no-longer-used parameter to calls to push_handler and push_action. * decl.c (push_extern_process): Only build types in pass 1. * tasking.c (build_process_header): Only build types in pass 1. * tasking.c (build_start_process): Do pushdecl/popdecl etc even after an error (to maintain consistency between passes). * convert.c (convert_to_boolean): Allow any integral input type. Sat Sep 24 22:47:54 1994 Per Bothner (bothner@kalessin.cygnus.com) * typeck.c (extract_constant_from_buffer): Add (somewhat kludgey) support for UNION_TYPE. (Patch from Wilfried.) Also, reverse RECORD_TYPE constructor list. Fri Sep 23 19:06:39 1994 Per Bothner (bothner@kalessin.cygnus.com) * expr.c (build_concat_expr): Fix calculation of result_size. Wed Sep 21 00:54:21 1994 Per Bothner (bothner@kalessin.cygnus.com) Give up on trying to use the cleanup mechanism in stmt.c to make sure the exception handler get unlinked on goto/exit/return. Instead, do it ourselves. (Much simpler.) * except.c, ch-tree.h (action_nesting_level): New global. * ch-tree.h (DECL_ACTION_NESTING_LEVEL): New macro. * decl.c (define_label): Set DECL_ACTION_NESTING_LEVEL. * except.c (expand_goto_except_cleanup): New function. (cleanup_chain): New variable. (push_handler, pop_handler): Adjust action_nesting_level. (emit_setup_handler): Push cleanup. (chill_finish_on): Pop cleanup. * actions.c (lookup_and_expand_goto, lookup_and_handle_exit): Call expand_goto_except_cleanup. * parse.c (parse_action): Before RETURN, call expand_goto_except_cleanup. Mon Sep 19 00:59:54 1994 Per Bothner (bothner@kalessin.cygnus.com) * lex.l (equal_number): Make sure converted synonym is on permanent obstack. * typeck.c (extract_constant_from_buffer): Fix INTEGER_TYPE loop to traverse in big-endian order. Sat Sep 17 20:48:37 1994 Per Bothner (bothner@kalessin.cygnus.com) * typeck.c (build_chill_cast): Call mark_addressable. * expr.c (build_chill_function_call): Call mark_addressable. Thu Sep 15 23:47:01 1994 Per Bothner (bothner@kalessin.cygnus.com) * typeck.c (expand_constant_to_buffer): Fix an endian-ness problem for INTEGER_CST. (extract_constant_from_buffer): Likewise. Thu Sep 15 22:59:04 1994 Per Bothner (bothner@kalessin.cygnus.com) * decl.c (pushlevel): Do different things depending on actual parameter. * decl.c, parse.c, tasking.c: Change argument to to pushlevel to 1. * actions.c (push_action): Take new parameter. * except.c (push_handler): Likewise. * parse.c: Change calls to push_action and push_handler. * loop.c (begin_loop_scope): Always call expand_start_bindings. * loop.c (end_loop_scope): Always call expand_end_bindings. * except.c (emit_setup_handler): Add a cleanup to unlink from exception stack if we return/exit/goto from here. * loop.c (begin_loop_scope): Move pushlevel from here ... * parse.c (parse_do_action): ... to here. Clean up do-decl interface (for decl_temp1). * parse.c (parse_loc_declaration): If global_bindings_p (), treat as static. * decl.c (do_decl): Don't test global_bindings_p (). * decl.c (keep_next_level_flag, keep_next_if_subblocks): Not used. Removed. (struct scope::keep, scope::keep_if_subblocks): Likewise. (keep_next_level): Likewise. (kept_level_p, pushlevel, poplevel): Simplify. * decl.c (init_decl_processing): Don't call init_iterators. * Makefile.in (C_OBJS): Don't get ../c-iterator.o - not needed. Thu Sep 15 05:54:11 1994 Wilfried Moser (moser@rtl.cygnus.com) * lex.l (readstring): Add processing of control sequence in character string literals. The granting mechanism writes this to grant files. Tue Sep 13 06:19:42 1994 Wilfried Moser (moser@rtl.cygnus.com) * expr.c (compare_records): In case of -fpack do always a memcmp instead of comparing each field of the structure. If the structure is a variant structure, issue a warning. Mon Sep 12 13:15:09 1994 Per Bothner (bothner@cygnus.com) * grant.c (write_spec_module): Add cast, to avoid PCC warning. * grant.c (header_template): Don't use ANSI-specific string literal concatenation. Fri Sep 9 01:53:30 1994 Wilfried Moser (moser@rtl.cygnus.com) * tasking.c (get_process_wrapper_name): New function. (add_taskstuff_to_list): Add a new argument, which is the entrypoint of a process. (build_process_header): Change PROCESS arguments to be like arguments of a function. There will be a wrapper which is the real entry point for a PROCESS. This wrapper is automatically build after a PROCESS definition and gets as argument a pointer to a structure looking like the arguments of the PROCESS. This wrapper will call the PROCESS (see build_process_wrapper). (build_process_wrapper): New function (see above). (build_start_process): Change processing of arguments. (tasking_setup): Add processing of a different entry point in case of PROCESSes. * parse.c (parse_process_definition): Add call to build_process_wrapper. * parse.c (end_function): Remove the poplevel() call. build_process_header no longer makes the corresponding pushlevel(). * grant.c (print_proc_tail): Remove special processing of PROCESSes, they look now like normal functions. * decl.c (init_decl_processing): Add declaration of memcmp function. * ch-tree.h: Add new prototype for build_process_wrapper, change prototypes for add_taskstuff_to_list and build_process_header. * grant.c (write_spec_module): Write GNUCHILL and gcc version into grant file. * Make-lang.in (CHILL_FLAGS_TO_PASS): Add passing of CC and GNUCHILL_VERSION to ch/Makefile. * Make-lang.in (CHILL.mostlyclean): Add ch/ch-version.c. * Makefile.in (CHILL_OBJS): Add ch-version.o. ch-version.c will get generated every time a new Makefile will get generated. * Makefile.in (GNUCHILL_VERSION): Remove it, its defined in Make-lang.in. * chill.in: In case of -fgrant-only pass "-S -o /dev/null" to the compiler to avoid generation of an object file. Thu Sep 8 12:07:28 1994 Per Bothner (bothner@kalessin.cygnus.com) * convert.c (display_int_cst), ch-tree.h: New function. * convert.c (digest_array_tuple): Use digest_int_cst to provide better error messages. Return error_mark_node on error. * grant.c (decode_const): Simplify by using digest_int_cst. * grant.c (format_character, find_assoc): Removed. * decl.c (do_decl): Add missing TREE_CHAIN. * decl.c (finish_incomplete_decl): Removed. (init_decl_processing): Don't set incomplete_decl_finalize_hook. (finish_decl): Remove old C-specific code to deduce size of array from initialization. (complete_array_type): Just make it abort. * except.c (finish_handler_array): Avoid calling C-specific kludge complete_array_type. * convert.c (digest_constructor): Rename, and re-write to: (digest_array_tuple, convert): No longer use the code in ../c-typeck.c; use a Chill-only implementation (sigh). * typeck.c (chill_expand_tuple): Remove unneeded call to complete_array_type. * expr.c (fold_set_expr), grant.c (decode_constant), typeck.c (expand_constant_to_buffer): Update name of called function unpack_set_constructor to get_set_constructor_bits. * expr.c (powersetlen ): Remove redundant call to convert. * ch-tree.h (unpack_set_constructor): Removed obsolete declaration. * inout.c (build_chill_writetext): Handle 64-bit integer literals by trying to convert them to a smaller type. * lex.l (convert_number): Always use long long type (possibly unsigned) to avoid problems with constant folding truncation. Mon Sep 5 08:08:22 1994 Wilfried Moser (moser@rtl.cygnus.com) * ch-tree.h (enum chill_built_in_function): Add BUILT_IN_QUEUE_LENGTH. Add new prototype (see tasking.c). * expr.c (build_generalized_call): Add processing of BUILT_IN_QUEUE_LENGTH. * tasking.c (build_queue_length): New function. * tasking.c (tasking_init): Add new external function definition. Thu Sep 1 15:38:00 1994 Per Bothner (bothner@kalessin.cygnus.com) * lex.l (default_lex): New function. Progress towards getting rid of [f]lex. * lex.l (convert_number): Use mul_double and add_double. Set result type to a reasonable type in which the literal will fit. Give error message if literal is too big. * lex.l (equal_number): Switch (temporarily) to permanent obstack. * typeck.c (build_chill_slice_with_range): Check for empty slice *after* we have checked for upper/lower limit in range. * grant.c (decode_mode): Remove unused code. (BOOL and CHAR ranges are represented as INTEGER_TYPEs.) * tasking.c (build_process_header): Add missing call to expand_start_bindings. * parse.c (end_function): Add missing expand_end_bindings. Wed Aug 31 17:25:14 1994 Per Bothner (bothner@kalessin.cygnus.com) * decl.c (init_decl_processing): Set set_alignment. Tue Aug 30 16:40:46 1994 Per Bothner (bothner@kalessin.cygnus.com) * actions.c (print_missing_cases, check_missing_cases, BITARRAY_TEST, BITARRAY_SET): New functions and macros, to check for completeness of case actions and expressions. * decl.c (c_decode_option, init_decl_processing): Don't set warn_switch. * expr.c (chill_expand_case_expr): Call check_missing_cases instead of check_for_full_enumeration_handling. * parse.c (parse_case_actions): Call check_missing_cases. * expr.c (build_chill_binary_op): Remove some dead code. * expr.c (chill_truthvalue_conversion): Call build_chill_binary_op instead of build_binary_op. * ch-tree.h (binary_op_error, build_binary_op): Unused. Removed. * parse.c (end_function): Use kept_level_p in parameter to poplevel. This reverts a June 13 change. Fri Aug 26 11:50:19 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) * configure: Ignore --without, as ../configure does. Wed Aug 24 01:17:28 1994 Wilfried Moser (moser@rtl.cygnus.com) * lex.l: Change rule for decimal numbers to allow identifiers to start with an underscore (_). Fri Aug 19 16:38:12 1994 Per Bothner (bothner@kalessin.cygnus.com) * tasking.c (build_receive_signal_case_label): Remove backwards chill_convert_for_assignment (which converted whatever garbage was in the *target* to the type of the signal argument!). Fri Aug 19 07:10:43 1994 Wilfried Moser (moser@rtl.cygnus.com) * inout.c (build_chill_io_list_type, build_enum_tables), tasking.c (build_tasking_struct): Temporarily reset maximum_field_alignment to 0, so that the compiler-built data structures needed by the RTS can be independent of -fpack. Thu Aug 18 13:39:51 1994 Per Bothner (bothner@kalessin.cygnus.com) * typeck.c (build_init_struct): Temporarily reset maximum_field_alignment to 0, so that the compiler-built data structures needed by the RTS can be independent of -fpack. Wed Aug 17 23:48:33 1994 Wilfried Moser (moser@rtl.cygnus.com) * parse.c (parse_primval, expect, parse_on_exception_list): Print error message only in pass 2. Wed Aug 17 13:47:50 1994 Per Bothner (bothner@kalessin.cygnus.com) * decl.c (switch_to_pass_2): Revert June 13 change, (Don't exit after pass 1 if an error was found.) * ch-tree.def (SLICE_EXPR): New tree-code. * typeck.c (build_chill_slice): For building a slice of a bit-string, just generate a SLICE_EXPR. * decl.c (init_decl_processing): Declare __pscpy. * actions.c (chill_expand_assignment): Handle a SLICE_EXPR on the LHS of assignment, by calling __pscpy. * expr.c (chill_expand_expr): Handle SLICE_EXPR (as a RHS value) by using __psslice to copy slice to a temp. Wed Aug 17 05:52:44 1994 Wilfried Moser (moser@rtl.cygnus.com) * Make-lang.in: Change version of GNUCHILL compiler to 1.4.1. * expr.c (build_chill_length): Enable LENGTH built-in to process Buffers and Events too (Z.200/1992). * lex.l (yywrap): Always set yyin to finput and/or grt_in. On a linux system the previous version was not able to run. * tasking.c: Correct processing of infinite buffer- and event-length to avoid RANGEFAIL warning. Thu Aug 11 11:46:55 1994 Per Bothner (bothner@kalessin.cygnus.com) * parse.c (parse_if_expression_body): Don't call the C-specific build_conditional_expr. Just do build_nt (COND_EXPR, ...). * convert.c (convert): Convert a COND_EXPR by converting each branch. * convert.c (convert): Don't call convert before convert_to_reference. It's apt to do weird and unneedful things. * convert.c (convert): If the expression is varying, just call varying_to_slice, which simplifies quite a bit. * ch-tree.h (varying_to_slice): Add prototype. * typeck.c (varying_to_slice): Remove prototype. * satisfy.c (satisfy): Move case PAREN_EXPR from type 'e' to type '1'. * except.c (emit_setup_handler): Temporarily reset the maximum_field_alignment to zero so the compiler's exception data structures can be compatible with the run-time system, even when we're compiling with -fpack. * expr.c (compare_records): Call saved_if_needed on operands. * expr.c (build_set_expr case NE_EXPR): Don't use __nepowerset which has been reimplemented to just call __eqpowerset and invert the result. Inline this new implementation by handling as EQ_EXPR, and inverting the result. * decl.c (init_decl_processing): Don't define unused __eqpowerset. * typeck.c (valid_array_index_p): The TRUTH_ANDIF_EXPR has type boolean_type_node, not void_type_node. (Fixing this avoids a crash in the back-end.) * grant.c (decode_constant): In a CALL_EXPR, if the argument list is not a TREE_LIST (as in string repetiation), don't emit parentheses. Wed Aug 10 13:13:55 1994 Per Bothner (bothner@kalessin.cygnus.com) * decl.c (proclaim_decl): Use CH_DECL_ENUM to check that a CONST_DECL is from a SET definition. (This is safer than checking that the type is ENUMERAL_TYPE, because synonym definitions may have a NULL TREE_TYPE.) Also, if we have duplicate enums whose types are identical, this is an error. * decl.c (proclaim_decl, pushdecllist, push_scope_decls): Add an extra 'quiet' parameter, which is true if we're called from bind_sub_modules. (In that case an error message about duplicated decls would be repeated later, so suppress it.) * parse.c (stmt_count): Removed, not used. (INIT_ACTION): Call emit_line_note only if !ignoring. (parse_begin_end_block): Do INIT_ACTION even if ignoring. Fri Aug 5 12:39:11 1994 Per Bothner (bothner@kalessin.cygnus.com) * parse.c (parse_untyped_expr): Add missing semi-colon. Thu Aug 4 17:40:38 1994 Per Bothner (bothner@kalessin.cygnus.com) * parse.c (parse_untyped_expr): Fix various problem for the case that we see a '(': Add missing 'case' keyword. Only recurse if '(' is followed by 'if', 'case' or '[', and in that case emit a pedwarn (and do a missing NEXT_TOKEN). * parse.c (parse_send_action): Remove extra nreverse. Thu Jul 28 04:00:11 1994 Wilfried Moser (moser@rtl.cygnus.com) * expr.c (build_allocate_global_memory_call, build_allocate_memory_call): Add new checks. Tue Jul 26 22:48:15 1994 Michael Tiemann (tiemann@blues.cygnus.com) * parse.c (parse_untyped_expr): Added missing "case" before LPRN. Added a missing call to `require' as well. Tue Jul 19 10:30:12 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) * lex.l (yywrap): Define as yywrap_chill to avoid conflicts with the extern declaration in the flex skeleton. Mon Jul 18 23:06:04 1994 Per Bothner (bothner@kalessin.cygnus.com) * tasking.c (build_copy_number, build_proc_type, expand_send_signal): Check the type of the instance expr using CH_COMPATIBLE, and not just == instance_type_node. (This allows the expression to have mode READ INSTANCE). * tasking.c (build_instance_type): Give instance_type_node a non-null novelty (i.e. different from a struct). * tasking.c (build_receive_case_start, build_delay_case_start): Check that for a location using CH_LOCATION_P. Mon Jul 18 13:22:23 1994 Jim Wilson (wilson@sphagnum.cygnus.com) * expr.c (finish_chill_unary_op): Use TREE_SET_CODE not TREE_CODE to modify a tree code. Mon Jul 18 11:24:57 1994 Bill Cox (bill@rtl.cygnus.com) * convert.c (digest_structure_tuple): Fix thinko in TREE_CODE comparison. Mon Jul 18 05:40:15 1994 Doug Evans (dje@canuck.cygnus.com) * decl.c (warn_bad_function_cast): Define so cc1chill will link. Thu Jul 14 18:37:18 1994 Per Bothner (bothner@kalessin.cygnus.com) * parse.c (parse_send_action): Do tree_cons *before* checking for end of loop. Mon Jul 11 15:33:52 1994 Per Bothner (bothner@kalessin.cygnus.com) * convert.c (digest_structure_tuple): Don't use convert to coerce initial value, use chill_convert_for_assignment instead. (Thus we also get range_checking.) * expr.c (build_chill_card): Use force_addr_of instead of build_chill_addr_expr. * loop.c (build_temporary_variable): Stylistic tweak. * loop.c (maybe_make_for_temp): Initialize temp using explicitly, not using assignment. Avoids a problem if the expression is read-only. * typeck.c (smash_dummy_type): Always used the saved TYPE_NAME and CH_NOVELTY_FLAG. Wed Jul 6 20:12:13 1994 Per Bothner (bothner@kalessin.cygnus.com) * expr.c, ch-tree.h (finish_chill_unary_op): New function, based on code ripped out of build_chill_unary_op. (build_chill_unary_op): Call finish_chill_unary_op unless pass==1. * satisfy.c (satisfy): Call finish_chill_unary_op when needed. Mon Jun 27 11:29:18 1994 Per Bothner (bothner@kalessin.cygnus.com) * tree.c (save_if_needed), ch-tree.h: New function. * typeck.c (build_chill_slice_with_range, build_chill_slice_with_length): Call save_if_neeed on array arg. * expr.c (varying_to_slice): Re-write to use save_if_needed. * typeck.c (extract_constant_from_buffer): Handle BOOLEAN_TYPE. Mon Jun 27 01:11:10 1994 Wilfried Moser (moser@rtl.cygnus.com) * inout.c (build_chill_io_list_type): Change layout of __tmp_WIO_list that it is always the same, regardless if compiled with -fpack or not. Tue Jun 14 16:44:14 1994 Per Bothner (bothner@kalessin.cygnus.com) * lex.l (yywrap): Kludge to work around mis-synchronization between lexer (which read ahead) and parser: Don't emit (left-over) uze_seizefile directives at the end of file. * typeck.c (build_chill_array_ref): Allow the derived array indexing syntax for arrays of bit strings. Add a comment explaining why. * typeck.c, ch-tree.h (string_assignment_condition): Change the interface. Return a boolean expression (which can be used in a conditional at run-time); never expand anything. * actions.c (chill_convert_for_assignment): Check string_assignment_condition here, rather than in callers. * actions.c (chill_expand_assignment): Don't need to check string_assignment_condition here. * expr.c (build_chill_function_call): Likewise. * satisfy.c (safe_satisfy_decl): Update accordingly. * decl.c (do_decl): Simplify testing and conversion by deferring everything to chill_convert_for_assignment. * parse.c: Combine the two variables 'ignore_exprs' and 'ignore_actions' into one variable called 'ignoring'. * ch-tree.h: Add 'extern int ignoring'. * actions.c, except.c, parse.c, tasking.c, timing.c, typeck.c: Rename ignore_actions and ignore_exprs to ignoring. Remove unneeded extern declarations. * expr.c (build_chill_indirect_ref, build_chill_component_ref, build_chill_arrow_expr, build_generalized_call, build_delay_action, build_buffer_type, build_event_type): I changed my mind. It is cleaner to check for 'ignoring' in the parser, rather than here. * parse.c (parse_action, parse_primval, parse_opt_mode): Therefore we must check for ignoring here. * parse.c (parse_loc_declaration): Set ignoring in pass 2 when parsing the mode. * tasking.c (generate_tasking_code_variable): Do arithmetic on signal_code etc using unsigned rather than signed shorts. * grant.c (static char* current_grant_modename): Removed. * grant.c (decode_decl case CONST_DECL): Remove error message. * Make-lang.in (CHILL_SRCS): Add $(srcdir)/ch/parse.c. * Makefile.in: Fix dependencies for parse.o. Remove some duplicate dependencies for $(TREE_H). Mon Jun 13 14:25:50 1994 Per Bothner (bothner@kalessin.cygnus.com) * typeck.c (build_chill_cast): Allow a value cast between non-discrete object of the same size, but with a pedwarn. * typeck.c (bit_string_assignment_condition, char_string_assignment_condition): Merge near-duplicate functions and place the code in string_assignment_condition. * decl.c (parm_flag, declare_parm_level, in_param_level_p): Removed. Not used. * decl.c (start_chill_function, finish_chill_function): Make parameter level have same nesting level as body, as required by Z200. * decl.c (switch_to_pass_2): Always exit if an error has been found. * decl.c (pop_module): Copy DECL_SEIZEFILE to a new ALIAS_DECL generated from GRANT ALL. * decl.c (lookup_name_for_seizing): Don't seize from the nesting level of builtins (predefined objects). * decl.c (lookup_name_for_seizing): Make more robust on error. * decl.c (start_chill_function): MAKE DECL_NAME (chill_result_decl) be 'RESULT' (or 'result'). This makes it more accessible from gdb. Also, use do_decl to declare it, so that debugging symbols are generated. And, re-arrange so that actions that need to be done both passes (such as push_levels) use the same code. * parse.c (get_type_of): If ignore_exprs, don't lookup name. * parse.c (end_function): Fix poplevel params. * parse.c (expect): Don't read forwards on an error. * parse.c (parse_field): Don't define two tag_list locals! * parse.c (parse_pass_1_2): Better error message. * parse.c (parse_mode, parse_opt_mode): Have parse_mode call parse_opt_mode, rather than vice versa. If parse_opt_mode returns NULL_EXPR, then parse_mode gives an error. Change parse_opt_mode (and any functions it calls) to only return NULL_TREE if there is no mode (even on ignore_exprs). (parse_set_mode, parse_structure_mode, parse_procedure_mode): Never return NULL_EXPR. * tasking.c (build_buffer_type, build_event_type): Return void_type_node instead of NULL_EXPR if ignore_exprs is true. * parse.c (parse_synonym_definition): Call parse_untyped_expr only if we have a mode. * parse.c (parse_send_action): Parse list of untyped_expr's, rather than a list of (typed) expressions. * parse.c (parse_primval): Emit error if '[' seen without preceding mode name. (If this is to be allowed, call parse_untyped_expr instead.) * parse.c (parse_array_index): Renamed to ... (parse_index_mode): ... to match Z200 terminology. Re-write to resolve some of the nastier ambiguities, and allow things like ' CHAR(10) : CHAR(20) '. * parse.c (parse_tuple_element): Change interface to return reversed list, so don't call nreverse. * parse.c (parse_tuple): No longer nreverse element list here. * parse.c (parse_opt_element_list): Do nreverse here instead. * parse.c (parse_case_label_list): Call nreverse at end. Fri Jun 10 15:36:22 1994 Per Bothner (bothner@kalessin.cygnus.com) * typeck.c (chill_similar): Remove bogus "else". Wed Jun 8 00:01:40 1994 Per Bothner (bothner@kalessin.cygnus.com) * ch-tree.h (TYPE_ARRAY_MAX_SIZE): New macro (and comment) to make it clearer that we are using TYPE_MAX_VALUE in a special way. * typeck.c (build_chill_slice): Use TYPE_ARRAY_MAX_SIZE. * expr.c (chill_expand_expr case CONCAT_EXPR): Likewise. * convert.c (convert): When converting a fixed string/array to varying, and we need padding, set the TYPE_ARRAY_MAX_SIZE of (the type of) the padding. * convert.c (convert): If the concatenation is non-constant, use the low-level 'build' to set the type of the result (which is usually a fixed-size array) rather than depend on build_chill_binary_op to figure it out (it's unable to simplify the size to a constant). Mon Jun 6 18:16:57 1994 Per Bothner (bothner@kalessin.cygnus.com) * lang.c (lang_decode_option): Let -fspecial_UC imply -fno-ignore-case without requiring it explicitly. * lang.c (lang_decode_option): Support (experimentally) the -fpack and -fno-pack flags. Thu Jun 2 20:49:51 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) * configure: Add support for --program-prefix and --program-suffix. Tue May 31 18:12:00 1994 Per Bothner (bothner@kalessin.cygnus.com) * convert.c (digest_constructor): Check that initial value is compatible with element mode before calling convert. * typeck.c (chill_compatible): A string mode is not compatible with an untyped constructor. * decl.c (do_decl): Clean up error messages. Use error_with_decl. * ch-tree.h: Fix inconsistencies: bool_true_node -> boolean_true_node, and bool_false_node -> boolean_false_node. * typeck.c (valid_array_index_): Minor simplification. Tue May 31 04:33:28 1994 Wilfried Moser (moser@rtl.cygnus.com) * inout.c (build_chill_writetext): Add correct processing of POWERSET RANGE (setmode). * lex.l (same_file): Add searching for file(s) in seize_path_list. Fri May 27 14:22:42 1994 Per Bothner (bothner@kalessin.cygnus.com) * Make-lang.c (CHILL.mostlyclean, CHILL.distdir): Don't list yacc/bison output files, since the grammer is no longer in yacc. * config-lang.in (diff_excludes): Likewise. Thu May 26 16:38:13 1994 Per Bothner (bothner@kalessin.cygnus.com) * gperf, hash.h, lex.l, parse.h: Rename PROCESS_TYPE token (in some files spelled PROCESS_TYPE_ to avoid clashes with the PROCESS_TYPE tree_code) to PROCESS_TYPE_TOKEN. Thu May 26 02:18:28 1994 Wilfried Moser (moser@rtl.cygnus.com) * timing.c (build_cycle_start): Change call to __define_timeout. * decl.c (init_decl_processing): Change definitions of __define_timeout and __wait_timeout. Wed May 25 11:53:09 1994 Per Bothner (bothner@kalessin.cygnus.com) Replace yacc-based parser with a recursive-decent parser. (This may seem backwards, but Chill [like C++] is not a language that is remotely LALR(1). Using a R-D parser allows us to use look-ahead and to back-up to resolve the difficult ambiguities.) * parse.y: Removed. * parse.c, parse.h: New files, containing new r-d parser. * Makefile.in: Update accordingly. * actions.c (chill_convert_for_assignment): Don't return NULL_EXPR if ignore_exprs is true. It simplifies the parser if we consistently reserve NULL_EXPR for a missing expression. * expr.c (build_chill_function_call): Likewise. * lex.l: Tweaks for new parser. * lex.l (prepare_paren_colon, paren_paren_colon_level, paren_level): Ugly hack no longer needed. * expr.c (build_chill_function_call): Cleanup. Call chill_convert_for_assignment to convert IN/INOUT paramaters on both input and output. For LOC parameters, give error if actual is a non-referable location. * actions.c (convert_for_assignment): Add new parameter (a "place" string used in error messages). * actions.c (adjust_parm_or_field): Removed. * actions.c (chill_expand_assignment): Take just a single LHS, and move support for multiple assignments to ... (expand_assignment_action): ... here. Some cleaning up. * timing.c (build_cycle_start): Adjust accordingly. * actions.c (expand_assignment_to_varying_array): Likewise. * tasking.c (many places): Ditto. * ch-tree.h: Fix declarations appropriately. * parse.c (parse_defining_occurrence_list): Return a single IDENTIFIER_NODE (instead of a singleton list) in the common case. Minor complication to save a minor amount of space. * decl.c (do_based_decls): Move guts of code into ... (do_based_decl): ... this new function. * decl.c (do_decls): Handle either IDENTIFIER_NODE or a TREE_LIST. * decl.c (push_syndecl): Replace by ... (push_syndecl): ... (which only supports a single name). (push_modedef): Only handle a single name. * tasking.c (build_process_header, build_signal_struct_type): Adjust accordingly. * expr.c (build_generalized_call): Handle string repetition. * expr.c (build_chill_repetition_op): Change interface. * grant.c (decode_constant): Allow parameter list to be a non-TREE_LIST. (Used for string repetition.) Wed May 25 11:28:48 1994 Per Bothner (bothner@kalessin.cygnus.com) * lex.l (make_identifier): Replaced by ... (read_identifier, handle_name): ... new functions. * lex.l: Parse an identifiers using read_identifier using read_identifier and handle_name, rather than having [f]lex do it. (One reason is that lex uses a fixed-size buffer.) * lex.l (read_directive, skip_directive): New functions. Use them to parse compiler-directives, instead of rather ugly and useless use of lexer start conditions. Tue May 24 22:36:51 1994 Per Bothner (bothner@kalessin.cygnus.com) * decl.c (unnamed_module_number): Renamed to ... (module_number): .. and make non-static. (push_module): Always increment module_number. * lex.l (yywrap): Print warning if no modules seen. * decl.c (pop_module): Don't set DECL_SEIZEFILE of granted decl to current_seizefile_name (which is unreliable). * grant.c (chill_grant): Set it here instead. * expr.c (fold_set_expr): Use int_size_in_bytes instead of TYPE_PRECISION (which is not defined for a SET_TYPE). Fri May 20 15:21:26 1994 Per Bothner (bothner@kalessin.cygnus.com) Cleanup to remove need for variables in common storage. * decl.c: Remove unused use of current_obstack. * actions.c (maybe_chill_check_decl): Remove unused function. * actions.h, lang.c: Remove uses of doing_chill_thang. * ch-tree.h (void_list_node): Make extern (rather than common). * decl.c (void_list_node): Add definition. Thu May 19 06:54:56 1994 Wilfried Moser (moser@rtl.cygnus.com) * configure (build): Build canon_host and canon_target to pass it to all subsequently generated Makefiles (needed for testsuite/execute in case of cross build). Wed May 18 13:27:12 1994 Per Bothner (bothner@kalessin.cygnus.com) * grant.c (decode_mode): Remove. It checks the TYPE_NAME of the input type, which loses with the no-longer-new 2-pass implementation, since the input "type" could be an IDENTIFIER_NODE. * grant.c (raw_decode_mode): Rename to decode_mode. Tue May 17 13:19:52 1994 Per Bothner (bothner@kalessin.cygnus.com) * typeck.c (chill_location): Neither a STRING_CST nor a CONSTRUCTOR is a location. * typeck.c (chill_root_mode): Convert a function to a pointer-to-function. * expr.c (build_chill_indirect_ref, build_chill_component_ref, build_chill_arrow_expr): If ignore_exprs, return operand rather than NULL_EXPR. This makes it easier for the parser to distinguish missing expressions. * expr.c (build_max_min): Convert the lower bound of a set to a long before calling run-time routine. * expr.c (build_chill_pred_or_succ): Use discrete_type_p to check the argument type. * expr.c (build_chill_arrow_expr): If argument is not a location, do a predwarn if it is a STRING_CST or has function type. Tue May 17 06:05:13 1994 Wilfried Moser (moser@rtl.cygnus.com) * configure (build): Remove building of canon_host and canon_target. It doesn't work in any case. Mon May 16 02:10:35 1994 Wilfried Moser (moser@rtl.cygnus.com) * configure (build): Build canon_host and canon_target to pass it to all subsequently generated Makefiles (needed for testsuite/execute in case of cross build). * Make-lang.in (chill-runtime): Change chill to CHILL in the case statement to build chill-runtime automatically. Mon May 9 15:30:08 1994 Doug Evans (dje@canuck.cygnus.com) * Makefile.in (FLAGS_TO_PASS): Define. (OBJDEPS): Define. (../cc1chill): Depend on $(OBJDEPS) $(C_OBJS). * Make-lang.in (cc1chill): Delete dependency on $(OBJS) $(BC_OBJS). (CHILL.mostlyclean): Use `mostlyclean' as recursive target. Sun May 8 13:05:00 1994 Per Bothner (bothner@cygnus.com) * Make-lang.in (cc1chill): Should not depend on libgcc.a. Thu May 5 18:58:22 1994 Per Bothner (bothner@kalessin.cygnus.com) * decl.c (copy_lang_decl): New (dummy) function. Mon May 2 14:33:44 1994 Per Bothner (bothner@kalessin.cygnus.com) * parse.y (sendaction): Fix thinko (in sense of condition). * tasking.c (build_receive_case_label): Another thinko. * parse.y (optsigdest): Force ignore_exprs to 0 while parsing the (signal-)name. * decl.c (build_chill_function_type): Don't call layout_type (since that may prevent parameter or result types being properly satisfied). * satisfy.c (satisfy): Layout FUNCTION_TYPEs. * parse.y (procmode): Call build_chill_pointer_type, rather than build_pointer_type (which incorrectly sets TYPE_SIZE). * parse.y (get_type_of): Handle TYPE_DECL (again). * parse.y (optresultspec): Call build_chill_reference_type, rather than build_reference_type (which incorrectly sets TYPE_SIZE). * parse.y (range_or_mode): Rename to plain range, since it no longer matches modename. * actions.c (chill_handle_case_label_range): New function, with functionality moved out of chill_handle_case_label. * actions.c (chill_handle_case_label): Handle here the case that the label_value is a TYPE_DECL (modename). Also clean up some. * typeck.c (build_chill_slice_with_length): Convert max_index to the type of min_value. (Old code broke on varying strings.) Sun May 1 13:53:36 1994 Doug Evans (dje@canuck.cygnus.com) * Makefile.in (BC_OBJS): Delete all references (OBJS): Cat ../stamp-objlist to get language independent files. (../cc1chill): Delete dependency on $(OBJS). * Make-lang.in (cc1chill): Depend on stamp-objlist. Sat Apr 30 14:50:15 1994 Per Bothner (bothner@kalessin.cygnus.com) * lex.h, lex.c: Remove lastiddecl. * lex.l (name_type_signal): Simplify. We no longer check for TYPENAME or SIGNALNAME (which was unreliable with two passes). Also rename to make_identifier. * parse.y: Cleaned up grammar to not need SIGNALNAME or TYPENAME. * Makefile.in (stamp-parse); One conflict fewer! * parse.y (rccase_label_flag): Moved to tasking.c. * parse.y (rccase_label): Move most of the logic to build_receive_case_label in tasking.c. * parse.y (sendaction): Re-write to not depend on SIGNALNAME. * parse.y (name): Do name lookup here (and not in location). * parse.y: Replace most uses of NAME by higher-level non-terminals: simple_name_string, name_string, defining_occurrence, or name. * tasking.c (build_receive_signal_case_label, build_receive_buffer_case_label): New functions, split out from build_receive_case_label. * tasking.c (build_receive_case_label): Change parameters and return type. Moved stuff here (from the parser). * tasking.c (struct rc_state_type): Removed had_errors. Return error_mark_node instead. * tasking.c (build_rccase_set_error), ch-tree.h: Removed. * expr.c (build_generalized_call): If func is a signal type, call build_signal_descriptor. * parse.y (arrayindex): Renamed to index_mode, to match Z.200. * parse.y (ioindexmode): Removed; use index_mode instead. * expr.c (build_generalized_call): If args is a RANGE_EXPR, we have either a slice or a range mode, depending on func. * parse.y (index_mode): If we got an 'expr', only allow a name, or a range mode. * parse.y (call): A slice with both end points can be a range mode, so defer handling to build_generalized_call (or index_mode). * typeck.c (build_chill_slice_with_length): Fix type-checking. * typeck.c (chill_novelty): Undo (part of) change of April 28: The novelty of a range mode is the novlety of the parent. * typeck.c (chill_root_mode): Don't return integer_type_node if argument has non-nil novelty. * decl.c (global_bindings_p): Return -1 as true, for the sake of variable_size (in ../stor-layout.c). Fri Apr 29 13:42:43 1994 Per Bothner (bothner@kalessin.cygnus.com) * parse.y: Remove TYPENAME and modename. These are now plain NAMEs. Modify parsing actions appropriately. * expr.c (build_generalized_call): Handle the case that TREE_CODE (func) == TYPE_DECL (as in a cast). * lex.l (name_type_signal): Never return TYPENAME. * parse.y (get_type_of): If pass 1, just return the argument. * decl.c (do_decl): If an initializer has the wrong type, replace it by NULL_TREE, to avoid subsequent errors. Thu Apr 28 15:21:56 1994 Wilfried Moser (moser@rtl.cygnus.com) * Makefile.in: Add new file timing.c to rules. * timing.c: New file. Implements the timing actions AT, CYCLE and AFTER. * decl.c (init_decl_processing): Add new builtin function descriptions. * expr.c (build_chill_indirect_ref): Change error message and add check agains an IDENTIFIER_NODE. * gperf, hash.h: Change EVENT_CODE, BUFFER_CODE to IGNORED_DIRECTIVE. They are no longer needed. * grant.c (print_integer_type): Add processing of builtin types DURATION and TIME. * lex.l: Remove processing of directive EVENT_CODE & BUFFER_CODE. * parse.y (timingactions): split up to afteraction, ataction and cycleaction. * parse.y (afteraction): New rule. * parse.y (ataction): New rule and put actions in. * parse.y (cycleaction): New rule and put actions in. * parse.y (sendaction): Add code for SEND buffer. * parse.y (rccase_label): Change error processing. * tasking.c (build_gen_inst): More checks. * tasking.c (build_gen_code): Add checking for argument is a PROCESS or a SIGNAL. * tasking.c (struct rc_state_type): Add new fields for easier error processing. * tasking.c (build_receive_case_if_generated), ch-tree.h: New function. * tasking.c (build_rccase_set_error), ch-tree.h: New function. * tasking.c (build_receive_case_label): Add processing of BUFFER's. * tasking.c (build_receive_buffer_case_end, build_receive_signal_case_end): New functions to process the end of a RECEIVE CASE action in case of BUFFER's and SIGNAL's. * tasking.c (build_receive_case_end): Do only general processing and call one of the above mentioned functions. * tasking.c (build_delay_case_start, build_delay_case_label, build_delay_case_end): Rewritten due to new implementation of events. * tasking.c (build_delay_action): Rewritten due to new implementation of EVENT's. * tasking.c (expand_send_buffer), ch-tree.h: New function. * timing.c (build_at_action, build_cycle_start, build_cycle_end), ch-tree: New functions. Thu Apr 28 14:11:29 1994 Per Bothner (bothner@kalessin.cygnus.com) * typeck.c (smash_dummy_type): Handle the special case of a NEWMODE of a range mode, as required by Z200, by creating a new parent mode with the new novelty (and casting the min and max of the range to teh new parent mode). * typeck.c (chill_novelty, chill_root_mode): Remove special kludges for of NEWMODE ranges. * expr.c (build_chill_lower_or_upper): New function, combining the "guts" of build_chill_lower and build_chill_upper. * expr.c (build_chill_lower_or_upper): Simplify; no longer need to kludge the novelties. * typeck.c (valid_array_index_p): A string index expression need not be Compatible with the index type; only similar. * decl.c (layout_chill_variants): If error seen, skip stuff (rather than aborting or crashing). * decl (push_modedef): If newdecl's type is an error mark, continue rather than aborting. Thu Apr 28 02:07:42 1994 Doug Evans (dje@cygnus.com) * Make-lang.in: Update of directory reorg from fsf. * config-lang.in: Ditto. Mon Apr 25 13:09:46 1994 Per Bothner (bothner@kalessin.cygnus.com) * typeck.c (chill_similar): Check RECORD_TYPEs properly, * convert.c (convert): If all else fails, just call convert1. Thus we can now convert RECORD_TYPEs (assuming they are similar). * parse.y, lex.l: Remove BUFFERNAME (use location/expr instead). * parse.y: Re-do BUFFER handling (similar to previous EVENT change). * grant.c (raw_decode_mode): Re-do BUFFER mode handling. * ch-tree (lang_type_record): Removed max_queue_size field. * tasking.c (build_buffer_type): Re-write. * tasking.c (max_queue_size): Fix to support buffer modes. * tasking.c (buffer_element_mode), ch-tree.h: New function. * tasking.c ch-tree.h (expand_send_buffer): Now has 3 parameters. * parse.y (modename): No longer match SIGNALNAME. Instead, add it to name and simple_name_string. This removes a reduce/reduce conflict. * Makefile.in (stamp-parse): Expect fewer conlicts. * lex.l (yywrap): Move check for circularly seizeing current grant-file from here ... * lex.l (handle_use_seizefile_directive): ... to here. This is to avoid calling stat on a not-yet written grantfile, now that we're using same_file (which calls stat). * grant.c (set_use_this_gf): Removed. * grant.c (set_default_grant_file): Set grant_file_name here, because we need it earlier (due to above lexer change). * typeck.c (layout_chill_struct_type): Remove useless code to remove zero-width bitfield (which messes up CONST_DECLs). Sat Apr 23 13:16:39 1994 Bill Cox (bill@rtl.cygnus.com) * Makefile.in (check): Assure that 'ld' is available before checking. Thu Apr 21 13:23:54 1994 Per Bothner (bothner@kalessin.cygnus.com) * grant.c (print_an_int): Removed. (raw_decode_mode): Generalized to use decode_constant instead of print_an_int. (decode_constant): Print directly, instead of calling print_an_int. * parse.y (event_list): Fix syntax. * parse.y (optqueuesize): Default is NULL_TREE, not zero. * tasking.c (check_queue_size): New function, for error checking. * ch-tree.h: Add declaration for check_queue_size. * satisfy.c (satisfy case RECORD_TYPE): Satisfy constant fields (used for queue size of EVENT and BUFFER), and call check_queue_size. Tue Apr 19 13:42:41 1994 Per Bothner (bothner@kalessin.cygnus.com) Re-implement EVENT modes to support general EVENT objects (and not just EVENT names), according to Z200. (Not finished!) * tasking.c, ch-tree.h (max_queue_size): New function. * parse.y (dcalternative, event_list, event_list_head): New implementation of DELAY CASE, avoiding parsing ambiguities. (call, locdec, delayaction): Remove old EVENTNAME kludges. * lex.l (name_type_signal): Remove EVENTNAME recognition. * tasking.c (build_event_type): Re-written. * typeck.c (chill_similar), decl.c (print_lang_type): Use new max_queue_size function. * typeck.c (layout_chill_struct_size): Ignore CONST_DECL. * tasking.c (build_delay_action): Preliminary changes - just to make it compile. FIXME! * grant.c (raw_decode_mode): Use new max_queue_size function. Move EVENT support from LANG_TYPE to RECORD_TYPE. * ch-tree.h (process_event_decls): Removed. Tue Apr 19 11:44:01 1994 Bill Cox (bill@rtl.cygnus.com) * regression.sh: Complete previous change - eliminate all references to objdir as a user parameter. Mon Apr 18 10:17:55 1994 Bill Cox (bill@cygnus.com) * Makefile.in (check): Simplified regression.sh call. * regression.sh: Change command-line parsing. Default srcdir to the script's path. Calculate objdir internally - don't pass it in. Thu Apr 14 13:30:19 1994 Wilfried Moser (moser@phishhead.cygnus.com) * expr.c (build_chill_duration): Add range checking. * lex.l (init_lex): Add predefined names DURATION and TIME. * lex.h (enum rid): Add RID_DURATION and RID_TIME. * ch-tree.h: Add prototypes and externals. * decl.c (init_decl_processing): Add builtin function descriptions. * expr.c (build_generalized_call): Add processing of some builtin's. * expr.c (build_chill_abstime): New function to process builtin ABSTIME. * expr.c (build_chill_inttime_type): New function to built type for the INTTIME builtin. * expr.c (build_chill_inttime): New function to process builtin INTTIME. * expr.c (build_chill_duration): New function to process builtin's MILLISECS, SECS, MINUTES, HOURS and DAYS. Tue Apr 12 11:55:45 1994 Per Bothner (bothner@kalessin.cygnus.com) * lex.l (chill_same_grant_file): Rename to same_file. Change to take two files names rather than two DECLs. Also check that the filesystems (st_dev) are equal. Finally, make static. * lex.l (handle_use_seizefile_directive): Check for duplicate USE_SEIZE_FILE directives using same_file. * decl.c (pop_module): Remove dubious call to chill_same_grant_file. Sun Apr 10 17:19:56 1994 Per Bothner (bothner@kalessin.cygnus.com) * decl.c, ch-tree.h (chill_result_decl): New variable. Used to store RESULT value. (Cannot use DECL_RESULT; see comment in decl.c.) * actions.c (chill_expand_result, chill_expand_return): Use chill_result_decl appropriately. * ch-tree.h, decl.c, actions.c (saved_result_rtx): Removed. Subsumed by chill_result_decl. * expr.c (chill_expand-expr case CONCAT_EXPR): Generate temporary using the mode of the result type, and don't assume it is BLKmode. Fri Apr 8 17:46:13 1994 Per Bothner (bothner@kalessin.cygnus.com) * actions.c (chill_expand_assignment): Check for compatibility _after_ "expanding out" a binary operation. This fixes the case "STRING //:= CHAR". * lex.l (equal_number): Convert symbol to integer_type_node, to force the value to be INT-derived (and avoid novelty conflicts). Mon Apr 4 22:06:31 1994 Per Bothner (bothner@cygnus.com) * ch-tree.h (CH_FUNCTION_SETS_RESULT): New flag. * ch-actions.c (chill_expand_return), ch-tree.h: Extra parameter, indicates if implicit return at end of function. * ch-parse.y: Modify accordingly. * ch-actions.c (chill_expand_return): Various improvements. * decl.c, ch-tree.h (result_never_set): New variable. * actions.c (chill_expand_result, chill_expand_return): Clear it. * ch-parse.y (end_function): Warn if no RETURN or RESULT action. * decl.c, ch-tree.h (saved_result_rtx): New variable. * decl.c (start_chill_function): Use saved_result_rtx as return value if there is a RESULT in a REG that might get clobbered. * actions.c (chill_expand_result): Save result in saved_result_rtx or assign to DECL_RESULT as appropriate. * decl.c, ch-tree.h (current_function_returns_value, current_function_returns_null, current_extern_inline): Don't use. Only define first two to allow linking with ch-typeck.c. * typeck.c (chill_l_equivalent): Add forward declaration. Fri Apr 1 11:02:27 1994 Wilfried Moser (fs_moser at rcsw47) * lex.l (readstring): Handle control sequence in all cases (Z.200 5.2.4.4 page 54). Fri Apr 1 13:11:27 1994 Per Bothner (bothner@kalessin.cygnus.com) * configure: Simplify and fix the logic for looping through sub-directories. Thu Mar 31 18:59:57 1994 Per Bothner (bothner@kalessin.cygnus.com) * ch-tree.h (CH_L_EQUIVALENT): Moved from typeck.c. * typeck.c (chill_similar): Add support for checking FUNCTION_TYPEs for similarity. Also, treat pointer-to-function-type the same as function-type. Thu Mar 31 11:22:56 1994 Wilfried Moser (fs_moser at rcsw47) * ch-tree.h: Change prototype of function expand_send_signal. * parse.y: Change calls to expand_send_signal. * tasking.c (expand_send_signal): Change handling of optsetto argument. New argument signame to get a possible destination process for the signal. Wed Mar 30 14:54:48 1994 Wilfried Moser (fs_moser at rcsw1j) * tasking.c (make_process_struct): Change error message in case of a process argument has other attribute then IN or LOC. * tasking.c (build_start_process): Add check that the optset is referable in case it is specified (this makes noncompile/start_.ch working). Tue Mar 29 13:24:27 1994 Wilfried Moser (fs_moser at rcsw1h) * Makefile.in: Change version string to 1.2.1 * ch-tree.h (enum chill_built_in_function): Delete no longer valid entries. * ch-tree.h: Change prototype for build_chill_readtext. * decl.c (init_decl_processing): Add builtin_function _readstring, _readunixstd and READTEXT. * expr.c (build_generalized_call): Add processing of READTEXT. Delete handling of no longer valid builtin_functions. * gperf: Remove keyword READTEXT. * parse.y: Remove token READTEXT. * inout.c (build_chill_io_list_type): Add building type for READTEXT. * inout.c (build_chill_readtext): Implement the function (partial). * inout.c (build_chill_writetext): Do some cleanups. Tue Mar 29 12:30:59 1994 Per Bothner (bothner@kalessin.cygnus.com) * typeck.c (build_chill_cast): Re-arrange, to support casts of const integer to type of different size, if there is an integral type of the desired size: Go through the const conversion code. * actions.c (adjust_parm_or_field): Move support for LOC to ... * expr.c (build_chill_function_call): ... here. Fix a number of bugs in OUT/INOUT handling. * ch-tree.h, actions.c (adjust_parm_or_field), grant.c (print_struct), parse.y (location), typeck.c (chill_comptypes): Remove unused support for ENCAPSULATED_ARRAY_P. * typeck.c (build_chill_array_parm_type), ch-tree.h: Remove; unused. * ch-tree.h, decl.c (shadow_record_fields), decl.c (shadow_record_fields), expr.c (chill_expand_case_expr, build_chill_function_call), grant.c (chill_finish_compile), typeck.c (build_empty_string, build_init_struct): Rename magic identifiers of the form "<...>" to "__..." for better portability. * actions.c (adjust_parm_or_field): Remove extraneous call to build_chill_repetition_op. * expr.c (build_chill_function_call): Some simplifictions (since neither valtail nor typetail can be NULL). Clean up error message for OUT//INOUT not location to use only 1 line. Add error message for OUT/INOUT if type is READonly. * typeck.c (build_chill_modify_expr): Simplify. Sun Mar 27 19:30:25 1994 Bill Cox (bill@rtl.cygnus.com) * Makefile.in: Clean up generally. Assure that runtime is built before running regressions. Build correct parameters to regression.sh. Remove a lot of 'clean' cruft. * Make-lang.in, config-lang.in: New files for subdirectory architecture. Sat Mar 26 10:39:12 1994 Bill Cox (bill@rtl.cygnus.com) * Makefile.in (check): Build correct parameters for regression.sh. Fri Mar 25 10:13:06 1994 Bill Cox (bill@rtl.cygnus.com) * configure: Also mark regression.awk3 as executable. * regression.sh: Add comments about command-line options. Calculate srcdir correctly, defaulting to the script's path. Add OPT flag to pass to the Makefiles, to specify the compiler's optimization level, and -O and -O2 options. Delete GLOBAL flag and tests. Use a different make.log file for optimized and unoptimized test results. Add the compiler's host and target triples to the report header. Wed Mar 23 21:41:26 1994 Bill Cox (bill@rtl.cygnus.com) * expr.c (build_chill_function_call): Handle INOUT and OUT parameters better (for the rangefail test, at least). Wed Mar 23 14:13:45 1994 Per Bothner (bothner@kalessin.cygnus.com) * regression.sh (srcdir, objdir): Fixed hard-wired paths. (grep args): Changed [XYZ-] to [-XYZ] for SCO. Wed Mar 23 13:34:18 1994 Bill Cox (bill@rtl.cygnus.com) * expr.c (build_generalized_call): Revert previous change. To do this correctly, we need a new parsing mechanism, and C++ initializer technology. Wed Mar 23 09:34:50 1994 Bill Cox (bill@rtl.cygnus.com) * expr.c (build_generalized_call): Be sure we're inside the module-level function before calling build_gen_inst, for example. Wed Mar 23 09:34:50 1994 Bill Cox (bill@rtl.cygnus.com) * regression.sh (dodirectory): Count the gcov and abort tests among the .dat files. Tue Mar 22 15:39:38 1994 Per Bothner (bothner@kalessin.cygnus.com) * satisfy.c (safe_satisfy_decl): When checking that a SYN value fits in a specified discrete type, don't convert first, and use compare_int_csts instead of tree_int_cst_lt. Tue Mar 22 15:25:38 1994 Bill Cox (bill@rtl.cygnus.com) * configure: Generate better .gdbinit files. Tue Mar 22 11:59:38 1994 Per Bothner (bothner@kalessin.cygnus.com) * actions.c (check_range): Don't emit dynamic checks if not current_function_decl. * parse.y (arrayindex): Allow expr (error is emitted at semantic level if not the NAME of a type). * typeck.c (build_chill_cast): Re-enable some casts. * satisfy.c (safe_satisfy_decl): Remove redundant CONST check. Tue Mar 22 11:46:28 1994 Bill Cox (bill@rtl.cygnus.com) * configure: Access the utils directory correctly. * expr.c (build_compare_expr): Reenable compatibility test. Tue Mar 22 11:24:45 1994 Per Bothner (bothner@kalessin.cygnus.com) * typeck.c (valid_array_index_p): Call build_compare_discrete_expr instead of build_compare_expr. * typeck.c (build_chill_cast): Improve logic. * satisfy.c (safe_satisfy_decl): Simplify test. Tue Mar 22 10:17:58 1994 Bill Cox (bill@rtl.cygnus.com) * actions.c (chill_expand_assignment): Correct detection of string assignment case. * expr.c (chill_expand_expr): Now that we're using build_chill_function_call, the actual parameters need to be converted to the unsigned long type explicitly. Do that. * satisfy.c (safe_satisfy_decl): Correct range-checking code. Mon Mar 21 16:25:07 1994 Bill Cox (bill@rtl.cygnus.com) * Makefile.in: Correct prediction of grammar conflicts. * actions.c(check_range): Fix reference to NULL_TREE pointer. And allow compile-time errors even if range_checking is off. * parse.y: Clean up some comments. * satisfy.c (safe_satisfy_decl): Add range-check for a SYN's value. Mon Mar 21 13:29:23 1994 Per Bothner (bothner@kalessin.cygnus.com) * typeck.c (layout_chill_range_type): Instead of tree_int_cst_lt use compare_int_csts (which is more robust when signedness differs). Also, convert the bounds *after* doing range checking. * ch-tree.def (SET_IN_EXPR): New. * expr.c (chill_expand_expr): Code to expand SET_IN_EXPR, moved from expand_expr in ../expr.c. Also add some extra conversions (because we're now using build_chill_function-call). * actions.c, decl.c, expr.c, grant.c, parse.y, typeck.c: Use SET_IN_EXPR in place of IN_EXPR. * expr.c (build_compare_discrete_expr), ch-tree.h: New function, with code moved from build_compare_expr. * expr.c (build_compare_expr): Re-enable compatibility test. Mon Mar 21 11:02:33 1994 Bill Cox (bill@rtl.cygnus.com) * Makefile.in: Rewrite byacc related rules. * actions.c (chill_convert_for_assignment): Use the referenced type only for generating range checks. * configure: Add 'utils' directory to SUBDIRS variable. Sun Mar 20 21:49:59 1994 Bill Cox (bill@rtl.cygnus.com) * actions.c (check_range): Call build_compare_expr rather than build_binary_op. (adjust_parm_or_field): Call convert_for_assignment rathern than convert, to get the range-checking. * expr.c (build_chill_pred_or_succ): Fix up rangefail code. Generate a compile-time message if possible. (build_compare_expr): Comment out compatibility test - should not be needed in here. Fix a couple of typos. Add some types to some build calls. Sun Mar 20 11:48:10 1994 Per Bothner (bothner@kalessin.cygnus.com) * decl.c (init_decl_processing): Clean up parameter type list for __setbitpowerset, * typeck.c (chill_compatible_classes): Allow the M-reference to be compatible with the N-value class, with suitable M and N. * typeck.c (build_chill_slice): Don't smash a void TREE_TYPE. (We don't need to, and it causes confusion.) * expr.c (build_compare_expr): Fix thinko. Add save_exprs. * expr.c (build_compare_expr): Fix a transcription bug (for converting NULL INSTANCEs). Also #include convert.h. * expr.c (compare_int_csts): New. Compare INTEGER_CSTs. Works even if their types have different TREE_UNSIGNED. * expr.c (finish_chill_binary_op): Moved code dealing with the comparison operators from here ... * expr.c (build_compare_expr): ... to new function here. Also, for discrete types, tries to Do The Right Thing, even for differing values of TYPE_PRECISION and TREE_UNSIGNED. the code from lay * ch-tree.h: Declare new functions. * typeck.c (valid_array_index_p): Various cleanups, including using new build_parse_expr. * parse.y: Use new build_compare_expr. * inout.c (build_chill_writetext): Handle REFERENCE_TYPE args. Sun Mar 20 08:54:27 1994 Bill Cox (bill@rtl.cygnus.com) * actions.c (expand_assignment_to_varying_array): Call build_chill_array_ref to get index checking. (chill_convert_for_assignment): Delete unused errstr variable. (chill_expand_assignment): Call build_chill_array_ref to get runtime index checking. (expand_varying_length_assignment): Use new interface to varying_array_index_p. * ch-tree.h (varying_array_index_p): New proto. * convert.c (convert): Call build_chill_array_ref to get runtime index checking. * expr.c (build_chill_pred_or_succ): Fix cond tree to have consistent operand types. * typeck.c (valid_array_index_p): Change interface to pass validity conditions back on caller's TREE_LIST. We cannot link the conditions to anything which a layout_type routine will expand, since that will occur before the exception handler is set up. Change calls to valid_array_index_p also. Fri Mar 18 14:40:50 1994 Per Bothner (bothner@kalessin.cygnus.com) * actions.c, except.c, loop.c, tasking.c: Call build_chill_function_call instead of the C-specific build_function_call. * except.c (initialize_exceptions): Fix parmtype of __builtin_setjmp. * loop.c (top_loop_end_check): Coerce library function arg. * convert.c, expr.c: Re-write to avoid calls to C-specific function build_unary_op (e.g. by calling build1 directly). * typeck.c (chill_equivalent): Change to force failure for non-matching integral types (even if not ranges). * typeck.c, ch-tree.h (build_chill_slice): Make non-static. * expr.c (varying_to_slice): Call build_chill_slice (and not build_chill_slice_with_length, which does bunches of range checking and does not allow the length to be zero). * convert.c (convert): Fix off-by-one error. * actions.c (chill_expand_array_assignment): Minor cleaning up. Fri Mar 18 00:12:48 1994 Per Bothner (bothner@deneb.cygnus.com) * decl.c (init_decl_processing): __lepowerset and __ltpowerset take *two* pointer parameters, not one. * satisfy.c (satisfy): Only call the appropriate layout routine if TYPE_SIZE is 0 (i.e. type hasn't already been laid out). * typeck.c (build_chill_slice_with_length): Fix Bill's previous fix. Thu Mar 17 17:29:43 1994 Bill Cox (bill@rtl.cygnus.com) * expr.c (build_chill_function_call): Give function call the correct type tree. * typeck.c (build_chill_slice_with_length): Restore dynamic range checking, so it doesn't obscure the CONSTANTness of the length. Wed Mar 16 17:23:31 1994 Per Bothner (bothner@kalessin.cygnus.com) * typeck.c (build_chill_slice), expr.c (chill_expand_expr [case CONCAT_EXPR]): Remove kludge setting slice size upper bound in TYPE_LANG_SPECIFIC, and restore kludge setting it in MAX_VALUE. * typeck.c (build_chill_slice): Use TYPE_MAX_VALUE of array_type if needed for size upper bound of slice_type. * expr.c (build_concat_expr): Improve calculation of size upper bound. * typeck.c (valid_array_index_p): Check compatibility using correct types. * typeck.c (build_chill_slice_with_length); For now revert calling valid_array_index_p on length. (It makes it harder to realize when the slice is constant length.) * expr.c (build_chill_indirect_expr): Minor tweak. (This seems to work around a weird C compiler bug. ??) * expr.c (build_chill_function_call): Cleanup so it doesn't call build_function_call (in c-typeck.c). * typeck.c, expr.c: Use build_chill_function_call instead of build_function_call (in c-typeck.c). * parse.y (discrete_mode): Move some of the rules from non_array_mode into new non-terminal. (arrayindex): Use discrete_mode (with NAME and TYPENAME) to avoid some misparses. * ch-tree.h (SLICE_PTR, SLICE_LENGTH): Removed; unused. * convert.c (digest_structure_tuple): Add missing parameter. * decl.c (comptypes): Remove unused prototype. * decl.c (build_chill_function_type): Handle NULL return_type correctly (convert to void_type_node). * decl.c (init_decl_processing): layout boolean_type_node *after* we've set it's TYPE_MIN_VALUE and TYPE_MAX_VALUE. Wed Mar 16 16:08:22 1994 Bill Cox (bill@rtl.cygnus.com) * ch-tree.h: Add prototype. * convert.c (convert): Correct calculation of padding length. * decl.c (grok_chill_fixedfields): Move ignore_exprs test to parse.y where it belongs. This permits the removal of a kludge in make_process_struct. * lex.l, parse.y: Call to_global_level for several errors. Add code to output error in only one pass. * tasking.c (make_process_struct): Delete kludge inserted on March 8. (build_receive_case_end): Add Wilfried's check for errors. Tue Mar 15 08:42:12 1994 Bill Cox (bill@rtl.cygnus.com) * actions.c: Fix comment. (build_rts_call): Ifdef it out - never used. (expand_varying_length_assignment): call valid_array_index_p. rather than validate_varying_array_ref. * ch-tree.h: Fix prototype for valid_array_index_p. * expr.c (chill_expand_expr): Call build_chill_array_ref to get index validation. (build_hill_lower, build_chill_upper): Return value now inherits the novelty of the input parameter. (varying_to_slice): Use CH_NOVELTY macro rather than calling chill_novelty directly. * grant.c (newstring): Make len unsigned and cast xmalloc parameter to unsigned. (print_integer_type): Pass string value as APPEND's second parameter. (decode_decl): Pass a boolean expression as print_proc_tail's first parameter. (chill_finish_module_code): Make xmalloc's parameter unsigned. * lex.l: Pass sizes to xmalloc as unsigned ints. Pass second parameter to in_word_set as unsigned. * loop.c (build_loop_start): Check top_loop_end_check return value. * parse.y: Add casts to int for third do_decls parameter, fifth build_loop_iterator parameter, etc. * tasking.c (build_receive_case_end): Chack cond_stack before popping. * typeck.c (validate_varying_array_ref, chill_max_vary_array_index, valid_array_index): Delete them. They're now unused. (valid_array_index_p): Add function, call it everywhere that an array index is checked. (build_chill_slice): Restore old functionality where varying_to_slice is called to handle slices of varying arrays, rather than handling handling them here. (build_chill_slice_with_range, build_chill_slice_with_length): Check range limits for TREE_CONST before calling tree_int_cst_lt. Delete now-obsolete checks of constant indices. Mon Mar 14 17:26:51 1994 Per Bothner (bothner@kalessin.cygnus.com) * parse.y (modeless_expr): New rule to allow ([...]) and (if...) to count as untyped_exprs. (This is not really permitted by the Blue Book, but has been requested by customers.) Thu Mar 10 10:11:02 1994 Bill Cox (bill@rtl.cygnus.com) * chill.texi: Document new command-line options. * expr.c (build_chill_num): Set unsigned parameter for type_for_size call correctly (unsigned for enums). * lang.c (lang_decode_option): Add command-line options to enable/disable runtime range-checking. * lex.l: Eat more whitespace. Thu Mar 10 09:41:37 1994 Bill Cox (bill@rtl.cygnus.com) * Makefile.in: Have rules to make parse.h, y.tab.c and other derived files. This allows the gcc/configure list of CHILL files machinery to work. * ch-tree.h (permanent_allocation): Add a parameter flag. * decl.c (finish_chill_function, finish_decl): Provide the new permanent_allocation flag. (poplevel): Return early, avoid a seg fault. * lex.l (NORMAL): Replace this whole state with the predefined INITIAL state. Force compilation state to global level after compiler directive error - prevents endless loop on error. (handle_use_seizefile_directive): Rewrite for readability. (chill_same_grant_file): Reindent. Generally handle whitespace differently. * regression.prpt: Print ten PR numbers per line. The report's getting too long. Wed Mar 9 09:58:51 1994 Bill Cox (bill@rtl.cygnus.com) * decl.c (do_decl): Suppress the string-assignment-condition error - it was too often seen. * expr.c (expand_chill_expr): In CONCAT_EXPR, when argument has a runtime-changing length (as in a slice), get the parent array's allocation size from its type tree. * typeck.c (build_chill_slice): Support VARYING arrays. Pass parent array's static allocation size along in the slice type. Wed Mar 9 08:54:24 1994 Bill Cox (bill@rtl.cygnus.com) * lex.l (name_type_signal): Avoid dereferencing a NULL TRE_TYPE. Tue Mar 8 11:51:10 1994 Bill Cox (bill@rtl.cygnus.com) * expr.c (build_chill_sizeof): Fix typo in error msg, add some whitespace. * lex.l (name_type_signal): Add debug output. * parse.y (call): Allow EVENTNAME and BUFFERNAME parameters to a call, so that SIZE () works on them. * tasking.c (make_process_struct): Force ignore_exprs non-zero when processing a SEIZEd PROCESS declaration. This prevents grox-fixed_fields from returning a NULL, and indirectly protects the chill_integer_type_node tree from corruption. Mon Mar 7 19:14:05 1994 Bill Cox (bill@rtl.cygnus.com) * Makefile.in: Use the 'all' target to build the runtime library and chillrt0.o. * README: Explain rules for files in this directory. * addtest, addtest.man, build-release, chill.regress.cron: Move to utils subdirectory. * expr.c (build_chill_function_call): Mark the INOUT temporary so it doesn't get optimized into a register. Fixes the execute/inout.ch bug. * typeck.c (layout_chill_range_type): Restrict it from complaining about an empty string type's bounds (0:-1). Mon Mar 7 09:06:39 1994 Bill Cox (bill@rtl.cygnus.com) * Makefile.in (compiler): Restore this target. (OBJS, BC_OBJS): Delete unused variables. Add $(FLAGS_TO_PASS) to sub-make invocations. * ch_decomment.l, ch_makedepend, chill.patches, printf.c, tcov.awk, tcov.el, tcov.sh: Move to utils subdirectory. Sat Mar 5 18:37:50 1994 Jim Wilson (wilson@sphagnum.cygnus.com) * except.c (finish_handler_array): When computing address of the array ex_decl, don't call build_array_ref. Sat Mar 5 17:43:36 1994 Jim Wilson (wilson@sphagnum.cygnus.com) * loop.c (declare_temps): Force powerset temp to memory. Fri Mar 4 11:20:44 1994 Bill Cox (bill@rtl.cygnus.com) * typeck.c (layout_chill_range_type): Convert highval and lowval to a common type before range-checking them. Fri Mar 4 11:20:44 1994 Bill Cox (bill@rtl.cygnus.com) * ch-tree.h: Add loop-related prototypes. * decl.c, grant.c: Fix -Wall violations. * parse.y: Fix format of %type directives. Fri Mar 4 10:04:18 1994 Wilfried Moser (fs_moser at rcsw1h) * Makefile.in: Update version number. * expr.c: Fix a comment. * inout.c (build_chill_writetext): Add handling of a REAL. * lex.l (INITIAL): Remove all code to discard 'header lines'. no longer needed. * parse.y (optheader): Remove - it's obsolete, as is the HEADEREL token definition. Fri Mar 4 09:41:18 1994 Bill Cox (bill@rtl.cygnus.com) * addtest: Fix suffix removal when suffix is .c186. * regression.sh: Allow for underscores on PR filenames. * typeck.c: Check in the rewrite mentioned earlier. Thu Mar 3 09:42:10 1994 Wilfried Moser (fs_moser at rcsw1h) * tasking.c (build_process_header): Build a debug structure for easier access to PROCESS parameters. Thu Mar 3 09:42:10 1994 Bill Cox (bill@rtl.cygnus.com) * typeck.c (*string_assignment_condition): Complete rewrite of a verbose first draft. Wed Mar 2 16:49:05 1994 Bill Cox (bill@rtl.cygnus.com) * actions.c (adjust_return_value): Simplify. Delete references to CH_RETURNS_LOC, extra parameters to push_extern_function and start_chill_functions. (convert_for_assignment): Check whether to generate runtime range-checking code. Handle reference_type in convert call. (chill_expand_assignment): Produce an INDIRECT_REF for a reference_type on the LHS. Delete conversions subsumed by convert_for_assignment. * ch-tree.h: Delete parameters from prototypes. * decl.c (print_lang_decl): Print out signal flag. (push_extern_function, start_chill_function): Delete extra parameters, references to CH_RETURNS_LOC. * grant.c (chill_finish_compile): Delete extra parameter. * parse.y: Delete references to CH_RETURNS_LOC, extra parameters to push_extern_function and start_chill_functions. * regression.sh (checkprms): Skip PRMS discrepancies if we can't access PRMS for some reason. * satisfy.c: Correct indentation. * tasking.c (build_process_header): Delete extra parameters passed to push_extern_function and start_chill_functions. Wed Mar 2 10:33:50 1994 Bill Cox (bill@rtl.cygnus.com) * addtest: Require a fill filename. Be more careful about adding the same test twice. * expr.c: Add FIXME to comment. * regression.sh: Add configure script call. Tue Mar 1 16:24:20 1994 Wilfried Moser (fs_moser at rcsw1h) * Makefile.in: Change version of chill to 1.1.2 * inout.c: Add processing of SET and POWERSET types to WRITETEXT. Tue Mar 1 07:34:56 1994 Bill Cox (bill@rtl.cygnus.com) RETURN of LOC value is only half-baked. Stay tuned... * actions.c (adjust_parm_or_field): Add to comment. (adjust_return_value): New function for issuing errors about RETURN and RESULT expressions. Also converts them. (chill_expand_result, chill_expand_return): Call new adjust_return_value function. * ch-tree.h (CH_RETURNS_LOC): Add new flag for function types. New parameter for push_extern_function and start_chill_function. * decl.c (push_extern_function, start_chill_function): New parameter to say whether return value is a LOC. * expr.c (build_chill_indirect_ref): Further qualify the issuing of the error message. * grant.c (raw_decode_mode): Move test for instance mode under STRUCT handling. (start_chill_module_code, chill_finish_compile): Add new parameter to start_chill_function calls. * parse.y (get_type_of): Do lookup_name more often. (quasi_pdef, procedure, procmode, optresultspec): Set CH_RETURNS_LOC flag. (optresultattr): Code keywords as a bitmask. * tasking.c (build_process_header): Add new parameter to start_chill_function call. Sat Feb 26 12:49:05 1994 Bill Cox (bill@rtl.cygnus.com) * Makefile.in: Replace undefined $(RM) with rm -f. * configure: Make sure scripts are executable. * regression.sh: Make variables to invoke make and awk. Don't process a directory if it doesn't exist. Fri Feb 25 14:48:48 1994 Bill Cox (bill@rtl.cygnus.com) * Makefile.in (check): Force the building of ../gcov and ../xgcc before testing. Move the printf dependency here since we don't need it until we're testing. * addtest: Strip suffix from each input filename. * decl.c (do_decl): Correct error checking. Call string_assignment_condition for some of it. * tasking.c (build_gen_inst): Add ability to pass an integer for either the process ID or the copy number. If a number is passed, range-check it against the CHILL unsigned type limits. (build_buffer_descriptor): Add draft code to check the buffer name for correctness. Wed Feb 23 15:07:12 1994 Per Bothner (bothner@kalessin.cygnus.com) New cleaner solution to the following problem: Chill allows an action to be followed by an ON-handler. But we don't know if an action has a handler until we've parsed its end, yet we want to generate extra code to set up an exception handling contour only if needed. The old solution would generate code for the action into an rtl sequence, and then splice in the exception-setup code if we later found we needed it. This has a few problems (for example it confuses the management of stack temporaries), and is ugly. Now that the compiler is 2-pass we have a cleaner solution: In pass 1, we remember which actions were followed by ON-handlers. In pass 2, we use this information to generate appropriate code before an action. * except.c (push_handler, pop_handler): In pass 1, set up data structures (global_handler_list) to remember if an action has an ON-handler. In pass 2, digest this information, and setup handler if needed. * except.c, actions.h (pop_handler): Take an extra int arg. * except.c (emit_setup_handler): New function, with code (moved from chill_start_on) to emit code before an action that has a handler. * except.c (except_init_pass_2): New function. * parse.y (pass1_2): Call except_init_pass_2 before pass 2. * parse.y (POP_UNUSED_ON_CONTEXT): Don't call pop_sequence. * parse.y: Invoke POP_UNUSED_ON_CONTEXT and POP_USED_ON_CONTEXT in pass 1 as well as pass 2. * parse.y (BEGIN ... END): Re-arrange logic to avoid block_stack (local to ../stmt.c) getting out of sync. * actions.c (push_action): Don't need to emit a NOP, now that we're no longer moving sequences around. * actions.c (push_action): Call push_handler even in pass one. Wed Feb 23 11:06:14 1994 Bill Cox (bill@rtl.cygnus.com) * decl.c (do_decl): Check for possible overflow in initializing a declared variable. * expr.c (build-chill_indirect_ref): Add error message for a syntax error that C programmers converting to CHILL are quite likely to make. * satisfy.c (safe_satisfy_decl): Keep yesterday's change from seg-faulting. Tue Feb 22 17:54:43 1994 Bill Cox (bill@rtl.cygnus.com) * Makefile.in: Use $(CC) rather than FLAGS_TO_PASS, which isn't defined. Build chill script differently, and build an install script. Add an action to run the regression test. * actions.c (chill_expand_assignment): Change string_assignment_condition call. * ch-tree.h: Add prototype. * expr.c (build_chill_function_call): Change string_assignment_condition call. * satisfy.c (safe_satisfy_decl): Add check that string INIT value will fit in the declared mode. * typeck.c (string_assignment_condition): Add flag to disable runtime code generation. Add code to generate runtime test. Mon Feb 21 14:04:20 1994 Bill Cox (bill@rtl.cygnus.com) * Makefile.in (check): Add target to trigger a regression test. Mon Feb 21 13:54:20 1994 Bill Cox (bill@rtl.cygnus.com) * decl.c (do _based_decls): Add error check for decls BASED on a PROC or PROCESS name. Mon Feb 21 13:24:02 1994 Bill Cox (bill@rtl.cygnus.com) * grant.c (chill_finish_compile): Bypass handling module-level code if an earlier error has made is useless. * tasking.c (build_start_process): Generate error, return if process name unknown. Mon Feb 21 14:29:41 1994 Wilfried Moser (fs_moser at rcsw47) * expr.c (build_generalized_call): Use build_arrow_expr semantics for ADDR () builtin. Mon Feb 21 12:49:14 1994 Bill Cox (bill@rtl.cygnus.com) * tasking.c (build_gen_inst): Output correct constructor for GEN_INST. Mon Feb 21 08:14:59 1994 Wilfried Moser (fs_moser at rcsw47) * lex.l (yywrap): Fix punctuation error. Sun Feb 20 19:58:14 1994 Bill Cox (bill@rtl.cygnus.com) * regression.sh: Fix cvs update-related commands. Have cron job always perform the update, so it's always reporting on the current state of the sources. * typeck.c (string_assignment_condition): Allow a mis-match if the LHS is varying. Fri Feb 18 18:10:04 1994 Bill Cox (bill@rtl.cygnus.com) * actions.c (expand_chill_assignment): Add call to test the string assignment condition. * expr.c (build_chill_function_call): Add call to test the string assignment condition. * regression.awk2: Report WITHDRAWN PRs as well. * regression.sh: Delete extra commentary about FEEDBACK PRs. * typeck.c (string_assignment_condition): Add function to perform the check. Fri Feb 18 16:30:40 1994 Bill Cox (bill@rtl.cygnus.com) * regression.awk1, regression.awk3: Recognize 'withdrawn' PRs and exclude them from the regression test report. Mark them in the list of PRs as 'W' status. Thu Feb 17 09:13:42 1994 Wilfried Moser (fs_moser at rcsw47) * Makefile.in: Define a version number. Build chill script differently. Makefile depends upon ../configure, not configure. * chill.in: Define some new flags. Wed Feb 16 19:44:33 1994 Bill Cox (bill@rtl.cygnus.com) * grant.c (decode_constant): Restore a 'return result' statement that seems to have gotten lost. Wed Feb 16 12:37:44 1994 Per Bothner (bothner@kalessin.cygnus.com) * ch-tree.h (various STRING-type macros): Use new TYPE_STRING_FLAG. * typeck.c (make_chill_array_type): Remove unused args. Simplify to build only one-dimensionsal arrays, so change index list to single index. Call layout_chill_array_type if pass!=1. And rename to: build_simple_array_type. * typeck.c (layout_chill_array_type): Only recurse if TREE_TYPE has not been laid out. * typeck.c (build_chill_array_type): Update accordingly. * typeck.c (build_chill_slice): Replace calls to build_array_type (which does hash-canonicalization, which breaks if we later set the TYPE_STRING_FLAG) by calls to build_simple_array_type. * convert.c (convert): The same. * grant.c (decode_constant): Clean up. Remove remnants of switch on TREE_TYPE of the value, and fold those cases into first switch. Wed Feb 16 09:12:21 1994 Bill Cox (bill@rtl.cygnus.com) * Makefile.in: Add printf as a dependency of ../cc1chill. * regression.sh: Make srcdir and objdir really work. Wed Feb 16 09:12:21 1994 Bill Cox (bill@rtl.cygnus.com) * expr.c (build_char_array_expr): Fix spelling error in error msg. * tree.c (build_string_type): Make check for overlarge string more robust. Wed Feb 16 02:37:43 1994 Mike Stump (mrs@cygnus.com) * grant.c (decode_constant): Remove useless tests for STRING_TYPE (which isn't used by anyone, including CHILL). Tue Feb 15 15:35:07 1994 Bill Cox (bill@cygnus.com) * build-release: Add refinements to checkout commands. * decl.c (init_decl_processing): Move initialization of chill_unsigned_type_node before 1st call to build_string_type. * tree.c (build_string_type): Add compile-time test of string allocated length. * typeck.c (layout_chill_range_type): Add compile-time range limit checking. Tue Feb 15 08:55:37 1994 Bill Cox (bill@cygnus.com) * Makefile.in: Add stamp-chill-objs as a dependency of ../cc1chill. * regression.sh: Rename test directory names. Mon Feb 14 09:24:16 1994 Bill Cox (bill@rtl.cygnus.com) * Makefile.in: Change interface with parent directory's Makefile, decoupling the lists of each others' files. Mon Feb 14 09:24:16 1994 Bill Cox (bill@rtl.cygnus.com) * lex.l: Delete obsolete comment. * tasking.c (expand_send_signal): Add a type to the OPTSENDTO instance constructor. Mon Feb 14 04:04:16 1994 Bill Cox (bill@rtl.cygnus.com) * lex.l (maybe_number): Add octal to numbers handled by Feb 1 change. Sat Feb 12 16:24:22 1994 Bill Cox (bill@rtl.cygnus.com) * actions.c, convert.c, decl.c, expr.c, lex.l, tasking.c, typeck.c: gcc -Wall cleanups. * ch-tree.h: Change loop-related prototypes. * loop.c, parse.y: Rewrite to set up correct loop scope. Fix error path where loop variable not declared. Fri Feb 11 11:12:29 1994 Bill Cox (bill@rtl.cygnus.com) * Makefile.in: Add rule to build printf. Make it a dependency of ../cc1chill. * printf.c: New tool for regression testing script. * regression.sh: Look for print in ${objdir}. Thu Feb 24 17:31:12 1994 Wilfried Moser (fs_moser at rcsw1j) * tasking.c (build_gen_inst): Allow integer expression as argument 1 to this function. This was a change request to get rid of unsupported value conversion from INSTANCE to ARRAY (0:1) UINT or STRUCT (t UINT, c UINT). Thu Feb 10 09:49:31 1994 Bill Cox (bill@rtl.cygnus.com) * regression.awk3: Recognize upper-case PRMS state names. Wed Feb 9 15:26:19 1994 Bill Cox (bill@cygnus.com) * parse.y (dowithaction): Allow EXIT from DO WITH. Tue Feb 8 13:13:54 1994 Bill Cox (bill@rtl.cygnus.com) * configure: Change to require grant.c for evidence that we've found the source directory. * decl.c (init_decl_processing): delete unused builtin_slice function declaration. * expr.c (chill_expand_expr): Calculate powerset's length correctly, calling powersetlen to do it. * regression.sh: Replace BASE references with objdir references. * typeck.c (build_chill_slice): Build the compound expression in the right order. Mon Feb 7 15:56:07 1994 Bill Cox (bill@rtl.cygnus.com) * expr.c (build_chill_lower, build_chill_upper): Handle LOC parameter types. * regression.sh: Correct path to executable sub-shell-scripts. Mon Feb 7 11:33:47 1994 Bill Cox (bill@rtl.cygnus.com) * regression.sh: Pervasive changes to allow for separate source and object directories. Wed Feb 2 17:5620 1994 Bill Cox (bill@rtl.cygnus.com) * decl.c (find_implied_typed): Delete obsolete reference to PROCESS_TYPE. * ch-tree.def (PROCESS_DECL, PROCESS_TYPE): Delete - they're obsolete. Wed Feb 2 13:37:56 1994 Bill Cox (bill@rtl.cygnus.com) * Makefile.in: Delete bogus runtime/Makefile lines. * configure: Build testsuite directory. Wed Feb 2 13:37:56 1994 Bill Cox (bill@rtl.cygnus.com) * configure: Correct srcdir for chill.examples directory. Wed Feb 2 11:24:57 1994 Wilfried Moser (fs_moser at rcsw47) * ch-parse.y (rule call): Add BUFFERNAME LPRN untyped_expr RPRN to enable generating a descriptor same as for SIGNALS. * ch-tasking.c (generate_tasking_code variable, decl_tasking_code_variable): Implement overflow check of taskingcode in case a tasking code is specified with the compiler directives SIGNAL_CODE, BUFFER_CODE, EVENT_CODE or PROCESS_TYPE. Wed Feb 2 09:31:37 1994 Bill Cox (bill@rtl.cygnus.com) * configure: Add ${srcdir} to Makefile.in's path. * loop.c: Delete unused whitespace. Tue Feb 1 17:09:41 1994 Bill Cox (bill@rtl.cygnus.com) * expr.c (string_char_rep): Process STRING_CST correctly. Tue Feb 1 15:29:28 1994 Per Bothner (bothner@kalessin.cygnus.com) * expr.c (build_boring_bitstring): New function. * expr.c (build_chill_repetition_op): Fix a number of bugs in implementation of bitstring repetition. Also, implement repetition of Booleans. Tue Feb 1 15:28:21 1994 Bill Cox (bill@rtl.cygnus.com) * configure: Delete code to check for gas or ld. Add code to store a config.status file in each configured subdirectory. * expr.c (): Spell concatbitstring as concatps, which is the runtime routine name. * regression.sh: Force use of GNU make. Tue Feb 1 15:22:12 1994 Bill Cox (bill@rtl.cygnus.com) * tasking.c: Mark compiler-generated temps to prevent GRANTing them. Tue Feb 1 17:38:51 1994 Wilfried Moser (fs_moser at rcsw1j) * lex.l (equal_number): Improve check for number after = in a compiler directive. * tasking.c (build_tasking_struct): Make field TaskValue pointer to chill_unsigned_type_node. * tasking.c (generate_tasking_code_variable): Declare tasking code variable as chill_unsigned_type_node. * tasking.c (decl_tasking_code_variable): Declare tasking code variable as chill_unsigned_type_node. Mon Jan 31 14:01:58 1994 Bill Cox (bill@rtl.cygnus.com) * addtest (update_Makefile): No longer build actions - they're now in pattern rules. * ch_makedepend: Do the grep first, to avoid processing non USE_SEIZE_FILE lines. * configure: Pervasive rewrite to support configuring regression test directories. Mon Jan 31 04:35:53 1994 Michael Tiemann (tiemann@blues.cygnus.com) * typeck.c (build_chill_slice): Compute EXTENT correctly. Sun Jan 30 14:33:12 1994 Bill Cox (bill@rtl.cygnus.com) * tasking.c (build_gen_inst): Return a typed tuple with INSTANCE type. Sun Jan 30 12:01:07 1994 Bill Cox (bill@rtl.cygnus.com) * actions.c (chill_expand_assignment): Recognize LENGTH builtin in the left hand side, pass it to expand_varying_length_assignment. (expand_varying_length_assignment): Clean up bitrot. * convert.c (convert): Revert most recent change. * loop.c (maybe_skip_loop): New function, split out of begin_chill_loop. Add conditional to skip processing an empty VARYING array. * parse.y (assignaction): Delete code to recognize LENGTH on left-hand-side. * typeck.c (validate_varying_array_ref): Correct misleading comment. Sat Jan 29 10:54:06 1994 Michael Tiemann (tiemann@blues.cygnus.com) * typeck.c (build_chill_slice): Pass a valid identifier to `get_unique_identifier'. * convert.c (convert): Rename LENGTH variable to MAXIDX, and use correct value for VAR_LENGTH when initializing a varying array. * decl.c (do_decl): Set DECL_COMMON. * actions.c (check_range): Temporarily inhibit warnings so the compiler doesn't warn the user about useless range checks that it might create. It's far easier for the compiler to figure out that a range check need not be done than it is for us to try to figure it out for ourselves. * expr.c (build_concat_expr): Generalize to handle bitstrings. (scalar_to_string): New function. (chill_expand_expr): Handle SET_TYPEs in CONCAT_EXPR by using new library call (__concatbitstring). Sat Jan 29 08:43:54 1994 Bill Cox (bill@rtl.cygnus.com) * ch_makedepend: Fix the 'sed' command so that seize file name can be delimited by double quotes as well as apostrophes. Thu Jan 27 17:26:19 1994 Per Bothner (bothner@kalessin.cygnus.com) * typeck.c (my_build_array_ref): Do constant folding. Thu Jan 27 16:24:24 1994 Bill Cox (bill@rtl.cygnus.com) * actions.c, actions.h, ch-tree.h, chill.texi, convert.c, decl.c, except.c, expr.c, grant.c, inout.c, lang.c, lex.h, lex.l, loop.c, parse.y, tasking.c, tasking.h, tree.c, typeck.c: New 'Copyright' line for 1994. Thu Jan 27 14:12:07 1994 Mike Stump (mrs@cygnus.com) * configure: Don't configure this directory with this configure, just subdirectories and cleanup. * Makefile.in (Makefile): Run config.status in parent directory, if we need rebuilding. Thu Jan 27 10:37:33 1994 Bill Cox (bill@rtl.cygnus.com) * decl.c (bind_sub_modules): Need a parameter on the recursive call. Thanks, Zoo! Thu Jan 27 10:37:33 1994 Bill Cox (bill@rtl.cygnus.com) * expr.c (build_concat_expr): Fix SunOS portability problem. Wed Jan 26 14:57:39 1994 Per Bothner (bothner@kalessin.cygnus.com) * convert.c (digest_powerset_tuple): New function, used to set TREE_CONSTANT and TREE_STATIC properly. (digest_structure_tuple, convert (NULL to instance, non-varying to varying)): Set TREE_CONSTANT and TREE_STATIC when appropriate. * expr.c (varying_to_slice): Preserve novelty of slice type. * expr.c (build_concat_expr): Make sure class of result is correct (including correct novelty). * satisfy.c (safe_satisfy_decl): If value of CONST_DECL is not TREE_CONSTANT, emit an error. * typeck.c (build_chill_slice): Preserve novelty of result. * typeck.c (build_chill_slice): Simplify for varying argument (by using varying_to_slice). * typeck.c (expand_constant_to_buffer, extract_constant_from_buffer): New functions. * typeck.c (build_chill_cast): Use above new functions to convert constant expressions. * typeck.c (copy_novelty), ch-tree.h: New function. * chill.texi: Update for new constant conversion semantics. Tue Jan 25 14:00:02 1994 Wilfried Moser (fs_moser at rcsw1j) * ch-decl.c (init_decl_processing): Add new builtin function DESCR. Add call to build_chill_descr_type. * ch-expr.c: Add function build_chill_descr_type, which actually build the type the DESCR builtin returns. Add function build_chill_descr, which process the DESCR builtin. * ch-expr.c (build_chill_length): Add code to enable LENGTH (bitstring). * ch-expr.ch (build_generalized_call): Add processing of DESCR builtin. * ch-grant.c: Add code to avoid producing of unnecessary grant files. * ch-tree.h: Add enum for builtin function DESCR. Add prototype for build_chill_descr. * ch-inout.c (build_chill_io_list_type): Change generation of the type passed to runtime library according to the new definition. * ch-inout.c (build_chill_writetext): Change processing of format string that a character constant is allowed as format string if compiler gets called with -fold-strings option. * ch-inout.c (build_chill_writetext): Change processing of integers in case NEWMODE x = INT. * ch-inout.c (build_chill_writetext): Remove processing of ranges. * ch-inout.c (build_chill_writetext): Add processing of bitstrings. Tue Jan 25 09:07:10 1994 Mike Stump (mrs@cygnus.com) * Makefile.in (all, OBSTACK): Build interesting things be default, and make sure we include OBSTACK. Sun Jan 23 12:35:38 1994 Per Bothner (bothner@kalessin.cygnus.com) * grant.c (decode_constant): Handle RANGE_EXPR. Simplify handling of CONSTRUCTOR. * typeck.c (build_chill_slice): Use build_chill_array_ref_1, not build_chill_array_ref. Sat Jan 22 16:23:30 1994 Per Bothner (bothner@kalessin.cygnus.com) * parse.y: Generate a RANGE_EXPR (instead of a confusing TREE_LIST) to indicate a range in case and tuple lables. * actions.c (chill_handle_case_label), convert.c (digest_constructor): Update accordingly to handle these RANGE_EXPRs. * satisfy.c (satisfy): Don't call finish_chill_binary_op for a RANGE_EXPR. Fri Jan 21 15:39:36 1994 Per Bothner (bothner@kalessin.cygnus.com) * expr.c (force_addr_of): New function, to encapsulate passing by reference a powerset or string to a library function. * expr.c (build_min_max, build_set_expr): Use force_addr_of. * expr.c (chill_expand_expr case CONCAT_EXPR): Fix passing of rtl modes. (Old code fails on 64-bit Alpha.) * expr.c (build_chill_function_call): Remove bogues check for READonly variable passed as parameter. * expr.c (build_set_expr): Merge common code. * parse.y (string repetition): Fix logic for 2-pass scheme. * expr.c (finish_chill_binary_op), grant.c (decode_constant), satisfy.c (satisfy): Handle REPLICATE_EXPR. * chill.texi: Fix typo. Mon Jan 17 13:55:48 1994 Jim Wilson (wilson@sphagnum.cygnus.com) * Makefile.in (INCLUDE): Add -I$(srcdir)/ch so that toplevel tree.c can find ch-tree.h. Sat Jan 15 15:34:11 1994 Mike Stump (mrs@rtl.cygnus.com) * configure: Fix problem so that building in a separate directory works. Sat Jan 15 09:51:02 1994 Bill Cox (bill@rtl.cygnus.com) * Makefile.in: Recurse down into runtime to create its Makefile, and to clean up. * configure: Recurse into runtime to make its Makefile. Sat Jan 15 09:15:22 1994 Bill Cox (bill@rtl.cygnus.com) << This set of CHILL frontend sources is now the maintainable and master set. Accept no substitutes! >> * Makefile.in, configure: Completely rewritten to be invoked by gcc/Makefile.in and gcc/configure. * addtest (update_ChangeLog): Fix insertion of the '*'. * regression.sh: Add global option to suppress results of proprietary tests. * cpy.sh: Add necessary edits to files as they are copied down. * actions.c, ch-tree.def, ch-tree.h, convert.c, decl.c, except.c, expr.c, grant.c, inout.c, lang.c, lex.h, lex.l, loop.c, parse.y, satisfy.c, tasking.c, typeck.c: Latest versions from the repository. Fri Jan 14 12:28:39 1994 Bill Cox (bill@rtl.cygnus.com) * addtest: Fix insertion of line into ChangeLog. * configure: Add a script. * Makefile.in: Hack from ../Makefile.in * actions.c, convert.c, decl.c, expr.c, grant.c, inout.c, * lex.l, loop.c, parse.y, satisfy.c, typeck.c: Latest sources. Mon Jan 10 11:38:07 1994 Bill Cox (bill@rtl.cygnus.com) * build-release: Rewrite for easier tailoring. Wed Jan 5 08:38:21 1994 Bill Cox (bill@cygnus.com) * actions.c, convert.c, decl.c, except.c, expr.c, inout.c, loop.c, parse.y, satisfy.c, typeck.c: Current versions from devo/gcc. Wed Dec 29 14:07:10 1993 Bill Cox (bill@rtl.cygnus.com) * addtest: Don't add comment headers to source or .dat files if they're already present. Wed Dec 29 13:15:11 1993 Bill Cox (bill@rtl.cygnus.com) * mktg_leads: New file. * regression.sh, regression.awk2: Updated status report scripts. * addtest: New script to add a test to a directory. * ch_makedepend: Add full path to ch_decomment. * actions.c, convert.c, decl.c, expr.c, grant.c, inout.c, lex.l, loop.c, parse.y, satisfy.c, tasking.c, typeck.c: Updated copies of actual sources. * chill.brochure, chill.texi: Update with current status. * cpy.sh: Script for updating copies of sources. * chill.patches: New script for creating a patch release. Pretty rough. Wed Dec 8 09:35:54 1993 Bill Cox (bill@rtl.cygnus.com) * build-release: Delete lots of unused regression-testing cruft. * chill.brochure: Initial draft of marketing brochure. * chill.patches: Preliminary script for building patch sets for CHILL. * tcov.awk, tcov.el, tcov.sh: New files. Script, tools for building a tcov report on the CHILL compiler. Sun Nov 21 08:34:33 1993 Bill Cox (bill@rtl.cygnus.com) * Makefile.in: Adjust gperf rule for names in this directory. * ch_decomment.l: New file. Ignores CHILL comments. Executable is used bu ch_makedepend. * ch_makedepend: New script. Makes CHILL dependencies for Makefiles. * gperf, hash.h: New files about lexer tokens. * regression.sh: Delete notes justifying non-summing report rows. * regression.awk2: Report PRMS status when there are missing test results. * regression.awk3: Add #! line, so this can be used separately. * Other files: latest versions copied from devo/gcc. Sat Oct 30 15:02:24 1993 Per Bothner (bothner@kalessin.cygnus.com) * chill.texi: Add new node about conversions. Fri Oct 29 14:17:31 1993 Bill Cox (bill@cygnus.com) * chill.regress.cron: Change path to executable, enable PR report. * regression.awk2: Add terminating periods to messages. * regression.sh: Change path to testsuites. Add disclaimer at end of report. Print explicit lists of resolved/unresolved PRs. Thu Oct 28 09:22:20 1993 Bill Cox (bill@rtl.cygnus.com) * regression.sh: More PR-related status is printed. Thu Oct 21 19:24:02 1993 Bill Cox (bill@rtl.cygnus.com) * regression.sh: Simplify the paths, make the source and test files accessed separately from the executables. Wed Oct 20 16:35:30 1993 Bill Cox (bill@rtl.cygnus.com) * regression.sh: Finally fix the file-delete problem. Thanks, Jeffrey! * build-release: Make more verbose, fix comment. Mon Oct 18 00:21:24 1993 Bill Cox (bill@cygnus.com) * regression.sh: Build linker if -U option. Put stderr into make.log files, too. Also report on Z.200 examples. * regression.awk3: New script to help build release note. Fri Oct 15 16:33:54 1993 Bill Cox (bill@cygnus.com) * regression.sh, regression.prpt: Output PR status only conditionally. Add command-line flag for CVS updates. Thu Oct 14 07:53:59 1993 Bill Cox (bill@rtl.cygnus.com) * regression.sh: Count PRs accurately. * Makefile.in: New file. Sat Oct 9 19:46:58 1993 Bill Cox (bill@rtl.cygnus.com) * regression.awk?: Add program fragments for report of PRMS/test exceptions. * regression.sh: Add options and PRMS reports. Fri Oct 8 06:44:41 1993 Bill Cox (bill@rtl.cygnus.com) Create chill frontend directory, populate it. Later, the chill-specific frontend files will be moved here. * chill: Moved here from gcc directory. * chill.regress.cron: Add crontab file for regression tests. * regression.sh: Add regression test control script. # # What follows is a copy of the former devo/gcc/ChangeLog.Chill file, # Sat Jan 15 14:54:07 1994 Bill Cox (bill@rtl.cygnus.com) * ch-*.*: All of these files are now moved to the ch subdirectory. Further update changes should be recorded in the ch/ChangeLog file. Fri Jan 14 21:09:44 1994 Per Bothner (bothner@kalessin.cygnus.com) * c-typeck.c, ch-actions.c, ch-convert.c, ch-decl.c, ch-except.c, ch-satisfy.c, ch-typeck.c: Undo all of initializer-related changes that Tiemann did earlier this month. * c-typeck.c (really_start_incremental_init): Save constructor_elements and (old value of) constructor_stack on constructor_stack, to allow for nested initializers. * ch-convert.c (digest_constructor): If we need a varying array, and have a constructor (for the array elements), make sure to use convert so that the constructor gets wrapped in an implicit record constructor. * ch-decl.c (do_decl): If there is no initializer for a varying array (or bitstring), create default constructor. * ch-expr.c (build_chill_lower): Fix thinko for ARRAY_TYPE. * ch-satisfy.c (safe_satisfy_decl): Make sure that we make original decl to check if we need to make an rtl. * ch-typeck.c (build_chill_array_ref_1), ch-tree.h: New function which does the actual work for build_chill_array_ref (which now just loops over an argument list). * ch-actions.c, ch-expr.c, ch-inout.c: Use build_chill_array_ref_1 instead of build_chill_array_ref where appropriate. * ch-actions.c, ch-expr.c, ch-typeck.c: Make operand 1 of a VARY_ARRAY_REF is a single index, not an index list. * ch-grant.c (__init_list): Renamed to _ch_init_list, to avoid a conflict on the Alpha. Wed Jan 12 10:19:35 1994 Bill Cox (bill@rtl.cygnus.com) * ch-lex.l (WS): Add BS, VT and CR to definition of whitespace. (convert_number): Allow for uppercase hex digits. Tue Jan 11 19:43:55 1994 Bill Cox (bill@cygnus.com) * ch-actions.c (lookup_and_handle_exit): Correct conditional so error messages are output. * ch-expr.c (build_chill_addr_expr): Add error message. * ch-grant.c (chill_finish_module_code): Avoid abort by giving the init_list constructor a type. (chill_finish_compile): Delete unused code. * ch-lex.l: Make most build_init_2 calls from the permanent obstack, so that enumeration values endure. * ch-loop.c (build_chill_iterator): Add several error messages. Tue Jan 11 12:31:55 1994 Per Bothner (bothner@kalessin.cygnus.com) * ch-expr.c, ch-typeck.c: Rewrite some instances of 'struct ch_class class = chill_expr_class (expr);' to 'struct ch_class class; class = chill_expr_class (expr);' to work around a bug in /usr/ucb/cc on SunOS4. Mon Jan 10 18:29:36 1994 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (chill_convert_for_assignment): Avoid seg fault. * ch-expr.c (expand_packed_set): Add new parameter to pass set's minimum ordinal value. Fix loop invariant problem. (fold_set_expr): Change to add new parameter to expand_packed_set call. * ch-grant.c: Move extern declaration to ch-tree.h. * ch-lex.l (convert_bitstring): Also output the bitstring if yydebug is set. * ch-tree.h: Add prototype. Mon Jan 10 11:29:41 1994 Bill Cox (bill@rtl.cygnus.com) * ch-inout.c: Fix comment. * ch-tree.h: Add prototype. Sun Jan 9 18:22:22 1994 Per Bothner (bothner@kalessin.cygnus.com) * ch-tree.h (chill_expr_class): New prototype. * ch-expr.c (build_chill_pred_or_succ, build_chill_unary_op): Convert result to correct class. * ch-expr.c (build_chill_repetition_op): Preserve CH_DERIVED_FLAG. Also, fix some bugs for bitstrings (with ranges). (Patches from Tiemann.) * ch-convert.c (convert1): New function to force TREE_TYPE. (convert): Use convert1 where appropriate. * ch-typeck.c: Formatting change. * ch-parse.y (build_chill_constructor): Fix thinko. * ch-expr.c (varying_to_slice): If array is not referable, call save_expr on it, rather than stabilize_reference. * ch-satisfy.c (safe_satify_decl, for CONST_DECL): Don't force value to value class if mode is not explicitly specified. Also, make sure convert etc is only done once. Sat Jan 8 16:37:10 1994 Per Bothner (bothner@kalessin.cygnus.com) * ch-decl.c (build_chill_function_type): Don't call build_function_type, because it does hash canonicalization, which once in a while looses badly. * tree.c (build_function_type): Remove no-longer-needed test for doing_chill_thang. * ch-tree.h (CH_DERIVED_FLAG): New flag. * ch-tree.h (enum ch_expr_class): Renamed to ch_class_kind. (struct ch_class): New type, used to represent a Chill 'class' as a first-class value. (CH_ROOT_RESULTING_MODE): Replaced by CH_ROOT_RESULTING_CLASS. * ch-typeck.c (chill_expr_class): Change interface to return a struct ch_class. (chill_compatible, chill_compatible_classes): Update accordingly. (chill_root_resulting_mode): Replace by .... (chill_root_resulting_class): ... new function. * ch-convert.c (convert_to_class): New function. * ch-decl.c (layout_enum): Mark enum values with CH_DERIVED_FLAG. * ch-lex.l (string_or_int): Rename to string_or_char. * ch-lex.l (build_chill_string, string_or_char, convert_bitstring, convert_float, convert_number): Set CH_DERIVED_FLAG for literals. * ch-expr.c (finish_chill_binary_op): Use convert_to_class. * ch-satisfy.c (safe_satisfy_decl): For CONST_DECL, make sure DECL_INITIAL gets set to result of convert. Also, clear CH_DERIVED_FLAG for SYN value. * expr.c (store_constructor): If a [power]set is exactly one word long, use single-word move. Sat Jan 8 08:38:29 1994 Michael Tiemann (tiemann@blues.cygnus.com) * c-typeck.c (chill_initializer_constant_valid_p): Fix typo. Wed Jan 5 05:18:46 1994 Michael Tiemann (tiemann@blues.cygnus.com) * ch-typeck.c (build_chill_slice_with_length): Test that ARRAY is of ARRAY_TYPE before assuming so. Also, subtract 1 from LENGTH in computation of SLICE_END. * ch-typeck.c (chill_location): Treat CONSTRUCTORs like STRING_CSTs. * ch-expr.c (build_chill_indirect_ref): Handle MODE == NULL_TREE. * ch-expr.c (fold_set_expr): Handle OP1 == NULL_TREE (which happens for unary set operations). * ch-expr.c (build_chill_array_expr): Take new argument FORCE. All callers changed. All callers changed. * ch-convert.c (digest_structure_tuple): Handle SELECTED_VARIANT being NULL_TREE until we've started walking the list of values via the loop over VARIANTs. * ch-parse.y (build_chill_constructor): If we see an IDENTIFIER_NODE, treat it as an enum value (and hence constant). Also, only set TREE_STATIC if the constructor is indeed constant. * c-typeck.c (chill_initializer_constant_valid_p): If we see a VAR_DECL, test the TREE_CONSTANT field of the DECL_INITIAL, don't recurse on the DECL_INITIAL. Wed Jan 5 01:24:50 1994 Bill Cox (bill@cygnus.com) * Makefile.in: Add CHILL to LANGUAGES variable. * ch-actions.c (check_range): Call build_binary_op instead of fold, build to get the common types chosen. (cond_range_exception, cond_overflow_exception, cond_type_range_exception): Delete, obsolete. (chill_convert_for_assignment): Enable this, get particular about when to generate rangecheck code. * ch-expr.c (build_chill_function_call): Sketch in where to perform chill_convert_for_assignment on actual parameters. (build_chill_addr_expr): Correct compiler warning. * ch-loop.c (build_chill_iterator): Add runtime check for negative loop step expression. * ch-tree.h: Add prototype. * ch-typeck.c (chill_max_vary_array_ref): Correct misunderstanding. A varying array's length field counts the NUMBER of active array array entries, not the byte-length of them. Tue Jan 4 17:57:39 1994 Michael Tiemann (tiemann@blues.cygnus.com) * ch-decl.c (do_decl): Call `suspend_momenary' if the converted constructor must live on the permanent_obstack. * ch-convert.c (convert): When building a new SET_TYPE constructor, re-set the TREE_CONSTANT and TREE_STATIC bits. * c-typeck.c (chill_initializer_constant_valid_p): Handle VAR_DECLs. * ch-typeck.c (chill_location): CONSTRUCTORS that are static are locations. * ch-satisfy.c (safe_satisfy_decl): Convert DECL_INITIAL of CONST_DECL on permanent_obstack if necessary. * ch-convert.c (digest_structure_tuple): When building a new SET_TYPE constructor, re-set the TREE_CONSTANT and TREE_STATIC bits. * ch-decl.c (do_decl): Fix handling of REFERENCE_TYPEs which the patch below helped to mess up. * ch-expr.c (build_chill_arrow_expr): Call `mark_addressable'. (build_chill_addr_expr): Take new argument ERRORMSG. All callers changed. Also, call `build_chill_addr_expr' where we used to call `build1 (ADDR_EXPR, ptr_type_node, ...)' since that now calls `mark_addressable' automagically. * ch-decl.c (do_decl): Keep OPT_INIT in DECL_INITIAL if possible. This is needed because variables may appear in initialization statements, and their DECL_INITIALs are their values at initialization time. * ch-convert.c (digest_structure_tuple,digest_constructor): Changed to handle VAR_DECLs as initializers. * ch-convert.c (digest_structure_tuple): Copy elements of INITS so they aren't destroyed for later use. Tue Jan 4 15:25:30 1994 Bill Cox (bill@cygnus.com) * ch-expr.c (chill_expand_expr): Correct check-range lo_limit parameter for varying_array_ref calculations. (build_chill_indirect_ref): Prevent seg fault due to syntax error. * ch-typeck.c (build_chill_slice_with_range): Correct issuance of bogus error in votrics. (build_chill_slice_with_length): Change for debug tracability. Tue Jan 4 02:43:37 1994 Michael Tiemann (tiemann@blues.cygnus.com) * ch-convert.c (digest_structure_tuple): Fix phasing problem in handling variant record initializers. (various places): Change `pop_init_level' calls to match `push_init_level' wrt implicit variable. * ch-typeck.c (build_chill_slice): Convert the dynamic max index to `integer_type_node' before using it in comparisons. FIXME: should this be done in `chill_max_vary_array_index' by default? Tue Jan 4 00:24:14 1994 Bill Cox (bill@cygnus.com) * ch-actions.c: Fix comments. * ch-parse.y: Define caseaction_flag. (caseaction): Create new caseaction_flag node at the start, then free it at the end. Check it before the ELSE code. (expanded_case_label): Check the flag here. If set in either place, generate a jump to the end of the case. * ch-typeck.c (build_chill_slice_with_length, build_chill_slice_with_range): Add lots of compile-time parameter range checking. Mon Jan 3 21:49:04 1994 Michael Tiemann (tiemann@blues.cygnus.com) * ch-convert.c (digest_structure_tuple): Call `push_init_level' with implicit==0 everywhere, not 1. (digest_constructor): Ditto. * ch-actions.c (check_range): Permit limits to be NULL_TREE. Also, hack out some dead code. * ch-typeck.c (build_chill_slice): Check varying and non-varying slice constructs for range failures. (build_chill_slice_with_range): Reindented, but not changed. * ch-typeck.c (chill_max_vary_array_index): New function. * ch-expr.c (chill_expand_expr): Call it. * ch-decl.c (var_data_id, var_length_id): New variables. (init_decl_processing): Initialize them. All calls to get_identifier (VAR_LENGTH or VAR_DATA) are now replaced by references to these variables. This simplifies the code w/o obscuring anything. Mon Jan 3 21:24:44 1994 Bill Cox (bill@cygnus.com) * c-typeck.c: Fix comment. * ch-actions.c (chill_expand_assignment): Error assigning to READONLY location. (PR_3903) Pass filename, linenumber to setbitpowerset runtime routine. * ch-decl.c (init_decl_processing): Add filename, linenumber parameters to setbitpowerset prototype. * ch-expr.c (build_chill_function_call): Error when passing a READonly location as a LOC or INOUT parameter. * ch-parse.y (mode): Correct code marking type as readonly. Mon Jan 3 19:03:55 1994 Michael Tiemann (tiemann@blues.cygnus.com) * ch-actions.c (chill_expand_assignment): Disable code that defeats building varying array references. * ch-expr.c (chill_expand_expr): Add rangecheck code to VARY_ARRAY_REF case. * ch-typeck.c (build_chill_array_ref): Don't call an `expand_' function (in this case, `validate_varying_array_ref') when we're doing a `build_' operation. * ch-typeck.c (validate_varying_array_ref): Simplify interface since INDEX parameter can never meaningfully be an INDEXLIST. * ch-actions.c (expand_varying_length_assignment): Caller changed. Mon Jan 3 07:29:45 1994 Michael Tiemann (tiemann@blues.cygnus.com) * ch-typeck.c (build_chill_cast): Set TREE_CONSTANT on NOP_EXPRs. * ch-convert.c (digest_structure_tuple): Switch to permanent_obstack if we need to build a CONSTRUCTOR for a SET_TYPE initializer. (digest_structure_tuple): If TREE_VALUE (VALUE) == NULL_TREE, don't call CH_COMPATIBLE or try to convert it to TREE_TYPE (FIELD). This can happen when constructors are output incrementally. * c-typeck.c (initializer_constant_valid_p): Handle SET_TYPEs. * varasm.c (output_constant): Handle NOP_EXPRs in SET_TYPE CONSTRUCTORS. Sun Jan 2 08:17:09 1994 Michael Tiemann (tiemann@blues.cygnus.com) * ch-convert (digest_structure_tuple): Handle SET_TYPEs. Also, call `convert' so we can handle INSTANCE types (and other anomolies) correctly. * ch-convert.c (digest_structure_tuple): Fixed variant structure initialization. Also fixed a typo (TYPE_NAME was being used on a FIELD_DECL instead of DECL_NAME). * c-typeck.c (initializer_constant_valid_p): Pass missing ENDTYPE argument on recursive call. (set_init_field): New function, needed by ch-convert.c change above. * ch-decl.c (layout_chill_variants): Added a FIXME next to an almost certain typo. * ch-expr.c (build_chill_arrow_expr): Call `build1' and set TREE_CONSTANT for static references. * ch-except.c (chill_start_on): Change calls to `build_unary_op' (which is C-specific) to `build_chill_arrow_expr' which has CHILL semantics. * ch-convert.c (convert): Ditto (albeit in some disabled code). Sat Jan 1 21:26:43 1994 Michael Tiemann (tiemann@blues.cygnus.com) * ch-satisfy.c (safe_satisfy_decl): Reorder conditional test of TREE_CODE of DECL in case it's altered by actions in the switch. * ch-satisfy.c (satisfy): Undo abort added earlier on 1 Jan. CVS log mentions where to find code that triggers this case. * ch-actions.c (adjust_parm_or_field): Handle CONSTRUCTORS here as well. * ch-convert.c (digest_structure_tuple): Push to permanent_obstack if we're dealing with a CONSTRUCTOR that is TREE_PERMANENT. (digest_constructor): Ditto. Sat Jan 1 10:29:19 1994 Michael Tiemann (tiemann@blues.cygnus.com) * ch-parse.y (handleraction,resultaction,assignaction,call): Modified so that CONSTRUCTORS are properly handled before being used. * ch-convert.c (chill_start_init): New function. All callers to `start_init' changed to call this function instead. (digest_struct_tuple): Defend against initialization machinery mucking with CONSTRUCTOR_ELTS of CONSTRUCTORs by grokking both IDENTIFIER_NODEs and FIELD_DECLs in the TREE_PURPOSE slots. This is needed because CONSTRUCTORS stored in DECL_INITIALs of CONST_DECLs can be refered to throughout the compilation unit. Also remove an extraneous call to `process_init_element' erroneously added to the variant record sub-loop. (digest_constructor): Propagate TREE_CONSTANT and TREE_STATIC to CONSTRUCTORS of SET_TYPE. * ch-parse.y (build_chill_constructor): Refix typo. Also set TREE_STATIC if at top level. * ch-expr.c (build_chill_arrow_ref): Fix yet another case of TREE_CONSTANT not being set by calling `build1' when `build_unary_op' should have been called. * ch-convert.c (digest_struct_tuple): Restore code which tracks field initializations so that the compiler can deduce what variant initializations to assume. * ch-satisfy (safe_satisfy_decl): Turn on initialization machinery when we push into a scope that has a DECL with a CONSTRUCTOR as its DECL_INIT. * ch-parse.y (build_chill_constructor): Change the name of the parameter to something more meaningful. Fix typo. Also, handle case where element is an untyped CONSTRUCTOR. * ch-except.c (finish_handler_array): Set TREE_CONSTANT on constant ADDR_EXPRs. (chill_start_on): Call `build_unary_op' to set TREE_CONSTANT on JBUF_REF (instead of calling `build1' which does not). * ch-convert.c (convert): Test LENGTH instead of NEEDED_PADDING. * ch-typeck.c (chill_expand_tuple): Deleted. * ch-parse.y (primval rule): Don't call `chill_expand_tuple'; instead, use initialization machinery for CONSTRUCTORS that come through here. * ch-except.c (finish_handler_array): Ditto for CONSTRUCTORS that are created here. * ch-satisfy (satisfy): Abort in case we would have called chill_expand_tuple. FIXME: some other code is needed here, but I don't know what yet. * ch-parse.y (build_chill_constructor): New function to propagate TREE_CONSTANT bits to CONSTRUCTORS. (untyped_expr rule): Use it. (primval rule): Use it. * ch-decl.c (do_decl): Call `finish_init'. * ch-convert.c (convert): If we spontaneously create a CONSTRUCTOR in this function, make sure the initialization machinery is set up. * ch-convert.c (digest_structure_tuple, digest_constructor): Add missing prototypes. Fri Dec 31 11:31:01 1993 Michael Tiemann (tiemann@blues.cygnus.com) * ch-grant.c (chill_finish_module_code): Mark ADDR_EXPR built by hand as being TREE_CONSTANT. Otherwise it gets bounded by the initializer code. * ch-decl.c (do_decl): Change in CONSTRUCTOR handling due to... * ch-convert.c (digest_structure_tuple,digest_constructor): Mostly rewritten to work with GCC's initialization code. The basic change was to keep the initializers in sync with the initialization machinery that `process_init_element' imposes. Both of these functions now return `void'. * ch-convert.c (convert): Changed calls to `digest_...' functions. FIXME: the code handling UNION_TYPE (and variant records) has not been tested yet. Fri Dec 31 15:32:56 1993 Bill Cox (bill@rtl.cygnus.com) * ch-lex.l (convert_number): Output the converted number if yydebug is enabled. * ch-parse.y (signaldef): Set ignore_exprs correctly for a SIGNAL declaration. Fri Dec 31 13:17:48 1993 Bill Cox (bill@cygnus.com) * ch-parse.y: Cleanup handling of RETURN actions, to distinguish a RETURN without a value (which cannot have an exception handler) from a RETURN with a value (which can). Eliminate some shift/reduce and reduce/reduce conflicts. Thu Dec 30 17:42:32 1993 Michael Tiemann (tiemann@blues.cygnus.com) * ch-inout.c (build_chill_writetext): Deal with 2 cases where types returned from `type_for_size' are not expected. FIXME. * ch-decl.c (init_decl_processing): Mark `char_type_node' unsigned. This is required when range checking is enabled. Thu Dec 30 14:28:25 1993 Bill Cox (bill@rtl.cygnus.com) DELAY CASE works now. * ch-decl.c (init_decl_processing): Move rest of tasking-related initialization into tasking_init(). * ch-parse.y (delaycaseaction): Pervasive additions/corrections. (optsetprio): New non-terminal. * ch-tasking.c (get_task_name): Delete, obsolete. (build_instance_type): build pointer to instance type also. (build_receive_case_start): Cleanup per -Wall messages. (build_receive_case_label): Move between start and end functions. (build_delay_case_start): Pass SET name and priority also. Generally update to correct functioning. (build_delay_case_label): Move between start and end fucntions, correct its functioning. (build_delay_case_end): Correct the code. (tasking_init): Lots of tasking-related code moved here from init_decl_processing. * ch-tree.h: Update, add prototypes. Wed Dec 29 10:13:10 1993 Bill Cox (bill@rtl.cygnus.com) * ch-expr.c (build_chill_indirect_ref): Revert change which failed full regression testing. * ch-lex.l (name_type_signal): Add debug output. * ch-parse.y (structured_variable): Add a debug variable. Wed Dec 29 02:05:51 1993 Bill Cox (bill@rtl.cygnus.com) * ch-decl.c (get_next_decl): Revert change which failed full regression testing. Tue Dec 28 18:20:14 1993 Bill Cox (bill@rtl.cygnus.com) DELAY actions work now. * ch-decl.c: Correct spelling in comments. (get_next_decl): NULL out the decl's TREE_CHAIN before returning it, to prevent accidental access to the remembered_decls. (init_decl_processing): Add wait_event to runtime functions. * ch-expr.c (build_chill_indirect_ref): Prevent a syntax error from becoming a seg fault. * ch-grant.c: Correct a comment. * ch-loop.c: Delete/correct comments. * ch-parse.y (delaycaseaction): Add push/poplevel calls. Turn 'sorry' into rough draft of actual code. (delayaction): Don't make a new scope here, use get_unique_identifier instead. (locdec): process event decls here, too. (mode): Add code to forbid READonly EVENT and BUFFER decls. Delete code which required EVENTs and BUFFERs to be declared at global scope. (simple_name_string): Add an EVENTNAME. * ch-satisfy.c (safe_satisfy_decl): Prevent a syntax error from becoming a seg fault. * ch-tasking.c (tasking_setup): Add the event queue's max. length as the 'entry_point' parameter in the list. (build_receive_case_start, build_receive_case_label): Defer calling runtime routine until we know whether we have a signal or a buffer to wait for. (build_delay_case_start, build_delay_case_end, build_delay_case_label, build_delay_action, process_event_decls): Added functions. * ch-typeck.c (chill_similar): Allow all integers of differing precisions to be similar. Thu Dec 23 18:00:40 1993 Bill Cox (bill@rtl.cygnus.com) * gcc.c (CHILL SPECS): Delete references to -M -MM -MD -MMD options. Delete C-specific defines. Disable piping from pre-processor to cc1chill (even if -pipe is specified), since cc1chill rewinds its input for its second pass. Piping still works from cc1chill to as. Thu Dec 23 12:31:55 1993 Bill Cox (bill@rtl.cygnus.com) * ch-tasking.c (decl_tasking_code_variable): Assure that the tasking_code variable is allocated on the permanent obstack. (tasking_setup): Lots of changes - handle EVENT/BUFFER max. queue length (passed as the entry_point parameter). Other changes to variable names to increase 'self-documentation' the only kind GNU CHILL will get, for a while.. Wed Dec 22 10:46:31 1993 Bill Cox (bill@rtl.cygnus.com) * ch-decl.c (do_seize): Delete - it's unused. Fix comments. * ch-loop.c (build_chill_iterator): Convert BY expression so loop involving a SET works. Additional errors generated for numbered SET expression as start or end expression. * ch-tree.h: Prototypes for future DELAY functions. * ch-typeck.c: Standard indentation. Tue Dec 21 15:30:57 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-actions.c (build_cause_exception): New function. (expand_cause_exception): Re-write to use build_cause_exception. (check_expression, check_range): New functions. (chill_convert_for_assignment): New function. * ch-expr.c (build_chill_pred_or_succ): New function. (build_chill_succ, build_chill_pred): Removed. (build_generalized_call): Use build_chill_pred_or_succ. * ch-lex.h, ch-lex.l (init_lex): Add RID_OVERFLOW and RID_RANGEFAIL. * ch-lex.l (init_lex): Use new macro to make more terse. * ch-typeck.c (chill_equivalent): New function. Also check that ranges have the same bounds. * ch-typeck.c (my_build_array_ref): Add optional range-checking. * ch-typeck.c (chill_location): Handle COMPOUND_EXPR properly. Return 2 if also a referable. * ch-typeck.c (chill_referable): Re-define to use chill_location. * ch-tree.h (CH_EQUIVALENT): Re-defined to use chill_equivalent. * dbxout.c (dbxout_type): Output the type attribute "@S;" to distinguish a string from a char array, and to distinguish a bitstring from regulat (power)set. (Needed for Chill.) * dbxout.c (dbxout_type): Only check for baseclasses in type.binfo is a vector. (It is used in Chill for tagged unions.) Fri Dec 17 09:56:07 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c, ch-convert.c, ch-decl.c, ch-expr.c, ch-grant.c, ch-inout.c, ch-loop.c, ch-parse.y, ch-satisfy.c, ch-tasking.c, ch-tree.h, ch-typeck.c: Fix -Wall problems. * ch-actions.c (chill_expand_assignment): Error if assigning a value to a BUFFER or EVENT variable. * ch-expr.c (invalid_left_operand): Delete, unused. * ch-grant.c (tasking_setup): Call build_enum_tables. * ch-inout.c (get_final_type_and_range, build_enum_tables,): New functions. (build_chill_writetext): Lots of changes to support other basic CHILL data types. * ch-loop.c (build_chill_iterator): Lots of new code to check the expressions in a STEP loop. * ch-tasking.c (rc_state): Add fields to flag SIGNAL and BUFFER names in receivecasealternative. Generate error messages if they're mixed in the same receive case. (process_buffer_decl): Renamed from build_buffer_decl. * ch-tree.h: Fix prototypes. * ch-typeck.c (smash_dummy_type): Handle all four kinds of LANG_TYPE correctly. Thanks Per! Wed Dec 15 15:05:56 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-decl.c (push_scope_decls): Re-arrange some more, so that normal SEIZES (without ALL) are handled before SEIZE ALL. Wed Dec 15 13:01:22 1993 Bill Cox (bill@rtl.cygnus.com) * ch-loop.c (declare_temps): Calculate end-of-array pointer using correct type (NOT chill_integer_type). (begin_chill_loop): Build loop-bypass expression in the type of the start expression, not in the unsigned type. Tue Dec 14 15:41:32 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-decl.c (push_scope_decls): Re-arrange so that normal (non-seize) declarations are proclaim_decl'd *before* we handle the ALIAS_DECLs for seizes. The advantage is that we can now test for (an approximation) to the 'seizeable' concept, thus avoiding duplicate definitions when a module has both GRANTs and SEIZE ALL. * ch-expr.c (build_chill_arrow_expr): No longer re-write addr-of-conversion to pointer-conversion-of-addr. * ch-expr.c (build_chill_addr_expr): Re-write to just use build_chill_arrow_expr. Mon Dec 13 16:44:43 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-expr.c (build_chill_addr_expr, build_chill_addr_expr): Don't re-write * ch-tree.h (chill_root_resulting_mode): Fix typo (missing '_'). * ch-expr.c (finish_chill_binary_op): Use CH_ROOT_RESULTING_MODE macro (which works on expressions), rather than CH_RESULTING_MODE (which works on modes, and isn't quite correct). * ch-tree.h (CH_IS_BOUND_REFERENCE_MODE): New macro. * ch-typeck.c (chill_read_compatible, chill_compatible): Use the new macro, which handles NEWMODEs of PTR correctly. * ch-typeck.c (chill_similar): Return 1 rather than 0 for dynamic-length array (and string) types (e.g. slices). * ch-typeck.c (chill_root_mode): If the mode has a Novelty, just return it as is. (This is still not 100% correct for NEWMODE of RANGEs, but is close enough.) Mon Dec 13 16:27:06 1993 Bill Cox (bill@rtl.cygnus.com) * ch-parse.y (locdec): Avoid passing IDENTIFIER_NODEs to build_buffer_decl, which then seg faults. * ch-tasking.c (build_buffer_descriptor): Move declaration of bufdecl closer to its use. Mon Dec 13 14:57:55 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (chill_expand_result): Use expand_expr_stmt to avoid C-specific conversions. * ch-lex.l (name_type_signal): Rewrite to support BUFFERs and EVENTs. * ch-parse.y (sendaction): Delete unused statement, use the 'name' variable. * ch-tasking.c: Use expand_expr_stmt to avoid C-specific conversions. (build_buffer_decl): Save the tasking_code_variable's decl in the buffer decl tree. (build_buffer_descriptor): Real, working version. Mon Dec 13 03:13:36 1993 Bill Cox (bill@rtl.cygnus.com) * ch-decl.c (print_lang_identifier): Delete code to print buffer size - it's no longer kept here. * ch-parse.y (expand_send_buffer): Renamed from build_send_buffer. (locdec): Enable building of a buffer decl. (optresultspec, optresultattr): Add optional result attributes such as LOC. Semantics not enabled yet. * ch-tasking.c (expand_send_buffer): Renamed. * ch-tree.h (build_send_buffer): Renamed. * ch-typeck.c (chill_expr_class): Do more complete, job of classifying expressions. Thanks, Per. Mon Dec 13 00:59:30 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-typeck.c (chill_expr_class): Return CH_DERIVED_CLASS for bitstring constants. * ch-typeck.c (chill_novelty): The novelty of an (unnamed) range mode is that of its parent mode; the novelty of READ M is that of M. Sat Dec 11 15:14:41 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-expr.c (varying_to_slice): Call stabilize_reference rather than save_expr. * ch-typeck.c (build_chill_slice): Don't emit warning if array is a SAVE_EXPR (it is effectively referable). * ch-typeck.c (chill_root_resulting_mode): Handle correctly the case that one operand is DERIVED and one is VALUE. Fri Dec 10 10:00:42 1993 Bill Cox (bill@rtl.cygnus.com) * ch-grant.c (decode_decl): Restore code mistakenly deleted. Move instance-handling code to raw_decode_mode. * ch-parse.y (formpar): Allow READ modifier in SPEC MODULE. Add rough draft of DELAY statement handling. * ch-tasking.c (build_event_type): New function. * ch-tree.h (build_event_type): Add prototype. * ch-typeck.c (smash_dummy_type): Add buffer & event handling. Wed Dec 8 18:02:26 1993 Bill Cox (bill@rtl.cygnus.com) Parse and grant BUFFER modes. * ch-grant.c (raw_decode_mode): Format BUFFER, EVENT modes. Moved from decode_decl. * ch-parse.y: Fix several sorry() messages. * ch-tasking.c (build_buffer_type): Use a LANG_TYPE to pass the info. Wed Dec 8 12:59:54 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-actions.c (chill_expand_assignment): In a multiple assignment, check that all the targets are equivalent. * ch-typeck.c (chill_l_equivalent, CH_L_EQUIVALENT): New function and macro to (partially) implement the relation l-equivalent. * ch-typeck.c (chill_read_compatible): Implement at least initial check of read-only-ness. * ch-typeck.c (build_readonly_type): Fix thinkos. Wed Dec 8 09:11:46 1993 Bill Cox (bill@rtl.cygnus.com) * ch-decl.c (pop_module): Only warn about duplicate grant statements if they inhabit different files, by examining inode numbers. Only report compatibility problems in pass 1. * ch-lex.l (chill_same_grant_file): New function to support the above test. Tue Dec 7 17:10:36 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-decl.c (start_chill_function): Handle attributes in pass 1, rather than in pass 2. (It seems to make more sense that way.) * ch-parse.y (procedureattr): Build attribute list if pass != 2. * ch-parse.y (mode): Don't call build_readonly_type in pass 2. Mon Dec 6 14:35:31 1993 Per Bothner (bothner@kalessin.cygnus.com) This implements NOVELTY and READONLY checking. * ch-tree.def: Added comment about use of LANG_TYPE. * ch-typeck.c (build_readonly_type, smash_dummy_type): New functions. * ch-tree.h: New prototypes. * ch-decl.c (push_modedef): If newmode, lazily "copy" the given mode immediately (even if it's just a type name), using a LANG_TYPE. * ch-parse.y (mode): Call build_readonly_type to handle READ. * ch-decl.c (find_implied_types), ch-grant.c (raw_decode_mode), ch-satisfy.c (satisfy): Handle a LANG_TYPE. * ch-decl.c: Remove chill_modes_equiv and other unused junk. * ch-satisfy.c (safe_satisfy_decl/CONST_DECL): Better mode compatibility checking for SYN declarations. * ch-typeck.c (chill_similar): Be more general when checking set modes for similarity - specifically support calling chill_similar BEFORE the modes have been satisfied (needed by proclaim_decl). * ch-decl.c (proclaim_decl): Allow duplicate definitions of set elements of similar set modes. * ch-parse.y (caseaction): Call language-independent expand_start_case rather than c_expand_start_case (which doesn't allow chars or booleans). Sat Dec 4 22:16:19 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (cond_range_exception, cond_type_range_exception): Check command-line flag before generating code. Fix comments. * ch-expr.c (build_chill_num): Add generation of OVERFLOW code, commented out. * ch-loop.c (build_chill_iterator): Comment out exception code generation. * ch-parse.y: Delete quasi_signal flag, use current_module->is_spec_module instead. * ch-tasking.c (build_buffer_decl, build_buffer_descriptor): Delete quasi_decl flag. Look at current_module instead. * ch-tree.h: Take quasi_decl flag out of buffer related prototypes. * ch-typeck.c (valid_array_index, chill_similar): Comment out runtime range checking for now. * expr.c (store_constructor): Fix word-size set problem. * varasm.c (emit_set_data): Fix word-size set problem. Wed Dec 1 19:08:12 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c: Delete unused prototype for build_compound_expr. * ch-loop.c (begin_chill_loop): Convert operands of the conditional expression to lp->iter_type before expanding it. Prevents an abort deep in expand_expr and friends. Wed Dec 1 17:00:44 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (chill_expand_assignment): Comment out strange test and its error message. * ch-loop.c (begin_chill_loop): Correct call to generate conditional jump around the loop. * ch-typeck.c (build_chill_slice): Call correct temporary generator. Wed Dec 1 14:19:51 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (cond_exception): Clarify that it generates an exception if the given expression is TRUE. Make it so, Number One. * ch-decl.c (DOLLARS_IN_IDENTIFIERS): Disable these. (print_lang_type): Print max queue size. Add casts to DECL_TASKING_CODE_DECL references. Fixes a portability problem. (init_decl_processing): Add filename and linenumber arameters to tasking and memory-allocate runtime prototypes. * ch-expr.c (finish_chill_binary_op): Check for division by a constant zero. Replace build_temporary_variable calls with decl_temp1 calls, to decouple from ch-loop.c. (build_chill_succ, build_chill_pred): Sketch code to generate exceptions. Add error check for numbered set. (build_generalized-call): Correct call for return_memory. Standardize whitespace before left parens. * ch-grant.c: Use new macro for checking for BUFFER mode. * ch-lex.l (name_type_signal): Add attempts to recognize BUFFER and EVENT names. * ch-loop.c (build_temporary_variable): Make static, unavailable to outsiders. (declare_temps): Make user's variable for him/her, in the true Z.200 case, where it hasn't previously been declared. (begin_chill_loop): simplify control flow a bit. * ch-parse.y (quasi_locdec): Set/reset quasi_flag. (rccase_label): Delete bogus error checks. Rough draft of BUFFER-related code. (assertaction): Remove logical negation - it's now in cond_exception. (locdec): Sketch of buffer-related code. (non_array_mode): Add EVENT and BUFFER modes here. Add setting of set-numbered flag for pred and succ functions. (optqueuesize): Default to integer_zero_node. (simple_name_string): Add BUFFERNAME. * ch-tasking.c: Add casts to DECL_TASKING_CODE_DECL references. (build_chill_start_process, expand_send_signal, build_receive_case_start, build_send_buffer): Add filename, linenumber parameters to tasking-related runtime calls. Sketches of BUFFER mode processing. * ch-tree.h: Remove left-hand-side cast in DECL_TASKING_CODE_DECL macro, for portability to non-gcc compilers. Add prototypes for buffer-related functions. * ch-typeck.c: Replace build_temporary_variable calls with decl_temp1 calls, to decouple from ch-loop.c. (chill_similar): Add tests for BUFFER and EVENT modes. Wed Dec 1 14:05:26 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-actions.c (malloc prototype): Remove; can cause conflicts. Wed Dec 1 09:49:58 1993 Bill Cox (bill@rtl.cygnus.com) * ch-grant.c (raw_decode_mode): Process a REFERENCE_TYPE. Tue Nov 30 14:05:23 1993 Bill Cox (bill@rtl.cygnus.com) * ch-decl.c (init_decl_processing): Add filename, line number parameters to tasking-related runtime routines. * ch-grant.c (decode_decl): Check for BUFFER mode differently. * ch-parse.y (BUFFER_CODE, EVENT_CODE): Move token to lex-only list. (quasi_locdec): Set/reset quasi_decl flag. * ch-tasking.c (build_start_process, expand_send_signal, build_receive_case_start, build_send_buffer): Add filename. linenumber to (build_buffer_decl, build_buffer-type): New rough-draft functions. generated runtime routine call. * ch-tree.h (CH_IS_BUFFER_MODE, CH_IS_EVENT_MODE): New macros to mark a synchronization mode. Update the prototypes. * ch-typeck.c (chill_similar): Check EVENT or BUFFER modes for similarity. Tue Nov 30 09:51:47 1993 Doug Evans (dje@canuck.cygnus.com) * cccp.c (main): Add missing chill sanitization. Sun Nov 28 15:50:10 1993 Bill Cox (bill@rtl.cygnus.com) * ch-loop.c (initialize_iter_var): Build count expression more robustly. (bottom_loop_end_check): Call emit_line_note. (end_chill_loop): Delete emit_line_note call. * ch-parse.y (doaction): Move DO keyword after end_chill_loop call. Wed Nov 24 08:49:07 1993 Bill Cox (bill@rtl.cygnus.com) * c-typeck.c (c_expand_start_case): Back out previous change. Tue Nov 23 12:33:50 1993 Bill Cox (bill@rtl.cygnus.com) * c-typeck.c (c_expand_start_case): Allow any CHILL discrete type as a CASE label. Tue Nov 23 11:37:42 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-decl.c (grok_chill_variantdefs): Use NULL as the name of variant fields (not __CASE or anything based on it). * ch-decl.c (handle_one_parent), ch-expr.c (compare_records): Don't check for field name __CASE. Tue Nov 23 09:37:54 1993 Bill Cox (bill@rtl.cygnus.com) * ch-decl.c (grok_chill_variantdefs): Use a unique dummy name for the FIELD_DECL. * ch-parse.y (optstartset): More error tests. * ch-tasking.c (make_process_struct): Only report error in pass 1. (build_start_process): Remove bogus restriction, allowing an INSTANCE expression as the optset parameter. Mon Nov 22 17:56:34 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-tree.h (expand_function_end): Now is takes parameters, not 2. * ch-decl.c (finish_chill_function): Add 3rd parameter to call of expand_function_end. * ch-expr.c (chill_expand_expr): For set and strings ops, if target is in a register, use a stack temporary (since we must take its address). (Similar to Oct 29 change for store_constructor.) * ch-expr.c (resolve_component_ref): Fix variant field lookups. Mon Nov 22 14:23:13 1993 Bill Cox (bill@rtl.cygnus.com) * ch-expr.c (chill_expand_expr): Assure that emit_library_call parameter 1 and its mode are always in sync. (build_chill_pred, build_chill_succ): Allow pred/succ of a pointer. * ch-loop.c (chill_unsigned_type): New function, used instead of unsigned-type, since it understands the chill_integer_type. (decl_iteration_var): Delete, use build_temporary_variable instead. (declare_temps): Use lp->iter_type for the temp evaluations. (initialize_iter_var): More careful calculation, to handle MININT to MAXINT loops w/o overflow/underflow. (begin_chill_loop): Use the original start/end expressions for the loop bypass test. Mon Nov 22 14:02:06 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-typeck.c (build_chill_slice): If the argument is is constant, use a read-only static variant, as the existing algorithm assumes addressability. * ch-typeck.c (chill_compatible): De-reference reference types. * ch-typeck.c (layout_chill_range_type): Set TREE_UNSIGNED. Sat Nov 20 20:17:15 1993 Bill Cox (bill@rtl.cygnus.com) * ch-decl.c (init_decl_processing): Add filename and linenumber to allocate, free memory calls. * ch-expr.c (build_allocate_memory_call, (build_allocate_global_memory_call): Add filename, linenumber to call. * ch-loop.c: Complete rewrite for maintainability. Sat Nov 20 17:30:05 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-except.c: Make it so that (by default at least) the code to push/pop the __exceptionStack is done using library functions __ch_link_handler and __ch_unlink_handler. This provides better flexibility (for e.g. multi-threading). * ch-decl.c (layout_chill_variants): Allow (useless) selectors even for tag-less variants. Fri Nov 19 14:32:20 1993 Bill Cox (bill@rtl.cygnus.com) * ch-decl.c (init_decl_processing): Add memmove builtin function definition. * ch-actions.c (chill_expand_array_assignment): Use memmove call to copy an array or slice across the assignment. Wed Nov 17 18:23:15 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-satisfy.c (satisfy): If a CONTRUCTOR already has a TREE_TYPE, temporarily clear it before calling chill_expand_tuple, to force expansion (processing of the elements). * ch-grant.c (decode_constant): If a tuple (CONTRUCTOR) has a mode, write it out. * ch-decl.c (init_decl_processing): Add some missing inits. Wed Nov 17 17:13:20 1993 Bill Cox (bill@rtl.cygnus.com) * ch-loop.c: Fix unterminated strings in design comments. Add enumeration to the iterator structure for type of loop. unused for now. Wed Nov 17 16:40:05 1993 Bill Cox (bill@rtl.cygnus.com) * ch-decl.c (init_decl_processing): Add long parameters to lots of powerset runtime routines. * ch-expr.c (chill_expand_expr): Change parameters to powerset runtimes so bitlengths are long unsigned ints. * ch-inout.c (build_chill_writetext): Add filename and linenumber as runtime parameters, for better error messages. * ch-loop.c: general pre-rewrite cleanup. * expr.c (store_constructor): Rewrite set interface to setpowersetbits for long bitnumbers, rather than shorts. Tue Nov 16 13:41:12 1993 Bill Cox (bill@rtl.cygnus.com) * ch-expr.c (build_chill_function_call): Stop generating empty copyback statements, which lead to a seg fault. Tue Nov 16 12:20:17 1993 Per Bothner (bothner@cygnus.com) * ch-satisfy.c (satisfy): If satisfying a type whose TYPE_MAIN_VARIANT is not itself, also satisfy the TYPE_MAIN_VARIANT. * ch-actions.c (build_exception_variant): Remove some crud. * ch-actions.c (build_exception_variant), ch-tree.h, ch-decl.c: Remove unused first argument. * ch-decl.c (start_chill_function): Call build_exception_variant in pass 1, not in pass 2. Tue Nov 16 11:10:03 1993 Bill Cox (bill@rtl.cygnus.com) * ch-decl.c (shadow_record_fields): Call new function build_chill_arrow_expr, which returns a ptr-to-a-type. * ch-expr.c (build_chill_arrow_expr): New function, works like build_chill_addr_expr used to do, returning a typed ptr. (build_chill_addr_expr): Now returns unbound ref - analogous to C 'void *'. * ch-parse.y (PREDEF_MODEDECL): Delete unused token. (operand6): Call build_chill_arrow_expr. Reindent a bit. * ch-tree.h (build_chill_arrow_expr): New prototype. Mon Nov 15 16:38:28 1993 Per Bothner (bothner@kalessin.cygnus.com) * stor-layout.c (layout_type): If a SET_TYPE needs more than INT_TYPE_SIZE bits, use BLKmode (and never DImode). * ch-decl.c (start_chill_function): Set DECL_CONTEXT of params. Mon Nov 15 14:49:17 1993 Bill Cox (bill@rtl.cygnus.com) * ch-decl.c (init_decl_processing): Move tasking stuff (__whoami build_function_call, etc.) to tasking_init. * ch-gperf, ch-hash.h: Add ASM keyword. * ch-parse.y: Add ASM statement rules. (format_str, text_arg): Delete last rules for WRITETEXT, READTEXT. * ch-tasking.c: Move tasking stuff here. Sun Nov 14 15:50:34 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-parse.y (mode2): Split into array_mode and non_array_mode to resolve layout ambiguity. * ch-parse.y (checked_name): Remove. Use name_string instead. * ch-parse.y (variantdef): Don't crash if no tag fields. * ch-typeck.c (build_chill_array_type): If varying_p, actually do build_varying_struct here (rather than in ch-parse.y). Fri Nov 12 15:37:45 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-satisfy.c (safe_satisfy_decl): Don't mangle function-local static names. (Let make_decl_rtl generate a unique name.) Sun Nov 14 13:15:26 1993 Bill Cox (bill@rtl.cygnus.com) * ch-expr.c (build_chill_lower, cuild_chill_upper): Rewrite for modes, values, etc. * ch-inout.c (build_chill_writetext): Add ability to write out characters. * ch-satisfy.c (safe_satisfy_decl): Don't mangle function-local static names. (Let make_decl_rtl generate a unique name.) * varasm.c (unpack_set_constructor): Subtract lower domain value from a bit's index value, to match the runtime and allow powersets with negative lower bounds. Fri Nov 12 14:00:48 1993 Bill Cox (bill@rtl.cygnus.com) * ch-inout.c (build_chill_writetext): Save reserved words in uppercase if -fspecial_UC was specified. Fri Nov 12 13:27:12 1993 Per Bothner (bothner@rtl.cygnus.com) * ch-expr.c (chill_expand_expr, build_concat_expr): Simplify string concatenation by treating varying strings as slices. (varying_to_slice): New function. * ch-typeck.c (build_chill_slice): Changed to support the above. Fri Nov 12 12:07:28 1993 Bill Cox (bill@rtl.cygnus.com) * ch-convert.c (convert): Fall through & convert a VARY_ARRAY_REF. * ch-expr.c (build_generalized_call): Start module before a writetext action, so its variables are inside the module-level function. * ch-loop.c (init_loop_counter): Correct for_u_bound computation for enumeration loop on a varying array. Thu Nov 11 07:49:53 1993 Bill Cox (bill@rtl.cygnus.com) * cccp.c (main): Disable trigraphs for CHILL. * ch-decl.c (grok_chill_fixedfields): Add special_UC to conditional to determine case of reserved words. Make PACK/UNPACK warning more specific. * ch-expr.c (build_generalized_call): Enable recognition of WRITETEXT call here. * ch-gperf, ch-hash.h: Remove WRITETEXT as a reserved word. It's only predefined. * ch-inout.c: Add special_UC to conditionals to determine case of reserved words. (build_chill_writetext): Change for call from build_generalized_call. Add code to format integers. * ch-lang.c (lang_decode_option): Add special_UC and special_LC flags and logic to interlock with ignore_case flag. * ch-lex.l: Add special_UC to conditionals to determine case of reserved words. * ch-parse.y: Delete WRITETEXT as reserved word. * ch-tasking.c: Add special_UC to conditionals to determine case of reserved words. (build_instance_type): Make components of INSTANCE unsigned 16-bit integers. * ch-tree.h (build_chill_writetext): Fix prototype. * ch-typeck.c (build_chill_array_type): Make PACK /UNPACK warning more specific. * toplev.c (lang_options): Add -fspecial_LC and -fspecial_UC flags. Wed Nov 10 02:29:53 1993 Bill Cox (bill@rtl.cygnus.com) * Makefile.in: Move ch-hash.h from ch-lex.o rule to ch-lex.c rule, so flex is rerun. * ch-actions.c (chill_expand_assignment): Error if user tries to assign to a LHS function. * ch-decl.c (grok_chill_fixedfields): Use of PACK /UNPACK is only a warning. (init_decl_processing): Add ADDR as a builtin function. * ch-expr.c (build_generalized_call): Add ADDR as a builtin function. (build_chill_addr_expr): Sanity check parameters. * ch-gperf: Remove ADDR as a reserved word, make ASM into one. * ch-hash.h: gperf'd version of the above. * ch-inout.c (chill_stdio_p): Recognize upper/lower case file names. * ch-lex.l: Make ignore-case work. Downcase token before checking for reserved words. * ch-parse.y: Delete ADDR as a reserved word. (mode2, optlayout): Allow PACK/UNPACK specifier. (call): Use build_generalized_call for primval LPRN modename RPRN. (primval): Delete ADDR reference. It's now only predefined, not reserved. * ch-tree.h: Add BUILT_IN_ADDR as a predefined. * ch-typeck.c (build_chill_array_type): Just a warning for PACK/UNPACK usage. * toplev.c: Add -fignore-case and -fno-ignore-case. Tue Nov 9 15:07:02 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c: Reindent for readability. * ch-convert.c (convert): Turn a NULL keyword into [0, 0] for a conversion to INSTANCE. * ch-decl.c: Change special_UC to ignore_case everywhere. (init_decl_processing): Add builtin_function calls for lots of predefined functions. * ch-expr.c: Change builtin function handlers back to accepting args, not a treelist. (route_to_predefined_function): Delete it and its call. (build_generalized_call): Add lots of builtin functions. * ch-gperf (backwards, duration, inttime, null): Delete them. * ch-hash.h: New version. * ch-inout.c: Change special_UC to ignore_case everywhere. * ch-lang.c: Delete special_UC flag. * ch-lex.l: Change special_UC to ignore_case everywhere. * ch-loop.c (high_domain_value, low_domain_value): Change interfaces to build_chill_upper and built_chill_lower. * ch-parse.y: Delete lots of stuff which should only be predefined. * ch-tasking.c: Change special_UC to ignore_case everywhere. Change builtin function handlers back to accepting args, not a treelist. * ch-tree.h: Add lots of builtin functions to the enumerator. Mon Nov 8 18:08:27 1993 Bill Cox (bill@rtl.cygnus.com) * ch-tasking.c (tasking_init): Disable last-minute change for now. Mon Nov 8 17:30:22 1993 Bill Cox (bill@rtl.cygnus.com) * Makefile.in: New commands to build ch-hash.h. Add ch-lex.h to dependencies where it's used. * ch-decl.c (init_decl_processing): Build predefined constants for TRUE, FALSE and NULL. Add declaration for abs builtin function. (lookup_name): Check for a CONST_DECL, don't ask about DECL_NESTING stuff for builtin constant like TRUE. * ch-expr.c (route_to_predefined_function): Add a bunch of predefined functions to the list. * ch-gperf: Define the list of reserved words, minus the predefined words, using the special_UC flag. Remove NULL, TRUE, FALSE - these are only predefined, not reserved. * ch-hash.h: Check this into repository, even though it's derived from ch-gperf, for those users who don't have gperf. * ch-inout.c (build_chill_io_list_type): Use the special_UC flag to refer to the IO types. Standardize the indentation. * ch-lex.h: Add enumerators for TRUE, FALSE, NULL. * ch-lex.l: Total rewrite of reserved-word recognition, using the ch-hash.h lookup routines. * ch-parse.y: Delete a bunch of unused rules for predefined procedures and their parameters. * ch-tasking.c (tasking_init): Build predefined functions for COPY_NUMBER, GEN_CODE, GEN_INST, and GEN_PTYPE. Not complete yet. Change interface to builtin handlers to accept just an expression list. Wed Nov 3 18:07:08 1993 Bill Cox (bill@rtl.cygnus.com) * Makefile.in: Debug, activate rule to make CHILL hash table. * ch-actions.c: Compress parameter type lists per standard. * ch-decl.c: Correct spelling in comment, compress parameter lists. (init_decl_processing): Check special_UC flag to build builtin function declarations. * ch-expr.c (route_to_predefined_function): Check for upper OR lowercase function names. * ch-gperf: Update the list of keywords. * ch-inout.c (build_chill_io_list): Check for special_UC flag to build I/O list type. Compress parameter lists. (chill_stdio_p): Check for special_UC flag in recognizing file streams. * ch-lang.c (lang_decode_option): Add command-line options for upper-case keywords and user labels. * ch-lex.l (init_lex): Initialize ridpointers to uppercase if special_UC flag is set. (downcase, getlc, check_newline): Don't do this if ignore_case flag is set. * ch-parse.y (variantdef, case_expr): Report 'sorry' for use of multiple selector expressions. Sat Oct 30 01:06:19 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-expr.c (compare_record, finish_chill_binary_op): Compare STRUCTs (and INSTANCEs) for equality. * ch-expr.c (invalid_operand): New functions, combines most of the functionality of invalid_left_operand and invalid_right_operand. * ch-convert.c (digest_constructor): Set TREE_CONSTANT if it is. Sat Oct 30 11:12:47 1993 Bill Cox (bill@rtl.cygnus.com) * Makefile.in (chill): Add back in the commands to build chill (the script) from chill.in. Fri Oct 29 16:25:38 1993 Per Bothner (bothner@kalessin.cygnus.com) * expr.c (store_constructor): If SET_TYPE target is in a register, use a stack temporary (since we must take its address). * ch-expr.c (build_allocate_global_memory_call, build_allocate_memory_call): Cast argument pointer to PTR, if needed (using location cast). Also, some other cleanups. * ch-parse.y (bracketed_action): Re-arrange things so that a handler following BEGIN END comes before the final poplevel. * ch-typeck.c (build_chill_cast): Just return if already correct type. Re-do DO WITH so that build_component_ref for is done lazily (at each reference) instead of eagerly (at the beginning of DO WITH). This is needed for tagged variants, * ch-tree.def (WITH_DECL): New declaration tree code. * ch-decl.c (lookup_name): Recognize WITH_DECLs. * ch-decl.c (handle_one_level): Variant parts are currently indicacted with '__CASE'. Recognize that. Generate a WITH_DECL (instead of ALIAS_DECL) for each field name. Thu Oct 28 22:17:41 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-expr.c (build_chill_length), ch-typeck.c (build_chill_cast): Remove some old crud. * ch-typeck.c (build_chill_cast): Another attempt at a compromise between robustness and generality for casts. Location conversions are now less likely to confuse things. * ch-parse.y (optactions): Allow further optactions following an initial semicolon. * ch-parse.y: Add error messages on EVENT and BUFFER. * ch-decl.c, ch-expr.c, ch-parse.y, ch-typeck.c: Undo some of the Oct 27 changes. Convert (some) builtin functions previously using reserved names to be just predefined. * tree.h (enum builtin_in_function): Added END_BUILTINS at end. * ch-decl.c: Add predefines for allocate_memory, allocate_global_memory, return_memory, writetext. * ch-expr.c (check_arglist_length): New function. * ch-expr.c (build_generalized_call): If "function" is a builtin, build the appropriate tree. * ch-parse.y, ch-lex.l: No longer recognize many pre-defined functions at the lexer/parser level. * ch-tree.h (enum chill_built_in_function): New type. Thu Oct 28 16:43:36 1993 Bill Cox (bill@rtl.cygnus.com) * ch-expr.c (allocate_memory, allocate_global_memory): Check for invalid parameters, issue errors. * expr.c (store_constructor): Calculate bitlength, startrtx and endrtx of powerset correctly. Define targetx, use it and XEXP correctly. Wed Oct 27 08:25:56 1993 Bill Cox (bill@rtl.cygnus.com) * ch-expr.c (build_max_min): Error for passing empty tuple as the argument. Wed Oct 27 08:25:56 1993 Bill Cox (bill@rtl.cygnus.com) * ch-decl.c (init_decl_processing): Make allocate builtins have a pointer-to-pointer-to-void first parameter, rather than a reference parameter. * ch-expr.c (build_allocate_memory_call, build_allocate_global_memory_call): Do automatic ADDR () on the first parameter, for backward compatibility. * ch-grant.c (grant_one_decl): Don't grant if DECL_SOURCE_LINE is zero. (start_chill_module_code): Set DECL_SOURCE_LINE to zero so that module-level function isn't granted. * ch-parse.y (handleraction): Add return_memory action. * ch-typeck.c (chill_similar): Allow a void_type to be similar to anything. This makes allocate_memory and return_memory pointer parameters slide through. Tue Oct 26 00:12:19 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-typeck.c (build_chill_array_ref): Check for and complain if there are more index expressions than the array rank. * ch-actions.c (chill_expand_assignment): Emit appropriate error message if RHS of multiple assignment is tuple/case/if. * ch-tree.def (CONCAT_EXPR): Change TREE_CODE_CLASS from 'e' to the more specific '2'. (Fixes a satisfy bug.) Thu Oct 21 17:25:33 1993 Bill Cox (bill@rtl.cygnus.com) * ch-parse.y: Revert experimental error-generating change that was checked in by mistake. Thu Oct 21 12:15:30 1993 Bill Cox (bill@rtl.cygnus.com) * ch-satisfy.c (safe_satisfy_decl): Satisfy the hidden tasking code variables associated with a process or signal. (Apparently I forgot to actually check these in last time.) * ch-tasking.c: Replace last calls to get_tasking_code with working references to DECL_TASKING_CODE_DECL. Thu Oct 21 10:27:42 1993 Bill Cox (bill@rtl.cygnus.com) * ch-satisfy.c (safe_satisfy_decl): Satisfy the hidden tasking code variables associated with a process or signal. * ch-tasking.c (build_gen_inst, build_gen_ptype): Use the decl's tasking_code_decl pointer, rather than trying to look it up in the hash table or linked scope list. Wed Oct 20 09:52:44 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (lookup_and_handle_exit): Only output error message in pass 1. * ch-convert.c (convert): Correct conversion of VARYING array to/ from non-VARYING one. * ch-decl.c (print_lang_decl): Add debug output for DECL_TASKING_CODE_DECL field in the node. (decl_tasking_code_var): Delete it. Its calls are replaced woth generate_tasking_code_variable calls, plus a little glue. (push_extern_process): generate tasking_code_variable as local static variable, point the process' function_decl at it for later reference by build_start_process. (print_mode): Use CHILL upper-case convention to print modes. * ch-lex.l: Must initialize tasking-related trees to NULL at start of each pass, or we lose the fact that the user did or did not specify a value for each of them. * ch-parse.y (check_end_label, action, exceptlist): Only output error message in pass 1. (sendaction): Add comments. (sigdef): Comment out special handling for external signals. Chain tasking_variable_decl onto signal structure decl, for easier non-symbol-table access later. * ch-tasking.c (generate_tasking_code_variable): Do work in both passes, using do_decl so we can pass the pass 2 value of the process_type or signal_code to it. Only update the process_type if the incoming pointer isn't null and pass == 2. Use a new parameter to know whether to include an init expression. (build_process_header): Attach tasking-code_variable to process function_decl for easy access later, not through the hash table. (build_start_process): Get tasking_code_variable out of the process' function decl. (build_signal_struct_type): Return the type decl, to be accessed by ... (build_signal_descriptor): .. this function. (build_receive_case_label): Get data buffer pointer not from hash table, but from Tiemann's current rc_state structure instead. * ch-tree.h: Change prototype, fix comment, add DECL_TASKING_CODE_DECL macro for tasking_code_variable storage. Tue Oct 19 17:39:40 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-lex.l (equal_number): If the "number" is a CONST_DECL, return its DECL_INITIAL. * ch-satisfy.c (safe_satisfy_decl): Change logic for rtl generation for decls to not use DECL_ASSEMBLER_NAME. * ch-decl.c: Set DECL_ASSEMBLER_NAME to DECL_NAME. This matches C, and allows dbxout to emit proper user-level names. (It would be cleaner to fix dbxout to use DECL_NAME ...) * ch-decl.c (outer_decls): New global list of the decls granted into the outer scope. (pop_module): Change code that grants into outer scope accordingly. (lookup_name_for_seizing): Similarly update. (push_scope_decls): Handle SEIZE ALL from the global scope by searching outer_decls. * ch-grant.c (grant_array_type): Fix thinko. * ch-inout.c (build_chill_writetext): Remove excessive TREE_TYPE. Mon Oct 18 15:57:00 1993 Per Bothner (bothner@kalessin.cygnus.com) * varasm.c (output_constructor): Add support for non-zero lower array bound. * c-typeck.c (output_init_element): Revert recent changes. * varasm.c (emit_set_data): Fix emitting set constant data. * ch-lex.l (yywrap): Reset line number to 0, not 1. It sets incremented to 1 by check_newline. * ch-tree.h: Restore old version. * ch-expr.c (finish_chill_binary_op): Convert TRUNC_DIV_EXPR to RDIV_EXPR if an operand is floating. (This functionality got dropped when hacking finish_chill_binary_op). * ch-actions.c (build_chill_case_expr): Set type to NULL_TREE. not error_mark_node. * ch-actions.c (chill_expand_assignment): Allow such borderline constructs as: LHS OR:= [X]. * ch-convert.c (convert): Hande CASE_EXPR (and COND_EXPR) with unknown (NULL_EXPR) type, not just CONSTRUCTORS. * ch-decl.c (do_decl): Remove CONSTRUCTOR kludge. * ch-typeck.c (chill_compatible): Allow expr to have NULL mode if it's a CASE_EXPR or COND_EXPR (and not just CONSTRUCTOR). Mon Oct 18 13:20:53 1993 Ken Raeburn (raeburn@rover.cygnus.com) * c-typeck.c (output_init_element): Limit previous changes to ARRAY_TYPE and SET_TYPE initializers. Sun Oct 17 23:15:00 1993 Bill Cox (bill@cygnus.com) * c-typeck.c (output_init_element): Handle NULL domain case. * ch-decl.c (do_decl): Revert bogus initializer type change. * ch-grant.c (chill_finish_module_code): Put module's decl onto the module_init_list, for chill_finish_compile's possible use. (chill_finish_compile): Rename variables for clarity, add commented-out code as example for assignment of module address to its init_list entry. Sun Oct 17 15:16:54 1993 Bill Cox (bill@cygnus.com) * ch-convert.c: Move semicolon to separate line - easier to see. * ch-decl.c (do_decl): Handle untyped_expr initializers by simply using the variable's declared type - no compatibility check can be made if the expression has no type. * ch-expr.c (expand_packed_set): Fix endless loop - increment the loop variable. (fold_set_expr): Fix two other endless loops by passing correct parameters to unpack_set_constructor. * varasm.c: Standardize 'for' loop. Sun Oct 17 12:16:21 1993 Bill Cox (bill@cygnus.com) * c-typeck.c (output_init_element): Handle initializer for array with non-zero lower index bound. Sat Oct 16 16:48:48 1993 Per Bothner (bothner@cygnus.com) * ch-expr.c (finish_chill_binary_op): Use TREE_SET_CODE to change TREE_CODE. Sat Oct 16 08:07:17 1993 Bill Cox (bill@rtl.cygnus.com) * ch-expr.c (finish_chill_binary_op): Disable rough-draft code, not intended for release. Fri Oct 15 21:44:11 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com) * expr.c (store_constructor): use PROTO for pack_set_constructor Fri Oct 15 10:30:09 1993 Bill Cox (bill@cygnus.com) * ch-expr.c (finish_chill_binary_op): Activate some type-setup code. * expr.c (store_constructor): Subtract arrays minimum element. Makes orientexpress work. Fri Oct 15 09:26:24 1993 Bill Cox (bill@cygnus.com) * ch-convert.c, ch-expr.c: Add externs so it'll compile. * ch-tree.def: Add BASED_DECL definition. Thu Oct 14 13:20:02 1993 Bill Cox (bill@cygnus.com) * ch-actions.c (build_chill_cause_exception): Pass the *address* of the filename string to the runtime routine, rather than passing the string by value. Thu Oct 14 13:08:07 1993 Per Bothner (bothner@kalessin.cygnus.com) * expr.c (store_constructor): Use a (usually) more efficient algorithm for setting SET types. Thu Oct 14 13:08:07 1993 Per Bothner (bothner@kalessin.cygnus.com) Changes to better support 1984 version of Chill, which doesn't really distinguish BOOL and BITS(1) or CHAR and CHARS(1). * ch-lang.c, toplev.c, ch-tree.h (flag_old_strings): New flag. * ch-typeck.c (chill_similar): Support flag_old_strings. * ch-convert.c (convert_to_boolean): Generalize code to convert singleton bitstring to Boolean. * ch-convert.c (convert): Use string_one_type_node. * ch-convert.c (convert): Add code to convert Boolean to BOOLS(1). * ch-convert.c (convert): In code that converts fixed string to varying use new 'e' variable, rather than original 'expr' variable. Allows cascaded conversions: CHAR -> CHARS(1) -> varying CHARS. * ch-decl.c (string_type_node, const_string_type_node, int_array_type_node), ch-tree.h: Removed. * ch-decl.c (string_one_type_node, bitstring_one_type_node, bit_zero_node, bit_one_node), ch-tree.h: New globals tree nodes. * ch-decl.c (init_decl_precessing): Remove some junk. * ch-expr.c (build_generalized_call): If flag_old_strings, treat string index as string slice. Also, better error checking. Added support for (some kinds of) BASED declarations. * ch-tree.def (BASED_DECL): New tree code. * ch-decl.c (lookup_name): Implement BASED_DECL using build_chill_indirect_ref. * ch-decl.c (do_based_decls): Make a BASED_DECL. * ch-parse.y: Call do_based_decls for DCL ... BASED(...). * ch-satisfy.c (safe_satisfy_decl): Handle BASED_DECL. Improve handling of set binary operations. * ch-expr.c (expand_packed_set): New function. (fold_set_expr): Re-write. Simpler, more general algorithm. (build_set_expr): Only used for comparsions now. (finish_chill_binary_op): Handle set ops better (more directly). (fold_set_and, fold_set_diff, fold_set_eq, fold_set_or, fold_set_ne, fold_set_xor): Removed. No longer needed. * ch-decl.c: Remove calls to allocate_lang_decl. * ch-tree.c (build_string_type): If const length, layout immediately. Mon Oct 11 17:23:02 1993 Bill Cox (bill@cygnus.com) * ch-decl.c (init_decl_processing): Define __whoami and __wait_buffer functions. * ch-lex.l (ch_lex_init): Reset tasking numbers to zero. * ch-parse.y (sigdef): Add new add_taskstuff_to_list parameter. * ch-tasking.c (get_tasking_code): Search tasking_list for tasking code name match. Can't use lookup_name. (get_task_name): New function. (generate_tasking_code_variable): Return if pass 1. Always update *tasking_code_ptr. (build_process_header): Add new add_taskstuff_to_list parameter. (tasking_setup): New code to unpack the tasking list entries no built by .. (add_taskstuff_to_list): Accept new parameter, add it to the list. * ch-tree.h (add_taskstuff_to_list): Add new parameter. Mon Oct 11 14:54:50 1993 Per Bothner (bothner@kalessin.cygnus.com) * Makefile.in (cc1chill): Also link in $(BC_OBJS). Mon Oct 11 06:28:39 1993 Doug Evans (dje@canuck.cygnus.com) * ch-decl.c (flag_allow_single_precision): New global, from ss-931002 merge. Sun Oct 10 09:11:52 1993 Bill Cox (bill@rtl.cygnus.com) * Makefile.in: Remove references to chill.in and ch-hash.h. Remove bogus cc1chil : chill dependency. Fri Oct 8 16:00:04 1993 Bill Cox (bill@cygnus.com) * ch-actions.c (adjust_parm_or_field): Add parameter to decl_temp1 call. *ch-decl.c (decl_tasking_code_var): Replace do_decl call with decl_temp1 call. (decl_temp1): Add parameter to signal 'make this external'. (shadow_record_fields): Add parameter to decl_temp1 call. * ch-expr.c (chill_expand_case_expr): Add parameter to decl_temp1 call. * ch-grant.c (chill_finish_compile): Add code to spoof get_file_function_name, so we don't get __tmp_s1_code, for example, as the module-level code's name. * ch-loop.c (build_temporary_variable, begin_for_range, init_loop_counter): Add parameter to decl_temp1 call. * ch-parse.y (quasi_signaldef): Clear quasi_signal flag here, for easier maintenance. (sendaction): Rewrite to receive SIGNALNAME token correctly from ch-lex.l (name_type_signal). (signaldef): Don't clear quasi_signal here. * ch-tasking.c (generate_tasking_code_variable): Tell decl_temp1 to make the variable public (visible to linker). (build_start_process): Add parameter to decl_temp1 call. (tasking_setup): Comment out band-aid hack which calls generate_tasking_code_variable. Shouldn't be necessary. Use null_pointer_node rather than integer_zero_node in entry_point. More rewrites. (build_signal_descriptor): Name the non-signal in the error msg. Rewrite the building of the signal envelope - avoid seg fault. Add parameter to decl_temp1 call. (expand_send_signal, build_receive_case_start, build_receive_case_end, build_buffer_descriptor): Add parameter to decl_temp1 call. * ch-tree.h: Add parameter to decl_temp1 proto. * chill: Add new CHILL frontend directory Tue Oct 5 13:51:27 1993 Bill Cox (bill@cygnus.com) * ch-grant.c: Standardize indentation. * ch-parse.y (end_function): Unconditionally poplevel for processes. * ch-tasking.c (build_process_header): Unconditionally pushlevel. (generate_tasking_code_variable): Stop using pass number to force a one-time action. * ch-tree.h (build_chill_slice): Delete proto since function went static. Mon Oct 4 13:52:36 1993 Bill Cox (bill@cygnus.com) * ch-decl.c (decl_tasking_code_var): Use do_decl, since we're called here in both passes. Set DECL_ASSEMBLER_NAME. (lookup_name_for_seizing): Move NULL test forward to prevent seg fault. * ch-expr.c (finish_chill_binary_op): Mode access to TREE_CODE to prevent a seg fault in telebras/dynsto.ch. Make indentation changes. * ch-tasking.c (build_signal_struct): Rename to build_signal_struct_type. (build_send_signal): Rename to expand_send_signal. (generate_tasking_code_variable): Return the var's decl. (build_signal_struct_type): Move generate_tasking_code_variable and add_taskstuff_to_list calls to .. * ch-parse.y (sigdef): .. here. And make indentation changes. * ch-tree.h: Rename functions, add return values. Mon Oct 4 15:43:56 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-convert.c (digest_constructor): Convert element to element_type. * ch-parse.y (end_function): Use DECL_ARGUMENTS to check for parameterless process. Fri Oct 1 13:57:30 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-typeck.c (chill_location): New function. Based on lvalue_p, but also handle Chill-specific VARY_ARRAY_REF. * ch-typeck.c, ch-tree.h (CH_LOCATION_P), ch-convert.c: Use chill_location instead of lvalue_p. Fri Oct 1 11:28:42 1993 Bill Cox (bill@cygnus.com) * ch-convert.c (convert): Back out Michael's changes, unintentionally checked in. * ch-lex.l (handle_use_seizefile_directive): No longer downcase seize file names. * ch-parse.y (sendaction): Fix a couple of seg faults. Comment out SEND BUFFER processing for now. * ch-tree.h: Fix comment. Thu Sep 30 17:00:42 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-tree.h (CH_CHARS_ONE_P, CH_BOOLS_ONE_P): New macros, for recognizing singleton strings. * ch-tree.h (MARK_AS_STRING_TYPE): New macro. * ch-tree.c (build_string_type, build_bitstring_type), ch-convert.c (convert): Use it. * ch-typeck.c (build_chill_slice): Take length rather than upper bound. This makes it easier to recognize that A(X UP LENGTH) really has fixed length. Also, if the argument is string, mark the slice as a string too. Also, handle varying strings. * ch-typeck.c (conflate_singleton_strings): New global. * ch-typeck.c (chill_similar): If conflate_singleton_strings is set (as it currently is), allow CHARS(1)/BOOLS(1) to be similar to CHAR/BOOL, as required by the 1984 version of Z.200. * ch-convert.c (convert_to_char): Convert CHARS(1) to CHAR. * ch-convert.c ( build_array_type_for_scalar): If input is string, so is output. * ch-convert (maybe_turn_scalar_into_arra), ch-tree.h: Removed. * ch-convert.c (convert): Convert CHAR to CHARS(1). This fixes 'X // := Y' and is also a general simplification. * ch-actions.c (chill_expand_assignment): Convert 'LHS OP := RHS' to 'LHS := LHS OP RHS' (using stabilize_reference on LHS). Also, call save_expr on RHS if a multiple assignment. * ch-parse.y (assignaction): Therefore, no longer need to call stabilize_reference on RHS. * ch-typeck.c (build_chill_modify_expr), ch-tree.h: Remove modifycode parameter. Make it the caller's responsibility to handle . * ch-actions.c, ch-decl.c, ch-except.c, ch-expr.c, ch-grant.c, ch-loop.c: Fix calls to build_chill_modify_expr accordingly. Wed Sep 29 18:02:55 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-lang.c (string_index_type_dummy), ch-tree.h: New variable. * ch-decl.c (integer_minus_one_node), ch-tree.h: New variable. * ch-parse.y (arrayindex: modename): Remove useless code. * ch-satisfy.c (satisfy): Don't gag on string_index_type_dummy, * ch-tree.c (build_string_type): Pass string_index_type_dummy as the parent type of the index range. * ch-typeck.c (layout_chill_range_type): Recognize and handle string_index_type_dummy - specifically allow an empty range. Wed Sep 29 13:36:23 1993 1993 Bill Cox (bill@cygnus.com) * ch-convert.c (convert_to_reference): Check for loc-identity mismatches correctly (and remove one of those chill_compatible calls). * ch-decl.c (decl_tasking_code_var): New function, called from push_extern_process and push_extern_signal. * ch-parse.y (end_function): Delete parameter. Check current_function_decl whether it's actually a process, and whether it has parameters. Make Michael's change simplifying the pass 2 test, preventing a seg fault. (procedure, process): Change calls to end_function, remove code saving value from build_process_header. Delete redundant chill_ phrases from some function calls. * ch-tasking.c: Remove some redundant _chill phrases from function names. * ch-tree.h: Remove some redundant _chill phrases from function names. Add the CH_VARYING_ARRAY_TYPE macro, call it from all relevant places. * ch-typeck.c: Use the new macro. Cast TREE_CODEs to chill_tree_code. Wed Sep 29 13:07:43 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-convert.c (convert_to_reference): Remove redundancies. * ch-convert.c (convert): Handle convert_to_reference with a recursive convert call. * ch-decl.c (do_decl): Add missing compatibility-checking of initializer (don't depend on convert). Tue Sep 28 00:02:25 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-tree.h (CH_LOCATION_P): New macro. * ch-typeck.c (layout_chill_range_type): Fix call to type_for_size, when figuring out a defaulted parent type. * ch-expr.c (build_chill_lower, build_chill_sizeof): Check for TREE_CODE_CLASS != 't' rather than == 'd'. * ch-expr.c (build_chill_function_call): Use CH_LOCATION_P to check for location, rather than TYPE_CODE_CLASS == 'd'. * ch-tree.c (build_string_type): Make 2-pass safe. Also, change parameter to be length, not index type. * ch-parse.y (mode2), ch-expr.c (build_concat_expr), ch-lex.l (build_chill_string): Modify callers of build_string_type accordingly. * ch-lex.l (check_newline): Don't look for # directive inside a C-style comment. * ch-grant.c (grant_array_type): Make more robust for char- and bit-strings (allow non-constant sizes). Change parameters and return types. (raw_decode_mode): Use grant_array_type for bitstrings. (otherwise): Fix grant_array_type callers. Mon Sep 27 16:57:57 1993 Per Bothner (bothner@kalessin.cygnus.com) Remove changes of Sep 15. * ch-tree.h (CH_SINGLETON_DOMAIN): Removed. * ch-typeck.c (chill_similar): Don't allow a singleton powerset to be similar to its domain. * ch-convert.c (convert_to_boolean): Don't convert a singleton SET_TYPE constructor to a Boolean. * ch-actions.c (chill_expand_assignment): Handle IN_EXPR on LHS of assignment, which is what we're current (temporarily?) using. Mon Sep 27 06:01:57 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c, ch-convert.c, ch-decl.c, ch-expr.c, ch-grant.c, ch-inout.c, ch-parse.y, ch-satisfy.c, ch-tasking.c, ch-tree.c, ch-tree.h, ch-typeck.c: -Wall cleanup. Add prototypes where missing. Delete unused variables. Cast uses of tree_codes to chill_tree_code, which they are. Sun Sep 26 13:09:57 1993 Bill Cox (bill@rtl.cygnus.com) * ch-decl.c (do_decl): Save initializer in pass zero case also. * ch-lex.l: Fix comments, indentation. * ch-parse.y: Standardize error messages to use uppercase for CHILL keywords rather than quoting them. Suggestion from docs department. * ch-tasking.c: Pervasive changes to get processes to compile and START. * ch-tree.h: Delete prototypes for functions whic I made static inside ch-tasking.c. Sun Sep 26 02:40:02 1993 Michael Tiemann (tiemann@blues.cygnus.com) * ch-lex.l (yywrap): Call `check_newline' in case the file started with a line directive. Sat Sep 25 13:54:41 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-decl.c: Expand pre-amble comment. * ch-decl.c (struct scope, push_module): Use new field tail_chain_module to build child-module list in order. (Just to make compiler debugging a little less confusing.) * ch-decl.c (struct scope): New field weak_decls. * ch-decl.c (find_implied_types): New interface. Now pre-pend new enum types to a given input list. This makes it easier to avoid duplicates, which should at least be more efficient. Also, handle FUNCTION_DECL. * ch-decl.c (bind_saved_names): Removed. Distribute its functionality over new functions (push_scope_decls, pop_scope_decls, build_implied_names, bind_sub_modules). The goal (which seems to have been more-or-less attained) was to fix weak name handling. * ch-decl.c (poplevel): Use new function pop_scope_decls. * ch-tasking.c (build_signal_struct, build_tasking_message_type): Use build_decl directly, rather than grok_chill_fixedfields (which depends on ignore_exprs and has more overhead). * ch-tasking.c (build_signal_struct): Construct the type only in pass 1. * ch-typeck.c (build_chill_slice): Use my_build_array_ref rather than build_array_ref (which does C-specific "optimizations"). (Hence move my_build_array_ref up earlier in the file.) Sat Sep 25 03:47:28 1993 Michael Tiemann (tiemann@blues.cygnus.com) * ch-tasking.c: Declare static variable `void_ftype_void'. (chill_tasking_init): Initialize `void_ftype_void' here. (build_tasking_struct): Use, don't declare `void_ftype_void'. (generate_tasking_code_variable): Call `do_decl', not `decl_temp1' to declare TASKING_CODE_NAME. (tasking_setup): Drop into 1-pass mode so that all tasking-related declarations are installed in the global scope. Use correct CHILL types for initializers (since ptr_type_node doesn't have the right meaning for CHILL). Also, call `do_decl' instead of `decl_temp1' for `init_struct'. (add_taskstuff_to_list): Set TASKING_LIST in pass 1 to keep `chill_finish_compile' in sync between passes. * ch-decl.c (do_decl): Set DECL_ASSEMBLER_NAME for declarations on pass zero. Keep obstacks in sync, and always call `finish_decl' for pass zero declarations. (push_chill_extern_function): Keep obstacks in sync, and always call `finish_decl' for pass zero declarations. (build_enumerator): Ditto. (grok_chill_variantdefs): Change PASS test to exclude only pass one. (finish_struct): Ditto. * ch-expr.c (build_chill_component_ref): Ditto. (build_chill_binary_op): Ditto. * ch-tree.c (build_powerset_type): Ditto. (build_bitstring_type): Ditto. * ch-typeck.c (build_chill_range_type): Ditto. (build_chill_struct_type): Ditto. * ch-decl.c (build_chill_exception_decl): Clarify reasons for extra pushing and popping of obstacks. * ch-inout.c (build_chill_io_list_type): Call `satisfy_decl' on IO_DESCRIPTOR. This causes IO_DESCRIPTOR to be laid out. * ch-grant.c (chill_finish_compile): Clear out both MODULE_INIT_LIST and TASKING_LIST if either contains stuff from pass one. * ch-parse.y (rccase_label): Add NAME rules so that pass one works w/o knowing we're parsing a signal. Simplify SIGNALNAME rules since we only get SIGNALNAME tokens in pass two. (sendaction): Ditto. * ch-lex.l (name_type_signal): Enable returning SIGNALNAME and BUFFERNAME on pass two. The grammar now handles this. * ch-decl.c (lookup_remembered_decl): Deleted. Fri Sep 24 15:27:13 1993 Bill Cox (bill@cygnus.com) * ch-decl.c (lookup_remembered_names): Removed. It was being misused in ch-lex.l. * ch-lex.l (name_type_signal): Revert last change. Basically, we cannot use the C typedef/variable name trick in CHILL, due due to the language's 2-pass nature. * ch-parse.y (arrayindex): Rewrite for correctness, and to avoid a seg fault. * ch-tree.h (lookup_remembered_name): Comment out the prototype. Fri Sep 24 11:01:31 1993 Michael Tiemann (tiemann@blues.cygnus.com) * ch-decl.c (do_decl, push_chill_extern_function): Change pass checks so the pass == 0 case is handled for built-in types. (push_modedef): Add check for error_mark_node. (lookup_remembered_decl): New function. (pushlevel, poplevel) Change pass checks. (pushdecl): Check type as well for NULL. (build_enumerator): Handle pass == 0 case. * ch-lex.l: Use lookup_remembered_decl to get lastiddecl during pass 1. * ch-parse.y: Set pass to zero to indicate initial decl processing. Replace NAME references with SIGNALNAME references. (startaction): Only check copy number if not ignoring actions. Always call build_chill_start_process. (optstartset): Don't lookup the instance name. * ch-tasking.c (generate_tasking_code_variable): Replace do_decl call with decl_temp1 call. (build_chill_start_action): Check for ignore_actions here. (build_tasking_message_type): Layout the type. (rc_state_type): New structure to keep nested receive-case info in. (build_chill_receive_case_start, build_chill_receive_case_end): Use the new struct. Fri Sep 24 04:19:15 1993 Michael Tiemann (tiemann@blues.cygnus.com) * ch-tasking.c (build_chill_receive_case_start): `namedecl' should be a _DECL, not an IDENTIFIER_NODE. Thu Sep 23 18:18:24 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-decl.c (find_implied_types): Handle VAR_DECLs. * ch-decl.c (print_lang_identifier): Print IDENTIFIER_OUTER_VALUE. * ch-actions.c (chill_expand_result): Allow value-less RETURN. * ch-expr.c (resolve_component_ref): Recognize error_mark. * ch-convert.c (digest_constructor): Handle a nested powerset tuple. * ch-satisfy.c (satisfy): Use return value of layout_chill_range_type. * ch-typeck.c (chill_similar): Repeatedly get parent modes of ranges, not just once. * ch-typeck.c (chill_root_resulting_mode), ch-tree.h: New function. * ch-typeck.c (layout_chill_rang_type): Re-do type-checking to follow Blue Book better (check for Compatibility). * ch-tree.h (CH_ROOT_RESULTING_MODE): New macro. * ch-lex.l (use_seizefile_name, current_seizefile_name), ch-tree.h: New variables. The latter replaces in_seizefile. Changes to store in the new DECL_SEIZEFILE field each seize ALIAS_DECL the name in the most recent use_seize_file directive. (This requires that use_seize_file directives written to the grant file be written before the SEIZEs that need it.) Allow clashing declarations granted into the global scope (produce a warning), but remember the seizefile case from (using the DECL_SEIZEFILE field of the grant ALIAS_DECL). The a SEIZE will select the granted decl that matches its DECL_SEIZEFILE (in other words: grants from the most recent use_seize_file will be preferred). * ch-tree.h (DECL_SEIZEFILE), ch-tree.def: New macro. * ch-tree.h (global_value, IDENTIFIER_GLOBAL_VALUE): Renamed to outer_value, IDENTIFIER_OUTER_VALUE. Changes to cause the use_seize_file directives to be written out in order as they're seen in source. * ch-lex.l (files_to_seize, next_file_to_seize, last_file_to_seize): Changed to have type TREE_LIST of pointer to IDENTIFIER_NODE. * ch-lex.l (handle_use_seizefile_directive): Modify appropriately. Don't call grant_use_seizefile. * ch-lex.l (mark_use_seizefile_written): New function. * ch-grant.c (decode_decl): Write out use_seize_file directive, if needed, before writing a seize declarations. * ch-decl.c (pop_module): Handle decls granted into the global module specially, setting IDENTIFIER_OUTER_VALUE. * ch-decl.c (lookup_name_for_seizing): Check IDENTIFIER_OUTER_VALUE. Thu Sep 23 19:05:37 1993 Bill Cox (bill@cygnus.com) * ch-decl.c (push_chill_extern_process): Delete unused variables, declare the process' tasking_code variable as external. * ch-parse.y (process): Force ignore_exprs to FALSE while parsing the process header. * ch-tasking.c (sigdef): Move resetting of quasi_signal from here to (signaldef). * ch-tree.h: Add prototype. * expr.c (store_constructor): Emergency first-aid. Rewrite later. Thu Sep 23 12:57:53 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-expr.c (build_chill_function_call): Move possible call to chill_start_module_code until we know we're not calling a builtin. * ch-decl.c (save_expr_under_name): Use pushdecllist, not proclaim_decl (which provide for popping the decl). * ch-parse.y (optname): Also allow TYPENAME. Thu Sep 23 09:18:35 1993 Bill Cox (bill@cygnus.com) * ch-decl.c (print_lang_decl): Make weak name output more standard. (print_lang_identifier): Make signal-data flag output more standard. (push_chill_extern_process): Pass correct arg tree to push_chill_extern_function. (push_syn_decls, fixup_unknown_type, chill_modes_equiv): Standardize function header layouts (Makes the tcov script work better). * ch-except.c (chill_finish_on): Standardize function header. * ch-expr.c (fold_set_or): Standardize function header. * ch-grant.c (print_proc_tail, print_proc_exceptions): Standardize function headers. (decode_constant): Make sure that alpha operators are surrounded with whitespace. * ch-parse.y: Spell Z.200 correctly in comments. Wed Sep 22 10:42:31 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-expr.c (build_chill_addr_expr), ch-tree.h: New function. * ch-parse.y, ch-decl.c (shadow_record_fields): Use it. * ch-lex.l (handle_use_seizefile_directive): Don't emit use_seize_file directive if in_seizefile. * ch-convert.c (digest_structure_tuple): Fix code that checks for excess init values. * ch-decl.c (layout_chill_variants): Move increment of nlabels inside the proper loop. * ch-grant.c (print_struct): Add missing loop for tag_list. (print_struct): Look for variant fields by checking for a UNION_TYPE, not a NULL name, since we must use a dummy name. * ch-parse.y (structured_variable): Various fixing. * ch-decl.c (shadow_record_fields): Rename arg decl -> struct_val. * ch-satisfy.c (safe_satisfy_decl): Disable copying of modes for NEWMODE (and hence novelty checking), until we figure out a better way. * ch-except.c (finish_handler_array): Use null_pointer_node, not integer_zero_node (which fails to type-check). * c-typeck.c (get_constructor_element_type): New function. * ch-tree.h (CH_NOVELTY_FLAG): Now also used in TYPE_DECLs. (CH_NOVELTY): Redefined to call new function chill_novelty. (CH_CLASS_IS_XXX, TYPE_NEWMODE, CH_CLASS_MODE): Removed. * ch-typeck.c (classify_chill_expr renamed to chill_expr_class): Take extra output parameter (for M, as in M-value class). * ch-typeck.c (chill_novelty): New function. (Also de-references.) * ch-expr.c (resolve_component_ref, build_chill_component_ref): New functions. Handle 2-pass and variant records. * ch-parse.y (primval DOT name): Use instead of build_component_ref. * ch-satisfy.c (satisfy, case COMPONENT_REF): New case, call resolve_component_ref. * ch-expr.c (build_generalized_call): Extract single arg from arg list before calling build_chill_cast. * ch-parse.y (defining_occurrence_list): New non-terminal. Use it to replace locnamelist, synnames, and modenames. * ch-parse.y: Re-write parsing of variant records. * ch-decl.c (grok_chill_variantdefs): Now return a FIELD_DECL rather than just its type. * ch-inout.c (build_chill_io_list_type), ch-parse.y: Change callers appropriately. * ch-tree.h (TYPE_TAG_VALUES): Add an extra level of TREE_LIST, to support multiple tag fields. * ch-grant.c (print_struct), ch-decl.c (layout_chill_variants): Support multiple tag fields. * ch-convert.c (remove_tree_element, digest_structure_tuple): New functions, to digest structure tuples, without calling the code in c-typeck.c. Handles variant tuples and tags (partially). * ch-convert.c (digest_constructor, convert): Call digest_structure_tuple when appropriate. * ch-convert.c (digest_constructor): Re-arrange a bit. * ch-decl.c (push_modedef): Defer copying of tree until ... * ch-satisfy (safe_satisfy_decl): ... here. * ch-decl.c (getdecls): Add kludge to help dbxout_init. Tue Sep 21 14:19:11 1993 Bill Cox (bill@cygnus.com) Partial tasking update - not done yet. * ch-actions.c: Comments, indentation. * ch-decl.c (push_chill_extern_process): No longer need to reformat the arg list for make_process_struct. (pop_module): Don't seg fault on null DECL_NAME. (handle_one_level): Error, not warning if tree not recognized. (shadow_record_fields): Rename formal param for readability. * ch-grant.c (decode_decl): Write proper header for a process. * ch-parse.y (quasi_pdef): process now uses processparlist, which doesn't change with the passes. (quasi_locdec): Call build_chill_reference_type to defer doing the type's layout. (processpar): Use paramnamelist, but reformat it into a list of identifiers in pass 2, so a processpar is the same structure in both passes. (locdec): Call build_chill_reference_type to defer doing the type's layout. * ch-tasking.c (generate_tasking_code_variable): Call do_decl to build the decl. Only update the variable's tree in pass 2. (make_process_struct): Call build_chill_reference_type to defer doing the type's layout. (build_process_header): New code to call make_process_struct. New pass-2 code to make a PARM_DECL for start_chill_function. Pass a void_type_node, not a NULL_TREE for an empty list. Get input for shadow_record_fields from current_function_decl. (build_buffer_decl): Call do_decl not decl_temp1. * ch-typeck.c: Reindent to standards. * gcc.c (SPECS): Add recognition for the '.chi' CHILL suffix. Mon Sep 20 12:00:24 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-typeck.c (classify_chill_expr): An expression with a REFERENCE_TYPE still has VALUE class, even if an ADDR_EXPR. * ch-actions.c (adjust_parm_or_field):, ch-tree.h: Change last parameter, so we can reliably recognize LOC parameters. * ch-tasking.c, ch-expr.c: Change callers appropriately. Sun Sep 19 22:26:25 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-tree.h (CH_READ_COMPATIBLE, CH_REFERABLE): New macros. * ch-typeck.c (chill_referable, chill_read_compatible): New functions. * ch-typeck.c (chill_compatible): Allow un-resolved CONSTRUCTOR (with NULL TREE_TYPE), when reasonable. (Simplifies callers.) Also, handle case of expr being of reference class. * ch-actions.c (adjust_parm_or_field): Major re-arrange to handle conversions and LOC args better. * ch-actions.c (chill_expand_assignment): Simplify conversions. * ch-expr.c (build_chill_function_call): If needed, call chill_start_module_code. * ch-decl.c (declare_predefined_file): New function, used to pre-define stdin, stdout, and stderr. * ch-inout.c (chill_stdio_p): Change names of predefined files from chill-stdin etc to plain stdin (and change their types). * ch-lex.l: Remove some obsolete stuff. * ch-convert.c (convert): Move conversion from reference to to beginning of convert() so other conversion can work better. Also, remove bogus direct setting of TREE_TYPE. Fri Sep 10 12:23:41 1993 Wilfried Moser (fs_moser@cygnus.com) * Makefile.in: Change installation of the chill script. gcc will be called always with the full path. That made problems when somebody was using chill but didn't have the installation directory in PATH. * ch-parse.y: Change parsing of WRITETEXT action. * ch-tree.h: Add some new prototypes according to the (partial) implementation of WRITETEXT. * ch-typeck.c: Add new function chill_varying_string_type_p. This functions checks a type for being CHAR(n) VARYING. * ch-decl.c (init_decl_processing): Add new built-in functions _writestring and _writeunixstd. Add call to build_chill_io_list_type in ch-inout.c. * ch-inout.c (build_chill_writetext): Add some code there. Add new function build_chill_io_list_type. Add new static function chill_stdio_p. This function checks the text argument for being chill_stdin, chill_stdout or chill_stderr. Fri Sep 17 22:02:04 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-decl.c (push_modedef): Fix TYPE_MAIN_VARIANT thinko. Thu Sep 16 18:38:53 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-decl.c (allocate_lang_decl): Do nothing. * ch-tree.h (struct lang_decl, DECL_GRANT_FILE, DECL_SEIZE_FILE): No longer used; remove. * ch-tree.h (TYPE_TAG_FIELD renamed to TYPE_TAGFIELDS), ch-grant.c (print_struct), ch-parse.y (opttagfield -> opttagfields), ch-decl.c (make_chill_variants, layout_chill_variants): Add (initial) part of support for multiple tags. * ch-decl.c (lookup_tag_fields): New function. * ch-parse.y (stmt_count): Not used; removed. * ch-parse.y (mode2): Clear current_fieldlist before parsing STRUCT fields; restore afterwards. * ch-parse.y (push_action): Moved to ch-actions.c. Wed Sep 15 18:19:37 1993 Bill Cox (bill@rtl.cygnus.com) * ch-convert.c (convert_to_boolean): Convert a SET_TYPE constructor to a boolean. Wed Sep 15 17:52:10 1993 Bill Cox (bill@rtl.cygnus.com) * ch-decl.c (push_modedef): Enable novelty-setting code. * ch-tree.h (CH_SINGLETON_DOMAIN): New macro. * ch-typeck.c (chill_similar): Add checking of singleton powerset against its base type. Tue Sep 14 17:11:52 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (adjust_parm_or_field): Create a temporary for an non-referencable actual parameter passed to a LOC formal parameter. (chill_expand_assignment): Correct compatibility checking. * ch-decl.c (push_modedef): Set up a type's NOVELTY value. * ch-parse.y (opsigdest): Only check for process name in pass 2, when we know. * ch-tree.h (CH_NOVELTY_FLAG, CH_NOVELTY): Define. * ch-typeck.c: Fix comment. Mon Sep 13 17:33:11 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-grant.c (lookup_decl_in_process, register_decl_as_output, decl_seen_p, processed_decls, allocated, nr_decls): Removed no-longer-useful functions and variables that used to guard against writing a decl multiple times. Since we now just go through the decl list linearly, that is no longer an issue. * ch-satisfy.c (safe_satisfy_decl): Handle missing current_module. * ch-decl.c (start_chill_function): Clear DECL_ASSEMBLER_NAME. Don't make TREE_PUBLIC. Don't generate rtl yet. * ch-decl.c (pop_module): If a decl is granted, set TREE_PUBLIC, and its DECL_ASSEMBLER_NAME. * ch-decl.c (fix_identifier): New function. * ch-grant.c (grant_one_decl): Don't set TREE_PUBLIC. * ch-tree.h (struct module): New field prefix_name. * ch-satisfy.c (safe_satisfy_decl): If assembler_name isn't set, prefix it by the module name(s). * ch-satisfy.c (safe_satisfy_decl, case FUNCTION_DECL): Call make_function_rtl if needed and !LOOKUP_ONLY. * ch-typeck.c (chill_similar): Flesh out substantially. * ch-typeck.c (chill_compatible): Re-structure. * ch-actions.c (adjust_parm_or_field): Use CH_COMPATIBLE instead of chill_comptypes to compare actual and formal. Sun Sep 12 21:10:10 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-parse.y (labellist): Don't do anything if ignore_exprs. * c-typeck.c (output_pending_init_elements): Handle !constructor_incremental case of filling in empty positions. (Patch by Jim Wilson. CYGNUS LOCAL until we have approval.) * ch-decl.c (pop_module): Don't grant a seized name. * ch-grant.c (decode_constant): Support CALL_EXPR. * ch-tree.c (build_bitstring_type): Don't try to fold non-constant size if pass==1 (since it may be an unsatisfied name). Sun Sep 12 18:06:23 1993 Bill Cox (bill@rtl.cygnus.com) 2-pass fixes for processes. Partially done. * ch-actions.c (chill_expand_assignment): Add real novelty-checking sketch, $ifdef'd out for now. * ch-decl.c: Generally fix indentation. Move tasking init code from init_decl_processing to ch-tasking.c. Delete ObjC-related cruft. More accurate parameter name for shadow_record_fields. Move debug_scope before its first call. * ch-expr.c (build_chill_function_call): Return if not pass 2. * ch-grant.c (print_proc_tail): Avoid trying to format a VOID return type, or using a NULL pointer. (decode_decl): Minor changes for PROCESS arg access. * ch-lang.c (lang_decode_option): Use -itu flag to enable 'pedantic' mode. * ch-lex.l (init_lex): Initialize compiler-directive variable trees. (name_type-signal): Disable the returning of SIGNAL and BUFFER name tokens. * ch-parse.y (rccase_label_flag): Renamed from rccase_ifs. All uses renamed also. (end_function): Always poplevel, not just in pass 2. (quasi_pdef): Check for end-label matching. (quasi_formparlist): Write more clearly. (rcaltlist, optelsercvcase, optstartset): Add ignore_actions guards. (rccase_label, sendaction): Use NAME, not SIGNALNAME or BUFFERNAME. (process): Handle like procedure. (mode): Add SIGNAL as a generic signal parameter. This is a client-specific extension, so pedantic is checked. * ch-tasking.c: Pervasive rewrites for 2-pass. Still not done. * ch-tree.h (CH_NOVELTY): Make it an lvalue. * ch-typeck.c: Fix comment. Sun Sep 12 15:03:21 1993 Per Bothner (bothner@kalessin.cygnus.com) * c-typeck.c (digest_init): Compare types using comptypes instead of comparing pointers. (Helps Chill front end.) * ch-expr.c (finish_chill_binary_op): * ch-typeck.c (build_chill_array_ref, build_chill_bitref), ch-expr.c (finish_chill_binary_op): For now, prefer IN_EXPR over BIT_FIELD_REF because of various problems with BIT_FIELD_REF (incomplete support for variable fields, and possible bug in optimize_bit_field_compare). * ch-expr.c (finish_chill_binary_op): Fix type-checking and appropriately coerce operands for IN_EXPR and comparsions. * expr.c (expand_expr, case ARRAY_REF): Coerce lower bound (if non-zero) to sizetype before subtraction. * expr.c (expand_expr): Remove Chills-specific calls to __inpowerset from case BIT_FIELD_REF to case IN_EXPR. Fri Sep 10 15:47:52 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-tree.def (UNDEFINED_EXPR): New kind of expression. * ch-grant.c (decode_constant), ch-expr.c (chill_expand_expr), ch-convert.c (convert): Handle UNDEFINED_EXPR. * ch-expr.c (build_char_array_expr): Move CONCAT_EXPR support to ... * ch-expr.c (build_concat_expr): ... here. Now also folds concatenation of STRING_CST and UNDEFINED_EXPR. Also, make result varying only if one of the operands are. * ch-expr.c (build_chill_binary_op): Move stuff from here to ... * ch-expr.c (finish_chill_binary_op): ... here, as needed for proper 2-pass split. Also, clean up and simplify heavily. * ch-tree.h (enum ch_expr_class): The 5 kinds of expression classes. * ch-typeck.c (classify_chill_expr): New function: Determine class of expression. * ch-typeck.c (chill_compatible_classes): Re-structure; fix asymmetry bugs. * ch-tree.h (CH_CLASS_IS_XXX): Re-define to use classify_chill_expr. * ch-convert.c (maybe_turn_scalar_into_array): Complain unless scalar is a char constant (and we want a string). * ch-convert.c (convert): New code for converting to variable string/array. Avoid type errors by padding (with an UNDFIEND_EXPR). * ch-typeck.c (chill_expand_tuple): Don't do conversion to varying type here; that is handled by convert now. * ch-decl.c (digest_constructor): Moved to ... * ch-convert.c (digest_constructor): ... here. * ch-decl.c (do_decl): Simplify; just use convert for initializer. * ch-decl.c (chill_digest_init): Merged into convert, and removed. * ch-decl.c (init_decl_processing): Set constructor_no_implicit flag. * ch-except.c (finish_handler-array), ch-decl.c (finish_decl): Replace chill_digest_init by convert. * ch-actions.c (chill_expand_array_assignment): Simplify; use convert. * ch-lex.l (build_chill_string): Make string type be derived from integer, not sizetype, because upper bound can be -1. Thu Sep 9 18:21:46 1993 Bill Cox (bill@rtl.cygnus.com) * ch-typeck.c (my_build_array_ref): Delete pedantic C-specific error message. Thu Sep 9 17:44:20 1993 Jeffrey Wheat (cassidy@eclipse.cygnus.com) * gcc.c: pass {I*} spec to cc1chill. Fixes -Ifoo not working problem. Thu Sep 9 12:22:22 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-typeck.c (build_chill_array_ref): Remove redundant and broken call to my_build_array_ref. Wed Sep 8 13:03:49 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-except.c (finish_handler_array), ch-decl.c (finish_decl): Don't use store_init_value, since it calls digest_init instead of chill_digest_init. * ch-except.c (finish_handler_array): Use build1 (ADDR_EXPR, ...) instead build_unary_op to avoid C-specific optimizations. * ch-typeck.c (my_build_array_ref): Don't use default_conversion to convert array to pointer. * c-typeck.c (process_init_default): New function, to support default values for array tuples in Chill. * c-typeck.c (default_conversion): Don't convert array to pointer if compiling Chill. * ch-decl.c (digest_constructor): New function; used to be guts of chill_digest_init. Now recursive, to handle nested tuples. * ch-decl.c (chill_digest_init): Handle struct labels. * ch-grant.c (get_tag_value): Use decode_constant in general case. * ch-grant.c (decode_constant): Add support for lots of missing binary and unary operators. Wed Sep 8 10:11:04 1993 Bill Cox (bill@rtl.cygnus.com) * ch-lang.c: Look for '-I' option for seize file path. * ch-lex.l: Fix comment about above option. Wed Sep 8 00:37:32 1993 Per Bothner (bothner@rtl.cygnus.com) * ch-satisfy.c: Move code to set (and restore) file-and-line from satisfy_decl to safe_satisfy_decl, for the sake of satisfying alias decls that refer to real decls with errors. * ch-actions.c (lang_init): Move to ch-lang.c. * ch-decl.c (init_decl_processing): Move code to initialize file-and-line from here ... * ch-lang.c (lang_init): ... to here, to avoid clobbering. * ch-decl.c (chill_digest_init): Add support for SET_TYPE, and index values. * ch-typeck.c (chill_expand_typle): Just call chill_digest_init. * c-typeck.c: Fix various things that got broken in the latest merge. Tue Sep 7 15:45:58 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-decl.c (build_enumerator): Handle a "unnamed set element" (obsolete feature) by generating a dummy name. * ch-decl.c (finish_decl): Call rest_of_decl_compilation with "correct" value of top-level (to get better debugging output). * ch-decl.c (bind_saved_names): Allow a null DECL_NAME. Tue Sep 7 15:48:35 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (chill_expand_return): Correct breakage due to recent fsf merge. Tue Sep 7 11:16:10 1993 Bill Cox (bill@rtl.cygnus.com) * .cvsignore: Add multilib.h. * ch-decl.c (chill_digest_init): New function. Calls were changed, since it has fewer parameters than old digest_init. * ch-parse.y (untyped_expr, primval, tupleelement): Calls to new init stuff. (elementlist): Delete unused code. * ch-satisfy.c (safe_satisfy_decl): Just return if decl == NULL. * ch-tasking.c (build_tasking_enum): Attempt to adapt to 2-pass. * ch-tree.h: Delete digest_init prototype. * ch-typeck.c (digest_init): Much new code. Tue Sep 7 12:06:28 1993 Bill Cox (bill@rtl.cygnus.com) * ch-decl.c, ch-parse.y, ch-tree.h, ch-typeck.c: Revert files to their pre-init-change state. Mon Sep 6 15:28:27 1993 Bill Cox (bill@rtl.cygnus.com) Preliminary adaptation to rms' new initializer code. * ch-decl.c (do_decl): Call chill_digest_init, not digest_init, which rms made static. * ch-expr.c (chill_truthvalue_conversion): Delete C- specific code. * ch-loop.c (init_loop_counter): Indent for readability. * ch-parse.y (untyped_expr, primval, tupleelement): Call new init code. * ch-tree.h: Prototype changes for new init code. * ch-typeck.c (chill_expand_tuple): Call new init code. * chill.texi: Add necessary '-f' prefix on options. Wed Sep 1 13:21:53 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-convert.c (build_array_type_for_scalar), ch-tasking.c (build_chill_receive_case_end): Index type specification is now chain of types (not chain of TREE_LIST). * ch-satisfy.c (satisfy): Don't try to satisfy the abstract_origin of an ALIAS_DECL if DECL_POSTFIX_ALL. * ch-expr.c (build_chill_binary_op): If pass 1, do NOT call finish_chill_binary_op. * ch-parse.y (arrayindex): Simplify. Tue Aug 31 14:57:35 1993 Bill Cox (bill@rtl.cygnus.com) * ch-decl.c (print_lang_decl): Print weak-name status. (print_lang_identifier): Print signal_data as T or F. * ch-lex.l (convert_bitstring, convert_charliteral, convert_float, convert_number): Pass string directly to convert as a parameter. Return token code consistently, return 0 for error. (equal_number): Parse differently, allowing hex, binary and octal constants. * ch-parse.y (dowithaction, structured_variable): Only push/pop scopes once per DO WITH. (structured_variable_list): Check ignore_actions flag here. * gcc.c: Delete 'traditional' from string, add 'itu' as the standard flag's name. Mon Aug 30 15:12:26 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-typeck.c, ch-tree.h (build_chill_range_type): Take 3 parameters instead of 2 (explicit low and high bounds). * ch-parse.y (arrayindex): Build range type from low:high. (rangesize, optrangesize): Removed. (where appropriate): Use new build_chill_range_type interface. * ch-grant.c: Clean up writing of range and array types. * ch-satisfy.c (satisfy): Don't ignore the return value of layout_chill_array_type. (It may be an error mark.) * ch-typeck.c (build_chill_array_type): Simplify. * ch-typeck.c (layout_chill_array_type): Clean up checks. Fri Aug 27 12:55:59 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-decl.c (decl_temp1): Set DECL_ASSEMBLER_NAME. (push_chill_extern_function) Don't set current_function_decl. * ch-parse.y (tupleelement): Don't wrap index is a TREE_LIST (i.e. a range), don't wrap a PAREN_EXPR around it. * ch-grant.c (decode_constant): For tuple CONSTRUCTORs, add support for ranges in purpose. Wed Aug 25 16:58:13 1993 Bill Cox (bill@rtl.cygnus.com) * .cvsignore: Add g++.sum * ch-actions.c (chill_expand_result): Stop building a temp. Assign the expression directly into function's DECL_RESULT. * ch-decl.c: Add formfeeds. (start_chill_function): Don't need to zero DECL_RESULT's pointer any more. (push_chill_function_context): Delete C pedwarn message. * ch-expr.c: Move builtin functions together. * ch-parse.y (end_function): Delete unused code. Reformat %union for readability. Delete _MAX and _MIN tokens. Wed Aug 25 13:24:06 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (get_result_tmp_name): Delete unused function. (chill_expand_result, chill_expand_return): Rewrite for 2-pass. * ch-decl.c (start_chill_function): NULL out the RESULT_DECL's chain field, so we can make a temp, evaluate a RESULT action's expression into it, and hang it on here. * ch-parse.y (end_function): Look for RESULT temps to emit. (assertaction): Indentation. Wed Aug 25 08:34:36 1993 Bill Cox (bill@rtl.cygnus.com) * ch-lex.l, ch-parse.y: Delete CONTINUE_EVENT token. It wasn't used anyway. Tue Aug 24 17:51:18 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (chill_expand_result, chill_expand_return): No need to make a temp for the value, just use DECL_RESULT. Tue Aug 24 16:38:24 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-tree.c (layout_powerset_type): Remove redundant code. Generalize (in error message) to also handle bitstrings. * ch-tree.c (build_bitstring_type): Remove all layout-like stuff, and defer that to layout_powerset_type. * ch-expr.c (chill_expand_expr): For various SET_xxx_EXPRs, allocate stack temp for target using correct mode. Tue Aug 24 10:27:19 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c, ch-decl.c, ch-except.c, ch-grant.c, ch-lang.c, ch-loop.c, ch-tree.h, ch-typeck.c: Change build_modify_expr calls to build_CHILL_modify_expr calls. * ch-expr.c (build_chill_modify_expr): Adapted from build_modify_expr in c-typeck.c. Mon Aug 23 16:48:39 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c, ch-convert.c, ch-decl.c, ch-expr.c, ch-grant.c, ch-lang.c, ch-lex.l, ch-loop.c, ch-satisfy.c, ch-tasking.c, ch-tree.c, ch-typeck.c: Major re-allocation of functions to files. Mon Aug 23 12:15:11 1993 Bill Cox (bill@rtl.cygnus.com) Thanks for the tip, Jim. * Makefile.in: Add dependency lines for ch-except.o and ch-satisfy.o. Correct dependency lines for ch-convert.o, ch-expr.o, ch-inout.o, and ch-loop.o. (chill, install-common): Add clean-up commands. Sat Aug 21 17:11:26 1993 Bill Cox (bill@rtl.cygnus.com) * ch-decl.c (get_type_precision): New function. (layout_enum): Call it. * ch-tree.c (layout_powerset_type, build_bitstring_type): Call it. Sat Aug 21 13:59:40 1993 Bill Cox (bill@rtl.cygnus.com) * ch-decl.c (init_decl_processing): Define setbitpowerset runtime function. * ch-expr.c (chill_expand_assignment): Call setbitpowerset to set a bit. * ch-parse.y: Indentation. Fri Aug 20 17:29:56 1993 Bill Cox (bill@rtl.cygnus.com) * ch-parse.y: Delete unused %type declaration. * ch-tasking.c (build_signal_struct): Delete return, since function returns void. * ch-typeck.c: Indent to standard. * stor-layout.c: Fix comment. * toplev.c: Change -L option ti -I. * varasm.c (emit_set_data): Align set constant to word boundary. Fri Aug 20 08:20:07 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c: Fix indentation, comments. * ch-decl.c (push_chill_extern_signal): Use same interface as build_signal_struct. * ch-parse.y (quasi_signaldef): Move build_signal_decl here to sigdef. Add quasi_signal to distinguish contexts where sigdef gets used. * ch-tasking.c: Replace make_signal_struct and build_signal_decl with build_signal_decl, which doesn't loop through a TREE_LIST. * ch-tree.h: Fix protos. Wed Aug 18 17:36:53 1993 Bill Cox (bill@cygnus.com) * ch-actions.c: Fix comments. * ch-decl.c (push_modedefs): Return the new decl. (shadow_record_fields): Move pushlevel (0) calls into the grammar, so they'll get done in both passes. * ch-parse.y (dowithaction): Always compute & save # of 'with' variables seen (both passes), and always pop that number of levels. (structured_variable_list): Always chain variables into a list. (structured_variable): Put pushlevel here (from shadow_record_fields). * ch-tasking.c: Indentation fixes. * ch-tree.h: Change proto. * chill.texi: Add Blue Book section numbers to unimplemented features list. Wed Aug 18 15:48:43 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-actions.c (build_generalized_call): New function. Classifies semantically (if pass 2) this that look like calls. * ch-parse.y (call): Invoke build_generalized_call. * ch-parse.y (sigdef): Use defining_occurrence instead of NAME. * ch-parse.y (opt_untyped_exprlist): New non-terminal. * ch-satisfy.c (satisfy): Handle CALL_EXPR. Tue Aug 17 16:36:15 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-decl.c (find_implied_types): Handle INTEGER_TYPEs (ranges). Mon Aug 16 18:07:36 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-tree.h (TUPLE_NAMED_FIELD): New macro. * ch-parse.y (labelled structure tupleelement): Set TUPLE_NAMED_FIELD flag. * ch-grant.c (decode_constant): Check for TUPLE_NAMED_FLAG. * ch-satisfy.c (satisfy): Check for TUPLE_NAMED_FLAG. Do satisfy the elements of a CONSTRUCTOR even if call chill_expand_tuple isn't correct. * ch-satisfy.c (satisfy): Satisfy TYPE_TAG_VALUES of a RECORD_TYPE. * ch-parse.y (label_spec): Defer any semantic checking until ... * ch-decl.c (layout_chill_variants): ... here. Also make sure to call layout_type on the union type. * ch-decl.c (bind_saved_names): For weak names, allocate an ALIAS_DECL, rather than a CONST_DECL. Add support for implied (weakly visible) names. * ch-tree.h (DECL_WEAK_NAME): New macro. * ch-satisfy.c (satisfy of IDENTIFIER_NODE): Don't complain if lookup_name fails if LOOKUP_ONLY - name might be weakly visible. * ch-decl.c (proclaim_name): Handle DECL_WEAK_NAME appropriately. * ch-decl.c (concat_lists, find_implied_types): New functions. * ch-decl.c (bind_saved_names): Search for implied names. * ch-tree.h (C_DECL_VARIABLE_SIZE): Removed. * ch-lang.c (layout_chill_struct_type): Don't use C_DECL_VARIABLE_SIZE. Mon Aug 16 16:10:43 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c: Delete extra space in error message. * ch-parse.y: Fix comment. * expr.c (store_constructor): Avoid passing NULL to convert, and getting back an error_mark_node and trying to process *that* node. Mon Aug 16 14:41:29 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-decl.c: Add more overview comments. * ch-decl.c (proclaim_decl): New function. * ch-decl.c (temp_pushdecl, struct shadowing): Removed. * ch-decl.c (bind_saved_names): Remove blevel parameter; use current_scope global instead. Do some other cleanups. * ch-decl.c (save_expr_under_name): Create an ALIAS_DECL. * ch-decl.c (pushdecllist, save_expr_under_name): Use proclaim_decl. * ch-satisfy.c (satisfy, safe_satisfy_decl): Be more careful to not do inappropriate things (e.g. type layout) if LOOKUP_ONLY. * chill.texi: Start collecting Chill documentation here. * ch-parse.y (mode): Ignore READ specifier, for now. Mon Aug 16 11:13:07 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (chill_comptypes): Correct handling reference of type 1. (build_chill_length, build_chill_num, build_chill_sizeof): Convert result to CHILL integer. (build_chill_function_call): Clean up INOUT and OUT parameter handling. * ch-decl.c (build_chill_function_type): Handle INOUT and OUT parameters. * ch-loop.c: Fix up comments. * ch-parse.y: Fix up comments. Sun Aug 15 15:06:01 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (build_chill_lower, build_chill_upper): Re-write, mostly to delete bogus ENUMERAL_TYPE handling. * ch-decl.c (save_expr_under_name): New function to save addressing expressions for DO WITH and DO FOR handling. (handle_one_level): Call new function. * ch-loop.c (init_loop_counter): Call it here, too. Check lp->user_var before passing it to lookup_name. (high_domain_value, low_domain_value): Correct call to build_chill_upper and build_chill_lower. (begin_chill_loop, end_chill_loop): Move pushlevel, poplevel up into the grammar, so they're done in both passes. * ch-parse.y (doaction): Unconditionally make a scope for a loop, pop it later. (controlpart, iteration): Save return from build_chill_iterator. * expr.c: Readability changes. Sat Aug 14 19:42:32 1993 Bill Cox (bill@rtl.cygnus.com) * ch-expr.c (chill_expand_case_expr): Complete rewrite for 2-pass. About 1/2 the size, too. * ch-parse.y (actionlabel): Unconditionally do INIT_ACTION. This assures that a label preceding a module's first action is enclosed in the module-level function that's generated. Sat Aug 14 14:56:07 1993 Per Bothner (bothner@kalessin.cygnus.com) Re-implement how EXIT is done. 'LABEL: BEGIN ... EXIT LABEL; ... END' is converted to 'LABEL: BEGIN ... GOTO EXIT!LABEL; ... EXIT!LABEL: ; END'. Hence we no longer need any support for EXIT in stmt.c. * stmt.c (stamp_nesting_label, expand_exit_labelled): Removed. * ch-actions.c (lookup_and_handle_exit): Handle like 'GOTO EXIT!name'. * ch-tree.c, ch-tree.h (munge_exit_label): New function. * ch-parse.y: Re-write bracked actions to support EXIT new way. * ch-decl.c, ch-loop.c: Remove calls to stamp_nesting_level. * ch-parse.y: Replace SC by new token semi_colon, which resets the 'label' global. Also make sure that label gets reset whenever we might start a new action statement. * ch-parse.y (possibly_define_exit_label): New function. * ch-except.c (chill_start_on): Wrap an ADDR_EXPR round the jmpbuf. * ch-grant.c (chill_finish_compile): Make sure get_file_function_name is only called once. * ch-expr.c (chill_expand_array_assignment): Use store_expr, instead of incorrectly calling emit_block_move. * ch-parse.y (procedure): Call push_chill_function_context in *both* passes (if nested). * ch-parse.y (primval): Call get_type_of before chill_expand_type. * ch-parse.y (tupleelement): Only build PAREN_EXPR during pass 1. Fri Aug 13 16:36:36 1993 Per Bothner (bothner@kalessin.cygnus.com) Re-implement GRANT and SEIZE, to support prefixes and prefix rename. All of the Blue Book semantics for these should now work (except FORBID). * ch-tree.def, ch-tree.h (DECL_OLD_PREFIX, DECL_NEW_PREFIX, DECL_POSTFIX, DECL_POSTFIX_ALL): New ALIAS_DECL layout and macros. * ch-tree.c (get_identifier3, build_alias_decl, decl_old_name, decl_check_rename): New functions. * ch-lex.h, ch-lex.l, ch-grant, ... (grant_all_seen): Removed. * ch-satisfy.c (satisfy_decl): Handle SYN initialized with tuple. * ch-satisfy.c (satisfy_decl): Set DECL_ASSEMBLER_NAME here ... * ch-decl.c (pushdecllist): ... instead of here, which is too late. * ch-grant.c (decode_prefix_rename): New function. Use to print out GRANT and SEIZE statements. * ch-decl.c (ALL_POSTFIX): New global variable. * ch-decl.c (bind_saved_names, pop_module): Change to use new ALIAS_DECL layout, and support general prefix rename and ALL. * ch-decl.c (various places): Don't barf if DECL_ANME is NULL. * ch-parse.y (build_prefix_clause): New function (handle PREFIXED). * ch-parse.y (optprogendname, optname): Rename to opt_end_label. * ch-parse.y: Add support for compound name strings, but defer using all over teh place, due to parser ambiguities. Howver, do use defining_occurrence where appropriate. * ch-parse.y: Re-write syntax and semantics of GRANT and SEIZE statements to support Blue Book functionality. Neato! Fri Aug 13 17:10:52 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c: Redo decl_temp1 calls to save resulting decl. * ch-decl.c (decl_temp1): Rewrite to return generated decl. (decl_temp): Deleted. * ch-loop.c: Redo decl_temp1 calls to save resulting decl. * ch-satisfy.c (safe_satisfy_decl): Reorder switch for readability, add comment. * ch-tasking.c: Redo decl_temp1 calls to save resulting decl. * ch-tree.h: Delete decl_temp proto, change decl_temp1. Fri Aug 13 13:39:59 1993 Bill Cox (bill@rtl.cygnus.com) * ch-decl.c (decl_temp): Break the chain of decls. This prevents an infinite loop. * ch-lang.c (make_chill_pointer_type): Fix compiler warning. * ch-lex.l (equal_number): Check passes in looking up a symbolic value. * ch-parse.y: Fix comments. * ch-tasking.c (tasking_setup): Only act in pass 2. (make_signal_struct, build_signal_decl, build_chill_receive_case_label): Don't go indirect thru NULL decl pointer. Thu Aug 12 11:02:34 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (route_to_predefined_function): New function called from build_chill_function_call, to call the proper predefined routine. (build_chill_card, build_chill_length, build_chill_lower, build_chill_max, build_chill_min, build_chill_num, build_chill_pred, build_chill_sizeof, build_chill_succ, build_chill_upper): Rewritten to run only in pass 2. * ch-decl.c (init_decl_processing): Build predefined functions for card, length, lower, max, min, num, pred, sizeof, succ and upper. Delete unused builtin_function calls. * ch-grant.c (chill_finish_module_code): Save current_function_decl before calling finish_chill_function, and use that to build the initializer structure. * ch-lex.l: Remove following tokens, since they're now just predefined, not reserved: card, length, lower, max, min, num, pred, sizeof, succ and upper. * ch-loop.c: Readability, indentation changes. * ch-parse.y: Delete tokens for card, length, lower, max, min, num, pred, sizeof, succ and upper. Delete special rules for calls to these. Delete mode_location and upper_lower_arg non-terminals. (pmodearg): Eliminate convolutions. (call): Add rule for typename parameter. * ch-tasking.c: Readability changes. * ch-tree.h: Add prototypes. Thu Aug 12 00:38:17 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-decl.c (save_decl): Set DECL_CONTEXT (decl). * ch-grant.c (chill_finish_module_code): Call finish_chill_function with nested==0. * ch-tree.h, ch-decl.c, ch-tasking, ch-parse.y: Rename {push,pop}_c_function_context to {push,pop}_chill_function_context. * ch-parse.y (end_function): If nested, call pop_chill_function_context regardless of which pass we're in. Wed Aug 11 02:34:02 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-actions.c (finish_chill_binary_op): Handle error marks. * ch-decl.c (do_decl): Laying out decl and generating rtl is too late to do here (if there are forward references), so ... * ch-satisfy.c (satify_decl): ... do it here instead. * ch-decl.c (finish_enum): Fixup types of enum decls now. * ch-satisfy.c (safe_satisfy_decl): New routine. Supports checking illegal cyclic definitions. All *satisfy* routines now take a 'chain' parameter (instead of 'lookup_only') used for checking cycles. * ch-satisfy.c (satisfy_decl): Return DECL_INITIAL if appropriate. * ch-satisfy.c (satisfy): Lots of little fixes. * ch-lex.l (init_lex): Make all the standard ridpointers be lowercase, so that lookup_name on lower-cased user input will find the standard types. * ch-lex.l: Remove all the standard types, in effect converting them from reservered anmes to predefined names. * ch-lex.l, ch-parse.y: Remove PREDEF_MODEDECL - no longer used. * ch-grant.c (gfile): Rename to grant_file_name. * ch-lex.l (yywrap): Don't try to seize current grant_file_name. * initname.c: Removed. get_file_function_name is now in tree.c * Makefile.in (CHILL_OBJS): Remove initname.o * ch-decl.c (do_decl): New function, based on loop body of do_decls, * ch-decl.c (do_decls): Just call do_decl. * ch-grant.c (chill_finish_module_code): Minor cleasnups. Use new do_decl routine. Clear init_entry_decl's source line. * ch-grant.c (print_proc_tail): Fix for new param list structure. * ch-parse.y (whatpdef): Removed. Cleaned up procedure and process, allowing proper end-label-checking. * ch-typeck.c (build_chill_cast): Remove decl->type conversion. Wed Aug 11 00:33:44 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-decl.c (layout_enum): Don't call rest_of_type_compilation. * ch-lex.l (RETURN_PREDEF): Don't call lookup_name. * ch-expr.c (build_chill_indirect_ref): Call get_type_of. * ch-parse.y (call): Call get_type_of before build_chill_cast. Tue Aug 10 21:33:10 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-actions.c (build_char_array_expr): If a concat operand is a constant char, convert it to a STRING_CST. * ch-decl.c (finish_decl): Call rest_of_decl_compilation with toplev=0. * ch-typeck.c (build_chill_cast): Allow type to be TYPE_DECL. * ch-parse.y (actionlabel): Call define_label in both passes. * ch-actions.c (lookup_and_expand_goto, lookup_and_handle_exit): New functions, using lookup_name to find LABEL_DECLs. * ch-parse.y (GOTO, EXIT): Use above new functions. * ch-tasking.c (struct rc_state_type *current_rc_state): Use to store state for the current receive case statement. (build_chill_receive_case_start, build_chill_receive_case_end): Don't generate temporary LABEL_DECL; just use gen_label_rtx. * ch-decl.c: Remove all stuff dealing with specific label scopes, including functions push_label_level, pop_label_level. * ch-decl.c (define_label): Re-write for 2-pass. * ch_tree.h (lang_identifier): Removed label_value. * ch-tree.h (IDENTIFIER_LABEL_VALUE): Removed. * ch-parse.y (modename): Changed to yield identifier, not type. This allows following changes, which work better for 2-pass: (location): primval ARROW optmodename -> primval ARROW optname. (primval): Tuple can now be prefixed by unsatisfied name. * ch-actions.c (chill_grant_only): Renamed to grant_only_flag. * ch-lex.l (yywrap): Don't read seizefiles if grant_only_flag. * ch-decl.c (switch_to_pass_2): Exit if grant_only_flag, * ch-satisfy.c (satisfy): Support CONSTRUCTOR, REFERENCE_TYPE. * ch-satisfy.c (satisfy_decl, satisfy): Kludge around to a TYPE_DECL can be simplified to its type. * ch-expr.c (build_chill_indirect_ref): New function. * ch-lex.l (prepare_paren_colon): Make kludge even uglier, since the left paran might already have been seen. * ch-lang.c (make_chill_pointer_type): Allow parameter to select pointer or reference type. (build_chill_reference_type): New function. Either function: Be more careful (in case arg is identifier). * ch-except.c (initialize_exceptions): Make exception_stack_decl be public. * ch-actions.c (build_char_array_expr): Can only constant fold if operands are STRING_CST. * ch-grant.c (raw_decode_mode): Allow TYPE_DECL. (chill_finish_compile: Set TREE_PUBLIC of init function to 1. Tue Aug 10 17:55:12 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (build_char_array_expr): Set array sizes correctly. * ch-decl.c: Fix comment. * ch-parse.y (pmodearg): Build tree_list in all cases. * varasm.c (assemble_tasssking_entry): Delete unused code. Tue Aug 10 13:58:21 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (build_char_array_expr): save/restore a tree's constant status. (build_chill_binary_op): Don't convert an expression if the type we're converting to is NULL. * ch-convert.c (maybe_turn_scalar_into_array): New functions. Call it from convert, and from .. * ch-expr.c (chill_expand_assignment): call new function. Move convert code earlier, too. * ch-decl.c (lookup_name): Delete bogus error message. * ch-tree.h (CH_NOVELTY, SCALAR_P): Handle NULL_TREE. Add protos. * ch-typeck.c (valid_array_index): Comment out some strange code which now seg faults. (chill_expand_tuple): Re-enable prepending of VARYING length to a tuple. (chill_similar): Return FALSE if either mode is NULL_TREE. Tue Aug 10 07:29:31 1993 Bill Cox (bill@rtl.cygnus.com) * ch-decl.c: Delete proto for unused function shadow_tag_warned. Add commented-out calls to pushtag, in case we decide later to fill in TYPE_STUB_DECL for dbxout. * ch-lang.c (build_chill_struct_type): Add commented-out calls to pushtag, in case we decide later to fill in TYPE_STUB_DECL for dbxout. Mon Aug 9 23:09:08 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-decl.c (chill_seize): Don't get_next_next in pass 2. * ch-decl.c (get_next_decl): Skip ALIAS_DECLs. * ch-decl.c (bind_saved_names): Handle SEIZE ALL. * ch-lang.c (layout_chill_struct_type): Don't call rest_of_type_compilation - it crashes without a TYPE_STUB_DECL. * initname.c (get_file_function_name): Get new file and function for language-independent constructor name generation. * ch-grant.c (get_init_function_id): Removed. * ch-grant.c (chill_finish_compile): Call get_file_function_name instead of get_init_function_id. Mon Aug 9 18:33:36 1993 Bill Cox (bill@rtl.cygnus.com) * ch-decl.c: Formfeeds and comments. * ch-parse.y (quasi_formpar): Treat just like real formpar. Eliminate restriction on single name. (pmodearg, pmodearglist): Remove ignore_exprs stuff. Mon Aug 9 17:21:14 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-lex.h (enum rid), ch-lex.l (init_lex): Added RID_ALL. * ch-lang.c (build_chill_pointer_type): Layout the pointer type, if the pointee is laid out, even if pass==1. * ch-parse.y: Set ignore_exprs=(pass=2) for entire spec module. Mon Aug 9 15:44:01 1993 Bill Cox (bill@rtl.cygnus.com) This version compiles the 5-line program. Thanks, Per! * ch-decl.c (print_lang_decl, print_lang_identifier): Add appropriate calls to indent_to(). Rename reverse_scopes to switch_to_pass_2, and wait to set pass = 2 until here. * ch-grant.c (chill_finish_module_code): Set module_init_list non-NULL in pass 1; in pass2, chain on the module_init structure's decl. (chill_finish_compile): Clear module_init_list to NULL. * ch-parse.y (quasi_formparlist): Rewrite to avoid seg fault. Rename reverse_scopes to switch_to_pass_2, delete setting of pass = 2. * ch-tree.h: Rename reverse_scopes proto. Mon Aug 9 13:21:34 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-decl.c (build_enumerator): If name is NULL, don't call save_decl or get_next_decl. * ch-decl.c (layout_enum): Fix calculation of next value. * ch-grant.c (print_enumeral): Re-do for new 2-pass scheme. * ch-grant.c (decode_constant): Better CONSTRUCTOR support. Mon Aug 9 11:59:12 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c, ch-convert.c, ch-decl.c, ch-grant.c, ch-lang.c, ch-parse.y, ch-tree.h: gcc -Wall cleanup. Lots of new prototypes. Mon Aug 9 01:00:33 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-lex.h: Remove unused RID_'s. Make sure RID_MAX is last. * ch-decl.c (init_decl_processing): Moved ridpointers initialization to init_lex(). Use them consistently. * ch-lex.l (RETURN_PREDEF): New macro. Uses ridpointers for all preferedined types. * ch-lex.l (init_lex): Upper case all RIDs, so grantfiles (and error messages?) will use uppercase. * ch-decl.c (build_chill_enumerator): Merged into build_enumerator. * ch-lang.c (finish_chill_enum): Merged into ... * ch-decl.c (finish_enum): .... this function. * ch-decl.c (layout_enum): New function. Does all the pass-2 stuff for enumerations. * ch-decl.c (finish_enum, start_enum): Only trivial pass-1 stuff. * ch-satisfy.c (satisfy): Support ENUMERAL_TYPE. Improve ranges. * ch-parse.y: Check ignore_exprs instead of ignore_decls when parsing and building types. Sun Aug 8 16:26:40 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-lex.h: Add some missing RID_'s. * ch-decl.c (init_decl_processing): Sun Aug 8 15:32:54 1993 Bill Cox (bill@rtl.cygnus.com) * ch-grant.c (module_has_actions): Delete this and all references. It was a botch. (chill_finish_module_code): Move finish_chill_function_call inside the test whether actions were found at module level. Use current_function_name in the initializer build, and init_entry_id in the module_list setup. (chill_finish_compile): Call lookup_name to get the decl from a module_init_list entry. * ch-parse.y: Revert module_has_actions additions. * ch-satisfy.c (satisfy): After satisfying the type referenced by a pointer_type, call layout type for the pointer. * ch-tasking.c (tasking_registry): Only active in pass 2. * ch-typeck.c: Call build_chill_pointer_type everywhere. Sun Aug 8 13:13:29 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-tree.def (PAREN_EXPR): New unary op: '(' EXPR ')'. * ch-parse.y (primval): If pass 1, generate PAREN_EXRR. * ch-satisfy.c (satisfy): Reduce PAREN_EXPR to its operand. * ch-grant.c (decode_const): Handle PAREN_EXPR. * ch-decl.c (pop_module): Fix think. Inprove error message. Sun Aug 8 10:31:04 1993 Bill Cox (bill@rtl.cygnus.com) Generally, replace 'function' with 'procedure' and 'type' with 'mode' in error/warning messages. * ch-actions.c: See Generally. Fix up 'too many' and 'too few' error msgs. * ch-decl.c: See Generally. (init_decl_processing): Call build_tasking_enum from here. Now, it doesn't need a flag to do its work only once. Also, build the TaskingStruct decl here. * ch-grant.c: Remove references to `current_grant_file'; there's now only one. See Generally. Do gcc -Wall cleanup. * ch-lex.l: Remove references to `current_grant_file' and delete USE_GRANT_FILE token. * ch-parse.y: Remove call to build_tasking_enum, and its extern. * ch-tasking.c (tasking_setup): Move TaskingStruct build to init_decl_procesing. Delete build_tasking_enum calls. * ch-tree.c: See Generally. * ch-tree.h: Add proto for build_tasking_struct. Sun Aug 8 08:59:23 1993 Bill Cox (bill@rtl.cygnus.com) * ch-decl.c: Make unnamed_module_number static, reset it to zero before pass 2, so same module names get generated in both passes. (push_module): Return user name or generated name. (init_decl_processing): Build __tmp_initializer_type. Code moved from chill_finish_module_code. * ch-grant.c: New flag module_has_actions. Set TRUE by push_actions, used, reset by chill_finish_module_code. Replaces test of module_function_name. Shuffled finish-up code to end of module. (chill_finish_module_code): Use global_bindings_p to determine 'nested' parameter for finish_chill_function. Use new module_has_actions flag to trigger generation of module_init list entry. We now can handle not only multiple modules per file, but modules nested inside functions (I think). * ch-lang.c (build_chill_pointer_type): Restore missing assignment. * ch-parse.y (push_actions): Set module_has_actions flag. (modulion, spec_module): Save possibly-generated module name returned by push_module. * ch-satisfy.c (satisfy): Put switch cases into alpha order, add case for POINTER_TYPE. * ch-tasking.c: Replace build_pointer_type calls with build_chill_pointer_type calls. * ch-tree.h: Fix, add prototypes. Sat Aug 7 17:32:22 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-parse.y: Remove many useless tests for ignore_decls. * ch-parse.y: Remove obsolete support for _EXTERN and _INIT. * ch-parse.y: Reset ignore_exprs while parsing declarations, but handle initializers appropriately. * ch-grant.c (decode_constant): Update (for 2-pass) support for CONSTRUCTOR and SET_TYPE. * ch-grant.c (chill_initializer_name): Renamed to module_function_name. * ch-grant.c (function_generated): Removed; use module_function_name != NULL instead. * ch-tree.h, ch-parse.y: Removed unused current_locnamelist. * ch-decl.c (push_modedef): Simplify to take just one mode. * ch-tasking.c (make_process_struct, make_signal_struct): Change calls to push_modedef correspondingly. * ch-tree.c (build_powerset_type): Move the stuff that's suitable for pass 1 into new function make_powerset_type, and that for pass 2 into new function layout_powerset_type. * ch-lang.c: Move pass-1 stuff from build_chill_pointer_type into new function make_chill_pointer_type, and split build_chill_struct_type into make_chill_struct_type and layout_chill_struct_type. * ch-decl.c (grok_chill_variantdefs): Similarly split up into make_chill_variants and layout_chill_variants. * ch-satisfy.c (satisfy): Add support for SET_TYPE, and UNION_TYPE. Call layout_chill_struct_type for RECORD_TYPE. Sat Aug 7 09:59:55 1993 Bill Cox (bill@rtl.cygnus.com) Fixup previous check-in. * ch-decl.c: Restore unnamed_module_number, which *was* used after all. * ch-grant.c (get_init_function_id): Return type s.b. tree. Sat Aug 7 09:28:17 1993 Bill Cox (bill@rtl.cygnus.com) * ch-decl.c (print_lang_decl, print_lang_type): Add correct parameter list. Add print statements for nesting_level, signal_dest, buffer_size, and the signal_data flag. (decl_temp, decl_temp1): Delete unused code. (init_decl_processing): Call build_instance_type and build_tasking_type in both passes. Generally change current_scope comparisons against global_scope to global_biidings_p calls. * ch-except.c (push_handler): Add space before parameter paren. * ch-grant.c (chill_start_module, chill_finish_module, chill_finish_compile): Complete re-write for 2-pass and multiple modules per source file. * ch-parse.y (pass1_2): Call chill_finish_compile once each pass. * ch-tasking.c: Diffused small adaptations to 2-pass. * ch-tree.h (print_lang_decl, print_lang_type): Correct the prototypes. (chill_finish_module_code): Add module name parameter. * ch-typeck.c: Fix comments, add whitespace. Fri Aug 6 12:17:07 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-decl.c (temp_pushdecl, bind_saved_names): The simple-minded way I allocated the shadow_list on an obstack was too fragile, so just use xmalloc/free instead. Fri Aug 6 08:31:49 1993 Bill Cox (bill@rtl.cygnus.com) * ch-satisfy.c (satisfy): Satisfy TYPE_MIN_VALUE and TYPE_MAX_VALUE for vanilla integer type. Only need to satisfy TREE_TYPE for integer range type. Fri Aug 6 00:53:11 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-lang.c (build_chill_range_type): Split up into two new functions (make_chill_range_type, layout_chill_range_type); only former part is done in pass 1. * ch-lang.c (build_chill_array_type): Split up in the same way (yielding make_chill_array_type, layout_chill_array_type). * ch-satisfy.c (satisfy): Handle array and range types. * ch-tree.h (TYPE_RANGE_PARENT): Removed. Not used. * ch-parse.y (mode2): Handle optional rangesize. Thu Aug 5 15:13:42 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-grant.c (print_an_int): Re-enable (but don't search for SYN). * ch-grant.c (raw_decode_mode): Support printing of an IDENTIFIER_NODE (unresolved type name). * ch-grant.c (decode_constant): Support printing of an unresolved IDENTIFIER_NODE, as well as some kinds of binary operations. * ch-grant.c (grant_one_decl): Don't call globalize_decl. * ch-grant.c (decode_decl): Add support for ALIAS_DECLs (from SEIZEs and GRANTs). * ch-grant.c: Remove support for multiple grantfiles. * ch-grant.c, ch-parse.y: Removed grant_count, for now at least. * ch-lex.h (in_seizefile): Moved to ch-tree.h. * ch-tree.h (CH_DECL_SEIZED), ch-tasking.c, ch-decl.c: Removed. * ch-tree.h (CH_DECL_GRANTED): Added. * ch-actions.c (build_chill_exception_decl): Use IDENTIFIER_LOCAL_VALUE, not obsolete IDENTIFIER_GLOBAL_VALUE. * ch-grant.c (write_grant_file -> write_spec_module): Rename. Change to accept list of remember_decls and granted_decls. Thu Aug 5 11:58:21 1993 Stan Shebs (shebs@rtl.cygnus.com) * expr.c: Remove no-longer-used PROCESS_DECL tree type. Thu Aug 5 10:03:27 1993 Bill Cox (bill@rtl.cygnus.com) * ch-decl.c (init_decl_processing): Only build types in pass 2, since dbxout machinery is only ready for output then. * ch-grant.c (chill_finish_module_code): Do most of the work in pass 2. Thu Aug 5 06:54:10 1993 Bill Cox (bill@rtl.cygnus.com) * ch-parse.y (receivecaseaction): Pass label-group numbers around. * ch-tasking.c (build_chill_receive_case_start): Generate unique labels for each case, pass back the label-group's number. (build_chill_receive_case_end): Accept label-group number from parser, use it to build labels * ch-tree.h: Change prototypes. Wed Aug 4 13:21:13 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-decl.c (decl_temp1): Call finish_decl(). * ch-grant.c (chill_start_module_code): Don't call push_c_function_context - not needed since we're not nested. * ch-grant.c (chill_finish_module_code): Call finish_chill_function with nested=0, not 1 (twice). * ch-grant.c (chill_finish_module_code): Clear function_generated. Tue Aug 3 20:06:22 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-decl.c (push_chill_extern_function): Set TREE_PUBLIC. Tue Aug 3 19:08:51 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (build_chill_function_call): Handle parameter attributes better - LOC still not handled. * ch-tree.def: Amplify comment. Tue Aug 3 18:07:36 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-lex.l (handle_use_seizefile_directive): Update next_file_to_seize correctly. * ch-actions.c (build_chill_abs): Create an ABS_EXPR, not an rts_call. Tue Aug 3 14:03:50 1993 Bill Cox (bill@rtl.cygnus.com) First Aid, not real long-term fixes... * ch-decl.c (pop_module, lookup_name_for_seizing): Check current_module pointer for NULL before using it. (init_decl_processing): Set up wchar_type_node before using it. * ch-grant.c (chill_finish_module_code): Don't build initializer_type or initializer_decl until pass 2. * ch-lex.l: Readability - single statement per line. * ch-tasking.c (make_process_struct): Hide get_parm_info call inside #ifdef for now. Tue Aug 3 09:59:23 1993 Bill Cox (bill@rtl.cygnus.com) * ch-decl.c (pushdecllist): Add forward decl. * ch-parse.y (handler): Add rules which allo empty onalternativelist. * ch-tasking.c (get_tasking_code_name): Add cast of alloca() result. Tue Aug 3 00:11:40 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-lex.l (handle_use_seizefile_directive): Make files_to_seize a queue. Check for duplicate use_seizefile-s immediately. * ch-lex.l (yywrap): Use this more portable mechanism, rather than the flex-specific <>. Also, clear saw_eof. * ch-lex.l: Don't call push_module/pop_module automatically. * ch-decl.c (push_chill_extern_function: Modify for 2-pass. Mon Aug 2 14:24:59 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-parse.y: Rename actionstatement -> nonempty_actionstatement. New actionstatement is now nonempty_actionstatement | SC. Use where appropriate. This is closer to Blue Book terminology. * ch-tree.def (ALIAS_DECL): New tree type. * ch-decl.c: Merged all the code we need (I hope) from c-decl.c, which is no longer used for cc1chill. * c-decl.c: Remove all Chill-related code. * Makefile.in (CHILL_OBJS): Don't use c-decl.o. * ch-decl.c: No longer use IDENTIFIER_GLOBAL_VALUE anywhere. Introduce a 'nesting_level' level concept instead. * ch-decl.c: Merged push_scope into pushlevel; pop_scope into poplevel; struct scope and struct binding_level. * ch-decl.c: Other major name lookup algorithm changes. * ch-tree.h (struct lang_identifier): Remove granted_value field. * ch-tree.h (IDENTIFIER_GRANTED_VALUE macro): Removed. * ch-tree.h (DECL_NESTING_LEVEL): New macro. * ch-satisfy.c (satisfy, satisfy_decl): New 'lookup_only' arg. * ch-tree.h (struct module): New fields nesting_level, granted_decls. * ch-grant.c (seize_implied_names, do_seize, chill_seize): Move ... * ch-decl.c: ... here. * ch-grant.c (start_chill_function2): Remove. * ch-grant.c (chill_start_module_code): Now called in both passes. * ch-actions.c (lang_init): Code moved to ... * ch-decl.c (init_decl_processing): ... here. * ch-actions.c (chill_expand_result, chill_expand_return): Handle being called during pass 1. * ch-lex.l (name_type_signal): Don't try lookup_name during pass 1. * ch-parse.y (PUSH_ACTION, push_action): Is now invoked during both passes, for the sake of chill_start_module_code. Change all actions rules to invoke PUSH_ACTION unconconditionally. * ch-parse.y, ch-decl.c (push_module): Module label is now optional. Mon Aug 2 15:02:32 1993 Bill Cox (bill@rtl.cygnus.com) * expr.c (store_constructor): Convert library function parameters to proper integer precision before calling emit_library_call. Mon Aug 2 08:46:06 1993 Bill Cox (bill@rtl.cygnus.com) * ch-grant.c (seize_implied_names): Check POWERSET's base type for names to seize. Fri Jul 30 19:59:30 1993 Bill Cox (bill@rtl.cygnus.com) * ch-tree.h: Delete unused definition of JOINER macro. Expand comment about INSTANCE_TYPE. Thu Jul 29 14:57:11 1993 Bill Cox (bill@rtl.cygnus.com) * ch-convert.c (unreferenced_type_of): New function. (convert): Call new function. Thu Jul 29 07:34:57 1993 Bill Cox (bill@rtl.cygnus.com) * ch-lex.l: Allow C-style comments before the module header. Use #undef to assure that strchr isn't a macro (portability), and remove the extra paren- theses in its extern name. (check_newline): Call getlc less often, so that user labels aren't lowercased before their time. Add BEGIN INITIAL before starting pass 2, so the header is correctly ignored. Wed Jul 28 14:23:24 1993 Bill Cox (bill@rtl.cygnus.com) * ch-grant.c (chill_start_module_code): Cast alloca() return value. Wed Jul 28 12:39:51 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com) * ch-grant.c: remove extra parens around extern function declarations (they confuse the DECstation compiler) Wed Jul 28 12:28:56 1993 Bill Cox (bill@rtl.cygnus.com) * Makefile.in: Stop deleting flex's #line lines. Wed Jul 28 07:05:25 1993 Bill Cox (bill@cygnus.com) Adjust after FSF merge: * calls.c (expand_call): Add comment. * ch-expr.c: Add newline. * expmed.c (store_split_bit_field): Add comment. Tue Jul 27 17:32:13 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (build_chill_binary_op): Set code0 and code1 only in pass 2. (get_result_tmp_name): Cast alloca return for portability. * ch-decl.c (pop_module): Test current_module ptr before using it. * ch-lex.l: Set lineno and input_filename for pass 2 error messages. Tue Jul 27 15:14:06 1993 Bill Cox (bill@rtl.cygnus.com) * ch-lex.l: Fix the syntax error at line 329. Will I *ever* quit fixing these in the ch-lex.c file? Stay tuned.. Tue Jul 27 15:01:25 1993 Bill Cox (bill@rtl.cygnus.com) * ch-lex.l: Pervasive rewrite for queueing seize files, then parsing them at the end of pass 1. Still some problems. Tue Jul 27 07:40:39 1993 Bill Cox (bill@rtl.cygnus.com) * chill.in: Check for .i suffices only, and use -xchill to bracket the argument. Thu Jul 22 19:17:23 1993 Bill Cox (bill@rtl.cygnus.com) * c-decl.c (print_lang_identifier): Oops. Syntax error. Thu Jul 22 18:56:16 1993 Bill Cox (bill@rtl.cygnus.com) * c-decl.c (pushdecllist): Standardize loop for readability. * ch-decl.c (decl_temp): Call pushdecllist to store decl into hash table, move after current_scope declaration. (decl_temp1): Move also. * ch-lex.l (getlc): New function. Force char to lower case. (check_newline): Call it, so comparisons work on uppercase keywords. Wed Jul 21 22:17:22 1993 Bill Cox (bill@rtl.cygnus.com) * ch-decl.c (do_decls): Add saving of decl tree address into ID node in pass 2, reindent. * ch-grant.c (start_chill_function2): New function. (chill_start_module_code, chill_finish_module_code): Call it. * ch-loop.c (build_temporary_variable, begin_for_range): Replace start_decl, finish_decl pairs with decl_temp1 calls. * ch-parse.y (parnamelist): Eliminate warning by eliminating the %type for now. * ch-actions.c, ch-tasking.c: Replace do_decls calls with decl_temp1 calls. * ch-tree.h: New prototypes. * stmt.c (stamp_nesting_label): Check parameters for NULL. * toplev.c (lang_options): Add '-L' option. Wed Jul 21 21:06:18 1993 Bill Cox (bill@rtl.cygnus.com) Portability fixes. * ch-decl.c (save_decl): Make definition match forward declaration. * ch-lex.l (RETURN_TOKEN): Don't use the 'do { .. return } while 0' in the macro - Sun's compiler throws warnings. Thanks, Brendan. * ch-satisfy.c (satisfy): Add forward declaration. (SATISFY): Add outer parens for greater safety. Wed Jul 21 12:59:20 1993 Per Bothner (bothner@kalessin.cygnus.com) * c-decl.c (pushdecllist): New function. Add a list of decls to the current scope, checking for duplicates. * c-decl.c (start_function): Remove some Chill junk. (This function should no longer be used for Chill.) * ch-lex.l (ch_lex_init): New function, to re-init for 2nd pass. * ch-lex.l (<>): Cleanup, and re-start for 2nd pass. * ch-tree.h (UNSATISFIED, UNSATISFIED_FLAG): New flags. * ch-tree.h (CH_CLASS_IS_VALUE, CH_CLASS_IS_REFERENCE): Implement. Add comments. * ch-tree.h (CH_COMPATIBLE_CLASSES, CH_ROOT_MODE, CH_RESULTING_MODE): Better Blue Book type checking. * ch-actions.c (finish_chill_binary_op): Handle folding and other stuff that couldn't be done in pass 1. * ch-actions.c (build_chill_binary_op): Bail out early if pass 1. Use new CH_ROOT_MODE macro to handle integer promotions etc. * ch-except.c (push_handler): Bail out if pass 1. * ch-tasking.c (make_process_struct): Defer making this work. * ch-parse.y (assignaction): Simplify, and move some code ... * ch-expr.c (chill_expand_assignment): ... here. * ch-typeck.c (chill_root_mode, chill_resulting_mode, chill_compatible_classes): New functions, implementing the correspondingly named Blue Book concepts. * ch-parse.y generally: Lots of little tweaks to support 2-pass compilation. * ch-parse.y (push_module, pop_module): Moved to ... * ch-decl.c (push_module, pop_module): ... here. * ch-parse.y (push_action): New function. * ch-parse.y (pdef): Move complicated action to ... * ch-parse.y (end_function): ... new function here. * ch-parse.y (procedure): Major re-write. * ch-parse.y (paramname, paramnamelist): New, to avoid conflict (?). * ch-decl.c (do_decls, push_syndecls, push_modedef, start_chill_function, finish_chill_function): Do different things on each pass. Hence, can use code in c-decl.c to lesser extent. * ch-decl.c (build_chill_function_type): First arg is now just the return type, rather than a singleton list. * ch-decl.c (massage_param_node): Remove not needed (we now encode parameter attributes directly in the TREE_PURPOSE). * ch-decl.c (chill_munge_params): New function, called by parser. * ch-decl.c (push_parms): Removed function. * ch-decl.c (push_cope, pop_scope, save_decl, get_next_decls): New functions, to coordinate decls between passes. Wed Jul 21 14:23:25 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (lang_decode_option): Add option -Lpath to specify seize file path. (ch_singleton_set): Readability formatting. Add comment, move functions to easier found places. * ch-lex.l (setup_seizefile_read): Check for *no* slashes. (register_seize_path): Use memcpy so pathlen has an effect. * gcc.c (default_compilers): Add -L option to chill compiler SPECs. Wed Jul 21 12:59:20 1993 Per Bothner (bothner@kalessin.cygnus.com) * ch-satisfy: New file. Used for name lookup. * Makefile.in (CHILL_OBJS): Add ch-satisfy.o. Wed Jul 21 12:16:51 1993 Bill Cox (bill@rtl.cygnus.com) * toplev.c (main): Delete -L option handling - breaks non-chill compilers. Wed Jul 21 09:29:24 1993 Bill Cox (bill@rtl.cygnus.com) * ch-grant.c: #undef strchr and strrchr names in extern declarations, to prevent RS6000 compiler from reporting their misuse as macros. * ch-lex.l (setup_seizefile_read): Refer to list of paths for seizefiles specified by -L options on command line. (register_seize_path): Add a new path to the seize file list. * toplev.c (strip_off_ending): Recognize chill suffix. (main): Recognize -L option, specifying a seize file path. Tue Jul 20 12:41:52 1993 Bill Cox (bill@rtl.cygnus.com) * ch-lex.l (convert_float): Make it really portable, using the appropriate macros. Tue Jul 20 11:26:02 1993 Bill Cox (bill@rtl.cygnus.com) * ch-lex.l (convert_float): More casts for vxworks portability. Tue Jul 20 11:01:30 1993 Bill Cox (bill@rtl.cygnus.com) * ch-lex.l (convert_float): Give variable `d' correct type so build_real call is correct. Should remove vxworks portability problem. (convert_float): Re-indent to standards. Mon Jul 19 17:32:10 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (build_char_array_expr): Add field decls to constructor. Now, it generates the library call. * ch-expr.c (chill_expand_array_assignment): Make sure that all error messages say 'mode' not 'type'. Mon Jul 19 14:44:46 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c, ch-convert.c, ch-decl.c, ch-grant.c, ch-lang.c, ch-loop.c, ch-parse.y, ch-tasking.c, ch-tree.c, ch-typeck.c: Make sure that all error messages say 'mode' not 'type'. * ch-decl.c (push_modedef): Add novelty computation, storage in each newmode. * ch-parse.y: Delete novelty counter - moved to ch-decl.c. Reformat slightly for readability. Fix comments. * ch-tree.h: Delete print_lang_type prototype. Mon Jul 19 06:43:51 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (chill_expand_return): Disable error message which requires 2-pass analysis, for now. * ch-convert.c (convert): Build length-only constructor for empty string (PR 2930). Fri Jul 16 16:08:33 1993 Bill Cox (bill@rtl.cygnus.com) * ch-expr.c (chill_expand_array_assignment): Check non-varying string assignments for conformance to the "string assignment condition" (PR 2920). Thu Jul 15 13:25:33 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (build_chill_array_expr): Check parameters. Call convert to build unitary array from scalar if needed. Rewrite CONCAT_EXPR handling. * ch-convert.c (build_array_type_for_scalar): New functions. (convert): Call new function, to convert scalar to unitary array. Only call chill_expand_tuple if expression hass NULL_TREE type. * ch-expr.c (chill_expand_expr): Allow a larger static varying array to be assigned to a smaller, with a runtime test (to be provided). * ch-parse.y (locdec): Comment out bogus error msg. (elementlist): Replace several lines with chainon call. * ch-tree.h (SCALAR_P): New macro. New prototype for build_array_type_for_scalar. * ch-typeck.c (build_chill_cast): Re-indent. (chill_expand_tuple): Comment out strange addition of varying string's length to front of constructor list. Thu Jul 15 05:58:46 1993 Bill Cox (bill@rtl.cygnus.com) * ch-except.c (start_handler_array): Use unique identifier for exception array, so we can have > 1 array per reach (PR 2931). The change was originally entered June 23, and subsequently lost. Mon Jul 12 16:07:53 1993 Bill Cox (bill@rtl.cygnus.com) Get executable test cases running again... * c-typeck.c (build_function_call): Bypass default parameter promotions, format param syntax check for CHILL; they've already been converted in build_chill_function_call. * ch-actions.c (chill_expand-return): Correct tests for function which returns no value. * ch-convert.c (base_type_size_in_bytes): Check for NULL type parameter, just return. (convert): Allow conversion of CHAR to varying array of CHAR. Change error msg to "conversion" from "assignment". Remove default from case, which short-circuited before REFERENCE_TYPEs got converted. Deleted second copy of REFERENCE_TYPE code. * ch-lang.c (build_chill_range_type): Simply exit if NULL input parameter. * ch-loop.c: Fix comment. Sun Jul 11 11:27:08 1993 Bill Cox (bill@cygnus.com) * ch-actions.c (chill_expand_result, chill_expand_return): Move here from ch-typeck.c. Add a temporary to remember the result value in. Change return handler to fetch that temporary value, if there is one. * ch-parse.y (pdef): Call chill_expand_return to fetch the temp's value. * ch-tree.h, ch-typeck.c: Move return, result functions to ch-actions.c. And their prototypes. Fri Jul 9 15:47:51 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c, ch-convert.c, ch-decl.c, ch-except.c, ch-expr.c, ch-grant.c, ch-inout.c, ch-lang.c, ch-lex.l, ch-loop.c, ch-parse.y, ch-tasking.c, ch-tree.c, ch-tree.h, ch-typeck.c: gcc -Wall cleanup. Fri Jul 9 09:41:05 1993 Bill Cox (bill@rtl.cygnus.com) * ch-grant.c (decode_decl): Grant BUFFER, INSTANCE variables. (print_integer): Delete old non-working INSTANCE code. * ch-lex.l (name_type_signal): Recognize BUFFER name, too. * ch-parse.y (rccase_label): Move all actions inside if. Use BUFFERNAME to recognize receice case buffer clause, eliminate one shift-reduce conflict. * ch-tasking.c (build_buffer_descriptor): Check for CH_DECL_BUFFER flag, remove unused code. Thu Jul 8 11:17:32 1993 Bill Cox (bill@rtl.cygnus.com) Declaring and sending buffers.. first draft * ch-actions.c (lang_init): Define the send_buffer runtime function. * ch-decl.c (do_decls): Standardize loop, so stepping isn't hidden. * ch-lex.l: Clean up prototypes for readability. * ch-parse.y (sendaction): Add send buffer action. (locdec): Add rule for buffer declaration. * ch-tasking.c (generate_tasking_code): standardize indentation. (make_signal_struct): Readability changes. (build_chill_send_buffer, build_buffer_decl, build_buffer_descriptor): New functions. * ch-tree.h (IDENTIFIER_BUFFER_SIZE): Add place to save buffer's maximum queue length in buffer decl. (CH_DECL_BUFFER): Add flag in decl. Clean up for readability. Add prototypes. * ch-typeck.c (build_chill_cast): Call convert rather than storing directly into TREE_TYPE field. Tue Jul 6 12:34:32 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (lang_init): Set warn_switch so case labels get checked. Move build_chill_case_expr to ch-expr.c. * ch-expr.c (chill_expand_case_expr): Enable checking of expression case labels. * ch-grant.c: Move a comment. Mon Jul 5 10:02:27 1993 Wilfried Moser (fs_moser at rcsw1j) * ch-lex.l: Add compiler directive SUPPORT_CAUSING_ADDRESS. * ch-except.c (initialize_exceptions): Change the layout of the structure __ch_handler. The entry __jbuf is moved to the end of the structure and its size was changed to _JBLEN+10. * ch-decl.c (push_chill_extern_process): Add processing of processes with no arguments. * ch-grant.c (decode_decl, do_seize): Add processing of processes with no arguments. * ch-tasking.c (build_process_header, build_chill_start_process): Add processing of processes with no arguments. (make_process_struct): Add processing of IN attribute for process arguments. (tasking_setup): Add NUL-character to name of a tasking element. The name must be NUL terminated. (build_chill_send_signal): Default SEND_SIGNAL_PRIORITY to 0 with a warning if -Wall specified on command-line. Fri Jul 2 16:01:57 1993 Bill Cox (bill@rtl.cygnus.com) * ch-parse.y: Change 'empty' comments to new non-terminal so that exyacc doesn't discard them. * ch-lang.c (build_chill_range_type): New error messages. Fri Jul 2 12:43:25 1993 Bill Cox (bill@rtl.cygnus.com) * ch-parse.y (action): Catch and report actions which shouldn't have exception clauses, but do. Unfortunately, catching more than one of these per compilation will have to await the general addition of syntax error recovery to the parser. Fri Jul 2 10:45:35 1993 Bill Cox (bill@rtl.cygnus.com) * ch-parse.y (locdec): Issue error for initialization of bitstring with tuple, not for powerset init with tuple. Thu Jul 1 15:29:26 1993 Bill Cox (bill@rtl.cygnus.com) * ch-lang.c (build_chill_array_type): Check for indices that didn't fold into constants, issue error (PR 2924b). * ch-parse.y: Add novelty counter, alphabeticalize. * ch-tree.h: Define CH_NOVELTY for novelty checks later. Thu Jul 1 14:03:04 1993 Bill Cox (bill@rtl.cygnus.com) For Wilfried Moser. * chill.in: Add -ansi switch at compiler call to avoid translation of i.e. sun to 1 by cpp. Wed Jun 30 22:21:33 1993 Bill Cox (bill@rtl.cygnus.com) * ch-grant.c (raw_decode_mode): Add code for integer and enumeral ranges. Standardize indentation. Wed Jun 30 14:02:23 1993 Bill Cox (bill@rtl.cygnus.com) * ch-grant.c (print_an_int): New function to print a decimal integer string or the CONST_DECL (SYN) which best matches it. (print_integer): Call the above function. Replace calls to SAME_TYPE macro with TYPE_MAIN_VARIANT comparisons, as suggested by Jim Wilson. (decode_decl): Set current_grant_modename sooner, be sure to clear it when done. Wed Jun 30 10:10:57 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (build_max_min): Change interface to accept just a max/min flag. Get min/max values from an enumeral constructor. (build_chill_max, build_chill_min): Change calls to build_max_min. * ch-lang.c (deep_const_expr): Check for NULL_TREE arguments, don't seg fault. Wed Jun 30 09:20:09 1993 Bill Cox (bill@rtl.cygnus.com) * config/sparc/sparc.c (sparc_type_code): Add SET_TYPE to switch cases, preventing abort. Tue Jun 29 19:04:37 1993 Bill Cox (bill@rtl.cygnus.com) * ch-expr.c: Update comment. * ch-parse.y (range_or_mode): New non-terminal used in lexpr to implement mode as case label. Tue Jun 29 13:13:46 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (build_chill_case_expr): Pass in the optional ELSE clause, error for multiple case-selector expressions, error for missing ELSE clause. * ch-expr.c (chill_expand_assignment): Error if multiple location assignment and locations not novelty equivalent. * ch-parse.y (caseaction): Add range_list_clause non- terminal, sorry message for it. (assignaction): error if operator used on multiple assignment. (case_expr): Pass optional ELSE tree to build_chill_case_expr for checking. * ch-tree.h (build_chill_case_expr): Change proto. Fri Jun 25 17:22:41 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (chill_comptypes, build_chill_binary_op): Allow PROC mode variables. * ch-convert.c (convert): Turn a NULL literal into a zero valued pointer-to-function, given such a type. Also build the ADDR_EXPR of a function variable. * ch-grant.c: Pervasive -Wall -pedantic cleanup. (print_enumeral, print_integer, print_struct) Moved these large functions out of the switch in raw_decode_mode for readability, and to encourage future code-sharing. (print_proc_tail, print_proc_exceptions): Moved these out of decode_decl, to share them. They're used also to output PROC modes. * ch-parse.y (mode2): Enable PROC modes. (procmode): Represent PROC mode as a ptr-to-function type. (call): Recognize ptr-to-function as indirect call. Cleanup 'primval LPRN untyped_exprlist RPRN' action code. Thu Jun 24 15:59:20 1993 Bill Cox (bill@rtl.cygnus.com) * ch-grant.c: (raw_decode_mode): Add support for unnamed and user-numbered enumeration members. Thu Jun 24 13:52:10 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (build_chill_array_expr, build_chill_length): Explicitly convert a varying array's length field to an integer_type_node, now that it's only a chill_integer_ type_node. * ch-expr.c (chill_expand_expr, expand_assignment_to_varying_array, chill_expand_array_assignment, expand_varying_length_assignment): Explicitly convert a varying array's length field to an integer_type_node, now that it's only a chill_integer_type_node. * ch-loop.c (init_loop_counter, top_of_loop_test): Change to handle varying array location iterations. * ch-parse.y (mode2): Count number of named SET members, as opposed to '*' members. Issue error if there were none. (setelement): Count named set members. Generate a unique identifier for the '*' element. * ch-typeck.c (validate_varying_array_ref): Explicitly convert a varying array's length field to an integer_type_node, now that it's only a chill_integer_type_node. Wed Jun 23 19:18:28 1993 Bill Cox (bill@rtl.cygnus.com) * ch-lang.c (finish_chill_enum): Change test for too- large enumerations. * ch-parse.y (setelement, optsetvalue): Allow numbered, unnamed set elements. Wed Jun 23 16:25:06 1993 Bill Cox (bill@rtl.cygnus.com) * c-typeck.c (process_init_constructor): Suppress errors about un-initialized array elements if the array is VARYING, as signaled by C_TYPE_VARIABLE_SIZE. * ch-actions.c (lang_init): Set flag_short_enums, so that CHILL enumerations *can* be only a byte in size. (adjust_parm_or_field): Convert untyped parameter before looking at its type to process it. * ch-convert.c (convert): Generate [ -1, -1 ] value for an INSTANCE type. * ch-decl.c (do_decls): Assure that a CONSTRUCTOR has a type, so that output_constant doesn't seg fault. * ch-except.c (start_handler_array): Use unique identifier for exception array, so we can have > 1 array per reach. * ch-lang.c (finish_chill_enum): Error if number of enumeration values exceeds 256. * ch-parse.y (check_end_label): Error, not warning if start and end labels don't match. (assignaction): Convert RHS. Allows untyped tuples to be passed to stabilize_reference. (exceptlist, onexceptprefix): Error if non-unique exception name is coded. * ch-tree.c: Added form feeds, comment reformatted. * ch-typeck.c (chill_expand_tuple): Compare tree value to NULL_TREE, not zero. Add a constructor element for a VARYING array's length to the constructor list. (build_varying_struct): Mark the type as VARYING for process_init_constructor. * toplev.c (lang_options): Add '-lang-chill' and '-fchill-grant-only' options to table. Tue Jun 22 13:13:41 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (build_chill_function_call): Add check to prevent calling a PROCESS like a PROCEDURE. * ch-parse.y (rcalternative): Add check for an receive case alternative after a RECEIVE CASE statement. * ch-tree.h: Fix macro ENCAPSULATED_ARRAY_P. * ch-lang.c (lang_finish): Remove resetting errorcount and sorrycount for granting. Mon Jun 21 17:56:48 1993 Bill Cox (bill@rtl.cygnus.com) Receiving signals works. * ch-actions.c (lang_init): Add else_clause flag to __wait_signal parameter list. * ch-lex.l: Add SIGNALNAME token, return when appropriate. * ch-parse.y (SIGNALNAME): New token. Delete empty_untyped_exprlist token, no longer used. Add name_or_signal non-terminal. Standardize a few NULL tests. Add real RECEIVE CASE semantics. Add checks that SIGNALS, BUFFERs are only declared at global scope. (call): Add signal declarations with/without data fields. * ch-tasking.c (get_tasking_code_name, get_tasking_code, build_chill_receive_case_start, build_chill_receive_case_end, build_chill_receive_case_label): New functions. Replace build (CONSTRUCTOR, ... calls with build_nt (CONSTRUCTOR, calls. * ch-tree.h: New prototypes. Thu Jun 17 18:36:38 1993 Bill Cox (bill@rtl.cygnus.com) SIGNAL declaration compilation, seizing & granting, SENDing also. * ch-actions.c (lang_init): Move instance_type_node build to ch-tasking.c. Call build_tasking_message_type. Build a type for send_signal. Put builtin_function calls into alpha order. (adjust_proc_param): Rename to adjust_parm_or_field, add is_signal flag, so signal fields can use it. Rename calls to it, add flag to calls. * ch-decl.c (push_chill_extern_signal): Add function. * ch-grant.c (decode_decl): Correct signal decl output. (do_seize): Correct check for process seizure. Add code for seized signal decl. * ch-lex.l (yylex): Treat POS, ROW, STEP as reserved. * ch-loop.c (get_unique_identifier): Standardize loop temporary's name to assure that it's not granted. * ch-parse.y (SIG_NAME): Delete unused token. (spec_declist): Delete silly printf. (quasi_signaldef): Add non-terminal. (sendaction, optsendwith, optsendto, optpriority): Implement actual working semantics. (call, empty_untyped_exprlist): Allow empty signal fields between parens. * ch-tasking.c: Rename adjust_proc_param calls, add is_signal flag to calls. Make instance_type_node a type, not a TYPE_DECL, change references. Fix all CONSTRUCTOR builds. Add make_signal_struct function. Move build_instance_type here from lang_init. (build_tasking_message-type, build_signal_descriptor, build_chill_send_signal): New functions. * ch-tree.h: Add, update protos. * ch-typeck.c (build_chill_cast): Check for NULL expression type as well as error_mark. Thu Jun 17 12:28:03 1993 Jim Wilson (wilson@sphagnum.cygnus.com) * Makefile.in (STAGESTUFF): Add chill to list. Wed Jun 16 07:12:53 1993 Bill Cox (bill@rtl.cygnus.com) * Makefile.in: Complete the renaming of ch-process.c to ch-tasking.c. * ch-decl.c (push_chill_extern_function): Drop is_process parameter, and marking process decl trees. (push_chill_extern_process): New function for SEIZEd processes. Lotsa form feeds added for print readability. * ch-grant.c (decode_decl): Handle GRANTing of SIGNAls. (do_seize): New parameter seize_all. Handle sseizing processes. (chill_seize): Pass seize_all parameter. (chill_grant): Check for __tmp_ prefix, to disable *either* seizing or granting. * ch-parse.y (quasi_pdef): Delete is_process parameter for push_chill_extern_functon, call push_chill_extern_process for processes. (specialinit): Comment these rules as needed only until 2-pass compiler is operational. (extprocedure): Delete is_process parameter. (simpledec): Delete `sorry' about SIGNAL decls. (optsigdest): Correct check for process name. * ch-tasking.c (build_signal_decl): Finish coding. * ch-tree.h: Add macro to save a SIGNAL's destination process name in an id node. Add/change prototype. Mon Jun 14 18:17:13 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (lang_init): Build instance_type_node. Change `this' to a runtime function call. * ch-grant.c (do_seize): Generate tasking-code variable for seized process. * ch-lex.l (equal_number): Also accept synonym name for numeric value. * ch-parse.y (primval): Add process-related function calls. (signaldef, etc.): Rough draft of SIGNAL definition processing. (stopaction): Call runtime function. (pdef): Pop symbol level if ending a process and there were parameters. (primval): Call `whoami' runtime function for THIS. * ch-tasking.c (build_process_header): Be sure to define the tasking enum, if it hasn't already been done. Only call shadow_record_fields if there are parameters. (build_tasking_enum): Only call start_enum *after* checking the already_built flag. (build_copy_number, get_tasking_code, build_gen_code, build_gen_inst, build_get_ptype, build_proc_type): New functions for process-related builtins. (build_signal_decl): New function for SIGNAL declaration - rough draft. * ch-tree.def (INSTANCE_TYPE): new tree code. * ch-tree.h: New prototypes. Defines for instance type field access. Sat Jun 12 21:15:02 1993 Bill Cox (bill@rtl.cygnus.com) Get start-process action working: * ch-actions.c (adjust_proc_param): new function, extracted from build_chill_function_call and called from there. * ch-tree.h, ch-grant.c (do_seize): Add process_type parameter to add_taskstuff_to_list call, prototype. * ch-parse.y (start_parlist): New non-terminal for START action. (startaction): Reference start_parlist, check for integer-valued process copy-number. (optstartset): Check instance parameter - must be an INSTANCE_TYPE location. * ch-tasking.c (generate_tasking_code_variable): New function, extracted from tasking_setup and called from there. Also called from build_process_header. (build_process_header): Add process_type parameter to add_taskstuff_to_list call. Remove incrementing of process_type (moved into generate_tasking_code _variable). (build_chill_start_process): Complete rewrite. (add_tasking_stuff_to_list): Add stuffnumber parameter putit on the list. Sat Jun 12 06:08:09 1993 Bill Cox (bill@rtl.cygnus.com) Getting processes compiled, initialized and granted: * .cvsignore: Add chill file. * c-decl.c (shadow_record_fields): Allow PARM_DECL as well as VAR_DECL. * ch-actions.c (lang_init): Move build of initializer_type into ch-tasking.c. Change definition of THIS to function call. * ch-decl.c (massage_param_node): Add comments. (start_chill_function): Set nested flag in start_function call based upon current_function_decl, not as constant zero. * ch-grant.c (decode_decl): lotsa code by Wilfried to GRANT process decls. (finish_chill_module): Completely rewrote interface to runtime. * ch-lex.l (THIS): Just return the token code. * ch-parse: Add THIS token. (processpar, processparlist): New rules, to collect process parameters. (pdef): Add code to pop the process' WITH scope. (procedure): Set process WITH scope flag to zero. (process): Move most code into build_process_header. (primval): Output function call for THIS. * ch-tasking.c (add_taskstuff_to_list, build_tasking_enum, make_process_struct, build_process_header): New code to handle process translation and interface to runtime. * ch-tree.h: New prototypes. Thu Jun 10 13:32:51 1993 Bill Cox (bill@rtl.cygnus.com) * Makefile.in: Change ch-process.c to ch-tasking.c. A delayed part of the last change.. Thu Jun 10 11:14:59 1993 Bill Cox (bill@rtl.cygnus.com) * .cvsignore: Add 'chill' file. * ch-actions.c (lang_init): Add new runtime function __register_process. * ch-decl.c (push_chill_extern_function): Add is_process input flag, use it. * ch-grant.c (decode_decl): Recognize a process for granting. (do_seize): Put seized processes onto the tasking_list. (chill_finish_module_code): Declare init_list entry, link it onto the init_list. Call tasking_setup and tasking_registry. * ch-lex.l: Make tasking-related variables global, delete their initialized flags. * ch-parse.y: Add is_process flag to push_chill_extern_function calls. Put processes onto the tasking_list. * ch-process.c: Renamed to ch-tasking.c. * ch-tasking.h: New file. * ch-tree.h: New, adjusted prototypes. Wed Jun 9 10:59:27 1993 Wilfried Moser (moser@deneb.cygnus.com) * chill: This file is replaced by chill.in and will be generated during 'make' and 'make install'. This script now finds the correct chillrt0.o and libchill.a during linking. * chill.in: New file that replaced chill. * Makefile.in: Add rules to make chill out of chill.in. Wed Jun 9 09:03:55 1993 Bill Cox (bill@rtl.cygnus.com) * .cvsignore: Add gfloat.h and xlimits.h. * ch-actions.c (lang_init): Create new type for module- level initializer list entry. * ch-grant.c (chill_start_module_code): Rename actual module-level code to just the modulename, which is *not* public. (chill_finish_module_code): Allocate space for initializer list entry, build real initializer function, which puts the list entry on the runtime list. Name the init function as the module's constructor function. * ch-tree.h (build_init_struct): Add prototype. * ch-typeck.c (build_init_struct): Add function, called from lang_init. Note: these changes require a new devo/chillrt/chillrt0.c. Thu Jun 3 17:04:01 1993 Bill Cox (bill@rtl.cygnus.com) * c-decl.c: Fix comment. * ch-actions.c, ch-grant.c: Standardize front end: #define first, etc. Add comments. (lang_init): Delete unused flag, code for inapplicable gen-decls option. (lang_decode_option): Delete gen-decls option, add grant-only option, flag. * ch-convert.c, ch-decl.c, ch-except.c, ch-tree.c, ch-typeck.c: Add form feed after front end. * ch-expr.c: Standardize testing for error_mark node. * ch-lang.c: Remove unused deep_fold function. Fri May 21 11:04:22 1993 Bill Cox (bill@rtl.cygnus.com) * c-typeck.c (build_binary_op, build_unary_op): Recognize BOOLEAN_TYPE. * ch-actions.c (build_chill_unary_op): Remove some crufty work-arounds. Thu May 20 19:03:48 1993 Per Bothner (bothner@deneb.cygnus.com) * ch-grant.c (decode_constant): If the granted value is a cast, make sure to emit an appropriate expression conversion. Thu May 20 16:35:35 1993 Bill Cox (bill@rtl.cygnus.com) * ch-lang.c (build_chill_range_type): Initialize the precision variable. Double-negative ranges work now. Thu May 20 11:24:42 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (build_unary_op): Compound a wretched hack which hides a BOOLEAN_TYPE from the underlying C code. Wed May 19 16:45:54 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c: (CH_SINGLETON_SET): Add function, call it from chill_comptypes. (build_chill_unary_op): Give better name to unsigned flag. * ch-expr.c (chill_expand_assignment): Correct calling sequence for setpowersetbits runtime routine. * ch-grant.c (raw_decode_mode): Give better name to unsigned flag. (decode_constant): Check for null 'val' ptr, avoid seg fault. * ch-lex.l (convert_number): Give better name to unsigned flag. (convert_bitstring): Move increment of bl counter to emphasize that it increments once per loop. * ch-tree.h: (NO_SOURCE_UNARY_MINUS): Define new flag. * ch-typeck.c (chill_expand_tuple): Build BOOLEAN constructor if given a singleton set constructor. Thu May 13 17:03:04 1993 Bill Cox (bill@rtl.cygnus.com) * c-decl.c (pushdecl): Complete May 9 change. * ch-actions.c (build_chill_unary_op): Set the TREE_UNSIGNED flag FALSE for raw_decode_mode. * ch-grant.c (grant_array_type): Correct the May 12 check for circularity. (raw_decode_mode): Use TREE_UNSIGNED flag to control range's printing. (chill_grant): Remove useless, bogus code. * ch-lex.l (convert_number): Set the TREE_UNSIGNED flag TRUE for raw_decode_mode. Wed May 12 18:04:01 1993 Bill Cox (bill@rtl.cygnus.com) * ch-decl.c (push_syndecls, push_modedef): Comment reminders to check for circular definitions. Later! * ch-grant.c (grant_array_type, decode_decl): Prevent circular definitions in the use of the array's type name. Wed May 12 16:06:13 1993 Bill Cox (bill@rtl.cygnus.com) * ch-grant.c (grant_array_type): If array_type has a name, just use it. * ch-lang.c (build_chill_range_type): Don't force unsigned ranges on output. * expr.c (store_constructor): Preclude seg fault. Wed May 12 07:49:00 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (fold_set_*): Correct tests for range set-constructor list entries. (lang_init): Define setpowersetbits function. * expr.c (store_constructor): Handle non-constant set constructors. Tue May 11 18:25:40 1993 Per Bothner (bothner@cygnus.com) * ch-lang.c (build_chill_range_type): If the parent type is unknown, and the endpoints of the range are integer constants, use the smallest suitable integer type. * ch-lang.c (build_chill_range_type): Remove kludge for dealing with char ranges. Tue May 11 15:24:31 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (build_chill_repetition_op): Build a range-type set constructor if there's only one value in the repeated constructor. (fold_set_*): Abort if range value seen, for now. * expr.c (store_constructor): Handle range-type by storing bytes rather than bits as much as possible. Mon May 10 18:45:18 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (invalid{left right}_operand): Add handlers for REPLICATE_EXPR. (build_chill_repetition_op): Build constructor list for repetition of bitstring. * ch-parse.y (call): Recognize more trees as arrays, to avoid error msg. (operand5): Add count, string temporaries, use them. Mon May 10 16:49:08 1993 Per Bothner (bothner@cygnus.com) * ch-grant.c (seize_implied_names): Fix code that assumed a FUNCTION_DECL (or PROCESS_DECL) to work on types instead. * ch-grant.c (generate_set, grant_parent_of_enum, grant_parent_enum): Removed unused functions. * ch-grant.c (raw_decode_mode): Remove commented-out code. Mon May 10 10:54:57 1993 Bill Cox (bill@rtl.cygnus.com) * ch-grant.c (do_seize, seize_implied_types): Move result and parameter processing to proper place. (chill_seize): Mark unseized identifier with error_mark_node, to avoid excessive errors. * ch-parse.y (call): Check for ERROR_MARK before reporting an error. Sun May 9 17:21:24 1993 Bill Cox (bill@rtl.cygnus.com) * c-decl.c (pushdecl): If a strongly-visible name is seen, in conflict with a weakly-visible name, take the strongly-visible one and don't complain. * ch-actions.c (chill_comptypes): Allow chain of ref- erence types > 1 in length. * ch-grant.c: Turn disguised for-loops into actual ones, so continue works. Delete redundant code in seize_implied_names. Reindent. * expmed.c (store_split_bit_field): Disable abort for CHILL. Sun May 9 17:11:33 1993 Per Bothner (bothner@cygnus.com) * ch-convert.c (convert): Move handling of SET_TYPE until after we've handled de-referencing and such like. * ch-grant.c (grant_array_type): Simplify; remove (now-) bogus call to generate_set. * ch-grant.c (get_type): Remove obsolete stuff. Fri May 7 10:30:34 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (lang_init): Add definition of psslice runtime routine. (build_chill_binary_op_1, build_chill_binary_op): Have result type of TRUTH_ANDIF_EXPR be boolean, not integer. Some reindenting. * ch-convert.c (convert): Use consistent notation for expression. * ch-parse.y: Add front-end pass count. (locdec): Add syntax for other BASED declaration. * ch-tree.c: Fix comment. * ch-typeck.c (build_chill_slice): Implement a runtime call for bitstring slices. (build_chill_cast): Add code for BITS_BIG_ENDIAN bit loop. (chill_expand_tuple): Don't pass ref type to digest_init, only underlying type. Thu May 6 12:52:14 1993 Per Bothner (bothner@cygnus.com) * ch-typeck.c (build_chill_cast): type_for_size takes a size in bits, not bytes. Wed May 5 19:02:55 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c: Break out separate routines for set folding, handle ranges in set_fold_eq and set_fold_ne. Fix folding as req'd by TTC test. * ch-grant.c (raw_decode_more): Check for content match to decide output mode, not pointer identity. * ch-typeck.c: Add cross-reference comment. * varasm.c (emit_set_data): Clarify parameter name. Handle INTEGER_CST as set constructor. (output_constant): Handle CONSTRUCTOR node for sets. Apparently forgot to actually 'checkin' this one last time. Wed May 5 12:23:58 1993 Jim Wilson (wilson@sphagnum.cygnus.com) * ch-parse.y, ch-tree.h (get_current_declspecs): Obsolete; deleted. Tue May 4 15:47:44 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (fold_set_expr): new function to fold set expressions. Calls inserted into build_chill_binary_op and build_chill_unary_op. (build_chill_repetition_op): New function, called from build_chill_function_call. * ch-expr.c (chill_expand_assignment): Call build_chill_repetition_op. * ch-grant.c (decode_constant): Comment out deep_fold call. The earlier fold_set_expr calls should make this one unnecessary. Prevent seg fault when name of structure field is NULL. Standardize for loop. * ch-parse.y: Fix comments. (operand5): build a REPLICATE_EXPR. Don't call build_repetition_op until we have a type. * ch-tree.def (REPLICATE_EXPR): Define tree-code. * ch-tree.h (build_chill_repetiton_op): Fix proto. * ch-typeck.c (chill_expand_result): Call build_chill_repetition_op if needed. * varasm.c (emit_set_data): Clarify parameter name. Handle INTEGER_CST as set constructor. (output_constant): Handle CONSTRUCTOR node for sets. Mon May 3 13:06:47 1993 Per Bothner (bothner@cygnus.com) * ch-typeck.c (build_chill_cast): Allow more liberality to casting: Any discrete type to any non-discrete type that is the same size as some other discrete type (and vice versa). * stor-layout.c (layout_type, case SET_TYPE): If the number of bits will fit in a char or short, only use that many bits. Mon May 3 08:22:45 1993 Bill Cox (bill@rtl.cygnus.com) * ch-grant.c (decode_constant): Revert interpretation of SET_TYPE as integer. Mon May 3 07:55:46 1993 Bill Cox (bill@rtl.cygnus.com) * chparse.y (casealternative): Allow empty action list. Sat May 1 15:07:01 1993 Bill Cox (bill@rtl.cygnus.com) * expr.c (expand_expr): Add parameter to __inpowerset runtime call, to match new runtime. Sat May 1 14:55:58 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c: Cleanup from -Wall. Reindent. Redefine __inpowerset to take a 'minval' parameter that matches the new runtime. Added comments. * ch-expr.c (chill_handle_case_label): Handle NULL or ERROR trees. * ch-grant.c (get_type): Survive bogus type params, return empty string. * ch-tree.c (build_powerset_type): Diagnose powerset of non-discrete type. * ch-typeck.c (discrete_type_p): Reindent. Fri Apr 30 16:08:54 1993 Bill Cox (bill@rtl.cygnus.com) * ch-grant.c (decode_constant): Interpret SET_TYPE with integer value, so we output the same stuff as the user gave us. * ch-parse.y: Fix indentation. Fri Apr 30 09:34:03 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (chill_comptypes): Simplify, correct integer subrange analysis. * ch-grant.c (seize_implied_names): Add handling for PROCESS_DECL, PROCESS_TYPE. (do_seize): Call seize_implied_names for process, procedure parameters and return value. * ch-lang.c (finish_chill_enum): Canonicalize enum types. * ch-tree.def (PROCESS_TYPE): Add. * ch-typeck.c (valid_array_index): Call chill_comptypes rather than broken macro CH_COMPATIBLE. The logic in chill_comptypes will get moved to the macro later. Thu Apr 29 13:07:55 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (build_chill_lower, build_chill_upper): Handle enumeration types. (build_chill_binary_op): Call chill_comptypes to error check IN arguments. Change error messages to say 'mode' rather than 'type'. Cast tree codes when build is called. * ch-expr.c (chill_expand_array_assignment): Call chill_comptypes to validate assignment args. * ch-lex.l: Add newline for readability. Wed Apr 28 15:22:18 1993 Bill Cox (bill@rtl.cygnus.com) * Makefile.in (ch-hash.h): Add rule to build this from chill.gperf. Not yet used. * ch-actions.c (build_chill_binary_op): Allow enum subranges on RHS of IN operator. * ch-grant.c (decode_constant): Recognize error_mark_node as empty powerset initializer, re-indent a bit. * ch-lang.c (deep_fold): Return error_mark_node for NULL input pointer or incoming error_mark_node. * ch-lex.l: Ignore PACK and UNPACK keywords. Return POS, ROW, and STEP as user-defined names. (name_or_type): New function for above. * ch-parse.y: Move token defs for following, comment them separately: NOPACK, PACK, POS, ROW, STEP * varasm.c (output_constant): Check for VAR_DECLs in records & unions, like arrays. Don't abort. Tue Apr 27 17:42:29 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (CH_PROMOTING_INTEGER_TYPE_P): rewrite for generality. * ch-decl.c (grok_chill_variantdefs): Use chill comptypes, so that subrange compatibility is ok. (start_chill_function): Use lookup_name(), not IDENTIFIER_GLOBAL_VALUE, for full generality. * ch-expr.c (chill_expand_assignment): Need to handle non-NOP modify codes here, since C code in build_modify_expr won't understand powersets, etc. Tue Apr 27 09:05:31 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (build_max_min): Assign the set's base type to the function's return type. (build_chill_function_call): Before complaining about parameter mismatches, convert certain actual parameters. * ch-expr.c (chill_expand_assignment): Before complaining about LHS/RHS mismatches, convert certain RHS expressions. * ch-grant.c (decode_constant): Deep-fold incoming expression, so we can output it. * ch-lang.c (deep_const_expr): New function, called from const_expr, actually traverses the tree looking at its leaves for 'const'ness. (deep_fold): New function to fold already-built trees. * ch-parse.y (case_expr): Add whitespace. * ch-tree.h: Add prototype for deep_fold. Tue Apr 27 07:21:43 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (chill_comptypes): Allow enumeration subranges as compatible with the parent enum. (build_chill_function_call): Before checking type compatibility, use convert on typeless expressions, like constructors. * ch-expr.c (chill_expand_assignment): Before checking type compatibility, use convert on typeless expressions, like constructors. * ch-lex.l: Add comment. Thu Apr 22 17:23:25 1993 Bill Cox (bill@rtl.cygnus.com) * .cvsignore: Add genopinit, insn-opinit.c * c-common.c (binary_op_error): Prevent seg fault on unknown node code. * ch-typeck.c (build_chill_array_ref): Remove old lower-bound-of-array-index-nonzero code. * expr.c (expand-expr, get_inner_reference): Remove old lower-bound-of-array-index-nonzero code. Thu Apr 22 16:01:09 1993 Bill Cox (bill@rtl.cygnus.com) * c-decl.c (shadow_record_fields): Add pushlevel for each PROCESS parameter, too. * ch-process.c (make_process_struct): First working version. * ch-tree.def: Add PROCESS_DECL definition. * ch-tree.h: Add CH_IS_EVENT_MODE macro, change proto for make_process_struct. * expr.c (expand_expr): Add references to PROCESS_DECL. Add #include of ch-tree.h. * tree.c (decl_function_context): Add check for a PROCESS_DECL, and #include for ch-tree.h. Thu Apr 22 09:25:08 1993 Bill Cox (bill@rtl.cygnus.com) * expr.c (expand_expr): Add missing prototypes, and parameters to expand_expr call. Wed Apr 21 16:17:07 1993 Bill Cox (bill@rtl.cygnus.com) * c-decl.c (shadow_record_fields): Add ability to handle pointers to records/unions. For PROCESS compilation. Thu Apr 22 09:25:08 1993 Bill Cox (bill@rtl.cygnus.com) * ch-expr.c (chill_expand_expr): Add missing parameters to expand_expr calls. Some trivial reformatting for readability. Wed Apr 21 16:17:07 1993 Bill Cox (bill@rtl.cygnus.com) * ch-lex.l: Make send_*_prio externally visible, default them to zero, eliminate the init flags. Same for process_type. Sat Apr 17 10:59:50 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (build_chill_binary_op): Build a BIT_FIELD_REF tree for IN_EXPR operations. * ch-typeck.c (build_chill_array_ref): Build a BIT_FIELD_REF tree for access to packed array of bits. Fri Apr 16 12:33:34 1993 Bill Cox (bill@rtl.cygnus.com) * ch-parse.y (EXIT action): Improve error checking, messages. * ch-typeck.c (chill_expand_tuple): Remove code to pack sets (moved to varasm.c long ago). * varasm.c (unpack_set_constructor): Rename size to bit_size, since 'size' always means bytes. (pack_set_constructor): Rename size to wd_size, since 'size' always means bytes. (output_constant): Set size to zero, so that extra bytes of padding aren't output after set constants. Fri Apr 16 11:57:50 1993 Bill Cox (bill@rtl.cygnus.com) * .cvsignore: Add .gdbinit. * ch-decl.c (start_chill_bindings): Add function name to binding contour's exit_label for EXIT stmt. * ch-parse.y (EXIT action): Call lookup_name to avoid inserting label for function name. Also check IDENTIFIER_LABEL_VALUE for label's decl. (caseaction, beginendblock, ifaction): Call stamp_nesting_label to put action's label into contour for EXIT to find. Thu Apr 15 17:17:05 1993 Bill Cox (bill@rtl.cygnus.com) * expr.c (expand_expr): Unify, clean up handling of IN_EXPR, and handling of bit-string element ref. Now, all goes through IN_EXPR handler. * stmt.c (stamp_nesting_label, expand_exit_labelled): New functions, which allow either label or function decls. Thu Apr 15 17:17:05 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c ch-actions.h ch-convert.c ch-decl.c ch-except.c ch-expr.c ch-grant.c ch-inout.c ch-lang.c ch-lex.h ch-lex.l ch-loop.c ch-parse.y ch-process.c ch-tree.c ch-tree.def ch-tree.h ch-typeck.c: Add 1993 copyright, fix titles. * ch-actions.c (build_chill_binary_op): Move runtime function call to expr.c. Just build a tree here. Clean up error checking. * ch-convert.c (convert): Simply store a type into an expression if TREE_TYPE (expr) == NULL. Prevent error if an enum is to be converted to a set of such enums. * ch-loop.c (init_loop_counter): Restore error msg for undeclared variable if no local scope is to be created for the loop. * ch-typeck.c (build_chill_array_ref): Turn bit array ref into IN_EXPR, remove redundant code which wasn't ever called. Wed Apr 14 07:54:00 1993 Bill Cox (bill@rtl.cygnus.com) * .cvsignore (y.tab.c) : Add to list. * ch-convert.c (convert): Check pointers better - avoid NULL reference. Remove redundant check for ERROR_MARK - already checked earlier. * ch-parse.y (get_type_of): Add parameter checks for NULL ptrs and error_mark_node. Tue Apr 13 16:00:37 1993 Per Bothner (bothner@cygnus.com) * c-decl.c (start_function): If there is a previous function declaration of the same name, steal its RTL. This is a kludge needed for forward declarations of nested functions. * ch-decl.c (push_chill_extern_function), ch-tree.h: New function, for external and seized function declarations. Make sure to use permanent obstack. * ch-parse.y (quasi_pdef, extprocedure): Use new function. * ch-grant.c (chill_finish_module_code): Since module function is no longer visible,, can't get it using lookup_name(). Use current_function_decl instead. * ch-decl.c (build_chill_function_type): Add void_type_node to end of parameter types list. * ch-grant.c (chill_start_module_code): Make sure module function isn't visible (and hence isn't granted). Tue Apr 13 15:48:25 1993 Bill Cox (bill@rtl.cygnus.com) * ch-loop.c (begin_chill_loop): Also stamp the user's loop name into current contour for DO FOR EVER loops. Tue Apr 13 14:37:39 1993 Bill Cox (bill@rtl.cygnus.com) * ch-parse.y (actionstatement): Add error rule. Delete POP_UNUSED_ON_CONTEXT. Add comments about label name usage. (nohandleraction): Better error check in EXIT processing. (optexprlist): Comment out make_function_rtl call. (seizestatement): Change error to warning. Tue Apr 13 08:29:31 1993 Bill Cox (bill@rtl.cygnus.com) * ch-grant.c (raw_decode_mode): Supply missing parameter in get_type call. * ch-loop.c (begin_chill_loop): Take loop label as parameter. Stamp its name into the current contour's exit_label, for EXIT to use. * ch-parse.y: (actionlabel): Save label tree in global variable. (actionstatement): Clear label to NULL when action is finished. (handlerstatement, nohandlerstatement): Split actions into categories which do/don't permit exception handlers. (exitaction): Move code into nohandleraction, make it work. (doaction): Pass (possibly NULL) label tree to begin_chill_loop. * ch-tree.h: Add parameter to begin_chill_tree prototype. * stmt.c (stamp_nesting_label, expand_exit_labelled): Add functions. Note: This implementation of EXIT only exits from loops, not yet from other bracketted statements. Mon Apr 12 13:41:55 1993 Per Bothner (bothner@rtl.cygnus.com) * ch-grant.c (chill_grant): Remove obsolete code. * ch-decl.c (push_synmode, push_newmode): Merged to yield ... * ch-decl.c (push_modedef): ... w/ slightly different interface. * ch-tree.h, ch-process.c (make_process_struct), ch-parse.y (modedefinition): Use new push_modedef function. * ch-parse.y (modedefinition): Don't depend on inherited attributes (- implemented incorrectly!): Use a global variable parsing_newmode to distinguish synmode and newmode. Mon Apr 12 08:10:34 1993 Bill Cox (bill@rtl.cygnus.com) * ch-loop.c: Diffuse cleanup after big functional changes. * ch-parse.y: Eliminate temporary variables, now unnecessary. Use parse-time stack instead. * ch-tree.h: Change build_chill_iterator prototype. Sun Apr 11 15:50:33 1993 Bill Cox (bill@rtl.cygnus.com) * ch-convert.c (convert): Replace an ERROR_MARK type - from a untyped_expr with the given type. Move chill_expand_case_expr call inside chill_expand_expr. * ch-expr.c, ch-tree.h, ch-typeck.c (chill_handle_case_default, chill_handle_case_label, chill_expand_case_expr): Move to ch-expr.c from ch-typeck.c. * ch-loop.c: Major reorganization to support multiple iterators in DO FOR loop, very little new code, just a re-org. * ch-parse.y (iterationlist): Add handling for multiple loop iterators. Sat Apr 10 14:40:12 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (build_chill_lower, build_chill_upper): Clean up. * ch-grant.c (chill_grant): Avoid making strange SYNMODE for enum member. * ch-lex.l (equal_number): Add function to look in the input for '=' followed by a decimal literal. Call it from directive scanning. (start state 'ccitt'): Deleted, unused. Moved unused, but reserved, tokens to NORMAL state. (compiler_directive): Replaced by equal_number. Now the only recursive call to yylex happens in check_newline at the beginning of a compilation. Sat Apr 10 09:55:50 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (build_chill_case_expr): Added from ch-parse.y. * ch-lex.l (ENTRY, PERVASIVE, ROW, STEP): Add token recognition to 'reserve' them. * ch-parse.y (case_expr): Move code into ch-actions.c. There will need to be much more written. * ch-tree.def (VARY_ARRAY_REF): Add comment. * ch-tree.h (build_chill_case_expr): Add prototype. * ch-typeck.c (build_chill_cast): Allow untyped_expr - just assign the type to the expr. Check for CASE_EXPR, call expand_case_expr. Sat Apr 10 01:10:51 1993 Per Bothner (bothner@rtl.cygnus.com) * ch-parse,y (in_pseudo_module): New variable. Try if we're in a seizefile, but not in a module nested in the seizefile. Use for backwards compatibility with old grantfiles. * ch-decl.c (do_decls, push_syndecls, push_newmode, push_synmode): If in_pseudo_module, grant new declaration. * ch-decl.c (pushd_newmode): If there is a granted previous incomplete type, fix it up. * ch-grant.c (seize_implied_names): Do remaining types. Guard against recursion. * ch-tree.h (IDENTIFIER_ENUM_VALUE): Removed, not used. * ch-tree.h (CH_DECL_ENUM), ch-grant.c (chill_grant), ch-lang.c (finish_chill_enum): Enum constants are marked with CH_DECL_ENUM so they don't get written to the grantfile. * ch-tree.h (IDENTIFIER_GRANTED_VALUE): Allow fast seizing. * ch-lex.l: Re-write to use start states, to avoid calling yylex() recursively. * ch-lex.l (compiler_directive); This is now obsolste. FIXME. * ch-lex.l: Call push_module and pop_module when reading a seizefile. This creates a pseudo-module. * ch-parse.y: Clean up handling of empty declarations and action statements; semicolons are now optional a number of places. * ch-parse.y: Remove some bogus tests for "statement out of sequence" (they're both legal and work). * varasm.c (mak_function_rtl): Remove kludge that may not be necessary (and loses anyway). Fri Apr 9 09:37:38 1993 Bill Cox (bill@rtl.cygnus.com) * ch-expr.c (chill_expand_array_assignment): Remove false error about arrays that are too small. * ch-parse.y (callaction): Don't pass an error_mark_node to c_expand_expr_stmt. Fri Apr 9 00:26:54 1993 Per Bothner (bothner@rtl.cygnus.com) * ch_tree.h (DECL_HIDDEN_BY_MODULE, ENCAPSULATED_ARRAY_P): New macros. * ch-actions.c (build_chill_function_call): Use latter. * ch-typeck.c (chill_similar): Fix typo. * ch-grant.c (raw_decode_mode): Handle ENCAPSULATED_ARRAY_P parameter types. * ch-grant.c (seize_implied_names): Handle ranges of enums. * ch-grant.c (do_seize): Set DECL_SOURCE_FILE and _LINE of seized declaration to be the point of the seize itself. * ch-grant.c (chill_grant), ch-tree.h: Add a parameter which is the list (in order) of decls in the module. Don't reverse the getdecls() list; that is handled by caller. * ch-grant.c (chill_grant): Test that a declaration is visible before writing it. * ch-parse.y (push_module): Make sure to hide declarations from surrounding module. * ch-parse.y (pop_module): Restore those declarations. * ch-parse.y (pop_module): This function is now responsible for writing out for calling chill_grant() to the grant file. * ch-actions.c (lang_finish): Remove calls to chill_grant(). Thu Apr 8 16:56:52 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (build_char_array_expr): Add handling of varying arrays in relational expressions. * ch-decl.c: Add prototype for lookup_name_current_level. * ch-expr.c (chill_expand_expr): Make concat_expr's temp a BLKmode, so its length is used as the temp's size. (chill_expand_array_assignment): Correct for varying := varying assignment, clean up. * ch-typeck.c: Add prototype for require_complete_type. Wed Apr 7 16:41:29 1993 Bill Cox (bill@rtl.cygnus.com) * ch-loop.c (for_location, begin_chill_loop, end_chill_loop): Major diffuse changes to fix location loops. * ch-parse.y (location): Remove ref through NULL ptr. Wed Apr 7 13:42:06 1993 Per Bothner (bothner@rtl.cygnus.com) * ch-decl.c (massage_param_node): New function. It handles the LOC/IN/OUT/INOUT parameter distinction, as well as calling build_chill_array_parm_type if needed. * ch-tree.h (massage_param_node): New prototype. * ch-decl.c (push_parms): Use new massage_param_node(). * ch-parse.y (pmodearg): Use new massage_param_node(). * ch-parse.y (formpar): Don't call build_chill_array_parm_type; now handled by massage_param_node. * ch-typeck.c (my_build_array_ref): Handle non-zero array lower bounds. * ch-actions.c (build_chill_function_call): If the formal parameter is a pseudo record wrapped around an array, make sure we wrap the actual parameter in a record CONSTRUCTOR. * ch-typeck.c (build_chill_array_parm_type): Make sure the pseudo struct type is allocated on the permanent_obstack. * ch-parse.y (location): Remove thinko. * ch-actions.c (chill_comptypes): Comment out test for NEWMODEness - it gets broken by the forward declaration hacks. Tue Apr 6 18:05:40 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c: Move build_varying_struct to ch-typeck.c. * ch-parse.y (formpar): Turn ARRAY_TYPE parms into structure. * ch-parse.y (location): Do build_component_ref for an array wrapped in a structure. * ch-tree.h: Add prototype, #define for build_chill_array_parm_type. * ch-typeck.c (build_chill_array_parm_type): Add function, move build_varying_struct here from ch-actions.c. Mon Apr 5 19:56:56 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c, ch-decl.c: Use tree_int_cst_equal and integer_zerop rather than in-line code - tests LOW and HIGH values. * ch-lang.c: Use tree_int_cst_lt rather than inline code. * ch-typeck.c (my_build_array_ref): Handle case where array low bound isn't zero. Mon Apr 5 15:45:10 1993 Bill Cox (bill@rtl.cygnus.com) * ch-typeck.c (my_build_array_ref): Add some more code from build_array_ref. Change checks, error messages to mention 'discrete types'. I.E. types which don't kiss and tell.. Sat Apr 3 09:27:03 1993 Bill Cox (bill@rtl.cygnus.com) * ch-except.c, ch-expr.c: Turn externs into prototypes. * ch-grant.c (chill_grant): Remove orphan #else. * ch-tree.h: Add prototype for build_chill_bin_type. * ch-typeck.c: Turn externs into prototypes, delete code which was commented out in chill_expand_return; it will never be used. Fri Apr 2 21:55:14 1993 Per Bothner (bothner@rtl.cygnus.com) Major re-write of New module/seize/grant stuff. Now, a grantfile is a spec module and contains all the top-level declarations of the granting module, not just those that are granted. It also contains explicit grant statments naming those declared names that are granted. It also has seize statements and use_seize_file directives to correctly handle transitive dependencies. * ch-parse.y: Change to allow multiple modules per source file. Allow spec modules (including quasi definitions) as well as regular modules. Allow spec modules inside normal modules; these behave as if they were outermost. This violates the Blue Book, but is needed by the new grantfile mechanism. (A grant file is a spec module that gets included by the use_seize_file directive.) * ch-parse.y (struct module *current_module, push_module, pop_module): Support module nesting (for spec modules only). * ch-tree.h (struct module): New. * ch-grant.c (granted_decls): New list of declarations that have been granted into the outermode pseudo-module. * ch-grant.c (decode_mode): If the decl has a name, always write the name, not just if the decl has already been written. Since we write out all decls, we can assume it will be written later, and depend on the forward declaration kludges to catch it. * ch-grant.c (decode_decl): Don't write out _EXTERN. Instead write out standard (Blue Book) quasi-definitions. * ch-grant.c (push_granted): New function. * ch-grant.c (seize_implied_names): New function. Re-write how set element names are seized when a set type is seized. * ch-grant.c (chill_seize): Work by seraching the granted_decls list and copying the declaration. * ch-grant.c (chill_grant): Write all declarations declared in this module. Write GRANT statements for those granted. seize statements for decls seized from other modules. Write extra syntax to make a complete spec module. * ch-grant.c (grant_use_seizefile): Copy use_seize_file directives into grant file. * ch-lex.l (setup_seizefile_read): Call grant_use_seizefile. * ch-lex.l (struct input_state, current_input_state, push_input_file, pop_input_file): New (type, variable, function*2). Used to save and restore state on an input file. * ch-lex.l: Clean up to handle nested input seizefiles (needed by new grant/seize mechanism. * ch-lex.l (skip_to_end_of_directive): New function. * ch-lex.l (compiler_directive: USE_SEIZE_FILE): Make sure we skip to the end of the directive *before* we switch input files. * ch-lex.l (setup_seizefile_read): Prevent reading the same seizefile twice (otherwise likely with new grant/seize). * ch-lex.l: Recognize SPEC. Misc cleanups. * ch-parse.y: Fixed foreward references of types. Removed the unknown_type_node crock. * ch-decl.c: Remove all uses of unknown_type_node. Check for TYPE_SIZE zero instead. * ch-decl.c (fixup_unknown_type): Make sure new mode gets copied into old mode. Merge their variant chains. * c-decl.c (lookup_name_current_level): Make non-static. * ch-decl.c (lookup_name_current_level): No longer needed. * ch-parse.y (call): Allow an implicitly defined function name following the CALL keyword. * ch-tree.h (struct lang_identifier): Add implicit_decl, and make sure order of fields matches c-tree.h. * ch-actions.c (lang_init, build_allocate_memory_call, build_allocate_globals_memory_call): Fix names (add initial '_') and prototypes of _allocate_[global_]memory (2nd param is ref). Use build_chill_function_call, not build_function_call, so the reference parameter gets handled. * ch-actions.c. (lang_init): Make sure boolean_{true,false}_node have boolean_type_node as their types. * ch-actions.c (build_chill_lower, build_chill_upper): Fix to work for arrays with BOOLEAN_TYPE ranges (and simplify some). * ch-except.c: Make sure an end_label is generated, and jump to it if there is no exception. * ch-convert.c (convert_to_reference): Strip off NOP_EXPR casts. * expr.c (expand_expr): Handle NOP_EXPR as Chill-style casts. (Need cleaning up and FSF installation!) * ch-parse.y: If taking the address of a cast, move the ADDR_EXPR inside the NOP_EXPR. * ch-typeck.c (my_build_array_ref): Simplified, more suitable versions of build_array_ref from c-decl.c. (E.g. don't barf if index type is char or bool.) * ch-typeck.c (build_chill_array_ref): Use my_build_array-ref. * ch-typech.c (build_chill_bin_type): New function. Support BIN(N) range type specification. * ch-parse.y (mode2), ch-lex.l: Recognize BIN(N). * ch-tree.h (CH_SIMILAR): Redefine in terms of chill_similar. * ch-typeck.c (chill_similar): New function. Recognize that that range types are similar to their parent types. * ch-tree.h: Declare flag_local_loop_counter. * ch-loop.c: Whether the loop variable is local to the loop in now controlled by flag_local_loop_counter, instead of #ifdef'd on CREATE_SCOPE. * ch-actions.c (lang_decode_option): Recognize flags "-f[no-]local-loop-counter". * toplev.c (lang_options): Add Chill flags -f[no-]local-loop-counter. * varasm.c (make_function_rtl): Due to problems with forward references, don't rename nested functions in Chill. (Kudge!) Sun Mar 28 10:12:45 1993 Ken Raeburn (raeburn@kr-pc.cygnus.com) * ch-lex.l (push_back, readstring): Fix prototypes. Fri Mar 26 18:32:15 1993 Bill Cox (bill@rtl.cygnus.com) * ch-parse.y: Put %type directives back into alpha order. (variant_alternative): Simplify error_mark test. (variantfields, varianthack): Add error_mark checks. Fri Mar 26 13:36:23 1993 Bill Cox (bill@rtl.cygnus.com) * ch-lex.l (convert_charliteral): Rewrite to avoid bogus error msg. * ch-parse.y (get_type_of): Add function to deal with possible fwd declared type name. Call it from lotsa places. Add lotsa checks for error_mark_node. Standardize indentations. Thu Mar 25 15:00:11 1993 Bill Cox (bill@rtl.cygnus.com) * ch-expr.c (chill_expand_assignment): Avoid seg fault while checking for array assignments. * ch-parse.y (action): Add recognition for allocate_memory and allocate_global_memory system calls. (mode2): Remove ill-conceived error check that broke REFs to as-yet-undeclared types. Check for IDENTIFIER_NODE, lookup its DECL if there, pass TREE_TYPE of decl to build_pointer_type. (variantfields, varianthack): Clean up. (variantfield): Check for IDENTIFIER_NODE, lookup its DECL if there, pass TREE_TYPE of decl to grok_fixedfields. (labellist): Explicitly assign error_mark_node to signal error. * ch-typeck.c (chill_compatible): Report FALSE for bad parameters, rather than seg faulting. Thu Mar 25 10:35:58 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (lang_init): build_function_type for allocate_memory and allocate_global_memory runtime routines. Move discrete_type_p into ch-typeck.c. * ch-typeck.c (discrete_type_p): Move here, where it belongs, call it in build_chill_cast. Wed Mar 24 16:25:16 1993 Per Bothner (bothner@rtl.cygnus.com) * ch-grant.c: Don't grant previously seized names. Tue Mar 23 15:25:39 1993 Bill Cox (bill@rtl.cygnus.com) * Makefile.in (ch-actions.o): Add dependencies (expr.h insn-codes.h) * dwarfout.c (fundamental_type_code): Add handling of BOOLEAN_TYPEs, avoid abort. Tue Mar 23 09:03:35 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (build_char_array_expr): Just build a type for the result of a CONCAT_EXPR, and pass the tree back. chill_expand_array_assignment can do a better job of code-generation. * ch-expr.c (chill_expand_array_assignment): Generate the CONCAT_EXPR code. Mon Mar 22 12:42:58 1993 Per Bothner (bothner@rtl.cygnus.com) * ch-except.c (start_handler_array): Make sure the handler array and its type get on the permanent obstack. * ch-grant.c (write_grant_file): Don't write the _INIT=name specifier: It isn't needed, and loses (because of funny characters in the chill_initializer_name). * ch-decl.c (push_synmode): Set TYPE_NAME(mode) = syndecl. * ch-lang.c (finish_chill_enum): Don't allocate a dummy TYPE_DECL for the enum. I don't think it is needed (?), and removing it is needed for the change above. * ch-grant.c (grant_array_type, decode_mode): Remove unused 'decl' parameter. * ch-grant.ch (raw_decode_mode): New function, based on old decode_mode. * ch-grant.c (decode_mode); This is now just a wrapper around raw-decode_mode - but does not call raw_decode_mode if the type is named and has already been emitted. Fri Mar 19 11:55:35 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c: Add prototypes, remove unused variables. Attempt to continue generating grant file in presence of error (Wilfried's patch to lang_finish). * ch-expr.c: Change assign_stack_temp calls so temps get recovered after each statement. Move convert call into chill_expand_assignment from ch-parse.y. * ch-grant.c: Generally re-order, clean up. Include Per's decode_mode simplification. Include commented-out hack in decode_mode to return type's name if type SEIZEd or already GRANTed in this file. * ch-lex.l: Add prototypes. * ch-parse.y (assignaction): Move convert call into chill_expand_assignment. Thu Mar 18 16:04:45 1993 Bill Cox (bill@rtl.cygnus.com) * ch-convert.c (convert): Remove unused variable, fix int_size_in_bytes comparison. * ch-decl.c: Add prototypes, correct error message spelling, remove unused variables. * ch-lang.c (build_chill_range_type): Add error message. Add prototypes. Correct comment spelling. * ch-lex.l: Add prototypes, remove unused variable, put double parens aarround assignment in conditional. * ch-loop.c: Add prototypes, remove unused variable. * ch-parse.y (structured_variable): Return NULL_TREE is invalid WITH parameter is seen, don't count it in structured_variable_list. Pre- vents seg fault when only WITH operand is invalid. * ch-parse.y (label_spec): Correct assignment within IF expression which was intended to be equality test. Remove unused variables. * ch-tree.h: Add prototype. Remove unused EXCP_CODE enumeration, and prototyping editorial comments. * ch-typeck.c: Disable generation of code to validate array index for now. Should be done as a call-back from more generic array_ref code. Clean up parameter checking. Remove unused variables. Fri Mar 12 11:57:32 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (chill_varying_type_p): Return FALSE if given NULL type. * ch-actions.c (build_chill_binary_op): Pass ALL arrays to build_char_array_expr. * ch-convert.c (convert): protect against seg fault, if type == NULL. * ch-expr.c (chill_expand_expr): Add FIXME comment. Fri Mar 12 11:04:02 1993 Bill Cox (bill@rtl.cygnus.com) * ch-expr.c (chill_expand_expr): Completely rethink set unary ops. Thanks very much to dje! Thu Mar 11 21:06:55 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (build_char_array_expr, build_chill_binary_op): Move CONCAT_EXPR handling from binary_op to array_expr. Add handling for relationals between varying arrays to array_expr. Thu Mar 11 19:20:37 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (build_set_expr, build_chill_binary_op): Calculate *BIT* length of powersets and arrays of BOOLs. (invalid_left_operand, invalid_right_operand): Disallow relationals with arrays of BOOL as operands. * ch-convert.c (convert): Test TREE_CODE for ERROR_MARK rather than comparing pointers. * ch-decl.c (push_newmode): Re-indent. * ch-expr.c (chill_expand_expr): Calculate *BIT* length of powersets and arrays of BOOLs. * ch-lang.c (build_chill_array_type): Add parameter error checking. Mon Mar 8 17:13:00 1993 Bill Cox (bill@rtl.cygnus.com) * expr.c (store_constructor): Handle set construction. * varasm.c (output_constant): Prevent seg fault - terminate case alternative with a 'break'. Mon Mar 8 17:13:00 1993 Bill Cox (bill@rtl.cygnus.com) * ch-expr.c (): Move SET_TYPE constructor to expr.c. * ch-loop.c (end_chill_loop): Only do expand_end_loop if not POWERSET loop. * ch-typeck.c (build_chill_cast): Fix error msg spelling. Mon Mar 8 13:16:05 1993 Bill Cox (bill@rtl.cygnus.com) * fold-const.c (fold_convert): Allow CHAR_TYPE CONVERT_EXPR to be folded. Mon Mar 8 10:13:57 1993 Bill Cox (bill@rtl.cygnus.com) * ch-grant.c (get_tag_value): Correctly output certain enumerations. Correct some non-standard indentations. Fri Mar 5 14:58:35 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c: Fix up comment. Thu Mar 4 18:05:43 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c: Define builtin '__nepowerset' and call it - avoid negating the result of calling __eqpowerset. New function discrete_type_p(). * ch-grant.c (get_tag_value): Don't seg fault referring to an anonymous enumeration's name. * ch-lex.l: Turn EVEN token into an ignored compiler directive. * ch-loop.c (end_chill_loop): Output end-of-loop marker. * ch-parse.y (label_spec): redefine variant structure label_spec to agree with the Z.200 spec. (locdec): Error if set/bitstring initialized with a tuple. (case_label, arrayindex): Use new discrete_type_p function. * ch-process.c: Fix typo. Wed Mar 3 14:30:53 1993 Per Bothner (bothner@rtl.cygnus.com) * ch-lang.c, ch-tree.h: Rename build_range_type to build_chill_range_type. Call new build_range_type() in tree.c. * ch-parse.y: Call build_chill_range_type as approriate. * ch-typeck.c (build_chill_cast); Clean up. Wed Mar 3 09:36:56 1993 Bill Cox (bill@rtl.cygnus.com) * ch-parse.y: Define CONTINUE_EVENT token. * ch-parse.y (mode2): Give error message for SYN modea = modeb where modeb is undefined. Tue Mar 2 20:16:37 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c: Add builtin function descriptions for memset and bitsetpowerset. Allow build_chill_num expression to exceed 16 bits, but not 32. * ch-tree.h: Correct chill_handle_case_default prototype. * ch-actions.h, ch-lex.h: Add prototypes. * ch-lex.l, chill.gperf: Add CONTINUE_EVENT token. Thu Feb 25 17:35:46 1993 Bill Cox (bill@rtl.cygnus.com) * c-decl.c (init_decl_processing): Disable creation of C-specific builtin functions. They pollute the CHILL name space. * stor-layout.c (variable_size): Allow variable-size objects at file scope, for CHILL. Fri Feb 26 07:14:34 1993 Bill Cox (bill@rtl.cygnus.com) * c-decl.c (finsh_decl): Don't output non-constant storage size error for CHILL * ch-actions.c: Call build_temporary_variable, fix build_tree_list call in build_chill_cause_exception. * ch-convert.c, ch-expr.c: Use tree_cons to build list's last entry * ch-loop.c (build_temporary_variable): New function * ch-process.c: Call build_temporary_variable, spell start_process correctly. * ch-tree.h: Extern for build_temporary_variable Thu Feb 25 12:09:01 1993 Bill Cox (bill@rtl.cygnus.com) * c-decl.c (init_decl_processing): Disable initial creation of C-specific builtins - they pollute the CHILL name space. * ch-typeck.c (valid_array_index): Correct upper-bound check. * expr.c (expand_expr): Use actual library name for __inpowerset builtin. * stor-layout.c (variable_size): Disable complaint about variable- size type or decl at file scope. Perhaps later this s.b. a warning. * varasm.c (emit_set_data): Add function. (output_constant): Call new emit_set_data function for VAR_DECLs, in addition to CONSTRUCTORs. Thu Feb 25 11:34:36 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c: Change all builtin functions names to their actual library names. Change references to boolean_type_node to references to the TREE_CODE == BOOLEAN_TYPE, to follow the convention. build_set_expr: Remove length parameter, call powersetlen() instead. remove handling of CHAR arrays - they're handled in build_char_array_expr. Call __eqpowerset to test for equality - we can't use a byte-length - need bitcount instead. build_chill_compound_expr, internal_build_compound_expr: Copy from C version that does stuff we don't want. build_binary_op: Check for in_size_in_bytes return < 0, indicating size is changeable at run time. Build two memcpy calls to implement string concatenation. powersetlen: Add function. build_chill_card: Call powersetlen. build_chill_max_min: Common code for powerset max/min. build_chill_length: Move VARYING array handling before regular char array handling. * ch-expr.c chill_expand_expr: Disable concatenate code - we need to the VARYING status of the target to do this correctly. Use powersetlen for the powerset operations, not a byte length. * ch-loop.c: Make CREATE_SCOPE #define to enable creation of a new scope for each CHILL loop, as Z.200 requires. Add powerset and error flags to loop structure. Evaluate user's powerset expression into a temp, scan it destructively with __ffsetclrpowerset or __flsetclrpowerset for powerset loop. Only do loop-end assignments if NOT a powerset loop, which has much less overhead now. * ch-tree.h: Add prototype for powersetlen. Fri Feb 19 08:40:24 1993 Bill Cox (bill@rtl.cygnus.com) * ch-lex.l (convert_number): Evaluate number and pass it as HOST_WIDE_INT. Fri Feb 19 08:56:44 1993 Michael Tiemann (fs_tie at rcsw18) * ch-typeck.c (build_chill_array_ref): Handle newmodes correctly. * ch-actions.c (chill_comptypes): Always initilize ERRSTR if we are going to return 0. * ch-convert.c (convert_to_reference): Don't use TYPE_MAIN_VARIANT, because REFTYPE's type may be a newmode (which must match the type of the expr). * ch-grant.c (chill_seize): Don't let a type be copied just because we are seizing it. * ch-lang.c (finish_chill_enum): Convert TYPE_MIN_VALUE and TYPE_MAX_VALUE to integer type. * ch-loop.c (begin_for_range): Set lp->iter_type based on the tree type of the bounds. (build_loop_top): type of GE_EXPR and LE_EXPR is boolean_type_node, not lp->iter_type. (for_location): Ditto. * ch-action.c (build_chill_lower,build_chill_upper): Handle ENUMERAL_TYPE. Also, handle different kinds of arguments more cleanly. * ch-parse.y (iteration): Convert start_exp and end_exp to match the type of modename. * ch-grant.c (chill_seize_aggr): Search also through anonymous types. * ch-grant.c (chill_seize): Check to see if SEIZEITEM has already been seized, and if so, do nothing. * c-typeck.c (process_init_constructor): If DEFAULT_VALUE comes out error_mark_node, set ERRONEOUS. * ch-actions.c (build_chill_binary_op_1): If EXP is NULL_TREE, don't use it. * ch-action.c (chill_comptypes): Test for structural equivalence of enums. * ch-typeck.c (build_chill_array_ref): Convert INDEX to TYPE_MIN_VALUE of DOMAIN if the types are compatible. * ch-grant.c (chill_seize): If DECLS is a TYPE_DECL for an ARRAY_TYPE, seize the domain type if its a set. Thu Feb 18 20:02:15 1993 Per Bothner (bothner@rtl.cygnus.com) * c-typeck.c (process_init_constructor): Emit error if some array elements are not initialized. * c-typeck.c (process_init_constructor): Call digest_init() recursively to expand default_value. * ch-expr.c (chill_expand_array_assignment): Simplify, and handle the case that the lhs has dynamic size (e.g. a slice). * ch-parse.y (elementlist): Handle the case that tupleelement generates more than one TREE_LIST node. Thu Feb 18 12:40:56 1993 Michael Tiemann (fs_tie@rcvie.co.at) * .cvsignore: add yacc sources, xgcc and stmp-* files. (Bill) * c-typeck.c (lookup_field): add function, calls. * ch-actions.c (build_chill_binary_op): figure return_type differently. * ch-convert.c (convert_to_reference): return error_mark_node, STRIP_NOPS. (convert): Braces for readability. * ch-decl.c (build_chill_function_type): accept typespec as parm. Handle exceptions. (grok_chill_variantdefs): call comptypes, not chill_comptypes. * ch-expr.c (chill_expand_assignment): handle references. * ch-grant.c (chill_seize_set, chill_seize_aggr): new functions * ch-parse.y (structured_variable): check for REFERENCE_TYPE, call convert. Generally handle reference types. Thu Feb 18 09:30:11 1993 Michael Tiemann (fs_tie@rcvie.co.at) * ch-actions.c (chill_comptypes): Figure out which newmode or synmode decls look most canonical. * ch-convert.c (convert): handle location conversions of records, unions and arrays. * ch-decl.c (fixup_unknown_type): changes for variant records * ch-parse.y (tupleelement): avoid confusing digest_init. * ch-typeck.c (build_chill_array_ref): give element ref the type of the ELEMENT, not the array (Bill Cox). Wed Feb 17 11:52:20 1993 Bill Cox (bill@rtl.cygnus.com) * ch-parse.y: change push_newmode and push_synmode interfaces. * ch-actions.c (build_chill_binary_op): convert operands. Wed Feb 17 10:54:24 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (build_chill_binary_op, build_chill_unary_op): handle reference types. * ch-decl.c (push_newmode, push_synmode): rewritten * ch-process.c (make_process_struct): new push_newmode interface. * ch-typeck.c (build_chill_cast): change interface, error checks. Wed Feb 17 09:50:37 1993 Bill Cox (bill@rtl.cygnus.com) * ch-decl.c, ch-parse.y, ch-tree.h: delete old INOUT, OUT parameter code. * ch-typeck.c (valid_array_index): new function. Tue Feb 16 22:36:34 1993 Per Bothner (bothner@rtl.cygnus.com) * ch-convert.c (convert): Slightly more correct conversion for ARRAY_TYPEs (return as OK if CH_COMPATIBLE). * ch-expr.c (chill_expand_array_assignment): Invoke __builtin_memcpy using build_function_call, not directly at the rtx level (which doesn't work). * ch-typeck.c (build_chill_slice): First attempt at slices. * ch-tree.h, ch-typeck.c (build_chill_slice_with_range, build_chill_slice_with_length): New functions. * ch-parse.y: Use new slice-building functions. * expr.c (get_inner_reference): Subtract low bound of array when doing an ARRAY_REF. Tue Feb 16 14:17:55 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (build_chill_function_call): better comments. * ch-decl.c (push_parms): encode OUT, INOUT parms in additional way. * ch-parse.y: indentation cleanup Tue Feb 16 12:03:53 1993 Michael Tiemann (tiemann@cygnus.com) * ch-decl.c (grok_chill_variantdefs): Really implement variant records for CHILL. * ch-grant.c (get_tag_value): New function. * ch-grant.c (decode_mode): Grant variant records. * ch-grant.c (chill_seize): If we seize a set, seize the set values. * ch-lex.l (RETURN_TOKEN): Make this safe to use in if/else constructs. * ch-parse.y (EMPTY): New pseudo-token to disambiguate variant_alternatives. (current_fieldlist): New variable to help processing tag declarations in variant records. (fields): Renamed from structdef. (field): Renamed from fields. (varianthack): New non-terminal to handle parsing ambiguity for variant records. (optlabellist): Changed to preserve CONST_DECLs when they are parsed. * ch-tree.h (TYPE_TAGFIELD): New macro. (TYPE_TAG_VALUES): Ditto. Mon Feb 15 00:49:34 1993 Per Bothner (bothner@rtl.cygnus.com) * ch-grant.c (decode_mode): Fix output for powerset modes. * ch-grant.c (decode_constant): Support grant output of powerset literals. * ch-actions.c (build_chill_binary_op): IN_EXPR fix. * expr.c (expand_expr): Add Chill-specific kludge for BIT_FIELD_REF if operand is SET_TYPE to call runtime function. * ch-expr.c (chill_expand_assignment): Remove no-longer-needed special-case support for a BIT_FIELD_REF in right-hand-side. * ch-lang.c (finish_chill_enum): Patch up enum elements to have the correct type (instead of integers, as in C). * ch-lex.l, ch-parse.y: Add disgusting hack (involving context-dependent look-ahead) so we can parse exception handlers correctly. * c-typeck.c (digest_init): Set output type for SET_TYPEs. * varasm.c (unpack_set_constructor): Add support for (power-)set ranges (i.e. low_element:high_element). Sun Feb 14 13:37:52 1993 Bill Cox (bill@rtl.cygnus.com) * ch-inout.c: delete unused #include * ch-typeck.c (build_chill_slice): turn abort call into error msg. Sat Feb 13 13:13:31 1993 Bill Cox (bill@rtl.cygnus.com) * Makefile.in: Add cc1chill to STAGESTUFF per Eichin's suggestion. Sat Feb 13 12:17:41 1993 Bill Cox (bill@rtl.cygnus.com) * Makefile.in: add lots of header files to the CHILL dependencies Fri Feb 12 15:48:27 1993 Per Bothner (bothner@rtl.cygnus.com) * ch-actions.c (build_chill_function_call): Don't return error_mark_node on empty parameter-list. Fri Feb 12 12:54:52 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (build_chill_function_call): fix start_decl parms. * ch-parse.y (PUSH_ACTION): guarantee to generate an insn! Fri Feb 12 10:32:37 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (build_chill_function_call): create temps, do assignments to handle INOUT and OUT parameters. * ch-decl.c (build_chill_function_type): better parameter name. * ch-parse.y (action): keep rules in alpha order. (pmodearg): turn INOUT, OUT parameter types into reference types. * ch-typeck.c (build_tree_slice): indentation change. Thu Feb 11 23:16:34 1993 Per Bothner (bothner@rtl.cygnus.com) * ch-lex.l (convert_bitstring), Changed SET_TYPE_CONSTRUCTOR to take a list of elements which are in the set. This corresponds better to the tuple input form in Chill (and Pascal). * varasm.c (unpack_set_constructor, pack_set_constructor): New functions, to expand SET_TYPE CONSTRUCTORs. * varasm.c (output_constructor): Use pack_set_constructor to assemble a SET_TYPE constant from a CONSTRUCTOR. * ch-grant.c (decode_constant): Better grant for strings, enumeral, and bitstring constants. * ch-grant.c: Fixes in seize to avoid duplicates, and emit things in the correct order. * c-typeck.c (chill_initializer_constant_valid_p): Kludge needed to export a static function. * ch-typeck.c (convert): Avoid needlessly (and lossingly) calling chill_expand_tuple to convert fix string to varying. * ch-actions.c (build_chill_binary_op): Promote short integer operands if needed (otherwise emit routines barf). * ch-tree.h (SET_WORD_SIZE): New macro. * ch-parse.y: Fix syntax for RECEIVE CASE. * ch-parse.y (location): If IDENTIFIER is a CONST_DECL return its value instead. Thu Feb 11 07:41:45 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (build_chill_max, build_chill_min): clean up * ch-typeck.c (chill_expand_tuple): correct set initialization from an enumeration tuple. Add sort_constructor function. Thu Feb 11 07:41:45 1993 Bill Cox (bill@rtl.cygnus.com) * config/sparc.c (sparc_type_code): handle CHAR_TYPE and BOOLEAN_TYPE w/out an abort. Wed Feb 10 14:59:53 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c: change most integer_type_node references to chill_integer_type_node. Rewrite _max and _min routines, redefine the signatures for those runtime routines. Move empty-set check into runtime. * ch-expr.c, ch-loop.c, ch-process.c, ch-tree.c, ch-typeck.c: change most integer_type_node references to chill_integer_type_node. Tue Feb 9 16:00:05 1993 Per Bothner (bothner@rtl.cygnus.com) * ch-except.c: New file. Stuff for exception handling. * ch-parse.y: Add working exception handling support. * ch-lex.l, ch-parse.y: Prefer standard type terminology (BOOLS, CHARS) even though non-standard (BITS, CHAR) is ok. * ch-grant.c: Fix various problems related to granting types such as bitsets. * ch-tree.c (build_bitstring_type): Set TYPE_MIN_VALUE to distinguish bitstrings from powersets (in the same way we distinguish char strings from char arrays). * ch-tree.h: New macro CH_BOOL_TYPE_P. * ch-tree.h, ch-actions.c (lang_init), ch-grant.c (decode_mode): Undo kludge where integer_type_node was hardwired to 16 bits. Make integer_type_node etc have the same size as in cc1. New types chill_integer_type_node and chill_unsigned_type_node that correspond to the Chill source types INT and UINT. For now, these match the C 'short' types, but that should become a configuration option later, Tue Feb 9 11:41:25 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (build_chill_unary_op): allow NOT of a set. Tue Feb 9 08:27:18 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (build_chill_function_call): add test for too many/few actual parameters (and avoid seg fault). * ch-decl.c (do_decls): code cleanup for readability. * ch-loop.c (begin_chill_loop, end_chill_loop): remove emit_nop() calls - they now (since exceptions) cause seg faults. Make derogation on poor CHILL compiler non-specific. * ch-parse.y (mode2): enable VARYING keyword in CHAR(expr). * ch-tree.h: remove prototypes added to c-tree.h. * ch-typeck.c (build_chill_array_ref): correct getting domain subtree for a PARM_DECL. Subscripting a SET_TYPE is turned into an IN_EXPR. Sun Feb 7 18:20:49 1993 Bill Cox (bill@rtl.cygnus.com) * ch-tree.def: add a new tree type - just for varying array references. We were using ARRAY_REF, but the underlying C code also generates that one. * ch-convert.c, ch-expr.c, ch-typeck.c: use the new tree type. Sun Feb 7 17:33:17 1993 Bill Cox (bill@rtl.cygnus.com) * ch-convert.c: test given type against type of expr before calling chill_expand_tuple. We were getting lots of spurious calls... Fri Feb 5 15:24:01 1993 Per Bothner (bothner@rtl.cygnus.com) * cccp.c: Merge in various Chill-specific changes. * gcc.c (default_compilers array): Pass -lang-chill to cpp, not -lang-ch. Fri Jan 29 17:18:22 1993 Per Bothner (bothner@rtl.cygnus.com) * Makefile.in (install-libchill, install-librmt): Removed. * ch-actions.c (build_chill_exception_decl): Change decl to initialized char array, rather than unitialized common. (Simplifies extracting string name of exception.) * ch-actions.c: Adjust interface to cause_exception accordingly. * ch-typeck.c (build_chill_array_ref): Cause rangefail if index > limit, not >= limit. * ch-actions.c (build_chill_function_call): Rename misleading formal parameter. * ch-decl.c (do_decls): Allow (again) general initializer exprs. * ch-parse.y (call): Test for function call needs to test for FUNCTION_TYPE, not FUNCTION_DECL. nreverse arg list to build_chill_array_ref. * ch-typeck.c (build_chill_array_ref): Do recursive call at end and only if multiple indexes. * ch-typeck.c: Cleanups. Fri Jan 29 11:05:58 1993 Bill Cox (bill@rtl.cygnus.com) * ch-decl.c (do_decls): handle set initializations better, more to do. * ch-loop.c (begin_for_range): correct interface to expand_start_cond and build_binary_op. * ch-tree.h: lots more prototypes * ch-typeck.c (build_array_from_set): added function. * ch-typeck.c (chill_expand_tuple): handle set initializations better. Thu Jan 28 17:41:58 1993 Per Bothner (bothner@rtl.cygnus.com) * ch-grant.c (set_default_grant_file): Change default. Normally, grant file should end up in cwd. * ch-lang.c (build_chill_struct_type): Call pushtag, for the sake of debugging. * ch-lex.l: Improve comment parsing. * ch-lex.l (readstring): Some improvements. Initial support for control sequences in string literals.a Thu Jan 28 16:16:00 1993 Bill Cox (bill@rtl.cygnus.com) * ch-convert.c (convert): correct fixed->varying conversion. * ch-parse.y (mode2): delete unesthetic newline. Thu Jan 28 10:32:55 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c: delete maybe_array_ref() * ch-expr.c (chill_expand_assignment): handle RHS array_ref, delay calling convert(). * ch-lex.l, ch-parse.y, chill.gperf: add keywords, syntax for time supervision actions & builtins * ch-parse.y (call): eliminate optlocarrayidx, call build_chill_slice, smaller actions directly (maybe_array_ref() used to call them). * ch-tree.h: add build_chill_function_call, build_chill_slice * ch-typeck.c: add build_chill_slice() Thu Jan 28 08:44:28 1993 Bill Cox (bill@rtl.cygnus.com) * ch-tree.h: bring up to date with ch-actions.c changes. Wed Jan 27 23:45:20 1993 Bill Cox (bill@rtl.cygnus.com) * ch-expr.c (chill_expand_assignment): handle an RHS varying array reference. Wed Jan 27 22:28:36 1993 Per Bothner (bothner@rtl.cygnus.com) * ch-grant.c (decode_constant): Add REAL_TYPE support. * ch-actions.c (build_chill_exception_decl): New function. * ch-actions (build_chill_cause_exception, cond_exceptions): Convert to take a (char*) parameter (the exception name). * ch-actions.c, ch-expr.c, ch-typeck.c: Convert calls to cond_exception. * ch-parse.y (check_end_label): New function, to check if and end label matches start label. * ch-parse.y: Fix syntax to properly recognize and test optional end labels (using check_end_label). * ch-decl.c (finish_chill_function): Simplify, since we assume check_end_label has already been called. * ch-parse.y: Put in infrastructure for exception handling. Wed Jan 27 15:45:20 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c: delete convert_chill_parameter, replace call with call to convert(). * ch-convert.c (convert): combine chill_give_type_to_expr in here. * ch-decl.c: call convert rather than chill_give_type_to_expr. * ch-expr.c: delete chill_expand_array_assignment, move code to convert. * ch-expr.c (chill_expand_assignment): just call convert. * ch-loop.c (end_chill_loop): expand the end of the loop for a do while. * ch-parse.y: call convert rather than chill_give_type_to_expr. * ch-process.c: checkpoint. * ch-typeck.c: delete chill_give_type_to_expr, call convert instead. Wed Jan 27 15:45:20 1993 Bill Cox (bill@rtl.cygnus.com) * ch-grant.c (grant_array_type): new function to allow handling of VARYING array types. Wed Jan 27 15:45:20 1993 Bill Cox (bill@rtl.cygnus.com) * ch-typeck.c (chill_give_type_to_expr): fix typo. Reorder to avoid checking types on CONSTRUCTORs. Correct typo. * ch-expr.c (expand_assignment_to_varying_array): use proper expansion function expand_expr_stmt. * ch-expr.c (expand_chill_assignment): only convert VARYING array refs or RHS. Wed Jan 27 15:32:21 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (build_chill_length, build_chill_lower, build_chill_upper): accept parameters, too. * ch-expr.c (chill_expand_assignment): decipher ARRAY_REF on RHS. * ch-typeck.c (chill_give_type_to_expr, build_chill_array_ref): assign proper type to ARRAY_REF expression. Wed Jan 27 09:51:46 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c (build_chill_binary_op): delete unused variable, get set's base type from TYPE_DOMAIN rather than TREE_TYPE. * ch-actions.c (build_chill_repetition_op): handle differently-built declaration trees. * ch-loop.c (begin_for_set): adapt to new powerset declaration tree. * ch-typeck.c (chill_give_type_to_expr): give type to constructor Tue Jan 26 11:32:38 1993 Bill Cox (bill@rtl.cygnus.com) * ch-parse.y (ifaction): re-add lost call to expand_end_code(). * ch-parse.y (siezelist, grantlist): use 'name' rather than 'checked_name'. It makes no sense to check sieze/grant names for WITH expansion. * ch-expr.c (chill_expand_expr): delete unnecessary (and seg-fault-causing) code. * ch-expr.c (chill_expand_assignment): make test for varying array on the LHS more specific. * ch-actions.c (invalid_left_operand, invalid_right_operand): error for use of MOD, REM operators. * ch-actions.c (build_chill_repetition_op): error for bit-field initializers (which will get handled in the lexer). Mon Jan 25 17:26:47 1993 Bill Cox (bill@rtl.cygnus.com) * ch-typeck.c (build_chill_array_ref), * ch-expr.c (chill_expand_expr, chill_expand_assignment): translate varying array ref into ARRAY_REF, defer processing until chill_expand_expr. Update array's length field in new function expand_assignment_to_varying_array. Mon Jan 25 14:57:24 1993 Bill Cox (bill@rtl.cygnus.com) * ch-parse.y (mode2): eliminate old method to mark varying arrays. * ch-expr.c (expand_varying_length_assignment): repair scaling of RHS expression. Mon Jan 25 11:44:21 1993 Per Bothner (bothner@cygnus.com) * ch-parse.y: Allow character and bitstring literals in string repetition operator. Sat Jan 23 14:18:11 1993 Per Bothner (bothner@cygnus.com) * ch-parse.y (primval): Re-recognize '(' expr ')'. * ch-parse.y (name): Remove call to check_identifier - this is not appropriate in certain contexts. * ch-parse.y (checked_name): Same as , but *with* the call to check_identifier. Use where appropriate. * ch-parse.y (operand5): Only allow string repetition of string literals, because otherwise you get a conflict. Thu Jan 21 16:32:39 1993 Bill Cox (bill@rtl.cygnus.com) * ch-actions.c, ch-parse.y, ch-process.c, ch-tree.h: sync modules, continue start_process development. Thu Jan 21 13:51:06 1993 Bill Cox (bill@rtl.cygnus.com) * ch-decl.c (do_decl): fix handling of multi-char initializer. Thu Jan 21 13:14:00 1993 Bill Cox (bill@rtl.cygnus.com) * .cvsignore: add CHILL files to be ignored Thu Jan 21 07:38:57 1993 Bill Cox (bill@cygnus.com) * ch-parse.y: rough draft of start_process handling. Wed Jan 20 17:11:05 1993 Bill Cox (bill@rtl.cygnus.com) * ch-inout.c: fix mismatch with readtext proto in ch-tree.h. Wed Jan 20 16:48:13 1993 Bill Cox (bill@rtl.cygnus.com) * ch-tree.h, ch-process.c, ch-inout.c, Makefile.in: create new modules for I/O and process-related stuff. * ch-actions.c: move routines to new modules. call xmalloc, not malloc. * ch-lang.c (build_chill_struct_type): add parameter checking. * ch-lex.l (init_lex): remove redundant cast. Tue Jan 19 16:33:56 1993 Bill Cox (bill@rtl.cygnus.com) * ch-parse.y (operand5): delete unnecessary argument to build_chill_unary_op. Add rule for string repetition. * ch-parse.y (primval): delete string repetition attempt. * ch-parse.y (start_process): rough draft of action. * ch-actions.c (build_repetition_op): add it * ch-actions.c (build_chill_binary_op): handle constant arguments of CONCAT_EXPR, combine into a single string if possible. * ch-actions.c (invalid_left_operand, invalid_right_operand): allow single character arguments to CONCAT_EXPR. * ch-tree.h: add prototype for build_repetition_op Tue Jan 19 15:03:29 1993 Fred Fish (fnf@cygnus.com) * dwarfout.c (output_type): Add hack that matches the one in the chill front end to distinquish between true string types and arrays of char, since it uses ARRAY_TYPE for both, rather than trying to use the existing support for STRING_TYPE. Tue Jan 19 13:54:27 1993 Bill Cox (bill@rtl.cygnus.com) * ch-tree.h: added prototypes for all non-static CHILL functions. * ch-actions.c (lang_init): declare builtin type for start_process * ch-actions.c (build_chill_binary_op): combine string literals when concatenated. * ch-actions.c (formpars2struct): added for later start_process implementation. * ch-actions.h: remove un-needed function declarations. * ch-decl.c: extern cleanup. * ch-expr.c (chill_expand_array_assignment): add missing first parameter to cond_exception call. * ch-lex.l: make build_chill_string non-static. Mon Jan 18 19:15:08 1993 Bill Cox (bill@rtl.cygnus.com) * ch-decl.c (do_decls): get varying array length initialized. Mon Jan 18 09:51:43 1993 Bill Cox (bill@rtl.cygnus.com) * ch-expr.c (chill_expand_array_assignment): fix the copy length in the memcpy call (it was just 4 bytes always). Simplify some code, also. Mon Jan 18 08:24:21 1993 Bill Cox (bill@rtl.cygnus.com) * ch-decl.c (do_decls): change CH_VARYING_TYPE_P to function. Mon Jan 18 08:00:11 1993 Bill Cox (bill@rtl.cygnus.com) * ch-lex.l, ch-parse.y: make BOOLS synonymous with BIT and CHARS synonymous with CHAR, in the lexer. Delete unnecessary 'bools' non-terminal. * ch-parse.y (assignaction): add lhs version of length() function * ch-actions.c: add builtin_concat function, lots of support for CONCAT_EXPR. * ch-actions.c, ch-tree.h: make a function out of former macro CH_VARYING_TYPE_P * ch-expr.c: add expand_varying_length_assignment (). * ch-expr.c (chill_expand_expr): add CONCAT_EXPR support. * ch-expr.c (chill_expand_array_assignment): call emit_library_call rather than build_rts_call, to eliminate a recursion problem. * ch-lang.c: eliminate 'sorry' about varying arrays. * ch-typeck.c (validate_varying_array_ref): re-enable constant index validation. Sun Jan 17 18:20:04 1993 Per Bothner (bothner@cygnus.com) * ch-grant.c, ch-lex.l: Major simplification of how seizes are done and how seizefiles are read. * ch-actions.h: Remove declaration of check_seize(). * ch-decl.c (do_decls): Handle READONLY types. * ch-parse.y (mode2): Allow REF to be followed by any mode. * ch-parse.y (mode2): Allow literal expressions in string length. * ch-parse.y (tupleelement): Allow elemenst to be untyped_expr. * ch-parse.y (seizestatement, etc): Call chill_seize each time something is seized, rather than building a list first. Sat Jan 16 12:24:44 1993 Bill Cox (bill@rtl.cygnus.com) * chill.gperf, ch-hash.h: add Wilfried's tokens * ch-lex.l: fold in Wilfried's changes. Some tokens weren't getting recognized, and INSTANCE wasn't correctly reported to ch-parse.y as a PREDEF_MODEDCL. Thu Jan 14 15:02:39 1993 Per Bothner (bothner@cygnus.com) * ch-tree.h (CH_CHARS_TYPE_P): New macro. Add comment explaining difference between char strings and char arrays. * ch-tree.h (CH_STRING_TYPE_P): Add FIXME re bitstrings. * ch-tree.c (build_string_type): Add comment. Wed Jan 13 15:19:15 1993 Per Bothner (bothner@cygnus.com) * calls.c, expr.c, function.c, stmt.c, varasm.c: Set MEM_IN_STRUCT_P for SET_TYPE where it is set for other aggregates * expmed.c (store_bit_field, extract_field_field): Undo yesterday's removal of MEM_IN_STRUCT_P "sanity test". * ch-decl.c (do_decls): Put back support for initializing. (Was accidentally removed in Jan 8 change.) Wed Jan 13 14:13:11 1993 Jim Wilson (wilson@sphagnum.cygnus.com) * ch-lex.l (convert_bitstring): Correct typo in cast. Tue Jan 12 20:29:08 1993 Per Bothner (bothner@cygnus.com) * ch-lex.l (convert_bitstring): Change to pack bits within words, not bytes, and to use machine bit-order (not always little-endian). * ch-parse.y: Allow BOOLS(n) as well as BITS(n). Use build_bitstring_type, not build_string_type. * expmed.c (store_bit_field, extract_field_field): Remove "sanity test" that prevents use with SET_TYPE. * tree.c (build_bitstring_type, build_powerset_type, build_string_type): Move (so far) Chill-specific functions to ... * ch-tree.c: ... new file. * ch-tree.c (build_powerset_type, build_bitstring_type): Re-write. * ch-typeck.c (build_chill_array_ref): Handle bit strings better. * ch-typeck.c (chill_expand_tuple): Kludge to handle SET_TYPE. * Makefile.in (CHILL_OBJS): Add ch-tree.o. * ch-decl.c (do_decls): Call expand_decl. * stor-layout.c (layout_type): Handle SET_TYPE. * expr.c (expand_expr): Add FIXMEs about IN_EXPR. * ch-actions.c (lang_init): Add type and decl for new function __builtin_setbitinstring. * ch-expr.c (chill_expand_assignmment): Special-case handling for BIT_FIELD_REF with non-constant bit position (which is not yet handled by expand_expr). * ch-convert.c (convert): Handle SET_TYPE. Tue Jan 12 12:49:13 1993 Fred Fish (fnf@cygnus.com) * chill: If -B arg is given, use to find gcc. Fri Jan 8 20:21:43 1993 Bill Cox (bill@rtl.cygnus.com) * ch-decl.c: revert to avoid seg fault Fri Jan 8 14:20:42 1993 Bill Cox (bill@rtl.cygnus.com) * ch-decl.c: fix storage into correct offset in varying array. * ch-actions.c: define sizetype for everyone, use it to build varying structure. * ch-parse.y: tiny cleanup. Wed Jan 6 13:25:33 1993 Bill Cox (bill@cygnus.com) * modules: use gdb rather than naked-gdb, to get opcodes in chill definition. Wed Jan 6 09:48:35 1993 Bill Cox (bill@cygnus.com) * ch-typeck.c: add code to handle references to elements of VARYING arrays. Simplify chill_give_type_to_expr. Add rough draft of run- time index checking for VARYING arrays (under #if 0). * ch-actions.c: new function cond_type_range_exception & calls. New function cond_range_exception, for more general range-checking. New function build_varying_struct, to do just that. Use the macros for the special varying field names. * ch-tree.h: define macros for varying field names. * ch-expr.c: use macros for varying struct names. Simplify chill_expand_array_assignment. * ch-parse.y: assure that build_varying_struct is called everywhere that it applies. Add a line-number note before the body of a DO loop. * ch-loop.c: #ifdef out creation of new scope for DO loop body. Tue Jan 5 17:26:14 1993 Bill Cox (bill@cygnus.com) * c-decl.c: correct order of declaration of start_decl params, for readability. Tue Jan 5 15:59:36 1993 Per Bothner (bothner@cygnus.com) * ch-grant.c (still_start_module_code), ch-parse.y (procedure): Move shared code into ... * ch-decl.c (start_chill_function): ... here. * ch-decl.c (start_chill_function): Add missing call to expand_start_bindings. * ch-decl.c (finish_chill_function): Add missing call to expand_end_bindings. Tue Jan 5 01:00:47 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * Makefile.in: took out the rest of the runtime support Mon Jan 4 18:02:06 1993 Bill Cox (bill@cygnus.com) * ch-expr.c: make chill_expand_array_assignment not static. Mon Jan 4 17:57:48 1993 Per Bothner (bothner@cygnus.com) * ch-grant.c, ch-parse.y: Remove all code for explicitly calling initializer functions. This is not needed, since we use the same mechanism used for C++ static constructors. * ch-grant.c (chill_start_module_code): Make sure the init_name starts with the magic string also used for C++ initializers. Also, don't embed the file name in the name, just use the module name. * ch-grant.c (chill_finish_module_code): Now that the initializer name follows the standard 'collect' convention, don't need to call assembler_constructor_alias, but can use the standard assemble_constructor instead. * varasm.c (assemble_constructor_alias): Remove no-longer- needed function. * ch-parse.y: Move code that is common to the beginning of all functions to a new macro INIT_ACTION. Make sure INIT_ACTION is also done for callaction, fixing a bug. * ch-parse.y (INIT_ACTION): Do chill_start_module_code() before emit_line_note(), not after. Mon Jan 4 11:43:12 1993 Bill Cox (bill@cygnus.com) * ch-parse.y: restore requirement for :upper-bound in array decl. * ch-actions.c: enhance upper, lower, length functions for VARYING. Mon Jan 4 09:28:44 1993 Bill Cox (bill@cygnus.com) * ch-actions.c: fix NOT of boolean expr. Mon Jan 4 08:42:57 1993 Bill Cox (bill@cygnus.com) * ch-actions.c: provide range-checking function * ch-lex.l: better compiler-directive error messages, allow underscores in exponents * ch-loop.c: prevent passing NULL ptr to printf Sun Jan 3 11:57:13 1993 Bill Cox (bill@cygnus.com) * ch-typeck.c: correct & enable array index range-checking Sun Jan 3 11:36:39 1993 Bill Cox (bill@cygnus.com) * ch-parse.y: define IGNORED_DIRECTIVE * ch-typeck.c: subtract array's lower domain value, even if index expression is constant. Sat Jan 2 23:05:14 1993 Fred Fish (fnf@cygnus.com) * ch-lex.l (convert_float): Fix misspelling in error message. Sat Jan 2 16:02:16 1993 Per Bothner (bothner@rtl.cygnus.com) * Makefile.in: Took out chill-runtime support. Chill run times are now in ../chillrt, not ./chillrt.p Sat Jan 2 15:04:13 1993 Bill Cox (bill@cygnus.com) * ch-hash.h, chill.gperf: cleanup. fewer keywords seen by ch-parse.y. Sat Jan 2 13:27:49 1993 Per Bothner (bothner@rtl.cygnus.com) * ch-lex.l (check_newline): Use the orginal versions (derived from the C code, not the simplified, special-case version). Also, fix that version of check_newline to not call yylex() recursively. * ch-lex.l (yy_input): Call check_newline to handle newlines and check for # directives. * ch-lex.l (syntax): Don't recognize #-directives; these are now handled by check_newline. * ch-actions.c (lang_init): Call the modified version of check_newline(). Do this at the *after* we've initialized standard types, so this can be done while lineno is still 0. Sat Jan 2 10:57:20 1993 Bill Cox (bill@cygnus.com) * ch-hash.h, chill.gperf: add remaining reserved words. Sat Jan 2 09:59:55 1993 Bill Cox (bill@cygnus.com) * ch-tree.h, ch-parse.y, ch-lex.l: add remaining reserved words, names for exceptions Fri Jan 1 12:30:31 1993 Fred Fish (fnf@cygnus.com) * ch-tree.h (JOINER): Define joiner character the same way C++ defines it. * ch-grant.c (chill_start_module_code): Use JOINER character to implement name mangling for the initializer function name. Algorithm is designed to be simple, distinct from C++ mangled symbols, and easy to convert to demangled form. Thu Dec 31 10:30:51 1992 Bill Cox (bill@rtl.cygnus.com) * ch-expr.c: make array assignments work with indirect refs. * ch-actions.c: prepare for array parameter handling. * ch-loop.c, ch-parse.y, ch-tree.def, ch-typeck.c: clean up. Thu Dec 31 15:29:20 1992 Per Bothner (bothner@rtl.cygnus.com) * ch-lex.l (yy_input): Re-write to return more than one character at a time (execpt when reading seize-files). Don't increment lineno until we start reading the next line. This fixes some off-by-one errors in lineno. Wed Dec 30 16:15:23 1992 Per Bothner (bothner@rtl.cygnus.com) * ch-convert.c: Assume use of new common.c. * ch-convert.c (convert_to_reference, convert_from_reference): New routines, to handle loc-identity declared variables and LOC parameters (both of which are implemented as references). * ch-lang.c (convert_to_boolean, convert_to_char): Move to ch-convert.c, where they would seem to belong. * ch-convert.c (convert): New function, since we no longer link in c-convert.c. * ch-expr.c (chill_expand_assignment): Handle by calling convert() instead of chill_comptypes(). Also handle the LHS being a reference. * ch-parse.y: Add a procedure call as an action. * ch-parse.y (locdec, optlocinit): Move handling of loc-identity declarations from optlocinit to locdec - and add working semantics for it. * ch-parse.y (seizestatement, visibilty_stmt): Simplify. * ch-parse.y (grantstatement etc): Don't bother making list. * ch-lex.l: #include before . Wed Dec 30 16:06:55 1992 Bill Cox (bill@rtl.cygnus.com) * ch-parse.y, ch-expr.c: add support for declaring & assigning VARYING arrays. * ch-typeck.c: allow VARYING structures in assign_type_to_expr. Tue Dec 29 15:28:48 1992 Bill Cox (bill@cygnus.com) * ch-actions.c: implement expressions of arrays of char, ( concatenation, relationals ), correct type of code parameters * ch-expr.c: correct type of code parameters Tue Dec 29 11:16:19 1992 Bill Cox (bill@cygnus.com) * ch-decl.c: cleanup. * ch-parse.y: put emit_line_note() calls in lotsa places, per Fred's request; be sure that statements get counted also. * ch-lex.l: standardize function headers. Tue Dec 29 10:41:56 1992 Fred Fish (fnf@cygnus.com) * ch-decl.c (start_chill_function): Always return 1, rather than a random value. * ch-lex.l (check_newline): Add a version for chill that just snarfs the right value for main_input_filename out of the first line of the input file, without disturbing the lexer state or requiring it's assistance. * ch-actions.c (lang_init): Call check_newline, like the other language frontends, to get main_input_filename set from first line of input file. Mon Dec 28 18:49:01 1992 Bill Cox (bill@cygnus.com) * ch-parse.y: clean up conflicts. The remaining one is harmless. Mon Dec 28 17:28:40 1992 Bill Cox (bill@cygnus.com) * ch-parse.y, ch-lex.l, ch-actions.c: add stubs for I/O, clean up some parser conflicts. Mon Dec 28 15:00:20 1992 Bill Cox (bill@cygnus.com) * ch-parse.y, ch-lex.l: add keywords and parsing for most of CHILL I/O Sat Dec 26 20:48:23 1992 Fred Fish (fnf@cygnus.com) * chillrt/chillrt0.c: Oops, SVR4 doesn't need leading '_' on build_exceptions. Sat Dec 26 11:00:36 1992 Fred Fish (fnf@cygnus.com) * ch-grant.c (chill_finish_module_code): Call assemble_constructor_alias rather than assemble_constructor. * varasm.c (assemble_constructor_alias): New function, like assemble_constructor, but also handles the case where ASM_OUTPUT_CONSTRUCTOR is not defined and GNU ld is not being used. Emits a symbol table alias name with the correct prefix for collect to find and add to the __CTOR_LIST__. * chillrt/chillrt0.c: Build on previous hack that gets _build_exceptions into the __CTOR_LIST__, to make it work for both the non GNU-ld case and for the SVR4 case. Tue Dec 22 18:24:55 1992 Bill Cox (bill@cygnus.com) * ch-loop.c: clean up location enumeration - one more pass to do. Tue Dec 22 16:31:48 1992 Bill Cox (bill@cygnus.com) * ch-loop.c: Working version of location enumeration loop Tue Dec 22 14:42:14 1992 Bill Cox (bill@cygnus.com) * ch-lex.l: readability cleanup Mon Dec 21 14:58:39 1992 Bill Cox (bill@cygnus.com) * ch-parse.y, c-decl.c: Add Jukka's Pascal WITH code. ch-loop.c: rough draft of location enumeration ch-lex.l, ch-expr.c, ch-decl.c: minor cleanup ch-actions.c: finish making pred() and succ() work. Mon Dec 21 10:04:35 1992 Bill Cox (bill@cygnus.com) * ch-actions.c: allow pred(char) and succ(char). Sun Dec 20 16:04:28 1992 Bill Cox (bill@cygnus.com) * ch-expr.c, ch-actions.c, ch-parse.y, ch-loop.c, c-expr.c: make DO WITH work. Sun Dec 20 12:22:53 1992 Bill Cox (bill@cygnus.com) * ch-loop.c, ch-actions.c, ch-typeck.c: powerset loops now work Sat Dec 19 14:20:23 1992 Per Bothner (bothner@cygnus.com) * c-typeck.c (process_init_constructor): Add warning if there is a duplicate default initializer element. * ch-typeck.c (chill_give_type_to_expr): New function, to handle coercion of an expression to context-given type, Takes care of untyped tuples, and case expressions. * ch-decl.c (do_decls), ch-typeck.c (chill_expand_return, chill_expand_result), ch-parse.y : Use chill_give_type_to_expr(). * ch-typeck.c (chill_handle_case_label): New parameter list, to handle the (new) conventions for , including default elements and ranges. * ch-parse.y , ch-typeck.c (expand_case_expr): Use new version of chill_handle_case_label. * ch-decl.c (push_syndecls): Change parameters: Instead of TREE_LIST representing a compete , just pass the parts of a single as 3 different parameters. Also, use chill_give_type_to_expr(), to handle untyped tuples in the RHS. * ch-parse.y : Don't bother trying to construct a tree - just call push_syndecls() on each as we see it. * ch-parse.y (exprlist_get_single): Remove; no longer needed. * ch-parse.y: Handle without mode name diferently from with mode name. The latter is a that can be in most contexts, but if the is missing, the is only allowed in certain contexts. Use the new non-terminal to indicate those contexts where untyped tuples (and case expressions) are valid because the expression gets a type from its context (such as the RHS of an assignment). Use chill_give_type_to_expr in those contexts. Sat Dec 19 14:01:26 1992 Bill Cox (bill@cygnus.com) * ch-actions.c, ch-loop.c, Makefile.in: looping stuff. Sat Dec 19 10:16:20 1992 Bill Cox (bill@cygnus.com) * ch-parse.y: clean up warning messages from byacc. bison still complains thrice. Fri Dec 18 12:33:29 1992 Michael Tiemann (tiemann@rtl.cygnus.com) * ch-actions.c (maybe_chill_comptypes): Delete unused function. (chill_comptypes): Add new parameter ERRSTR. All callers changed. (build_chill_binary_op): Fix indentation to match GNU coding style. Fri Dec 18 08:18:13 1992 Bill Cox (bill@rtl.cygnus.com) * ch-parse.y, ch-expr.c, ch-actions.c, expr.c: major cleanup of expression and assignment handling. Thu Dec 17 10:16:32 1992 Bill Cox (bill@cygnus.com) * ch-parse.y: standardize indentation after c-parse.y Wed Dec 16 15:22:12 1992 Per Bothner (bothner@cygnus.com) * c-typeck.c (process_init_constructor): Add support for a default initializer element. * ch-parse.y: Implement default elements for tuples (as in '(else):' and '(*):' ). * ch-parse.y: Previous change to dis-ambiguate case-labels seems to have allowed getting rid of all of the expr_or_list hair. * ch-decl.c (do_decls): Undo Tiemann's change to "Handle initialization of multiple variables by a tuple" - the idea is bogus. Wed Dec 16 11:17:53 1992 Bill Cox (bill@cygnus.com) * ch-parse.y: complete re-write of DO statement handling. now operational, except WITH is stubbed out. Improved syntax error message. * ch-actions.c: DO support: high_domain_value(), low_domain_value (). * ch-expr.c: fixes to IN_EXPR handling. Tue Dec 15 17:15:13 1992 Jim Wilson (wilson@sphagnum.cygnus.com) * ch-grant.c: Add casts to alloca return to avoid compiler warning. * ch-lex.c: Likewise. * Makefile.in (ch-lex.c): Delete incorrect free declaration added by flex to avoid compiler error. Tue Dec 15 08:41:08 1992 Michael Tiemann (tiemann@rtl.cygnus.com) * ch-decl.c (do_decls): Handle initialization of multiple variables by a tuple. * ch-decl.c (do_decls,start_chill_function): Make DECL public if we're doing a GRANT ALL at top level. * ch-lang.c (build_range_type): Deal with typecast to CHAR in range expression. * c-typeck.c (digest_init): SET_TYPE is not a scalar type. BOOLEAN_TYPE and CHAR_TYPE are scalar types. Mon Dec 14 14:58:32 1992 Michael Tiemann (tiemann@rtl.cygnus.com) * ch-lex.l (get_chill_{linenumber,filename}): New functions. (convert_number): Use LONG_TYPE_NODE instead of INTEGER_TYPE_NODE. Mon Dec 14 13:36:44 1992 Bill Cox (bill@cygnus.com) * expr.c: install and test newer Pascal IN_EXPR code, but don't activate it - it's very verbose. Mon Dec 14 00:22:49 1992 Fred Fish (fnf@cygnus.com) * Makefile.in (LANGUAGES): Add chill. * Makefile.in (CHILL_INSTALL_NAME, CHILL_CROSS_NAME): New macros for chill native and cross installation names. * Makefile.in (COMPILERS): Add cc1chill. * Makefile.in (CHILL_OBJS): New macro, chill objects. * Makefile.in (CHILL_TREE_H): New macro, chill headers. * Makefile.in (CHILL, chill, cc1chill, chill-runtime, libchill.a, sublibchill.a, ch-parse.o, ch-parse.c ch-*.o, install-libchill, install-librmt): New targets. * Makefile.in (install-native): Add install-libchill, install-librmt. Sun Dec 13 15:21:06 1992 Bill Cox (bill@cygnus.com) * ch-actions.c, ch-expr.c: Fix the pop-count in library calls. Sun Dec 13 14:07:32 1992 Bill Cox (bill@cygnus.com) * ch-actions.c: fix unary operations, modulus ops, (discovered after extending regression tests). Sun Dec 13 12:16:32 1992 Bill Cox (bill@cygnus.com) * resync with Michael and Wilfried Sun Dec 13 09:11:25 1992 Michael Tiemann (tiemann@rtl.cygnus.com) * ch-parse.y (output_constant): Fixed some whitespace problems. * ch-tree.h: Add declarations for new chill functions that have been implemented but not (yet) declared. Sat Dec 12 00:17:23 1992 Per Bothner (bothner@cygnus.com) * c-typeck.c (process_init_constructor): Warn about duplicate labels for labelled initializer elements. * ch-lex.l (various operator tokens, such as "+"): Don't set yylval.code to a TREE_CODE; this is better done in parser. * ch-parse.y: Some work with case labels and tuples. Get literal range as tuple (and case) labels working. Fix some problems introduced by recent grammar overhaul. Fri Dec 11 13:28:48 1992 Bill Cox (bill@cygnus.com) * ch-actions.c, ch-parse.y ch-tree.h ch-expr.c, ch-typeck.c: got long, real expressions working. We can also call a func- tion and use its return value. Thu Dec 10 14:45:17 1992 Per Bothner (bothner@cygnus.com) * ch-parse.y: Major change to remove or at least identify parser ambiguities. One result: We now allow actions that start with '(', as required by teh Blue Book. This does break some things; look for FIXME for things that need work. * ch-typeck.c (chill_expand_case_expr): We need an extra level of looping to (in the future) support s with more than one . Thu Dec 10 09:21:41 1992 Bill Cox (bill@cygnus.com) * ch-actions.c, ch-expr.c: Implement string assignments and relationals. Thu Dec 10 07:17:35 1992 Bill Cox (bill@cygnus.com) * ch-decl.c, ch-typeck.c: rest of previous commit. Wed Dec 9 18:26:29 1992 Bill Cox (bill@cygnus.com) * ch-parse.y, ch-actions.c, ch-expr.c: redo type checking. regression test and fix bit arrays and set ops. Mon Dec 7 14:57:46 1992 Bill Cox (bill@cygnus.com) * ch-actions.c: implement crude relationals between non-exotic operands, such as integers. Mon Dec 7 10:42:35 1992 Bill Cox (bill@cygnus.com) * ch-actions.c: implement relational, logic operations on arrays of BOOLs. Mon Dec 7 08:55:20 1992 Michael Tiemann (tiemann@rtl.cygnus.com) * ch-actions.c (lang_init): Set LINENO to 1 at beginning to indicate we are done with initialization. * ch-decl.c (do_decls): Set TREE_PUBLIC if we are doing a `grant all'. (start_chill_function): Ditto. * ch-lex.c (convert_bitstring): Set TREE_CONSTANT. (compiler_directive): Don't confuse compiler directives with equality comparison operators. * ch-parse.y: Clear CURRENT_LOCNAMELIST after calling do_decls. Sun Dec 6 13:12:32 1992 Bill Cox (bill@cygnus.com) * ch-actions.c: repair set inequality code. Sun Dec 6 11:15:59 1992 Bill Cox (bill@cygnus.com) * ch-parse.y, ch-actions.c, ch-expr.c: Implement set-oriented relational expressions, including (<, <=, =, /=, >, >=, IN). Fri Dec 4 13:54:58 1992 Brendan Kehoe (brendan@lisa.cygnus.com) * tree.def: Move CARD_EXPR and SET_LE_EXPR back down with the other Pascal-required ones, since C++ no longer needs them. When Chill's public, a comment can be added to the effect that SET_LE_EXPR is also used by Chill. Fri Dec 4 12:05:01 1992 Bill Cox (bill@cygnus.com) * Restore CARD_EXPR and SET_LE_EXPR to tree.def. Fri Dec 4 10:23:10 1992 Bill Cox (bill@cygnus.com) * Get *.def and *.c in sync. Fri Dec 4 06:48:41 1992 Fred Fish (fnf@cygnus.com) * ch-actions.c (lang_init): Change types "long" and "ulong" from 16 bits to 32. * dwarfout.c (fundamental_type_code): Use FT_signed_char for type "byte" and FT_unsigned_char for type "ubyte". Thu Dec 3 15:13:24 1992 Bill Cox (bill@cygnus.com) * ch-actions.c, ch-tree.def, ch-parse.y: preparation for powerset expressions. Tue Dec 2 17:02:30 1992 Bill Cox (bill@cygnus.com) * ch-actions.c: sketch code for exceptions generated by builtin routines. Tue Dec 2 12:49:50 1992 Bill Cox (bill@cygnus.com) * ch-actions.c, ch-parse.y: add support for lower() upper() builtin functions. Wed Dec 2 12:03:30 1992 Fred Fish (fnf@cygnus.com) * Makefile.in (chillrt0.o, install-chillrt0): Remove. * chill (library): Remove chillrt0.o. * chillrt/Makefile: Remove maintenance of chillrt0.o as a separate file. Now gets put in libchill.a. Tue Dec 2 10:100:20 1992 Bill Cox (bill@cygnus.com) * ch-parse.y, ch-actions.c: add support for num() builtin function. Wed Dec 2 09:52:06 1992 Michael Tiemann (tiemann@rtl.cygnus.com) * ch-decl.c (fixup_unknown_type): New function. (push_newmode,push_synmode): Call `fixup_unknown_type' when we see a declaration that uses `unknown_type_node'. FIXME. * ch-grant.c (decode_constant): New function. (decode_decl): Call `decode_constant' for CONST_DECLs. * ch-lex.l (char action): Use ridpointers instead of lookup_name to get "char"'s declaration. * ch-parse.y: Call `build_lang_decl' instead of `build_decl' when we need to build a TYPE_DECL. Tue Dec 2 09:44:05 1992 Bill Cox (bill@cygnus.com) * ch-typeck.c: clean up a gcc warning with a forward declaration of build_string_type. Tue Dec 1 16:51:05 1992 Bill Cox (bill@cygnus.com) * ch-actions.c: completely remove those builtin calls that are duplicated in c-decl.c Tue Dec 1 16:38:51 1992 Fred Fish (fnf@cygnus.com) * ch-actions.c (lang_init): Ifdef out initializations for __builtin_abs and __builtin_fabs, since they are duplicates of initializations in c-decl.c, and trigger spurious warnings. Tue Dec 1 16:35:18 1992 Bill Cox (bill@cygnus.com) * ch-parse.y: make size() work with a typename argument. Tue Dec 1 16:15:56 1992 Bill Cox (bill@cygnus.com) * ch-parse.y, ch-lex.l, ch-actions.c: add builtin functions min, max, card. Tue Dec 1 12:35:56 1992 Bill Cox (bill@cygnus.com) * ch-lex.l: fix char-type Tue Dec 1 11:10:56 1992 Bill Cox (bill@cygnus.com) * ch-parse.y, ch-actions: added parsing and processing for upper, lower, and length built-ins. Tue Dec 1 09:40:49 1992 Fred Fish (fnf@cygnus.com) * dwarf.h (LANG_CHILL): Add as GNU extension. * dwarfout.c (output_compile_unit_die): Test language_string and set LANG_CHILL if appropriate. * ch-parse.y (language_string): New for chill. * chillrt: Renamed directory chill to chillrt. * chill: Renamed chillsh to chill. * Makefile.in: Adjust for renamings. * chillrt/Makefile: Adjust for directory renaming. Mon Nov 30 17:35:33 1992 Fred Fish (fnf@cygnus.com) * chillsh: New script frontend (ala g++), installed as "chill". Can't be called "chill.sh" because make tries to cat it into the "chill" directory. Can't be called just "chill" cause that's already there as a directory. * Makefile.in: Add rules to install chillsh as "chill". * chill/libchill.c: Temporarily ifdef out stuff that wants to conflict with i486/SVR4 runtime or wants to pull in librmt.a, which itself causes linkage to fail. Mon Nov 30 16:28:19 1992 Bill Cox (bill@cygnus.com) * ch-lex.l: added keywords for TRUNC, ROUND, FLOAT, LFLOAT conversion routines. * ch-parse.y: added %tokens for TRUNC, ROUND, FLOAT, LFLOAT. Added production for SIZE(expr). * ch-actions.c: Add semantic routine chill_sizeof (). Mon Nov 30 16:20:40 1992 Per Bothner (bothner@cygnus.com) * ch-lex.l, ch-parse.y: Translate token PFEIL into English ARROW. * ch-parse.y (op6): Remove handling of string repetition operator, until we can figure out a way to parse it correctly. * ch-parse.y (optmodename): New non-terminal. * ch-parse.y (tuple): Merge the two variants using optmodename. * ch-parse.y (location): Add semantic actions for dereferencing operator ->. Mon Nov 30 08:01:29 1992 Bill Cox (bill@cygnus.com) * ch-actions.c: removed compile warning, better code for abs. * ch-parse.y: add productions for builtin functions succ, pred, abs, and size. Add %tokens also. Sort %tokens alphabetically. * ch-lex.l: add parsing for builtin function names, such as abs, pred, succ, etc. Put flex -a option into Makefile.in, so we can clean up the lexer soon. Tue Nov 24 14:18:48 1992 Per Bothner (bothner@rtl.cygnus.com) * ch-typeck.c (chill_handle_case_label, chill_handle_case_default): New functions, for code common to CASE actions and expressions. * chill.y: Replace some code by calls to chill_handle_case_label and chill_handle_case_default. * ch-typeck.c (chill_expand_case_expr): Add semantics. * tree.c: Change doing_chill_thang from extern to common. Mon Nov 23 18:34:22 1992 Per Bothner (bothner@rtl.cygnus.com) * ch-tree.def: New CASE_EXPR type, for case expressions. * ch-expr.c (chill_expand_expr): Hook for CASE_EXPR. * ch-typeck.c (chill_expand_case_expr): New function. Placeholder to implement case expressions. * ch-typeck.c (chill_expand_result, chill_expand_return): Handle mode-unspecified tuples and case expressions in the context of RETURN and RESULT actions. * chill.y (assignaction): Handle case expressions in the context of the RHS of an assignment action. * chill.y (caseaction): Remove spurious duplicate OF in grammar. * chill.y: Handle labeled structure tuples. * chill.y: New rules to parse CASE expressions. * tree.c (build_function_types): Allow Chill functions to return arrays and functions. Wed Nov 18 13:50:28 1992 Per Bothner (bothner@rtl.cygnus.com) * ch-typeck.c (chill_expand_tuple): New function. Expand a tuple (constructor) given an expected (context) type. * chill.y: Implement 'LHS := TUPLE' using expand_chill_tuple, using the mode of the LHS and the expected type of the TUPLE. * chill.y: Implement initialization. * chill.y: Fix some syntax bugs (forbidlist must be surrounded by parentheses), and remove or note ambiguities. * chill.y: Started converting layout style to be like c-parse.in. * chill.y: Implement IF expressions. * chill.y: Added syntax rules for tuples. Labelled and unlabelled array tuples should now work (in some contexts). * ch-actions.c: Initialize doing_chill_thang to 1. * ch-decl.c (do_decls): Set DECL_INITIAL if there is an initializer, to make pushdecl and finish_decl work. * c-decl.c (convert_for_assignment): If Chill, don't convert function and arrays into pointers. (Maybe functions should still be converted?) * c-typeck.c (grokdeclarator): Allow functions in Chill to return arrays and functions. Mon Nov 16 15:40:47 1992 Per Bothner (bothner@rtl.cygnus.com) * chill.y (exprlist_get_single): New function, used when parsing tuples. * chill.y: Re-did parsing of tuples to remove ambiguities. This was a bitch. Tue Nov 10 16:30:55 1992 Per Bothner (bothner@rtl.cygnus.com) * ch-typeck.c (chill_expand_result); Set TREE_SIDE_EFEFCTS flags on assignment to result. * ch-typeck.c (build_chill_array_ref): Subtract lower bound of domain if non-zero. Preliminary hook for range checking. * ch-tree.h, chill.l: Combine variables range_check and range_check_disabled into global variable range_checking. * ch-tree.h: Better definitions of CH_CLASS_IS_VALUE CH_CLASS_IS_DERIVED.