mwu's blog
A tale of a fearless coder
mozilla-central: Now with 88.7% less PRBool!
September 29th, 2011 by mwu
3263 files changed, 30182 insertions(+), 30183 deletions(-)
Bug 675553 has landed. According to a simple grep, we’ve gone from 31656 PRBools to 3562 PRBools and from 1914 PRPackedBool to 14 PRPackedBool. The remaining ones are mostly in C code or code passing data to C.
PR_TRUE (18774 -> 17953) and PR_FALSE (22973 -> 20195) haven’t been affected as much, but now it’s your turn. Feel free to correct any PR_TRUEs or PR_FALSEs you see along the way.
A script is available to help unbitrot your mercurial patch queue. More info is available in the post on dev-planning.
Another script is available to convert any PR_TRUEs or PR_FALSEs on the lines your patches touch. It operates in the same way as the first script.
Awesome!
Now I need to run my dehydra script again to see how this affected the alignment of structs and probably save some more bytes here and there…
OK, what’s next?