Review Request: use union in PrimaryExpressionAST to reduce memory footprint

Milian Wolff mail at
Thu Mar 1 02:25:19 UTC 2012

This is an automatically generated e-mail. To reply, visit:

Review request for KDevelop and David Nolden.


On 64bit sizeof(PrimaryExpressionAST) == 64, but with this patch it reduces to 40 by using a union + enum.

The code-handling is a bit changed, but well... is this OK to land in master?

This is another step towards a reduced memory consumption for the test file in with this patch the consumption goes down by ~200mb for the given test file


  languages/cpp/cppduchain/expressionvisitor.cpp 0ef76a6 
  languages/cpp/parser/ast.h 46ecac7 
  languages/cpp/parser/codegenerator.cpp 962fe5b 
  languages/cpp/parser/default_visitor.cpp 174e5d9 
  languages/cpp/parser/parser.cpp 50c09a8 



all unit tests pass


Milian Wolff

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the KDevelop-devel mailing list