mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 03:28:20 +02:00
Trimmed trailing whitespace
This commit is contained in:
parent
4f2fd58284
commit
602c7f318f
13 changed files with 1049 additions and 1113 deletions
|
@ -972,7 +972,6 @@ int BeCOFFObject::DbgGetTypeId(BeDbgType* dbgType, bool doDefine)
|
|||
else
|
||||
BF_FATAL("NotImpl");
|
||||
|
||||
|
||||
BF_FATAL("Invalid type");
|
||||
return -1;
|
||||
}
|
||||
|
@ -1082,7 +1081,6 @@ void BeCOFFObject::DbgStartVarDefRange(BeDbgFunction* dbgFunc, BeDbgVariable* db
|
|||
outS.Write((int16)range); // Range
|
||||
}
|
||||
|
||||
|
||||
void BeCOFFObject::DbgEndLineBlock(BeDbgFunction* dbgFunc, const Array<BeDbgCodeEmission>& emissions, int blockStartPos, int emissionStartIdx, int lineCount)
|
||||
{
|
||||
auto& outS = mDebugSSect.mData;
|
||||
|
|
|
@ -234,4 +234,3 @@ bool BeContext::AreTypesEqual(BeType* lhs, BeType* rhs)
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -88,7 +88,6 @@ public:
|
|||
|
||||
virtual ~BeType()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
int GetStride()
|
||||
|
@ -121,7 +120,6 @@ public:
|
|||
return (mTypeCode == BeTypeCode_Float) || (mTypeCode == BeTypeCode_Double);
|
||||
}
|
||||
|
||||
|
||||
bool IsStruct()
|
||||
{
|
||||
return (mTypeCode == BeTypeCode_Struct);
|
||||
|
|
|
@ -8,4 +8,3 @@
|
|||
NS_BF_BEGIN
|
||||
|
||||
NS_BF_END
|
||||
|
||||
|
|
|
@ -549,7 +549,6 @@ int64 BeIRCodeGen::ReadSLEB128()
|
|||
byteVal = mStream->Read();
|
||||
val |= ((int64)(byteVal & 0x7f)) << shift;
|
||||
shift += 7;
|
||||
|
||||
} while (byteVal >= 128);
|
||||
// Sign extend negative numbers.
|
||||
if ((byteVal & 0x40) && (shift < 64))
|
||||
|
@ -2309,7 +2308,6 @@ void BeIRCodeGen::HandleNextCmd()
|
|||
break;
|
||||
case BfIRCmd_EnsureFunctionPatchable:
|
||||
{
|
||||
|
||||
}
|
||||
break;
|
||||
case BfIRCmd_RemapBindFunction:
|
||||
|
@ -2728,7 +2726,6 @@ void BeIRCodeGen::HandleNextCmd()
|
|||
break;
|
||||
case BfIRCmd_StatementStart:
|
||||
{
|
||||
|
||||
}
|
||||
break;
|
||||
case BfIRCmd_ObjectAccessCheck:
|
||||
|
@ -2831,7 +2828,6 @@ void BeIRCodeGen::HandleNextCmd()
|
|||
typeEntry.mInstDIType->resolveCycles();
|
||||
}
|
||||
mDIBuilder->finalize();*/
|
||||
|
||||
}
|
||||
break;
|
||||
case BfIRCmd_DbgCreateCompileUnit:
|
||||
|
@ -3430,7 +3426,6 @@ void BeIRCodeGen::HandleNextCmd()
|
|||
}
|
||||
else
|
||||
{
|
||||
|
||||
}*/
|
||||
if (dbgFunc->mValue != NULL)
|
||||
dbgFunc->mValue->mDbgFunction = dbgFunc;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
#pragma warning(disable:4996)
|
||||
#include "BeLibManger.h"
|
||||
#include "BeefySysLib/util/BeefPerf.h"
|
||||
|
@ -93,7 +92,6 @@ bool BeLibFile::ReadLib()
|
|||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
else if (strncmp(header.mName, "// ", 3) == 0)
|
||||
|
@ -296,7 +294,6 @@ bool BeLibFile::Finish()
|
|||
|
||||
int tabStartPos = mFileStream.GetPos();
|
||||
|
||||
|
||||
BeLibMemberHeader header;
|
||||
header.Init("/", "0", tabSize);
|
||||
mFileStream.WriteT(header);
|
||||
|
@ -534,4 +531,3 @@ BeLibManager* BeLibManager::Get()
|
|||
{
|
||||
return &gBfLibManager;
|
||||
}
|
||||
|
||||
|
|
|
@ -121,5 +121,4 @@ public:
|
|||
static BeLibManager* Get();
|
||||
};
|
||||
|
||||
|
||||
NS_BF_END
|
||||
|
|
|
@ -251,7 +251,6 @@ BeVTrackingList* BeVTrackingContext::AddFiltered(BeVTrackingList* list, SizedArr
|
|||
else
|
||||
newList->mNumChanges = 0;
|
||||
|
||||
|
||||
return newList;
|
||||
}
|
||||
|
||||
|
@ -301,7 +300,6 @@ BeVTrackingList* BeVTrackingContext::AddFiltered(BeVTrackingList* list, int idx,
|
|||
else
|
||||
newList->mNumChanges = 0;
|
||||
|
||||
|
||||
return newList;
|
||||
}
|
||||
|
||||
|
@ -460,7 +458,6 @@ BeVTrackingList* BeVTrackingContext::SetChanges(BeVTrackingList* prevDestEntry,
|
|||
return newList;
|
||||
}
|
||||
|
||||
|
||||
BeVTrackingList* BeVTrackingContext::ClearFiltered(BeVTrackingList* list, const SizedArrayImpl<int>& indices)
|
||||
{
|
||||
/*int newSize = list->mSize - indices.size();
|
||||
|
@ -1504,7 +1501,6 @@ void BeMCColorizer::AssignRegs(RegKind regKind)
|
|||
dbgStr += StrFormat("VReg %d ", vregIdx);
|
||||
}*/
|
||||
|
||||
|
||||
BeMCVRegInfo* vregInfo = mContext->mVRegInfo[vregIdx];
|
||||
Node* node = &mNodes[vregIdx];
|
||||
|
||||
|
@ -2388,7 +2384,6 @@ BeMCOperand BeMCContext::GetOperand(BeValue* value, bool allowMetaResult, bool a
|
|||
break;
|
||||
case BeDbgVariable::TypeId:
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2791,7 +2786,6 @@ void BeMCContext::RemoveInst(BeMCBlock* block, int instIdx, bool needChangesMerg
|
|||
block->mInstructions.RemoveAt(instIdx);
|
||||
}
|
||||
|
||||
|
||||
BeMCOperand BeMCContext::GetCallArgVReg(int argIdx, BeTypeCode typeCode)
|
||||
{
|
||||
int pIdx = argIdx;
|
||||
|
@ -3610,7 +3604,6 @@ void BeMCContext::CreateCondBr(BeMCBlock* mcBlock, BeMCOperand& testVal, const B
|
|||
isFalseCmpResult = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -5913,7 +5906,6 @@ void BeMCContext::GetRMParams(const BeMCOperand& operand, BeRMParamsInfo& rmInfo
|
|||
// A deref can only stand alone, and no double-derefs
|
||||
if ((vregInfo->mRelOffset) || (vregInfo->mRelOffsetScale != 1) || (operand.mKind == BeMCOperandKind_VRegLoad))
|
||||
{
|
||||
|
||||
BF_ASSERT(vregInfo->mRelTo.IsVRegAny());
|
||||
rmInfo.mErrorVReg = vregInfo->mRelTo.mVRegIdx;
|
||||
// For some reason we had changed this to:
|
||||
|
@ -6116,7 +6108,6 @@ void BeMCContext::GetValAddr(const BeMCOperand& operand, X64CPURegister& reg, in
|
|||
offset = mStackSize + vregInfo->mFrameOffset;
|
||||
}
|
||||
|
||||
|
||||
int BeMCContext::GetHighestVRegRef(const BeMCOperand& operand)
|
||||
{
|
||||
if (!operand.IsVRegAny())
|
||||
|
@ -6668,7 +6659,6 @@ void BeMCContext::InitializedPassHelper(BeMCBlock* mcBlock, BeVTrackingGenContex
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
if ((inst->mResult) && (inst->mResult.mKind == BeMCOperandKind_CmpResult))
|
||||
{
|
||||
auto& cmpResult = mCmpResults[inst->mResult.mCmpResultIdx];
|
||||
|
@ -6715,7 +6705,6 @@ void BeMCContext::InitializedPassHelper(BeMCBlock* mcBlock, BeVTrackingGenContex
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
if (inst->mKind == BeMCInstKind_LifetimeEnd)
|
||||
{
|
||||
// In some cases we can have a dbg variable that actually points to a global variable (due to macros/inlining/etc), so this check is for that case:
|
||||
|
@ -6965,7 +6954,6 @@ void BeMCContext::ReplaceVRegsInit(BeMCBlock* mcBlock, int startInstIdx, BeVTrac
|
|||
// This pass does bottom-up initialization for "simple" vregs (ie: not variables)
|
||||
void BeMCContext::SimpleInitializedPass()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void BeMCContext::GenerateVRegInitFlags(BeVTrackingGenContext& genCtx)
|
||||
|
@ -7357,7 +7345,6 @@ void BeMCContext::DoSplitLargeBlocks()
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void BeMCContext::DetectLoops()
|
||||
|
@ -8015,7 +8002,6 @@ void BeMCContext::DoInstCombinePass()
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// For the form
|
||||
// <BinOp> %vreg0, %vreg1
|
||||
// Test %vreg0, 1
|
||||
|
@ -8221,7 +8207,6 @@ void BeMCContext::DoInstCombinePass()
|
|||
int* prevBestVRegIdxPtr = NULL;
|
||||
if (defMap.TryGetValue(remapTo, &prevBestVRegIdxPtr))
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
defMap[remapTo] = bestVRegIdx;
|
||||
|
@ -8457,7 +8442,6 @@ void BeMCContext::DoRegAssignPass()
|
|||
#endif
|
||||
}
|
||||
|
||||
|
||||
void BeMCContext::DoFrameObjPass()
|
||||
{
|
||||
BF_ASSERT(mBlocks.size() == 1);
|
||||
|
@ -9426,7 +9410,6 @@ bool BeMCContext::DoLegalization()
|
|||
|
||||
if (inst->mKind == BeMCInstKind_Call)
|
||||
{
|
||||
|
||||
// Convert from
|
||||
// Mov %reg0, <x>
|
||||
// ..
|
||||
|
@ -9850,8 +9833,6 @@ bool BeMCContext::DoLegalization()
|
|||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (!mVRegInitializedContext.IsSet(inst->mVRegsInitialized, vregIdx))
|
||||
{
|
||||
if ((dbgVar->mPendingInitType != BfIRInitType_NotNeeded) && (dbgVar->mPendingInitType != BfIRInitType_NotNeeded_AliveOnDecl))
|
||||
|
@ -10327,7 +10308,6 @@ bool BeMCContext::DoLegalization()
|
|||
case BeMCInstKind_Add:
|
||||
case BeMCInstKind_Sub:
|
||||
{
|
||||
|
||||
}
|
||||
break;
|
||||
case BeMCInstKind_Shl:
|
||||
|
@ -10615,7 +10595,6 @@ bool BeMCContext::DoLegalization()
|
|||
OutputDebugStrF(" Mov MemCpy\n");
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ((arg0Type->IsFloat()) && (arg1Type->IsIntable()))
|
||||
|
@ -11446,7 +11425,6 @@ void BeMCContext::DoRegFinalization()
|
|||
{
|
||||
if (inst->mArg1.IsNativeReg())
|
||||
{
|
||||
|
||||
}
|
||||
}*/
|
||||
|
||||
|
@ -13042,7 +13020,6 @@ void BeMCContext::DoCodeEmission()
|
|||
dbgStr += StrFormat("#### %d Dbg End Gap %s\n", funcCodePos, dbgVar->mName.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else // Removed
|
||||
|
@ -13921,7 +13898,6 @@ void BeMCContext::DoCodeEmission()
|
|||
}
|
||||
else if ((arg0Type->mTypeCode == BeTypeCode_Int32) || (arg0Type->mTypeCode == BeTypeCode_Int64))
|
||||
{
|
||||
|
||||
// For 64-bit writes, we would like to use 32-bit zero extension but we resort to the full
|
||||
// 64-bits if necessary
|
||||
auto arg0 = inst->mArg0;
|
||||
|
@ -14168,7 +14144,6 @@ void BeMCContext::DoCodeEmission()
|
|||
if (inst->mArg1.IsSymbol())
|
||||
{
|
||||
BF_ASSERT(inst->mArg0.IsNativeReg());
|
||||
|
||||
}
|
||||
|
||||
switch (instForm)
|
||||
|
@ -15215,7 +15190,6 @@ void BeMCContext::DoCodeEmission()
|
|||
}
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
//mOut.Write((uint8)0xC3);
|
||||
break;
|
||||
|
@ -15301,7 +15275,6 @@ void BeMCContext::DoCodeEmission()
|
|||
codeVec[jump.mCodeOffset + 1 + textSectStartPos] = GetJumpOpCode(jump.mCmpKind, true);
|
||||
}
|
||||
|
||||
|
||||
#define CODE_OFFSET_ADJUST(val) if (val >= adjustFrom) val += adjustBytes
|
||||
for (auto& labelPosition : labelPositions)
|
||||
CODE_OFFSET_ADJUST(labelPosition);
|
||||
|
@ -16144,7 +16117,7 @@ void BeMCContext::Generate(BeFunction* function)
|
|||
mDbgPreferredRegs[32] = X64Reg_R8;*/
|
||||
|
||||
//mDbgPreferredRegs[8] = X64Reg_RAX;
|
||||
mDebugging = (function->mName == "?CheckMatch@?$StringSplitEnumeratorBase@D@System@bf@@IEAA_NXZ");
|
||||
mDebugging = (function->mName == "?stbi__gif_load_next@6$StbImage@StbImageBeef@bf@@SAPEAEPEAVstbi__context@123@PEAVstbi__gif@123@PEAHHPEAE@Z");
|
||||
// || (function->mName == "?MethodA@TestProgram@BeefTest@bf@@CAXXZ");
|
||||
// || (function->mName == "?Hey@Blurg@bf@@SAXXZ")
|
||||
// ;
|
||||
|
@ -17166,7 +17139,6 @@ void BeMCContext::Generate(BeFunction* function)
|
|||
CreateDefineVReg(result);
|
||||
//TODO: Always correct?
|
||||
result.mKind = BeMCOperandKind_VReg;
|
||||
|
||||
}
|
||||
else
|
||||
SoftFail("Invalid GEP", inst->mDbgLoc);
|
||||
|
@ -17308,7 +17280,6 @@ void BeMCContext::Generate(BeFunction* function)
|
|||
}
|
||||
}*/
|
||||
|
||||
|
||||
result.mKind = BeMCOperandKind_Phi;
|
||||
result.mPhi = mcPhi;
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@ NS_BF_BEGIN
|
|||
class BeMCAddInst
|
||||
{
|
||||
public:
|
||||
|
||||
};
|
||||
|
||||
struct BeVTrackingBits
|
||||
|
@ -109,9 +108,7 @@ public:
|
|||
|
||||
DiffIterator& operator++()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
};*/
|
||||
|
||||
Iterator begin()
|
||||
|
@ -961,7 +958,6 @@ enum BeTrackKind
|
|||
BeTrackKind_COUNT = 2
|
||||
};
|
||||
|
||||
|
||||
// BeVTrackingEntry is immutable -- the Set/Clear/Merge methods allocate new entries if
|
||||
// the requested change produces a new liveness set
|
||||
class BeVTrackingContext
|
||||
|
|
|
@ -156,7 +156,6 @@ void BeInliner::Visit(BeBlock* beBlock)
|
|||
|
||||
void BeInliner::Visit(BeArgument* beArgument)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void BeInliner::Visit(BeInst* beInst)
|
||||
|
@ -385,7 +384,6 @@ void BeInliner::Visit(BeCondBrInst* condBrInst)
|
|||
|
||||
void BeInliner::Visit(BePhiIncoming* phiIncomingInst)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void BeInliner::Visit(BePhiInst* phiInst)
|
||||
|
@ -399,7 +397,6 @@ void BeInliner::Visit(BePhiInst* phiInst)
|
|||
destPhiInst->mIncoming.push_back(destPhiIncoming);
|
||||
}
|
||||
|
||||
|
||||
destPhiInst->mType = phiInst->mType;
|
||||
}
|
||||
|
||||
|
@ -717,7 +714,6 @@ BeType * BeValueScopeStartInst::GetType()
|
|||
return context->GetPrimitiveType(BeTypeCode_Int32);
|
||||
}
|
||||
|
||||
|
||||
BeType* BeGEPInst::GetType()
|
||||
{
|
||||
if (mIdx1 == NULL)
|
||||
|
@ -1517,7 +1513,6 @@ void BeDumpContext::ToString(StringImpl& str, BeValue* value, bool showType, boo
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
BeType* resultType = NULL;
|
||||
const char* wantNamePtr = NULL;
|
||||
if (auto instVal = BeValueDynCast<BeInst>(value))
|
||||
|
@ -2558,7 +2553,6 @@ String BeModule::ToString(BeFunction* wantFunc)
|
|||
|
||||
str += "}\n";
|
||||
|
||||
|
||||
if (func->mDbgFunction != NULL)
|
||||
{
|
||||
str += " DbgFunc: ";
|
||||
|
@ -2983,7 +2977,6 @@ void BeModule::DoInlining(BeFunction* func)
|
|||
return lhsInlinePos->mIdx < rhsInlinePos->mIdx;
|
||||
});
|
||||
}*/
|
||||
|
||||
}
|
||||
|
||||
void BeModule::DoInlining()
|
||||
|
|
|
@ -228,7 +228,6 @@ public:
|
|||
|
||||
virtual ~BeValue()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static const int TypeId = 0;
|
||||
|
@ -246,7 +245,6 @@ public:
|
|||
}
|
||||
virtual int GetTypeId() { return TypeId; }
|
||||
|
||||
|
||||
public:
|
||||
virtual BeType* GetType()
|
||||
{
|
||||
|
@ -255,7 +253,6 @@ public:
|
|||
|
||||
virtual void SetName(const StringImpl& name)
|
||||
{
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -619,7 +616,6 @@ public:
|
|||
virtual void HashContent(BeHashContext& hashCtx) override;
|
||||
};
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class BeInst : public BeValue
|
||||
|
@ -1588,7 +1584,6 @@ public:
|
|||
bool mIsValue;
|
||||
|
||||
virtual void HashInst(BeHashContext& hashCtx) override;
|
||||
|
||||
};
|
||||
|
||||
class BeMDNode : public BeValue
|
||||
|
@ -1599,7 +1594,6 @@ public:
|
|||
public:
|
||||
virtual ~BeMDNode()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
virtual void HashContent(BeHashContext& hashCtx) override
|
||||
|
@ -2414,8 +2408,6 @@ public:
|
|||
BeSetRetInst* CreateSetRet(BeValue* value, int returnTypeId);
|
||||
BeCallInst* CreateCall(BeValue* func, const SizedArrayImpl<BeValue*>& args);
|
||||
|
||||
|
||||
|
||||
BeConstant* GetConstant(BeType* type, double floatVal);
|
||||
BeConstant* GetConstant(BeType* type, int64 intVal);
|
||||
BeConstant* GetConstant(BeType* type, bool boolVal);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue