mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 897866 - Move types::IsInlinableCall() to Ion.h as ion::IsIonInlinablePC() (r=h4writer)
This commit is contained in:
parent
cf79b171a3
commit
f7422ed3c0
@ -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,
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -1313,8 +1313,7 @@ InlineFrameIteratorMaybeGC<allowGC>::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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user