If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Rename types::IsInlinableCall() ion::IsIonInlinableCall()

RESOLVED FIXED in mozilla25

Status

()

Core
JavaScript Engine
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: efaust, Assigned: efaust)

Tracking

unspecified
mozilla25
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

4 years ago
Created attachment 780826 [details] [diff] [review]
Patch

Previously, this was used in methodjit as well, so it made sense to keep it in some neutral place. Currently, there are only two callsites, both in IonBuilder.cpp. There are some other asserts that could be cleaned up as well, so this seems like as good a time as any to do it.
Attachment #780826 - Flags: review?(hv1989)
Comment on attachment 780826 [details] [diff] [review]
Patch

Review of attachment 780826 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/src/ion/BaselineBailouts.cpp
@@ -1006,5 @@
>      prevFramePtr = builder.virtualPointerAtStackOffset(0);
>  
>      // Write out actual arguments (and thisv), copied from unpacked stack of BaselineJS frame.
>      // Arguments are reversed on the BaselineJS frame's stack values.
> -    JS_ASSERT(isCall || IsGetterPC(pc) || IsSetterPC(pc));

In that same file, about 300 lines higher you will find:
bool isCall = js_CodeSpec[op].format & JOF_INVOKE;

please use IsCallPC for this too;

::: js/src/ion/Ion.h
@@ +350,5 @@
> +IsIonInlinablePC(jsbytecode *pc) {
> +    // CALL, FUNCALL, FUNAPPLY, EVAL, NEW (JOF_INVOKE callsites)
> +    // GETPROP, CALLPROP, and LENGTH. (Inlined Getters)
> +    // SETPROP, SETNAME, SETGNAME (Inlined Setters)
> +    return js_CodeSpec[*pc].format & JOF_INVOKE || IsGetterPC(pc) || IsSetterPC(pc);

Like discussed on IRC add a function isCallPC(pc) to jsopcode.h that does this check.
Attachment #780826 - Flags: review?(hv1989) → review+
Ah and while you are there, can you also edit jsopcode.h:
#define JOF_INVOKE       (1U<<21) /* JSOP_CALL, JSOP_NEW, JSOP_EVAL */

to contain FUNCALL/FUNAPPLY
(Assignee)

Comment 3

4 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/d0282b81e0cc

Comment 4

4 years ago
https://hg.mozilla.org/mozilla-central/rev/d0282b81e0cc
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
You need to log in before you can comment on or make changes to this bug.