当前位置: 首页>>代码示例>>C++>>正文


C++ INT_FATAL函数代码示例

本文整理汇总了C++中INT_FATAL函数的典型用法代码示例。如果您正苦于以下问题:C++ INT_FATAL函数的具体用法?C++ INT_FATAL怎么用?C++ INT_FATAL使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了INT_FATAL函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: traverse_loop

static void traverse_loop(loop_t *loop,int postorder,void (*f) (statement_t *),
			  void (*e) (expr_t *),void (*d) (symboltable_t *)) {
  DB1(80,"traverse_loop(,%d,,,);\n",postorder);

  if (loop == NULL) {
    INT_FATAL(NULL,"Null loop in traverse_loop()");
  }

  switch (T_TYPE(loop)) {
  case L_DO:
    if (e != NULL) {
      (*e)(T_IVAR(loop));
      (*e)(T_START(loop));
      (*e)(T_STOP(loop));
      if (T_STEP(loop) != NULL) {
	(*e)(T_STEP(loop));
      }
    }
    traverse_stmtls(T_BODY(loop),postorder,f,e,d);
    break;
  case L_WHILE_DO:
  case L_REPEAT_UNTIL:
    if (e != NULL) {
      (*e)(T_LOOPCOND(loop));
    }
    traverse_stmtls(T_BODY(loop),postorder,f,e,d);
    break;
  default:
    INT_FATAL(NULL, "Bad looptype (%d) in traverse_loop()",T_TYPE(loop));
  }
#ifdef DEBUG
  fflush(stdout);
#endif
}
开发者ID:tangentforks,项目名称:zpl,代码行数:34,代码来源:traverse.c

示例2: forv_Vec

 forv_Vec(AggregateType, at, gAggregateTypes)
 {
   if (! at->defaultInitializer)
     INT_FATAL(at, "aggregate type has no initializer");
   if (! at->defaultTypeConstructor)
     INT_FATAL(at, "aggregate type has no default type constructor");
 }
开发者ID:tzakian,项目名称:chapel-old,代码行数:7,代码来源:checks.cpp

示例3: INT_FATAL

void Expr::verify() {
  if (prev || next)
    if (!list)
      INT_FATAL(this, "Expr is in list but does not point at it");

  if (prev && prev->next != this)
    INT_FATAL(this, "Bad Expr->prev->next");

  if (next && next->prev != this)
    INT_FATAL(this, "Bad Expr->next->prev");

  if (!parentSymbol)
    INT_FATAL(this, "Expr::parentSymbol is NULL");

  if (parentExpr && parentExpr->parentSymbol != parentSymbol)
    INT_FATAL(this, "Bad Expr::parentSymbol");

  if (list && parentExpr && list->parent != parentExpr)
    INT_FATAL(this, "Bad Expr::list::parent");

  if (list && !parentExpr) {
    if (Symbol* lps = toSymbol(list->parent))
      if (lps != parentSymbol)
        INT_FATAL(this, "Bad symbol Expr::list::parent");
    if (Type* lpt = toType(list->parent))
      if (lpt->symbol != parentSymbol)
        INT_FATAL(this, "Bad type Expr::list::parent");
    if (isExpr(list->parent))
      INT_FATAL(this, "Expr::list::parent is an Expr unexpectedly");
  }
}
开发者ID:bollu,项目名称:chapel,代码行数:31,代码来源:expr.cpp

示例4: INT_FATAL

void CatchStmt::verify() {
  Stmt::verify();

  if (astTag != E_CatchStmt) {
    INT_FATAL(this, "CatchStmt::verify. Bad astTag");
  }

  if (!_body) {
    INT_FATAL(this, "CatchStmt::verify. _body is missing");
  }

  if (!body()) {
    INT_FATAL(this, "CatchStmt::verify. Invalid catch body");
  }
}
开发者ID:coderbond007,项目名称:chapel,代码行数:15,代码来源:CatchStmt.cpp

示例5: INT_FATAL

void BlockStmt::verify() {
  Expr::verify();
  if (astTag != E_BlockStmt) {
    INT_FATAL(this, "Bad BlockStmt::astTag");
  }
  if (body.parent != this)
    INT_FATAL(this, "Bad AList::parent in BlockStmt");
  for_alist(expr, body) {
    if (expr->parentExpr != this)
      INT_FATAL(this, "Bad BlockStmt::body::parentExpr");
  }
  if (blockInfo && blockInfo->parentExpr != this)
    INT_FATAL(this, "Bad BlockStmt::blockInfo::parentExpr");
  if (modUses && modUses->parentExpr != this)
    INT_FATAL(this, "Bad BlockStmt::blockInfo::parentExpr");
}
开发者ID:deniskin82,项目名称:chapel,代码行数:16,代码来源:stmt.cpp

