本文整理汇总了C++中Statement::blockExit方法的典型用法代码示例。如果您正苦于以下问题:C++ Statement::blockExit方法的具体用法?C++ Statement::blockExit怎么用?C++ Statement::blockExit使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Statement
的用法示例。
在下文中一共展示了Statement::blockExit方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FuncDeclaration_toObjFile
//.........这里部分代码省略.........
* 2. impact on function inlining
* 3. what to do when writing out .di files, or other pretty printing
*/
if (global.params.trace && !fd->isCMain())
{
/* The profiler requires TLS, and TLS may not be set up yet when C main()
* gets control (i.e. OSX), leading to a crash.
*/
/* Wrap the entire function body in:
* trace_pro("funcname");
* try
* body;
* finally
* _c_trace_epi();
*/
StringExp *se = StringExp::create(Loc(), s->Sident);
se->type = Type::tstring;
se->type = se->type->semantic(Loc(), NULL);
Expressions *exps = Expressions_create();
exps->push(se);
FuncDeclaration *fdpro = FuncDeclaration::genCfunc(NULL, Type::tvoid, "trace_pro");
Expression *ec = VarExp::create(Loc(), fdpro);
Expression *e = CallExp::create(Loc(), ec, exps);
e->type = Type::tvoid;
Statement *sp = ExpStatement::create(fd->loc, e);
FuncDeclaration *fdepi = FuncDeclaration::genCfunc(NULL, Type::tvoid, "_c_trace_epi");
ec = VarExp::create(Loc(), fdepi);
e = CallExp::create(Loc(), ec);
e->type = Type::tvoid;
Statement *sf = ExpStatement::create(fd->loc, e);
Statement *stf;
if (sbody->blockExit(fd, false) == BEfallthru)
stf = CompoundStatement::create(Loc(), sbody, sf);
else
stf = TryFinallyStatement::create(Loc(), sbody, sf);
sbody = CompoundStatement::create(Loc(), sp, stf);
}
buildClosure(fd, &irs);
#if TARGET_WINDOS
if (fd->isSynchronized() && cd && config.flags2 & CFG2seh &&
!fd->isStatic() && !sbody->usesEH() && !global.params.trace)
{
/* The "jmonitor" hack uses an optimized exception handling frame
* which is a little shorter than the more general EH frame.
*/
s->Sfunc->Fflags3 |= Fjmonitor;
}
#endif
Statement_toIR(sbody, &irs);
bx.curblock->BC = BCret;
f->Fstartblock = bx.startblock;
// einit = el_combine(einit,bx.init);
if (fd->isCtorDeclaration())
{
assert(sthis);
for (block *b = f->Fstartblock; b; b = b->Bnext)
{
if (b->BC == BCret)
{