Re: Semantic difference of source files

Hans-Peter Diettrich <DrDiettrich1@aol.com>
Mon, 18 Aug 2008 16:31:42 +0200

          From comp.compilers

Related articles
Semantic difference of source files m.helvensteijn@gmail.com (Michiel) (2008-08-17)
Re: Semantic difference of source files m.helvensteijn@gmail.com (Michiel) (2008-08-17)
Re: Semantic difference of source files barry.j.kelly@gmail.com (Barry Kelly) (2008-08-18)
Re: Semantic difference of source files DrDiettrich1@aol.com (Hans-Peter Diettrich) (2008-08-18)
Re: Semantic difference of source files gah@ugcs.caltech.edu (glen herrmannsfeldt) (2008-08-18)
Re: Semantic difference of source files gah@ugcs.caltech.edu (glen herrmannsfeldt) (2008-08-19)
Re: Semantic difference of source files marcov@stack.nl (Marco van de Voort) (2008-08-20)
Re: Semantic difference of source files gah@ugcs.caltech.edu (glen herrmannsfeldt) (2008-08-20)
Re: Semantic difference of source files DrDiettrich1@aol.com (Hans-Peter Diettrich) (2008-08-23)
Re: Semantic difference of source files marcov@stack.nl (Marco van de Voort) (2008-08-24)
[2 later articles]
| List of all articles for this month |
From: Hans-Peter Diettrich <DrDiettrich1@aol.com>
Newsgroups: comp.compilers
Date: Mon, 18 Aug 2008 16:31:42 +0200
Organization: Compilers Central
References: 08-08-025
Keywords: parse, performance
Posted-Date: 19 Aug 2008 19:06:34 EDT

Michiel schrieb:


> I have this idea, but I'm not sure if it's already being used anywhere. And
> if not, I would like to know why.
>
> My idea is to leave behind a record of the Abstract Syntax Tree after
> compilation. This may simply be a copy of the original source code, an XML
> file or even a binary representation (for better performance, see below).


This is what many compilers do, in binary form. RTTI requires such
information at runtime, so that a description of the interface must be
stored in the object files. Then it's only a small step to store the
whole description of the interfaces of all modules in the object
files.




> [If you're only going to compare the ASTs to see if they're the same,
> all you need to save is a hash. The question of why nobody seems to
> care about compilation speed any more. -John]


Some languages IMO still compile very slowly. Where I can do a "make"
in Delphi, in order to only find the next error in my code, C++ coders
still complain about hours of compilation for huge projects. This
difference may result from twiddling with the source code, in the
expansion of macros or templates, where a compiler cannot know the
impact of changing a minor detail in such a macro, on all other source
files in the project.


At least in a RAD environment some languages turn out to be not very
RAD-friendly, by design.


DoDi


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.