当前位置: 首页>>代码示例>>C++>>正文


C++ BCMarker::valid方法代码示例

本文整理汇总了C++中BCMarker::valid方法的典型用法代码示例。如果您正苦于以下问题:C++ BCMarker::valid方法的具体用法?C++ BCMarker::valid怎么用?C++ BCMarker::valid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BCMarker的用法示例。


在下文中一共展示了BCMarker::valid方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: setMarker

void TraceBuilder::setMarker(BCMarker marker) {
  if (m_curMarker == marker) return;
  FTRACE(2, "TraceBuilder changing current marker from {} to {}\n",
         m_curMarker.func ? m_curMarker.show() : "<invalid>", marker.show());
  assert(marker.valid());
  m_curMarker = marker;
}
开发者ID:bnovoa,项目名称:hiphop-php,代码行数:7,代码来源:trace-builder.cpp

示例2: genBlock

static void genBlock(IRUnit& unit, CodeBlock& cb, CodeBlock& stubsCode,
                     MCGenerator* mcg, CodegenState& state, Block* block,
                     std::vector<TransBCMapping>* bcMap) {
  FTRACE(6, "genBlock: {}\n", block->id());
  std::unique_ptr<CodeGenerator> cg(mcg->backEnd().newCodeGenerator(unit, cb,
                                                                    stubsCode,
                                                                    mcg,
                                                                    state));

  BCMarker prevMarker;
  for (IRInstruction& instr : *block) {
    IRInstruction* inst = &instr;
    // If we're on the first instruction of the block or we have a new
    // marker since the last instruction, update the bc mapping.
    if ((!prevMarker.valid() || inst->marker() != prevMarker) &&
        (mcg->tx().isTransDBEnabled() ||
        RuntimeOption::EvalJitUseVtuneAPI) && bcMap) {
      bcMap->push_back(TransBCMapping{inst->marker().func()->unit()->md5(),
                                      inst->marker().bcOff(),
                                      cb.frontier(),
                                      stubsCode.frontier()});
      prevMarker = inst->marker();
    }
    auto* addr = cg->cgInst(inst);
    if (state.asmInfo && addr) {
      state.asmInfo->updateForInstruction(inst, addr, cb.frontier());
    }
  }
}
开发者ID:aitoroses,项目名称:hhvm,代码行数:29,代码来源:code-gen.cpp

示例3: setMarker

void IRBuilder::setMarker(BCMarker marker) {
  auto const oldMarker = m_state.marker();

  if (marker == oldMarker) return;
  FTRACE(2, "IRBuilder changing current marker from {} to {}\n",
         oldMarker.func ? oldMarker.show() : "<invalid>", marker.show());
  assert(marker.valid());
  m_state.setMarker(marker);
}
开发者ID:ttottodominguez,项目名称:hhvm,代码行数:9,代码来源:ir-builder.cpp

示例4: makeFixup

Fixup makeFixup(const BCMarker& marker, SyncOptions sync) {
    assertx(marker.valid());
    auto const stackOff = [&] {
        switch (sync) {
        case SyncOptions::SyncAdjustOne:
            return marker.spOff() -= 1;

        case SyncOptions::None:
            // We can get here if we are memory profiling, since we override the
            // normal sync settings and sync anyway.
            always_assert(RuntimeOption::HHProfEnabled);
        // fallthru
        case SyncOptions::Sync:
            return marker.spOff();
        }
        not_reached();
    }();

    auto const bcOff = marker.fixupBcOff() - marker.fixupFunc()->base();
    return Fixup{bcOff, stackOff.offset};
}
开发者ID:shantanusharma,项目名称:hhvm,代码行数:21,代码来源:irlower-internal.cpp

示例5: cgBlock

void CodeGenerator::cgBlock(Block* block, vector<TransBCMapping>* bcMap) {
  FTRACE(6, "cgBlock: {}\n", block->id());

  BCMarker prevMarker;
  for (IRInstruction& instr : *block) {
    IRInstruction* inst = &instr;
    // If we're on the first instruction of the block or we have a new
    // marker since the last instruction, update the bc mapping.
    if ((!prevMarker.valid() || inst->marker() != prevMarker) &&
        m_tx64->isTransDBEnabled() && bcMap) {
      bcMap->push_back(TransBCMapping{inst->marker().func->unit()->md5(),
                                      inst->marker().bcOff,
                                      m_as.frontier(),
                                      m_astubs.frontier()});
      prevMarker = inst->marker();
    }
    auto* addr = cgInst(inst);
    if (m_state.asmInfo && addr) {
      m_state.asmInfo->updateForInstruction(inst, addr, m_as.frontier());
    }
  }
}
开发者ID:EloB,项目名称:hhvm,代码行数:22,代码来源:code-gen-arm.cpp


注:本文中的BCMarker::valid方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。