Esempio n. 1
0
void genCode(IRUnit& unit) {
  if (dumpIREnabled()) {
    AsmInfo ai(unit);
    genCodeImpl(unit, &ai);
  } else {
    genCodeImpl(unit, nullptr);
  }
}
Esempio n. 2
0
void genCode(CodeBlock& main, CodeBlock& stubs, IRUnit& unit,
             std::vector<TransBCMapping>* bcMap,
             JIT::MCGenerator* mcg,
             const RegAllocInfo& regs) {
  Timer _t(Timer::codeGen);

  if (dumpIREnabled()) {
    AsmInfo ai(unit);
    genCodeImpl(main, stubs, unit, bcMap, mcg, regs, &ai);
    printUnit(kCodeGenLevel, unit, " after code gen ", &regs, &ai);
  } else {
    genCodeImpl(main, stubs, unit, bcMap, mcg, regs, nullptr);
  }
}