Closed Bug 1833624 Opened 4 months ago Closed 4 months ago

Call Ion RegExp stubs also from Baseline ICs

Categories

(Core :: JavaScript Engine: JIT, task, P3)

task

Tracking

()

RESOLVED FIXED
115 Branch
Tracking Status
firefox115 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

(Blocks 1 open bug)

Details

(Whiteboard: [sp3])

Attachments

(4 files)

We need those to call the stubs from Baseline IC code.

The realm stubs are currently stored as weak references so the IC stub will need
to hold a strong reference to keep it alive.

Depends on D178328

This is faster, especially for the Matcher and ExecMatch stubs, because allocating
the match result array is faster from JIT code than from C++.

Speedometer 3 shows some medium/high confidence improvements for various sub tests.

Moving the input registers into place was one of the tricky parts. After trying a few
approaches, using MoveResolver was simplest so that's what this patch implements.

Because the regexp stubs are held weakly by JitRealm, this patch stores a strong
reference to the stub's JitCode in the IC stub. It isn't actually used for the call,
because there are some edge cases (that we shouldn't hit in practice) where we discard
JIT code including the regexp stubs, but this doesn't work for scripts active on the stack.
To make sure we always call the correct regexp stub code, we load it from JitRealm.

Depends on D178330

Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f8cddc45f713
part 1 - Move some RegExp stub constants to a header file. r=iain
https://hg.mozilla.org/integration/autoland/rev/096f776a3f68
part 2 - Add support for JitCode stub fields. r=iain
https://hg.mozilla.org/integration/autoland/rev/2e0fc6642fb8
part 3 - Minor Realm and JitRealm changes. r=iain
https://hg.mozilla.org/integration/autoland/rev/c19f93169200
part 4 - Call RegExp stubs also from Baseline ICs. r=iain
Whiteboard: [sp3]
You need to log in before you can comment on or make changes to this bug.