Avoid delazification in js::FunctionToString
Categories
(Core :: JavaScript Engine, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox73 | --- | fixed |
People
(Reporter: tcampbell, Assigned: evilpie)
References
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
If js::FunctionToString we current delazify in [1], but it isn't necessary. Instead this whole method should be cleaned up in terms of JSFunction::baseScript(). Another minor detail is that [2] can be simplified since derived-class-constructors are no longer marked as builtin thanks to [3].
[1] https://searchfox.org/mozilla-central/rev/7536d7f480a7f18c941a590a2d4c5119d9f52770/js/src/vm/JSFunction.cpp#836
[2] https://searchfox.org/mozilla-central/rev/7536d7f480a7f18c941a590a2d4c5119d9f52770/js/src/vm/JSFunction.cpp#857
[3] https://searchfox.org/mozilla-central/rev/7536d7f480a7f18c941a590a2d4c5119d9f52770/js/src/vm/Interpreter.cpp#311
Reporter | ||
Comment 1•5 years ago
|
||
Note, one wrinkle is FunctionToStringCache, but I think changing it to store a BaseScript* is fine. The cache is wiped at any GC and is never traced so the fact that BaseScript is not really a complete type is fine.
Reporter | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
Comment 3•5 years ago
|
||
Comment 4•5 years ago
|
||
bugherder |
Description
•