本文整理汇总了C++中EvalExecutable::codeBlock方法的典型用法代码示例。如果您正苦于以下问题:C++ EvalExecutable::codeBlock方法的具体用法?C++ EvalExecutable::codeBlock怎么用?C++ EvalExecutable::codeBlock使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EvalExecutable
的用法示例。
在下文中一共展示了EvalExecutable::codeBlock方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: dump
void ExecutableBase::dump(PrintStream& out) const
{
ExecutableBase* realThis = const_cast<ExecutableBase*>(this);
if (classInfo() == NativeExecutable::info()) {
NativeExecutable* native = jsCast<NativeExecutable*>(realThis);
out.print("NativeExecutable:", RawPointer(bitwise_cast<void*>(native->function())), "/", RawPointer(bitwise_cast<void*>(native->constructor())));
return;
}
if (classInfo() == EvalExecutable::info()) {
EvalExecutable* eval = jsCast<EvalExecutable*>(realThis);
if (CodeBlock* codeBlock = eval->codeBlock())
out.print(*codeBlock);
else
out.print("EvalExecutable w/o CodeBlock");
return;
}
if (classInfo() == ProgramExecutable::info()) {
ProgramExecutable* eval = jsCast<ProgramExecutable*>(realThis);
if (CodeBlock* codeBlock = eval->codeBlock())
out.print(*codeBlock);
else
out.print("ProgramExecutable w/o CodeBlock");
return;
}
if (classInfo() == ModuleProgramExecutable::info()) {
ModuleProgramExecutable* executable = jsCast<ModuleProgramExecutable*>(realThis);
if (CodeBlock* codeBlock = executable->codeBlock())
out.print(*codeBlock);
else
out.print("ModuleProgramExecutable w/o CodeBlock");
return;
}
FunctionExecutable* function = jsCast<FunctionExecutable*>(realThis);
if (!function->eitherCodeBlock())
out.print("FunctionExecutable w/o CodeBlock");
else {
CommaPrinter comma("/");
if (function->codeBlockForCall())
out.print(comma, *function->codeBlockForCall());
if (function->codeBlockForConstruct())
out.print(comma, *function->codeBlockForConstruct());
}
}