本文整理汇总了C++中OffsetRangeVec::end方法的典型用法代码示例。如果您正苦于以下问题:C++ OffsetRangeVec::end方法的具体用法?C++ OffsetRangeVec::end怎么用?C++ OffsetRangeVec::end使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OffsetRangeVec
的用法示例。
在下文中一共展示了OffsetRangeVec::end方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addRanges
int PCFilter::addRanges(const Unit* unit, const OffsetRangeVec& offsets) {
int counter = 0;
for (OffsetRangeVec::const_iterator it = offsets.begin();
it != offsets.end(); ++it) {
for (PC pc = unit->at(it->m_base); pc < unit->at(it->m_past);
pc += instrLen((Opcode*)pc)) {
addPC(pc);
counter++;
}
}
return counter;
}
示例2: blacklistRangesInJit
// Ensure we interpret all code at the given offsets. This sets up a guard for
// each piece of tranlated code to ensure we punt ot the interpreter when the
// debugger is attached.
static void blacklistRangesInJit(const Unit* unit,
const OffsetRangeVec& offsets) {
for (OffsetRangeVec::const_iterator it = offsets.begin();
it != offsets.end(); ++it) {
for (PC pc = unit->at(it->m_base); pc < unit->at(it->m_past);
pc += instrLen((Opcode*)pc)) {
transl()->addDbgBLPC(pc);
}
}
if (!transl()->addDbgGuards(unit)) {
Logger::Warning("Failed to set breakpoints in Jitted code");
}
}
示例3: getOffsetRanges
bool Unit::getOffsetRanges(int line, OffsetRangeVec& offsets) const {
ASSERT(offsets.size() == 0);
if (m_repoId == RepoIdInvalid) {
return false;
}
UnitRepoProxy& urp = Repo::get().urp();
if (urp.getSourceLocPastOffsets(m_repoId).get(m_sn, line, offsets)) {
return false;
}
for (OffsetRangeVec::iterator it = offsets.begin(); it != offsets.end();
++it) {
if (urp.getSourceLocBaseOffset(m_repoId).get(m_sn, *it)) {
return false;
}
}
return true;
}
示例4: blacklistRangesInJit
// Ensure we interpret all code at the given offsets. This sets up a guard for
// each piece of translated code to ensure we punt to the interpreter when the
// debugger is attached.
static void blacklistRangesInJit(const Unit* unit,
const OffsetRangeVec& offsets) {
for (OffsetRangeVec::const_iterator it = offsets.begin();
it != offsets.end(); ++it) {
for (PC pc = unit->at(it->m_base); pc < unit->at(it->m_past);
pc += instrLen((Opcode*)pc)) {
transl()->addDbgBLPC(pc);
}
}
if (!transl()->addDbgGuards(unit)) {
Logger::Warning("Failed to set breakpoints in Jitted code");
}
// In this case, we may be setting a breakpoint in a tracelet which could
// already be jitted, and present on the stack. Make sure we don't return
// to it so we have a chance to honor breakpoints.
g_vmContext->preventReturnsToTC();
}
示例5: addBreakPointsInFile
static void addBreakPointsInFile(Eval::DebuggerProxy* proxy,
Eval::PhpFile* efile) {
Eval::BreakPointInfoPtrVec bps;
proxy->getBreakPoints(bps);
for(unsigned int i = 0; i < bps.size(); i++) {
Eval::BreakPointInfoPtr bp = bps[i];
if (bp->m_line1 == 0 || bp->m_file.empty()) {
// invalid breakpoint for file:line
continue;
}
if (!Eval::BreakPointInfo::MatchFile(bp->m_file, efile->getFileName(),
efile->getRelPath())) {
continue;
}
Unit* unit = efile->unit();
OffsetRangeVec offsets;
if (!unit->getOffsetRanges(bp->m_line1, offsets)) {
continue;
}
if (!g_vmContext->m_breakPointFilter) {
g_vmContext->m_breakPointFilter = new PCFilter();
}
if (debug && Trace::moduleEnabled(Trace::bcinterp, 5)) {
for (OffsetRangeVec::const_iterator it = offsets.begin();
it != offsets.end(); ++it) {
Trace::trace("file:line break %s:%d : unit %p offset [%d, %d)\n",
efile->getFileName().c_str(), bp->m_line1, unit,
it->m_base, it->m_past);
}
}
g_vmContext->m_breakPointFilter->addRanges(unit, offsets);
if (RuntimeOption::EvalJit) {
blacklistRangesInJit(unit, offsets);
}
}
}