示例#1
0
        foreach (const QmcUnitExceptionPropagationJump &jump, exceptionPropagationJumps) {

#if CPU(ARM_THUMB2)
            QV4::JIT::Assembler::Jump asJump(jump.label, jump.type, jump.condition);
#elif CPU(SH4)
            QV4::JIT::Assembler::Jump asJump(jump.label, jump.type);
#else
            QV4::JIT::Assembler::Jump asJump(jump.label);
#endif

            as->exceptionPropagationJumps.append(asJump);
        }
示例#2
0
void Function::dump(std::ostream& out) {
  auto it = begin();
  while (it != end()) {
    auto block = *it++;
    auto nextBlock = it != end() ? *it : nullptr;
    out << ".L" << block->index << ":";
    for (auto s: *block) {
      if (s->asTerminator())
        break;
      out << '\t';
      s->dump(out);
    }
    auto t = block->terminator();
    assert(t);
    auto j = t->asJump();
    auto cj = t->asCJump();
    if (j && j->target() == nextBlock) {
      // nothing to do
      out << std::endl;
    } else if (cj && cj->iffalse() == nextBlock) {
      out << "\tif (";
      cj->expr()->dump(out);
      out << ") goto .L" << cj->iftrue()->index << ';' << std::endl;
    } else if (cj && cj->iftrue() == nextBlock) {
      out << "\tiffalse (";
      cj->expr()->dump(out);
      out << ") goto .L" << cj->iffalse()->index << ';' << std::endl;
    } else {
      out << '\t';
      t->dump(out);
    }
  }
}