Taras’ Blog

Just another Blog.mozilla.com weblog

Archive for 'outparamdel' Category

Exceptions

19 December 2007

Often there are two ways to write code. One way is to design an API and have code patterns adhere to how the API is supposed to be used. Another way is to rely on language features to accomplish the same thing. Typically API-pattern approaches are chosen because compilers are too immature or just don’t [...]

6 Comments »

Exceptional Circumstances

5 December 2007

My previous post on outparam rewriting described the wealth of functions that can be rewritten. Unfortunately, most functions in Mozilla are declared in XPIDL interfaces.
I have been convinced that my plan to rewrite xpidlgen to avoid outparameters wont be possible because most XPIDLinterfaces can be implemented by JavaScript in a few different ways. That is [...]

9 Comments »

Volume of Refactoring Ahead

28 November 2007

In the previous post, I described the simple rewriting case that I am working on at the moment. Someone was quick to point out that the approach wouldn’t work for all methods (XPIDL Arrays were the example). Indeed, anything more complicated than simple getters can’t be rewritten to “Succeeded/Failed” pattern without switching to C++ exceptions. [...]

No Comments »

Mozilla 2: Outparamdel

26 November 2007

There will be a lot of under-the-hood code changes in Mozilla 2. Our goal is to end up with a simpler, safer and faster codebase.
This is my perspective on the work ahead with respect to outparamdel.
Outparamdel
In the presence of a garbage collector we will be getting rid of stack nsCOMPtr<> usage (using raw pointers instead), [...]

3 Comments »

Automatic DeCOMtamination: Roadmap For Automated Refactorings

10 September 2007

This is an update on the ongoing deCOMtamination work from the automated rewriting perspective. I think it’s pretty exciting that Mozilla is the first large-scale C++ project to attempt automated large scale source code cleanups and optimizations. I think the tools are finally getting mature enough for the job.
The downside is that there isn’t a [...]

4 Comments »

Pork: The Brave New World

30 August 2007

It doesn’t look like my oink patches are going to reach upstream anytime soon. In fact, in the past year no patches have landed in the oink tree. I think this is unfortunate, but I have my own repository at http://hg.mozilla.org and will continue working on my fork. So allow me to introduce Pork, the [...]

3 Comments »

Outparams: Take 2

6 August 2007

Will Rid Code of Outparams!
I resumed my outparam rewriting work last week. Having fixed the CPP induced architectural limitation that I ran into, it was quite straight-forward to factor out squash’s rewriting code into a new tool. Unlike squash, outparamdel (creatively named new tool), can rewrite code precisely and reliably. I still don’t [...]

5 Comments »