Reformat jit code on OSX
authorMichelle McDaniel <adiaaida@gmail.com>
Wed, 21 Sep 2016 16:39:53 +0000 (09:39 -0700)
committerMichelle McDaniel <adiaaida@gmail.com>
Wed, 21 Sep 2016 20:52:06 +0000 (13:52 -0700)
src/jit/bitsetasuint64.h
src/jit/codegeninterface.h
src/jit/codegenxarch.cpp
src/jit/compiler.h
src/jit/flowgraph.cpp
src/jit/gentree.h
src/jit/lclvars.cpp
src/jit/lsra.cpp
src/jit/tinyarray.h

index 150f7e9..243e9e3 100644 (file)
@@ -167,7 +167,7 @@ public:
     {
         IAllocator* alloc          = BitSetTraits::GetDebugOnlyAllocator(env);
         const int   CharsForUINT64 = sizeof(UINT64) * 2;
-        char*       res            = NULL;
+        char*       res            = nullptr;
         const int   AllocSize      = CharsForUINT64 + 4;
         res                        = (char*)alloc->Alloc(AllocSize);
         UINT64   bits              = bs;
index e9abbe6..1128b6d 100644 (file)
@@ -253,7 +253,7 @@ public:
 
 private:
     bool m_cgDoubleAlign;
-#else  // !DOUBLE_ALIGN
+#else // !DOUBLE_ALIGN
 public:
     bool doubleAlignOrFramePointerUsed() const
     {
index 44bf2cb..2e764d3 100644 (file)
@@ -3601,7 +3601,7 @@ void CodeGen::genCodeForInitBlkUnroll(GenTreeBlk* initBlkNode)
         offset += 4;
         emit->emitIns_AR_R(INS_mov, EA_4BYTE, valReg, dstAddr->gtRegNum, offset);
         offset += 4;
-#else  // !_TARGET_X86_
+#else // !_TARGET_X86_
         emit->emitIns_AR_R(INS_mov, EA_8BYTE, valReg, dstAddr->gtRegNum, offset);
         offset += 8;
 #endif // !_TARGET_X86_
@@ -4136,7 +4136,9 @@ void CodeGen::genClearStackVec3ArgUpperBits()
 {
 #ifdef DEBUG
     if (verbose)
+    {
         printf("*************** In genClearStackVec3ArgUpperBits()\n");
+    }
 #endif
 
     assert(compiler->compGeneratingProlog);
@@ -6363,9 +6365,11 @@ void CodeGen::genCallInstruction(GenTreePtr node)
                 stackArgBytes += argBytes;
             }
             else
+            {
 #endif // FEATURE_PUT_STRUCT_ARG_STK
 
                 stackArgBytes += genTypeSize(genActualType(arg->TypeGet()));
+            }
         }
         args = args->gtOp.gtOp2;
     }
index 7b5fcf6..0788303 100644 (file)
@@ -7932,7 +7932,7 @@ public:
         // Such method's compRetNativeType is TYP_STRUCT without a hidden RetBufArg
         return varTypeIsStruct(info.compRetNativeType) && (info.compRetBuffArg == BAD_VAR_NUM);
 #endif // TARGET_XXX
-#else // not FEATURE_MULTIREG_RET
+#else  // not FEATURE_MULTIREG_RET
         // For this architecture there are no multireg returns
         return false;
 #endif // FEATURE_MULTIREG_RET
index babf9c2..8a007b2 100644 (file)
@@ -2985,8 +2985,8 @@ void Compiler::fgRemovePreds()
 {
     C_ASSERT(offsetof(BasicBlock, bbPreds) ==
              offsetof(BasicBlock, bbCheapPreds)); // bbPreds and bbCheapPreds are at the same place in a union,
-    C_ASSERT(sizeof(((BasicBlock*)0)->bbPreds) ==
-             sizeof(((BasicBlock*)0)->bbCheapPreds)); // and are the same size. So, this function removes both.
+    C_ASSERT(sizeof(((BasicBlock*)nullptr)->bbPreds) ==
+             sizeof(((BasicBlock*)nullptr)->bbCheapPreds)); // and are the same size. So, this function removes both.
 
     for (BasicBlock* block = fgFirstBB; block != nullptr; block = block->bbNext)
     {
@@ -21223,14 +21223,14 @@ GenTreePtr Compiler::fgAssignStructInlineeToVar(GenTreePtr child, CORINFO_CLASS_
     // an inlinee that is made of commas. If the inlinee is not a call, then
     // we use a copy block to do the assignment.
     GenTreePtr src = child;
-    GenTreePtr lastComma = NULL;
+    GenTreePtr lastComma = nullptr;
     while (src->gtOper == GT_COMMA)
     {
         lastComma = src;
         src = src->gtOp.gtOp2;
     }
 
-    GenTreePtr newInlinee = NULL;
+    GenTreePtr newInlinee = nullptr;
     if (src->gtOper == GT_CALL)
     {
         // If inlinee was just a call, new inlinee is v05 = call()
index bad017c..d18b26e 100644 (file)
@@ -429,7 +429,7 @@ struct GenTree
         noway_assert(FitsIn<unsigned char>(level));
         gtFPlvl = (unsigned char)level;
     }
-#else  // FEATURE_STACK_FP_X87
+#else // FEATURE_STACK_FP_X87
     void gtCopyFPlvl(GenTree* other)
     {
     }
@@ -4937,7 +4937,9 @@ inline bool GenTree::IsValidCallArgument()
             // ToDo: fix UNIX_AMD64 so that we do not generate this kind of a List
             //  Note the list as currently created is malformed, as the last entry is a nullptr
             if (gtListPtr->Current() == nullptr)
+            {
                 break;
+            }
 
             // Only a list of GT_LCL_FLDs is allowed
             if (gtListPtr->Current()->OperGet() != GT_LCL_FLD)
index e0ebc6a..913f61c 100644 (file)
@@ -4457,7 +4457,9 @@ int Compiler::lvaAssignVirtualFrameOffsetToArg(unsigned lclNum,
     noway_assert(argSize);
 
     if (Target::g_tgtArgOrder == Target::ARG_ORDER_L2R)
+    {
         argOffs -= argSize;
+    }
 
     unsigned fieldVarNum = BAD_VAR_NUM;
 
@@ -4547,7 +4549,9 @@ int Compiler::lvaAssignVirtualFrameOffsetToArg(unsigned lclNum,
     }
 
     if (Target::g_tgtArgOrder == Target::ARG_ORDER_R2L && !varDsc->lvIsRegArg)
+    {
         argOffs += argSize;
+    }
 
     return argOffs;
 }
@@ -5282,7 +5286,9 @@ void Compiler::lvaAssignVirtualFrameOffsetsToLocals()
                 //  a local variable which will need stack frame space.
                 //
                 if (!varDsc->lvIsRegArg)
+                {
                     continue;
+                }
 
 #ifdef _TARGET_ARM64_
                 if (info.compIsVarArgs)
index 3b477ca..b875b17 100644 (file)
@@ -9487,7 +9487,7 @@ void LinearScan::resolveEdge(BasicBlock*      fromBlock,
                 {
                     useSwap = true;
                 }
-#else  // !_TARGET_XARCH_
+#else // !_TARGET_XARCH_
                 else
                 {
                     tempReg = tempRegInt;
index 17d7e04..bee59bd 100644 (file)
@@ -71,7 +71,7 @@ public:
     // only use this for clearing it
     void operator=(void* rhs)
     {
-        assert(rhs == NULL);
+        assert(rhs == nullptr);
         data = 0;
     }
 };