Closed Bug 645889 Opened 13 years ago Closed 13 years ago

JM: Add RegExp.exec -> RegExp.test optimization

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bhackett1024, Assigned: bhackett1024)

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file)

The optimization which the tracer does to transform re.exec into re.test when possible is currently responsible for most or all of the difference between JM+TI and JM+TM on awfy.  This optimization should also be added to JM (type inference not needed, it's very simple to swap natives when generating native call stubs) to avoid the clutter.
Patch on the JM tree.  Wrong author field on the commit, sorry!

http://hg.mozilla.org/projects/jaegermonkey/rev/a3632d306b13
Would this land cleanly on the TM tree?
Almost.  I'll put together a patch for review.
Attached patch patch against TMSplinter Review
Assignee: general → bhackett1024
Attachment #522564 - Flags: review?(dmandelin)
Comment on attachment 522564 [details] [diff] [review]
patch against TM

Nice factoring. Only nit is that the name "IsCallResultUnusedOrTested" is kind of weird, but the comment at the top makes it pretty obvious anyway, and it's only used in these places. "IsCallResultNotStored"? "IsCallResultNullTestedOnly"? "IsCallResultObjectNotUsed"?
Attachment #522564 - Flags: review?(dmandelin) → review+
CallResultEscapes, and invert the test?
I like CallResultEscapes.

http://hg.mozilla.org/tracemonkey/rev/ba8cc57e0848
Whiteboard: fixed-in-tracemonkey
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: