本文整理汇总了C++中TypeSet::isSubsetIgnorePrimitives方法的典型用法代码示例。如果您正苦于以下问题:C++ TypeSet::isSubsetIgnorePrimitives方法的具体用法?C++ TypeSet::isSubsetIgnorePrimitives怎么用?C++ TypeSet::isSubsetIgnorePrimitives使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TypeSet
的用法示例。
在下文中一共展示了TypeSet::isSubsetIgnorePrimitives方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: targetScript
bool
TypeInferenceOracle::canEnterInlinedFunction(HandleScript caller, jsbytecode *pc, JSFunction *target)
{
AssertCanGC();
RootedScript targetScript(cx, target->nonLazyScript());
if (!targetScript->hasAnalysis() || !targetScript->analysis()->ranInference())
return false;
if (!targetScript->analysis()->ionInlineable())
return false;
if (targetScript->analysis()->usesScopeChain())
return false;
if (target->getType(cx)->unknownProperties())
return false;
JSOp op = JSOp(*pc);
TypeSet *returnTypes = TypeScript::ReturnTypes(targetScript);
TypeSet *callReturn = getCallReturn(caller, pc);
if (op == JSOP_NEW) {
if (!returnTypes->isSubsetIgnorePrimitives(callReturn))
return false;
} else {
if (!returnTypes->isSubset(callReturn))
return false;
}
// TI calls ObjectStateChange to trigger invalidation of the caller.
HeapTypeSet::WatchObjectStateChange(cx, target->getType(cx));
return true;
}
示例2: targetScript
bool
TypeInferenceOracle::canEnterInlinedFunction(RawScript caller, jsbytecode *pc, RawFunction target)
{
RootedScript targetScript(cx, target->nonLazyScript());
// Make sure empty script has type information, to allow inlining in more cases.
if (targetScript->length == 1) {
if (!targetScript->ensureRanInference(cx))
return false;
}
if (!targetScript->hasAnalysis() ||
!targetScript->analysis()->ranInference() ||
!targetScript->analysis()->ranSSA())
{
return false;
}
if (!targetScript->analysis()->ionInlineable())
return false;
if (targetScript->needsArgsObj())
return false;
if (!targetScript->compileAndGo)
return false;
if (targetScript->analysis()->usesScopeChain())
return false;
types::TypeObject *targetType = target->getType(cx);
if (!targetType || targetType->unknownProperties())
return false;
JSOp op = JSOp(*pc);
TypeSet *returnTypes = TypeScript::ReturnTypes(targetScript);
TypeSet *callReturn = getCallReturn(caller, pc);
if (op == JSOP_NEW) {
if (!returnTypes->isSubsetIgnorePrimitives(callReturn))
return false;
} else {
if (!returnTypes->isSubset(callReturn))
return false;
}
// TI calls ObjectStateChange to trigger invalidation of the caller.
HeapTypeSet::WatchObjectStateChange(cx, targetType);
return true;
}
示例3: targetScript
bool
TypeInferenceOracle::callReturnTypeSetMatches(RawScript callerScript, jsbytecode *callerPc,
RawFunction callee)
{
RootedScript targetScript(cx, callee->nonLazyScript());
JSOp op = JSOp(*callerPc);
TypeSet *returnTypes = TypeScript::ReturnTypes(targetScript);
TypeSet *callReturn = getCallReturn(callerScript, callerPc);
if (op == JSOP_NEW) {
if (!returnTypes->isSubsetIgnorePrimitives(callReturn))
return false;
} else {
if (!returnTypes->isSubset(callReturn))
return false;
}
return true;
}