Closed
Bug 884310
Opened 11 years ago
Closed 11 years ago
IonMonkey: inline function called from .call()
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla24
People
(Reporter: h4writer, Assigned: h4writer)
References
Details
Attachments
(1 file)
(deleted),
patch
|
jandem
:
review+
|
Details | Diff | Splinter Review |
I implemented a similar fix for .apply(..., arguments). It should be possible to do the same for .call(...) calls. This will probably also give a deltablue improvement. Can't measure how much yet.
Assignee | ||
Comment 1•11 years ago
|
||
This would be a 5% improvement on v8-deltablue
Assignee | ||
Comment 2•11 years ago
|
||
It was simpler than expected.
Assignee: general → hv1989
Attachment #764420 -
Flags: review?(jdemooij)
Comment 3•11 years ago
|
||
Comment on attachment 764420 [details] [diff] [review]
Patch
Review of attachment 764420 [details] [diff] [review]:
-----------------------------------------------------------------
Nice!
::: js/src/ion/BaselineBailouts.cpp
@@ +656,4 @@
> #ifdef DEBUG
> uint32_t expectedDepth = js_ReconstructStackDepth(cx, script,
> resumeAfter ? GetNextPc(pc) : pc);
> + if (!iter.moreFrames() || resumeAfter) {
Nit: I think this would test the assert in more cases:
if (op != JSOP_FUNAPPLY || !iter.moreFrames() || resumeAfter) {
if (op == JSOP_FUNCALL) {
..
} else {
..
}
}
@@ +882,5 @@
> unsigned actualArgc = GET_ARGC(pc);
> if (op == JSOP_FUNAPPLY)
> actualArgc = blFrame->numActualArgs();
> + if (op == JSOP_FUNCALL)
> + actualArgc--;
As discussed on IRC, I think you can change this to
if (op == JSOP_FUNAPPLY || op == JSOP_FUNCALL)
actualArgc = blFrame->numActualArgs();
::: js/src/ion/IonBuilder.cpp
@@ +4545,5 @@
> // |this| becomes implicit in the call.
> argc -= 1;
> }
>
> // Call without inlining.
Nit: move this comment to the end of the method.
::: js/src/ion/IonFrames.cpp
@@ +1255,5 @@
> // Recover the number of actual arguments from the script.
> if (JSOp(*pc_) != JSOP_FUNAPPLY)
> numActualArgs_ = GET_ARGC(pc_);
> + if (JSOp(*pc_) == JSOP_FUNCALL)
> + numActualArgs_ = GET_ARGC(pc_) - 1;
As discussed on IRC, this probably fails if we don't inline the FUNCALL. I think you can change the FUNAPPLY condition to:
if (JSOp(*pc) != JSOP_FUNAPPLY && JSOp(*pc) != JSOP_FUNCALL)
Attachment #764420 -
Flags: review?(jdemooij) → review+
Assignee | ||
Comment 4•11 years ago
|
||
Comment 5•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in
before you can comment on or make changes to this bug.
Description
•