Closed Bug 775167 Opened 12 years ago Closed 7 years ago

IonMonkey: Share handleException code.

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 892544

People

(Reporter: nbp, Assigned: nbp)

References

(Depends on 1 open bug)

Details

(Whiteboard: [ion:t])

Attachments

(1 file)

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: general → nicolas.b.pierron
Status: NEW → ASSIGNED
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)
Depends on: 781023
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: