Add well-known-ids variant to JSPropertySpec
Categories
(Core :: JavaScript Engine, task, P3)
Tracking
()
People
(Reporter: arai, Assigned: arai)
References
(Depends on 1 open bug, Blocks 2 open bugs)
Details
Attachments
(18 files, 5 obsolete files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
If a JSPropertySpec
contains a name that's well-known-id, putting WellKnownAtomId
into JSPropertySpec
allows the atomization be done with GetWellKnownAtom
call.
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Comment 1•1 year ago
|
||
In order to expose js::WellKnownAtomId as part of JSPropertySpec::Name,
the underlying data source in CommonPropertyNames.h also needs to be exposed.
Depends on D185730
Assignee | ||
Comment 2•1 year ago
|
||
Depends on D185731
Assignee | ||
Comment 3•1 year ago
|
||
Depends on D185732
Assignee | ||
Comment 4•1 year ago
|
||
Depends on D185733
Assignee | ||
Comment 5•1 year ago
|
||
Depends on D185734
Comment 6•1 year ago
|
||
What percentage of JSPropertySpec
names that we atomize at runtime can now use the well known atom id?
I'm wondering if this is worth doing with the current set, or if we should think about implementing global static atoms first so we can include ~all names in that?
Assignee | ||
Comment 7•1 year ago
|
||
it's applied to 473 specs which is 34% of SpiderMonkey internal, but only 2% in the entire browser, given most specs are auto-generated and outside of SpiderMonkey.
(In reply to Tooru Fujisawa [:arai] from bug 1847672 comment #10)
there are 3,632 static
JSPropertySpec
orJSFunctionSpec
arrays (206 in SpiderMonkey, and remaining in bindings),
and 20,288 staticJSPropertySpec
orJSFunctionSpec
instances there (1,394 in SpiderMonkey, and remaining in bindings).
so, yeah, having the equivalent of well-known atom outside of SpiderMonkey will make this more effectful.
Comment 8•1 year ago
|
||
(In reply to Tooru Fujisawa [:arai] from comment #7)
so, yeah, having the equivalent of well-known atom outside of SpiderMonkey will make this more effectful.
Would this help bug 1846110? https://share.firefox.dev/3seR1lp spends a fair amount of time in PropertySpecNameToId
.
Assignee | ||
Comment 9•1 year ago
|
||
(In reply to Markus Stange [:mstange] from comment #8)
(In reply to Tooru Fujisawa [:arai] from comment #7)
so, yeah, having the equivalent of well-known atom outside of SpiderMonkey will make this more effectful.
Would this help bug 1846110? https://share.firefox.dev/3seR1lp spends a fair amount of time in
PropertySpecNameToId
.
Yes, bug 1848278 is going to make the well-known atom extensible, and that will move the atomization from each JS_DefineProperties
to initialization step in JS::InitSelfHostedCode
, with statically calculating the length and hash.
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Assignee | ||
Comment 10•1 year ago
|
||
Assignee | ||
Comment 11•1 year ago
|
||
Depends on D186305
Assignee | ||
Comment 12•1 year ago
|
||
Depends on D186306
Assignee | ||
Comment 13•1 year ago
|
||
Alphabetical order, ignore case, with an exception for *8, *16 *32 suffixes
Depends on D186307
Assignee | ||
Comment 14•1 year ago
|
||
Depends on D186308
Assignee | ||
Comment 15•1 year ago
|
||
Depends on D186309
Assignee | ||
Comment 16•1 year ago
|
||
Depends on D186310
Assignee | ||
Comment 17•1 year ago
|
||
Depends on D186311
Assignee | ||
Comment 18•1 year ago
|
||
Depends on D186312
Assignee | ||
Comment 19•1 year ago
|
||
Depends on D186313
Assignee | ||
Comment 20•1 year ago
|
||
Depends on D186314
Assignee | ||
Comment 21•1 year ago
|
||
Depends on D186315
Assignee | ||
Comment 22•1 year ago
|
||
Depends on D186316
Assignee | ||
Comment 23•1 year ago
|
||
Depends on D186317
Assignee | ||
Comment 24•1 year ago
|
||
Depends on D186318
Assignee | ||
Comment 25•1 year ago
|
||
Depends on D186319
Assignee | ||
Comment 26•1 year ago
|
||
self-hosting intrinsics needs some more work to use the JS::WellKnownAtomId
, because it currently uses the string content for search.
static const JSFunctionSpec intrinsic_functions[] = {
static void CheckSelfHostedIntrinsics() {
// The `intrinsic_functions` list must be sorted so that we can use
// mozilla::BinarySearch to do lookups on demand.
const JSFunctionSpec* js::FindIntrinsicSpec(js::PropertyName* name) {
Assignee | ||
Comment 27•1 year ago
|
||
Also add JSOp::GetIntrinsicFunc to use the index into intrinsic_functions:
- JSOp::GetIntrinsicFunc is 2 bytes shorter than JSOp::GetIntrinsic
- JSOp::GetIntrinsicFunc doesn't perform binary search during runtime
Assignee | ||
Comment 28•1 year ago
|
||
Depends on D186441
Updated•11 months ago
|
Updated•11 months ago
|
Updated•11 months ago
|
Updated•11 months ago
|
Updated•11 months ago
|
Updated•11 months ago
|
Updated•11 months ago
|
Updated•11 months ago
|
Updated•11 months ago
|
Updated•11 months ago
|
Updated•11 months ago
|
Updated•11 months ago
|
Updated•11 months ago
|
Updated•11 months ago
|
Updated•11 months ago
|
Updated•11 months ago
|
Description
•