本文整理汇总了C++中DumpContext类的典型用法代码示例。如果您正苦于以下问题:C++ DumpContext类的具体用法?C++ DumpContext怎么用?C++ DumpContext使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了DumpContext类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
int network_information_table_section::subtable::Record::dump(DumpContext& dc) { // throws IOException
dc.indent();
dc.getPs().print("Record\n");
dc.increaseIndent();
int retVal= 0;
// write cdsRecord
if ( cdsRecord != NULL ) {
dc.indent();
dc.getPs().println("cdsRecord") ;
retVal +=cdsRecord->dump(dc);
}
// write mmsRecord
if ( mmsRecord != NULL ) {
dc.indent();
dc.getPs().println("mmsRecord") ;
retVal +=mmsRecord->dump(dc);
}
// write descriptors
if ( descriptors != NULL ) {
dc.indent();
dc.getPs().println("descriptors") ;
retVal +=descriptors->dump(dc);
}
dc.decreaseIndent();
return retVal;
}
示例2:
void
NotExpression::Dump(DumpContext& context) const
{
context << "NotExpression(\n";
context.BeginChildren();
fChild->Dump(context);
context.EndChildren();
context << ")\n";
}
示例3:
void
Include::Dump(DumpContext& context) const
{
context << "Include(\n";
context.BeginChildren();
fFileNames->Dump(context);
context.EndChildren();
context << ")\n";
}
示例4:
void
For::Dump(DumpContext& context) const
{
context << "For(\n";
context.BeginChildren();
fVariable->Dump(context);
fList->Dump(context);
fBlock->Dump(context);
context.EndChildren();
context << ")\n";
}
示例5:
void
LocalVariableDeclaration::Dump(DumpContext& context) const
{
context << "LocalVariableDeclaration(\n";
context.BeginChildren();
fVariables->Dump(context);
if (fInitializer != NULL)
fInitializer->Dump(context);
context.EndChildren();
context << ")\n";
}
示例6: dump
int HomingCancelled::dump(DumpContext& dc) { // throws IOException
dc.indent();
dc.getPs().print("HomingCancelled\n");
dc.increaseIndent();
int retVal= 0;
// write header
if ( header != NULL ) {
dc.indent();
dc.getPs().println("header") ;
retVal +=header->dump(dc);
}
// write length
dc.indent();
dc.getPs().print("length=");
dc.getPs().println((long)length);
dc.decreaseIndent();
return retVal;
}
示例7: for
int codeVersionTable1_3::dump(DumpContext& dc) { // throws IOException
dc.indent();
dc.getPs().print("codeVersionTable1_3\n");
dc.increaseIndent();
int retVal= 0;
// write header
if ( header != NULL ) {
dc.indent();
dc.getPs().println("header") ;
retVal +=header->dump(dc);
}
// write length
dc.indent();
dc.getPs().print("length=");
dc.getPs().println((long)length);
// write configurationCountChange
dc.indent();
dc.getPs().print("configurationCountChange=");
dc.getPs().println((long)configurationCountChange);
// write statusField
dc.indent();
dc.getPs().print("statusField=");
dc.getPs().println((long)statusField);
// write pgmmsg
{ for (ArrayList_iterator(codeVersionTableMsg) it= pgmmsg.getIterator() ; it.hasNext();) {
{
dc.indent();
dc.getPs().println("element");
retVal +=it.get()->dump(dc);
}
}
}
// write bf1
{
dc.indent();
dc.getPs().print("download_type: ");
dc.getPs().printlnBin(getDownload_type(),4);
dc.indent();
dc.getPs().print("downloadCommand: ");
dc.getPs().printlnBin(getDownloadCommand(),4);
}
// write statusfldInstance
if ( statusfldInstance != NULL ) {
dc.indent();
dc.getPs().println("statusfldInstance") ;
retVal +=statusfldInstance->dump(dc);
}
// write statusfld2Instance
if ( statusfld2Instance != NULL ) {
dc.indent();
dc.getPs().println("statusfld2Instance") ;
retVal +=statusfld2Instance->dump(dc);
}
// write statusfld3Instance
if ( statusfld3Instance != NULL ) {
dc.indent();
dc.getPs().println("statusfld3Instance") ;
retVal +=statusfld3Instance->dump(dc);
}
// write codeFileByte
dc.indent();
dc.getPs().print("codeFileByte");
codeFileByte->dump(dc);
// write codeVeriFicationCertiFication
if ( codeVeriFicationCertiFication != NULL ) {
dc.indent();
dc.getPs().println("codeVeriFicationCertiFication") ;
retVal +=codeVeriFicationCertiFication->dump(dc);
}
dc.decreaseIndent();
return retVal;
}
示例8: link
void link(State& state)
{
Graph& graph = state.graph;
CodeBlock* codeBlock = graph.m_codeBlock;
VM& vm = graph.m_vm;
// LLVM will create its own jump tables as needed.
codeBlock->clearSwitchJumpTables();
#if !FTL_USES_B3
// What LLVM's stackmaps call stackSizeForLocals and what we call frameRegisterCount have a simple
// relationship, though it's not obvious from reading the code. The easiest way to understand them
// is to look at stackOffset, i.e. what you have to add to FP to get SP. For LLVM that is just:
//
// stackOffset == -state.jitCode->stackmaps.stackSizeForLocals()
//
// The way we define frameRegisterCount is that it satisfies this equality:
//
// stackOffset == virtualRegisterForLocal(frameRegisterCount - 1).offset() * sizeof(Register)
//
// We can simplify this when we apply virtualRegisterForLocal():
//
// stackOffset == (-1 - (frameRegisterCount - 1)) * sizeof(Register)
// stackOffset == (-1 - frameRegisterCount + 1) * sizeof(Register)
// stackOffset == -frameRegisterCount * sizeof(Register)
//
// Therefore we just have:
//
// frameRegisterCount == -stackOffset / sizeof(Register)
//
// If we substitute what we have above, we get:
//
// frameRegisterCount == -(-state.jitCode->stackmaps.stackSizeForLocals()) / sizeof(Register)
// frameRegisterCount == state.jitCode->stackmaps.stackSizeForLocals() / sizeof(Register)
state.jitCode->common.frameRegisterCount = state.jitCode->stackmaps.stackSizeForLocals() / sizeof(void*);
#endif
state.jitCode->common.requiredRegisterCountForExit = graph.requiredRegisterCountForExit();
if (!graph.m_plan.inlineCallFrames->isEmpty())
state.jitCode->common.inlineCallFrames = graph.m_plan.inlineCallFrames;
graph.registerFrozenValues();
// Create the entrypoint. Note that we use this entrypoint totally differently
// depending on whether we're doing OSR entry or not.
CCallHelpers jit(&vm, codeBlock);
std::unique_ptr<LinkBuffer> linkBuffer;
CCallHelpers::Address frame = CCallHelpers::Address(
CCallHelpers::stackPointerRegister, -static_cast<int32_t>(AssemblyHelpers::prologueStackPointerDelta()));
if (Profiler::Compilation* compilation = graph.compilation()) {
compilation->addDescription(
Profiler::OriginStack(),
toCString("Generated FTL JIT code for ", CodeBlockWithJITType(codeBlock, JITCode::FTLJIT), ", instruction count = ", graph.m_codeBlock->instructionCount(), ":\n"));
graph.ensureDominators();
graph.ensureNaturalLoops();
const char* prefix = " ";
DumpContext dumpContext;
StringPrintStream out;
Node* lastNode = 0;
for (size_t blockIndex = 0; blockIndex < graph.numBlocks(); ++blockIndex) {
BasicBlock* block = graph.block(blockIndex);
if (!block)
continue;
graph.dumpBlockHeader(out, prefix, block, Graph::DumpLivePhisOnly, &dumpContext);
compilation->addDescription(Profiler::OriginStack(), out.toCString());
out.reset();
for (size_t nodeIndex = 0; nodeIndex < block->size(); ++nodeIndex) {
Node* node = block->at(nodeIndex);
Profiler::OriginStack stack;
if (node->origin.semantic.isSet()) {
stack = Profiler::OriginStack(
*vm.m_perBytecodeProfiler, codeBlock, node->origin.semantic);
}
if (graph.dumpCodeOrigin(out, prefix, lastNode, node, &dumpContext)) {
compilation->addDescription(stack, out.toCString());
out.reset();
}
graph.dump(out, prefix, node, &dumpContext);
compilation->addDescription(stack, out.toCString());
out.reset();
if (node->origin.semantic.isSet())
lastNode = node;
}
}
dumpContext.dump(out, prefix);
//.........这里部分代码省略.........