Don't require extended functions when methods don't use [[HomeObject]]
Categories
(Core :: JavaScript Engine, enhancement, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox101 | --- | fixed |
People
(Reporter: anba, Assigned: anba)
References
(Blocks 1 open bug)
Details
(Keywords: perf-alert)
Attachments
(5 files)
Currently all methods are allocated as extended functions, even when they don't use METHOD_HOMEOBJECT_SLOT. Thanks to Stencil, we no longer allocate functions in the parser, which enables us to only require extended functions when the home object is actually needed.
| Assignee | ||
Comment 1•4 years ago
|
||
Object groups have been removed.
| Assignee | ||
Comment 2•4 years ago
|
||
The FunctionBox is created with the exact same FunctionFlags, so we don't have
to pass the flags as a separate parameter, but instead can read them from the
FunctionBox::flags_ member.
Depends on D142929
| Assignee | ||
Comment 3•4 years ago
|
||
Change emitPrivateMethodInitializer() to accept a ClassMethod* instead of
receiving the separate child parse nodes of ClassMethod.
Drive-by change:
- Use less casts.
- Remove unreachable
PrivateNameKind::Methodcase from switch.
Depends on D142930
| Assignee | ||
Comment 4•4 years ago
|
||
Private instance accessors were always initialising the home object, even when
needsHomeObject() was false.
Depends on D142931
| Assignee | ||
Comment 5•4 years ago
|
||
Methods only need to be created as extended functions when they need to store
their home-object. So any method which doesn't use super can actually be
created as a normal, non-extended function.
Depends on D142932
Updated•4 years ago
|
Updated•4 years ago
|
Comment 7•3 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/9a662b26eb81
https://hg.mozilla.org/mozilla-central/rev/fddaa6af17d6
https://hg.mozilla.org/mozilla-central/rev/d3a0f6499f71
https://hg.mozilla.org/mozilla-central/rev/dc55792f6bcc
https://hg.mozilla.org/mozilla-central/rev/4e0f719f9498
Comment 8•3 years ago
|
||
== Change summary for alert #33809 (as of Tue, 12 Apr 2022 18:42:06 GMT) ==
Improvements:
| Ratio | Test | Platform | Options | Absolute values (old vs new) |
|---|---|---|---|---|
| 1% | Base Content JS | windows10-64-2004-shippable-qr | 1,813,717.33 -> 1,801,448.00 | |
| 1% | Base Content JS | linux1804-64-shippable-qr | 1,811,600.00 -> 1,799,633.33 | |
| 0.44% | Base Content JS | macosx1015-64-shippable-qr | 1,841,482.67 -> 1,833,458.67 |
For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=33809
Updated•3 years ago
|
Description
•