Demangler: further speed improvements.

Avoid using std::string and std::vector in the demangler. Instead use vectors/strings with storage allocated by the NodeFactory’s bump pointer allocator.
This brings another 35% speedup. Especially in the case the Demangle::Context is not reused for subsequent demanglings.
This commit is contained in:
Erik Eckstein
2017-03-03 14:37:26 -08:00
parent 3456d04925
commit f220a3b727
3 changed files with 208 additions and 99 deletions

View File

@@ -207,6 +207,9 @@ public:
// Only to be used by the demangler parsers.
void addChild(NodePointer Child, NodeFactory &Factory);
// Reverses the order of children.
void reverseChildren(size_t StartingAt = 0);
};
/// Returns true if the mangledName starts with the swift mangling prefix.