本文整理汇总了C++中ASSERT_UNUSED函数的典型用法代码示例。如果您正苦于以下问题:C++ ASSERT_UNUSED函数的具体用法?C++ ASSERT_UNUSED怎么用?C++ ASSERT_UNUSED使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ASSERT_UNUSED函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ASSERT_UNUSED
PassOwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<StyleRuleKeyframe> > > BisonCSSParser::sinkFloatingKeyframeVector(WillBeHeapVector<RefPtrWillBeMember<StyleRuleKeyframe> >* keyframeVector)
{
ASSERT_UNUSED(keyframeVector, m_floatingKeyframeVector == keyframeVector);
return m_floatingKeyframeVector.release();
}
示例2: ASSERT_UNUSED
bool JSNotAnObject::getOwnPropertySlot(TiExcState* exec, unsigned, PropertySlot&)
{
ASSERT_UNUSED(exec, exec->hadException() && exec->exception() == m_exception);
return false;
}
示例3: munmap
void ExecutablePool::systemRelease(const ExecutablePool::Allocation& alloc)
{
int result = munmap(alloc.pages, alloc.size);
ASSERT_UNUSED(result, !result);
}
示例4: ASSERT_UNUSED
bool RenderSVGResourceMasker::applyResource(RenderElement& renderer, const RenderStyle&, GraphicsContext*& context, unsigned short resourceMode)
{
ASSERT_UNUSED(resourceMode, resourceMode == ApplyToDefaultMode);
return applySVGMask(renderer, context, true);
}
示例5: ASSERT_UNUSED
void DocumentLoader::redirectReceived(CachedResource* resource, ResourceRequest& request, const ResourceResponse& redirectResponse)
{
ASSERT_UNUSED(resource, resource == m_mainResource);
willSendRequest(request, redirectResponse);
}
示例6: ASSERT
void TreeScopeAdopter::ensureDidMoveToNewDocumentWasCalled(Document& oldDocument)
{
ASSERT(!didMoveToNewDocumentWasCalled);
ASSERT_UNUSED(oldDocument, oldDocument == oldDocumentDidMoveToNewDocumentWasCalledWith);
didMoveToNewDocumentWasCalled = true;
}
开发者ID:xin3liang,项目名称:platform_external_chromium_org_third_party_WebKit,代码行数:6,代码来源:TreeScopeAdopter.cpp
示例7: toSVGElement
//.........这里部分代码省略.........
yOrientationShift -= scaledGlyphAdvance / 2;
} else {
// If there's an absolute x position available, it marks the beginning of a new position along the path.
if (x != SVGTextLayoutAttributes::emptyValue())
m_textPathCurrentOffset = x + m_textPathStartOffset;
m_textPathCurrentOffset += m_dx - kerning;
m_dx = 0;
// Apply dx/dy correction and setup translations that move to the glyph midpoint.
xOrientationShift -= scaledGlyphAdvance / 2;
yOrientationShift += m_dy - baselineShift;
}
// Calculate current offset along path.
textPathOffset = m_textPathCurrentOffset + scaledGlyphAdvance / 2;
// Move to next character.
m_textPathCurrentOffset += scaledGlyphAdvance + m_textPathSpacing + spacing * m_textPathScaling;
// Skip character, if we're before the path.
if (textPathOffset < 0) {
advanceToNextLogicalCharacter(logicalMetrics);
advanceToNextVisualCharacter(visualMetrics);
continue;
}
// Stop processing, if the next character lies behind the path.
if (textPathOffset > m_textPathLength)
break;
FloatPoint point;
bool ok = m_textPathCalculator->pointAndNormalAtLength(textPathOffset, point, angle);
ASSERT_UNUSED(ok, ok);
x = point.x();
y = point.y();
// For vertical text on path, the actual angle has to be rotated 90 degrees anti-clockwise, not the orientation angle!
if (m_isVerticalText)
angle -= 90;
} else {
// Apply all previously calculated shift values.
if (m_isVerticalText) {
x += baselineShift;
y -= kerning;
} else {
x -= kerning;
y -= baselineShift;
}
x += m_dx;
y += m_dy;
}
// Determine whether we have to start a new fragment.
bool shouldStartNewFragment = m_dx || m_dy || m_isVerticalText || m_inPathLayout || angle || angle != lastAngle
|| orientationAngle || kerning || applySpacingToNextCharacter || definesTextLength;
// If we already started a fragment, close it now.
if (didStartTextFragment && shouldStartNewFragment) {
applySpacingToNextCharacter = false;
recordTextFragment(textBox, visualMetricsValues);
}
// Eventually start a new fragment, if not yet done.
if (!didStartTextFragment || shouldStartNewFragment) {
示例8: ASSERT_UNUSED
void PluginStream::delayDeliveryTimerFired(Timer<PluginStream>* timer)
{
ASSERT_UNUSED(timer, timer == &m_delayDeliveryTimer);
deliverData();
}
示例9: ASSERT_UNUSED
void Heap::popTempSortVector(Vector<ValueStringPair>* tempVector)
{
ASSERT_UNUSED(tempVector, tempVector == m_tempSortingVectors.last());
m_tempSortingVectors.removeLast();
}
示例10: ASSERT_UNUSED
void LinkLoader::linkLoadingErrorTimerFired(Timer<LinkLoader>* timer)
{
ASSERT_UNUSED(timer, timer == &m_linkLoadingErrorTimer);
m_client->linkLoadingErrored();
}
示例11: GetByIdStatus
GetByIdStatus GetByIdStatus::computeForStubInfoWithoutExitSiteFeedback(
const ConcurrentJITLocker& locker, CodeBlock* profiledBlock, StructureStubInfo* stubInfo, UniquedStringImpl* uid,
CallLinkStatus::ExitSiteData callExitSiteData)
{
if (!stubInfo)
return GetByIdStatus(NoInformation);
if (!stubInfo->seen)
return GetByIdStatus(NoInformation);
PolymorphicAccess* list = 0;
State slowPathState = TakesSlowPath;
if (stubInfo->cacheType == CacheType::Stub) {
list = stubInfo->u.stub;
for (unsigned i = 0; i < list->size(); ++i) {
const AccessCase& access = list->at(i);
if (access.doesCalls())
slowPathState = MakesCalls;
}
}
if (stubInfo->tookSlowPath)
return GetByIdStatus(slowPathState);
// Finally figure out if we can derive an access strategy.
GetByIdStatus result;
result.m_state = Simple;
result.m_wasSeenInJIT = true; // This is interesting for bytecode dumping only.
switch (stubInfo->cacheType) {
case CacheType::Unset:
return GetByIdStatus(NoInformation);
case CacheType::GetByIdSelf: {
Structure* structure = stubInfo->u.byIdSelf.baseObjectStructure.get();
if (structure->takesSlowPathInDFGForImpureProperty())
return GetByIdStatus(slowPathState, true);
unsigned attributesIgnored;
GetByIdVariant variant;
variant.m_offset = structure->getConcurrently(uid, attributesIgnored);
if (!isValidOffset(variant.m_offset))
return GetByIdStatus(slowPathState, true);
variant.m_structureSet.add(structure);
bool didAppend = result.appendVariant(variant);
ASSERT_UNUSED(didAppend, didAppend);
return result;
}
case CacheType::Stub: {
for (unsigned listIndex = 0; listIndex < list->size(); ++listIndex) {
const AccessCase& access = list->at(listIndex);
if (access.viaProxy())
return GetByIdStatus(slowPathState, true);
Structure* structure = access.structure();
if (!structure) {
// The null structure cases arise due to array.length and string.length. We have no way
// of creating a GetByIdVariant for those, and we don't really have to since the DFG
// handles those cases in FixupPhase using value profiling. That's a bit awkward - we
// shouldn't have to use value profiling to discover something that the AccessCase
// could have told us. But, it works well enough. So, our only concern here is to not
// crash on null structure.
return GetByIdStatus(slowPathState, true);
}
ComplexGetStatus complexGetStatus = ComplexGetStatus::computeFor(
structure, access.conditionSet(), uid);
switch (complexGetStatus.kind()) {
case ComplexGetStatus::ShouldSkip:
continue;
case ComplexGetStatus::TakesSlowPath:
return GetByIdStatus(slowPathState, true);
case ComplexGetStatus::Inlineable: {
std::unique_ptr<CallLinkStatus> callLinkStatus;
switch (access.type()) {
case AccessCase::Load: {
break;
}
case AccessCase::Getter: {
CallLinkInfo* callLinkInfo = access.callLinkInfo();
ASSERT(callLinkInfo);
callLinkStatus = std::make_unique<CallLinkStatus>(
CallLinkStatus::computeFor(
locker, profiledBlock, *callLinkInfo, callExitSiteData));
break;
}
default: {
// FIXME: It would be totally sweet to support more of these at some point in the
// future. https://bugs.webkit.org/show_bug.cgi?id=133052
return GetByIdStatus(slowPathState, true);
} }
GetByIdVariant variant(
StructureSet(structure), complexGetStatus.offset(),
complexGetStatus.conditionSet(), WTF::move(callLinkStatus));
if (!result.appendVariant(variant))
//.........这里部分代码省略.........
示例12: ASSERT_UNUSED
void DeviceOrientationClientMock::timerFired(Timer<DeviceOrientationClientMock>& timer)
{
ASSERT_UNUSED(timer, &timer == &m_timer);
m_timer.stop();
m_controller->didChangeDeviceOrientation(m_orientation.get());
}
示例13: ASSERT_UNUSED
void DatabaseProcessProxy::processWillShutDown(IPC::Connection& connection)
{
ASSERT_UNUSED(connection, this->connection() == &connection);
}
示例14: generate
void generate(Code& code, CCallHelpers& jit)
{
// We don't expect the incoming code to have predecessors computed.
code.resetReachability();
if (shouldValidateIR())
validate(code);
// If we're doing super verbose dumping, the phase scope of any phase will already do a dump.
if (shouldDumpIR() && !shouldDumpIRAtEachPhase()) {
dataLog("Initial air:\n");
dataLog(code);
}
// This is where we run our optimizations and transformations.
// FIXME: Add Air optimizations.
// https://bugs.webkit.org/show_bug.cgi?id=150456
// This is where we would have a real register allocator. Then, we could use spillEverything()
// in place of the register allocator only for testing.
// FIXME: https://bugs.webkit.org/show_bug.cgi?id=150457
spillEverything(code);
// Prior to this point the prologue and epilogue is implicit. This makes it explicit. It also
// does things like identify which callee-saves we're using and saves them.
handleCalleeSaves(code);
// This turns all Stack and CallArg Args into Addr args that use the frame pointer. It does
// this by first-fit allocating stack slots. It should be pretty darn close to optimal, so we
// shouldn't have to worry about this very much.
allocateStack(code);
// FIXME: We should really have a code layout optimization here.
// https://bugs.webkit.org/show_bug.cgi?id=150478
// FIXME: We need a late liveness analysis over registers to fill in the
// Special::reportUsedRegisters().
// https://bugs.webkit.org/show_bug.cgi?id=150511
if (shouldValidateIR())
validate(code);
// Do a final dump of Air. Note that we have to do this even if we are doing per-phase dumping,
// since the final generation is not a phase.
if (shouldDumpIR()) {
dataLog("Air after ", code.lastPhaseName(), ", before generation:\n");
dataLog(code);
}
// And now, we generate code.
jit.emitFunctionPrologue();
jit.addPtr(CCallHelpers::TrustedImm32(-code.frameSize()), MacroAssembler::stackPointerRegister);
GenerationContext context;
context.code = &code;
IndexMap<BasicBlock, CCallHelpers::Label> blockLabels(code.size());
IndexMap<BasicBlock, CCallHelpers::JumpList> blockJumps(code.size());
auto link = [&] (CCallHelpers::Jump jump, BasicBlock* target) {
if (blockLabels[target].isSet()) {
jump.linkTo(blockLabels[target], &jit);
return;
}
blockJumps[target].append(jump);
};
for (BasicBlock* block : code) {
blockJumps[block].link(&jit);
ASSERT(block->size() >= 1);
for (unsigned i = 0; i < block->size() - 1; ++i) {
CCallHelpers::Jump jump = block->at(i).generate(jit, context);
ASSERT_UNUSED(jump, !jump.isSet());
}
if (block->last().opcode == Jump
&& block->successorBlock(0) == code.findNextBlock(block))
continue;
if (block->last().opcode == Ret) {
// We currently don't represent the full prologue/epilogue in Air, so we need to
// have this override.
jit.emitFunctionEpilogue();
jit.ret();
continue;
}
CCallHelpers::Jump jump = block->last().generate(jit, context);
for (Inst& inst : *block)
jump = inst.generate(jit, context);
switch (block->numSuccessors()) {
case 0:
ASSERT(!jump.isSet());
break;
case 1:
link(jump, block->successorBlock(0));
break;
case 2:
link(jump, block->successorBlock(0));
if (block->successorBlock(1) != code.findNextBlock(block))
//.........这里部分代码省略.........
示例15: checkConsistency
void checkConsistency(int offset = 0) const
{
ASSERT_UNUSED(offset, m_index + offset >= 0);
ASSERT_UNUSED(offset, m_index + offset <= static_cast<int>(timerHeap().size()));
}