示例6: tiMarkForTFIntent

// Same except uses TFITag. It is encoded as int to deal with header ordering.
// Do not invoke on TFI_REDUCE.
ArgSymbol* tiMarkForTFIntent(int tfIntent) {
  ArgSymbol* retval = NULL;

  switch ((TFITag) tfIntent) {
    case TFI_DEFAULT:
      retval = tiMarkBlank;
      break;

    case TFI_CONST:
      retval = tiMarkConstDflt;
      break;

    case TFI_IN:
      retval = tiMarkIn;
      break;

    case TFI_CONST_IN:
      retval = tiMarkConstIn;
      break;

    case TFI_REF:
      retval = tiMarkRef;
      break;

    case TFI_CONST_REF:
      retval = tiMarkConstRef;
      break;

    case TFI_REDUCE:
      INT_FATAL("unexpected intent in tiMarkForTFIntent()");
      break;
  }

  return retval;
}
开发者ID:vasslitvinov,项目名称:chapel,代码行数:37,代码来源:createTaskFunctions.cpp

示例7: istr

const char*
istr(int i) {
  char s[64];
  if (sprintf(s, "%d", i) > 63)
    INT_FATAL("istr buffer overflow");
  return astr(s);
}
开发者ID:tzakian,项目名称:chapel-old,代码行数:7,代码来源:stringutil.cpp

示例8: toSymExpr

void CallInfo::haltNotWellFormed() const {
  for (int i = 1; i <= call->numActuals(); i++) {
    Expr* actual = call->get(i);

    if (NamedExpr* named = toNamedExpr(actual)) {
      actual = named->actual;
    }

    SymExpr* se = toSymExpr(actual);
    INT_ASSERT(se);

    Symbol*  sym = se->symbol();
    Type*    t   = sym->type;

    if (t == dtUnknown && sym->hasFlag(FLAG_TYPE_VARIABLE) == false) {
      USR_FATAL(call,
                "use of '%s' before encountering its definition, "
                "type unknown",
                sym->name);

    } else if (t->symbol->hasFlag(FLAG_GENERIC) == true) {
      INT_FATAL(call,
                "the type of the actual argument '%s' is generic",
                sym->name);
    }
  }
}
开发者ID:DawidvC,项目名称:chapel,代码行数:27,代码来源:callInfo.cpp

示例9: INT_FATAL

GenRet ExternBlockStmt::codegen() {
  GenRet ret;
  // Needs to be handled specially by creating a C
  //  file per module..
  INT_FATAL(this, "ExternBlockStmt codegen called");
  return ret;
}
开发者ID:jcazzie,项目名称:chapel,代码行数:7,代码来源:stmt.cpp

示例10: RankOfCover

int RankOfCover(function_t* fn) {
  expr_t* reg;
  int numdims = 0;
  int newnumdims;
  callsite_t *callinfo;

  callinfo = T_CALLINFO(fn);
  if (callinfo != NULL) {
    reg = COV_REG(CALL_COVER(callinfo));
    if (reg != NULL) {
      numdims = D_REG_NUM(T_TYPEINFO(reg));
    }
    callinfo = CALL_NEXT(callinfo);
  }
  while (callinfo != NULL) {
    reg = COV_REG(CALL_COVER(callinfo));
    if (reg != NULL) {
      newnumdims = D_REG_NUM(T_TYPEINFO(reg));
      if (newnumdims != numdims) {
	INT_FATAL(NULL, "Function is covered by regions of differing ranks!");
      }
    }
    callinfo = CALL_NEXT(callinfo);
  }

  return numdims;
}
开发者ID:tangentforks,项目名称:zpl,代码行数:27,代码来源:coverage.c

示例11: lowExprGet

//
// Determine the index type for a ParamForLoop.
//
// This implementation creates a range with low/high values and then
// asks for its type.
//
Type* ParamForLoop::indexType()
{
  SymExpr*  lse     = lowExprGet();
  SymExpr*  hse     = highExprGet();
  CallExpr* range    = new CallExpr("chpl_build_bounded_range",
                                    lse->copy(), hse->copy());
  Type*     idxType = 0;

  insertBefore(range);

  resolveCall(range);

  if (FnSymbol* sym = range->isResolved())
  {
    resolveFormals(sym);

    DefExpr* formal = toDefExpr(sym->formals.get(1));

    if (toArgSymbol(formal->sym)->typeExpr)
      idxType = toArgSymbol(formal->sym)->typeExpr->body.tail->typeInfo();
    else
      idxType = formal->sym->type;

    range->remove();
  }
  else
  {
    INT_FATAL("unresolved range");
  }

  return idxType;
}
开发者ID:AbheekG,项目名称:chapel,代码行数:38,代码来源:ParamForLoop.cpp

