本文整理汇总了C++中UnrootedScript::hasAnyIonScript方法的典型用法代码示例。如果您正苦于以下问题:C++ UnrootedScript::hasAnyIonScript方法的具体用法?C++ UnrootedScript::hasAnyIonScript怎么用?C++ UnrootedScript::hasAnyIonScript使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UnrootedScript
的用法示例。
在下文中一共展示了UnrootedScript::hasAnyIonScript方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ReleaseAllJITCode
JS_SetTopFrameAnnotation(JSContext *cx, void *annotation)
{
AutoAssertNoGC nogc;
StackFrame *fp = cx->fp();
JS_ASSERT_IF(fp->beginsIonActivation(), !fp->annotation());
// Note that if this frame is running in Ion, the actual calling frame
// could be inlined or a callee and thus we won't have a correct |fp|.
// To account for this, ion::InvalidationBailout will transfer an
// annotation from the old cx->fp() to the new top frame. This works
// because we will never EnterIon on a frame with an annotation.
fp->setAnnotation(annotation);
UnrootedScript script = fp->script();
ReleaseAllJITCode(cx->runtime->defaultFreeOp());
// Ensure that we'll never try to compile this again.
JS_ASSERT(!script->hasAnyIonScript());
script->ion = ION_DISABLED_SCRIPT;
script->parallelIon = ION_DISABLED_SCRIPT;
}