Closed
Bug 841621
Opened 11 years ago
Closed 11 years ago
Add inline script hint for self-hosted functions
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla25
People
(Reporter: shu, Assigned: shu)
References
Details
Attachments
(1 file, 1 obsolete file)
2.93 KB,
patch
|
nmatsakis
:
review+
|
Details | Diff | Splinter Review |
It is useful to have the ability to mark self-hosted functions as 'inline' so that when jitting them we ignore the normal heuristics.
Assignee | ||
Updated•11 years ago
|
Assignee: general → shu
Comment 1•11 years ago
|
||
I'm not sure this is a good thing to have. We should beef up our normal heuristics to be more robust against patterns like our self-hosted scripts use, not add backdoors usable only by self-hosted things.
Assignee | ||
Comment 2•11 years ago
|
||
(In reply to Jeff Walden [:Waldo] (remove +bmo to email) from comment #1) > I'm not sure this is a good thing to have. We should beef up our normal > heuristics to be more robust against patterns like our self-hosted scripts > use, not add backdoors usable only by self-hosted things. Adding more aggressive inlining heuristics for ParallelArray code is also an option (perhaps more preferred), though I'm not quite seeing the problem with adding backdoors for self-hosted code. To me that's a nice freedom self-hosted code allows -- we already have unsafe backdoors for ParallelArrays, and what I'm proposing here is just a hint.
Comment 3•11 years ago
|
||
I see "freedom" and read "backdoor that sites can't put to their own use". :-) If some function in self-hosted code is short enough or hot enough that it should be inlined, it shouldn't just be inlined because it existed in self-hosted code and someone recognized and annotated that particular instance.
Comment 4•11 years ago
|
||
My take on this is that Waldo is correct in principle, but in practice there isn't a "one-size-fits-all" heuristic that will always get the right answer, and there will always be a need for hints.
Comment 5•11 years ago
|
||
I asked dvander about this on IRC and he wrote: [12:00:48] <dvander> nmatsakis, improving inline heuristics is also very twitchy and complicated [12:01:20] <dvander> nmatsakis, we have hints in C++, it makes sense to have those hints for self-hosted code as well IMO. it doesn't have to be something we expose to the web
Comment 6•11 years ago
|
||
Attachment #756718 -
Flags: review?(dvander)
Updated•11 years ago
|
Attachment #756718 -
Flags: review?(dvander) → review+
Comment 7•11 years ago
|
||
Carrying over r+ from dvander.
Attachment #756718 -
Attachment is obsolete: true
Attachment #774145 -
Flags: review+
Comment 9•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/8ef0e9fa1f16
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
You need to log in
before you can comment on or make changes to this bug.
Description
•