Просмотр исходного кода

C++ conformance. (building with /permissive-)

These issues were found when building with the /permissive- flag in the latest version of MSVC.  No tests were added/modified because this does not change any behavior.

There are three types of language conformance issues fixed in this:

1) Strict string conversion (this is also covered by the /Zc:strictStrings flag)

  The 'const' is not implicitly dropped by string literals, which means the following is not allowed:

  char *str = "const string literal"; //error: cannot convert a 'const char*' to a 'char*'

  This fix to to make str 'const char*'.  (This can have a domino effect depending on where str is used)

2) Fully qualified inline declarations members inside class

   struct A {
      void A::f() { } // Error: illegal qualified name in member declaration, remove redundant 'A::' to fix
   };

3) MSVC by default will allows name lookup in a dependent base.  This is disabled by /permissive-

    template <class T> struct B {
      void f();
    };

    template <class T> struct D
        : public B<T> //B is a dependent base because its type depends on the type of T in D<T>.
    {
        //One possible fix is to uncomment the following line.  If this were a type we should have 'using typename'...
        //using B<T>::f;

        void g() {
          f(); //Error: identifier not found, one possible fix is change it to 'this->f();'
        }
    };

    void h()
    {
       D<int> d;
       d.g();
    }
Phil Christensen 9 лет назад
Родитель
Сommit
47005692af
36 измененных файлов с 179 добавлено и 153 удалено
  1. 1 1
      bin/ChakraCore/ChakraCoreDllFunc.cpp
  2. 2 2
      bin/NativeTests/CodexTests.cpp
  3. 1 1
      bin/ch/ch.cpp
  4. 57 51
      bin/rl/rl.cpp
  5. 36 29
      bin/rl/rl.h
  6. 2 2
      bin/rl/rlfeint.cpp
  7. 5 5
      bin/rl/rlmp.cpp
  8. 5 4
      bin/rl/rlregr.cpp
  9. 21 21
      bin/rl/rlrun.cpp
  10. 1 1
      bin/rl/xmlreader.cpp
  11. 2 2
      bin/rl/xmlreader.h
  12. 2 2
      lib/Backend/GlobOpt.h
  13. 1 1
      lib/Backend/IR.h
  14. 5 5
      lib/Backend/InterpreterThunkEmitter.h
  15. 1 1
      lib/Common/Common/NumberUtilities.h
  16. 1 0
      lib/Common/Memory/AutoPtr.h
  17. 1 0
      lib/Common/Memory/SmallFinalizableHeapBlock.h
  18. 2 0
      lib/Common/Memory/SmallNormalHeapBlock.h
  19. 8 0
      lib/Parser/CharMap.h
  20. 4 4
      lib/Parser/RegexCompileTime.h
  21. 1 1
      lib/Runtime/Base/ThreadContext.h
  22. 1 1
      lib/Runtime/ByteCode/ByteCodeWriter.h
  23. 2 2
      lib/Runtime/Debug/DiagObjectModel.h
  24. 1 1
      lib/Runtime/Debug/ProbeContainer.h
  25. 2 2
      lib/Runtime/Debug/TTEventLog.h
  26. 1 1
      lib/Runtime/Language/JavascriptConversion.h
  27. 2 2
      lib/Runtime/Language/JavascriptExceptionObject.h
  28. 1 1
      lib/Runtime/Language/JavascriptOperators.h
  29. 1 1
      lib/Runtime/Language/JavascriptStackWalker.h
  30. 3 3
      lib/Runtime/Language/TaggedInt.h
  31. 1 1
      lib/Runtime/Library/JSON.h
  32. 1 1
      lib/Runtime/Library/JSONParser.h
  33. 1 1
      lib/Runtime/Library/JavascriptLibrary.h
  34. 1 1
      lib/Runtime/Library/MathLibrary.h
  35. 1 1
      lib/Runtime/Library/RegexHelper.h
  36. 1 1
      lib/Runtime/Types/PathTypeHandler.h

+ 1 - 1
bin/ChakraCore/ChakraCoreDllFunc.cpp

@@ -79,7 +79,7 @@ static BOOL AttachProcess(HANDLE hmod)
     // This is unnecessary on Linux since there aren't other flavors of
     // Chakra binaries that can be loaded into the process
 #ifdef _WIN32
-    char16 *engine = szChakraCoreLock;
+    const char16 *engine = szChakraCoreLock;
     if (::FindAtom(szChakraLock) != 0)
     {
         AssertMsg(FALSE, "Expecting to load chakracore.dll but process already loaded chakra.dll");

+ 2 - 2
bin/NativeTests/CodexTests.cpp

@@ -204,12 +204,12 @@ namespace CodexTest
     {
         const charcount_t charCount = 3;
         utf8char_t encodedBuffer[(charCount + 1) * 3]; // +1 since the buffer will be null terminated
-        char16* sourceBuffer = L"abc";
+        const char16* sourceBuffer = L"abc";
         size_t numEncodedBytes = utf8::EncodeTrueUtf8IntoAndNullTerminate(encodedBuffer, sourceBuffer, charCount);
         CHECK(numEncodedBytes == charCount);
         for (int i = 0; i < charCount; i++)
         {
-            CHECK(sourceBuffer[i] == (char16)encodedBuffer[i]);
+            CHECK(sourceBuffer[i] == (const char16)encodedBuffer[i]);
         }
     }
 };

+ 1 - 1
bin/ch/ch.cpp

@@ -22,7 +22,7 @@ byte ttUri[MAX_PATH * sizeof(wchar_t)];
 size_t ttUriByteLength = 0;
 UINT32 snapInterval = MAXUINT32;
 UINT32 snapHistoryLength = MAXUINT32;
-LPWSTR connectionUuidString = NULL;
+LPCWSTR connectionUuidString = NULL;
 UINT32 startEventCount = 1;
 
 extern "C"

+ 57 - 51
bin/rl/rl.cpp

@@ -301,15 +301,19 @@ Tags* DirectoryTagsList = NULL;
 Tags* DirectoryTagsLast = NULL;
 
 char SavedConsoleTitle[BUFFER_SIZE];
-char *REGRESS = NULL, *MASTER_DIR, *DIFF_DIR, *TARGET_MACHINE, *RL_MACHINE, *TARGET_OS_NAME = NULL;
-char *REGR_CL, *REGR_DIFF, *REGR_ASM, *REGR_SHOWD;
-char *EXTRA_CC_FLAGS, *EXEC_TESTS_FLAGS, *TARGET_VM;
-char *LINKER, *LINKFLAGS;
+const char *DIFF_DIR;
+char *REGRESS = NULL, *MASTER_DIR, *TARGET_MACHINE, *RL_MACHINE, *TARGET_OS_NAME = NULL;
+const char *REGR_CL, *REGR_DIFF;
+char *REGR_ASM, *REGR_SHOWD;
+const char *TARGET_VM;
+char *EXTRA_CC_FLAGS, *EXEC_TESTS_FLAGS;
+const char *LINKER, *LINKFLAGS;
 char *CL, *_CL_;
