[aspectc-user] Project CClassDatabase.
Olaf.Spinczyk at informatik.uni-erlangen.de
Tue Oct 31 09:41:41 CET 2006
header files are not part of the C++ language. They are a preprocessor
concept. Due to conditional compilation the same header file might yield
completely different C++ code in each translation unit. Therefore,
header files have to be parsed again and again. This is not a Puma issue
but a language issue.
Only a few compilers avoid this re-parsing by caching and assuming that
system header files always produce the same code. (-> VC++ stdafx.h)
In ac++ I help myself by maintaining a "project repository" file which
contains information about the whole project (classes, namespaces,
functions, etc.). Whenever a (single) translation unit is parsed the
repository is updated. If you are interested I could send you the latest
version of this repository for the Puma project as an example (an XML
that describes the classes and functions of Puma itself). Perhaps it
would be sufficient for you to run ac++ without any aspects on your
project, just to produce this file.
Robert Scott wrote:
> Following on from my previous questions, it seems that with the current
> CTranslationUnit/CClassDatabase/CCSemVisitor relationships mean that it's not
> possible to semantically analyse a whole project without analysing the common
> headers n times. With a large project to analyse, this is a problem, as 99%
> of the analysed source is a tree of headers. A simple metadatabase woudn't
> really help this situation, and would cause the common headers to be stored
> in memory n times. With the projects I'm working on, there are approximately
> 400 ClassInfos created per source file.
> Is analysing a project at a project-wide scope (as opposed to a file scope)
> simply infeasible with puma, or are there some simple tricks I'm missing?
> aspectc-user mailing list
> aspectc-user at aspectc.org
More information about the aspectc-user