------- Comment #13 from jvdelisle at gcc dot gnu dot org 2009-03-29 18:55 ------- Subject: Bug 37754
Author: jvdelisle Date: Sun Mar 29 18:55:05 2009 New Revision: 145258 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145258 Log: 2009-03-29 Jerry DeLisle <jvdeli...@gcc.gnu.org> PR libfortran/37754 * io/io.h (format_hash_entry): New structure for hash table. (format_hash_table): The hash table itself. (free_format_data): Revise function prototype. (free_format_hash_table, init_format_hash, free_format_hash): New function prototypes. * io/unit.c (close_unit_1): Use free_format_hash_table. * io/transfer.c (st_read_done, st_write_done): Free format data if internal unit. * io/format.c (free_format_hash_table): New function that frees any memory allocated previously for cached format data. (reset_node): New static helper function to reset the format counters for a format node. (reset_fnode_counters): New static function recursively calls reset_node to traverse the fnode tree. (format_hash): New simple hash function based on XOR, probabalistic, tosses collisions. (save_parsed_format): New static function to save the parsed format data to use again. (find_parsed_format): New static function searches the hash table looking for a match. (free_format_data): Revised to accept pointer to format data rather than the dtp pointer so that the function can be used in more places. (format_lex): Editorial. (parse_format_list): Set flag used to determine of format data hashing is to be used. Internal units are not persistent enough for this. (revert): Move to ne location in file. (parse_format): Use new functions to look for previously parsed format strings and use them rather than re-parse. If not found, saves the parsed format data for later use. 2009-03-29 Jerry DeLisle <jvdeli...@gcc.gnu.org> PR libfortran/37754 * io/transfer.c (formatted_transfer_scalar): Remove this function by factoring it into two new functions, one for read and one for right, eliminating all the conditionals for read or write mode. (formatted transfer_scalar_read): New function. (formatted transfer_scalar_write): New function. (formatted_transfer): Use new functions. Modified: branches/fortran-dev/libgfortran/ChangeLog.dev branches/fortran-dev/libgfortran/io/format.c branches/fortran-dev/libgfortran/io/io.h branches/fortran-dev/libgfortran/io/transfer.c branches/fortran-dev/libgfortran/io/unit.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37754