-char *JCBinary = "jshost.exe";
+const char *JCBinary = "jshost.exe";
 
 BOOL FStatus = TRUE;
-char *StatusPrefix, *StatusFormat;
+char *StatusPrefix;
+const char *StatusFormat;
 
 BOOL FVerbose;
 BOOL FQuiet;
@@ -369,10 +373,10 @@ char *ResumeDir, *MatchDir;
 
 TIME_OPTION Timing = TIME_DIR | TIME_TEST; // Default to report times at test and directory level
 
-static char *ProgramName;
-static char *LogName;
-static char *FullLogName;
-static char *ResultsLogName;
+static const char *ProgramName;
+static const char *LogName;
+static const char *FullLogName;
+static const char *ResultsLogName;
 
 // NOTE: this might be unused now
 static char TempPath[MAX_PATH] = ""; // Path for temporary files
@@ -500,7 +504,7 @@ NT_handling_function(unsigned long /* dummy -- unused */)
 
 void
 assert(
-   char *file,
+   const char *file,
    int line
 )
 {
@@ -657,7 +661,7 @@ __inline void FlushOutput(
 
 BOOL
 DeleteFileIfFoundInternal(
-   char* filename
+   const char* filename
 )
 {
    BOOL ok;
@@ -683,7 +687,7 @@ DeleteFileIfFoundInternal(
 
 BOOL
 DeleteFileIfFound(
-   char* filename
+   const char* filename
 )
 {
    BOOL ok;
@@ -757,7 +761,7 @@ DeleteFileRetryMsg(
 void
 DeleteMultipleFiles(
    CDirectory* pDir,
-   char* pattern
+   const char* pattern
 )
 {
    WIN32_FIND_DATA findData;
@@ -809,8 +813,8 @@ const char* GetFilenameExt(const char *path)
 
 char *
 mytmpnam(
-   char *directory,
-   char *prefix,
+   const char *directory,
+   const char *prefix,
    char *filename
 )
 {
@@ -952,7 +956,7 @@ DoCompare(
 
 char *
 FormatString(
-   char *format
+   const char *format
 )
 {
    static char buf[BUFFER_SIZE + 32]; // extra in case a sprintf_s goes over
@@ -1453,14 +1457,15 @@ HasInfo
    return FALSE;
 }
 
-StringList *
+template<typename ListType,typename String>
+ListNode<ListType> *
 AddToStringList
 (
-   StringList * list,
-   char* string
+   ListNode<ListType> * list,
+   String string
 )
 {
-   StringList * p = new StringList;
+   ListNode<ListType> * p = new ListNode<ListType>;
 
    p->string = string; // NOTE: we store the pointer; we don't copy the string
    p->next = NULL;
@@ -1470,7 +1475,7 @@ AddToStringList
       return p;
    }
 
-   StringList * last = list;
+   ListNode<ListType> * last = list;
 
    while (last->next != NULL)
    {
@@ -1482,15 +1487,16 @@ AddToStringList
    return list;
 }
 
+template<typename T>
 void
 FreeStringList
 (
-   StringList * list
+   ListNode<T> * list
 )
 {
    while (list)
    {
-      StringList * pFree = list;
+      ListNode<T> * pFree = list;
       list = list->next;
 
       delete pFree;
@@ -1513,16 +1519,16 @@ FreeVariants
 }
 
 StringList *
-ParseStringList(char* p, char* delim)
+ParseStringList(const char* cp, const char* delim)
 {
    StringList * list = NULL;
 
-   if (p == NULL)
+   if (cp == NULL)
    {
       return list;
    }
 
-   p = _strdup(p); // don't trash passed-in memory
+   char *p = _strdup(cp); // don't trash passed-in memory
 
    p = mystrtok(p, delim, delim);
 
@@ -1929,11 +1935,13 @@ GetEnvironment(
    else {
       if (EXEC_TESTS_FLAGS == NULL) {
          if ((EXEC_TESTS_FLAGS = getenv_unsafe("EXEC_TESTS_FLAGS")) == NULL)
-            EXEC_TESTS_FLAGS = DEFAULT_EXEC_TESTS_FLAGS;
-
-         // We edit EXEC_TESTS_FLAGS, so create a copy.
+         {
+            EXEC_TESTS_FLAGS = _strdup(DEFAULT_EXEC_TESTS_FLAGS);
+         } else {
+             // We edit EXEC_TESTS_FLAGS, so create a copy.
 
-         EXEC_TESTS_FLAGS = _strdup(EXEC_TESTS_FLAGS);
+             EXEC_TESTS_FLAGS = _strdup(EXEC_TESTS_FLAGS);
+         }
       }
 
       if ((TARGET_VM = getenv_unsafe("TARGET_VM")) == NULL) {
@@ -2206,12 +2214,11 @@ PrintTestInfo
    TestInfo *pTestInfo
 )
 {
-   StringList * GetNameDataPairs(Xml::Node * node);
+   ConstStringList * GetNameDataPairs(Xml::Node * node);
 
    for(int i=0;i < _TIK_COUNT; i++) {
-      StringList* pStringList = NULL;
       if ((i == TIK_ENV) && pTestInfo->data[TIK_ENV]) {
-         pStringList = GetNameDataPairs((Xml::Node*)pTestInfo->data[TIK_ENV]);
+         auto pStringList = GetNameDataPairs((Xml::Node*)pTestInfo->data[TIK_ENV]);
          if (pStringList) {
             for(; pStringList != NULL; pStringList = pStringList->next->next) {
                ASSERT(pStringList->next);
@@ -2292,13 +2299,13 @@ PadSpecialChars
 }
 
 // given an xml node, returns the name-data StringList pairs for all children
-StringList * GetNameDataPairs
+ConstStringList * GetNameDataPairs
 (
    Xml::Node * node
 )
 {
   ASSERT(node->ChildList != NULL);
-  StringList *pStringList = NULL;
+  ConstStringList *pStringList = NULL;
    for (Xml::Node *ChildNode = node->ChildList; ChildNode != NULL; ChildNode = ChildNode->Next) {
       pStringList = AddToStringList(pStringList, ChildNode->Name);
       pStringList = AddToStringList(pStringList, ChildNode->Data);
@@ -2391,9 +2398,8 @@ WriteEnvLst
          strcat_s(comments, " "); strcat_s(comments, variants->optFlags);
 
          // print the env settings
-         StringList* pStringList = NULL;
          if (variants->testInfo.data[TIK_ENV]) {
-            pStringList = GetNameDataPairs((Xml::Node*)variants->testInfo.data[TIK_ENV]);
+            auto pStringList = GetNameDataPairs((Xml::Node*)variants->testInfo.data[TIK_ENV]);
             if (pStringList) {
                // assuming even number of elements
                for(; pStringList != NULL; pStringList = pStringList->next->next) {
@@ -2430,7 +2436,7 @@ WriteEnvLst
 
 BOOL
 IsRelativePath(
-   char *path
+   const char *path
 )
 {
    char drive[MAX_PATH], dir[MAX_PATH];
@@ -2998,7 +3004,7 @@ ShouldIncludeTest(
 
 void
 ParseEnvVar(
-   char *envVar
+   const char *envVar
 )
 {
    char * s;
@@ -3203,7 +3209,7 @@ ParseCommandLine(
       {
          int numTestOptions = 0;
 
-         char * env = EXEC_TESTS_FLAGS;
+         const char * env = EXEC_TESTS_FLAGS;
          while (env) {
             env = strchr(env, ';');
             if (env)
@@ -3332,7 +3338,7 @@ ParseCommandLine(
 Test *
 FindTest(
    TestList * pTestList,
-   char * testName,
+   const char * testName,
    BOOL fUserSpecified,
    TestInfo * testInfo
 
@@ -3392,7 +3398,7 @@ FindTest(
 }
 
 BOOL
-IsTimeoutStringValid(char *strTimeout) {
+IsTimeoutStringValid(const char *strTimeout) {
    char *end;
    _set_errno(0);
 
@@ -3542,7 +3548,7 @@ AddExeVariants
       ppLastVariant = &(*ppLastVariant)->next;
    }
 
-   char ** optFlagsArray;
+   const char ** optFlagsArray;
 
    // Decide which list to use depending on the tag.
    optFlagsArray = IsPogoTest(pTest)
@@ -3612,7 +3618,7 @@ BOOL
 ParseFiles
 (
    TestList * pTestList,
-   char * testName,
+   const char * testName,
    RLMODE cfg,
    TestInfo * defaultInfo,
    ConditionNodeList * cnl
@@ -3754,8 +3760,8 @@ ParseFiles
 // parameters.
 int
 mystrcmp(
-   char *a,
-   char *b
+   const char *a,
+   const char *b
 )
 {
    if (a == b)
@@ -3775,8 +3781,8 @@ mystrcmp(
 char *
 mystrtok(
    char *s,
-   char *delim,
-   char *term
+   const char *delim,
+   const char *term
 )
 {
    static char *str = NULL;
@@ -4493,7 +4499,7 @@ PerformSingleRegression(
 {
     char testNameBuf[BUFFER_SIZE];
     char tempBuf[BUFFER_SIZE];
-    char* ccFlags;
+    const char* ccFlags;
     time_t start_test, elapsed_test;
     RLFE_STATUS rlfeStatus;
 
@@ -4613,7 +4619,7 @@ RegressDirectory(
    TestList * pTestList;
    Test * pTest;
    char* path;
-   char* dir;
+   const char* dir;
 
 #ifndef NODEBUG
    if (FDebug)

+ 36 - 29
bin/rl/rl.h

@@ -30,7 +30,7 @@ typedef unsigned __int32 uint32;
 #define BUFFER_SIZE 1024
 #define MAXQUEUE    10000
 
-extern void assert(char *file, int line);
+extern void assert(const char *file, int line);
 #define ASSERT(ex) ((ex) ? (void)0 : assert(__FILE__, __LINE__))
 #define ASSERTNR ASSERT
 #define UNREACHED FALSE
@@ -41,13 +41,13 @@ extern void assert(char *file, int line);
 // Target machines
 
 typedef struct tagTARGETINFO {
-    char * name;
+    const char * name;
     BOOL fRL_MACHINEonly;
     BOOL fAutoCrossCompilation;
     BOOL fUseNoGPF;
-    char * TARGET_VM;
-    char * LINKFLAGS;
-    char * NotTags;
+    const char * TARGET_VM;
+    const char * LINKFLAGS;
+    const char * NotTags;
 } TARGETINFO;
 
 extern TARGETINFO TargetInfo[];
@@ -212,7 +212,7 @@ extern const char * const TestInfoKindName[];
 struct TestInfo
 {
    BOOL hasData[_TIK_COUNT];
-   char * data[_TIK_COUNT];
+   const char * data[_TIK_COUNT];
 };
 
 struct Tags
@@ -243,12 +243,16 @@ enum FILE_CONFIG_STATUS
     FCS_USER_SPECIFIED, FCS_US_FLAGS, FCS_READ
 };
 
-struct StringList
+template<typename T>
+struct ListNode
 {
-   StringList * next;
-   char * string;
+    ListNode *next;
+    T string;
 };
 
+typedef ListNode<char*> StringList;
+typedef ListNode<const char*> ConstStringList;
+
 struct TestVariant
 {
    TestVariant() : next(NULL), optFlags(NULL) {}
@@ -257,7 +261,7 @@ struct TestVariant
 
    // Exe optimization flags.
 
-   char * optFlags;
+   const char * optFlags;
 
    // Test-specific info.
 
@@ -274,7 +278,7 @@ struct Test
 
    // For directories
 
-   char * name;
+   const char * name;
    char * fullPath;
    int num;
 
@@ -629,13 +633,13 @@ public:
 
     TestList * GetTestList() { return &_testList; }
 
-    char* GetDirectoryName() { return _pDir->name; }
+    const char* GetDirectoryName() { return _pDir->name; }
     char* GetDirectoryPath() { return _pDir->fullPath; }
     int GetDirectoryNumber() { return _pDir->num; }
 
     BOOL HasTestInfoData(TestInfoKind testInfoKind) { return _pDir->defaultTestInfo.hasData[testInfoKind]; }
-    char* GetTestInfoData(TestInfoKind testInfoKind) { return _pDir->defaultTestInfo.data[testInfoKind]; }
-    char* GetFullPathFromSourceOrDirectory() { return HasTestInfoData(TIK_SOURCE_PATH) ? GetTestInfoData(TIK_SOURCE_PATH) : GetDirectoryPath(); }
+    const char* GetTestInfoData(TestInfoKind testInfoKind) { return _pDir->defaultTestInfo.data[testInfoKind]; }
+    const char* GetFullPathFromSourceOrDirectory() { return HasTestInfoData(TIK_SOURCE_PATH) ? GetTestInfoData(TIK_SOURCE_PATH) : GetDirectoryPath(); }
 
     bool IsBaseline() { return !_isDiffDirectory; }
     void SetDiffFlag() { _isDiffDirectory = true; }
@@ -771,7 +775,7 @@ public:
 
     // Track current test, for use in creating the title bar
 
-    void SetCurrentTest(char* dir, char* test, bool isBaseline);
+    void SetCurrentTest(const char* dir, const char* test, bool isBaseline);
 
     template <size_t bufSize>
     void GetCurrentTest(char (&currentTest)[bufSize])
@@ -824,7 +828,7 @@ class COutputBuffer
 
 public:
 
-    COutputBuffer(char* logfile, bool buffered = true);
+    COutputBuffer(const char* logfile, bool buffered = true);
 
     COutputBuffer(FILE* pfile, bool buffered = true);
 
@@ -844,11 +848,14 @@ public:
 
 /////////////////////////////////////////////////////////////////////////
 
-extern char *REGRESS, *MASTER_DIR, *DIFF_DIR;
-extern char *REGR_CL, *REGR_DIFF, *REGR_ASM, *REGR_SHOWD;
-extern char *EXTRA_CC_FLAGS, *EXEC_TESTS_FLAGS, *TARGET_VM;
-extern char *LINKER, *LINKFLAGS;
-extern char *JCBinary;
+extern const char *DIFF_DIR;
+extern char *REGRESS, *MASTER_DIR;
+extern const char *REGR_CL, *REGR_DIFF;
+extern char *REGR_ASM, *REGR_SHOWD;
+extern const char *TARGET_VM;
+extern char *EXTRA_CC_FLAGS, *EXEC_TESTS_FLAGS;
+extern const char *LINKER, *LINKFLAGS;
+extern const char *JCBinary;
 
 extern BOOL FBaseline;
 extern BOOL FRebase; // Whether creates .rebase file if testout mismatches baseline
@@ -865,7 +872,7 @@ extern BOOL FTest;
 extern BOOL FAppendTestNameToExtraCCFlags;
 
 #define MAXOPTIONS 60
-extern char *OptFlags[MAXOPTIONS + 1], *PogoOptFlags[MAXOPTIONS + 1];
+extern const char *OptFlags[MAXOPTIONS + 1], *PogoOptFlags[MAXOPTIONS + 1];
 
 #ifndef NODEBUG
 extern BOOL FDebug;
@@ -912,22 +919,22 @@ extern void __cdecl WriteLog(const char *fmt, ...);
 extern void __cdecl LogOut(const char *fmt, ...);
 extern void __cdecl LogError(const char *fmt, ...);
 extern void FlushOutput(void);
-extern char *mytmpnam(char* directory, char *prefix, char *filename);
+extern char *mytmpnam(const char* directory, const char *prefix, char *filename);
 extern int DoCompare(char *file1, char *file2);
 extern void UpdateTitleStatus();
-extern int mystrcmp(char *a, char *b);
-extern char * mystrtok(char *s, char *delim, char *term);
+extern int mystrcmp(const char *a, const char *b);
+extern char * mystrtok(char *s, const char *delim, const char *term);
 extern void FreeTestList(TestList * pTestList);
 #ifndef NODEBUG
 extern void DumpTestList(TestList * pTestList);
 #endif
-extern void DeleteMultipleFiles(CDirectory* pDir, char *pattern);
+extern void DeleteMultipleFiles(CDirectory* pDir, const char *pattern);
 extern char *GetFilenamePtr(char *path);
 extern const char* GetFilenameExt(const char *path);
 extern void DeleteFileMsg(char *filename);
-extern BOOL DeleteFileIfFound(char *filename);
+extern BOOL DeleteFileIfFound(const char *filename);
 extern void DeleteFileRetryMsg(char *filename);
-extern StringList * ParseStringList(char* p, char* delim);
+extern StringList * ParseStringList(const char* p, const char* delim);
 extern StringList * AppendStringList(StringList * stringList, StringList * appendList);
 extern StringList * AppendStringListCopy(StringList * stringList, StringList * appendList);
 extern void PrintTagsList(Tags* pTagsList);
@@ -985,7 +992,7 @@ extern int ExecTest(CDirectory* pDir, Test * pTest, TestVariant * pTestVariant);
 
 // rlmp.cpp
 
-extern int ExecuteCommand(char* path, char* CommandLine, DWORD millisecTimeout = INFINITE, void* localEnvVars = NULL);
+extern int ExecuteCommand(const char* path, const char* CommandLine, DWORD millisecTimeout = INFINITE, void* localEnvVars = NULL);
 
 extern int DoOneExternalTest(
     CDirectory* pDir,

+ 2 - 2
bin/rl/rlfeint.cpp

@@ -33,7 +33,7 @@ SpawnRLFE(
 )
 {
     char cmd[1024];
-    char *str = "Unexpected error";
+    const char *str = "Unexpected error";
     enum SD_STATUS {
         SD_NONE, SD_IN, SD_ERR, SD_OUT, SD_CREATE
     } status;
@@ -391,7 +391,7 @@ RLFEAddTest(
     CDirectory *pDir
 )
 {
-    char *path;
+    const char *path;
     int len, num;
 
     path = pDir->GetDirectoryName();

+ 5 - 5
bin/rl/rlmp.cpp

@@ -340,9 +340,9 @@ void CThreadInfo::Done()
     LeaveCriticalSection(&_cs);
 }
 
-void CThreadInfo::SetCurrentTest(char* dir, char* test, bool isBaseline)
+void CThreadInfo::SetCurrentTest(const char* dir, const char* test, bool isBaseline)
 {
-    char* tmp = "";
+    const char* tmp = "";
 
     EnterCriticalSection(&_cs);
 
@@ -421,7 +421,7 @@ void COutputBuffer::Flush(FILE* pfile)
     Reset();
 }
 
-COutputBuffer::COutputBuffer(char* logfile, bool buffered)
+COutputBuffer::COutputBuffer(const char* logfile, bool buffered)
     : _bufSize(512)
     , _buffered(buffered)
     , _textGrabbed(false)
@@ -555,8 +555,8 @@ void COutputBuffer::Flush()
 
 int
 ExecuteCommand(
-    char* path,
-    char* CommandLine,
+    const char* path,
+    const char* CommandLine,
     DWORD millisecTimeout,
     void* envFlags)
 {

+ 5 - 4
bin/rl/rlregr.cpp

@@ -40,8 +40,8 @@ static BOOL NoMasterCompare;
 
 LOCAL int
 DoCommand(
-    char *path,     // full path of directory to run command in
-    char *cmdbuf,
+    const char *path,     // full path of directory to run command in
+    const char *cmdbuf,
     bool displayError = true
 )
 {
@@ -133,13 +133,14 @@ RegrFile(
 )
 {
     FILE *fp;
-    char *p, *opts;
+    char *p;
+    const char *opts;
     int x;
     int rc;
     int retval;
     char full[MAX_PATH];              // temporary place for full paths
     char basename[MAX_PATH];          // base filename
-    char *asmdir;                     // dir of generated asm file
+    const char *asmdir;               // dir of generated asm file
     char masterasmbuf[MAX_PATH];      // name of master asm file
     char asmbuf[MAX_PATH];            // name of generated asm file
     char diffbuf[MAX_PATH];           // name of generated diff file

+ 21 - 21
bin/rl/rlrun.cpp

@@ -24,14 +24,14 @@
 //   4962 "Profile-guided optimizations disabled because profile data became inconsistent"
 //   4963 "'%s' : no profile data found; different compiler options were used in instrumented build"
 
-static char *PogoForceErrors = "-we4951 -we4952 -we4953 -we4961 -we4962 -we4963";
+static const char *PogoForceErrors = "-we4951 -we4952 -we4953 -we4961 -we4962 -we4963";
 
 //
 // Global variables set before worker threads start, and only accessed
 // (not set) by the worker threads.
 //
 // sets of options to iterate over
-char *OptFlags[MAXOPTIONS + 1], *PogoOptFlags[MAXOPTIONS + 1];
+const char *OptFlags[MAXOPTIONS + 1], *PogoOptFlags[MAXOPTIONS + 1];
 
 // use a big global array as scratch pad for passing the child process env vars
 #define MAX_ENV_LEN 10000
@@ -314,10 +314,10 @@ int
     DoOneExternalTest(
     CDirectory* pDir,
     TestVariant *pTestVariant,
-    char *optFlags,
-    char *inCCFlags,
-    char *inLinkFlags,
-    char *testCmd,
+    const char *optFlags,
+    const char *inCCFlags,
+    const char *inLinkFlags,
+    const char *testCmd,
     ExternalTestKind kind,
     BOOL fSyncVariationWhenFinished,
     BOOL fCleanBefore,
@@ -336,7 +336,7 @@ int
     char nogpfFlags[BUFFER_SIZE];
     char optReportBuf[BUFFER_SIZE];
     char nonZeroReturnBuf[BUFFER_SIZE];
-    char *reason = NULL;
+    const char *reason = NULL;
     time_t start_variation;
     UINT elapsed_variation;
     time_t start_build_variation;
@@ -501,7 +501,7 @@ int
             }
         }
 
-        char* cmd = JCBinary;
+        const char* cmd = JCBinary;
         if (kind != TK_JSCRIPT && kind != TK_HTML)
         {
             cmd = pTestVariant->testInfo.data[TIK_COMMAND];
@@ -671,7 +671,7 @@ int
     DWORD millisecTimeout
     )
 {
-    char *ccFlags = pTestVariant->testInfo.data[TIK_COMPILE_FLAGS];
+    const char *ccFlags = pTestVariant->testInfo.data[TIK_COMPILE_FLAGS];
     void *envFlags = GetEnvFlags(pTestVariant);
     return DoOneExternalTest(pDir, pTestVariant, pTestVariant->optFlags, ccFlags, NULL,
         testCmd, kind, TRUE, TRUE, TRUE, fSuppressNoGPF, envFlags, millisecTimeout);
@@ -687,8 +687,8 @@ int
     DWORD millisecTimeout
     )
 {
-    static char *pgc = "*.pgc";
-    static char *pgd = POGO_PGD;
+    static const char *pgc = "*.pgc";
+    static const char *pgd = POGO_PGD;
     char pgdFull[MAX_PATH];
     char ccFlags[BUFFER_SIZE];
     char linkFlags[BUFFER_SIZE];
@@ -698,8 +698,8 @@ int
 
     sprintf_s(pgdFull, "%s\\%s", pDir->GetDirectoryPath(), pgd);
 
-    char * inCCFlags = pTestVariant->testInfo.data[TIK_COMPILE_FLAGS];
-    char * optFlags = pTestVariant->optFlags;
+    const char * inCCFlags = pTestVariant->testInfo.data[TIK_COMPILE_FLAGS];
+    const char * optFlags = pTestVariant->optFlags;
 
     DeleteFileIfFound(pgdFull);
     DeleteMultipleFiles(pDir, pgc);
@@ -767,9 +767,9 @@ BOOL
     CDirectory *pDir,
     Test * pTest,
     TestVariant * pTestVariant,
-    char *optFlags,
-    char *inCCFlags,
-    char *inLinkFlags,
+    const char *optFlags,
+    const char *inCCFlags,
+    const char *inLinkFlags,
     BOOL fSyncVariationWhenFinished,
     BOOL fCleanAfter,
     BOOL fLinkOnly,    // relink only
@@ -1212,8 +1212,8 @@ int
     DWORD millisecTimeout
     )
 {
-    static char *pgc = "*.pgc";
-    static char *pgd = POGO_PGD;
+    static const char *pgc = "*.pgc";
+    static const char *pgd = POGO_PGD;
     char pgdFull[MAX_PATH];
     char ccFlags[BUFFER_SIZE];
     char linkFlags[BUFFER_SIZE];
@@ -1221,8 +1221,8 @@ int
 
     sprintf_s(pgdFull, "%s\\%s", pDir->GetDirectoryPath(), pgd);
 
-    char * inCCFlags = pTestVariant->testInfo.data[TIK_COMPILE_FLAGS];
-    char * optFlags = pTestVariant->optFlags;
+    const char * inCCFlags = pTestVariant->testInfo.data[TIK_COMPILE_FLAGS];
+    const char * optFlags = pTestVariant->optFlags;
 
     DeleteFileIfFound(pgdFull);
     DeleteMultipleFiles(pDir, pgc);
@@ -1288,7 +1288,7 @@ int
     char *p = NULL;
     char full[MAX_PATH];
     DWORD millisecTimeout = DEFAULT_TEST_TIMEOUT;
-    char *strTimeout = pTestVariant->testInfo.data[TIK_TIMEOUT];
+    const char *strTimeout = pTestVariant->testInfo.data[TIK_TIMEOUT];
 
     if (strTimeout) {
         char *end;

+ 1 - 1
bin/rl/xmlreader.cpp

@@ -77,7 +77,7 @@ Attribute::Dump()
 
 Node::Node
 (
-   Char * name,
+   const Char * name,
    Attribute * attributeList
 )
    : Name(name)

+ 2 - 2
bin/rl/xmlreader.h

@@ -45,7 +45,7 @@ class Node
 public:
 
    Node() {}
-   Node(Char * name, Attribute * attributeList);
+   Node(const Char * name, Attribute * attributeList);
 
    Node * GetChild(const Char * name);
    Char * GetAttributeValue(const Char * name);
@@ -58,7 +58,7 @@ public:
    Node * Next;
    Node * ChildList;
    Attribute * AttributeList;
-   Char * Name;
+   const Char * Name;
    Char * Data;
    int LineNumber;
 

+ 2 - 2
lib/Backend/GlobOpt.h

@@ -1658,11 +1658,11 @@ private:
     static void             TrackByteCodeSymUsed(IR::RegOpnd * opnd, BVSparse<JitArenaAllocator> * instrByteCodeStackSymUsed);
     static void             TrackByteCodeSymUsed(StackSym * sym, BVSparse<JitArenaAllocator> * instrByteCodeStackSymUsed);
     void                    CaptureValues(BasicBlock *block, BailOutInfo * bailOutInfo);
-    void                    GlobOpt::CaptureValuesFromScratch(
+    void                    CaptureValuesFromScratch(
                                 BasicBlock * block,
                                 SListBase<ConstantStackSymValue>::EditingIterator & bailOutConstValuesIter,
                                 SListBase<CopyPropSyms>::EditingIterator & bailOutCopyPropIter);
-    void                    GlobOpt::CaptureValuesIncremental(
+    void                    CaptureValuesIncremental(
                                 BasicBlock * block,
                                 SListBase<ConstantStackSymValue>::EditingIterator & bailOutConstValuesIter,
                                 SListBase<CopyPropSyms>::EditingIterator & bailOutCopyPropIter);

+ 1 - 1
lib/Backend/IR.h

@@ -799,7 +799,7 @@ public:
     void                            CreateBranchTargetsAndSetDefaultTarget(int dictionarySize, Kind kind, uint defaultTargetOffset);
     void                            ChangeLabelRef(LabelInstr * oldTarget, LabelInstr * newTarget);
     bool                            ReplaceTarget(IR::LabelInstr * oldLabelInstr, IR::LabelInstr * newLabelInstr);
-    void                            MultiBranchInstr::FixMultiBrDefaultTarget(uint32 targetOffset);
+    void                            FixMultiBrDefaultTarget(uint32 targetOffset);
     void                            ClearTarget();
     BranchDictionaryWrapper *       GetBranchDictionary();
     BranchJumpTable *               GetBranchJumpTable();

+ 5 - 5
lib/Backend/InterpreterThunkEmitter.h

@@ -71,12 +71,12 @@ private:
     static const BYTE ThunkAddressOffset;
     static const BYTE FunctionBodyOffset;
     static const BYTE DynamicThunkAddressOffset;
-    static const BYTE InterpreterThunkEmitter::CallBlockStartAddrOffset;
-    static const BYTE InterpreterThunkEmitter::ThunkSizeOffset;
-    static const BYTE InterpreterThunkEmitter::ErrorOffset;
+    static const BYTE CallBlockStartAddrOffset;
+    static const BYTE ThunkSizeOffset;
+    static const BYTE ErrorOffset;
 #if defined(_M_ARM)
-    static const BYTE InterpreterThunkEmitter::CallBlockStartAddressInstrOffset;
-    static const BYTE InterpreterThunkEmitter::CallThunkSizeInstrOffset;
+    static const BYTE CallBlockStartAddressInstrOffset;
+    static const BYTE CallThunkSizeInstrOffset;
 #endif
     static const BYTE InterpreterThunk[];
 

+ 1 - 1
lib/Common/Common/NumberUtilities.h

@@ -56,7 +56,7 @@ namespace Js
     {
     public:
         static bool IsDigit(int ch);
-        static BOOL NumberUtilities::FHexDigit(char16 ch, int *pw);
+        static BOOL FHexDigit(char16 ch, int *pw);
         static uint32 MulLu(uint32 lu1, uint32 lu2, uint32 *pluHi);
         static int AddLu(uint32 *plu1, uint32 lu2);
 

+ 1 - 0
lib/Common/Memory/AutoPtr.h

@@ -95,6 +95,7 @@ private:
 template <typename T>
 class AutoReleasePtr : public BasePtr<T>
 {
+    using BasePtr<T>::ptr;
 public:
     AutoReleasePtr(T * ptr = nullptr) : BasePtr<T>(ptr) {}
     ~AutoReleasePtr()

+ 1 - 0
lib/Common/Memory/SmallFinalizableHeapBlock.h

@@ -16,6 +16,7 @@ class SmallFinalizableHeapBlockT : public SmallNormalHeapBlockT<TBlockAttributes
     typedef typename Base::SmallHeapBlockBitVector SmallHeapBlockBitVector;
     typedef typename Base::HeapBlockType HeapBlockType;
     friend class HeapBucketT<SmallFinalizableHeapBlockT>;
+    using typename Base::MediumFinalizableBlockType;
 public:
     typedef TBlockAttributes HeapBlockAttributes;
 

+ 2 - 0
lib/Common/Memory/SmallNormalHeapBlock.h

@@ -10,6 +10,8 @@ template <class TBlockAttributes>
 class SmallNormalHeapBlockT : public SmallHeapBlockT<TBlockAttributes>
 {
     typedef SmallHeapBlockT<TBlockAttributes> Base;
+    using Base::SmallNormalBlockType;
+    using Base::MediumNormalBlockType;
     friend class HeapBucketT<SmallNormalHeapBlockT>;
 public:
     typedef typename Base::HeapBlockType HeapBlockType;

+ 8 - 0
lib/Parser/CharMap.h

@@ -49,6 +49,10 @@ namespace UnifiedRegex
     {
         template <typename C>
         friend class TextbookBoyerMooreWithLinearMap;
+        using typename Chars<char16>::Char;
+        using Chars<char16>::CTU;
+
+
     private:
         V defv;
         uint map[MaxCharMapLinearChars];
@@ -111,6 +115,10 @@ namespace UnifiedRegex
     template <typename V, CharMapScheme scheme>
     class CharMap<char16, V, scheme> : private Chars<char16>
     {
+//    public:
+        using Chars<char16>::Char;
+        using Chars<char16>::CharWidth;
+        using Chars<char16>::CTU;
     private:
         static const int directBits = Chars<char>::CharWidth;
         static const int directSize = Chars<char>::NumChars;

+ 4 - 4
lib/Parser/RegexCompileTime.h

@@ -620,20 +620,20 @@ namespace UnifiedRegex
 
         // The instruction buffer may move, so we need to remember label fixup's relative to the instruction base
         // rather than as machine addresses
-        inline Label Compiler::GetFixup(Label* pLabel)
+        inline Label GetFixup(Label* pLabel)
         {
             Assert((uint8*)pLabel >= instBuf && (uint8*)pLabel < instBuf + instNext);
             return (Label)((uint8*)pLabel - instBuf);
         }
 
-        inline void Compiler::DoFixup(Label fixup, Label label)
+        inline void DoFixup(Label fixup, Label label)
         {
             Assert(fixup < instNext);
             Assert(label <= instNext);
             *(Label*)(instBuf + fixup) = label;
         }
 
-        inline Label Compiler::CurrentLabel()
+        inline Label CurrentLabel()
         {
             return instNext;
         }
@@ -646,7 +646,7 @@ namespace UnifiedRegex
             return (T*)(instBuf + label);
         }
 
-        inline int Compiler::NextLoopId()
+        inline int NextLoopId()
         {
             return nextLoopId++;
         }

+ 1 - 1
lib/Runtime/Base/ThreadContext.h

@@ -1359,7 +1359,7 @@ public:
     }
 
 #if ENABLE_PROFILE_INFO
-    void ThreadContext::EnsureSourceProfileManagersByUrlMap();
+    void EnsureSourceProfileManagersByUrlMap();
     Js::SourceDynamicProfileManager* GetSourceDynamicProfileManager(_In_z_ const WCHAR* url, _In_ uint hash, _Inout_ bool* addref);
     uint ReleaseSourceDynamicProfileManagers(const WCHAR* url);
 #endif

+ 1 - 1
lib/Runtime/ByteCode/ByteCodeWriter.h

@@ -409,7 +409,7 @@ namespace Js
                 (op == OpCode::NewScIntArray || op == OpCode::NewScFltArray || op == OpCode::NewScArray);
         }
 
-        uint ByteCodeWriter::GetTotalSize()
+        uint GetTotalSize()
         {
             return m_byteCodeData.GetCurrentOffset() + m_auxiliaryData.GetCurrentOffset() + m_auxContextData.GetCurrentOffset();
         }

+ 2 - 2
lib/Runtime/Debug/DiagObjectModel.h

@@ -576,12 +576,12 @@ namespace Js
         // Just populate the indexes only.
         bool fOnlyOwnProperties;
 
-        uint32 RecyclableArrayWalker::GetItemCount(Js::JavascriptArray* arrayObj);
+        uint32 GetItemCount(Js::JavascriptArray* arrayObj);
 
         // ES5Array will extend this.
         virtual uint32 GetNextDescriptor(uint32 currentDescriptor) { return Js::JavascriptArray::InvalidIndex; }
 
-        LPCWSTR RecyclableArrayWalker::GetIndexName(uint32 index, StringBuilder<ArenaAllocator>* stringBuilder);
+        LPCWSTR GetIndexName(uint32 index, StringBuilder<ArenaAllocator>* stringBuilder);
 
         Js::JavascriptArray* GetArrayObject();
 

+ 1 - 1
lib/Runtime/Debug/ProbeContainer.h

@@ -67,7 +67,7 @@ namespace Js
         bool InitializeLocation(InterpreterHaltState* pHaltState, bool fMatchWithCurrentScriptContext = true);
         void DestroyLocation();
 
-        bool ProbeContainer::GetNextUserStatementOffsetHelper(
+        bool GetNextUserStatementOffsetHelper(
             Js::FunctionBody* functionBody, int currentOffset, FunctionBody::StatementAdjustmentType adjType, int* nextStatementOffset);
 
 #ifdef ENABLE_MUTATION_BREAKPOINT

+ 2 - 2
lib/Runtime/Debug/TTEventLog.h

@@ -511,8 +511,8 @@ namespace TTD
 
         //Load and restore all the breakpoints in the manager before and after we create new script contexts
         void LoadBPListForContextRecreate();
-        void EventLog::UnLoadBPListAfterMoveForContextRecreate();
-        const JsUtil::List<TTDebuggerSourceLocation, HeapAllocator>& EventLog::GetRestoreBPListAfterContextRecreate();
+        void UnLoadBPListAfterMoveForContextRecreate();
+        const JsUtil::List<TTDebuggerSourceLocation, HeapAllocator>& GetRestoreBPListAfterContextRecreate();
 #endif
 
         //Update the loop count information

+ 1 - 1
lib/Runtime/Language/JavascriptConversion.h

@@ -56,7 +56,7 @@ namespace Js {
         static uint16 ToUInt16(double value);
         static uint16 ToUInt16_Full(Var aValue, ScriptContext* scriptContext);
 
-        static JavascriptString *JavascriptConversion::CoerseString(Var aValue, ScriptContext* scriptContext, const char16* apiNameForErrorMsg);
+        static JavascriptString *CoerseString(Var aValue, ScriptContext* scriptContext, const char16* apiNameForErrorMsg);
         static BOOL CheckObjectCoercible(Var aValue, ScriptContext* scriptContext);
         static bool SameValue(Var aValue, Var bValue);
         static bool SameValueZero(Var aValue, Var bValue);

+ 2 - 2
lib/Runtime/Language/JavascriptExceptionObject.h

@@ -36,7 +36,7 @@ namespace Js {
         Var GetThrownObject(ScriptContext * requestingScriptContext);
 
         // ScriptContext can be NULL in case of OOM exception.
-        ScriptContext * JavascriptExceptionObject::GetScriptContext() const
+        ScriptContext * GetScriptContext() const
         {
             return scriptContext;
         }
@@ -130,7 +130,7 @@ namespace Js {
             Assert(this->isPendingExceptionObject || this->isGeneratorReturnException);
             this->thrownObject = object;
         }
-        JavascriptExceptionObject* JavascriptExceptionObject::CloneIfStaticExceptionObject(ScriptContext* scriptContext);
+        JavascriptExceptionObject* CloneIfStaticExceptionObject(ScriptContext* scriptContext);
 
         void ClearStackTrace()
         {

+ 1 - 1
lib/Runtime/Language/JavascriptOperators.h

@@ -383,7 +383,7 @@ namespace Js
         static Var OP_CmGt_A(Js::Var a,Js::Var b,ScriptContext* scriptContext);
         static Var OP_CmGe_A(Js::Var a,Js::Var b,ScriptContext* scriptContext);
 
-        static FunctionInfo * JavascriptOperators::GetConstructorFunctionInfo(Var instance, ScriptContext * scriptContext);
+        static FunctionInfo * GetConstructorFunctionInfo(Var instance, ScriptContext * scriptContext);
         // Detach the type array buffer, if possible, and returns the state of the object which can be used to initialize another object
         static DetachedStateBase* DetachVarAndGetState(Var var);
         static bool IsObjectDetached(Var var);

+ 1 - 1
lib/Runtime/Language/JavascriptStackWalker.h

@@ -348,7 +348,7 @@ namespace Js
         Js::JavascriptFunction * UpdateFrame(bool includeInlineFrames);
         bool CheckJavascriptFrame(bool includeInlineFrames);
 
-        JavascriptFunction *JavascriptStackWalker::GetCurrentFunctionFromPhysicalFrame() const;
+        JavascriptFunction *GetCurrentFunctionFromPhysicalFrame() const;
      };
 
     class AutoPushReturnAddressForStackWalker

+ 3 - 3
lib/Runtime/Language/TaggedInt.h

@@ -51,9 +51,9 @@ namespace Js {
         static int64 ToInt64(Var aValue);
         static uint16 ToUInt16(Var aValue);
         static Var ToVarUnchecked(int nValue);
-        static void TaggedInt::ToBuffer(Var aValue, __out_ecount_z(bufSize) char16 * buffer, uint bufSize);
-        static void TaggedInt::ToBuffer(int value, __out_ecount_z(bufSize) char16 * buffer, uint bufSize);
-        static void TaggedInt::ToBuffer(uint value, __out_ecount_z(bufSize) char16 * buffer, uint bufSize);
+        static void ToBuffer(Var aValue, __out_ecount_z(bufSize) char16 * buffer, uint bufSize);
+        static void ToBuffer(int value, __out_ecount_z(bufSize) char16 * buffer, uint bufSize);
+        static void ToBuffer(uint value, __out_ecount_z(bufSize) char16 * buffer, uint bufSize);
         static JavascriptString* ToString(Var aValue,ScriptContext* scriptContext);
         static JavascriptString* ToString(int value,ScriptContext* scriptContext);
         static JavascriptString* ToString(uint value,ScriptContext* scriptContext);

+ 1 - 1
lib/Runtime/Library/JSON.h

@@ -99,6 +99,6 @@ namespace JSON
         Js::JavascriptString* gap;
         uint indent;
         Js::JavascriptString* propertySeparator;     // colon or colon+space
-        Js::Var StringifySession::StrHelper(Js::JavascriptString* key, Js::Var value, Js::Var holder);
+        Js::Var StrHelper(Js::JavascriptString* key, Js::Var value, Js::Var holder);
     };
 } // namespace JSON

+ 1 - 1
lib/Runtime/Library/JSONParser.h

@@ -24,7 +24,7 @@ namespace JSON
             propertyIndex(propertyIndex),
             next(nullptr) {}
 
-        static JsonTypeCache* JsonTypeCache::New(ArenaAllocator* allocator,
+        static JsonTypeCache* New(ArenaAllocator* allocator,
             const Js::PropertyRecord* propertyRecord,
             Js::DynamicType* typeWithoutProperty,
             Js::DynamicType* typeWithProperty,

+ 1 - 1
lib/Runtime/Library/JavascriptLibrary.h

@@ -1265,7 +1265,7 @@ namespace Js
         static void __cdecl InitializeGeneratorFunctionPrototype(DynamicObject* generatorFunctionPrototype, DeferredTypeHandlerBase * typeHandler, DeferredInitializeMode mode);
         static void __cdecl InitializeGeneratorPrototype(DynamicObject* generatorPrototype, DeferredTypeHandlerBase * typeHandler, DeferredInitializeMode mode);
 
-        static void __cdecl JavascriptLibrary::InitializeAsyncFunction(DynamicObject *function, DeferredTypeHandlerBase * typeHandler, DeferredInitializeMode mode);
+        static void __cdecl InitializeAsyncFunction(DynamicObject *function, DeferredTypeHandlerBase * typeHandler, DeferredInitializeMode mode);
         static void __cdecl InitializeAsyncFunctionConstructor(DynamicObject* asyncFunctionConstructor, DeferredTypeHandlerBase * typeHandler, DeferredInitializeMode mode);
         static void __cdecl InitializeAsyncFunctionPrototype(DynamicObject* asyncFunctionPrototype, DeferredTypeHandlerBase * typeHandler, DeferredInitializeMode mode);
 

+ 1 - 1
lib/Runtime/Library/MathLibrary.h

@@ -152,7 +152,7 @@ namespace Js {
         static const double MIN_SAFE_INTEGER;
 
     private:
-        static Var Math::FloorDouble(double d, ScriptContext *scriptContext);
+        static Var FloorDouble(double d, ScriptContext *scriptContext);
     };
 
 } // namespace Js

+ 1 - 1
lib/Runtime/Library/RegexHelper.h

@@ -134,7 +134,7 @@ namespace Js
         static Var RegexReplaceImpl(ScriptContext* scriptContext, RecyclableObject* thisObj, JavascriptString* input, JavascriptFunction* replacefn);
         static Var RegexEs5ReplaceImpl(ScriptContext* scriptContext, JavascriptRegExp* regularExpression, JavascriptString* input, JavascriptFunction* replacefn);
         static Var RegexSearchImpl(ScriptContext* scriptContext, JavascriptRegExp* regularExpression, JavascriptString* input);
-        inline static UnifiedRegex::RegexPattern *RegexHelper::GetSplitPattern(ScriptContext* scriptContext, JavascriptRegExp *regularExpression);
+        inline static UnifiedRegex::RegexPattern *GetSplitPattern(ScriptContext* scriptContext, JavascriptRegExp *regularExpression);
         static bool IsRegexSymbolSplitObservable(RecyclableObject* instance, ScriptContext* scriptContext);
         static Var RegexSplitImpl(ScriptContext* scriptContext, RecyclableObject* thisObj, JavascriptString* input, CharCount limit, bool noResult, void *const stackAllocationPointer = nullptr);
         static Var RegexEs6SplitImpl(ScriptContext* scriptContext, RecyclableObject* thisObj, JavascriptString* input, CharCount limit, bool noResult, void *const stackAllocationPointer = nullptr);

+ 1 - 1
lib/Runtime/Types/PathTypeHandler.h

@@ -243,7 +243,7 @@ namespace Js
 
         static SimplePathTypeHandler * New(ScriptContext * scriptContext, TypePath* typePath, uint16 pathLength, uint16 inlineSlotCapacity, uint16 offsetOfInlineSlots, bool isLocked = false, bool isShared = false, DynamicType* predecessorType = nullptr);
         static SimplePathTypeHandler * New(ScriptContext * scriptContext, TypePath* typePath, uint16 pathLength, const PropertyIndex slotCapacity, uint16 inlineSlotCapacity, uint16 offsetOfInlineSlots, bool isLocked = false, bool isShared = false, DynamicType* predecessorType = nullptr);
-        static SimplePathTypeHandler * SimplePathTypeHandler::New(ScriptContext * scriptContext, SimplePathTypeHandler * typeHandler, bool isLocked, bool isShared);
+        static SimplePathTypeHandler * New(ScriptContext * scriptContext, SimplePathTypeHandler * typeHandler, bool isLocked, bool isShared);
     };
 
     class PathTypeHandler sealed : public PathTypeHandlerBase