Closed
Bug 1208067
Opened 9 years ago
Closed 9 years ago
Ensure that self-hosted functions with innner functions aren't relazified
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla44
Tracking | Status | |
---|---|---|
firefox44 | --- | fixed |
People
(Reporter: till, Assigned: till)
References
Details
Attachments
(1 file)
(deleted),
patch
|
jandem
:
review+
efaust
:
feedback+
|
Details | Diff | Splinter Review |
We don't relazifiy functions that contain other functions because we need the outer function's script when running the inner function. Without this patch, we don't know whether a self-hosted function has inner functions or not, so we erroneously relazify it even if if it does.
Assignee | ||
Comment 1•9 years ago
|
||
Attachment #8665435 -
Flags: review?(jdemooij)
Assignee | ||
Comment 2•9 years ago
|
||
Comment 3•9 years ago
|
||
Comment on attachment 8665435 [details] [diff] [review]
Ensure that self-hosted functions with innner functions aren't relazified
Review of attachment 8665435 [details] [diff] [review]:
-----------------------------------------------------------------
Drive by: This looks like what we discussed! Thanks!
Surprised we can't remove some logic that used to do this based on lazyScript()->numInnerFunctions() in createScriptForLazilyInterpretedFunction(). Can we?
Attachment #8665435 -
Flags: feedback+
Comment 4•9 years ago
|
||
Comment on attachment 8665435 [details] [diff] [review]
Ensure that self-hosted functions with innner functions aren't relazified
Review of attachment 8665435 [details] [diff] [review]:
-----------------------------------------------------------------
As Eric said, we can probably remove the !lazy->numInnerFunctions() check from createScriptForLazilyInterpretedFunction. Keeping it might save some memory though because we can discard the LazyScript I think.
::: js/src/jsscript.h
@@ +1490,5 @@
> + void setHasInnerFunctions(bool b) {
> + hasInnerFunctions_ = b;
> + }
> +
> + bool hasInnerFunctions() {
Nit: can mark this method `const`.
Attachment #8665435 -
Flags: review?(jdemooij) → review+
Assignee | ||
Comment 5•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/d052f1bd09c55cac73a8df4ae14d68a7a034c6a0
Bug 1208067 - Ensure that self-hosted functions with innner functions aren't relazified. r=jandem
Assignee | ||
Comment 6•9 years ago
|
||
I didn't remove the numInnerFunctions() check because, as jandem says, keeping it saves memory, and we have to have the flag for directEval anyway.
Comment 7•9 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox44:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in
before you can comment on or make changes to this bug.
Description
•