Archive for February, 2008
A few notes on string APIs
1. For my own comprehension, I used Dehydra GCC + Graphviz to print a class hierarchy diagram for the Mozilla string classes (i.e., everything defined in xpcom/string). The results are here. I was a little surprised that nsSubstring_base is the root, because in nsTAString.h, the root is nsTAString_CharT. Turns out that is #defined to nsSubtring_base [...]
Posted: February 28th, 2008 under Uncategorized.
Comments: 3
DTrace C++ Mysteries Solved
I’ve been using DTrace on Leopard in my recent work, and while it’s a great tool, the C++ support is confusing and I couldn’t find proper documentation. But eventually I found sketchy documentation that gave me the answers, so in the interest of saving others from pain: Basic Call Profiling. One of the most basic [...]
Posted: February 14th, 2008 under Uncategorized.
Comments: 51
WTF-16
I’ve been doing some speed and memory profiling of Firefox string usage to help in figuring out what to do with string encodings Mozilla 2: should we go all UTF-8, all UTF-16, or keep the current mishmash of ASCII, ISO-8859-1, UTF-8, and the reviled UCS-2? The full profiling results are in the string analysis bug, [...]
Posted: February 14th, 2008 under Uncategorized.
Comments: 5
Elsa parsing a complete Firefox build on gcc 4.3
Background: Taras and I are using the Elsa C++ for automatic rewriting of Firefox code. One problem we had is that Elsa wasn’t compatible with header files from recent gcc, so in order to use Elsa, you had to configure and build Firefox with gcc 3.4. And that’s an old enough gcc that you probably [...]
Posted: February 8th, 2008 under Uncategorized.
Comments: 6