IonMonkey: Share handleException code.

RESOLVED DUPLICATE of bug 892544

Status

()

RESOLVED DUPLICATE of bug 892544
6 years ago
8 months ago

People

(Reporter: nbp, Assigned: nbp)

Tracking

(Depends on: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [ion:t])

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
handleException code is produced at multiple locations such as VM wrappers, JS calls, bailout tail and lately DOM getters/setters.  We might reduce the code size by creating only one piece of code shared by all to which others will jump to.

In addition to reducing the size of JS calls and DOM getters/setters calls, this will also remove an unconditional branch around the error handling code.
(Assignee)

Updated

6 years ago
Assignee: general → nicolas.b.pierron
Status: NEW → ASSIGNED
(Assignee)

Comment 1

6 years ago
Created attachment 644528 [details] [diff] [review]
Factor the exception handler in the epilogue.

I factored the exception handler in the epilogue of the current generated code because this is a slow path which cause the fast path to jump over it in case of success.

It is located in the epilogue instead of being allocated separatly for now because it might have cause trouble with a limited size of jumps of ARM branches.
Attachment #644528 - Flags: review?(sstangl)
Comment on attachment 644528 [details] [diff] [review]
Factor the exception handler in the epilogue.

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

Instead of duplicating the exception handling code in the epilogue of every function, it would be better to have a single exception-handling stub per JSContext. ARM can make arbitrary 32-bit calls by loading the address into a register and using BX. Having a special branch function for detecting and branching to handle exceptions would be OK. Note that both the MOV and BX can be conditional from the result of a previous comparison, so no additional jumps are necessary.
Attachment #644528 - Flags: review?(sstangl)
(Assignee)

Updated

6 years ago
Depends on: 781023
(Assignee)

Updated

8 months ago
Status: ASSIGNED → RESOLVED
Last Resolved: 8 months ago
Resolution: --- → DUPLICATE
Duplicate of bug: 892544
You need to log in before you can comment on or make changes to this bug.