Closed Bug 1058651 Opened 8 years ago Closed 8 years ago
_UNLIKELY to codegen argc and exception checks
The codegen for DOM bindings (<https://mxr.mozilla.org/mozilla-central/source/dom/bindings/Codegen.py>) generates code that includes checks on the number of arguments and checks if the native function threw an exception. We expect that these checks are only quite rarely true, so it seems worthwhile to wrap those checks in the MOZ_UNLIKELY() macro, to potentially improve the compiled code. For number of arguments: <https://mxr.mozilla.org/mozilla-central/source/dom/bindings/Codegen.py?rev=1a3d7ec1a840&mark=6710-6712#6707> For exceptions: <https://mxr.mozilla.org/mozilla-central/source/dom/bindings/Codegen.py?rev=1a3d7ec1a840&mark=6156-6158#6153>
I want to patch this,but need some help.
Thanks, Mohit. The first thing to do is get your development environment set up; a good place to read how to do that is here: https://developer.mozilla.org/en-US/docs/Introduction BZ, can you point to an example of where we're already using MOZ_UNLIKELY() so Mohit can get a sense of what a successful patch looks like here?
I've gone through the docs and also completed the code for firefox exercise which was a part of it and as I'm working on linux I've setup an enviroment by the help of instructions given in the docs.
What is the status of this bug?
Comment on attachment 8507854 [details] [diff] [review] 1058651.patch I missed the part of comment 2 directed at me. :( r=me
Attachment #8507854 - Flags: review?(bzbarsky) → review+
Akshendra, are you able to push this to try yourself, or do you need me to do it?
Assignee: nobody → akshendra521994
I don't seem to have a level 1 hg account, so I cannot I suppose.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in before you can comment on or make changes to this bug.