• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ INT_FATAL函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: returnInfoRef

// BHARSH TODO: merge this with returnInfoAsRef and fix the WIDE_REF case...
static QualifiedType
returnInfoRef(CallExpr* call) {
  Type* t = call->get(1)->getValType();
  if (!t->refType)
    INT_FATAL(call, "invalid attempt to get reference type");
  return QualifiedType(t->refType, QUAL_REF);
}
开发者ID:rchyena,项目名称:chapel,代码行数:8,代码来源:primitive.cpp


示例17: returnInfoVal

static QualifiedType
returnInfoVal(CallExpr* call) {
  AggregateType* ct = toAggregateType(call->get(1)->typeInfo());
  if (ct) {
    if (call->get(1)->isRef()) {
      if(ct->symbol->hasFlag(FLAG_REF)) {
        return QualifiedType(ct->getField(1)->type, QUAL_VAL);
      } else {
        return QualifiedType(ct, QUAL_VAL);
      }
    } else if (call->get(1)->isWideRef()) {
      if(ct->symbol->hasFlag(FLAG_WIDE_REF)) {
        return QualifiedType(ct->getField(2)->type, QUAL_VAL);
      } else {
        return QualifiedType(ct, QUAL_VAL);
      }
    } else if (ct->symbol->hasFlag(FLAG_WIDE_CLASS)) {
      // insertWideReferences will sometimes insert a PRIM_DEREF to a
      // wide class. There should probably be a better way of expressing the
      // desired pattern...
      return QualifiedType(ct, QUAL_VAL);
    }
  }
  INT_FATAL(call, "attempt to get value type of non-reference type");
  return QualifiedType(NULL);
}
开发者ID:rchyena,项目名称:chapel,代码行数:26,代码来源:primitive.cpp


示例18: blankIntentForType

IntentTag blankIntentForType(Type* t) {
  if (isSyncType(t) ||
      isAtomicType(t) ||
      t->symbol->hasFlag(FLAG_ARRAY)) {
    return INTENT_REF;
  } else if (is_bool_type(t) ||
             is_int_type(t) ||
             is_uint_type(t) ||
             is_real_type(t) ||
             is_imag_type(t) ||
             is_complex_type(t) ||
             is_enum_type(t) ||
             is_string_type(t) ||
             t == dtStringC ||
             t == dtStringCopy ||
             isClass(t) ||
             isRecord(t) ||
             isUnion(t) ||
             t == dtTaskID ||
             t == dtFile ||
             t == dtTaskList ||
             t == dtNil ||
             t == dtOpaque ||
             t->symbol->hasFlag(FLAG_DOMAIN) ||
             t->symbol->hasFlag(FLAG_DISTRIBUTION) ||
             t->symbol->hasFlag(FLAG_EXTERN)) {
    return constIntentForType(t);
  }
  INT_FATAL(t, "Unhandled type in blankIntentForType()");
  return INTENT_BLANK;
}
开发者ID:CoryMcCartan,项目名称:chapel,代码行数:31,代码来源:resolveIntents.cpp


示例19: Stmt

UseStmt::UseStmt(BaseAST*                            source,
                 std::vector<const char*>*           args,
                 bool                                exclude,
                 std::map<const char*, const char*>* renames) :
  Stmt(E_UseStmt),
  src(NULL),
  named(),
  renamed(),
  except(exclude),
  relatedNames()
{
  if (Symbol* b = toSymbol(source)) {
    src = new SymExpr(b);
  } else if (Expr* b = toExpr(source)) {
    src = b;
  } else {
    INT_FATAL(this, "Bad mod in UseStmt constructor");
  }

  if (args->size() > 0) {
    // Symbols to search when going through this module's scope from an outside
    // scope
    for_vector(const char, str, *args) {
      named.push_back(str);
    }
  }
开发者ID:AbheekG,项目名称:chapel,代码行数:26,代码来源:stmt.cpp


示例20: constIntentForType

static IntentTag constIntentForType(Type* t) {
  if (isSyncType(t) ||
      isRecordWrappedType(t) ||  // domain, array, or distribution
      isRecord(t) ||  // may eventually want to decide based on size
      is_string_type(t)) {  
    return INTENT_CONST_REF;
  } else if (is_bool_type(t) ||
             is_int_type(t) ||
             is_uint_type(t) ||
             is_real_type(t) ||
             is_imag_type(t) ||
             is_complex_type(t) ||
             is_enum_type(t) ||
             isClass(t) ||
             isUnion(t) ||
             isAtomicType(t) ||
             t == dtOpaque ||
             t == dtTaskID ||
             t == dtFile ||
             t == dtTaskList ||
             t == dtNil ||
             t == dtStringC ||
             t == dtStringCopy ||
             t->symbol->hasFlag(FLAG_EXTERN)) {
    return INTENT_CONST_IN;
  }
  INT_FATAL(t, "Unhandled type in constIntentForType()");
  return INTENT_CONST;
}
开发者ID:CoryMcCartan,项目名称:chapel,代码行数:29,代码来源:resolveIntents.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ INT_TO_PTR函数代码示例发布时间:2022-05-30
下一篇:
C++ INT_Enable函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap