Closed Bug 892544 Opened 11 years ago Closed 11 years ago

IonMonkey: Stub out exception handling code

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla25

People

(Reporter: djvj, Assigned: djvj)

References

Details

Attachments

(1 file)

The bulk of the inlined exception handling code in MacroAssemblerSpecific::handleFailureWithHandler can be stubbed out, and doesn't need to be present in generated code.  This will save on memory and codgen time as well, wherever we currently generate handleException().
Attached patch Patch.Splinter Review
Tenative patch to do this.  It was pretty straightforward actually.  Seems to be passing jit-tests on x86-32.  Running through try now on linux x86-32 and x86-64:
https://tbpl.mozilla.org/?tree=Try&rev=bc6898024837
Assignee: general → kvijayan
Attachment #774121 - Flags: review?(hv1989)
Comment on attachment 774121 [details] [diff] [review]
Patch.

Review of attachment 774121 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good overal.

Bonus points if "generateExceptionTailStub" can be shared for all platforms. It's really stupid to have 3 separate versions, but they are actually totally the same. I also noticed there are some other generate* with the same issue :(. I'll mark this as "nice to have"

::: js/src/ion/arm/MacroAssembler-arm.cpp
@@ +3240,5 @@
>  
>      // Ask for an exception handler.
>      setupUnalignedABICall(1, r1);
>      passABIArg(r0);
>      callWithABI(handler);

Can't this also be included in handleFailureWithHandlerTail? I don't see a reason why not, but maybe I'm overlooking something.

r+ if answer is that I'm overlooking something
r+ if answer is that it can be put in handleFailureWithHandlerTail and you do this ;)
Attachment #774121 - Flags: review?(hv1989) → review+
the callWithABI uses |handler|, which is an input argument to he method.  It's not always going to be the same, so we can't share it.  If we do want to share it, we'll need to generate different stubs for each handler.

Doing one last try run before pushing.
https://hg.mozilla.org/mozilla-central/rev/0163be2c4375
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: