Closed Bug 897866 Opened 11 years ago Closed 11 years ago

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

Categories

(Core :: JavaScript Engine, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla25

People

(Reporter: efaust, Assigned: efaust)

Details

Attachments

(1 file)

Attached patch PatchSplinter Review
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
https://hg.mozilla.org/mozilla-central/rev/d0282b81e0cc
Status: ASSIGNED → 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.

Attachment

General

Created:
Updated:
Size: