Ver Fonte

Incorporate code review feedback

Fix unresolved merge conflict in CMakeLists
Fix generation of retail build CMake files, and some minor build errors
Disable building parser since it seems to not build cleanly without
PAL_STDCPP_COMPAT defined

Add correct copyright headers to build/sh and amd64_SAVE_REGISTERS.s
Remove FLAG_STRING and friends
Move min/max define to CommonMin.h and remove from other headers
Hitesh Kanwathirtha há 10 anos atrás
pai
commit
f22ac850f6

+ 1 - 8
CMakeLists.txt

@@ -123,21 +123,14 @@ endif(CLR_CMAKE_PLATFORM_UNIX)
 
 enable_language(ASM)
 
-<<<<<<< 39355eaa3f2bfbbf571fbffca5e916c3a10a4ba0
 include_directories(
+    .
     lib/Common
     lib/Common/PlaceHolder
     pal
     pal/inc
     pal/inc/rt
     )
-=======
-include_directories(".")
-include_directories("pal")
-include_directories("pal/inc")
-include_directories("pal/inc/rt")
-include_directories(lib/Common)
->>>>>>> Update CMakeLists.txt
 add_subdirectory (lib)
 add_subdirectory (bin)
 add_subdirectory (pal)

+ 0 - 1
bin/GCStress/stdafx.h

@@ -11,7 +11,6 @@
 #include <winbase.h>
 #include <oleauto.h>
 #else
-// #define NO_PAL_MINMAX
 #include <CommonPal.h>
 #endif
 

+ 5 - 2
build.sh

@@ -1,4 +1,7 @@
-#/usr/bin/env bash
+#-------------------------------------------------------------------------------------------------------
+# Copyright (C) Microsoft. All rights reserved.
+# Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+#-------------------------------------------------------------------------------------------------------
 
 if [ ! -d "BuildLinux" ]; then
     mkdir BuildLinux;
@@ -21,7 +24,7 @@ if [ $DEBUG_BUILD -eq 1 ]; then
 else
     echo Generating Retail makefiles
     echo Building Retail;
-    cmake ..
+    cmake -DCMAKE_BUILD_TYPE=Release ..
 fi
 
 make |& tee build.log

+ 1 - 1
lib/CMakeLists.txt

@@ -1,2 +1,2 @@
 add_subdirectory (Common)
-add_subdirectory (Parser)
+# add_subdirectory (Parser)

+ 1 - 1
lib/Common/Common/Jobs.cpp

@@ -1405,5 +1405,5 @@ namespace JsUtil
         L"BackgroundJobProcessor thread 15",
         L"BackgroundJobProcessor thread 16" };
 #endif
-#endif
+#endif // ENABLE_BACKGROUND_JOB_PROCESSOR
 }

+ 19 - 0
lib/Common/CommonMin.h

@@ -18,8 +18,27 @@
 #endif
 
 // === Core Header Files ===
+// In Debug mode, the PALs definition of max and min are insufficient
+// since some of our code expects the template min-max instead, so
+// including that here
+#if defined(DBG) && !defined(_MSC_VER)
+#pragma push_macro("NO_PAL_MINMAX")
+#pragma push_macro("_Post_equal_to")
+#pragma push_macro("_Post_satisfies_")
+#define NO_PAL_MINMAX
+#define _Post_equal_to_(x)
+#define _Post_satisfies_(x)
+#endif
+
 #include "Core/CommonMinMax.h"
 
+// Restore the macros
+#if defined(DBG) && !defined(_MSC_VER)
+#pragma pop_macro("NO_PAL_MINMAX")
+#pragma pop_macro("_Post_equal_to")
+#pragma pop_macro("_Post_satisfies_")
+#endif
+
 #include "EnumHelp.h"
 #include "Core/Assertions.h"
 #include "Core/SysInfo.h"

+ 8 - 1
lib/Common/CommonPal.h

@@ -36,7 +36,6 @@ typedef wchar_t wchar16;
 #include "inc/rt/palrt.h"
 #include "inc/rt/no_sal2.h"
 #include "inc/rt/oaidl.h"
-#include <emmintrin.h>
 
 typedef char16_t wchar16;
 #define CH_WSTR(s) u##s
@@ -309,6 +308,14 @@ errno_t rand_s(unsigned int* randomValue);
 #define _NOEXCEPT noexcept
 #endif
 
+// xplat-todo: can we get rid of this for clang?
+// Including xmmintrin.h right now creates a ton of
+// compile errors, so temporarily defining this for clang
+// to avoid including that header
+#ifndef _MSC_VER
+#define _MM_HINT_T0 3
+#endif
+
 // xplat-todo: figure out why strsafe.h includes stdio etc
 // which prevents me from directly including PAL's strsafe.h
 #ifdef __cplusplus

+ 9 - 30
lib/Common/ConfigFlagsList.h

@@ -666,16 +666,12 @@ PHASE(All)
 // Default values for stings must be prefixed with 'L'. See AsmDumpMode
 // Scroll till the extreme right to see the default values
 
-#if defined(FLAG) || defined(FLAG_STRING) || defined(FLAG_REGOVR_EXP)
+#if defined(FLAG) || defined(FLAG_REGOVR_EXP)
 
 #ifndef FLAG
 #define FLAG(...)
 #endif
 
-#ifndef FLAG_STRING
-#define FLAG_STRING(...)
-#endif
-
 #ifndef FLAG_REGOVR_ASMJS
 #define FLAG_REGOVR_ASMJS FLAG
 #endif
@@ -690,9 +686,6 @@ PHASE(All)
 // Regular FLAG
 #define FLAGNR(Type, Name, String, Default)                 FLAG(Type, Name, String, Default, NoParent, FALSE)
 
-// Flags with a default string provided
-#define FLAGNR_STRING(Name, String, DefaultString)          FLAG_STRING(Name, String, DefaultString, NoParent, FALSE)
-
 // Regular flag with acronym
 #ifndef FLAGNRA
     #define FLAGNRA(Type, Name, Acronym, String, Default) \
@@ -700,12 +693,6 @@ PHASE(All)
         FLAGNR(Type, Acronym, String, Default)
 #endif
 
-#ifndef FLAGNRA_STRING
-    #define FLAGNRA_STRING(Name, Acronym, String, Default) \
-        FLAGNR_STRING(Name, String, Default) \
-        FLAGNR_STRING(Acronym, String, Default)
-#endif
-
 // Child FLAG with PARENT FLAG
 #define FLAGPNR(Type, ParentName, Name, String, Default)    FLAG(Type, Name, String, Default, ParentName, FALSE)
 
@@ -714,18 +701,12 @@ PHASE(All)
 
 #else
 #define FLAGNR(Type, Name, String, Default)
-#define FLAGNR_STRING(Name, String, Default)
 
 #ifdef FLAGNRA
     #undef FLAGNRA
 #endif
 #define FLAGNRA(Type, Name, Acronym, String, Default)
 
-#ifdef FLAGNRA_STRING
-    #undef FLAGNRA_STRING
-#endif
-#define FLAGNRA_STRING(Name, Acronym, String, Default)
-
 #define FLAGPNR(Type, ParentName, Name, String, Default)
 #define FLAGNRC(Type, Name, String, Default)
 #endif
@@ -846,7 +827,7 @@ FLAGNR(Boolean, NoDynamicProfileInMemoryCache, "Enable in-memory cache for dynam
 FLAGNR(Boolean, ProfileBasedSpeculativeJit, "Enable dynamic profile based speculative JIT", DEFAULT_CONFIG_ProfileBasedSpeculativeJit)
 FLAGNR(Number,  ProfileBasedSpeculationCap, "In the presence of dynamic profile speculative JIT is capped to this many bytecode instructions", DEFAULT_CONFIG_ProfileBasedSpeculationCap)
 #ifdef DYNAMIC_PROFILE_MUTATOR
-FLAGNR_STRING(DynamicProfileMutatorDll , "Path of the mutator DLL", "DynamicProfileMutatorImpl.dll")
+FLAGNR(String, DynamicProfileMutatorDll , "Path of the mutator DLL", CH_WSTR("DynamicProfileMutatorImpl.dll"))
 FLAGNR(String,  DynamicProfileMutator , "Type of local, temp, return, param, loop implicit flag and implicit flag. \n\t\t\t\t\ti.e local=LikelyArray_NoMissingValues_NonInts_NonFloats;temp=Int8Array;param=LikelyNumber;return=LikelyString;loopimplicitflag=ImplicitCall_ToPrimitive;implicitflag=ImplicitCall_None\n\t\t\t\t\tor pass DynamicProfileMutator:random\n\t\t\t\t\tSee DynamicProfileInfo.h for enum values", nullptr)
 #endif
 FLAGNR(Boolean, ExecuteByteCodeBufferReturnsInvalidByteCode, "Serialized byte code execution always returns SCRIPT_E_INVALID_BYTECODE", false)
@@ -984,9 +965,9 @@ FLAGNR(Number,  FaultInjectionCount   , "Injects an out of memory at the specifi
 FLAGNR(String,  FaultInjectionType    , "FaultType (flag values) -  1 (Throw), 2 (NoThrow), 4 (MarkThrow), 8 (MarkNoThrow), FFFFFFFF (All)", nullptr)
 FLAGNR(String,  FaultInjectionFilter  , "A string to restrict the fault injection, the string can be like ArenaAllocator name", nullptr)
 FLAGNR(Number,  FaultInjectionAllocSize, "Do fault injection only this size", -1)
-FLAGNR_STRING(FaultInjectionStackFile   , "Stacks to match, default: stack.txt in current directory", "stack.txt")
+FLAGNR(String, FaultInjectionStackFile   , "Stacks to match, default: stack.txt in current directory", CH_WSTR("stack.txt"))
 FLAGNR(Number,  FaultInjectionStackLineCount   , "Count of lines in the stack file used for matching", -1)
-FLAGNR_STRING(FaultInjectionStackHash, "Match stacks hash on Chakra frames to inject the fault, hex string", "0")
+FLAGNR(String, FaultInjectionStackHash, "Match stacks hash on Chakra frames to inject the fault, hex string", CH_WSTR("0"))
 FLAGNR(Number,  FaultInjectionScriptContextToTerminateCount, "Script context# COUNT % (Number of script contexts) to terminate", 1)
 #endif
 FLAGNR(Number, InduceCodeGenFailure, "Probability of a codegen job failing.", DEFAULT_CONFIG_InduceCodeGenFailure)
@@ -1064,7 +1045,8 @@ FLAGR (Number,  AutoProfilingInterpreter1Limit, "Limit after which to transition
 FLAGR (Number,  SimpleJitLimit, "Limit after which to transition to the next execution mode", DEFAULT_CONFIG_SimpleJitLimit)
 FLAGR (Number,  ProfilingInterpreter1Limit, "Limit after which to transition to the next execution mode", DEFAULT_CONFIG_ProfilingInterpreter1Limit)
 
-FLAGNRA_STRING(ExecutionModeLimits,        Eml,  "Execution mode limits in th form: AutoProfilingInterpreter0.ProfilingInterpreter0.AutoProfilingInterpreter1.SimpleJit.ProfilingInterpreter1 - Example: -ExecutionModeLimits:12.4.0.132.12", "")
+FLAGNRA(String, ExecutionModeLimits,        Eml,  "Execution mode limits in th form: AutoProfilingInterpreter0.ProfilingInterpreter0.AutoProfilingInterpreter1.SimpleJit.ProfilingInterpreter1 - Example: -ExecutionModeLimits:12.4.0.132.12", CH_WSTR(""))
+
 FLAGRA(Boolean, EnforceExecutionModeLimits, Eeml, "Enforces the execution mode limits such that they are never exceeded.", false)
 
 FLAGNRA(Number, SimpleJitAfter        , Sja, "Number of calls to a function after which to simple-JIT the function", 0)
@@ -1100,8 +1082,8 @@ FLAGNR(Boolean, NoWinRTFastSig        , "Disable fast call for common WinRT func
 FLAGNR(Phases,  Off                   , "Turn off specific phases or feature.(Might not work for all phases)", )
 FLAGNR(Phases,  OffProfiledByteCode   , "Turn off specific byte code for phases or feature.(Might not work for all phases)", )
 FLAGNR(Phases,  On                    , "Turn on specific phases or feature.(Might not work for all phases)", )
-FLAGNR_STRING(OutputFile            , "Log the output to a specified file. Default: output.log in the working directory.", "output.log")
-FLAGNR_STRING(OutputFileOpenMode    , "File open mode for OutputFile. Default: wt, specify 'at' for append", "wt")
+FLAGNR(String, OutputFile            , "Log the output to a specified file. Default: output.log in the working directory.", CH_WSTR("output.log"))
+FLAGNR(String, OutputFileOpenMode    , "File open mode for OutputFile. Default: wt, specify 'at' for append", CH_WSTR("wt"))
 #ifdef ENABLE_TRACE
 FLAGNR(Boolean, InMemoryTrace         , "Enable in-memory trace (investigate crash using trace in dump file). Use !jd.dumptrace to print it.", DEFAULT_CONFIG_InMemoryTrace)
 FLAGNR(Number,  InMemoryTraceBufferSize, "The size of circular buffer for in-memory trace (the units used is: number of trace calls). ", DEFAULT_CONFIG_InMemoryTraceBufferSize)
@@ -1287,7 +1269,7 @@ FLAGNR(Boolean, ChangeTypeOnProto, "When becoming a prototype should the object
 FLAGNR(Boolean, ShareInlineCaches, "Determines whether inline caches are shared between all loads (or all stores) of the same property ID", DEFAULT_CONFIG_ShareInlineCaches)
 FLAGNR(Boolean, DisableDebugObject, "Disable test only Debug object properties", DEFAULT_CONFIG_DisableDebugObject)
 FLAGNR(Boolean, DumpHeap, "enable Debug.dumpHeap even when DisableDebugObject is set", DEFAULT_CONFIG_DumpHeap)
-FLAGNR_STRING(autoProxy, "enable creating proxy for each object creation", "__msTestHandler")
+FLAGNR(String, autoProxy, "enable creating proxy for each object creation", CH_WSTR("__msTestHandler"))
 FLAGNR(Number,  PerfHintLevel, "Specifies the perf-hint level (1,2) 1 == critical, 2 == only noisy", DEFAULT_CONFIG_PerfHintLevel)
 #ifdef INTERNAL_MEM_PROTECT_HEAP_ALLOC
 FLAGNR(Boolean, MemProtectHeap, "Use the mem protect heap as the default heap", DEFAULT_CONFIG_MemProtectHeap)
@@ -1357,15 +1339,12 @@ FLAGNR(Boolean, CFG, "Force enable CFG on jshost. version in the jshost's manife
 #undef FLAG_REGOVR_ASMJS
 
 #undef FLAG
-#undef FLAG_STRING
 #undef FLAGP
 
 #undef FLAGRA
 
 #undef FLAGNR
-#undef FLAGNR_STRING
 #undef FLAGNRA
-#undef FLAGNRA_STRING
 #undef FLAGPNR
 
 #endif

+ 0 - 11
lib/Common/Core/CommonCorePch.h

@@ -4,17 +4,6 @@
 //-------------------------------------------------------------------------------------------------------
 #pragma once
 
-// In Debug mode, the PALs definition of max and min are insufficient
-// since some of our code expects the template min-max instead, so
-// including that here
-#if defined(DBG) && !defined(_MSC_VER)
-#define NO_PAL_MINMAX
-#define _Post_equal_to_(x)
-#define _Post_satisfies_(x)
-
-#include "Core/CommonMinMax.h"
-#endif
-
 #include "CommonDefines.h"
 #include "CommonMin.h"
 

+ 0 - 45
lib/Common/Core/ConfigFlagsTable.cpp

@@ -205,10 +205,8 @@ namespace Js
     const wchar16* const FlagNames[FlagCount + 1] =
     {
     #define FLAG(type, name, ...) CH_WSTR(#name),
-    #define FLAG_STRING(name, ...) CH_WSTR(#name),
     #include "ConfigFlagsList.h"
         NULL
-    #undef FLAG_STRING
     #undef FLAG
     };
 
@@ -232,11 +230,9 @@ namespace Js
     const wchar16* const FlagDescriptions[FlagCount + 1] =
     {
     #define FLAG(type, name, description, ...) CH_WSTR(description),
-    #define FLAG_STRING(name, description, ...) CH_WSTR(description),
     #include "ConfigFlagsList.h"
         NULL
     #undef FLAG
-    #undef FLAG_STRING
     };
 
     //
@@ -245,11 +241,9 @@ namespace Js
     const Flag FlagParents[FlagCount + 1] =
     {
     #define FLAG(type, name, description, defaultValue, parentName, ...) parentName##Flag,
-    #define FLAG_STRING(name, description, defaultValue, parentName, ...) parentName##Flag,
     #include "ConfigFlagsList.h"
         InvalidFlag
     #undef FLAG
-    #undef FLAG_STRING
     };
 
     ///
@@ -276,14 +270,9 @@ namespace Js
         \
         name ## ( ## defaultValue ##), \
 
-#define FLAG_STRING(name, description, defaultValue, ...) \
-        \
-        name ## ( ## CH_WSTR(defaultValue) ##),     \
-
     ConfigFlagsTable::ConfigFlagsTable():
         #include "ConfigFlagsList.h"
 #undef FLAG
-#undef FLAG_STRING
         nDummy(0)
     {
         for(int i=0; i < FlagCount; flagPresent[i++] = false);
@@ -292,11 +281,8 @@ namespace Js
         ZeroMemory(this->flagIsParent, sizeof(this->flagIsParent));
 #define FLAG(type, name, description, defaultValue, parentName, ...) \
         if ((int)parentName##Flag < FlagCount) this->flagIsParent[(int) parentName##Flag] = true;
-#define FLAG_STRING(name, description, defaultValue, parentName, ...) \
-        if ((int)parentName##Flag < FlagCount) this->flagIsParent[(int) parentName##Flag] = true;
 #include "ConfigFlagsList.h"
 #undef FLAG
-#undef FLAG_STRING
         
         // set all parent flags to their default (setting all child flags to their right values)
         this->SetAllParentFlagsAsDefaultValue();
@@ -405,19 +391,12 @@ namespace Js
     {
         // Transfer acronym flag configuration into the corresponding actual flag
     #define FLAG(...)
-    #define FLAG_STRING(...)
     #define FLAGNRA(Type, Name, Acronym, ...) \
         if(!IsEnabled(Name##Flag) && IsEnabled(Acronym##Flag)) \
         { \
             Enable(Name##Flag); \
             Name = Acronym; \
         }
-    #define FLAGNRA_STRING(Name, Acronym, ...) \
-        if(!IsEnabled(Name##Flag) && IsEnabled(Acronym##Flag)) \
-        { \
-            Enable(Name##Flag); \
-            Name = Acronym; \
-        }
     #if ENABLE_DEBUG_CONFIG_OPTIONS
         #define FLAGRA(Type, Name, Acronym, ...) FLAGNRA(Type, Name, Acronym, __VA_ARGS__)
     #endif
@@ -878,10 +857,6 @@ namespace Js
             case name##Flag : \
                 return Flag##type; \
                 
-    #define FLAG_STRING(name, ...) \
-            case name##Flag : \
-                return FlagString; \
-
     #include "ConfigFlagsList.h"
 
             default:
@@ -909,11 +884,6 @@ namespace Js
             \
             case name##Flag : \
                 return reinterpret_cast<void*>(const_cast<type*>(&##name)); \
-
-        #define FLAG_STRING(name, ...) \
-            \
-            case name##Flag : \
-                return reinterpret_cast<void*>(const_cast<String*>(&##name)); \
             
         #include "ConfigFlagsList.h"
 
@@ -952,21 +922,9 @@ namespace Js
             }; \
             Output::Print(CH_WSTR("\n")); \
         }
-
-#define FLAG_STRING(name, ...)     \
-        if (IsEnabled(name##Flag)) \
-        { \
-            Output::Print(CH_WSTR("-%s"), CH_WSTR(#name));              \
-            if (GetAsString(name##Flag) != nullptr)                     \
-            {                                                           \
-                Output::Print(CH_WSTR(":%s"), (LPCWSTR)*GetAsString(name##Flag)); \
-            }                                                           \
-            Output::Print(CH_WSTR("\n"));                               \
-        }
         
 #include "ConfigFlagsList.h"
 #undef FLAG
-#undef FLAG_STRING
     }
 
     ///----------------------------------------------------------------------------
@@ -985,7 +943,6 @@ namespace Js
         switch (flag)
         {
 #define FLAG(type, name, description, defaultValue, ...) FLAGDEFAULT##type(name, defaultValue)
-#define FLAG_STRING(name, description, defaultValue, ...) FLAGDEFAULTString(name, defaultValue)
             // define an overload for each FlagTypes - type
             //   * all defaults we don't care about
 #define FLAGDEFAULTPhases(name, defaultValue)
@@ -1078,7 +1035,6 @@ namespace Js
 #ifdef ENABLE_DEBUG_CONFIG_OPTIONS
         // in case the flag is marked as 'callback' - to call the method
 #define FLAG(type, name, description, defaultValue, parentName, hasCallback) FLAGCALLBACK##hasCallback(type, name)
-#define FLAG_STRING(name, description, defaultValue, parentName, hasCallback) FLAGCALLBACK##hasCallback(String, name)
 #define FLAGCALLBACKFALSE(type, name)
 #define FLAGCALLBACKTRUE(type, name)    FLAGDOCALLBACK##type(name)
 
@@ -1104,7 +1060,6 @@ namespace Js
 #undef FLAGDOCALLBACKPhases
 #undef FLAGCALLBACKTRUE
 #undef FLAGCALLBACKFALSE
-#undef FLAG_STRING
 #undef FLAG        
 #endif
     }

+ 3 - 7
lib/Common/Core/ConfigFlagsTable.h

@@ -56,8 +56,6 @@ namespace Js
     {
 #define FLAG(type, name, ...) name##Flag,
 
-#define FLAG_STRING(name, ...) name##Flag,
-
 #include "ConfigFlagsList.h"
         FlagCount,
         InvalidFlag,
@@ -438,9 +436,7 @@ namespace Js
 
         #define FLAG(type, name, ...) \
             \
-            type name;\
-
-        #define FLAG_STRING(name, ...) String name;
+            type name;                      \
 
         #include "ConfigFlagsList.h"
 
@@ -463,8 +459,8 @@ namespace Js
 
 #ifdef ENABLE_DEBUG_CONFIG_OPTIONS
                 // special callback logic
-                void        FlagSetCallback_ES6All(Boolean value);
-                void        FlagSetCallback_ES6Experimental(Boolean value);
+                void        FlagSetCallback_ES6All(Js::Boolean value);
+                void        FlagSetCallback_ES6Experimental(Js::Boolean value);
 #endif
 
     public:

+ 0 - 11
lib/Common/DataStructures/CommonDataStructuresPch.h

@@ -4,17 +4,6 @@
 //-------------------------------------------------------------------------------------------------------
 #pragma once
 
-// In Debug mode, the PALs definition of max and min are insufficient
-// since some of our code expects the template min-max instead, so
-// including that here
-#if defined(DBG) && !defined(_MSC_VER)
-#define NO_PAL_MINMAX
-#define _Post_equal_to_(x)
-#define _Post_satisfies_(x)
-
-#include "Core/CommonMinMax.h"
-#endif
-
 #include "CommonMinMemory.h"
 
 // === C Runtime Header Files ===

+ 1 - 1
lib/Common/Exceptions/CMakeLists.txt

@@ -1,4 +1,4 @@
-add_library (Chakra.Common.Exceptions
+add_library (Chakra.Common.Exceptions STATIC
     # CommonExceptionsPch.cpp
     ExceptionCheck.cpp
     ExceptionBase.cpp

+ 4 - 1
lib/Common/Exceptions/ReportError.cpp

@@ -4,7 +4,10 @@
 //-------------------------------------------------------------------------------------------------------
 #include "CommonExceptionsPch.h"
 
-__inline void ReportFatalException(
+#ifdef _MSC_VER
+__inline
+#endif
+void ReportFatalException(
     __in ULONG_PTR context,
     __in HRESULT exceptionCode,
     __in ErrorReason reasonCode,

+ 0 - 11
lib/Common/Memory/CommonMemoryPch.h

@@ -4,17 +4,6 @@
 //-------------------------------------------------------------------------------------------------------
 #pragma once
 
-// In Debug mode, the PALs definition of max and min are insufficient
-// since some of our code expects the template min-max instead, so
-// including that here
-#if defined(DBG) && !defined(_MSC_VER)
-#define NO_PAL_MINMAX
-#define _Post_equal_to_(x)
-#define _Post_satisfies_(x)
-
-#include "Core/CommonMinMax.h"
-#endif
-
 #include "CommonMinMemory.h"
 
 typedef _Return_type_success_(return >= 0) LONG NTSTATUS;

+ 1 - 1
lib/Common/Memory/Recycler.cpp

@@ -324,7 +324,7 @@ Recycler::Recycler(AllocationPolicyManager * policyManager, IdleDecommitPageAllo
 
 #ifdef ENABLE_DEBUG_CONFIG_OPTIONS
     // recycler requires at least Recycler::PrimaryMarkStackReservedPageCount to function properly for the main mark context
-    this->markContext.SetMaxPageCount(max<size_t>(GetRecyclerFlagsTable().MaxMarkStackPageCount, Recycler::PrimaryMarkStackReservedPageCount));
+    this->markContext.SetMaxPageCount(max(GetRecyclerFlagsTable().MaxMarkStackPageCount, Recycler::PrimaryMarkStackReservedPageCount));
     this->parallelMarkContext1.SetMaxPageCount(GetRecyclerFlagsTable().MaxMarkStackPageCount);
     this->parallelMarkContext2.SetMaxPageCount(GetRecyclerFlagsTable().MaxMarkStackPageCount);
     this->parallelMarkContext3.SetMaxPageCount(GetRecyclerFlagsTable().MaxMarkStackPageCount);

+ 2 - 2
lib/Common/Memory/amd64/amd64_SAVE_REGISTERS.S

@@ -1,7 +1,7 @@
-//
+// -------------------------------------------------------------------------------------------------------
 // Copyright (C) Microsoft. All rights reserved.
 // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
-//
+// -------------------------------------------------------------------------------------------------------
 
 .intel_syntax noprefix
 

+ 1 - 1
lib/Parser/Parse.h

@@ -318,7 +318,7 @@ public:
 
 
 #ifdef ENABLE_DEBUG_CONFIG_OPTIONS
-    WCHAR* GetParseType() const
+    LPCWSTR GetParseType() const
     {
         switch(m_parseType)
         {

+ 4 - 0
pal/inc/rt/palrt.h

@@ -1242,6 +1242,10 @@ typename std::remove_reference<T>::type&& move( T&& t );
 typedef DWORD OLE_COLOR;
 
 #ifndef PAL_STDCPP_COMPAT
+// defined in xmmintrin.h
+typedef float __m128 __attribute__((__vector_size__(16)));
+typedef double __m128d __attribute__((__vector_size__(16)));
+
 // __m128i defined in emmintrin.h
 typedef union __m128i {
     __int8              m128i_i8[16];