本文整理汇总了C++中AvmCore::throwException方法的典型用法代码示例。如果您正苦于以下问题:C++ AvmCore::throwException方法的具体用法?C++ AvmCore::throwException怎么用?C++ AvmCore::throwException使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AvmCore
的用法示例。
在下文中一共展示了AvmCore::throwException方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: verify
//.........这里部分代码省略.........
// note placement-new usage!
CodegenLIR* jit = new(jit_buf) CodegenLIR(this);
#if defined AVMPLUS_WORD_CODE
WordcodeEmitter* translator = new(translator_buf) WordcodeEmitter(this, toplevel);
TeeWriter* teeWriter = new(teeWriter_buf) TeeWriter(translator, jit);
coder = teeWriter;
#else
coder = jit;
#endif
#ifdef FEATURE_CFGWRITER
// analyze code and generate LIR
CFGWriter* cfg = new(cfg_buf) CFGWriter(this, coder);
coder = cfg;
#endif
verifier.verify(coder);
PERFM_TPROF_END();
if (!jit->overflow) {
// assembler LIR into native code
jit->emitMD();
}
// the MD buffer can overflow so we need to re-iterate
// over the whole thing, since we aren't yet robust enough
// to just rebuild the MD code.
// mark it as interpreted and try to limp along
if (jit->overflow) {
if (core->JITMustSucceed()) {
Exception* e = new (core->GetGC()) Exception(core, core->newStringLatin1("JIT failed")->atom());
e->flags |= Exception::EXIT_EXCEPTION;
core->throwException(e);
}
setInterpImpl();
}
#ifdef AVMPLUS_WORD_CODE
else {
if (_abc.word_code.translated_code)
{
set_word_code(core->GetGC(), NULL);
}
if (_abc.word_code.exceptions)
{
_abc.word_code.exceptions = NULL;
}
}
#endif
}
else
{
// NOTE copied below
#if defined AVMPLUS_WORD_CODE
WordcodeEmitter* translator = new(translator_buf) WordcodeEmitter(this, toplevel);
coder = translator;
#else
CodeWriter* stubWriter = new(stubWriter_buf) CodeWriter();
coder = stubWriter;
#endif
verifier.verify(coder); // pass2 dataflow
setInterpImpl();
// NOTE end copy
}
#else // FEATURE_NANOJIT