示例12: INT_FATAL

void ParamForLoop::verify()
{
  BlockStmt::verify();

  if (mResolveInfo              == 0)
    INT_FATAL(this, "ParamForLoop::verify. mResolveInfo is NULL");

  if (BlockStmt::blockInfoGet() != 0)
    INT_FATAL(this, "ParamForLoop::verify. blockInfo is not NULL");

  if (modUses                   != 0)
    INT_FATAL(this, "ParamForLoop::verify. modUses   is not NULL");

  if (byrefVars                 != 0)
    INT_FATAL(this, "ParamForLoop::verify. byrefVars is not NULL");
}
开发者ID:AbheekG,项目名称:chapel,代码行数:16,代码来源:ParamForLoop.cpp

示例13: call

CallInfo::CallInfo(CallExpr* icall) : call(icall), scope(NULL) {
  if (SymExpr* se = toSymExpr(call->baseExpr))
    name = se->var->name;
  else if (UnresolvedSymExpr* use = toUnresolvedSymExpr(call->baseExpr))
    name = use->unresolved;
  if (call->numActuals() >= 2) {
    if (SymExpr* se = toSymExpr(call->get(1))) {
      if (se->var == gModuleToken) {
        se->remove();
        se = toSymExpr(call->get(1));
        INT_ASSERT(se);
        ModuleSymbol* mod = toModuleSymbol(se->var);
        INT_ASSERT(mod);
        se->remove();
        scope = mod->block;
      }
    }
  }
  for_actuals(actual, call) {
    if (NamedExpr* named = toNamedExpr(actual)) {
      actualNames.add(named->name);
      actual = named->actual;
    } else {
      actualNames.add(NULL);
    }
    SymExpr* se = toSymExpr(actual);
    INT_ASSERT(se);
    Type* t = se->var->type;
    if (t == dtUnknown)
      USR_FATAL(call, "use of '%s' before encountering its definition, type unknown", se->var->name);
    if (t->symbol->hasFlag(FLAG_GENERIC))
      INT_FATAL(call, "the type of the actual argument '%s' is generic", se->var->name);
    actuals.add(se->var);
  }
}
开发者ID:Improbus,项目名称:CPEG614,代码行数:35,代码来源:callInfo.cpp

示例14: createDebuggerFile

const char* createDebuggerFile(const char* debugger, int argc, char* argv[]) {
  const char* dbgfilename = genIntermediateFilename(astr(debugger, ".commands"));
  FILE* dbgfile = openfile(dbgfilename);
  int i;

  if (strcmp(debugger, "gdb") == 0) {
    fprintf(dbgfile, "set args");
  } else if (strcmp(debugger, "lldb") == 0) {
    fprintf(dbgfile, "settings set -- target.run-args");
  } else {
      INT_FATAL(astr("createDebuggerFile doesn't know how to handle the given "
                     "debugger: '", debugger, "'"));
  }
  for (i=1; i<argc; i++) {
    if (strcmp(argv[i], astr("--", debugger)) != 0) {
      fprintf(dbgfile, " %s", argv[i]);
    }
  }

  fprintf(dbgfile, "\n");
  closefile(dbgfile);
  mysystem(astr("cat ", CHPL_HOME, "/compiler/etc/", debugger, ".commands >> ",
                dbgfilename),
           astr("appending ", debugger, " commands"),
           false);

  return dbgfilename;
}
开发者ID:DawidvC,项目名称:chapel,代码行数:28,代码来源:files.cpp

示例15: deleteTmpDir

void deleteTmpDir() {
  static int inDeleteTmpDir = 0; // break infinite recursion

  if (inDeleteTmpDir) {
    return;
  }
  inDeleteTmpDir = 1;

#ifndef DEBUGTMPDIR
  if (tmpdirname != NULL) {
    if (strlen(tmpdirname) < 1 ||
        strchr(tmpdirname, '*') != NULL ||
        strcmp(tmpdirname, "//") == 0) {
      INT_FATAL("tmp directory name looks fishy");
    }
    const char* rmdircommand = "rm -r ";
    const char* command = astr(rmdircommand, tmpdirname);

    mysystem(command, "removing temporary directory");
    tmpdirname = NULL;
  }
#endif

  inDeleteTmpDir = 0;
}
开发者ID:angelpatel1617,项目名称:chapel-attic,代码行数:25,代码来源:files.cpp


注:本文中的INT_FATAL函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。