示例#1
0
文件: file_scope.cpp 项目: enov/hhvm
static void getFuncScopesSet(BlockScopeRawPtrQueue &v,
                             const StringToFunctionScopePtrMap &funcMap) {
  for (const auto& iter : funcMap) {
    FunctionScopePtr f = iter.second;
    if (!f->isBuiltin()) {
      v.push_back(f);
    }
  }
}
示例#2
0
文件: file_scope.cpp 项目: enov/hhvm
void FileScope::getScopesSet(BlockScopeRawPtrQueue &v) {
  for (const auto& clsVec : getClasses()) {
    for (const auto cls : clsVec.second) {
      if (cls->getStmt()) {
        v.push_back(cls);
        getFuncScopesSet(v, cls->getFunctions());
      }
    }
  }

  getFuncScopesSet(v, getFunctions());
  if (const auto redec = m_redeclaredFunctions) {
    for (const auto& funcVec : *redec) {
      auto i = funcVec.second.begin(), e = funcVec.second.end();
      v.insert(v.end(), ++i, e);
    }
  }
}