Closed Bug 1661211 Opened 10 months ago Closed 10 months ago

Warp: transpile getter/setter calls


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




82 Branch
Tracking Status
firefox82 --- fixed


(Reporter: jandem, Assigned: jandem)


(Blocks 1 open bug)



(6 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
part 1 - Clean up CacheIR ops for getter calls. r=iain
part 2 - Store nargsAndFlags for getter calls. r=iain
part 3 - Add sameRealm flag to CallNativeGetterResult. r=iain
part 4 - Transpile getter calls. r=iain
part 5 - CacheIR changes preparing for transpiling setter calls. r=iain
part 6 - Transpile setter calls. r=iain
You need to log in before you can comment on or make changes to this bug.