Permalink
Browse files

[MERGE #5807 @janisozaur] Remove superfluous const from return types

  • Loading branch information...
sethbrenith committed Nov 2, 2018
2 parents a53a73f + d995995 commit f9b712a83127b338b69aa463590d628b75e40123
Showing with 82 additions and 82 deletions.
  1. +3 −3 lib/Backend/Func.h
  2. +1 −1 lib/Backend/GlobOptBlockData.h
  3. +1 −1 lib/Backend/Lower.h
  4. +1 −1 lib/Backend/LowerMDShared.cpp
  5. +1 −1 lib/Backend/LowerMDShared.h
  6. +5 −5 lib/Backend/amd64/EncoderMD.cpp
  7. +5 −5 lib/Backend/amd64/EncoderMD.h
  8. +3 −3 lib/Backend/arm/EncoderMD.cpp
  9. +3 −3 lib/Backend/arm/EncoderMD.h
  10. +3 −3 lib/Backend/arm64/EncoderMD.cpp
  11. +3 −3 lib/Backend/arm64/EncoderMD.h
  12. +4 −4 lib/Backend/i386/EncoderMD.cpp
  13. +4 −4 lib/Backend/i386/EncoderMD.h
  14. +1 −1 lib/Common/Common/Jobs.h
  15. +1 −1 lib/Common/DataStructures/BaseDictionary.h
  16. +2 −2 lib/Common/DataStructures/KeyValuePair.h
  17. +1 −1 lib/Common/DataStructures/WeakReferenceDictionary.h
  18. +1 −1 lib/Common/Memory/HeapBlock.h
  19. +1 −1 lib/Common/Memory/HeapInfo.h
  20. +1 −1 lib/Common/Memory/Recycler.h
  21. +3 −3 lib/Parser/CharClassifier.h
  22. +2 −2 lib/Parser/Scan.h
  23. +6 −6 lib/Runtime/Base/FunctionBody.h
  24. +2 −2 lib/Runtime/Base/ScriptContext.h
  25. +1 −1 lib/Runtime/ByteCode/ByteBlock.cpp
  26. +1 −1 lib/Runtime/ByteCode/ByteBlock.h
  27. +2 −2 lib/Runtime/ByteCode/OpCodeUtil.h
  28. +1 −1 lib/Runtime/Language/Arguments.h
  29. +1 −1 lib/Runtime/Language/AsmJsTypes.h
  30. +2 −2 lib/Runtime/Language/ConstructorCache.h
  31. +1 −1 lib/Runtime/Language/InterpreterStackFrame.cpp
  32. +1 −1 lib/Runtime/Language/InterpreterStackFrame.h
  33. +3 −3 lib/Runtime/Language/JavascriptStackWalker.cpp
  34. +3 −3 lib/Runtime/Language/JavascriptStackWalker.h
  35. +2 −2 lib/Runtime/Language/PropertyGuard.h
  36. +1 −1 lib/Runtime/Library/ArgumentsObject.h
  37. +1 −1 lib/WasmReader/WasmBinaryReader.cpp
  38. +1 −1 lib/WasmReader/WasmBinaryReader.h
  39. +1 −1 lib/WasmReader/WasmCustomReader.cpp
  40. +1 −1 lib/WasmReader/WasmCustomReader.h
  41. +1 −1 lib/WasmReader/WasmReaderBase.h
@@ -119,11 +119,11 @@ class Func
Js::RegSlot returnValueRegSlot = Js::Constants::NoRegister, const bool isInlinedConstructor = false,
Js::ProfileId callSiteIdInParentFunc = UINT16_MAX, bool isGetterSetter = false);
public:
void * const GetCodeGenAllocators()
void * GetCodeGenAllocators()
{
return this->GetTopFunc()->m_codeGenAllocators;
}
InProcCodeGenAllocators * const GetInProcCodeGenAllocators()
InProcCodeGenAllocators * GetInProcCodeGenAllocators()
{
Assert(!JITManager::GetJITManager()->IsJITServer());
return reinterpret_cast<InProcCodeGenAllocators*>(this->GetTopFunc()->m_codeGenAllocators);
@@ -274,7 +274,7 @@ class Func
return &m_output;
}
const JITTimeFunctionBody * const GetJITFunctionBody() const
const JITTimeFunctionBody * GetJITFunctionBody() const
{
return m_workItem->GetJITFunctionBody();
}
@@ -20,7 +20,7 @@ class ExprAttributes
}
private:
static const uint32 BitMask(const uint index)
static uint32 BitMask(const uint index)
{
return 1u << index;
}
@@ -626,7 +626,7 @@ class Lowerer
bool GenerateFastArgumentsLdElemI(IR::Instr* ldElem, IR::LabelInstr *labelFallThru);
bool GenerateFastRealStackArgumentsLdLen(IR::Instr *ldLen);
bool GenerateFastArgumentsLdLen(IR::Instr *ldLen, IR::LabelInstr* labelFallThru);
static const uint16 GetFormalParamOffset() { /*formal start after frame pointer, return address, function object, callInfo*/ return 4;};
static uint16 GetFormalParamOffset() { /*formal start after frame pointer, return address, function object, callInfo*/ return 4;};
IR::RegOpnd* GenerateFunctionTypeFromFixedFunctionObject(IR::Instr *callInstr, IR::Opnd* functionObjOpnd);
@@ -1293,7 +1293,7 @@ void LowererMD::ChangeToIMul(IR::Instr *const instr, bool hasOverflowCheck)
EmitInt4Instr(instr); // IMUL2
}
const uint16
uint16
LowererMD::GetFormalParamOffset()
{
//In x86\x64 formal params were offset from EBP by the EBP chain, return address, and the 2 non-user params
@@ -63,7 +63,7 @@ class LowererMD
static void ChangeToSub(IR::Instr *const instr, const bool needFlags);
static void ChangeToShift(IR::Instr *const instr, const bool needFlags);
static void ChangeToIMul(IR::Instr *const instr, const bool hasOverflowCheck = false);
static const uint16 GetFormalParamOffset();
static uint16 GetFormalParamOffset();
static const Js::OpCode MDUncondBranchOpcode;
static const Js::OpCode MDMultiBranchOpcode;
static const Js::OpCode MDExtend32Opcode;
@@ -103,7 +103,7 @@ EncoderMD::Init(Encoder *encoder)
///
///----------------------------------------------------------------------------
const BYTE
BYTE
EncoderMD::GetOpcodeByte2(IR::Instr *instr)
{
return OpcodeByte2[instr->m_opcode - (Js::OpCode::MDStart+1)];
@@ -161,13 +161,13 @@ EncoderMD::GetOpbyte(IR::Instr *instr)
///
///----------------------------------------------------------------------------
const BYTE
BYTE
EncoderMD::GetRegEncode(IR::RegOpnd *regOpnd)
{
return this->GetRegEncode(regOpnd->GetReg());
}
const BYTE
BYTE
EncoderMD::GetRegEncode(RegNum reg)
{
AssertMsg(reg != RegNOREG, "should have valid reg in encoder");
@@ -189,7 +189,7 @@ EncoderMD::GetRegEncode(RegNum reg)
///
///----------------------------------------------------------------------------
const uint32
uint32
EncoderMD::GetOpdope(IR::Instr *instr)
{
return Opdope[instr->m_opcode - (Js::OpCode::MDStart+1)];
@@ -203,7 +203,7 @@ EncoderMD::GetOpdope(IR::Instr *instr)
///
///----------------------------------------------------------------------------
const uint32
uint32
EncoderMD::GetLeadIn(IR::Instr * instr)
{
return OpcodeLeadIn[instr->m_opcode - (Js::OpCode::MDStart+1)];
@@ -202,14 +202,14 @@ class EncoderMD
void AddLabelReloc(BYTE* relocAddress);
private:
const BYTE GetOpcodeByte2(IR::Instr *instr);
BYTE GetOpcodeByte2(IR::Instr *instr);
static Forms GetInstrForm(IR::Instr *instr);
const BYTE * GetFormTemplate(IR::Instr *instr);
const BYTE * GetOpbyte(IR::Instr *instr);
const BYTE GetRegEncode(IR::RegOpnd *regOpnd);
const BYTE GetRegEncode(RegNum reg);
static const uint32 GetOpdope(IR::Instr *instr);
const uint32 GetLeadIn(IR::Instr * instr);
BYTE GetRegEncode(IR::RegOpnd *regOpnd);
BYTE GetRegEncode(RegNum reg);
static uint32 GetOpdope(IR::Instr *instr);
uint32 GetLeadIn(IR::Instr * instr);
BYTE EmitModRM(IR::Instr * instr, IR::Opnd *opnd, BYTE reg1);
void EmitConst(size_t val, int size, bool allowImm64 = false);
BYTE EmitImmed(IR::Opnd * opnd, int opSize, int sbit, bool allowImm64 = false);
@@ -34,19 +34,19 @@ EncoderMD::Init(Encoder *encoder)
///
///----------------------------------------------------------------------------
const BYTE
BYTE
EncoderMD::GetRegEncode(IR::RegOpnd *regOpnd)
{
return GetRegEncode(regOpnd->GetReg());
}
const BYTE
BYTE
EncoderMD::GetRegEncode(RegNum reg)
{
return RegEncode[reg];
}
const BYTE
BYTE
EncoderMD::GetFloatRegEncode(IR::RegOpnd *regOpnd)
{
//Each double register holds two single precision registers.
@@ -58,9 +58,9 @@ class EncoderMD
void ApplyRelocs(uint32 codeBufferAddress, size_t codeSize, uint* bufferCRC, BOOL isBrShorteningSucceeded, bool isFinalBufferValidation = false);
static bool TryConstFold(IR::Instr *instr, IR::RegOpnd *regOpnd);
static bool TryFold(IR::Instr *instr, IR::RegOpnd *regOpnd);
const BYTE GetRegEncode(IR::RegOpnd *regOpnd);
const BYTE GetFloatRegEncode(IR::RegOpnd *regOpnd);
static const BYTE GetRegEncode(RegNum reg);
BYTE GetRegEncode(IR::RegOpnd *regOpnd);
BYTE GetFloatRegEncode(IR::RegOpnd *regOpnd);
static BYTE GetRegEncode(RegNum reg);
static uint32 GetOpdope(IR::Instr *instr);
static uint32 GetOpdope(Js::OpCode op);
@@ -44,19 +44,19 @@ EncoderMD::Init(Encoder *encoder)
///
///----------------------------------------------------------------------------
const BYTE
BYTE
EncoderMD::GetRegEncode(IR::RegOpnd *regOpnd)
{
return GetRegEncode(regOpnd->GetReg());
}
const BYTE
BYTE
EncoderMD::GetRegEncode(RegNum reg)
{
return RegEncode[reg];
}
const BYTE
BYTE
EncoderMD::GetFloatRegEncode(IR::RegOpnd *regOpnd)
{
BYTE regEncode = GetRegEncode(regOpnd->GetReg());
@@ -161,9 +161,9 @@ class EncoderMD
void ApplyRelocs(size_t codeBufferAddress, size_t codeSize, uint* bufferCRC, BOOL isBrShorteningSucceeded, bool isFinalBufferValidation = false);
static bool TryConstFold(IR::Instr *instr, IR::RegOpnd *regOpnd);
static bool TryFold(IR::Instr *instr, IR::RegOpnd *regOpnd);
const BYTE GetRegEncode(IR::RegOpnd *regOpnd);
const BYTE GetFloatRegEncode(IR::RegOpnd *regOpnd);
static const BYTE GetRegEncode(RegNum reg);
BYTE GetRegEncode(IR::RegOpnd *regOpnd);
BYTE GetFloatRegEncode(IR::RegOpnd *regOpnd);
static BYTE GetRegEncode(RegNum reg);
static uint32 GetOpdope(IR::Instr *instr);
static uint32 GetOpdope(Js::OpCode op);
@@ -105,7 +105,7 @@ EncoderMD::Init(Encoder *encoder)
///
///----------------------------------------------------------------------------
const BYTE
BYTE
EncoderMD::GetOpcodeByte2(IR::Instr *instr)
{
return OpcodeByte2[instr->m_opcode - (Js::OpCode::MDStart+1)];
@@ -154,7 +154,7 @@ EncoderMD::GetOpbyte(IR::Instr *instr)
///
///----------------------------------------------------------------------------
const BYTE
BYTE
EncoderMD::GetRegEncode(IR::RegOpnd *regOpnd)
{
AssertMsg(regOpnd->GetReg() != RegNOREG, "RegOpnd should have valid reg in encoder");
@@ -171,7 +171,7 @@ EncoderMD::GetRegEncode(IR::RegOpnd *regOpnd)
///
///----------------------------------------------------------------------------
const uint32
uint32
EncoderMD::GetOpdope(IR::Instr *instr)
{
return Opdope[instr->m_opcode - (Js::OpCode::MDStart+1)];
@@ -185,7 +185,7 @@ EncoderMD::GetOpdope(IR::Instr *instr)
///
///----------------------------------------------------------------------------
const uint32
uint32
EncoderMD::GetLeadIn(IR::Instr * instr)
{
return OpcodeLeadIn[instr->m_opcode - (Js::OpCode::MDStart+1)];
@@ -229,13 +229,13 @@ class EncoderMD
BYTE * GetRelocBufferAddress(EncodeRelocAndLabels * reloc);
private:
const BYTE GetOpcodeByte2(IR::Instr *instr);
BYTE GetOpcodeByte2(IR::Instr *instr);
const BYTE * GetFormTemplate(IR::Instr *instr);
static Forms GetInstrForm(IR::Instr *instr);
const BYTE * GetOpbyte(IR::Instr *instr);
const BYTE GetRegEncode(IR::RegOpnd *regOpnd);
const uint32 GetLeadIn(IR::Instr * instr);
static const uint32 GetOpdope(IR::Instr *instr);
BYTE GetRegEncode(IR::RegOpnd *regOpnd);
uint32 GetLeadIn(IR::Instr * instr);
static uint32 GetOpdope(IR::Instr *instr);
void EmitModRM(IR::Instr * instr, IR::Opnd *opnd, BYTE reg1);
void EmitConst(size_t val, int size);
int EmitImmed(IR::Opnd * opnd, int opSize, int sbit);
@@ -442,7 +442,7 @@ namespace JsUtil
ParallelThreadData(AllocationPolicyManager* policyManager);
PageAllocator* const GetPageAllocator() { return &backgroundPageAllocator; }
PageAllocator* GetPageAllocator() { return &backgroundPageAllocator; }
bool CanDecommit() const { return canDecommit; }
};
@@ -238,7 +238,7 @@ namespace JsUtil
return entries[i].Value();
}
const TValue Item(const TKey& key) const
TValue Item(const TKey& key) const
{
int i = FindEntry(key);
Assert(i >= 0);
@@ -28,10 +28,10 @@ namespace JsUtil
{}
TKey Key() { return key; }
const TKey Key() const { return key; }
TKey Key() const { return key; }
TValue Value() { return value; }
const TValue Value() const { return value; }
TValue Value() const { return value; }
};
}
@@ -232,7 +232,7 @@ namespace JsUtil
return values[i];
}
const TBValue Item(const TBKey& key) const
TBValue Item(const TBKey& key) const
{
int i = FindEntry(key);
Assert(i >= 0);
@@ -387,7 +387,7 @@ class HeapBlock
Assert(GetHeapBlockType() <= HeapBlock::HeapBlockType::BlockTypeCount);
}
HeapBlockType const GetHeapBlockType() const
HeapBlockType GetHeapBlockType() const
{
return (heapBlockType);
}
@@ -73,7 +73,7 @@ class HeapInfo
template <typename TBlockAttributes>
bool IsPageHeapEnabledForBlock(const size_t objectSize);
#else
const bool IsPageHeapEnabled() const{ return false; }
bool IsPageHeapEnabled() const{ return false; }
#endif
#if ENABLE_MEM_STATS
@@ -811,7 +811,7 @@ class Recycler
inline bool ShouldCapturePageHeapAllocStack() const { return capturePageHeapAllocStack; }
void VerifyPageHeapFillAfterAlloc(char* memBlock, size_t size, ObjectInfoBits attributes);
#else
inline const bool IsPageHeapEnabled() const { return false; }
inline bool IsPageHeapEnabled() const { return false; }
inline bool ShouldCapturePageHeapAllocStack() const { return false; }
#endif
@@ -179,7 +179,7 @@ namespace Js
return FBigChar(ch) ? IsIdContinueFast<true>(ch) : IsIdContinueFast<false>(ch);
}
const size_t SkipBiDirectionalChars(_In_z_bytecount_(2 * length) LPCOLESTR psz, _In_ size_t startIndex, _In_ size_t length) const
size_t SkipBiDirectionalChars(_In_z_bytecount_(2 * length) LPCOLESTR psz, _In_ size_t startIndex, _In_ size_t length) const
{
size_t count = 0;
while (startIndex < length)
@@ -195,7 +195,7 @@ namespace Js
return count;
}
const char16 SkipBiDirectionalChars(_In_z_ char16* &pszRef) const
char16 SkipBiDirectionalChars(_In_z_ char16* &pszRef) const
{
while (*pszRef != '\0')
{
@@ -249,7 +249,7 @@ namespace Js
return skipIdentifierFunc(psz, this);
}
const LPCUTF8 SkipIdentifier(LPCUTF8 psz, LPCUTF8 end) const
LPCUTF8 SkipIdentifier(LPCUTF8 psz, LPCUTF8 end) const
{
return skipIdentifierStartEndFunc(psz, end, this);
}
@@ -776,11 +776,11 @@ class Scanner : public IScanner, public EncodingPolicy
throw ParseExceptionObject(hr);
}
const EncodedCharPtr PchBase(void) const
EncodedCharPtr PchBase(void) const
{
return m_pchBase;
}
const EncodedCharPtr PchMinTok(void)
EncodedCharPtr PchMinTok(void)
{
return m_pchMinTok;
}
Oops, something went wrong.

0 comments on commit f9b712a

Please sign in to comment.