Review Request: use union in PrimaryExpressionAST to reduce memory footprint

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


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/104127/
-----------------------------------------------------------

Review request for KDevelop and David Nolden.


Description
-------

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 https://bugs.kde.org/show_bug.cgi?id=291248 with this patch the consumption goes down by ~200mb for the given test file


Diffs
-----

  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 

Diff: http://git.reviewboard.kde.org/r/104127/diff/


Testing
-------

all unit tests pass


Thanks,

Milian Wolff

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20120301/6b84cfee/attachment.html>


More information about the KDevelop-devel mailing list