hphp/hhbbc/whole-program.cpp
// Return all the WorkItems we'll need to start analyzing this
// program.
Return all the WorkItems we'll need to start analyzing this
program.
Return all the WorkItems we ' ll need to start analyzing this program .
std::vector<WorkItem> initial_work(const php::Program& program) {
  std::vector<WorkItem> ret;
  if (!options.HardPrivatePropInference) {
    auto const ctxs = all_function_contexts(program);
    std::transform(begin(ctxs), end(ctxs), std::back_inserter(ret),
      [&] (Context ctx) { return WorkItem { WorkType::Func, ctx }; }
    );
    return ret;
  }
  for (auto& u : program.units) {
    for (auto& c : u->classes) {
      ret.emplace_back(WorkType::Class,
                       Context { borrow(u), nullptr, borrow(c) });
    }
    for (auto& f : u->funcs) {
      ret.emplace_back(WorkType::Func, Context { borrow(u), borrow(f) });
    }
  }
  return ret;
}
std :: vector < WorkItem > initial_work ( const php :: Program & program ) { std :: vector < WorkItem > ret ; if ( ! options . HardPrivatePropInference ) { auto const ctxs = all_function_contexts ( program ) ; std :: transform ( begin ( ctxs ) , end ( ctxs ) , std :: back_inserter ( ret ) , [ & ] ( Context ctx ) { return WorkItem { WorkType :: Func , ctx } ; } ) ; return ret ; } for ( auto & u : program . units ) { for ( auto & c : u -> classes ) { ret . emplace_back ( WorkType :: Class , Context { borrow ( u ) , nullptr , borrow ( c ) } ) ; } for ( auto & f : u -> funcs ) { ret . emplace_back ( WorkType :: Func , Context { borrow ( u ) , borrow ( f ) } ) ; } } return ret ; }
Return all the WorkItems we'll need to start analyzing this
program.
Return all the WorkItems we ' ll need to start analyzing this program .
/*
   * If we're not doing private property inference, schedule only
   * function-at-a-time work items.
   */