void BuiltinSymbols::LoadHelperFunctions(
  AnalysisResultPtr ar,
  StringToFunctionScopePtrVecMap &functions) {
  ASSERT(Loaded);
  for (StringToFunctionScopePtrMap::const_iterator it =
          s_helperFunctions.begin(); it != s_helperFunctions.end(); ++it) {
    if (functions.find(it->first) == functions.end()) {
      functions[it->first].push_back(it->second);
    }
  }
}
Пример #2
0
void BuiltinSymbols::LoadFunctions(AnalysisResultPtr ar,
                                   StringToFunctionScopePtrVecMap &functions) {
  ASSERT(Loaded);
  for (StringToFunctionScopePtrMap::const_iterator it = s_functions.begin();
       it != s_functions.end(); ++it) {
    if (functions.find(it->first) == functions.end()) {
      functions[it->first].push_back(it->second);
      ar->getDependencyGraph()->addParent(DependencyGraph::KindOfFunctionCall,
                                          "", it->first, StatementPtr());
      FunctionScope::RecordRefParamInfo(it->first, it->second);
    }
  }
}