本文整理汇总了C++中FunctionScopePtr::isSepExtension方法的典型用法代码示例。如果您正苦于以下问题:C++ FunctionScopePtr::isSepExtension方法的具体用法?C++ FunctionScopePtr::isSepExtension怎么用?C++ FunctionScopePtr::isSepExtension使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FunctionScopePtr
的用法示例。
在下文中一共展示了FunctionScopePtr::isSepExtension方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: analyzeProgramImpl
void MethodStatement::analyzeProgramImpl(AnalysisResultPtr ar) {
FunctionScopePtr funcScope = m_funcScope.lock();
if (ar->isAnalyzeInclude()) {
if (funcScope->isSepExtension() ||
BuiltinSymbols::IsDeclaredDynamic(m_name) ||
Option::IsDynamicFunction(m_method, m_name) || Option::AllDynamic) {
funcScope->setDynamic();
}
}
funcScope->setIncludeLevel(ar->getIncludeLevel());
if (m_params) {
m_params->analyzeProgram(ar);
if (Option::GenRTTIProfileData &&
ar->getPhase() == AnalysisResult::AnalyzeFinal) {
addParamRTTI(ar);
}
}
if (m_stmt) m_stmt->analyzeProgram(ar);
if (ar->isAnalyzeInclude()) {
if (!funcScope->isStatic() && getClassScope() &&
funcScope->getVariables()->
getAttribute(VariableTable::ContainsDynamicVariable)) {
// Add this to variable table if we'll need it in a lookup table
// Use object because there's no point to specializing, just makes
// code gen harder when dealing with redeclared classes.
TypePtr tp(Type::Object);
funcScope->getVariables()->add("this", tp, true, ar, shared_from_this(),
ModifierExpressionPtr());
}
FunctionScope::RecordRefParamInfo(m_name, funcScope);
}
}
示例2: analyzeProgramImpl
void MethodStatement::analyzeProgramImpl(AnalysisResultPtr ar) {
FunctionScopePtr funcScope = m_funcScope.lock();
// registering myself as a parent in dependency graph, so that
// (1) we can tell orphaned parents
// (2) overwrite non-master copy of function declarations
if (ar->isFirstPass()) {
ar->getDependencyGraph()->addParent(DependencyGraph::KindOfFunctionCall,
"", getFullName(), shared_from_this());
if (Option::AllDynamic || hasHphpNote("Dynamic") ||
funcScope->isSepExtension() ||
BuiltinSymbols::IsDeclaredDynamic(m_name) ||
Option::IsDynamicFunction(m_method, m_name)) {
funcScope->setDynamic();
}
if (hasHphpNote("Volatile")) funcScope->setVolatile();
}
funcScope->setIncludeLevel(ar->getIncludeLevel());
ar->pushScope(funcScope);
if (m_params) {
m_params->analyzeProgram(ar);
if (Option::GenRTTIProfileData &&
ar->getPhase() == AnalysisResult::AnalyzeFinal) {
addParamRTTI(ar);
}
}
if (m_stmt) m_stmt->analyzeProgram(ar);
if (ar->isFirstPass()) {
if (!funcScope->isStatic() && ar->getClassScope() &&
funcScope->getVariables()->
getAttribute(VariableTable::ContainsDynamicVariable)) {
// Add this to variable table if we'll need it in a lookup table
// Use object because there's no point to specializing, just makes
// code gen harder when dealing with redeclared classes.
TypePtr tp(NEW_TYPE(Object));
funcScope->getVariables()->add("this", tp, true, ar, shared_from_this(),
ModifierExpressionPtr());
}
FunctionScope::RecordRefParamInfo(m_name, funcScope);
}
ar->popScope();
}