void Compiler::lvaUpdateClass(unsigned varNum, CORINFO_CLASS_HANDLE clsHnd, bool isExact)
{
- noway_assert(varNum < lvaCount);
+ assert(varNum < lvaCount);
// If we are just importing, we cannot reliably track local ref types,
// since the jit maps CORINFO_TYPE_VAR to TYP_REF.
BYTE* Compiler::lvaGetGcLayout(unsigned varNum)
{
- noway_assert(varTypeIsStruct(lvaTable[varNum].lvType) && (lvaTable[varNum].lvExactSize >= TARGET_POINTER_SIZE));
+ assert(varTypeIsStruct(lvaTable[varNum].lvType) && (lvaTable[varNum].lvExactSize >= TARGET_POINTER_SIZE));
return lvaTable[varNum].lvGcLayout;
}
unsigned Compiler::lvaLclSize(unsigned varNum)
{
- noway_assert(varNum < lvaCount);
+ assert(varNum < lvaCount);
var_types varType = lvaTable[varNum].TypeGet();
//
unsigned Compiler::lvaLclExactSize(unsigned varNum)
{
- noway_assert(varNum < lvaCount);
+ assert(varNum < lvaCount);
var_types varType = lvaTable[varNum].TypeGet();
lclNum = info.compLvFrameListRoot;
- noway_assert(lclNum <= lvaCount);
+ assert(lclNum <= lvaCount);
varDsc = lvaTable + lclNum;
/* Decrement the reference counts twice */
lclNum = tree->gtLclVarCommon.gtLclNum;
- noway_assert(lclNum < lvaCount);
+ assert(lclNum < lvaCount);
varDsc = lvaTable + lclNum;
/* Decrement its lvRefCnt and lvRefCntWtd */
lclNum = info.compLvFrameListRoot;
- noway_assert(lclNum <= lvaCount);
+ assert(lclNum <= lvaCount);
varDsc = lvaTable + lclNum;
/* Increment the reference counts twice */
lclNum = tree->gtLclVarCommon.gtLclNum;
- noway_assert(lclNum < lvaCount);
+ assert(lclNum < lvaCount);
varDsc = lvaTable + lclNum;
/* Increment its lvRefCnt and lvRefCntWtd */
if (op2->gtOper == GT_LCL_VAR)
{
unsigned lclNum = op2->gtLclVarCommon.gtLclNum;
- noway_assert(lclNum < lvaCount);
+ assert(lclNum < lvaCount);
lvaTable[lclNum].setPrefReg(REG_ECX, this);
}
}
/* This must be a local variable reference */
- noway_assert((tree->gtOper == GT_LCL_VAR) || (tree->gtOper == GT_LCL_FLD));
+ assert((tree->gtOper == GT_LCL_VAR) || (tree->gtOper == GT_LCL_FLD));
unsigned lclNum = tree->gtLclVarCommon.gtLclNum;
noway_assert(lclNum < lvaCount);
GenTreePtr Compiler::fgMorphLocalVar(GenTreePtr tree, bool forceRemorph)
{
- noway_assert(tree->gtOper == GT_LCL_VAR);
+ assert(tree->gtOper == GT_LCL_VAR);
unsigned lclNum = tree->gtLclVarCommon.gtLclNum;
var_types varType = lvaGetRealType(lclNum);
GenTreePtr Compiler::fgMorphConst(GenTreePtr tree)
{
- noway_assert(tree->OperKind() & GTK_CONST);
+ assert(tree->OperKind() & GTK_CONST);
/* Clear any exception flags or other unnecessary flags
* that may have been set before folding this node to a constant */
GenTreePtr Compiler::fgMorphLeaf(GenTreePtr tree)
{
- noway_assert(tree->OperKind() & GTK_LEAF);
+ assert(tree->OperKind() & GTK_LEAF);
if (tree->gtOper == GT_LCL_VAR)
{
// flow and gcc thinks that the function never returns
{
ALLOCA_CHECK();
- noway_assert(tree->OperKind() & GTK_SMPOP);
+ assert(tree->OperKind() & GTK_SMPOP);
/* The steps in this function are :
o Perform required preorder processing
// Note that gtFoldExpr may return a non-leaf even if successful
// e.g. for something like "expr / 1" - see also bug #290853
if (tree->OperIsLeaf() || (oldTree != tree))
-
{
return (oldTree != tree) ? fgMorphTree(tree) : fgMorphLeaf(tree);
}
*
* NOTE: Don't reset the exception flags on nodes that may throw */
- noway_assert(tree->gtOper != GT_CALL);
+ assert(tree->gtOper != GT_CALL);
if ((tree->gtOper != GT_INTRINSIC) || !IsIntrinsicImplementedByUserCall(tree->gtIntrinsic.gtIntrinsicId))
{
break;
}
- noway_assert(oper == tree->gtOper);
+ assert(oper == tree->gtOper);
// If we are in the Valuenum CSE phase then don't morph away anything as these
// nodes may have CSE defs/uses in them.
if (typ == TYP_DOUBLE)
{
- noway_assert(CPX_R4_NEG + 1 == CPX_R8_NEG);
- noway_assert(CPX_R4_ADD + 1 == CPX_R8_ADD);
- noway_assert(CPX_R4_SUB + 1 == CPX_R8_SUB);
- noway_assert(CPX_R4_MUL + 1 == CPX_R8_MUL);
- noway_assert(CPX_R4_DIV + 1 == CPX_R8_DIV);
+ static_assert_no_msg(CPX_R4_NEG + 1 == CPX_R8_NEG);
+ static_assert_no_msg(CPX_R4_ADD + 1 == CPX_R8_ADD);
+ static_assert_no_msg(CPX_R4_SUB + 1 == CPX_R8_SUB);
+ static_assert_no_msg(CPX_R4_MUL + 1 == CPX_R8_MUL);
+ static_assert_no_msg(CPX_R4_DIV + 1 == CPX_R8_DIV);
helper++;
}
{
noway_assert(tree->OperIsCompare());
- noway_assert(CPX_R4_EQ + 1 == CPX_R8_EQ);
- noway_assert(CPX_R4_NE + 1 == CPX_R8_NE);
- noway_assert(CPX_R4_LT + 1 == CPX_R8_LT);
- noway_assert(CPX_R4_LE + 1 == CPX_R8_LE);
- noway_assert(CPX_R4_GE + 1 == CPX_R8_GE);
- noway_assert(CPX_R4_GT + 1 == CPX_R8_GT);
+ static_assert_no_msg(CPX_R4_EQ + 1 == CPX_R8_EQ);
+ static_assert_no_msg(CPX_R4_NE + 1 == CPX_R8_NE);
+ static_assert_no_msg(CPX_R4_LT + 1 == CPX_R8_LT);
+ static_assert_no_msg(CPX_R4_LE + 1 == CPX_R8_LE);
+ static_assert_no_msg(CPX_R4_GE + 1 == CPX_R8_GE);
+ static_assert_no_msg(CPX_R4_GT + 1 == CPX_R8_GT);
}
tree = fgMorphIntoHelperCall(tree, helper, args);
GenTreePtr Compiler::fgMorphTree(GenTreePtr tree, MorphAddrContext* mac)
{
- noway_assert(tree);
- noway_assert(tree->gtOper != GT_STMT);
+ assert(tree);
+ assert(tree->gtOper != GT_STMT);
#ifdef DEBUG
if (verbose)
/* newTree is non-Null if we propagated an assertion */
newTree = optAssertionProp(apFull, tree, nullptr);
}
- noway_assert(tree != nullptr);
+ assert(tree != nullptr);
}
}
PREFAST_ASSUME(tree != nullptr);
GenTreePtr prev = nullptr;
for (; stmt != nullptr; prev = stmt->gtStmtExpr, stmt = stmt->gtNextStmt)
{
- noway_assert(stmt->gtOper == GT_STMT);
+ assert(stmt->gtOper == GT_STMT);
if (fgRemoveRestOfBlock)
{
{
for (tree = block->bbTreeList; tree; tree = tree->gtNext)
{
- noway_assert(tree->gtOper == GT_STMT);
+ assert(tree->gtOper == GT_STMT);
GenTreePtr last = tree->gtStmt.gtStmtExpr;
if (last->gtOper == GT_ASG_ADD || last->gtOper == GT_ASG_SUB)