Revision 813997

Go back to digest for 1st June 2008

Features in Development Tools

David Nolden committed changes in /trunk/KDE/kdevelop/languages/cpp/cppduchain:

- Improve the value() and setValue() functions in CppConstantIntegralType to automatically do conversion to/from their internal format
- Add a new function with functionality for handling builtin operators. It allows determining whether a binary expression can be handled by a builtin operator, and determines the return type.
- Also move the already existing constant binary expression evaluator into that function, and make them interact. The result: An expression like "3(int) + 0.5(double)" now yields a double with value 3.5
- Add a test for the improvement

The main reason for this was performance though, because now we don't try resolving overloaded operators for expressions that can be handled by builtin ones any more.

File Changes

Added 2 files
  • /trunk/KDE/kdevelop/languages/cpp/cppduchain
  •   /builtinoperators.cpp
  •   /builtinoperators.h
Modified 5 files
  • /trunk/KDE/kdevelop/languages/cpp/cppduchain
  •   /CMakeLists.txt
  •   /cpptypes.cpp
  •   /cpptypes.h
  •   /expressionvisitor.cpp
  •   /tests/test_expressionparser.cpp
7 files changed in total