Closed Bug 1645373 Opened 5 years ago Closed 5 years ago

Warp: support transpiling instanceof

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

(3 files)

After bug 1645353 we only have to add LoadInstanceOfObjectResult to support transpiling instanceof stubs.

InstanceOfPolicy is equivalent with BoxExceptPolicy, so let's use the
latter as the off the shelf type policy.

Change MInstanceOf to use MDefinition for the prototype in preparation for
part 3. Lowering uses useRegisterOrConstant() to ensure we still bake in the
prototype for constant objects, which is the default in both Ion and Warp.

Drive-by change:
Remove bogus LInstanceOfV::lhs() and LInstanceOfCache::lhs() methods. The
left-hand side is a boxed operand, so it can't be accessed through getOperand.

Depends on D88573

Transpile LoadInstanceOfObjectResult through the existing MInstanceOf op.
In contrast to the CacheIR implementation, MInstanceOf can also handle
proxy objects in the prototype chain via a VM call, whereas the CacheIR
implementation always bails out in that case.

Depends on D88574

Pushed by malexandru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6f21128ed923 Part 1: Replace InstanceOfPolicy with BoxExceptPolicy. r=jandem https://hg.mozilla.org/integration/autoland/rev/fc32f8858aec Part 2: Change MInstanceOf to use MDefinition for the prototype. r=jandem https://hg.mozilla.org/integration/autoland/rev/b077d656f564 Part 3: Transpile LoadInstanceOfObjectResult. r=jandem
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: