Method calls take a slow path in the interpreter

NEW
Unassigned

Status

()

Core
JavaScript Engine
P3
normal
a year ago
7 months ago

People

(Reporter: jorendorff, Unassigned)

Tracking

({triage-deferred})

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

a year ago
There's a fast path for JSOP_CALL when we're calling a scripted function. But it doesn't hit for functions that are defined as ES6+ methods:

    let obj = {
      method() {}
    };

    obj.method();   // slow path when in interpreter

Note the comment in the interpreter:

    /* Don't bother trying to fast-path calls to scripted non-constructors. */
    if (!isFunction || !maybeFun->isInterpreted() || !maybeFun->isConstructor() ||
        (!construct && maybeFun->isClassConstructor()))
    {
        (...slow path...)
    }

The third test, maybeFun->isConstructor(), is the one that fails.
Keywords: triage-deferred
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.