Closed
Bug 1617878
Opened 5 years ago
Closed 5 years ago
Give cloned derived class constructors scripted function types
Categories
(Core :: JavaScript Engine, enhancement, P2)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla75
Tracking | Status | |
---|---|---|
firefox75 | --- | fixed |
People
(Reporter: anba, Assigned: anba)
References
Details
Attachments
(3 files)
Cloned derived class constructors are never inlined, because they don't have scripted function types installed. This is similar to the issues reported in bug 1606868 and bug 958797.
With scripted function types, the following µ-benchmark finishes ~3x faster than without the patch.
var make = base => class C extends base { constructor() { return {}; } };
var C = make(class {});
function f() {
var xs = [null, null];
var t = dateNow();
for (var i = 0; i < 5000000; ++i) {
xs[i & 1] = new C();
}
return dateNow() - t;
}
for (var i = 0; i < 10; ++i) print(f());
Assignee | ||
Comment 1•5 years ago
|
||
Assignee | ||
Comment 2•5 years ago
|
||
In some places we were still using the old "parent" nomenclature, leading to
inconsistencies between function declarations and definitions, cf.
CloneFunctionReuseScript()
.
Depends on D64063
Assignee | ||
Comment 3•5 years ago
|
||
Depends on D64064
Updated•5 years ago
|
Priority: -- → P2
Pushed by nerli@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/080133f25701
Part 1: Remove unused default parameters. r=jandem
https://hg.mozilla.org/integration/autoland/rev/038f065c2bbe
Part 2: Replace remaining references to "parent" with "enclosingEnv". r=jandem
https://hg.mozilla.org/integration/autoland/rev/d93e9fef86dd
Part 3: Assign type for cloned derived class constructors. r=jandem
Comment 5•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/080133f25701
https://hg.mozilla.org/mozilla-central/rev/038f065c2bbe
https://hg.mozilla.org/mozilla-central/rev/d93e9fef86dd
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75
You need to log in
before you can comment on or make changes to this bug.
Description
•