Closed
Bug 958797
Opened 10 years ago
Closed 10 years ago
Give functions gotten from the Function constructor scripted function types.
Categories
(Core :: JavaScript Engine: JIT, defect)
Core
JavaScript Engine: JIT
Tracking
()
RESOLVED
FIXED
mozilla29
People
(Reporter: shu, Assigned: shu)
Details
Attachments
(1 file)
1.19 KB,
patch
|
jandem
:
review+
|
Details | Diff | Splinter Review |
We apparently never set the type of Function constructor'd functions to be scripted function types, meaning they aren't inlined. This is a result of debugging the slowdown from http://jsperf.com/function-vs-constructor-vs-eval/19, which bz showed me.
Assignee | ||
Comment 1•10 years ago
|
||
Is this a regression? I didn't check, maybe we used to do this and somewhere it got deleted?
Attachment #8358740 -
Flags: review?(jdemooij)
Comment 2•10 years ago
|
||
Comment on attachment 8358740 [details] [diff] [review] Give functions gotten from the Function constructor scripted function types. Review of attachment 8358740 [details] [diff] [review]: ----------------------------------------------------------------- Ugh, nice catch. ::: js/src/jsfun.cpp @@ +1658,5 @@ > JSFunction::FinalizeKind, TenuredObject)); > if (!fun) > return false; > > + if (!JSFunction::setTypeForScriptedFunction(cx, fun, /* singleton = */ false)) Nit: the last argument defaults to false so you could remove it; either way is fine with me.
Attachment #8358740 -
Flags: review?(jdemooij) → review+
Assignee | ||
Comment 3•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/bf8de5ab6d04
Comment 4•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/bf8de5ab6d04
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
You need to log in
before you can comment on or make changes to this bug.
Description
•