Closed Bug 1661211 Opened 6 years ago Closed 6 years ago

Warp: transpile getter/setter calls

Categories

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

task

Tracking

()

RESOLVED FIXED
82 Branch
Tracking Status
firefox82 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(6 external files)

No description provided.

We had different CacheIR ops for receiver-is-object and receiver-is-Value. This
patch unifies them by always using the receiver-is-Value version. This makes it
easier to transpile in Warp.

When generating CacheIR, pass and use the receiverId (Value) in a few places
instead of objId. This also lets us support non-object receivers for super.prop

There are two places where this doesn't work and boxObject is used to convert
from object-id to value-id. In the future this could be a dedicated CacheIR op
instead of a cast, but that would require BaselineInspector changes.

This is for use by the transpiler, similar to GuardSpecificFunction.

Depends on D88264

We can reuse most of the code in maybeCallTarget for creating a WrappedFunction
from callee/nargs/flags, so that was factored out as a helper function.

Instead of the "stack spoofing" that IonBuilder does (see ensureHasSlots call),
add initForGetterCall to CallInfo so we can set callee/thisv directly.

Depends on D88266

Add nargsAndFlags, add sameRealm flag to CallNativeSetter.

Depends on D88267

Again similar to the IonBuilder code but without the stack spoofing.

IonBuilder uses BytecodeIsPopped(pc) for ignoresReturnValue but the return value
of a setter is never used so we can just pass true.

Depends on D88268

Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fc681a8e552e part 1 - Clean up CacheIR ops for getter calls. r=iain https://hg.mozilla.org/integration/autoland/rev/d01415c7707e part 2 - Store nargsAndFlags for getter calls. r=iain https://hg.mozilla.org/integration/autoland/rev/e25e289e016c part 3 - Add sameRealm flag to CallNativeGetterResult. r=iain https://hg.mozilla.org/integration/autoland/rev/a86d23fda071 part 4 - Transpile getter calls. r=iain https://hg.mozilla.org/integration/autoland/rev/73140c7a14a4 part 5 - CacheIR changes preparing for transpiling setter calls. r=iain https://hg.mozilla.org/integration/autoland/rev/04787b6cf6a3 part 6 - Transpile setter calls. r=iain
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: