本文整理汇总了C++中JSScript::enclosingScriptsCompiledSuccessfully方法的典型用法代码示例。如果您正苦于以下问题:C++ JSScript::enclosingScriptsCompiledSuccessfully方法的具体用法?C++ JSScript::enclosingScriptsCompiledSuccessfully怎么用?C++ JSScript::enclosingScriptsCompiledSuccessfully使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JSScript
的用法示例。
在下文中一共展示了JSScript::enclosingScriptsCompiledSuccessfully方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
JS_DumpCompartmentPCCounts(JSContext *cx)
{
for (CellIter i(cx->compartment, gc::FINALIZE_SCRIPT); !i.done(); i.next()) {
JSScript *script = i.get<JSScript>();
if (script->hasScriptCounts && script->enclosingScriptsCompiledSuccessfully())
JS_DumpPCCounts(cx, script);
}
}
示例2: sprinter
JS_DumpCompartmentPCCounts(JSContext *cx)
{
for (CellIter i(cx->zone(), gc::FINALIZE_SCRIPT); !i.done(); i.next()) {
JSScript *script = i.get<JSScript>();
if (script->compartment() != cx->compartment())
continue;
if (script->hasScriptCounts() && script->enclosingScriptsCompiledSuccessfully())
JS_DumpPCCounts(cx, script);
}
#if defined(JS_ION)
for (unsigned thingKind = FINALIZE_OBJECT0; thingKind < FINALIZE_OBJECT_LIMIT; thingKind++) {
for (CellIter i(cx->zone(), (AllocKind) thingKind); !i.done(); i.next()) {
JSObject *obj = i.get<JSObject>();
if (obj->compartment() != cx->compartment())
continue;
if (obj->is<AsmJSModuleObject>()) {
AsmJSModule &module = obj->as<AsmJSModuleObject>().module();
Sprinter sprinter(cx);
if (!sprinter.init())
return;
fprintf(stdout, "--- Asm.js Module ---\n");
for (size_t i = 0; i < module.numFunctionCounts(); i++) {
jit::IonScriptCounts *counts = module.functionCounts(i);
DumpIonScriptCounts(&sprinter, counts);
}
fputs(sprinter.string(), stdout);
fprintf(stdout, "--- END Asm.js Module ---\n");
}
}
}
#endif
}