Consolidating format checking - a 4.7 concept
Jerry DeLisle
jvdelisle@frontier.com
Sat Sep 25 03:42:00 GMT 2010
I am thinking about consolidating format checking between FE and runtime. I
would like to define a work function that can be called by the FE at compile
time and likewise used at runtime.
I am thinking that if the format string is a constant, then call the check
routine and instead of saving the string into the dt structure, save an already
parsed structure. Then at runtime, we only have to traverse the structure, and
not parse it as we do now.
Likewise, if the format string is a variable, store the string pointer as we do
now and parse at run time, perhaps by building a direct call in the front-end to
do this. This fits in with 45715 as well. I think in fact pre-parsing formats
will give substantial performance boost, especially if we cache the format-data
that is already parsed.
Regardless, my main motivation is not performance. We can achieve better FE
diagnostics and greatly simplify maintanance by having only one tokenizer etc,
etc, etc. It is concievable that one could match up io data elements with
specific format specifiers at compile time and inline the format specifier with
the transfer_*** function calls. Spooky thoughts!
A topic for the IRC meeting along with, er uh hmm, oh yea, User Defined Derived
Type IO.
Best regards,
Jerry
More information about the Fortran
mailing list