Esempio n. 1
0
void LinearScan::collectNativesAux(Trace* trace) {
  for (IRInstruction* inst : trace->getInstructionList()) {
    if (inst->isNative()) {
      m_natives.push_back(inst);
    }
    if (inst->isControlFlowInstruction()) {
      LabelInstruction* label = inst->getLabel();
      if (label != NULL && label->getId() == inst->getId() + 1) {
        collectNativesAux(label->getParent());
      }
    }
  }
}
Esempio n. 2
0
void LinearScan::collectNativesAux(Trace* trace) {
  IRInstruction::List& instList = trace->getInstructionList();
  for (IRInstruction::Iterator it = instList.begin();
       it != instList.end();
       ++it) {
    IRInstruction* inst = *it;
    if (inst->isNative()) {
      m_natives.push_back(inst);
    }
    if (inst->isControlFlowInstruction()) {
      LabelInstruction* label = inst->getLabel();
      if (label != NULL && label->getId() == inst->getId() + 1) {
        collectNativesAux(label->getTrace());
      }
    }
  }
}
Esempio n. 3
0
void LinearScan::collectNatives(Trace* trace) {
  // May be re-executed. Need initialize <m_natives> each time.
  m_natives.clear();
  collectNativesAux(trace);
}