diff --git a/js/src/ion/BaselineBailouts.cpp b/js/src/ion/BaselineBailouts.cpp index 5dd14af9d70..930b65ca2ba 100644 --- a/js/src/ion/BaselineBailouts.cpp +++ b/js/src/ion/BaselineBailouts.cpp @@ -1007,7 +1007,7 @@ InitFromBailout(JSContext *cx, HandleScript caller, jsbytecode *callerPC, // 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)); + JS_ASSERT(IsIonInlinablePC(pc)); unsigned actualArgc; if (needToSaveArgs) { // For FUNAPPLY or an accessor, the arguments are not on the stack anymore, diff --git a/js/src/ion/Ion.h b/js/src/ion/Ion.h index a2a8725db2b..0663d87de1b 100644 --- a/js/src/ion/Ion.h +++ b/js/src/ion/Ion.h @@ -346,6 +346,14 @@ IsEnabled(JSContext *cx) cx->typeInferenceEnabled(); } +inline bool +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); +} + void ForbidCompilation(JSContext *cx, JSScript *script); void ForbidCompilation(JSContext *cx, JSScript *script, ExecutionMode mode); uint32_t UsesBeforeIonRecompile(JSScript *script, jsbytecode *pc); diff --git a/js/src/ion/IonBuilder.cpp b/js/src/ion/IonBuilder.cpp index 949d4b71d7c..a5e21f474d9 100644 --- a/js/src/ion/IonBuilder.cpp +++ b/js/src/ion/IonBuilder.cpp @@ -3429,7 +3429,7 @@ bool IonBuilder::inlineScriptedCall(CallInfo &callInfo, JSFunction *target) { JS_ASSERT(target->isInterpreted()); - JS_ASSERT(types::IsInlinableCall(pc)); + JS_ASSERT(IsIonInlinablePC(pc)); // Remove any MPassArgs. if (callInfo.isWrapped()) @@ -4095,7 +4095,7 @@ IonBuilder::inlineCalls(CallInfo &callInfo, AutoObjectVector &targets, MGetPropertyCache *maybeCache) { // Only handle polymorphic inlining. - JS_ASSERT(types::IsInlinableCall(pc)); + JS_ASSERT(IsIonInlinablePC(pc)); JS_ASSERT(choiceSet.length() == targets.length()); JS_ASSERT_IF(!maybeCache, targets.length() >= 2); JS_ASSERT_IF(maybeCache, targets.length() >= 1); diff --git a/js/src/ion/IonFrames.cpp b/js/src/ion/IonFrames.cpp index df5a9bcdf1b..1291b4c835e 100644 --- a/js/src/ion/IonFrames.cpp +++ b/js/src/ion/IonFrames.cpp @@ -1313,8 +1313,7 @@ InlineFrameIteratorMaybeGC::findNextFrame() // before reading inner ones. unsigned remaining = start_.frameCount() - framesRead_ - 1; for (unsigned i = 0; i < remaining; i++) { - JS_ASSERT(js_CodeSpec[*pc_].format & JOF_INVOKE || - IsGetterPC(pc_) || IsSetterPC(pc_)); + JS_ASSERT(IsIonInlinablePC(pc_)); // Recover the number of actual arguments from the script. if (JSOp(*pc_) != JSOP_FUNAPPLY) diff --git a/js/src/jsinferinlines.h b/js/src/jsinferinlines.h index 5f67efa83eb..4d32501386b 100644 --- a/js/src/jsinferinlines.h +++ b/js/src/jsinferinlines.h @@ -301,24 +301,6 @@ TypeIdString(jsid id) #endif } -/* Assert code to know which PCs are reasonable to be considering inlining on. */ -inline bool -IsInlinableCall(jsbytecode *pc) -{ - JSOp op = JSOp(*pc); - - // CALL, FUNCALL, FUNAPPLY, EVAL (Standard callsites) - // NEW (IonMonkey-only callsite) - // GETPROP, CALLPROP, and LENGTH. (Inlined Getters) - // SETPROP, SETNAME, SETGNAME (Inlined Setters) - return op == JSOP_CALL || op == JSOP_FUNCALL || op == JSOP_FUNAPPLY || op == JSOP_EVAL || -#ifdef JS_ION - op == JSOP_NEW || -#endif - op == JSOP_GETPROP || op == JSOP_CALLPROP || op == JSOP_LENGTH || - op == JSOP_SETPROP || op == JSOP_SETGNAME || op == JSOP_SETNAME; -} - /* * Structure for type inference entry point functions. All functions which can * change type information must use this, and functions which depend on