Remove unused functionality from ParseNode::getConstantValue
Categories
(Core :: JavaScript Engine, task, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox74 | --- | fixed |
People
(Reporter: anba, Assigned: anba)
Details
Attachments
(7 files)
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
Assignee | ||
Comment 1•5 years ago
|
||
Assignee | ||
Comment 2•5 years ago
|
||
The ForCopyOnWriteArray
and DontAllowObjects
flags are both unused, so we
can remove them along with the AllowConstantObjects
parameter.
Also remove the NewObjectKind
parameter because it's always TenuredObject
.
Depends on D58927
Assignee | ||
Comment 3•5 years ago
|
||
getConstantValue()
is only called for callsite objects, so we only need to handle
TemplateStringExpr
, RawUndefinedExpr
, CallSiteObj
, and ArrayExpr
(for the
raw nodes).
Depends on D58928
Assignee | ||
Comment 4•5 years ago
|
||
Also remove the recursion for template-string and raw-undefined nodes.
With the recursion gone, it's easy to see the call to CombineArrayElementTypes
can be removed as well, because ncompare
is always 0
, which makes
CombineArrayElementTypes
a no-op.
Finally we can then also remove the compare
and ncompare
parameters from
getConstantValue
.
Depends on D58929
Assignee | ||
Comment 5•5 years ago
|
||
NewArrayKind::Normal
is the default value when calling newArrayObject
, so
there's no need to pass it explicitly.
Depends on D58930
Assignee | ||
Comment 6•5 years ago
|
||
Depends on D58931
Assignee | ||
Comment 7•5 years ago
|
||
Depends on D58932
Updated•5 years ago
|
Comment 9•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/e4ba2e73e400
https://hg.mozilla.org/mozilla-central/rev/d61e2e6e9c07
https://hg.mozilla.org/mozilla-central/rev/ebc34e43593e
https://hg.mozilla.org/mozilla-central/rev/7263c1322f9f
https://hg.mozilla.org/mozilla-central/rev/a97c70e9b377
https://hg.mozilla.org/mozilla-central/rev/c09ecff23a9e
https://hg.mozilla.org/mozilla-central/rev/118536529169
Description
•