本文整理汇总了C++中AnalysisResultPtr::containsDynamicFunctionCall方法的典型用法代码示例。如果您正苦于以下问题:C++ AnalysisResultPtr::containsDynamicFunctionCall方法的具体用法?C++ AnalysisResultPtr::containsDynamicFunctionCall怎么用?C++ AnalysisResultPtr::containsDynamicFunctionCall使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AnalysisResultPtr
的用法示例。
在下文中一共展示了AnalysisResultPtr::containsDynamicFunctionCall方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: inferTypes
TypePtr DynamicFunctionCall::inferTypes(AnalysisResultPtr ar, TypePtr type,
bool coerce) {
reset();
ConstructPtr self = shared_from_this();
if (!m_className.empty()) {
ClassScopePtr cls = resolveClass();
if (!cls) {
if (isRedeclared()) {
getScope()->getVariables()->
setAttribute(VariableTable::NeedGlobalPointer);
} else if (getScope()->isFirstPass()) {
Compiler::Error(Compiler::UnknownClass, self);
}
} else {
m_classScope = cls;
}
}
ar->containsDynamicFunctionCall();
if (m_class) {
m_class->inferAndCheck(ar, Type::Any, false);
}
m_nameExp->inferAndCheck(ar, Type::String, false);
if (m_params) {
for (int i = 0; i < m_params->getCount(); i++) {
(*m_params)[i]->inferAndCheck(ar, Type::Variant, true);
}
}
return Type::Variant;
}
示例2: inferTypes
TypePtr DynamicFunctionCall::inferTypes(AnalysisResultPtr ar, TypePtr type,
bool coerce) {
reset();
ConstructPtr self = shared_from_this();
if (!m_className.empty()) {
ClassScopePtr cls = ar->resolveClass(m_className);
if (!cls || cls->isRedeclaring()) {
if (cls) {
m_redeclared = true;
ar->getScope()->getVariables()->
setAttribute(VariableTable::NeedGlobalPointer);
}
if (!cls && ar->isFirstPass()) {
ar->getCodeError()->record(self, CodeError::UnknownClass, self);
}
} else {
m_validClass = true;
}
}
ar->containsDynamicFunctionCall();
if (ar->isFirstPass()) {
ar->getCodeError()->record(self, CodeError::UseDynamicFunction, self);
}
m_nameExp->inferAndCheck(ar, Type::String, false);
if (m_params) {
for (int i = 0; i < m_params->getCount(); i++) {
(*m_params)[i]->inferAndCheck(ar, Type::Variant, true);
}
}
return Type::Variant;
}