StatementPtr MethodStatement::preOptimize(AnalysisResultPtr ar) { if (ar->getPhase() != AnalysisResult::AnalyzeInclude && Option::LocalCopyProp) { int flag; do { AliasManager am; MethodStatementPtr self = static_pointer_cast<MethodStatement>(shared_from_this()); flag = am.optimize(ar, self); } while (flag); } return StatementPtr(); }
StatementPtr MethodStatement::preOptimize(AnalysisResultPtr ar) { ar->preOptimize(m_modifiers); ar->preOptimize(m_params); FunctionScopePtr funcScope = m_funcScope.lock(); ar->pushScope(funcScope); if (ar->getPhase() != AnalysisResult::AnalyzeInclude && AliasManager::doLocalCopyProp()) { bool flag; do { AliasManager am; MethodStatementPtr self = static_pointer_cast<MethodStatement>(shared_from_this()); flag = am.optimize(ar, self); ar->preOptimize(m_stmt); } while (flag); } else { ar->preOptimize(m_stmt); } ar->popScope(); return StatementPtr(); }