Merge pull request #10609 from alpencolt/ryu-arm-locallock
authorBruce Forstall <brucefo@microsoft.com>
Tue, 4 Apr 2017 20:20:32 +0000 (13:20 -0700)
committerGitHub <noreply@github.com>
Tue, 4 Apr 2017 20:20:32 +0000 (13:20 -0700)
[RyuJIT/ARM32] Localloc implementation in codegen

208 files changed:
CMakeLists.txt
Documentation/design-docs/eh-writethru.md [new file with mode: 0644]
Documentation/workflow/OfficalAndDailyBuilds.md
README.md
dotnet-download.ps1 [new file with mode: 0644]
init-tools.cmd
netci.groovy
perf.groovy
src/.nuget/Microsoft.NETCore.Runtime.CoreCLR/runtime.Windows_NT.Microsoft.NETCore.Runtime.CoreCLR.props
src/.nuget/dir.targets
src/classlibnative/bcltype/system.cpp
src/classlibnative/bcltype/system.h
src/debug/daccess/dacdbiimpl.cpp
src/debug/daccess/enummem.cpp
src/debug/daccess/request.cpp
src/debug/daccess/request_svr.cpp
src/debug/di/process.cpp
src/gc/env/gcenv.ee.h
src/gc/gc.cpp
src/gc/gc.h
src/gc/gccommon.cpp
src/gc/gcenv.ee.standalone.inl
src/gc/gchandletable.cpp
src/gc/gchandletableimpl.h
src/gc/gcinterface.dac.h
src/gc/gcinterface.dacvars.def
src/gc/gcinterface.ee.h
src/gc/gcinterface.h
src/gc/handletable.h
src/gc/objecthandle.h
src/gc/sample/GCSample.cpp
src/gc/sample/gcenv.ee.cpp
src/inc/corbbtprof.h
src/inc/corhdr.h
src/inc/corinfo.h
src/inc/corjit.h
src/inc/crosscomp.h
src/inc/dacvars.h
src/inc/eventtracebase.h
src/inc/legacyactivationshim.h [deleted file]
src/inc/legacyactivationshimdelayload.h [deleted file]
src/inc/winwrap.h
src/jit/CMakeLists.txt
src/jit/_typeinfo.h
src/jit/codegenlegacy.cpp
src/jit/compiler.cpp
src/jit/compiler.h
src/jit/flowgraph.cpp
src/jit/gentree.cpp
src/jit/importer.cpp
src/jit/jit.h
src/jit/jitee.h
src/jit/lclvars.cpp
src/jit/legacynonjit/.gitmirror [new file with mode: 0644]
src/jit/legacynonjit/CMakeLists.txt [new file with mode: 0644]
src/jit/legacynonjit/legacynonjit.def [new file with mode: 0644]
src/jit/lsraarm.cpp
src/jit/protononjit/CMakeLists.txt
src/md/compiler/mdvalidator.cpp
src/mscorlib/Resources/Strings.resx
src/mscorlib/System.Private.CoreLib.csproj
src/mscorlib/shared/Interop/Unix/System.Globalization.Native/Interop.Calendar.cs [moved from src/mscorlib/src/Interop/Unix/System.Globalization.Native/Interop.Calendar.cs with 100% similarity]
src/mscorlib/shared/Interop/Unix/System.Globalization.Native/Interop.Casing.cs [moved from src/mscorlib/src/Interop/Unix/System.Globalization.Native/Interop.Casing.cs with 100% similarity]
src/mscorlib/shared/Interop/Unix/System.Globalization.Native/Interop.Idna.cs [moved from src/mscorlib/src/Interop/Unix/System.Globalization.Native/Interop.Idna.cs with 100% similarity]
src/mscorlib/shared/Interop/Unix/System.Globalization.Native/Interop.Locale.cs [moved from src/mscorlib/src/Interop/Unix/System.Globalization.Native/Interop.Locale.cs with 100% similarity]
src/mscorlib/shared/Interop/Unix/System.Globalization.Native/Interop.Normalization.cs [moved from src/mscorlib/src/Interop/Unix/System.Globalization.Native/Interop.Normalization.cs with 100% similarity]
src/mscorlib/shared/Interop/Unix/System.Globalization.Native/Interop.ResultCode.cs [moved from src/mscorlib/src/Interop/Unix/System.Globalization.Native/Interop.ResultCode.cs with 100% similarity]
src/mscorlib/shared/Interop/Unix/System.Globalization.Native/Interop.TimeZoneInfo.cs [moved from src/mscorlib/src/Interop/Unix/System.Globalization.Native/Interop.TimeZoneInfo.cs with 100% similarity]
src/mscorlib/shared/Interop/Unix/System.Globalization.Native/Interop.Utils.cs [moved from src/mscorlib/src/Interop/Unix/System.Globalization.Native/Interop.Utils.cs with 100% similarity]
src/mscorlib/shared/Interop/Windows/Crypt32/Interop.CryptProtectMemory.cs [moved from src/mscorlib/src/Interop/Windows/Crypt32/Interop.CryptProtectMemory.cs with 100% similarity]
src/mscorlib/shared/Interop/Windows/Kernel32/Interop.WideCharToMultiByte.cs [moved from src/mscorlib/src/Interop/Windows/kernel32/Interop.WideCharToMultiByte.cs with 100% similarity]
src/mscorlib/shared/System.Private.CoreLib.Shared.projitems
src/mscorlib/shared/System/AssemblyLoadEventArgs.cs [new file with mode: 0644]
src/mscorlib/shared/System/AssemblyLoadEventHandler.cs [new file with mode: 0644]
src/mscorlib/shared/System/CurrentSystemTimeZone.cs [moved from src/mscorlib/src/System/CurrentSystemTimeZone.cs with 100% similarity]
src/mscorlib/shared/System/Globalization/CalendarAlgorithmType.cs [moved from src/mscorlib/src/System/Globalization/CalendarAlgorithmType.cs with 98% similarity]
src/mscorlib/shared/System/Globalization/CalendarWeekRule.cs [moved from src/mscorlib/src/System/Globalization/CalendarWeekRule.cs with 97% similarity]
src/mscorlib/shared/System/Globalization/CalendricalCalculationsHelper.cs [moved from src/mscorlib/src/System/Globalization/CalendricalCalculationsHelper.cs with 100% similarity]
src/mscorlib/shared/System/Globalization/ChineseLunisolarCalendar.cs [moved from src/mscorlib/src/System/Globalization/ChineseLunisolarCalendar.cs with 99% similarity]
src/mscorlib/shared/System/Globalization/CultureNotFoundException.cs [moved from src/mscorlib/src/System/Globalization/CultureNotFoundException.cs with 97% similarity]
src/mscorlib/shared/System/Globalization/CultureTypes.cs [new file with mode: 0644]
src/mscorlib/shared/System/Globalization/DateTimeFormat.cs
src/mscorlib/shared/System/Globalization/DateTimeFormatInfoScanner.cs
src/mscorlib/shared/System/Globalization/DateTimeParse.cs
src/mscorlib/shared/System/Globalization/DateTimeStyles.cs [moved from src/mscorlib/src/System/Globalization/DateTimeStyles.cs with 98% similarity]
src/mscorlib/shared/System/Globalization/DaylightTime.cs [moved from src/mscorlib/src/System/Globalization/DaylightTime.cs with 98% similarity]
src/mscorlib/shared/System/Globalization/DigitShapes.cs [moved from src/mscorlib/src/System/Globalization/DigitShapes.cs with 83% similarity]
src/mscorlib/shared/System/Globalization/EastAsianLunisolarCalendar.cs [moved from src/mscorlib/src/System/Globalization/EastAsianLunisolarCalendar.cs with 99% similarity]
src/mscorlib/shared/System/Globalization/GregorianCalendarTypes.cs [moved from src/mscorlib/src/System/Globalization/GregorianCalendarTypes.cs with 98% similarity]
src/mscorlib/shared/System/Globalization/HebrewCalendar.cs [moved from src/mscorlib/src/System/Globalization/HebrewCalendar.cs with 100% similarity]
src/mscorlib/shared/System/Globalization/HebrewNumber.cs [moved from src/mscorlib/src/System/Globalization/HebrewNumber.cs with 100% similarity]
src/mscorlib/shared/System/Globalization/HijriCalendar.cs [moved from src/mscorlib/src/System/Globalization/HijriCalendar.cs with 99% similarity]
src/mscorlib/shared/System/Globalization/InternalGlobalizationHelper.cs [moved from src/mscorlib/src/System/Globalization/InternalGlobalizationHelper.cs with 97% similarity]
src/mscorlib/shared/System/Globalization/JapaneseCalendar.cs [moved from src/mscorlib/src/System/Globalization/JapaneseCalendar.cs with 99% similarity]
src/mscorlib/shared/System/Globalization/JapaneseLunisolarCalendar.cs [moved from src/mscorlib/src/System/Globalization/JapaneseLunisolarCalendar.cs with 98% similarity]
src/mscorlib/shared/System/Globalization/JulianCalendar.cs [moved from src/mscorlib/src/System/Globalization/JulianCalendar.cs with 99% similarity]
src/mscorlib/shared/System/Globalization/KoreanCalendar.cs [moved from src/mscorlib/src/System/Globalization/KoreanCalendar.cs with 99% similarity]
src/mscorlib/shared/System/Globalization/KoreanLunisolarCalendar.cs [moved from src/mscorlib/src/System/Globalization/KoreanLunisolarCalendar.cs with 99% similarity]
src/mscorlib/shared/System/Globalization/LocaleData.Unix.cs [moved from src/mscorlib/src/System/Globalization/LocaleData.Unix.cs with 100% similarity]
src/mscorlib/shared/System/Globalization/NumberStyles.cs [moved from src/mscorlib/src/System/Globalization/NumberStyles.cs with 98% similarity]
src/mscorlib/shared/System/Globalization/PersianCalendar.cs [moved from src/mscorlib/src/System/Globalization/PersianCalendar.cs with 99% similarity]
src/mscorlib/shared/System/Globalization/SortVersion.cs [moved from src/mscorlib/src/System/Globalization/SortVersion.cs with 97% similarity]
src/mscorlib/shared/System/Globalization/TaiwanCalendar.cs [moved from src/mscorlib/src/System/Globalization/TaiwanCalendar.cs with 100% similarity]
src/mscorlib/shared/System/Globalization/TaiwanLunisolarCalendar.cs [moved from src/mscorlib/src/System/Globalization/TaiwanLunisolarCalendar.cs with 98% similarity]
src/mscorlib/shared/System/Globalization/ThaiBuddhistCalendar.cs [moved from src/mscorlib/src/System/Globalization/ThaiBuddhistCalendar.cs with 100% similarity]
src/mscorlib/shared/System/Globalization/TimeSpanStyles.cs [moved from src/mscorlib/src/System/Globalization/TimeSpanStyles.cs with 100% similarity]
src/mscorlib/shared/System/Globalization/UmAlQuraCalendar.cs [moved from src/mscorlib/src/System/Globalization/UmAlQuraCalendar.cs with 99% similarity]
src/mscorlib/shared/System/Globalization/UnicodeCategory.cs [moved from src/mscorlib/src/System/Globalization/UnicodeCategory.cs with 95% similarity]
src/mscorlib/shared/System/IO/StreamHelpers.CopyValidation.cs [moved from src/mscorlib/src/System/IO/StreamHelpers.CopyValidation.cs with 100% similarity]
src/mscorlib/shared/System/ResolveEventArgs.cs [new file with mode: 0644]
src/mscorlib/shared/System/ResolveEventHandler.cs [new file with mode: 0644]
src/mscorlib/shared/System/Security/SecureString.Unix.cs [moved from src/mscorlib/src/System/Security/SecureString.Unix.cs with 100% similarity]
src/mscorlib/shared/System/Security/SecureString.cs [moved from src/mscorlib/src/System/Security/SecureString.cs with 100% similarity]
src/mscorlib/shared/System/Threading/Tasks/TaskCanceledException.cs [moved from src/mscorlib/src/System/Threading/Tasks/TaskCanceledException.cs with 100% similarity]
src/mscorlib/shared/System/Threading/Tasks/TaskExtensions.cs [moved from src/mscorlib/src/System/Threading/Tasks/TaskExtensions.cs with 100% similarity]
src/mscorlib/shared/System/Threading/Tasks/TaskSchedulerException.cs [moved from src/mscorlib/src/System/Threading/Tasks/TaskSchedulerException.cs with 100% similarity]
src/mscorlib/shared/System/TimeZone.cs [moved from src/mscorlib/src/System/TimeZone.cs with 100% similarity]
src/mscorlib/shared/System/TypeUnloadedException.cs [moved from src/mscorlib/src/System/TypeUnloadedException.cs with 69% similarity]
src/mscorlib/src/Debug.cs [deleted file]
src/mscorlib/src/Interop/Unix/System.Globalization.Native/Interop.Collation.cs
src/mscorlib/src/Interop/Unix/System.Native/Interop.SysLog.cs [new file with mode: 0644]
src/mscorlib/src/Interop/Windows/kernel32/Interop.OutputDebugString.cs [new file with mode: 0644]
src/mscorlib/src/Microsoft/Win32/Win32Native.cs
src/mscorlib/src/System/AppDomain.cs
src/mscorlib/src/System/AppDomainManager.cs
src/mscorlib/src/System/ArraySegment.cs
src/mscorlib/src/System/Diagnostics/Debug.Unix.cs [new file with mode: 0644]
src/mscorlib/src/System/Diagnostics/Debug.Windows.cs [new file with mode: 0644]
src/mscorlib/src/System/Diagnostics/Debug.cs [new file with mode: 0644]
src/mscorlib/src/System/Diagnostics/Eventing/EventSource.cs
src/mscorlib/src/System/Enum.cs
src/mscorlib/src/System/Environment.cs
src/mscorlib/src/System/Globalization/Calendar.cs
src/mscorlib/src/System/Globalization/CalendarData.Windows.cs
src/mscorlib/src/System/Globalization/CultureInfo.Unix.cs
src/mscorlib/src/System/Globalization/CultureInfo.Windows.cs
src/mscorlib/src/System/Globalization/CultureTypes.cs [deleted file]
src/mscorlib/src/System/Globalization/GregorianCalendarHelper.cs
src/mscorlib/src/System/Globalization/IdnMapping.Unix.cs
src/mscorlib/src/System/Globalization/IdnMapping.cs
src/mscorlib/src/System/Globalization/JapaneseCalendar.Unix.cs
src/mscorlib/src/System/Guid.cs
src/mscorlib/src/System/Reflection/LocalVariableInfo.cs
src/mscorlib/src/System/Reflection/RuntimeEventInfo.cs
src/mscorlib/src/System/Reflection/RuntimeParameterInfo.cs
src/mscorlib/src/System/Runtime/CompilerServices/ConditionalWeakTable.cs
src/mscorlib/src/System/Runtime/Serialization/FormatterServices.cs
src/mscorlib/src/System/Security/SecurityState.cs [deleted file]
src/mscorlib/src/System/Span.cs
src/mscorlib/src/System/ThrowHelper.cs
src/mscorlib/src/System/TimeZoneInfo.Win32.cs
src/mscorlib/src/System/TimeZoneInfo.cs
src/pal/inc/pal.h
src/pal/inc/palprivate.h
src/pal/src/CMakeLists.txt
src/pal/src/cruntime/misctls.cpp
src/pal/src/misc/environ.cpp
src/pal/src/misc/version.cpp [deleted file]
src/pal/tests/palsuite/miscellaneous/GetVersionExA/CMakeLists.txt [deleted file]
src/pal/tests/palsuite/miscellaneous/GetVersionExA/test1/CMakeLists.txt [deleted file]
src/pal/tests/palsuite/miscellaneous/GetVersionExA/test1/test.cpp [deleted file]
src/pal/tests/palsuite/miscellaneous/GetVersionExA/test1/testinfo.dat [deleted file]
src/pal/tests/palsuite/miscellaneous/GetVersionExW/CMakeLists.txt [deleted file]
src/pal/tests/palsuite/miscellaneous/GetVersionExW/test1/CMakeLists.txt [deleted file]
src/pal/tests/palsuite/miscellaneous/GetVersionExW/test1/test.cpp [deleted file]
src/pal/tests/palsuite/miscellaneous/GetVersionExW/test1/testinfo.dat [deleted file]
src/pal/tests/palsuite/paltestlist_to_be_reviewed.txt
src/pal/tools/gen-buildsys-clang.sh
src/unwinder/i386/unwinder_i386.cpp
src/utilcode/CMakeLists.txt
src/vm/baseassemblyspec.cpp
src/vm/ceemain.cpp
src/vm/crossgencompile.cpp
src/vm/domainfile.cpp
src/vm/ecalllist.h
src/vm/eetwain.cpp
src/vm/eventtrace.cpp
src/vm/exinfo.h
src/vm/gcenv.ee.cpp
src/vm/gcenv.ee.h
src/vm/gcheaputilities.cpp
src/vm/gcheaputilities.h
src/vm/gdbjit.cpp
src/vm/jitinterface.cpp
src/vm/prestub.cpp
src/vm/readytoruninfo.cpp
src/vm/rexcep.h
src/vm/threads.cpp
src/vm/threads.h
src/vm/tieredcompilation.cpp
src/zap/zapimage.cpp
src/zap/zapimage.h
src/zap/zapinfo.cpp
tests/arm64/Tests.lst
tests/scripts/arm64_post_build.py
tests/scripts/lst_creator.py
tests/src/JIT/Methodical/Boxing/morph/sin3double.il [new file with mode: 0644]
tests/src/JIT/Methodical/Boxing/morph/sin3double.ilproj [new file with mode: 0644]
tests/src/JIT/Methodical/acceptance/Boxing/boxing001.il [new file with mode: 0644]
tests/src/JIT/Methodical/acceptance/Boxing/boxing001.ilproj [new file with mode: 0644]
tests/src/JIT/Performance/CodeQuality/Span/SpanBench.cs
tests/src/JIT/Regression/JitBlue/GitHub_10621/GitHub_10621.cs [new file with mode: 0644]
tests/src/JIT/Regression/JitBlue/GitHub_10621/GitHub_10621.csproj [new file with mode: 0644]
tests/src/JIT/SIMD/VectorConvert.cs [new file with mode: 0644]
tests/src/JIT/SIMD/VectorConvert_r.csproj [new file with mode: 0644]
tests/src/JIT/SIMD/VectorConvert_ro.csproj [new file with mode: 0644]
tests/src/JIT/opt/Tailcall/TailcallVerifyWithPrefix.il
tests/src/baseservices/compilerservices/dynamicobjectproperties/testapis.cs

index 6327a14..66b0255 100644 (file)
@@ -104,7 +104,7 @@ else (WIN32)
     else (CMAKE_SYSTEM_NAME STREQUAL Darwin)
 
       # Ensure that objcopy is present
-      if (DEFINED ENV{CROSSCOMPILE} AND NOT DEFINED CLR_CROSS_COMPONENTS_BUILD)
+      if (CLR_UNIX_CROSS_BUILD AND NOT DEFINED CLR_CROSS_COMPONENTS_BUILD)
         if (CMAKE_SYSTEM_PROCESSOR STREQUAL armv7l OR CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64 OR CMAKE_SYSTEM_PROCESSOR STREQUAL arm)
           find_program(OBJCOPY ${TOOLCHAIN}-objcopy)
         elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL i686)
@@ -164,15 +164,12 @@ if(CMAKE_SYSTEM_NAME STREQUAL Linux)
     endif()
     set(CLR_CMAKE_PLATFORM_LINUX 1)
 
-    # Detect Alpine Linux
-    SET(OS_RELEASE_FILENAME "/etc/os-release")
-    if (EXISTS ${OS_RELEASE_FILENAME})
-        file(READ ${OS_RELEASE_FILENAME} OS_RELEASE)
-        string(FIND "${OS_RELEASE}" "ID=alpine" CLR_CMAKE_PLATFORM_ALPINE_LINUX)
-        if(CLR_CMAKE_PLATFORM_ALPINE_LINUX EQUAL -1)
-            unset(CLR_CMAKE_PLATFORM_ALPINE_LINUX)
-        endif(CLR_CMAKE_PLATFORM_ALPINE_LINUX EQUAL -1)
-    endif(EXISTS ${OS_RELEASE_FILENAME})
+    # Detect Linux ID
+    if(DEFINED CLR_CMAKE_LINUX_ID)
+        if(CLR_CMAKE_LINUX_ID STREQUAL alpine)
+            set(CLR_CMAKE_PLATFORM_ALPINE_LINUX)
+        endif()
+    endif(DEFINED CLR_CMAKE_LINUX_ID)
 endif(CMAKE_SYSTEM_NAME STREQUAL Linux)
 
 if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
diff --git a/Documentation/design-docs/eh-writethru.md b/Documentation/design-docs/eh-writethru.md
new file mode 100644 (file)
index 0000000..0afa5a7
--- /dev/null
@@ -0,0 +1,378 @@
+# Exception Handling Write Through Optimization.
+
+Write through is an optimization done on local variables that live across exception handling flow like a handler, filter, or finally so that they can be enregistered - treated as a register candidate - throughout a method.  For each variable live across one of these constructs, the minimum requirement is that a store to the variables location on the stack is placed between a reaching definition and any point of control flow leading to the handler, as well as a load between any return from a filter or finally and an upward exposed use.  Conceptually this maintains the value of the variable on the stack across the exceptional flow which would kill any live registers.  This transformation splits a local variable into multiple enregisterable compiler temporaries backed by the local variable on the stack. For local vars that additionally have appearances within a eh construct, a load from the stack local is inserted to a temp that will be enregistered within the handler.
+
+## Motivation
+
+Historically the JIT has not done this transformation because exception handling was rare and thus the transformation was not worth the compile time.  Additionally it was easy to make the recomendation to users to remove EH from performance critical methods since they had control of where the EH appeared.  Neither of these points remain true as we increase our focus on cloud workloads.  The use of non-blocking async calls are common in performance critical paths for these workloads and async injects exception handling constructs to implement the feature.  This in combination with the long standing use of EH in 'foreach' and 'using' statements means that we are seeing EH constructs that are difficult for the user to manage or remove high in the profile (Techempower on Kestrel is a good example).  Given these cloud workloads doing the transformation would be a clear benefit.
+
+## Design
+
+The goal of the design is to preserve the constraints listed above - i.e. preserve a correct value on the stack for any local var that crosses an EH edge in the flow graph. To ensure that the broad set of global optimizations can act on the IR shape produced by this transformation and that phase ordering issues do not block enregistration opportunities the write through phase will be staged just prior to SSA build after morph and it will do a full walk of the IR rewriting appearances to proxies as well as inserting reloads at the appropriate blocks in the flow graph as indicated by EH control flow semantics. To preserve the needed values on the stack a store will also be inserted after every definition to copy the new value in the proxy back to the stack location.  This will leave non optimal number of stores (too many) but with the strategy that the more expensive analysis to eliminate/better place stores will be staged as a global optimization in a higher compilation tier.
+
+### Throughput
+
+To identify EH crossing local vars global liveness is necessary.  This comes at the significant cost of the liveness analysis.  To mitigate this the write through phase is staged immediately before SSA build for the global optimizer.  Since the typical case is that there is no EH, the liveness analysis in write through can be reused directly by SSA build.  For the case where EH local vars are present liveness today must be rebuilt for SSA since new local vars have been added, but incremental update to the RyuJIT liveness analysis can be implemented (worklist based live analysis) to improve the throughput.  Additionally the write through transformation does a full IR walk - also expensive - to replace EH local var appearances with proxies and insert transfers to and from the stack for EH flow, given this initial implementations may need to be staged as part of AOT (crossgen) compiles until tiering can move the more expensive analysis out of the startup path.
+
+### Algorithm
+On the IR directly before SSA build:
+- Run global liveness to identify local vars that cross EH boundaries (as a byproduct of this these local vars are marked "do not enregister")
+- Foreach EH local var create a new local var "proxy" that can be enregisterd.
+- Iterate each block in the flow graph doing the following:
+  * Foreach tree in block do a post order traversal and
+    - Replace all appearances of EH local vars with the defined proxy
+    - Insert a copy of proxy definition back to the EH local var (on the stack)
+  * If EH handler entry block insert reloads from EH local var to proxy at block head
+  * If finally or filter exit, insert reloads from EH local var to proxy at successor block heads
+- For method entry block, insert reloads from parameter EH local vars to proxies
+
+At end no proxy should be live across EH flow and all value updates will be written back to the stack location.
+
+## Next steps
+
+The initial prototype that produced the example bellow is currently being improved to make it production ready.  At the same time a more extensive suite of example tests are being developed. 
+
+- [X] Proof of concept prototype.
+- [ ] Production implementation of WriteThru phase.
+- [ ] Suite of optimization examples/regression tests.
+- [ ] Testing
+   * [ ] Full CI test pass.
+   * [ ] JIT benchmark diffs.
+   * [ ] Kestrel techempower numbers.
+
+## Example
+
+The following is a simple example that shows enregistration for a local var live, and modified, through a catch.
+
+#### Source code snippet
+
+```
+class Enreg01
+{
+    int val;
+    double dist;
+
+    public Enreg01(int x) {
+        val = x;
+        dist = (double)x;
+    }
+
+    [MethodImpl(MethodImplOptions.NoInlining)]
+    public int foo(ref double d) { return (int)d; }
+
+    [MethodImpl(MethodImplOptions.NoInlining)]
+    public int Run()
+    {
+        int sum = val;
+
+        try {
+            TryValue(97);
+        }
+        catch (ValueException e)
+        {
+            Console.WriteLine("Catching {0}", Convert.ToString(e.x));
+            sum += val + e.x;
+            foo(ref dist);
+            sum += val;
+        }
+
+        return sum;
+    }
+
+    [MethodImpl(MethodImplOptions.NoInlining)]
+    public int TryValue(int y) 
+    {
+        if (y == 97) 
+        {
+            Console.WriteLine("Throwing 97");
+            throw new ValueException(97);
+        }
+        else
+        {
+            return y;
+        }
+    }
+}
+```
+#### Post WriteThru GenTree nodes for Run() method
+
+The Run() contains the catch and is the only method the EH WriteThru modifies.
+
+```
+Creating enregisterable proxies:
+lvaGrabTemp returning 8 (V08 tmp5) (a long lifetime temp) called for  Add proxy for EH Write Thru..
+Creating proxy V08 for local var V00
+
+lvaGrabTemp returning 9 (V09 tmp6) (a long lifetime temp) called for  Add proxy for EH Write Thru..
+Creating proxy V09 for local var V01
+
+Trees after EH Write Thru
+
+---------------------------------------------------------------------------------------------------------------------------
+BBnum         descAddr ref try hnd preds           weight   [IL range]      [jump]      [EH region]         [flags]
+---------------------------------------------------------------------------------------------------------------------------
+BB01 [00000263A1C161B8]  1                              1   [000..007)                                     i label target 
+BB02 [00000263A1C162D0]  1  0    BB01                   1   [007..012)                 T0      try { }     keep i try label gcsafe 
+BB03 [00000263A1C16500]  2       BB02,BB04              1   [050..052)        (return)                     i label target gcsafe 
+++++ funclets follow
+BB04 [00000263A1C163E8]  0     0                        0   [012..050)-> BB03 ( cret )    H0 F catch { }   keep i rare label target gcsafe flet 
+-------------------------------------------------------------------------------------------------------------------------------------
+
+------------ BB01 [000..007), preds={} succs={BB02}
+
+***** BB01, stmt 1
+     (  3,  3) [000123] ------------             *  stmtExpr  void  (IL   ???...  ???)
+N001 (  3,  2) [000120] ------------             |  /--*  lclVar    ref    V00 this         
+N003 (  3,  3) [000122] -A------R---             \--*  =         ref   
+N002 (  1,  1) [000121] D------N----                \--*  lclVar    ref    V08 tmp5         
+
+***** BB01, stmt 2
+     ( 17, 13) [000005] ------------             *  stmtExpr  void  (IL 0x000...0x006)
+N007 (  3,  2) [000097] ------------             |     /--*  lclVar    int    V09 tmp6         
+N009 (  7,  5) [000098] -A------R---             |  /--*  =         int   
+N008 (  3,  2) [000096] D------N----             |  |  \--*  lclVar    int    V01 loc0         
+N010 ( 17, 13) [000099] -A-XG-------             \--*  comma     void  
+N004 (  6,  5) [000002] ---XG-------                |  /--*  indir     int   
+N002 (  1,  1) [000059] ------------                |  |  |  /--*  const     long   16 field offset Fseq[val]
+N003 (  4,  3) [000060] -------N----                |  |  \--*  +         byref 
+N001 (  3,  2) [000001] ------------                |  |     \--*  lclVar    ref    V08 tmp5         
+N006 ( 10,  8) [000004] -A-XG---R---                \--*  =         int   
+N005 (  3,  2) [000003] D------N----                   \--*  lclVar    int    V09 tmp6         
+
+------------ BB02 [007..012), preds={BB01} succs={BB03}
+
+***** BB02, stmt 3
+     ( 16, 10) [000013] ------------             *  stmtExpr  void  (IL 0x007...0x00F)
+N008 ( 16, 10) [000011] --C-G-------             \--*  call      int    Enreg01.TryIncrement
+N004 (  1,  1) [000009] ------------ this in rcx    +--*  lclVar    ref    V08 tmp5         
+N005 (  1,  1) [000010] ------------ arg1 in rdx    \--*  const     int    97
+
+------------ BB03 [050..052) (return), preds={BB02,BB04} succs={}
+
+***** BB03, stmt 4
+     (  3,  3) [000119] ------------             *  stmtExpr  void  (IL   ???...  ???)
+N001 (  3,  2) [000116] ------------             |  /--*  lclVar    int    V01 loc0         
+N003 (  3,  3) [000118] -A------R---             \--*  =         int   
+N002 (  1,  1) [000117] D------N----                \--*  lclVar    int    V09 tmp6         
+
+***** BB03, stmt 5
+     (  4,  3) [000017] ------------             *  stmtExpr  void  (IL 0x050...0x051)
+N002 (  4,  3) [000016] ------------             \--*  return    int   
+N001 (  3,  2) [000015] ------------                \--*  lclVar    int    V09 tmp6         
+
+------------ BB04 [012..050) -> BB03 (cret), preds={} succs={BB03}
+
+***** BB04, stmt 6
+     (  5,  4) [000021] ------------             *  stmtExpr  void  (IL 0x012...0x012)
+N001 (  1,  1) [000007] -----O------             |  /--*  catchArg  ref   
+N003 (  5,  4) [000020] -A---O--R---             \--*  =         ref   
+N002 (  3,  2) [000019] D------N----                \--*  lclVar    ref    V03 tmp0         
+
+***** BB04, stmt 7
+     (  3,  3) [000111] ------------             *  stmtExpr  void  (IL   ???...  ???)
+N001 (  3,  2) [000108] ------------             |  /--*  lclVar    ref    V00 this         
+N003 (  3,  3) [000110] -A------R---             \--*  =         ref   
+N002 (  1,  1) [000109] D------N----                \--*  lclVar    ref    V08 tmp5         
+
+***** BB04, stmt 8
+     (  3,  3) [000115] ------------             *  stmtExpr  void  (IL   ???...  ???)
+N001 (  3,  2) [000112] ------------             |  /--*  lclVar    int    V01 loc0         
+N003 (  3,  3) [000114] -A------R---             \--*  =         int   
+N002 (  1,  1) [000113] D------N----                \--*  lclVar    int    V09 tmp6         
+
+***** BB04, stmt 9
+     ( 59, 43) [000034] ------------             *  stmtExpr  void  (IL 0x013...0x037)
+N021 ( 59, 43) [000031] --CXG-------             \--*  call      void   System.Console.WriteLine
+N002 (  5, 12) [000066] ----G-------                |  /--*  indir     ref   
+N001 (  3, 10) [000065] ------------                |  |  \--*  const(h)  long   0xB3963070 "Catching {0}"
+N004 (  9, 15) [000076] -A--G---R-L- arg0 SETUP     +--*  =         ref   
+N003 (  3,  2) [000075] D------N----                |  \--*  lclVar    ref    V05 tmp2         
+N012 ( 20, 14) [000029] --CXG-------                |  /--*  call      ref    System.Convert.ToString
+N010 (  6,  8) [000028] ---XG------- arg0 in rcx    |  |  \--*  indir     int   
+N008 (  1,  4) [000067] ------------                |  |     |  /--*  const     long   140 field offset Fseq[x]
+N009 (  4,  6) [000068] -------N----                |  |     \--*  +         byref 
+N007 (  3,  2) [000027] ------------                |  |        \--*  lclVar    ref    V03 tmp0         
+N014 ( 24, 17) [000072] -ACXG---R-L- arg1 SETUP     +--*  =         ref   
+N013 (  3,  2) [000071] D------N----                |  \--*  lclVar    ref    V04 tmp1         
+N017 (  3,  2) [000073] ------------ arg1 in rdx    +--*  lclVar    ref    V04 tmp1          (last use)
+N018 (  3,  2) [000077] ------------ arg0 in rcx    \--*  lclVar    ref    V05 tmp2          (last use)
+
+***** BB04, stmt 10
+     ( 18, 19) [000044] ------------             *  stmtExpr  void  (IL 0x028...  ???)
+N014 (  1,  1) [000101] ------------             |     /--*  lclVar    int    V09 tmp6         
+N016 (  5,  4) [000102] -A------R---             |  /--*  =         int   
+N015 (  3,  2) [000100] D------N----             |  |  \--*  lclVar    int    V01 loc0         
+N017 ( 18, 19) [000103] -A-XG-------             \--*  comma     void  
+N010 (  6,  8) [000039] ---XG-------                |     /--*  indir     int   
+N008 (  1,  4) [000081] ------------                |     |  |  /--*  const     long   140 field offset Fseq[x]
+N009 (  4,  6) [000082] -------N----                |     |  \--*  +         byref 
+N007 (  3,  2) [000038] ------------                |     |     \--*  lclVar    ref    V03 tmp0          (last use)
+N011 ( 13, 15) [000041] ---XG-------                |  /--*  +         int   
+N005 (  4,  4) [000037] ---XG-------                |  |  |  /--*  indir     int   
+N003 (  1,  1) [000079] ------------                |  |  |  |  |  /--*  const     long   16 field offset Fseq[val]
+N004 (  2,  2) [000080] -------N----                |  |  |  |  \--*  +         byref 
+N002 (  1,  1) [000036] ------------                |  |  |  |     \--*  lclVar    ref    V08 tmp5         
+N006 (  6,  6) [000040] ---XG-------                |  |  \--*  +         int   
+N001 (  1,  1) [000035] ------------                |  |     \--*  lclVar    int    V09 tmp6         
+N013 ( 13, 15) [000043] -A-XG---R---                \--*  =         int   
+N012 (  1,  1) [000042] D------N----                   \--*  lclVar    int    V09 tmp6         
+
+***** BB04, stmt 11
+     ( 20, 14) [000051] ------------             *  stmtExpr  void  (IL 0x038...0x044)
+N013 ( 20, 14) [000049] --CXGO------             \--*  call      int    Enreg01.foo
+N007 (  1,  1) [000086] ------------                |     /--*  const     long   8 field offset Fseq[dist]
+N008 (  3,  3) [000087] ------------                |  /--*  +         byref 
+N006 (  1,  1) [000085] ------------                |  |  \--*  lclVar    ref    V08 tmp5         
+N009 (  5,  5) [000088] ---XGO-N---- arg1 in rdx    +--*  comma     byref 
+N005 (  2,  2) [000084] ---X-O-N----                |  \--*  nullcheck byte  
+N004 (  1,  1) [000083] ------------                |     \--*  lclVar    ref    V08 tmp5         
+N010 (  1,  1) [000045] ------------ this in rcx    \--*  lclVar    ref    V08 tmp5         
+
+***** BB04, stmt 12
+     ( 11, 10) [000058] ------------             *  stmtExpr  void  (IL 0x045...0x04D)
+N009 (  1,  1) [000105] ------------             |     /--*  lclVar    int    V09 tmp6         
+N011 (  5,  4) [000106] -A------R---             |  /--*  =         int   
+N010 (  3,  2) [000104] D------N----             |  |  \--*  lclVar    int    V01 loc0         
+N012 ( 11, 10) [000107] -A-XG-------             \--*  comma     void  
+N005 (  4,  4) [000054] ---XG-------                |     /--*  indir     int   
+N003 (  1,  1) [000094] ------------                |     |  |  /--*  const     long   16 field offset Fseq[val]
+N004 (  2,  2) [000095] -------N----                |     |  \--*  +         byref 
+N002 (  1,  1) [000053] ------------                |     |     \--*  lclVar    ref    V08 tmp5         
+N006 (  6,  6) [000055] ---XG-------                |  /--*  +         int   
+N001 (  1,  1) [000052] ------------                |  |  \--*  lclVar    int    V09 tmp6         
+N008 (  6,  6) [000057] -A-XG---R---                \--*  =         int   
+N007 (  1,  1) [000056] D------N----                   \--*  lclVar    int    V09 tmp6         
+
+```
+
+#### Post register allocation and code generation code
+
+```diff
+--- base.asmdmp        2017-03-28 20:40:36.000000000 -0700
++++ wt.asmdmp  2017-03-28 20:41:11.000000000 -0700
+@@ -1,78 +1,85 @@
+ *************** After end code gen, before unwindEmit()
+-G_M16307_IG01:        ; func=00, offs=000000H, size=0014H, gcVars=0000000000000000 {}, gcrefRegs=00000000 {}, byrefRegs=00000000 {}, gcvars, byref, nogc <-- Prolog IG
++G_M16307_IG01:        ; func=00, offs=000000H, size=0017H, gcVars=0000000000000000 {}, gcrefRegs=00000000 {}, byrefRegs=00000000 {}, gcvars, byref, nogc <-- Prolog IG
+ push     rbp
++push     r14
+ push     rdi
+ push     rsi
++push     rbx
+ sub      rsp, 48
+-lea      rbp, [rsp+40H]
+-mov      qword ptr [V07 rbp-20H], rsp
++lea      rbp, [rsp+50H]
++mov      qword ptr [V07 rbp-30H], rsp
+ mov      gword ptr [V00 rbp+10H], rcx
+-G_M16307_IG02:        ; offs=000014H, size=000AH, gcVars=0000000000000001 {V00}, gcrefRegs=00000000 {}, byrefRegs=00000000 {}, gcvars, byref
++G_M16307_IG02:        ; offs=000017H, size=000AH, gcVars=0000000000000001 {V00}, gcrefRegs=00000000 {}, byrefRegs=00000000 {}, gcvars, byref
+-mov      rcx, gword ptr [V00 rbp+10H]
+-mov      ecx, dword ptr [rcx+16]
+-mov      dword ptr [V01 rbp-14H], ecx
++mov      rsi, gword ptr [V00 rbp+10H]
++mov      edi, dword ptr [rsi+16]
++mov      dword ptr [V01 rbp-24H], edi
+-G_M16307_IG03:        ; offs=00001EH, size=000FH, gcrefRegs=00000000 {}, byrefRegs=00000000 {}, byref
++G_M16307_IG03:        ; offs=000021H, size=000EH, gcrefRegs=00000040 {rsi}, byrefRegs=00000000 {}, byref
+-mov      rcx, gword ptr [V00 rbp+10H]
++mov      rcx, rsi     ; Elided reload in try region
+ mov      edx, 97
+ call     Enreg01:TryIncrement(int):int:this
+ nop      
+-G_M16307_IG04:        ; offs=00002DH, size=0003H, gcVars=0000000000000000 {}, gcrefRegs=00000000 {}, byrefRegs=00000000 {}, gcvars, byref
++G_M16307_IG04:        ; offs=00002FH, size=0005H, gcVars=0000000000000000 {}, gcrefRegs=00000000 {}, byrefRegs=00000000 {}, gcvars, byref
+-mov      eax, dword ptr [V01 rbp-14H]
++mov      edi, dword ptr [V01 rbp-24H]
++mov      eax, edi
+-G_M16307_IG05:        ; offs=000030H, size=0008H, epilog, nogc, emitadd
++G_M16307_IG05:        ; offs=000034H, size=000BH, epilog, nogc, emitadd
+-lea      rsp, [rbp-10H]
++lea      rsp, [rbp-20H]
++pop      rbx
+ pop      rsi
+ pop      rdi
++pop      r14
+ pop      rbp
+ ret      
+-G_M16307_IG06:        ; func=01, offs=000038H, size=0014H, gcrefRegs=00000004 {rdx}, byrefRegs=00000000 {}, byref, funclet prolog, nogc
++G_M16307_IG06:        ; func=01, offs=00003FH, size=0017H, gcrefRegs=00000004 {rdx}, byrefRegs=00000000 {}, byref, funclet prolog, nogc
+ push     rbp
++push     r14 
+ push     rdi
+ push     rsi
++push     rbx 
+ sub      rsp, 48
+ mov      rbp, qword ptr [rcx+32]
+ mov      qword ptr [rsp+20H], rbp
+-lea      rbp, [rbp+40H]
++lea      rbp, [rbp+50H]
+-G_M16307_IG07:        ; offs=00004CH, size=005EH, gcVars=0000000000000001 {V00}, gcrefRegs=00000004 {rdx}, byrefRegs=00000000 {}, gcvars, byref, isz
++G_M16307_IG07:        ; offs=000056H, size=0054H, gcVars=0000000000000001 {V00}, gcrefRegs=00000004 {rdx}, byrefRegs=00000000 {}, gcvars, byref, isz
+ mov      rsi, rdx
+-mov      rcx, 0x18A3C473070
+-mov      rdi, gword ptr [rcx]
++mov      rcx, gword ptr [V00 rbp+10H]        ; Reload of proxy register
++mov      rdi, rcx                            ; Missed peep
++mov      ecx, dword ptr [V01 rbp-24H]        ; Reload of proxy register
++mov      ebx, ecx                            ; Missed peep
++mov      rcx, 0x263B3963070
++mov      r14, gword ptr [rcx]                ; Missed addressing mode
+ mov      ecx, dword ptr [rsi+140]
+ call     System.Convert:ToString(int):ref
+ mov      rdx, rax
+-mov      rcx, rdi
++mov      rcx, r14
+ call     System.Console:WriteLine(ref,ref)
+-mov      edx, dword ptr [V01 rbp-14H]        ; Elided stack access
+-mov      rcx, gword ptr [V00 rbp+10H]        ; Elided stack access
+-add      edx, dword ptr [rcx+16]
+-add      edx, dword ptr [rsi+140]
+-mov      dword ptr [V01 rbp-14H], edx        ; Elided stack access
+-mov      rdx, gword ptr [V00 rbp+10H]        ; Elided stack access
+-add      rdx, 8
+-mov      rcx, gword ptr [V00 rbp+10H]        ; Elided stack access
++add      ebx, dword ptr [rdi+16]
++add      ebx, dword ptr [rsi+140]
++lea      rdx, bword ptr [rdi+8]
++mov      rcx, rdi
+ call     Enreg01:foo(byref):int:this
+-mov      eax, dword ptr [V01 rbp-14H]        ; Elided stack access
+-mov      rdx, gword ptr [V00 rbp+10H]        ; Elided stack access
+-add      eax, dword ptr [rdx+16]
+-mov      dword ptr [V01 rbp-14H], eax        ; Elided stack access
++add      ebx, dword ptr [rdi+16]
++mov      dword ptr [V01 rbp-24H], ebx        ; Store of proxy register
+ lea      rax, G_M16307_IG04
+-G_M16307_IG08:        ; offs=0000AAH, size=0008H, funclet epilog, nogc, emitadd
++G_M16307_IG08:        ; offs=0000AAH, size=000BH, funclet epilog, nogc, emitadd
+ add      rsp, 48
++pop      rbx
+ pop      rsi
+ pop      rdi
++pop      r14
+ pop      rbp
+ ret 
+
+```
+
+Summary of diff:
+replaced 6 loads and 2 stores with 2 loads, 1 store, 2 push, 2 pop.
+
+
index 3b5d3b9..322fc82 100644 (file)
@@ -72,7 +72,6 @@ something affecting all builds).
 |**openSUSE 42.1**|[![x64 status](https://img.shields.io/jenkins/s/https/ci.dot.net/job/dotnet_coreclr/job/master/debug_opensuse42.1.svg?label=x64)](http://ci.dot.net/job/dotnet_coreclr/job/master/job/debug_opensuse42.1)|[![x64 status](https://img.shields.io/jenkins/s/https/ci.dot.net/job/dotnet_coreclr/job/master/release_opensuse42.1.svg?label=x64)](http://ci.dot.net/job/dotnet_coreclr/job/master/job/release_opensuse42.1)|
 |**OS X 10.12**|[![x64 status](https://img.shields.io/jenkins/s/https/ci.dot.net/job/dotnet_coreclr/job/master/debug_osx.svg?label=x64)](http://ci.dot.net/job/dotnet_coreclr/job/master/job/debug_osx)|[![x64 status](https://img.shields.io/jenkins/s/https/ci.dot.net/job/dotnet_coreclr/job/master/release_osx.svg?label=x64)](http://ci.dot.net/job/dotnet_coreclr/job/master/job/release_osx)|
 |**Red Hat 7.2**|[![x64 status](https://img.shields.io/jenkins/s/https/ci.dot.net/job/dotnet_coreclr/job/master/debug_rhel7.2.svg?label=x64)](http://ci.dot.net/job/dotnet_coreclr/job/master/job/debug_rhel7.2)|[![x64 status](https://img.shields.io/jenkins/s/https/ci.dot.net/job/dotnet_coreclr/job/master/release_rhel7.2.svg?label=x64)](http://ci.dot.net/job/dotnet_coreclr/job/master/job/release_rhel7.2)|
-|**Fedora 23**|[![x64 status](https://img.shields.io/jenkins/s/https/ci.dot.net/job/dotnet_coreclr/job/master/debug_fedora23.svg?label=x64)](http://ci.dot.net/job/dotnet_coreclr/job/master/job/debug_fedora23)|[![x64 status](https://img.shields.io/jenkins/s/https/ci.dot.net/job/dotnet_coreclr/job/master/release_fedora23.svg?label=x64)](http://ci.dot.net/job/dotnet_coreclr/job/master/job/release_fedora23)|
 |**Ubuntu 14.04**|[![x64 status](https://img.shields.io/jenkins/s/https/ci.dot.net/job/dotnet_coreclr/job/master/debug_ubuntu.svg?label=x64)](http://ci.dot.net/job/dotnet_coreclr/job/master/job/debug_ubuntu)|[![x64 status](https://img.shields.io/jenkins/s/https/ci.dot.net/job/dotnet_coreclr/job/master/release_ubuntu.svg?label=x64)](http://ci.dot.net/job/dotnet_coreclr/job/master/job/release_ubuntu)|
 |**Ubuntu 16.04**|[![x64 status](https://img.shields.io/jenkins/s/https/ci.dot.net/job/dotnet_coreclr/job/master/debug_ubuntu16.04.svg?label=x64)](http://ci.dot.net/job/dotnet_coreclr/job/master/job/debug_ubuntu16.04)|[![x64 status](https://img.shields.io/jenkins/s/https/ci.dot.net/job/dotnet_coreclr/job/master/release_ubuntu16.04.svg?label=x64)](http://ci.dot.net/job/dotnet_coreclr/job/master/job/release_ubuntu16.04)|
 |**Ubuntu 16.10**|[![x64 status](https://img.shields.io/jenkins/s/https/ci.dot.net/job/dotnet_coreclr/job/master/debug_ubuntu16.10.svg?label=x64)](http://ci.dot.net/job/dotnet_coreclr/job/master/job/debug_ubuntu16.10)|[![x64 status](https://img.shields.io/jenkins/s/https/ci.dot.net/job/dotnet_coreclr/job/master/release_ubuntu16.10.svg?label=x64)](http://ci.dot.net/job/dotnet_coreclr/job/master/job/release_ubuntu16.10)|
index 6683a16..21dd9f7 100644 (file)
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@ which is a system to package, distribute and version software components.  See [
 for more information on Nuget.   For now it is enough to know Nuget is a system that
 bundles components into `*.nupkg` files (which are ZIP archives) and these packages can be 'published' 
 either through a local file system path or by a URL (e.g. https://www.nuget.org/).   There are then tools 
-(e.g. Nuget.exe, Visual Studio, dotnet.exe) that based on a configuration file (project.json) know 
+(e.g. Nuget.exe, Visual Studio, dotnet.exe) that based on a configuration file (.csproj) know 
 how to search these publishing locations and pull down consistent set of packages for the 
 application.   
 
diff --git a/dotnet-download.ps1 b/dotnet-download.ps1
new file mode 100644 (file)
index 0000000..ef5808f
--- /dev/null
@@ -0,0 +1,37 @@
+param(
+    [parameter(Mandatory=$true)]$DotnetRemotePath,
+    [parameter(Mandatory=$true)]$DotnetLocalPath,
+    [parameter(Mandatory=$true)]$DotnetPath
+)
+
+$retryCount = 0
+$success = $false
+
+do {
+    try {
+        Write-Output "Downloading from $DotnetRemotePath"
+        (New-Object Net.WebClient).DownloadFile($DotnetRemotePath, $DotnetLocalPath)
+        $success = $true
+    } catch { 
+        if ($retryCount -ge 6) {
+            Write-Output "Maximum of 5 retries exceeded. Aborting"
+            throw
+        } 
+        else { 
+            $retryCount++
+            $retryTime = 5 * $retryCount
+            Write-Output "Download failed. Retrying in $retryTime seconds"
+            Start-Sleep -Seconds (5 * $retryCount)
+        }
+    }
+} while ($success -eq $false)
+
+Write-Output "Download finished"
+Add-Type -Assembly 'System.IO.Compression.FileSystem' -ErrorVariable AddTypeErrors
+
+if ($AddTypeErrors.Count -eq 0) { 
+    [System.IO.Compression.ZipFile]::ExtractToDirectory($DotnetLocalPath, $DotnetPath) 
+}
+else { 
+    (New-Object -com shell.application).namespace($DotnetPath).CopyHere((new-object -com shell.application).namespace($DotnetLocalPath).Items(), 16)
+}
\ No newline at end of file
index 9e41480..8efc2f4 100644 (file)
@@ -4,6 +4,8 @@ setlocal
 set INIT_TOOLS_LOG=%~dp0init-tools.log
 set PACKAGES_DIR=%~dp0packages\
 set TOOLRUNTIME_DIR=%~dp0Tools
+:: This is an isolated script that handles the download of dotnet binaries and shall be removed after bootstrap.ps1/sh refactor (dotnet/corefx#15427)
+set DOTNET_DOWNLOAD_PATH=%~dp0dotnet-download.ps1
 set DOTNET_PATH=%TOOLRUNTIME_DIR%\dotnetcli\
 set DOTNET_CMD=%DOTNET_PATH%dotnet.exe
 if [%BUILDTOOLS_SOURCE%]==[] set BUILDTOOLS_SOURCE=https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json
@@ -48,7 +50,7 @@ if [%PROCESSOR_ARCHITECTURE%]==[x86] (set DOTNET_ZIP_NAME=dotnet-dev-win-x86.%DO
 set DOTNET_REMOTE_PATH=https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/%DOTNET_VERSION%/%DOTNET_ZIP_NAME%
 set DOTNET_LOCAL_PATH=%DOTNET_PATH%%DOTNET_ZIP_NAME%
 echo Installing '%DOTNET_REMOTE_PATH%' to '%DOTNET_LOCAL_PATH%' >> "%INIT_TOOLS_LOG%"
-powershell -NoProfile -ExecutionPolicy unrestricted -Command "$retryCount = 0; $success = $false; do { try { (New-Object Net.WebClient).DownloadFile('%DOTNET_REMOTE_PATH%', '%DOTNET_LOCAL_PATH%'); $success = $true; } catch { if ($retryCount -ge 6) { throw; } else { $retryCount++; Start-Sleep -Seconds (5 * $retryCount); } } } while ($success -eq $false); Add-Type -Assembly 'System.IO.Compression.FileSystem' -ErrorVariable AddTypeErrors; if ($AddTypeErrors.Count -eq 0) { [System.IO.Compression.ZipFile]::ExtractToDirectory('%DOTNET_LOCAL_PATH%', '%DOTNET_PATH%') } else { (New-Object -com shell.application).namespace('%DOTNET_PATH%').CopyHere((new-object -com shell.application).namespace('%DOTNET_LOCAL_PATH%').Items(),16) }" >> "%INIT_TOOLS_LOG%"
+powershell -NoProfile -ExecutionPolicy unrestricted -File %DOTNET_DOWNLOAD_PATH% -DotnetRemotePath %DOTNET_REMOTE_PATH% -DotnetLocalPath %DOTNET_LOCAL_PATH% -DotnetPath %DOTNET_PATH% >> "%INIT_TOOLS_LOG%"
 if NOT exist "%DOTNET_LOCAL_PATH%" (
   echo ERROR: Could not install dotnet cli correctly. See '%INIT_TOOLS_LOG%' for more details.
   set TOOLS_INIT_RETURN_CODE=1
index c67ce6a..d82e2d6 100755 (executable)
@@ -20,7 +20,6 @@ def static getOSGroup(def os) {
         'Ubuntu16.04': 'Linux',
         'Ubuntu16.10': 'Linux',
         'Debian8.4':'Linux',
-        'Fedora23':'Linux',
         'OSX10.12':'OSX',
         'Windows_NT':'Windows_NT',
         'FreeBSD':'FreeBSD',
@@ -51,8 +50,7 @@ class Constants {
                'RHEL7.2',
                'Ubuntu16.04',
                'Ubuntu16.10',
-               'Tizen',
-               'Fedora23']
+               'Tizen']
 
     def static crossList = ['Ubuntu', 'OSX10.12', 'CentOS7.1', 'RHEL7.2', 'Debian8.4']
 
@@ -145,10 +143,7 @@ class Constants {
 
 def static setMachineAffinity(def job, def os, def architecture) {
     if (architecture == 'arm64' && os == 'Windows_NT') {
-        // For cross compilation
-        job.with {
-            label('arm64')
-        }
+        Utilities.setMachineAffinity(job, os, 'latest-arm64');
     } else if (architecture == 'arm64' && os == 'Ubuntu') {
         Utilities.setMachineAffinity(job, os, 'arm-cross-latest');
     } else if ((architecture == 'arm') && (os == 'Ubuntu' || os == 'Ubuntu16.04' || os == 'Tizen')) {
@@ -685,7 +680,6 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os,
                     // Distinguish with the other architectures (arm and x86)
                     Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build", "(?i).*test\\W+${os}\\W+${architecture}.*")
                     break
-                case 'Fedora23':
                 case 'Ubuntu16.10':
                 case 'OpenSUSE42.1':
                     assert !isFlowJob
@@ -1681,7 +1675,6 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR
         case 'RHEL7.2':
         case 'OpenSUSE42.1':
         case 'Tizen':
-        case 'Fedora23': // editor brace matching: {
             switch (architecture) {
                 case 'x64':
                 case 'x86':
index dff136b..9c4dad0 100644 (file)
@@ -12,7 +12,6 @@ def static getOSGroup(def os) {
         'RHEL7.2': 'Linux',
         'Ubuntu16.04': 'Linux',
         'Debian8.4':'Linux',
-        'Fedora23':'Linux',
         'OSX':'OSX',
         'Windows_NT':'Windows_NT',
         'FreeBSD':'FreeBSD',
index 9c46df9..436901e 100644 (file)
@@ -20,6 +20,7 @@
     <NativeBinary Include="$(BinDir)mscorrc.dll" />
     <NativeBinary Include="$(BinDir)sos.dll" />
     <NativeBinary Include="$(BinDir)System.Private.CoreLib.ni.dll" />
+    <NativeBinary Include="$(UniversalCRTSDKDir)Redist\ucrt\DLLs\$(BuildArch)\*.dll" Condition="'$(BuildType)'=='Release' AND '$(BuildArch)' != 'arm64'" />
     <ArchitectureSpecificLibFile Include="$(BinDir)System.Private.CoreLib.dll" />
     <ArchitectureSpecificLibFile Include="$(BinDir)SOS.NETCore.dll" />
     <ArchitectureSpecificToolFile Include="$(BinDir)crossgen.exe" />
index 6f7bae6..49e550a 100644 (file)
@@ -1,6 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 
+
+  <Target Name="VerifyVCRedist" BeforeTargets="GetSymbolPackageFiles" Condition="'$(_runtimeOSFamily)' == 'win'">
+    <Error Condition="'$(UniversalCRTSDKDir)' == ''" Text="Unable to find VC Redist binaries - check that UniversalCRTSDKDir environment variable is set" />
+  </Target>
   <!--
     Finds symbol files and injects them into the package build.
   -->
index 2767d1e..c36d2e1 100644 (file)
@@ -609,8 +609,6 @@ FCIMPL2(VOID, SystemNative::FailFastWithException, StringObject* refMessageUNSAF
 }
 FCIMPLEND
 
-
-
 FCIMPL0(FC_BOOL_RET, SystemNative::IsServerGC)
 {
     FCALL_CONTRACT;
@@ -636,95 +634,6 @@ BOOL QCALLTYPE SystemNative::WinRTSupported()
 
 #endif // FEATURE_COMINTEROP
 
-// Helper method to retrieve OS Version based on the environment.
-BOOL GetOSVersionForEnvironment(LPOSVERSIONINFO lpVersionInformation)
-{
-#ifdef FEATURE_WINDOWSPHONE
-    // Return phone version information if it is available
-    if (!g_fGetPhoneVersionInitialized)
-    {
-        HMODULE hPhoneInfo = WszLoadLibrary(W("phoneinfo.dll"));
-        if(hPhoneInfo != NULL)
-            g_pfnGetPhoneVersion = (pfnGetPhoneVersion)GetProcAddress(hPhoneInfo, "GetPhoneVersion");
-
-        g_fGetPhoneVersionInitialized = true;
-    }
-
-    if (g_pfnGetPhoneVersion!= NULL)
-        return g_pfnGetPhoneVersion(lpVersionInformation);
-#endif // FEATURE_WINDOWSPHONE
-
-    return ::GetOSVersion(lpVersionInformation);
-}
-
-
-/*
- * SystemNative::GetOSVersion - Fcall corresponding to System.Environment.GetVersion
- * It calls clr!GetOSVersion to get the real OS version even when running in 
- * app compat. Calling kernel32!GetVersionEx() directly will be shimmed and will return the
- * fake OS version. In order to avoid this the call to getVersionEx is made via mscoree.dll.
- * Mscoree.dll resides in system32 dir and is never lied about OS version.
- */
-
-FCIMPL1(FC_BOOL_RET, SystemNative::GetOSVersion, OSVERSIONINFOObject *osVer)
-{
-    FCALL_CONTRACT;
-
-    OSVERSIONINFO ver;    
-    ver.dwOSVersionInfoSize = osVer->dwOSVersionInfoSize;
-
-    BOOL ret = GetOSVersionForEnvironment(&ver);
-
-    if(ret)
-    {
-        osVer->dwMajorVersion  = ver.dwMajorVersion;
-        osVer->dwMinorVersion = ver.dwMinorVersion;
-        osVer->dwBuildNumber  = ver.dwBuildNumber;
-        osVer->dwPlatformId = ver.dwPlatformId;
-
-        HELPER_METHOD_FRAME_BEGIN_RET_1(osVer);
-        SetObjectReference((OBJECTREF*)&(osVer->szCSDVersion), StringObject::NewString(ver.szCSDVersion), GetAppDomain());
-        HELPER_METHOD_FRAME_END();
-    }
-
-    FC_RETURN_BOOL(ret);
-}
-FCIMPLEND
-
-/*
- * SystemNative::GetOSVersionEx - Fcall implementation for System.Environment.GetVersionEx
- * Similar as above except this takes OSVERSIONINFOEX structure as input
- */
-
-FCIMPL1(FC_BOOL_RET, SystemNative::GetOSVersionEx, OSVERSIONINFOEXObject *osVer)
-{
-    FCALL_CONTRACT;
-
-    OSVERSIONINFOEX ver;
-    ver.dwOSVersionInfoSize = osVer->dwOSVersionInfoSize;
-
-    BOOL ret = GetOSVersionForEnvironment((OSVERSIONINFO *)&ver);
-
-    if(ret)
-    {
-        osVer->dwMajorVersion  = ver.dwMajorVersion;
-        osVer->dwMinorVersion = ver.dwMinorVersion;
-        osVer->dwBuildNumber  = ver.dwBuildNumber;
-        osVer->dwPlatformId = ver.dwPlatformId;
-        osVer->wServicePackMajor = ver.wServicePackMajor;
-        osVer->wServicePackMinor = ver.wServicePackMinor;
-        osVer->wSuiteMask = ver.wSuiteMask;
-        osVer->wProductType = ver.wProductType;
-        osVer->wReserved = ver.wReserved;
-
-        HELPER_METHOD_FRAME_BEGIN_RET_1(osVer);
-        SetObjectReference((OBJECTREF*)&(osVer->szCSDVersion), StringObject::NewString(ver.szCSDVersion), GetAppDomain());
-        HELPER_METHOD_FRAME_END();
-    }
-
-    FC_RETURN_BOOL(ret);
-}
-FCIMPLEND
 
 
 
index 1da1058..986c55b 100644 (file)
@@ -74,9 +74,6 @@ public:
     static FCDECL0(INT64, __GetSystemTimeAsFileTime);
     static FCDECL0(UINT32, GetCurrentProcessorNumber);
     static FCDECL0(UINT32, GetTickCount);
-    static FCDECL1(FC_BOOL_RET, GetOSVersion, OSVERSIONINFOObject *osVer);
-    static FCDECL1(FC_BOOL_RET, GetOSVersionEx, OSVERSIONINFOEXObject *osVer);
-
 
     static
     void QCALLTYPE Exit(INT32 exitcode);
index 74ba14f..605d5c7 100644 (file)
@@ -5718,9 +5718,9 @@ BOOL DacDbiInterfaceImpl::IsVmObjectHandleValid(VMPTR_OBJECTHANDLE vmHandle)
     // SEH exceptions will be caught
     EX_TRY
     {
-        OBJECTREF objRef = ObjectFromHandle((OBJECTHANDLE)vmHandle.GetDacPtr());
+        OBJECTREF objRef = HndFetchHandle((OBJECTHANDLE)vmHandle.GetDacPtr());
 
-        // NULL is certinally valid...
+        // NULL is certainly valid...
         if (objRef != NULL)
         {
             if (objRef->ValidateObjectWithPossibleAV())
index 0dc7a42..027fe59 100644 (file)
@@ -317,12 +317,10 @@ HRESULT ClrDataAccess::EnumMemCLRStatic(IN CLRDataEnumMemoryFlags flags)
     CATCH_ALL_EXCEPT_RETHROW_COR_E_OPERATIONCANCELLED( g_pFinalizerThread.EnumMem(); )
     CATCH_ALL_EXCEPT_RETHROW_COR_E_OPERATIONCANCELLED( g_pSuspensionThread.EnumMem(); )
     
-#ifdef FEATURE_SVR_GC
     CATCH_ALL_EXCEPT_RETHROW_COR_E_OPERATIONCANCELLED
     (
-        IGCHeap::gcHeapType.EnumMem();
+        g_heap_type.EnumMem();
     );
-#endif // FEATURE_SVR_GC
 
     m_dumpStats.m_cbClrStatics = m_cbMemoryReported - cbMemoryReported;
 
index c30501f..78ac831 100644 (file)
@@ -2929,31 +2929,33 @@ ClrDataAccess::GetGCHeapData(struct DacpGcHeapData *gcheapData)
 
     SOSDacEnter();
 
-    // for server GC-capable builds only, we need to check and see if IGCHeap::gcHeapType
+    // we need to check and see if g_heap_type
     // is GC_HEAP_INVALID, in which case we fail.
-    // IGCHeap::gcHeapType doesn't exist on non-server-GC capable builds.
-#ifdef FEATURE_SVR_GC
-    ULONG32 gcHeapValue = *g_gcDacGlobals->gc_heap_type;
+    ULONG32 gcHeapValue = g_heap_type;
 
     // GC_HEAP_TYPE has three possible values:
     //       GC_HEAP_INVALID = 0,
     //       GC_HEAP_WKS     = 1,
     //       GC_HEAP_SVR     = 2
     // If we get something other than that, we probably read the wrong location.
-    _ASSERTE(gcHeapValue >= IGCHeap::GC_HEAP_INVALID && gcHeapValue <= IGCHeap::GC_HEAP_SVR);
+    _ASSERTE(gcHeapValue >= GC_HEAP_INVALID && gcHeapValue <= GC_HEAP_SVR);
 
-    // we have GC_HEAP_INVALID if gcHeapValue == 0, so we're done
-    if (gcHeapValue == IGCHeap::GC_HEAP_INVALID)
+    // we have GC_HEAP_INVALID if gcHeapValue == 0, so we're done - we haven't
+    // initialized the heap yet.
+    if (gcHeapValue == GC_HEAP_INVALID)
     {
         hr = E_FAIL;
         goto cleanup;
     }
-#endif
 
     // Now we can get other important information about the heap
+    // We can use GCHeapUtilities::IsServerHeap here because we have already validated
+    // that the heap is in a valid state. We couldn't use it above, because IsServerHeap
+    // asserts if the heap type is GC_HEAP_INVALID.
     gcheapData->g_max_generation = *g_gcDacGlobals->max_gen;
-    gcheapData->bServerMode = gcHeapValue == IGCHeap::GC_HEAP_SVR;
+    gcheapData->bServerMode = GCHeapUtilities::IsServerHeap();
     gcheapData->bGcStructuresValid = *g_gcDacGlobals->gc_structures_invalid_cnt == 0;
+
     if (GCHeapUtilities::IsServerHeap())
     {
 #if !defined (FEATURE_SVR_GC)
@@ -2968,10 +2970,8 @@ ClrDataAccess::GetGCHeapData(struct DacpGcHeapData *gcheapData)
         gcheapData->HeapCount = 1;
     }
 
-#ifdef FEATURE_SVR_GC
 cleanup:
     ;
-#endif
 
     SOSDacLeave();
     return hr;
@@ -3069,7 +3069,7 @@ ClrDataAccess::GetGCInterestingInfoStaticData(struct DacpGCInterestingInfoData *
     SOSDacEnter();
     memset(data, 0, sizeof(DacpGCInterestingInfoData));
 
-    if (*g_gcDacGlobals->gc_heap_type != IGCHeap::GC_HEAP_SVR)
+    if (g_heap_type != GC_HEAP_SVR)
     {
         for (int i = 0; i < NUM_GC_DATA_POINTS; i++)
             data->interestingDataPoints[i] = g_gcDacGlobals->interesting_data_per_heap[i];
@@ -3890,7 +3890,7 @@ HRESULT ClrDataAccess::GetClrWatsonBucketsWorker(Thread * pThread, GenericModeBl
     if (ohThrowable != NULL)
     {
         // Get the object from handle and check if the throwable is preallocated or not
-        OBJECTREF oThrowable = ObjectFromHandle(ohThrowable);
+        OBJECTREF oThrowable = ::HndFetchHandle(ohThrowable);
         if (oThrowable != NULL)
         {
             // Does the throwable have buckets?
@@ -4184,7 +4184,7 @@ HRESULT ClrDataAccess::GetCCWData(CLRDATA_ADDRESS ccw, struct DacpCCWData *ccwDa
     ccwData->isAggregated = pCCW->GetSimpleWrapper()->IsAggregated();
 
     if (pCCW->GetObjectHandle() != NULL)
-        ccwData->managedObject = PTR_CDADDR(ObjectFromHandle(pCCW->GetObjectHandle()));
+        ccwData->managedObject = PTR_CDADDR(::HndFetchHandle(pCCW->GetObjectHandle()));
 
     // count the number of COM vtables
     ccwData->interfaceCount = 0;
index 930a35b..6a1de35 100644 (file)
@@ -240,7 +240,7 @@ ClrDataAccess::EnumSvrGlobalMemoryRegions(CLRDataEnumMemoryFlags flags)
 
 DWORD DacGetNumHeaps()
 {
-    if (g_gcDacGlobals->gc_heap_type == IGCHeap::GC_HEAP_SVR)
+    if (g_heap_type == GC_HEAP_SVR)
         return (DWORD)*g_gcDacGlobals->n_heaps;
 
     // workstation gc
index 4c32641..b6d49c2 100644 (file)
@@ -4525,10 +4525,6 @@ void CordbProcess::QueueFakeConnectionEvents()
 // from the runtime controller. This represents the last amount of processing
 // the DI gets to do on an event before giving it to the user.
 //
-#ifdef _PREFAST_
-#pragma warning(push)
-#pragma warning(disable:21000) // Suppress PREFast warning about overly large function
-#endif
 void CordbProcess::DispatchRCEvent()
 {
     INTERNAL_API_ENTRY(this);
@@ -4729,6 +4725,10 @@ void CordbProcess::DbgAssertAppDomainDeleted(VMPTR_AppDomain vmAppDomainDeleted)
 //    A V2 shim can provide a proxy calllack that takes these events and queues them and 
 //    does the real dispatch to the user to emulate V2 semantics.
 //
+#ifdef _PREFAST_
+#pragma warning(push)
+#pragma warning(disable:21000) // Suppress PREFast warning about overly large function
+#endif
 void CordbProcess::RawDispatchEvent(
     DebuggerIPCEvent *          pEvent, 
     RSLockHolder *              pLockHolder,
index 689b1cc..8c4dfcc 100644 (file)
@@ -70,6 +70,7 @@ public:
     static void EnableFinalization(bool foundFinalizers);
 
     static void HandleFatalError(unsigned int exitCode);
+    static bool ShouldFinalizeObjectForUnload(AppDomain* pDomain, Object* obj);
 };
 
 #endif // __GCENV_EE_H__
index 65c6742..ab8e56b 100644 (file)
@@ -34207,11 +34207,11 @@ bool GCHeap::StressHeap(gc_alloc_context * context)
         StringObject* str;
 
         // If the current string is used up
-        if (ObjectFromHandle(m_StressObjs[m_CurStressObj]) == 0)
+        if (HndFetchHandle(m_StressObjs[m_CurStressObj]) == 0)
         {
             // Populate handles with strings
             int i = m_CurStressObj;
-            while(ObjectFromHandle(m_StressObjs[i]) == 0)
+            while(HndFetchHandle(m_StressObjs[i]) == 0)
             {
                 _ASSERTE(m_StressObjs[i] != 0);
                 unsigned strLen = (LARGE_OBJECT_SIZE - 32) / sizeof(WCHAR);
@@ -34243,7 +34243,7 @@ bool GCHeap::StressHeap(gc_alloc_context * context)
         }
 
         // Get the current string
-        str = (StringObject*) OBJECTREFToObject(ObjectFromHandle(m_StressObjs[m_CurStressObj]));
+        str = (StringObject*) OBJECTREFToObject(HndFetchHandle(m_StressObjs[m_CurStressObj]));
         if (str)
         {
             // Chop off the end of the string and form a new object out of it.
@@ -36102,43 +36102,15 @@ CFinalize::FinalizeSegForAppDomain (AppDomain *pDomain,
         // if it has the index we are looking for. If the methodtable is null, it can't be from the
         // unloading domain, so skip it.
         if (method_table(obj) == NULL)
+        {
             continue;
+        }
 
-        // eagerly finalize all objects except those that may be agile.
-        if (obj->GetAppDomainIndex() != pDomain->GetIndex())
+        // does the EE actually want us to finalize this object?
+        if (!GCToEEInterface::ShouldFinalizeObjectForUnload(pDomain, obj))
+        {
             continue;
-
-#ifndef FEATURE_REDHAWK
-        if (method_table(obj)->IsAgileAndFinalizable())
-        {
-            // If an object is both agile & finalizable, we leave it in the
-            // finalization queue during unload.  This is OK, since it's agile.
-            // Right now only threads can be this way, so if that ever changes, change
-            // the assert to just continue if not a thread.
-            _ASSERTE(method_table(obj) == g_pThreadClass);
-
-            if (method_table(obj) == g_pThreadClass)
-            {
-                // However, an unstarted thread should be finalized. It could be holding a delegate
-                // in the domain we want to unload. Once the thread has been started, its
-                // delegate is cleared so only unstarted threads are a problem.
-                Thread *pThread = ((THREADBASEREF)ObjectToOBJECTREF(obj))->GetInternal();
-                if (! pThread || ! pThread->IsUnstarted())
-                {
-                    // This appdomain is going to be gone soon so let us assign
-                    // it the appdomain that's guaranteed to exist
-                    // The object is agile and the delegate should be null so we can do it
-                    obj->GetHeader()->ResetAppDomainIndexNoFailure(SystemDomain::System()->DefaultDomain()->GetIndex());
-                    continue;
-                }
-            }
-            else
-            {
-                obj->GetHeader()->ResetAppDomainIndexNoFailure(SystemDomain::System()->DefaultDomain()->GetIndex());
-                continue;
-            }
         }
-#endif //!FEATURE_REDHAWK
 
         if (!fRunFinalizers || (obj->GetHeader()->GetBits()) & BIT_SBLK_FINALIZER_RUN)
         {
@@ -36946,10 +36918,7 @@ void PopulateDacVars(GcDacVars *gcDacVars)
     gcDacVars->build_variant = &g_build_variant;
     gcDacVars->gc_structures_invalid_cnt = const_cast<int32_t*>(&GCScan::m_GcStructuresInvalidCnt);
     gcDacVars->generation_size = sizeof(generation);
-#ifdef FEATURE_SVR_GC
-    gcDacVars->gc_heap_type = &IGCHeap::gcHeapType;
-#endif // FEATURE_SVR_GC
-    gcDacVars->max_gen = &IGCHeap::maxGeneration;
+    gcDacVars->max_gen = &g_max_generation;
 #ifndef MULTIPLE_HEAPS
     gcDacVars->mark_array = &gc_heap::mark_array;
     gcDacVars->ephemeral_heap_segment = reinterpret_cast<dac_heap_segment**>(&gc_heap::ephemeral_heap_segment);
index ecb791f..821b21d 100644 (file)
@@ -87,6 +87,7 @@ class IGCHeapInternal;
 
 /* misc defines */
 #define LARGE_OBJECT_SIZE ((size_t)(85000))
+#define max_generation 2
 
 #ifdef GC_CONFIG_DRIVEN
 #define MAX_GLOBAL_GC_MECHANISMS_COUNT 6
@@ -110,6 +111,8 @@ extern "C" uint32_t* g_gc_card_bundle_table;
 extern "C" uint32_t* g_gc_card_table;
 extern "C" uint8_t* g_gc_lowest_address;
 extern "C" uint8_t* g_gc_highest_address;
+extern "C" GCHeapType g_gc_heap_type;
+extern "C" uint32_t g_max_generation;
 
 ::IGCHandleTable*  CreateGCHandleTable();
 
@@ -219,7 +222,7 @@ public:
 
     unsigned GetMaxGeneration()
     {
-        return IGCHeap::maxGeneration;
+        return max_generation;
     }
 
     bool IsValidSegmentSize(size_t cbSize)
@@ -235,8 +238,6 @@ public:
 
     BOOL IsLargeObject(MethodTable *mt)
     {
-        WRAPPER_NO_CONTRACT;
-
         return mt->GetBaseSize() >= LARGE_OBJECT_SIZE;
     }
 
@@ -270,18 +271,15 @@ extern IGCHandleTable* g_theGCHandleTable;
 #ifndef DACCESS_COMPILE
 inline bool IsGCInProgress(bool bConsiderGCStart = false)
 {
-    WRAPPER_NO_CONTRACT;
-
     return g_theGCHeap != nullptr ? g_theGCHeap->IsGCInProgressHelper(bConsiderGCStart) : false;
 }
 #endif // DACCESS_COMPILE
 
 inline bool IsServerHeap()
 {
-    LIMITED_METHOD_CONTRACT;
 #ifdef FEATURE_SVR_GC
-    _ASSERTE(IGCHeap::gcHeapType != IGCHeap::GC_HEAP_INVALID);
-    return (IGCHeap::gcHeapType == IGCHeap::GC_HEAP_SVR);
+    assert(g_gc_heap_type != GC_HEAP_INVALID);
+    return g_gc_heap_type == GC_HEAP_SVR;
 #else // FEATURE_SVR_GC
     return false;
 #endif // FEATURE_SVR_GC
index 8f6d1ac..1cd3c82 100644 (file)
 #include "gcenv.h"
 #include "gc.h"
 
-#ifdef FEATURE_SVR_GC
-SVAL_IMPL_INIT(uint32_t,IGCHeap,gcHeapType,IGCHeap::GC_HEAP_INVALID);
-#endif // FEATURE_SVR_GC
-
-SVAL_IMPL_INIT(uint32_t,IGCHeap,maxGeneration,2);
-
 IGCHeapInternal* g_theGCHeap;
 IGCHandleTable* g_theGCHandleTable;
 
@@ -47,6 +41,8 @@ uint32_t* g_gc_card_bundle_table;
 
 uint8_t* g_gc_lowest_address  = 0;
 uint8_t* g_gc_highest_address = 0;
+GCHeapType g_gc_heap_type = GC_HEAP_INVALID;
+uint32_t g_max_generation = max_generation;
 
 #ifdef GC_CONFIG_DRIVEN
 void record_global_mechanism (int mech_index)
@@ -122,9 +118,9 @@ void InitializeHeapType(bool bServerHeap)
 {
     LIMITED_METHOD_CONTRACT;
 #ifdef FEATURE_SVR_GC
-    IGCHeap::gcHeapType = bServerHeap ? IGCHeap::GC_HEAP_SVR : IGCHeap::GC_HEAP_WKS;
+    g_gc_heap_type = bServerHeap ? GC_HEAP_SVR : GC_HEAP_WKS;
 #ifdef WRITE_BARRIER_CHECK
-    if (IGCHeap::gcHeapType == IGCHeap::GC_HEAP_SVR)
+    if (g_gc_heap_type == GC_HEAP_SVR)
     {
         g_GCShadow = 0;
         g_GCShadowEnd = 0;
@@ -163,9 +159,9 @@ bool InitializeGarbageCollector(IGCToCLR* clrToGC, IGCHeap** gcHeap, IGCHandleTa
     }
 
 #ifdef FEATURE_SVR_GC
-    assert(IGCHeap::gcHeapType != IGCHeap::GC_HEAP_INVALID);
+    assert(g_gc_heap_type != GC_HEAP_INVALID);
 
-    if (IGCHeap::gcHeapType == IGCHeap::GC_HEAP_SVR)
+    if (g_gc_heap_type == GC_HEAP_SVR)
     {
         heap = SVR::CreateGCHeap();
         SVR::PopulateDacVars(gcDacVars);
index c391ef8..328acef 100644 (file)
@@ -213,6 +213,12 @@ ALWAYS_INLINE void GCToEEInterface::HandleFatalError(unsigned int exitCode)
     g_theGCToCLR->HandleFatalError(exitCode);
 }
 
+ALWAYS_INLINE bool GCToEEInterface::ShouldFinalizeObjectForUnload(AppDomain* pDomain, Object* obj)
+{
+    assert(g_theGCToCLR != nullptr);
+    return g_theGCToCLR->ShouldFinalizeObjectForUnload(pDomain, obj);
+}
+
 #undef ALWAYS_INLINE
 
 #endif // __GCTOENV_EE_STANDALONE_INL__
index a4c3352..f468bd3 100644 (file)
@@ -22,3 +22,13 @@ void GCHandleTable::Shutdown()
 {
     Ref_Shutdown();
 }
+
+void* GCHandleTable::GetHandleTableContext(void* handleTable)
+{
+    return (void*)((uintptr_t)::HndGetHandleTableADIndex((HHANDLETABLE)handleTable).m_dwIndex);
+}
+
+void* GCHandleTable::GetHandleTableForHandle(OBJECTHANDLE handle)
+{
+    return (void*)::HndGetHandleTable(handle);
+}
index 233e326..11fa163 100644 (file)
@@ -13,6 +13,10 @@ public:
     virtual bool Initialize();
 
     virtual void Shutdown();
+
+    virtual void* GetHandleTableContext(void* handleTable);
+
+    virtual void* GetHandleTableForHandle(OBJECTHANDLE handle);
 };
 
 #endif  // GCHANDLETABLE_H_
index 84c8ffb..647101f 100644 (file)
 #define MAX_GLOBAL_GC_MECHANISMS_COUNT 6
 #define NUMBERGENERATIONS              4
 
-// TODO(segilles) - Implement this scheme for Server GC
-namespace SVR {
-    class heap_segment;
-    class gc_heap;
-}
-
 // Analogue for the GC heap_segment class, containing information regarding a single
 // heap segment.
 class dac_heap_segment {
index f9c2078..b788079 100644 (file)
@@ -38,7 +38,6 @@ GC_DAC_VAR        (uint8_t,               build_variant)
 GC_DAC_VAR        (bool,                  built_with_svr)
 GC_DAC_ARRAY_VAR  (size_t,                gc_global_mechanisms)
 GC_DAC_ARRAY_VAR  (dac_generation,        generation_table)
-GC_DAC_VAR        (uint32_t,              gc_heap_type)
 GC_DAC_VAR        (uint32_t,              max_gen)
 GC_DAC_PTR_VAR    (uint32_t,              mark_array)
 GC_DAC_VAR        (c_gc_state,            current_c_gc_state)
index da74665..5c595b4 100644 (file)
@@ -137,6 +137,11 @@ public:
     // Signals to the EE that the GC encountered a fatal error and can't recover.
     virtual
     void HandleFatalError(unsigned int exitCode) = 0;
+
+    // Asks the EE if it wants a particular object to be finalized when unloading
+    // an app domain.
+    virtual
+    bool ShouldFinalizeObjectForUnload(AppDomain* pDomain, Object* obj) = 0;
 };
 
 #endif // _GCINTERFACE_EE_H_
index 77425b1..66d8b31 100644 (file)
@@ -149,7 +149,7 @@ struct segment_info
     void * pvMem; // base of the allocation, not the first object (must add ibFirstObject)
     size_t ibFirstObject;   // offset to the base of the first object in the segment
     size_t ibAllocated; // limit of allocated memory in the segment (>= firstobject)
-    size_t ibCommit; // limit of committed memory in the segment (>= alllocated)
+    size_t ibCommit; // limit of committed memory in the segment (>= allocated)
     size_t ibReserved; // limit of reserved memory in the segment (>= commit)
 };
 
@@ -163,8 +163,6 @@ struct segment_info
 // one for the object header, and one for the first field in the object.
 #define min_obj_size ((sizeof(uint8_t*) + sizeof(uintptr_t) + sizeof(size_t)))
 
-#define max_generation 2
-
 // The bit shift used to convert a memory address into an index into the
 // Software Write Watch table.
 #define SOFTWARE_WRITE_WATCH_AddressToTableByteIndexShift 0xc
@@ -379,6 +377,13 @@ typedef enum
     HNDTYPE_WEAK_WINRT   = 9
 } HandleType;
 
+typedef enum
+{
+    GC_HEAP_INVALID = 0,
+    GC_HEAP_WKS     = 1,
+    GC_HEAP_SVR     = 2
+} GCHeapType;
+
 typedef bool (* walk_fn)(Object*, void*);
 typedef void (* gen_walk_fn)(void* context, int generation, uint8_t* range_start, uint8_t* range_end, uint8_t* range_reserved);
 typedef void (* record_surv_fn)(uint8_t* begin, uint8_t* end, ptrdiff_t reloc, void* context, bool compacting_p, bool bgc_p);
@@ -391,6 +396,10 @@ public:
     virtual bool Initialize() = 0;
 
     virtual void Shutdown() = 0;
+
+    virtual void* GetHandleTableContext(void* handleTable) = 0;
+
+    virtual void* GetHandleTableForHandle(OBJECTHANDLE handle) = 0;
 };
 
 // IGCHeap is the interface that the VM will use when interacting with the GC.
@@ -725,19 +734,6 @@ public:
 
     IGCHeap() {}
     virtual ~IGCHeap() {}
-
-    typedef enum
-    {
-        GC_HEAP_INVALID = 0,
-        GC_HEAP_WKS     = 1,
-        GC_HEAP_SVR     = 2
-    } GC_HEAP_TYPE;
-
-#ifdef FEATURE_SVR_GC
-    SVAL_DECL(uint32_t, gcHeapType);
-#endif
-
-    SVAL_DECL(uint32_t, maxGeneration);
 };
 
 #ifdef WRITE_BARRIER_CHECK
index 2e84765..5b0299f 100644 (file)
@@ -177,8 +177,11 @@ BOOL HndFirstAssignHandle(OBJECTHANDLE handle, OBJECTREF objref);
 
 /*
  * inline handle dereferencing
+ *
+ * NOTE: Changes to this implementation should be kept in sync with ObjectFromHandle
+ *       on the VM side.
+ *
  */
-
 FORCEINLINE OBJECTREF HndFetchHandle(OBJECTHANDLE handle)
 {
     WRAPPER_NO_CONTRACT;
index b86572b..386c5d4 100644 (file)
@@ -27,7 +27,6 @@
  * non-NULL.  In other words, if this handle is being initialized for the first
  * time.
  */
-#define ObjectFromHandle(handle)                   HndFetchHandle(handle)
 #define StoreObjectInHandle(handle, object)        HndAssignHandle(handle, object)
 #define InterlockedCompareExchangeObjectInHandle(handle, object, oldObj)        HndInterlockedCompareExchangeHandle(handle, object, oldObj)
 #define StoreFirstObjectInHandle(handle, object)   HndFirstAssignHandle(handle, object)
@@ -119,7 +118,7 @@ inline OBJECTHANDLE CreateDuplicateHandle(OBJECTHANDLE handle) {
     WRAPPER_NO_CONTRACT;
 
     // Create a new STRONG handle in the same table as an existing handle.  
-    return HndCreateHandle(HndGetHandleTable(handle), HNDTYPE_DEFAULT, ObjectFromHandle(handle));
+    return HndCreateHandle(HndGetHandleTable(handle), HNDTYPE_DEFAULT, HndFetchHandle(handle));
 }
 
 
index 5d5371c..45915c0 100644 (file)
@@ -207,24 +207,24 @@ int __cdecl main(int argc, char* argv[])
 
     for (int i = 0; i < 1000000; i++)
     {
-        Object * pBefore = ((My *)ObjectFromHandle(oh))->m_pOther1;
+        Object * pBefore = ((My *)HndFetchHandle(oh))->m_pOther1;
 
         // Allocate more instances of the same object
         Object * p = AllocateObject(pMyMethodTable);
         if (p == NULL)
             return -1;
 
-        Object * pAfter = ((My *)ObjectFromHandle(oh))->m_pOther1;
+        Object * pAfter = ((My *)HndFetchHandle(oh))->m_pOther1;
 
         // Uncomment this assert to see how GC triggered inside AllocateObject moved objects around
         // assert(pBefore == pAfter);
 
         // Store the newly allocated object into a field using WriteBarrier
-        WriteBarrier(&(((My *)ObjectFromHandle(oh))->m_pOther1), p);
+        WriteBarrier(&(((My *)HndFetchHandle(oh))->m_pOther1), p);
     }
 
     // Create weak handle that points to our object
-    OBJECTHANDLE ohWeak = CreateGlobalWeakHandle(ObjectFromHandle(oh));
+    OBJECTHANDLE ohWeak = CreateGlobalWeakHandle(HndFetchHandle(oh));
     if (ohWeak == NULL)
         return -1;
 
@@ -235,7 +235,7 @@ int __cdecl main(int argc, char* argv[])
     pGCHeap->GarbageCollect();
 
     // Verify that the weak handle got cleared by the GC
-    assert(ObjectFromHandle(ohWeak) == NULL);
+    assert(HndFetchHandle(ohWeak) == NULL);
 
     printf("Done\n");
 
index 07be244..aaca51e 100644 (file)
@@ -270,6 +270,11 @@ void GCToEEInterface::HandleFatalError(unsigned int exitCode)
     abort();
 }
 
+bool GCToEEInterface::ShouldFinalizeObjectForUnload(AppDomain* pDomain, Object* obj)
+{
+    return true;
+}
+
 bool IsGCSpecialThread()
 {
     // TODO: Implement for background GC
index ba00984..5aa7782 100644 (file)
@@ -178,6 +178,7 @@ enum MethodProfilingDataFlags
     WriteMethodPrecode            = 12, // 0x01000
     ExcludeHotMethodCode          = 13, // 0x02000  // Hot method should be excluded from the ReadyToRun image
     ExcludeColdMethodCode         = 14, // 0x04000  // Cold method should be excluded from the ReadyToRun image
+    DisableInlining               = 15, // 0x08000  // Disable inlining of this method in optimized AOT native code
 };
 
 enum GeneralProfilingDataFlags
index c194def..4b75742 100644 (file)
@@ -751,6 +751,7 @@ typedef enum CorAssemblyFlags
 
     afEnableJITcompileTracking   =  0x8000, // From "DebuggableAttribute".
     afDisableJITcompileOptimizer =  0x4000, // From "DebuggableAttribute".
+    afDebuggableAttributeMask    =  0xc000,
 
     afRetargetable          =   0x0100,     // The assembly can be retargeted (at runtime) to an
                                             //  assembly from a different publisher.
index 00c42ce..f1ff1b6 100644 (file)
@@ -214,11 +214,11 @@ TODO: Talk about initializing strutures before use
 #endif
 
 // Update this one
-SELECTANY const GUID JITEEVersionIdentifier = { /* 61783541-8fc0-44ce-80f7-7789b93a3309 */
-    0x61783541,
-    0x8fc0,
-    0x44ce,
-    { 0x80, 0xf7, 0x77, 0x89, 0xb9, 0x3a, 0x33, 0x09 }
+SELECTANY const GUID JITEEVersionIdentifier = { /* f00b3f49-ddd2-49be-ba43-6e49ffa66959 */
+    0xf00b3f49,
+    0xddd2,
+    0x49be,
+    { 0xba, 0x43, 0x6e, 0x49, 0xff, 0xa6, 0x69, 0x59 }
 };
 
 //////////////////////////////////////////////////////////////////////////////////////////////////////////
index f434fee..e6d067c 100644 (file)
@@ -146,6 +146,8 @@ public:
         CORJIT_FLAG_USE_PINVOKE_HELPERS     = 36, // The JIT should use the PINVOKE_{BEGIN,END} helpers instead of emitting inline transitions
         CORJIT_FLAG_REVERSE_PINVOKE         = 37, // The JIT should insert REVERSE_PINVOKE_{ENTER,EXIT} helpers into method prolog/epilog
         CORJIT_FLAG_DESKTOP_QUIRKS          = 38, // The JIT should generate desktop-quirk-compatible code
+        CORJIT_FLAG_TIER0                   = 39, // This is the initial tier for tiered compilation which should generate code as quickly as possible
+        CORJIT_FLAG_TIER1                   = 40, // This is the final tier (for now) for tiered compilation which should generate high quality code
     };
 
     CORJIT_FLAGS()
index 494ca7c..200c343 100644 (file)
@@ -195,7 +195,7 @@ typedef union _NEON128 {
     struct {
         ULONGLONG Low;
         LONGLONG High;
-    } DUMMYSTRUCTNAME;
+    };
     double D[2];
     float S[4];
     WORD   H[8];
@@ -288,7 +288,7 @@ typedef struct _T_RUNTIME_FUNCTION {
             DWORD CR : 2;
             DWORD FrameSize : 9;
         } PackedUnwindData;
-    } DUMMYUNIONNAME;
+    };
 } T_RUNTIME_FUNCTION, *PT_RUNTIME_FUNCTION;
 
 
index ab3bca2..4b7b7b1 100644 (file)
@@ -121,12 +121,8 @@ DEFINE_DACVAR(ULONG, int, dac__HillClimbingLogSize, ::HillClimbingLogSize)
 DEFINE_DACVAR(ULONG, PTR_Thread, dac__g_pFinalizerThread, ::g_pFinalizerThread)
 DEFINE_DACVAR(ULONG, PTR_Thread, dac__g_pSuspensionThread, ::g_pSuspensionThread)
 
-#ifdef FEATURE_SVR_GC
-DEFINE_DACVAR(ULONG, DWORD, IGCHeap__gcHeapType, IGCHeap::gcHeapType)
-#endif // FEATURE_SVR_GC
-
+DEFINE_DACVAR(ULONG, DWORD, dac__g_heap_type, g_heap_type)
 DEFINE_DACVAR(ULONG, PTR_GcDacVars, dac__g_gcDacGlobals, g_gcDacGlobals)
-DEFINE_DACVAR(ULONG, DWORD, IGCHeap__maxGeneration, IGCHeap::maxGeneration)
 
 DEFINE_DACVAR(ULONG, PTR_SystemDomain, SystemDomain__m_pSystemDomain, SystemDomain::m_pSystemDomain)
 DEFINE_DACVAR(ULONG, ArrayListStatic, SystemDomain__m_appDomainIndexList, SystemDomain::m_appDomainIndexList)
index f773a7c..bd5ad1a 100644 (file)
@@ -154,11 +154,6 @@ public:
 
 class Object;
 #if !defined(FEATURE_PAL)
-/******************************/
-/* CLR ETW supported versions */
-/******************************/
-#define ETW_SUPPORTED_MAJORVER 5    // ETW is supported on win2k and above
-#define ETW_ENABLED_MAJORVER 6      // OS versions >= to this we enable ETW registration by default, since on XP and Windows 2003, registration is too slow.
 
 /***************************************/
 /* Tracing levels supported by CLR ETW */
@@ -201,11 +196,6 @@ struct ProfilingScanContext;
 #include <wmistr.h>
 #include <evntrace.h>
 #include <evntprov.h>
-#if !defined(DONOT_DEFINE_ETW_CALLBACK) && !defined(DACCESS_COMPILE)
-#define GetVersionEx(Version) (GetOSVersion((LPOSVERSIONINFOW)Version))
-#else
-#define GetVersionEx(Version) (WszGetVersionEx((LPOSVERSIONINFOW)Version))
-#endif // !DONOT_DEFINE_ETW_CALLBACK && !DACCESS_COMPILE
 #endif //!FEATURE_REDHAWK
 #endif //!defined(FEATURE_PAL)
 
diff --git a/src/inc/legacyactivationshim.h b/src/inc/legacyactivationshim.h
deleted file mode 100644 (file)
index 4d8eaa5..0000000
+++ /dev/null
@@ -1,1382 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-//
-// LegacyActivationShim.h
-//
-// This file allows simple migration from .NET Runtime v2 Host Activation APIs
-// to the .NET Runtime v4 Host Activation APIs through simple shim functions.
-
-#ifndef __LEGACYACTIVATIONSHIM_H__
-#define __LEGACYACTIVATIONSHIM_H__
-
-#pragma warning(push)
-#pragma warning(disable:4127) // warning C4127: conditional expression is constant
-                              // caused by IfHrFailRet's while(0) code.
-#pragma warning(disable:4917) // a GUID can only be associated with a class, interface or namespace 
-#pragma warning(disable:4191) // 'reinterpret_cast' : unsafe conversion from 'FARPROC' to 'XXX' 
-
-#ifdef _MANAGED
-// We are compiling Managed C++, switch to native code then (and store current managed/native status on the stack)
-#pragma managed(push, off)
-#endif //_MANAGED
-
-#include "mscoree.h"
-#include "metahost.h"
-
-#include "wchar.h"
-
-#include "corerror.h"
-
-// To minimize how much we perturb sources that we are included in, we make sure that
-// all macros we define/redefine are restored at the end of the header.
-#pragma push_macro("IfHrFailRet")
-#pragma push_macro("IfHrFailRetFALSE")
-#pragma push_macro("IfHrFailRetVOID")
-
-// ---IfHrFailRet------------------------------------------------------------------------------------
-#undef IfHrFailRet
-#undef IfHrFailRetFALSE
-#undef IfHrFailRetVOID
-#define IfHrFailRet(EXPR) do { hr = (EXPR); if(FAILED(hr)) { return (hr); } } while (0)
-#define IfHrFailRetFALSE(EXPR) do { HRESULT _hr_ = (EXPR); if(FAILED(_hr_)) { return false; } } while (0)
-#define IfHrFailRetVOID(EXPR) do { HRESULT _hr_ = (EXPR); if(FAILED(_hr_)) { return; } } while (0)
-
-#include "legacyactivationshimutil.h"
-
-// Use of deprecated APIs within LegacyActivationShim namespace will result in C4996 that we will
-// disable for our own use.
-#pragma warning(push)
-#pragma warning(disable:4996)
-// ---LEGACYACTIVATONSHIM NAMESPACE----------------------------------------------------------------
-namespace LegacyActivationShim
-{
-    // ---HELPERS----------------------------------------------------------------------------------
-#define GET_CLRMETAHOST(x) \
-    ICLRMetaHost *x = NULL; \
-    IfHrFailRet(Util::GetCLRMetaHost(&x))
-
-#define GET_CLRMETAHOSTPOLICY(x) \
-    ICLRMetaHostPolicy*x = NULL; \
-    IfHrFailRet(Util::GetCLRMetaHostPolicy(&x))
-
-#define GET_CLRINFO(x) \
-    ICLRRuntimeInfo *x = NULL; \
-    IfHrFailRet(Util::GetCLRRuntimeInfo(&x))
-
-#define LEGACY_API_PASS_THROUGH_STATIC(_name, _ret_type, _ret_value, _sig, _args)       \
-    {                                                                                   \
-        hr = S_OK;                                                                      \
-        _ret_value = ::_name _args;                                                     \
-    }
-
-#define LEGACY_API_PASS_THROUGH_STATIC_VOIDRET(_name, _sig, _args)                      \
-    {                                                                                   \
-        ::_name _args;                                                                  \
-    }
-
-#define LEGACY_API_PASS_THROUGH_DELAYLOAD(_name, _ret_type, _ret_value, _sig, _args)    \
-    {                                                                                   \
-        typedef _ret_type __stdcall t_FN _sig;                                          \
-        Util::MscoreeFunctor<t_FN> FN;                                                  \
-        if (SUCCEEDED(hr = FN.Init(#_name))) {                                          \
-            _ret_value = FN()_args;                                                     \
-        }                                                                               \
-    }
-
-#define LEGACY_API_PASS_THROUGH_DELAYLOAD_VOIDRET(_name, _sig, _args)                   \
-    {                                                                                   \
-        typedef void __stdcall t_FN _sig;                                               \
-        Util::MscoreeFunctor<t_FN> FN;                                                  \
-        if (SUCCEEDED(FN.Init(#_name))) {                                          \
-            FN()_args;                                                                  \
-        }                                                                               \
-    }
-
-#ifndef LEGACY_ACTIVATION_SHIM_DELAY_LOAD
-#define CALL_LEGACY_API(_name, _sig, _args)                                             \
-    LEGACY_API_PASS_THROUGH_STATIC(_name, HRESULT, hr, _sig, _args)
-#define CALL_LEGACY_API_VOIDRET(_name, _sig, _args)                                     \
-    LEGACY_API_PASS_THROUGH_STATIC_VOIDRET(_name, _sig, _args)
-#else
-#define CALL_LEGACY_API(_name, _sig, _args)                                             \
-    LEGACY_API_PASS_THROUGH_DELAYLOAD(_name, HRESULT, hr, _sig, _args)
-#define CALL_LEGACY_API_VOIDRET(_name, _sig, _args)                                     \
-    LEGACY_API_PASS_THROUGH_DELAYLOAD_VOIDRET(_name, _sig, _args)
-#endif
-
-    // ---LEGACY SHIM FUNCTIONS--------------------------------------------------------------------
-
-    // --------------------------------------------------------------------------------------------
-    inline
-    HRESULT GetCORSystemDirectory(
-        __out_ecount(cchBuffer) LPWSTR pBuffer, 
-        __in  DWORD  cchBuffer, 
-        __out DWORD *pdwLength)
-    {
-        HRESULT hr = S_OK;
-
-        if (Util::HasNewActivationAPIs())
-        {
-            DWORD dwLengthDummy = cchBuffer;
-            if (pdwLength == NULL)
-                pdwLength = &dwLengthDummy;
-            else
-                *pdwLength = cchBuffer;
-
-            GET_CLRINFO(pInfo);
-            IfHrFailRet(pInfo->GetRuntimeDirectory(pBuffer, pdwLength));
-        }
-        else
-        {
-            CALL_LEGACY_API(GetCORSystemDirectory,
-                            (LPWSTR pBuffer, 
-                             DWORD  cchBuffer, 
-                             DWORD *pdwLength),
-                            (pBuffer,
-                             cchBuffer,
-                             pdwLength));
-        }
-
-        return hr;
-    }
-
-    // --------------------------------------------------------------------------------------------
-    inline
-    HRESULT GetCORVersion(
-        __out_ecount(cchBuffer) LPWSTR pbBuffer, 
-        __in  DWORD  cchBuffer, 
-        __out DWORD *pdwLength)
-    {
-        HRESULT hr = S_OK;
-
-        if (Util::HasNewActivationAPIs())
-        {
-            DWORD dwLengthDummy = cchBuffer;
-            if (pdwLength == NULL)
-                pdwLength = &dwLengthDummy;
-            else
-                *pdwLength = cchBuffer;
-
-            GET_CLRINFO(pInfo);
-            IfHrFailRet(pInfo->GetVersionString(pbBuffer, pdwLength));
-        }
-        else
-        {
-            CALL_LEGACY_API(GetCORVersion,
-                            (LPWSTR pbBuffer,
-                             DWORD  cchBuffer,
-                             DWORD *pdwLength),
-                            (pbBuffer,
-                             cchBuffer,
-                             pdwLength));
-                            
-        }
-
-        return hr;
-    }
-
-    // --------------------------------------------------------------------------------------------
-    inline
-    HRESULT GetFileVersion(
-        __in  LPCWSTR szFileName, 
-        __out_ecount(cchBuffer) LPWSTR  szBuffer, 
-        __in  DWORD   cchBuffer, 
-        __out DWORD  *pdwLength)
-    {
-        HRESULT hr = S_OK;
-
-        if (Util::HasNewActivationAPIs())
-        {
-            DWORD dwLengthDummy = cchBuffer;
-            if (pdwLength == NULL)
-                pdwLength = &dwLengthDummy;
-            else
-                *pdwLength = cchBuffer;
-
-            GET_CLRMETAHOST(pMH);
-            IfHrFailRet(pMH->GetVersionFromFile(szFileName, szBuffer, pdwLength));
-        }
-        else
-        {
-            CALL_LEGACY_API(GetFileVersion,
-                            (LPCWSTR szFileName, 
-                             LPWSTR  szBuffer, 
-                             DWORD   cchBuffer, 
-                             DWORD  *pdwLength),
-                            (szFileName,
-                             szBuffer,
-                             cchBuffer,
-                             pdwLength));
-        }
-
-        return hr;
-    }
-
-    // --------------------------------------------------------------------------------------------
-    inline
-    HRESULT GetCORRequiredVersion(
-        __out_ecount(cchBuffer) LPWSTR pBuffer, 
-        __in  DWORD  cchBuffer, 
-        __out DWORD *pdwLength)
-    {
-        HRESULT hr = S_OK;
-
-        if (Util::HasNewActivationAPIs())
-        {
-            DWORD dwLengthDummy = cchBuffer;
-            if (pdwLength == NULL)
-                pdwLength = &dwLengthDummy;
-            else
-                *pdwLength = cchBuffer;
-
-            IfHrFailRet(Util::GetConfigImageVersion(pBuffer, pdwLength));
-        }
-        else
-        {
-            CALL_LEGACY_API(GetCORRequiredVersion,
-                            (LPWSTR pBuffer, 
-                             DWORD  cchBuffer, 
-                             DWORD *pdwLength),
-                            (pBuffer,
-                             cchBuffer,
-                             pdwLength));
-        }
-
-        return hr;
-    }
-
-    // --------------------------------------------------------------------------------------------
-    // This API is the one exception that we don't have fully equivalent functionality for
-    // in the new APIs. Specifically, we do not have the runtimeInfoFlags equivalent that
-    // allows platform differentiation. As such, we just send the call to the legacy API,
-    // which does not bind (thankfully) and so we do not cap this specific API to Whidbey.
-    inline
-    HRESULT GetRequestedRuntimeInfo(
-        __in_opt  LPCWSTR pExe,
-        __in_opt  LPCWSTR pwszVersion,
-        __in_opt  LPCWSTR pConfigurationFile,
-        __in  DWORD startupFlags,
-        __in  DWORD runtimeInfoFlags,
-        __out_ecount(dwDirectory) LPWSTR pDirectory,
-        __in  DWORD dwDirectory,
-        __out DWORD  *pdwDirectoryLength, 
-        __out_ecount(cchBuffer) LPWSTR pVersion,
-        __in  DWORD cchBuffer,
-        __out DWORD  *pdwLength)
-    {
-        HRESULT hr = S_OK;
-
-        CALL_LEGACY_API(GetRequestedRuntimeInfo,
-                        (LPCWSTR  pExe, 
-                         LPCWSTR  pwszVersion, 
-                         LPCWSTR  pConfigurationFile, 
-                         DWORD    startupFlags, 
-                         DWORD    runtimeInfoFlags, 
-                         LPWSTR   pDirectory, 
-                         DWORD    dwDirectory, 
-                         DWORD   *pdwDirectoryLength, 
-                         LPWSTR   pVersion, 
-                         DWORD    cchBuffer, 
-                         DWORD   *pdwLength),
-                        (pExe,
-                         pwszVersion,
-                         pConfigurationFile,
-                         startupFlags,
-                         runtimeInfoFlags,
-                         pDirectory,
-                         dwDirectory,
-                         pdwDirectoryLength, 
-                         pVersion,
-                         cchBuffer,
-                         pdwLength));
-
-        return hr;
-    }
-
-    // --------------------------------------------------------------------------------------------
-    inline
-    HRESULT GetRequestedRuntimeVersion(
-        __in  LPWSTR pExe,
-        __out_ecount(cchBuffer) LPWSTR pVersion,
-        __in  DWORD cchBuffer,
-        __out DWORD *pdwLength)
-    {
-        HRESULT hr = S_OK;
-
-        if (Util::HasNewActivationAPIs())
-        {
-            DWORD dwLengthDummy = cchBuffer;
-            if (pdwLength == NULL)
-                pdwLength = &dwLengthDummy;
-            else
-                *pdwLength = cchBuffer;
-
-            GET_CLRMETAHOSTPOLICY(pMHP);
-            ICLRRuntimeInfo *pInfo = NULL;
-            IfHrFailRet(pMHP->GetRequestedRuntime(
-                METAHOST_POLICY_USE_PROCESS_IMAGE_PATH,
-                pExe,
-                NULL, // config stream
-                pVersion,
-                pdwLength, 
-                NULL, // image version str
-                NULL, // image version len
-                NULL,
-                IID_ICLRRuntimeInfo,
-                reinterpret_cast<LPVOID*>(&pInfo)));// ppRuntime
-            Util::ReleaseHolder<ICLRRuntimeInfo*> hInfo(pInfo);
-        }
-        else
-        {
-            CALL_LEGACY_API(GetRequestedRuntimeVersion,
-                            (LPWSTR pExe,
-                             LPWSTR pVersion,
-                             DWORD cchBuffer,
-                             DWORD *pdwLength),
-                            (pExe,
-                             pVersion,
-                             cchBuffer,
-                             pdwLength));
-        }
-
-        return hr;
-    }
-
-    // --------------------------------------------------------------------------------------------
-    inline
-    HRESULT CorBindToRuntimeHost(
-        LPCWSTR pwszVersion,
-        LPCWSTR pwszBuildFlavor,
-        LPCWSTR pwszHostConfigFile,
-        VOID* pReserved,
-        DWORD startupFlags,
-        REFCLSID rclsid,
-        REFIID riid,
-        LPVOID FAR *ppv)
-    {
-        HRESULT hr = S_OK;
-
-        if (Util::HasNewActivationAPIs())
-        {
-            IStream *pConfigStream = NULL;
-            Util::ReleaseHolder<IStream*> hConfigStream;
-            if (pwszHostConfigFile != NULL)
-            {
-                IfHrFailRet(Util::CreateIStreamFromFile(pwszHostConfigFile, &pConfigStream));
-                hConfigStream.Assign(pConfigStream);
-            }
-
-            WCHAR wszVersionLocal[512];
-            DWORD cchVersionLocal = 512;
-            if (pwszVersion != NULL)
-                wcsncpy_s(&wszVersionLocal[0], cchVersionLocal, pwszVersion, _TRUNCATE);
-
-            ICLRRuntimeInfo *pInfo = NULL;
-            IfHrFailRet(Util::GetCLRRuntimeInfo(
-                &pInfo,
-                NULL,
-                pConfigStream,
-                pwszVersion == NULL ? NULL : &wszVersionLocal[0],
-                pwszVersion == NULL ? NULL : &cchVersionLocal));
-
-            // We're intentionally ignoring the HRESULT return value, since CorBindToRuntimeEx
-            // always ignored these flags when a runtime had already been bound, and we need
-            // to emulate that behavior for when multiple calls to CorBindToRuntimeEx are made
-            // but with different startup flags (ICLRRuntimeInfo::SetDefaultStartupFlags will
-            // return E_INVALIDARG in the case that the runtime has already been started with
-            // different flags).
-            Util::AddStartupFlags(pInfo, pwszBuildFlavor, startupFlags, pwszHostConfigFile);
-
-            IfHrFailRet(pInfo->GetInterface(rclsid, riid, ppv));
-        }
-        else
-        {
-            CALL_LEGACY_API(CorBindToRuntimeHost,
-                            (LPCWSTR pwszVersion,
-                             LPCWSTR pwszBuildFlavor,
-                             LPCWSTR pwszHostConfigFile,
-                             VOID* pReserved,
-                             DWORD startupFlags,
-                             REFCLSID rclsid,
-                             REFIID riid,
-                             LPVOID FAR *ppv),
-                            (pwszVersion,
-                             pwszBuildFlavor,
-                             pwszHostConfigFile,
-                             pReserved,
-                             startupFlags,
-                             rclsid,
-                             riid,
-                             ppv));
-        }
-
-        return hr;
-    }
-
-    // --------------------------------------------------------------------------------------------
-    inline
-    HRESULT CorBindToRuntimeEx(
-        LPCWSTR pwszVersion,
-        LPCWSTR pwszBuildFlavor,
-        DWORD startupFlags,
-        REFCLSID rclsid,
-        REFIID riid,
-        LPVOID* ppv)
-    {
-        HRESULT hr = S_OK;
-
-        if (Util::HasNewActivationAPIs())
-        {
-            WCHAR wszVersionLocal[512];
-            DWORD cchVersionLocal = 512;
-            if (pwszVersion != NULL)
-                wcsncpy_s(&wszVersionLocal[0], cchVersionLocal, pwszVersion, _TRUNCATE);
-
-            ICLRRuntimeInfo *pInfo = NULL;
-            IfHrFailRet(Util::GetCLRRuntimeInfo(
-                &pInfo,
-                NULL, // exe path
-                NULL, // config stream
-                pwszVersion == NULL ? NULL : &wszVersionLocal[0],
-                pwszVersion == NULL ? NULL : &cchVersionLocal));
-
-            // We're intentionally ignoring the HRESULT return value, since CorBindToRuntimeEx
-            // always ignored these flags when a runtime had already been bound, and we need
-            // to emulate that behavior for when multiple calls to CorBindToRuntimeEx are made
-            // but with different startup flags (ICLRRuntimeInfo::SetDefaultStartupFlags will
-            // return E_INVALIDARG in the case that the runtime has already been started with
-            // different flags).
-            Util::AddStartupFlags(pInfo, pwszBuildFlavor, startupFlags, NULL);
-
-            IfHrFailRet(pInfo->GetInterface(rclsid, riid, ppv));
-        }
-        else
-        {
-            CALL_LEGACY_API(CorBindToRuntimeEx,
-                            (LPCWSTR pwszVersion,
-                             LPCWSTR pwszBuildFlavor,
-                             DWORD startupFlags,
-                             REFCLSID rclsid,
-                             REFIID riid,
-                             LPVOID* ppv),
-                            (pwszVersion,
-                             pwszBuildFlavor,
-                             startupFlags,
-                             rclsid,
-                             riid,
-                             ppv));
-        }
-
-        return hr;
-    }
-
-    // --------------------------------------------------------------------------------------------
-    inline
-    HRESULT CorBindToRuntimeByCfg(
-        IStream* pCfgStream,
-        DWORD reserved,
-        DWORD startupFlags,
-        REFCLSID rclsid,
-        REFIID riid,
-        LPVOID* ppv)
-    {
-        HRESULT hr = S_OK;
-
-        if (Util::HasNewActivationAPIs())
-        {
-            // The legacy CorBindToRuntimeByCfg picks up startup flags from both the config stream and
-            // application config file if it is present. For simplicity, we ignore the app config here.
-            ICLRRuntimeInfo *pInfo = NULL;
-            IfHrFailRet(Util::GetCLRRuntimeInfo(
-                &pInfo,
-                NULL, // exe path
-                pCfgStream));
-
-            // We're intentionally ignoring the HRESULT return value, since CorBindToRuntimeEx
-            // always ignored these flags when a runtime had already been bound, and we need
-            // to emulate that behavior for when multiple calls to CorBindToRuntimeEx are made
-            // but with different startup flags (ICLRRuntimeInfo::SetDefaultStartupFlags will
-            // return E_INVALIDARG in the case that the runtime has already been started with
-            // different flags).
-            Util::AddStartupFlags(pInfo, NULL, startupFlags, NULL);
-
-            IfHrFailRet(pInfo->GetInterface(rclsid, riid, ppv));
-        }
-        else
-        {
-            CALL_LEGACY_API(CorBindToRuntimeByCfg,
-                            (IStream* pCfgStream,
-                             DWORD reserved,
-                             DWORD startupFlags,
-                             REFCLSID rclsid,
-                             REFIID riid,
-                             LPVOID* ppv),
-                            (pCfgStream,
-                             reserved,
-                             startupFlags,
-                             rclsid,
-                             riid,
-                             ppv));
-        }
-
-        return hr;
-    }
-
-    // --------------------------------------------------------------------------------------------
-    inline
-    HRESULT CorBindToRuntime(
-        LPCWSTR pwszVersion,
-        LPCWSTR pwszBuildFlavor,
-        REFCLSID rclsid,
-        REFIID riid,
-        LPVOID* ppv)
-    {
-        HRESULT hr = S_OK;
-
-        if (Util::HasNewActivationAPIs())
-        {
-            WCHAR wszVersionLocal[512];
-            DWORD cchVersionLocal = 512;
-            if (pwszVersion != NULL)
-                wcsncpy_s(&wszVersionLocal[0], cchVersionLocal, pwszVersion, _TRUNCATE);
-
-            ICLRRuntimeInfo *pInfo = NULL;
-            IfHrFailRet(Util::GetCLRRuntimeInfo(
-                &pInfo,
-                NULL, // exe path
-                NULL, // config stream
-                pwszVersion == NULL ? NULL : &wszVersionLocal[0],
-                pwszVersion == NULL ? NULL : &cchVersionLocal));
-
-            // CorBindToRuntime has its special default flags
-            //
-            // We're intentionally ignoring the HRESULT return value, since CorBindToRuntimeEx
-            // always ignored these flags when a runtime had already been bound, and we need
-            // to emulate that behavior for when multiple calls to CorBindToRuntimeEx are made
-            // but with different startup flags (ICLRRuntimeInfo::SetDefaultStartupFlags will
-            // return E_INVALIDARG in the case that the runtime has already been started with
-            // different flags).
-            Util::AddStartupFlags(pInfo, NULL, STARTUP_LOADER_OPTIMIZATION_MULTI_DOMAIN_HOST, NULL);
-
-            IfHrFailRet(pInfo->GetInterface(rclsid, riid, ppv));
-        }
-        else
-        {
-            CALL_LEGACY_API(CorBindToRuntime,
-                            (LPCWSTR pwszVersion,
-                             LPCWSTR pwszBuildFlavor,
-                             REFCLSID rclsid,
-                             REFIID riid,
-                             LPVOID* ppv),
-                            (pwszVersion,
-                             pwszBuildFlavor,
-                             rclsid,
-                             riid,
-                             ppv));
-        }
-
-        return hr;
-    }
-
-    // --------------------------------------------------------------------------------------------
-    inline
-    HRESULT CorBindToCurrentRuntime(
-        LPCWSTR pwszFileName,
-        REFCLSID rclsid,
-        REFIID riid,
-        LPVOID FAR *ppv)
-    {
-        HRESULT hr = S_OK;
-
-        if (Util::HasNewActivationAPIs())
-        {
-            ICLRRuntimeInfo *pInfo = NULL;
-            IfHrFailRet(Util::GetCLRRuntimeInfo(
-                &pInfo,
-                pwszFileName));
-
-            IfHrFailRet(pInfo->GetInterface(rclsid, riid, ppv));
-        }
-        else
-        {
-            CALL_LEGACY_API(CorBindToCurrentRuntime,
-                            (LPCWSTR pwszFileName,
-                             REFCLSID rclsid,
-                             REFIID riid,
-                             LPVOID FAR *ppv),
-                            (pwszFileName,
-                             rclsid,
-                             riid,
-                             ppv));
-        }
-
-        return hr;
-    }
-
-    // --------------------------------------------------------------------------------------------
-    inline
-    HRESULT ClrCreateManagedInstance(
-        LPCWSTR pTypeName,
-        REFIID riid,
-        void **ppObject)
-    {
-        HRESULT hr = S_OK;
-
-        if (Util::HasNewActivationAPIs())
-        {
-            GET_CLRINFO(pInfo);
-            HRESULT (STDMETHODCALLTYPE *pfnClrCreateManagedInstance)(LPCWSTR typeName, REFIID riid, void ** ppv) = NULL;
-            IfHrFailRet(pInfo->GetProcAddress("ClrCreateManagedInstance", (LPVOID *)&pfnClrCreateManagedInstance));
-            IfHrFailRet(pfnClrCreateManagedInstance(pTypeName, riid, ppObject));
-        }
-        else
-        {
-            CALL_LEGACY_API(ClrCreateManagedInstance,
-                            (LPCWSTR pTypeName,
-                             REFIID riid,
-                             void **ppObject),
-                            (pTypeName,
-                             riid,
-                             ppObject));
-        }
-
-        return hr;
-    }
-
-    // --------------------------------------------------------------------------------------------
-    inline
-    HRESULT LoadLibraryShim(
-        LPCWSTR szDllName,
-        LPCWSTR szVersion,
-        LPVOID pvReserved,
-        HMODULE *phModDll)
-    {
-        HRESULT hr = S_OK;
-
-        if (Util::HasNewActivationAPIs())
-        {
-            Util::ReleaseHolder<ICLRRuntimeInfo*> hInfo;
-            ICLRRuntimeInfo *pInfo = NULL;
-
-            // Semantics of LoadLibraryShim is that a non-null version must match exactly.
-            if (szVersion != NULL)
-            {
-                GET_CLRMETAHOST(pMH);
-                IfHrFailRet(pMH->GetRuntime(szVersion, IID_ICLRRuntimeInfo, reinterpret_cast<LPVOID*>(&pInfo)));
-                hInfo.Assign(pInfo);
-            }
-            else
-            {
-                IfHrFailRet(Util::GetCLRRuntimeInfo(&pInfo));
-            }
-            IfHrFailRet(pInfo->LoadLibrary(szDllName, phModDll));
-        }
-        else
-        {
-            CALL_LEGACY_API(LoadLibraryShim,
-                            (LPCWSTR szDllName,
-                             LPCWSTR szVersion,
-                             LPVOID pvReserved,
-                             HMODULE *phModDll),
-                            (szDllName,
-                             szVersion,
-                             pvReserved,
-                             phModDll));
-        }
-
-        return hr;
-    }
-
-    // --------------------------------------------------------------------------------------------
-    inline
-    HRESULT CallFunctionShim(
-        LPCWSTR szDllName,
-        LPCSTR szFunctionName,
-        LPVOID lpvArgument1,
-        LPVOID lpvArgument2,
-        LPCWSTR szVersion,
-        LPVOID pvReserved)
-    {
-        HRESULT hr = S_OK;
-
-        if (Util::HasNewActivationAPIs())
-        {
-            HMODULE hMod = NULL;
-            HRESULT (__stdcall * pfn)(LPVOID,LPVOID) = NULL;
-
-            // Load library
-            IfHrFailRet(LegacyActivationShim::LoadLibraryShim(szDllName, szVersion, pvReserved, &hMod));
-
-            // NOTE: Legacy CallFunctionShim does not release HMODULE, leak to maintain compat
-            // Util::HMODULEHolder hModHolder(hMod);
-            
-            // Find function.
-            pfn = (HRESULT (__stdcall *)(LPVOID,LPVOID))GetProcAddress(hMod, szFunctionName);
-            if (pfn == NULL)
-                return HRESULT_FROM_WIN32(GetLastError());
-            
-            // Call it.
-            return pfn(lpvArgument1, lpvArgument2);
-        }
-        else
-        {
-            CALL_LEGACY_API(CallFunctionShim,
-                            (LPCWSTR szDllName,
-                             LPCSTR szFunctionName,
-                             LPVOID lpvArgument1,
-                             LPVOID lpvArgument2,
-                             LPCWSTR szVersion,
-                             LPVOID pvReserved),
-                            (szDllName,
-                             szFunctionName,
-                             lpvArgument1,
-                             lpvArgument2,
-                             szVersion,
-                             pvReserved));
-        }
-
-        return hr;
-    }
-
-    // --------------------------------------------------------------------------------------------
-    inline
-    HRESULT GetRealProcAddress(
-        LPCSTR pwszProcName, 
-        VOID **ppv)
-    {
-        HRESULT hr = S_OK;
-
-        if (Util::HasNewActivationAPIs())
-        {
-            GET_CLRINFO(pInfo);
-            IfHrFailRet(pInfo->GetProcAddress(pwszProcName, ppv));
-        }
-        else
-        {
-            CALL_LEGACY_API(GetRealProcAddress,
-                            (LPCSTR pwszProcName, 
-                             VOID **ppv),
-                            (pwszProcName,
-                             ppv));
-        }
-
-        return hr;
-    }
-
-    // --------------------------------------------------------------------------------------------
-    inline
-    void CorExitProcess(
-        int exitCode)
-    {
-#ifndef LEGACY_ACTIVATION_SHIM_DELAY_LOAD
-        ::CorExitProcess(exitCode);
-#else
-        typedef void __stdcall t_CorExitProcess(
-            int exitCode);
-
-        Util::MscoreeFunctor<t_CorExitProcess> FN;
-        if (FAILED(FN.Init("CorExitProcess")))
-            return;
-
-        FN()(exitCode);
-#endif
-    }
-
-// Define this method only if it is not yet defined as macro (see ndp\clr\src\inc\UtilCode.h).
-#ifndef LoadStringRC
-    // --------------------------------------------------------------------------------------------
-    inline
-    HRESULT LoadStringRC(
-        UINT   nResourceID, 
-        __out_ecount(nMax) LPWSTR szBuffer,
-        int    nMax, 
-        int    fQuiet)
-    {
-        HRESULT hr = S_OK;
-
-        if (Util::HasNewActivationAPIs())
-        {
-            GET_CLRINFO(pInfo);
-            DWORD cchMax = static_cast<DWORD>(nMax);
-            IfHrFailRet(pInfo->LoadErrorString(nResourceID, szBuffer, &cchMax, -1));
-        }
-        else
-        {
-            CALL_LEGACY_API(LoadStringRC,
-                            (UINT   nResourceID, 
-                             LPWSTR szBuffer,
-                             int    nMax, 
-                             int    fQuiet),
-                            (nResourceID,
-                             szBuffer,
-                             nMax,
-                             fQuiet));
-        }
-
-        return hr;
-    }
-#endif //LoadStringRC
-
-// Define this method only if it is not yet defined as macro (see ndp\clr\src\inc\UtilCode.h).
-#if !defined(LoadStringRCEx) && !defined(FEATURE_CORESYSTEM)
-    // --------------------------------------------------------------------------------------------
-    inline
-    HRESULT LoadStringRCEx(
-        LCID lcid,
-        UINT   nResourceID, 
-        __out_ecount(nMax) LPWSTR szBuffer,
-        int    nMax, 
-        int    fQuiet, 
-        int *pcwchUsed)
-    {
-        HRESULT hr = S_OK;
-
-        if (Util::HasNewActivationAPIs())
-        {
-            GET_CLRINFO(pInfo);
-            DWORD cchUsed = static_cast<DWORD>(nMax);
-            IfHrFailRet(pInfo->LoadErrorString(nResourceID, szBuffer, &cchUsed, lcid));
-            *pcwchUsed = cchUsed;
-        }
-        else
-        {
-            CALL_LEGACY_API(LoadStringRCEx,
-                            (LCID lcid,
-                             UINT   nResourceID, 
-                             LPWSTR szBuffer,
-                             int    nMax, 
-                             int    fQuiet, 
-                             int *pcwchUsed),
-                            (lcid,
-                             nResourceID,
-                             szBuffer,
-                             nMax,
-                             fQuiet,
-                             pcwchUsed));
-        }
-
-        return hr;
-    }
-#endif //LoadStringRCEx
-
-    // --------------------------------------------------------------------------------------------
-    inline
-    HRESULT LockClrVersion(
-        FLockClrVersionCallback hostCallback,
-        FLockClrVersionCallback *pBeginHostSetup,
-        FLockClrVersionCallback *pEndHostSetup)
-    {
-        HRESULT hr = S_OK;
-
-        CALL_LEGACY_API(LockClrVersion,
-                        (FLockClrVersionCallback hostCallback,
-                         FLockClrVersionCallback *pBeginHostSetup,
-                         FLockClrVersionCallback *pEndHostSetup),
-                        (hostCallback,
-                         pBeginHostSetup,
-                         pEndHostSetup));
-
-        return hr;
-    }
-
-    // --------------------------------------------------------------------------------------------
-    inline
-    HRESULT CreateDebuggingInterfaceFromVersion(
-        int        nDebuggerVersion, 
-        LPCWSTR szDebuggeeVersion,
-        IUnknown ** ppCordb)
-    {
-        HRESULT hr = S_OK;
-
-        CALL_LEGACY_API(CreateDebuggingInterfaceFromVersion,
-                        (int        nDebuggerVersion, 
-                         LPCWSTR szDebuggeeVersion,
-                         IUnknown ** ppCordb),
-                        (nDebuggerVersion,
-                         szDebuggeeVersion,
-                         ppCordb));
-
-        return hr;
-    }
-
-    // --------------------------------------------------------------------------------------------
-    inline
-    HRESULT GetVersionFromProcess(
-        __in  HANDLE hProcess,
-        __out_ecount(cchBuffer) LPWSTR pVersion,
-        __in  DWORD cchBuffer,
-        __out DWORD *pdwLength)
-    {
-        HRESULT hr = S_OK;
-
-        CALL_LEGACY_API(GetVersionFromProcess,
-                        (HANDLE hProcess,
-                         LPWSTR pVersion,
-                         DWORD cchBuffer,
-                         DWORD *pdwLength),
-                        (hProcess,
-                         pVersion,
-                         cchBuffer,
-                         pdwLength));
-
-        return hr;
-    }
-
-    // --------------------------------------------------------------------------------------------
-// CoInitializeEE is declared in cor.h, define it only if explicitly requested
-#ifdef LEGACY_ACTIVATION_SHIM_DEFINE_CoInitializeEE
-    inline 
-    HRESULT CoInitializeEE(DWORD flags)
-    {
-        HRESULT hr = S_OK;
-        
-        if (Util::HasNewActivationAPIs())
-        {
-            GET_CLRINFO(pInfo);
-            HRESULT (* pfnCoInitializeEE)(DWORD);
-            IfHrFailRet(pInfo->GetProcAddress("CoInitializeEE", (LPVOID *)&pfnCoInitializeEE));
-            return (*pfnCoInitializeEE)(flags);
-        }
-        else
-        {
-            CALL_LEGACY_API(CoInitializeEE,
-                            (DWORD flags),
-                            (flags));
-        }
-        
-        return hr;
-    }
-
-    inline 
-    VOID CoUninitializeEE(BOOL flags)
-    {
-        if (Util::HasNewActivationAPIs())
-        {
-            ICLRRuntimeInfo *pInfo = NULL;
-            if (FAILED(Util::GetCLRRuntimeInfo(&pInfo)))
-                return;
-
-            VOID (* pfnCoUninitializeEE)(BOOL);
-            if (FAILED(pInfo->GetProcAddress("CoUninitializeEE", (LPVOID *)&pfnCoUninitializeEE)))
-                return;
-
-            (*pfnCoUninitializeEE)(flags);
-        }
-        else
-        {
-            CALL_LEGACY_API_VOIDRET(CoUninitializeEE,
-                                    (BOOL flags),
-                                    (flags));
-        }
-    }
-
-    inline 
-    HRESULT CoInitializeCor(DWORD flags)
-    {
-        HRESULT hr = S_OK;
-        
-        if (Util::HasNewActivationAPIs())
-        {
-            GET_CLRINFO(pInfo);
-            HRESULT (* pfnCoInitializeCor)(DWORD);
-            IfHrFailRet(pInfo->GetProcAddress("CoInitializeCor", (LPVOID *)&pfnCoInitializeCor));
-            return (*pfnCoInitializeCor)(flags);
-        }
-        else
-        {
-            CALL_LEGACY_API(CoInitializeCor,
-                            (DWORD flags),
-                            (flags));
-        }
-        
-        return hr;
-    }
-
-    inline 
-    VOID CoUninitializeCor()
-    {
-        if (Util::HasNewActivationAPIs())
-        {
-            ICLRRuntimeInfo *pInfo = NULL;
-            if (FAILED(Util::GetCLRRuntimeInfo(&pInfo)))
-                return;
-
-            VOID (* pfnCoUninitializeCor)();
-            if (FAILED(pInfo->GetProcAddress("CoUninitializeCor", (LPVOID *)&pfnCoUninitializeCor)))
-                return;
-
-            (*pfnCoUninitializeCor)();
-        }
-        else
-        {
-            CALL_LEGACY_API_VOIDRET(CoUninitializeCor,
-                                    (VOID),
-                                    ());
-        }
-    }
-
-#endif //LEGACY_ACTIVATION_SHIM_DEFINE_CoInitializeEE
-    
-    // --------------------------------------------------------------------------------------------
-// CoEEShutDownCOM is declared in cor.h, define it only if explicitly requested
-#ifdef LEGACY_ACTIVATION_SHIM_DEFINE_CoEEShutDownCOM
-    inline 
-    void CoEEShutDownCOM()
-    {
-        if (Util::HasNewActivationAPIs())
-        {
-            ICLRRuntimeInfo *pInfo = NULL;
-            IfHrFailRetVOID(Util::GetCLRRuntimeInfo(&pInfo));
-            void (* pfnCoEEShutDownCOM)();
-            IfHrFailRetVOID(pInfo->GetProcAddress("CoEEShutDownCOM", (LPVOID *)&pfnCoEEShutDownCOM));
-            (*pfnCoEEShutDownCOM)();
-        }
-        else
-        {
-            CALL_LEGACY_API_VOIDRET(CoEEShutDownCOM, 
-                            (), 
-                            ());
-        }
-        
-        return;
-    }
-#endif //LEGACY_ACTIVATION_SHIM_DEFINE_CoEEShutDownCOM
-    
-    // ---StrongName Function Helpers--------------------------------------------------------------
-#if !defined(LEGACY_ACTIVATION_SHIM_DELAY_LOAD) && defined(__STRONG_NAME_H)
-#define LEGACY_STRONGNAME_API_PASS_THROUGH(_name, _ret_type, _ret_value, _sig, _args)   \
-    LEGACY_API_PASS_THROUGH_STATIC(_name, _ret_type, _ret_value, _sig, _args)
-#define LEGACY_STRONGNAME_API_PASS_THROUGH_VOIDRET(_name, _sig, _args)   \
-    LEGACY_API_PASS_THROUGH_STATIC_VOIDRET(_name, _sig, _args)
-#else //defined(LEGACY_ACTIVATION_SHIM_DELAY_LOAD) || !defined(__STRONG_NAME_H)
-#define LEGACY_STRONGNAME_API_PASS_THROUGH(_name, _ret_type, _ret_value, _sig, _args)   \
-    LEGACY_API_PASS_THROUGH_DELAYLOAD(_name, _ret_type, _ret_value, _sig, _args)
-#define LEGACY_STRONGNAME_API_PASS_THROUGH_VOIDRET(_name, _sig, _args)   \
-    LEGACY_API_PASS_THROUGH_DELAYLOAD_VOIDRET(_name, _sig, _args)
-#endif //defined(LEGACY_ACTIVATION_SHIM_DELAY_LOAD) || !defined(__STRONG_NAME_H)
-
-// Defines a method that just delegates a call to the right runtime, this one is for SN APIs that 
-// return HRESULT.
-#define PASS_THROUGH_IMPL_HRESULT(_name, _signature, _args)     \
-    inline                                                      \
-    HRESULT _name##_signature                                   \
-    {                                                           \
-        HRESULT hr = S_OK;                                      \
-        if (Util::HasNewActivationAPIs())                       \
-        {                                                       \
-            ICLRStrongName *pSN = NULL;                         \
-            IfHrFailRet(Util::GetCLRStrongName(&pSN));          \
-            IfHrFailRet(pSN->_name _args);                      \
-        }                                                       \
-        else                                                    \
-        {                                                       \
-            LEGACY_STRONGNAME_API_PASS_THROUGH(                 \
-                _name, HRESULT, hr, _signature, _args);         \
-            IfHrFailRet(hr);                                    \
-        }                                                       \
-        return hr;                                              \
-    }
-
-// Defines a method that just delegates a call to the right runtime, this one is for SN APIs that 
-// return BOOL.
-#define PASS_THROUGH_IMPL_BOOLEAN(_name, _signature, _args)     \
-    inline                                                      \
-    BOOL _name##_signature                                      \
-    {                                                           \
-        HRESULT hr = S_OK;                                      \
-        if (Util::HasNewActivationAPIs())                       \
-        {                                                       \
-            ICLRStrongName *pSN = NULL;                         \
-            IfHrFailRetFALSE(Util::GetCLRStrongName(&pSN));     \
-            IfHrFailRetFALSE(pSN->_name _args);                 \
-            return TRUE;                                        \
-        }                                                       \
-        else                                                    \
-        {                                                       \
-            BOOL fResult = TRUE;                                \
-            LEGACY_STRONGNAME_API_PASS_THROUGH(                 \
-                _name, BOOL, fResult, _signature, _args);       \
-            IfHrFailRetFALSE(hr);                               \
-            return fResult;                                     \
-        }                                                       \
-    }
-
-// Defines a method that just delegates a call to the right runtime, this one is for SN APIs that 
-// return VOID.
-#define PASS_THROUGH_IMPL_VOID(_name, _signature, _args)        \
-    inline                                                      \
-    VOID _name##_signature                                      \
-    {                                                           \
-        HRESULT hr = S_OK;                                      \
-        if (Util::HasNewActivationAPIs())                       \
-        {                                                       \
-            ICLRStrongName *pSN = NULL;                         \
-            IfHrFailRetVOID(Util::GetCLRStrongName(&pSN));      \
-            IfHrFailRetVOID(pSN->_name _args);                  \
-            return;                                             \
-        }                                                       \
-        else                                                    \
-        {                                                       \
-            LEGACY_STRONGNAME_API_PASS_THROUGH_VOIDRET(         \
-                _name, _signature, _args);                      \
-            IfHrFailRetVOID(hr);                                \
-            return;                                             \
-        }                                                       \
-    }
-
-    // ---StrongName functions---------------------------------------------------------------------
-
-PASS_THROUGH_IMPL_HRESULT(GetHashFromAssemblyFile,
-                         (LPCSTR pszFilePath, unsigned int *piHashAlg, BYTE *pbHash, DWORD cchHash, DWORD *pchHash),
-                         (pszFilePath, piHashAlg, pbHash, cchHash, pchHash));
-
-PASS_THROUGH_IMPL_HRESULT(GetHashFromAssemblyFileW,
-                         (LPCWSTR pwzFilePath, unsigned int *piHashAlg, BYTE *pbHash, DWORD cchHash, DWORD *pchHash),
-                         (pwzFilePath, piHashAlg, pbHash, cchHash, pchHash));
-
-PASS_THROUGH_IMPL_HRESULT(GetHashFromBlob,
-                         (BYTE *pbBlob, DWORD cchBlob, unsigned int *piHashAlg, BYTE *pbHash, DWORD cchHash, DWORD *pchHash),
-                         (pbBlob, cchBlob, piHashAlg, pbHash, cchHash, pchHash));
-
-PASS_THROUGH_IMPL_HRESULT(GetHashFromFile,
-                         (LPCSTR pszFilePath, unsigned int *piHashAlg, BYTE *pbHash, DWORD cchHash, DWORD *pchHash),
-                         (pszFilePath, piHashAlg, pbHash, cchHash, pchHash));
-
-PASS_THROUGH_IMPL_HRESULT(GetHashFromFileW,
-                         (LPCWSTR pwzFilePath, unsigned int *piHashAlg, BYTE *pbHash, DWORD cchHash, DWORD *pchHash),
-                         (pwzFilePath, piHashAlg, pbHash, cchHash, pchHash));
-
-PASS_THROUGH_IMPL_HRESULT(GetHashFromHandle,
-                         (HANDLE hFile, unsigned int *piHashAlg, BYTE *pbHash, DWORD cchHash, DWORD *pchHash),
-                         (hFile, piHashAlg, pbHash, cchHash, pchHash));
-
-PASS_THROUGH_IMPL_BOOLEAN(StrongNameCompareAssemblies,
-                         (LPCWSTR pwzAssembly1, LPCWSTR pwzAssembly2, DWORD *pdwResult),
-                         (pwzAssembly1, pwzAssembly2, pdwResult));
-
-PASS_THROUGH_IMPL_VOID(StrongNameFreeBuffer,
-                      (BYTE *pbMemory),
-                      (pbMemory));
-
-PASS_THROUGH_IMPL_BOOLEAN(StrongNameGetBlob,
-                         (LPCWSTR pwzFilePath, BYTE *pbBlob, DWORD *pcbBlob),
-                         (pwzFilePath, pbBlob, pcbBlob));
-
-PASS_THROUGH_IMPL_BOOLEAN(StrongNameGetBlobFromImage,
-                         (BYTE *pbBase, DWORD dwLength, BYTE *pbBlob, DWORD *pcbBlob),
-                         (pbBase, dwLength, pbBlob, pcbBlob));
-
-PASS_THROUGH_IMPL_BOOLEAN(StrongNameGetPublicKey,
-                         (LPCWSTR pwzKeyContainer, BYTE *pbKeyBlob, ULONG cbKeyBlob, BYTE **ppbPublicKeyBlob, ULONG *pcbPublicKeyBlob),
-                         (pwzKeyContainer, pbKeyBlob, cbKeyBlob, ppbPublicKeyBlob, pcbPublicKeyBlob));
-
-PASS_THROUGH_IMPL_BOOLEAN(StrongNameHashSize,
-                         (ULONG ulHashAlg, DWORD *pcbSize),
-                         (ulHashAlg, pcbSize));
-
-PASS_THROUGH_IMPL_BOOLEAN(StrongNameKeyDelete,
-                         (LPCWSTR pwzKeyContainer),
-                         (pwzKeyContainer));
-
-PASS_THROUGH_IMPL_BOOLEAN(StrongNameKeyGen,
-                         (LPCWSTR pwzKeyContainer, DWORD dwFlags, BYTE **ppbKeyBlob, ULONG *pcbKeyBlob),
-                         (pwzKeyContainer, dwFlags, ppbKeyBlob, pcbKeyBlob));
-
-PASS_THROUGH_IMPL_BOOLEAN(StrongNameKeyGenEx,
-                         (LPCWSTR pwzKeyContainer, DWORD dwFlags, DWORD dwKeySize, BYTE **ppbKeyBlob, ULONG *pcbKeyBlob),
-                         (pwzKeyContainer, dwFlags, dwKeySize, ppbKeyBlob, pcbKeyBlob));
-
-PASS_THROUGH_IMPL_BOOLEAN(StrongNameKeyInstall,
-                         (LPCWSTR pwzKeyContainer, BYTE *pbKeyBlob, ULONG cbKeyBlob),
-                         (pwzKeyContainer, pbKeyBlob, cbKeyBlob));
-
-PASS_THROUGH_IMPL_BOOLEAN(StrongNameSignatureGeneration,
-                         (LPCWSTR pwzFilePath, LPCWSTR pwzKeyContainer, BYTE *pbKeyBlob, ULONG cbKeyBlob, BYTE **ppbSignatureBlob, ULONG *pcbSignatureBlob),
-                         (pwzFilePath, pwzKeyContainer, pbKeyBlob, cbKeyBlob, ppbSignatureBlob, pcbSignatureBlob));
-
-PASS_THROUGH_IMPL_BOOLEAN(StrongNameSignatureGenerationEx,
-                         (LPCWSTR wszFilePath, LPCWSTR wszKeyContainer, BYTE *pbKeyBlob, ULONG cbKeyBlob, BYTE **ppbSignatureBlob, ULONG *pcbSignatureBlob, DWORD dwFlags),
-                         (wszFilePath, wszKeyContainer, pbKeyBlob, cbKeyBlob, ppbSignatureBlob, pcbSignatureBlob, dwFlags));
-
-PASS_THROUGH_IMPL_BOOLEAN(StrongNameSignatureSize,
-                         (BYTE *pbPublicKeyBlob, ULONG cbPublicKeyBlob, DWORD *pcbSize),
-                         (pbPublicKeyBlob, cbPublicKeyBlob, pcbSize));
-
-PASS_THROUGH_IMPL_BOOLEAN(StrongNameSignatureVerification,
-                         (LPCWSTR  pwzFilePath, DWORD dwInFlags, DWORD *pdwOutFlags),
-                         (pwzFilePath, dwInFlags, pdwOutFlags));
-
-PASS_THROUGH_IMPL_BOOLEAN(StrongNameSignatureVerificationEx,
-                         (LPCWSTR pwzFilePath, BOOLEAN fForceVerification, BOOLEAN *pfWasVerified),
-                         (pwzFilePath, fForceVerification, pfWasVerified));
-
-PASS_THROUGH_IMPL_BOOLEAN(StrongNameSignatureVerificationFromImage,
-                         (BYTE *pbBase, DWORD dwLength, DWORD dwInFlags, DWORD *pdwOutFlags),
-                         (pbBase, dwLength, dwInFlags, pdwOutFlags));
-
-PASS_THROUGH_IMPL_BOOLEAN(StrongNameTokenFromAssembly,
-                         (LPCWSTR pwzFilePath, BYTE **ppbStrongNameToken, ULONG *pcbStrongNameToken),
-                         (pwzFilePath, ppbStrongNameToken, pcbStrongNameToken));
-
-PASS_THROUGH_IMPL_BOOLEAN(StrongNameTokenFromAssemblyEx,
-                         (LPCWSTR pwzFilePath, BYTE **ppbStrongNameToken, ULONG *pcbStrongNameToken, BYTE **ppbPublicKeyBlob, ULONG *pcbPublicKeyBlob),
-                         (pwzFilePath, ppbStrongNameToken, pcbStrongNameToken, ppbPublicKeyBlob, pcbPublicKeyBlob));
-
-PASS_THROUGH_IMPL_BOOLEAN(StrongNameTokenFromPublicKey,
-                         (BYTE *pbPublicKeyBlob, ULONG cbPublicKeyBlob, BYTE **ppbStrongNameToken, ULONG *pcbStrongNameToken),
-                         (pbPublicKeyBlob, cbPublicKeyBlob, ppbStrongNameToken, pcbStrongNameToken));
-
-#undef PASS_THROUGH_IMPL_HRESULT
-#undef PASS_THROUGH_IMPL_BOOLEAN
-#undef PASS_THROUGH_IMPL_VOID
-
-// Defines a method that just delegates a call to the right runtime, this one is for SN APIs that 
-// return BOOLEAN.
-#define WRAP_HRESULT_IMPL_BOOLEAN(_WrapperName, _name, _signature, _args)               \
-    inline                                                                              \
-    HRESULT _WrapperName##_signature                                                    \
-    {                                                                                   \
-        HRESULT hr = S_OK;                                                              \
-        if (Util::HasNewActivationAPIs())                                               \
-        {                                                                               \
-            ICLRStrongName *pSN = NULL;                                                 \
-            IfHrFailRet(Util::GetCLRStrongName(&pSN));                                  \
-            return pSN->_name _args;                                                    \
-        }                                                                               \
-        else                                                                            \
-        {                                                                               \
-            typedef BOOL __stdcall t_FN _signature;                                     \
-            Util::MscoreeFunctor<t_FN> FN;                                              \
-            IfHrFailRet(FN.Init(#_name));                                               \
-            if ((FN() _args))                                                           \
-            {                                                                           \
-                return S_OK;                                                            \
-            }                                                                           \
-            else                                                                        \
-            {   /*@TODO: Static bind version, if necessary*/                            \
-                typedef DWORD __stdcall t_FNStrongNameErrorInfo(void);                  \
-                Util::MscoreeFunctor<t_FNStrongNameErrorInfo> FNStrongNameErrorInfo;    \
-                IfHrFailRet(FNStrongNameErrorInfo.Init("StrongNameErrorInfo"));         \
-                HRESULT hrResult = (HRESULT)FNStrongNameErrorInfo() ();                 \
-                if (SUCCEEDED(hrResult))                                                \
-                {                                                                       \
-                    hrResult = E_FAIL;                                                  \
-                }                                                                       \
-                return hrResult;                                                        \
-            }                                                                           \
-        }                                                                               \
-    }
-
-WRAP_HRESULT_IMPL_BOOLEAN(StrongNameHashSize_HRESULT, 
-                          StrongNameHashSize, 
-                          (ULONG ulHashAlg, DWORD *pcbSize), 
-                          (ulHashAlg, pcbSize));
-
-WRAP_HRESULT_IMPL_BOOLEAN(StrongNameTokenFromPublicKey_HRESULT, 
-                          StrongNameTokenFromPublicKey, 
-                          (BYTE *pbPublicKeyBlob, ULONG cbPublicKeyBlob, BYTE **ppbStrongNameToken, ULONG *pcbStrongNameToken), 
-                          (pbPublicKeyBlob, cbPublicKeyBlob, ppbStrongNameToken, pcbStrongNameToken));
-
-WRAP_HRESULT_IMPL_BOOLEAN(StrongNameSignatureSize_HRESULT, 
-                          StrongNameSignatureSize, 
-                          (BYTE *pbPublicKeyBlob, ULONG cbPublicKeyBlob, DWORD *pcbSize), 
-                          (pbPublicKeyBlob, cbPublicKeyBlob, pcbSize));
-
-WRAP_HRESULT_IMPL_BOOLEAN(StrongNameGetPublicKey_HRESULT, 
-                          StrongNameGetPublicKey, 
-                          (LPCWSTR pwzKeyContainer, BYTE *pbKeyBlob, ULONG cbKeyBlob, BYTE **ppbPublicKeyBlob, ULONG *pcbPublicKeyBlob), 
-                          (pwzKeyContainer, pbKeyBlob, cbKeyBlob, ppbPublicKeyBlob, pcbPublicKeyBlob));
-
-WRAP_HRESULT_IMPL_BOOLEAN(StrongNameKeyInstall_HRESULT, 
-                          StrongNameKeyInstall, 
-                          (LPCWSTR pwzKeyContainer, BYTE *pbKeyBlob, ULONG cbKeyBlob), 
-                          (pwzKeyContainer, pbKeyBlob, cbKeyBlob));
-
-WRAP_HRESULT_IMPL_BOOLEAN(StrongNameSignatureGeneration_HRESULT, 
-                          StrongNameSignatureGeneration, 
-                          (LPCWSTR pwzFilePath, LPCWSTR pwzKeyContainer, BYTE *pbKeyBlob, ULONG cbKeyBlob, BYTE **ppbSignatureBlob, ULONG *pcbSignatureBlob), 
-                          (pwzFilePath, pwzKeyContainer, pbKeyBlob, cbKeyBlob, ppbSignatureBlob, pcbSignatureBlob));
-
-WRAP_HRESULT_IMPL_BOOLEAN(StrongNameKeyGen_HRESULT, 
-                          StrongNameKeyGen, 
-                          (LPCWSTR pwzKeyContainer, DWORD dwFlags, BYTE **ppbKeyBlob, ULONG *pcbKeyBlob), 
-                          (pwzKeyContainer, dwFlags, ppbKeyBlob, pcbKeyBlob));
-
-#undef WRAP_HRESULT_IMPL_BOOLEAN
-
-// Defines a method that just delegates a call to the right runtime, this one is for ICLRStrongName2 
-// APIs that return BOOLEAN.
-#define WRAP_HRESULT_IMPL_BOOLEAN(_WrapperName, _name, _signature, _args)               \
-    inline                                                                              \
-    HRESULT _WrapperName##_signature                                                    \
-    {                                                                                   \
-        HRESULT hr = S_OK;                                                              \
-        if (Util::HasNewActivationAPIs())                                               \
-        {                                                                               \
-            ICLRStrongName2 *pSN = NULL;                                                \
-            IfHrFailRet(Util::GetCLRStrongName2(&pSN));                                 \
-            return pSN->_name _args;                                                    \
-        }                                                                               \
-        else                                                                            \
-        {                                                                               \
-            return E_FAIL;                                                              \
-        }                                                                               \
-    }
-
-
-WRAP_HRESULT_IMPL_BOOLEAN(StrongNameGetPublicKeyEx_HRESULT, 
-                          StrongNameGetPublicKeyEx, 
-                          (LPCWSTR pwzKeyContainer, BYTE *pbKeyBlob, ULONG cbKeyBlob, BYTE **ppbPublicKeyBlob, ULONG *pcbPublicKeyBlob, ULONG uHashAlgId, ULONG uReserved), 
-                          (pwzKeyContainer, pbKeyBlob, cbKeyBlob, ppbPublicKeyBlob, pcbPublicKeyBlob, uHashAlgId, uReserved));
-
-#undef WRAP_HRESULT_IMPL_BOOLEAN
-
-    inline
-    HRESULT ClrCoCreateInstance(
-      REFCLSID rclsid,
-      LPUNKNOWN pUnkOuter,
-      DWORD dwClsContext,
-      REFIID riid,
-      LPVOID * ppv)
-    {
-        HRESULT hr = S_OK;
-
-        if (Util::HasNewActivationAPIs() /*&& Util::IsCLSIDHostedByClr(rclsid)*/)
-        {
-            GET_CLRINFO(pInfo);
-            IfHrFailRet(pInfo->GetInterface(rclsid, riid, ppv));
-        }
-        else
-        {
-            IfHrFailRet(::CoCreateInstance(rclsid, pUnkOuter, dwClsContext, riid, ppv));
-        }
-
-        return hr;
-    }
-}; // namespace LegacyActivationShim
-#pragma warning(pop) // Revert C4996 status
-
-#undef LEGACY_API_PASS_THROUGH_STATIC
-#undef LEGACY_API_PASS_THROUGH_STATIC_VOIDRET
-#undef LEGACY_API_PASS_THROUGH_DELAYLOAD
-#undef LEGACY_API_PASS_THROUGH_DELAYLOAD_VOIDRET
-#undef CALL_LEGACY_API
-#undef LEGACY_STRONGNAME_API_PASS_THROUGH
-#undef LEGACY_STRONGNAME_API_PASS_THROUGH_VOIDRET
-
-#undef LEGACY_ACTIVATION_SHIM_DEFAULT_PRODUCT_VER_HELPER_L
-#undef LEGACY_ACTIVATION_SHIM_DEFAULT_PRODUCT_VER_STR_L
-
-#pragma pop_macro("IfHrFailRetVOID")
-#pragma pop_macro("IfHrFailRetFALSE")
-#pragma pop_macro("IfHrFailRet")
-
-#ifdef _MANAGED
-// We are compiling Managed C++, restore previous managed/native status from the stack
-#pragma managed(pop)
-#endif //_MANAGED
-
-#pragma warning(pop)
-
-#endif // __LEGACYACTIVATIONSHIM_H__
diff --git a/src/inc/legacyactivationshimdelayload.h b/src/inc/legacyactivationshimdelayload.h
deleted file mode 100644 (file)
index 8e77ff2..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-//
-
-#ifndef __LEGACYACTIVATIONSHIMDELAYLOAD_H__
-#define __LEGACYACTIVATIONSHIMDELAYLOAD_H__
-
-#define LEGACY_ACTIVATION_SHIM_DELAY_LOAD
-#include <legacyactivationshim.h>
-#undef LEGACY_ACTIVATION_SHIM_DELAY_LOAD
-
-#endif //__LEGACYACTIVATIONSHIMDELAYLOAD_H__
index be09815..820d64b 100644 (file)
 #define WszLogonUser LogonUserW
 #define WszCreateProcessAsUser CreateProcessAsUserW
 #define WszGetCurrentHwProfile GetCurrentHwProfileW
-#define WszGetVersionEx GetVersionExW
 #define WszCreateJobObject CreateJobObjectW
 #define WszOpenJobObject OpenJobObjectW
 
@@ -925,8 +924,6 @@ __forceinline LONGLONG __InterlockedExchangeAdd64(LONGLONG volatile * Addend, LO
 #define CLR_VER_SUITENAME                   0x0000040
 #define CLR_VER_PRODUCT_TYPE                0x0000080
 
-BOOL GetOSVersion(LPOSVERSIONINFOW osVer);
-
 // Output printf-style formatted text to the debugger if it's present or stdout otherwise.
 inline void DbgWPrintf(const LPCWSTR wszFormat, ...)
 {
index 8f2170d..816272f 100644 (file)
@@ -218,17 +218,26 @@ if (CLR_CMAKE_PLATFORM_ARCH_ARM)
     add_subdirectory(protojit)
 endif (CLR_CMAKE_PLATFORM_ARCH_ARM)
 
-if ((CLR_CMAKE_PLATFORM_ARCH_I386 OR CLR_CMAKE_PLATFORM_ARCH_AMD64) AND WIN32)
+if (CLR_CMAKE_PLATFORM_ARCH_I386 OR CLR_CMAKE_PLATFORM_ARCH_AMD64)
     # On x86, build RyuJIT/ARM32 cross-compiling altjit.
     # On amd64, build RyuJIT/ARM64 cross-compiling altjit.
     add_subdirectory(protononjit)
+endif ()
 
-    # Build Linux/x86-running-on-Windows altjit or
-    # Linux/AMD64-running-on-Windows altjit..
+if ((CLR_CMAKE_PLATFORM_ARCH_I386 OR CLR_CMAKE_PLATFORM_ARCH_AMD64) AND WIN32)
+    # On Windows, build altjit that targets the Linux ABI:
+    #   On x86, build Linux/x86 altjit. This enables UNIX_X86_ABI.
+    #   On amd64, build Linux/AMD64 altjit. This enables UNIX_AMD64_ABI and FEATURE_UNIX_AMD64_STRUCT_PASSING.
     add_subdirectory(linuxnonjit)
 endif ()
 
 if (CLR_CMAKE_PLATFORM_ARCH_I386 AND WIN32)
+    # On Windows x86, build altjit generating Windows/ARM32 code using LEGACY_BACKEND.
+    # (Note: we could also create linuxlegacynonjit for generating Linux/ARM32 code using LEGACY_BACKEND, if needed.)
+    add_subdirectory(legacynonjit)
+endif (CLR_CMAKE_PLATFORM_ARCH_I386 AND WIN32)
+
+if (CLR_CMAKE_PLATFORM_ARCH_I386 AND WIN32)
     if (NOT CLR_BUILD_JIT32)
         add_subdirectory(compatjit)
     endif ()
index 08273ad..795691d 100755 (executable)
@@ -27,8 +27,7 @@ enum ti_types
 #define DEF_TI(ti, nm) ti,
 #include "titypes.h"
 #undef DEF_TI
-    TI_ONLY_ENUM = TI_METHOD, // Enum values above this are completely described by the enumeration
-    TI_COUNT
+    TI_ONLY_ENUM = TI_METHOD, // Enum values with greater value are completely described by the enumeration.
 };
 
 #if defined(_TARGET_64BIT_)
@@ -190,8 +189,6 @@ inline ti_types JITtype2tiType(CorInfoType type)
  *
  */
 
-// TI_COUNT is less than or equal to TI_FLAG_DATA_MASK
-
 #define TI_FLAG_DATA_BITS 6
 #define TI_FLAG_DATA_MASK ((1 << TI_FLAG_DATA_BITS) - 1)
 
@@ -287,7 +284,7 @@ private:
     union {
         struct
         {
-            ti_types type : 6;
+            ti_types type : TI_FLAG_DATA_BITS;
             unsigned uninitobj : 1;        // used
             unsigned byref : 1;            // used
             unsigned byref_readonly : 1;   // used
@@ -559,13 +556,6 @@ public:
         return m_method;
     }
 
-    // If FEATURE_CORECLR is enabled, GetMethod can be called
-    // before the pointer type is known to be a method pointer type.
-    CORINFO_METHOD_HANDLE GetMethod2() const
-    {
-        return m_method;
-    }
-
     // Get this item's type
     // If primitive, returns the primitive type (TI_*)
     // If not primitive, returns:
index ff6c14b..d653511 100644 (file)
@@ -21029,8 +21029,6 @@ regMaskTP CodeGen::genPInvokeMethodProlog(regMaskTP initRegs)
     }
     else
     {
-        noway_assert(pInfo->osMajor >= 5);
-
         DWORD basePtr = WIN_NT5_TLS_HIGHOFFSET;
         threadTlsIndex -= 64;
 
index 3f75623..df54c8f 100644 (file)
@@ -2470,7 +2470,8 @@ void Compiler::compInitOptions(JitFlags* jitFlags)
     opts.jitFlags  = jitFlags;
     opts.compFlags = CLFLG_MAXOPT; // Default value is for full optimization
 
-    if (jitFlags->IsSet(JitFlags::JIT_FLAG_DEBUG_CODE) || jitFlags->IsSet(JitFlags::JIT_FLAG_MIN_OPT))
+    if (jitFlags->IsSet(JitFlags::JIT_FLAG_DEBUG_CODE) || jitFlags->IsSet(JitFlags::JIT_FLAG_MIN_OPT) ||
+        jitFlags->IsSet(JitFlags::JIT_FLAG_TIER0))
     {
         opts.compFlags = CLFLG_MINOPT;
     }
@@ -2495,7 +2496,8 @@ void Compiler::compInitOptions(JitFlags* jitFlags)
     //
     // If the EE sets SPEED_OPT we will optimize for speed at the expense of code size
     //
-    else if (jitFlags->IsSet(JitFlags::JIT_FLAG_SPEED_OPT))
+    else if (jitFlags->IsSet(JitFlags::JIT_FLAG_SPEED_OPT) ||
+             (jitFlags->IsSet(JitFlags::JIT_FLAG_TIER1) && !jitFlags->IsSet(JitFlags::JIT_FLAG_MIN_OPT)))
     {
         opts.compCodeOpt = FAST_CODE;
         assert(!jitFlags->IsSet(JitFlags::JIT_FLAG_SIZE_OPT));
index 01e5735..5e876aa 100644 (file)
@@ -2903,10 +2903,6 @@ protected:
     void impHandleAccessAllowed(CorInfoIsAccessAllowedResult result, CORINFO_HELPER_DESC* helperCall);
     void impHandleAccessAllowedInternal(CorInfoIsAccessAllowedResult result, CORINFO_HELPER_DESC* helperCall);
 
-    void impInsertCalloutForDelegate(CORINFO_METHOD_HANDLE callerMethodHnd,
-                                     CORINFO_METHOD_HANDLE calleeMethodHnd,
-                                     CORINFO_CLASS_HANDLE  delegateTypeHnd);
-
     var_types impImportCall(OPCODE                  opcode,
                             CORINFO_RESOLVED_TOKEN* pResolvedToken,
                             CORINFO_RESOLVED_TOKEN* pConstrainedResolvedToken, // Is this a "constrained." call on a
index 00068c6..534cb40 100644 (file)
@@ -23375,6 +23375,7 @@ void Compiler::fgRemoveEmptyTry()
         // Handler index of any nested blocks will update when we
         // remove the EH table entry.  Change handler exits to jump to
         // the continuation.  Clear catch type on handler entry.
+        // Decrement nesting level of enclosed GT_END_LFINs.
         for (BasicBlock* block = firstHandlerBlock; block != endHandlerBlock; block = block->bbNext)
         {
             if (block == firstHandlerBlock)
@@ -23404,6 +23405,22 @@ void Compiler::fgRemoveEmptyTry()
                     fgAddRefPred(continuation, block);
                 }
             }
+
+#if !FEATURE_EH_FUNCLETS
+            // If we're in a non-funclet model, decrement the nesting
+            // level of any GT_END_LFIN we find in the handler region,
+            // since we're removing the enclosing handler.
+            for (GenTreeStmt* stmt = block->firstStmt(); stmt != nullptr; stmt = stmt->gtNextStmt)
+            {
+                GenTreePtr expr = stmt->gtStmtExpr;
+                if (expr->gtOper == GT_END_LFIN)
+                {
+                    const unsigned nestLevel = expr->gtVal.gtVal1;
+                    assert(nestLevel > 0);
+                    expr->gtVal.gtVal1 = nestLevel - 1;
+                }
+            }
+#endif // !FEATURE_EH_FUNCLETS
         }
 
         // (6) Remove the try-finally EH region. This will compact the
index 4e42f4f..3628ff7 100644 (file)
@@ -16379,6 +16379,14 @@ CORINFO_CLASS_HANDLE Compiler::gtGetClassHandle(GenTreePtr tree, bool* isExact,
     *isExact                      = false;
     CORINFO_CLASS_HANDLE objClass = nullptr;
 
+    // Bail out if we're just importing and not generating code, since
+    // the jit uses TYP_REF for CORINFO_TYPE_VAR locals and args, but
+    // these may not be ref types.
+    if (compIsForImportOnly())
+    {
+        return objClass;
+    }
+
     // Bail out if the tree is not a ref type.
     var_types treeType = tree->TypeGet();
     if (treeType != TYP_REF)
index eaf647a..e4c740e 100644 (file)
@@ -6126,25 +6126,6 @@ void Compiler::impInsertHelperCall(CORINFO_HELPER_DESC* helperInfo)
     impAppendTree(callout, (unsigned)CHECK_SPILL_NONE, impCurStmtOffs);
 }
 
-void Compiler::impInsertCalloutForDelegate(CORINFO_METHOD_HANDLE callerMethodHnd,
-                                           CORINFO_METHOD_HANDLE calleeMethodHnd,
-                                           CORINFO_CLASS_HANDLE  delegateTypeHnd)
-{
-#ifdef FEATURE_CORECLR
-    if (!info.compCompHnd->isDelegateCreationAllowed(delegateTypeHnd, calleeMethodHnd))
-    {
-        // Call the JIT_DelegateSecurityCheck helper before calling the actual function.
-        // This helper throws an exception if the CLR host disallows the call.
-
-        GenTreePtr helper = gtNewHelperCallNode(CORINFO_HELP_DELEGATE_SECURITY_CHECK, TYP_VOID, GTF_EXCEPT,
-                                                gtNewArgList(gtNewIconEmbClsHndNode(delegateTypeHnd),
-                                                             gtNewIconEmbMethHndNode(calleeMethodHnd)));
-        // Append the callout statement
-        impAppendTree(helper, (unsigned)CHECK_SPILL_NONE, impCurStmtOffs);
-    }
-#endif // FEATURE_CORECLR
-}
-
 // Checks whether the return types of caller and callee are compatible
 // so that callee can be tail called. Note that here we don't check
 // compatibility in IL Verifier sense, but on the lines of return type
@@ -12856,14 +12837,6 @@ void Compiler::impImportBlockCode(BasicBlock* block)
                         assert(verCheckDelegateCreation(delegateCreateStart, codeAddr - 1, delegateMethodRef));
                     }
 #endif
-
-#ifdef FEATURE_CORECLR
-                    // In coreclr the delegate transparency rule needs to be enforced even if verification is disabled
-                    typeInfo              tiActualFtn          = impStackTop(0).seTypeInfo;
-                    CORINFO_METHOD_HANDLE delegateMethodHandle = tiActualFtn.GetMethod2();
-
-                    impInsertCalloutForDelegate(info.compMethodHnd, delegateMethodHandle, resolvedToken.hClass);
-#endif // FEATURE_CORECLR
                 }
 
                 callTyp = impImportCall(opcode, &resolvedToken, constraintCall ? &constrainedResolvedToken : nullptr,
@@ -18515,6 +18488,18 @@ void Compiler::impDevirtualizeCall(GenTreeCall*            call,
     CORINFO_CLASS_HANDLE baseClass        = info.compCompHnd->getMethodClass(baseMethod);
     const DWORD          baseClassAttribs = info.compCompHnd->getClassAttribs(baseClass);
 
+#if !defined(FEATURE_CORECLR)
+    // If base class is not beforefieldinit then devirtualizing may
+    // cause us to miss a base class init trigger. Spec says we don't
+    // need a trigger for ref class callvirts but desktop seems to
+    // have one anyways. So defer.
+    if ((baseClassAttribs & CORINFO_FLG_BEFOREFIELDINIT) == 0)
+    {
+        JITDUMP("\nimpDevirtualizeCall: base class has precise initialization, sorry\n");
+        return;
+    }
+#endif // FEATURE_CORECLR
+
     // Is the call an interface call?
     const bool isInterface = (baseClassAttribs & CORINFO_FLG_INTERFACE) != 0;
 
index 916b680..cec24a9 100644 (file)
 #define __PLACEMENT_NEW_INLINE  // don't bring in the global placement new, it is easy to make a mistake
                                 // with our new(compiler*) pattern.
 
-#if COR_JIT_EE_VER > 460
-#define NO_CLRCONFIG // Don't bring in the usual CLRConfig infrastructure, since the JIT uses the JIT/EE
-                     // interface to retrieve config values.
-
-// This is needed for contract.inl when FEATURE_STACK_PROBE is enabled.
-struct CLRConfig
-{
-    static struct ConfigKey
-    {
-    } EXTERNAL_NO_SO_NOT_MAINLINE;
-    static DWORD GetConfigValue(const ConfigKey& key)
-    {
-        return 0;
-    }
-};
-#endif
-
 #include "utilcode.h" // this defines assert as _ASSERTE
 #include "host.h"     // this redefines assert for the JIT to use assertAbort
 #include "utils.h"
index 810c93e..7b0e4a0 100644 (file)
@@ -78,6 +78,8 @@ public:
         JIT_FLAG_USE_PINVOKE_HELPERS     = 36, // The JIT should use the PINVOKE_{BEGIN,END} helpers instead of emitting inline transitions
         JIT_FLAG_REVERSE_PINVOKE         = 37, // The JIT should insert REVERSE_PINVOKE_{ENTER,EXIT} helpers into method prolog/epilog
         JIT_FLAG_DESKTOP_QUIRKS          = 38, // The JIT should generate desktop-quirk-compatible code
+        JIT_FLAG_TIER0                   = 39, // This is the initial tier for tiered compilation which should generate code as quickly as possible
+        JIT_FLAG_TIER1                   = 40, // This is the final tier (for now) for tiered compilation which should generate high quality code
     };
     // clang-format on
 
@@ -187,6 +189,8 @@ public:
         FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_USE_PINVOKE_HELPERS, JIT_FLAG_USE_PINVOKE_HELPERS);
         FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_REVERSE_PINVOKE, JIT_FLAG_REVERSE_PINVOKE);
         FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_DESKTOP_QUIRKS, JIT_FLAG_DESKTOP_QUIRKS);
+        FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_TIER0, JIT_FLAG_TIER0);
+        FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_TIER1, JIT_FLAG_TIER1);
 
 #undef FLAGS_EQUAL
     }
index 99b5452..ab7c15d 100644 (file)
@@ -677,11 +677,6 @@ void Compiler::lvaInitUserArgs(InitVarDscInfo* varDscInfo)
                 codeGen->regSet.rsMaskPreSpillRegArg |= regMask;
             }
         }
-        else
-        {
-            varDsc->lvOnFrame = true; // The final home for this incoming register might be our local stack frame
-        }
-
 #else // !_TARGET_ARM_
 #if defined(FEATURE_UNIX_AMD64_STRUCT_PASSING)
         SYSTEMV_AMD64_CORINFO_STRUCT_REG_PASSING_DESCRIPTOR structDesc;
@@ -723,13 +718,12 @@ void Compiler::lvaInitUserArgs(InitVarDscInfo* varDscInfo)
             }
         }
 #endif // FEATURE_UNIX_AMD64_STRUCT_PASSING
+#endif // !_TARGET_ARM_
 
         // The final home for this incoming register might be our local stack frame.
         // For System V platforms the final home will always be on the local stack frame.
         varDsc->lvOnFrame = true;
 
-#endif // !_TARGET_ARM_
-
         bool canPassArgInRegisters = false;
 
 #if defined(FEATURE_UNIX_AMD64_STRUCT_PASSING)
@@ -2312,6 +2306,15 @@ void Compiler::lvaSetStruct(unsigned varNum, CORINFO_CLASS_HANDLE typeHnd, bool
 void Compiler::lvaSetClass(unsigned varNum, CORINFO_CLASS_HANDLE clsHnd, bool isExact)
 {
     noway_assert(varNum < lvaCount);
+
+    // If we are just importing, we cannot reliably track local ref types,
+    // since the jit maps CORINFO_TYPE_VAR to TYP_REF.
+    if (compIsForImportOnly())
+    {
+        return;
+    }
+
+    // Else we should have a type handle.
     assert(clsHnd != nullptr);
 
     LclVarDsc* varDsc = &lvaTable[varNum];
@@ -2384,6 +2387,15 @@ void Compiler::lvaSetClass(unsigned varNum, GenTreePtr tree, CORINFO_CLASS_HANDL
 void Compiler::lvaUpdateClass(unsigned varNum, CORINFO_CLASS_HANDLE clsHnd, bool isExact)
 {
     noway_assert(varNum < lvaCount);
+
+    // If we are just importing, we cannot reliably track local ref types,
+    // since the jit maps CORINFO_TYPE_VAR to TYP_REF.
+    if (compIsForImportOnly())
+    {
+        return;
+    }
+
+    // Else we should have a class handle to consider
     assert(clsHnd != nullptr);
 
     LclVarDsc* varDsc = &lvaTable[varNum];
@@ -2392,12 +2404,22 @@ void Compiler::lvaUpdateClass(unsigned varNum, CORINFO_CLASS_HANDLE clsHnd, bool
     // We should already have a class
     assert(varDsc->lvClassHnd != nullptr);
 
-    // This should be the first and only update for this var
-    assert(!varDsc->lvClassInfoUpdated);
-
 #if defined(DEBUG)
+
+    // In general we only expect one update per local var. However if
+    // a block is re-imported and that block has the only STLOC for
+    // the var, we may see multiple updates. All subsequent updates
+    // should agree on the type, since reimportation is triggered by
+    // type mismatches for things other than ref types.
+    if (varDsc->lvClassInfoUpdated)
+    {
+        assert(varDsc->lvClassHnd == clsHnd);
+        assert(varDsc->lvClassIsExact == isExact);
+    }
+
     // This counts as an update, even if nothing changes.
     varDsc->lvClassInfoUpdated = true;
+
 #endif // defined(DEBUG)
 
     // If previous type was exact, there is nothing to update.  Would
diff --git a/src/jit/legacynonjit/.gitmirror b/src/jit/legacynonjit/.gitmirror
new file mode 100644 (file)
index 0000000..f507630
--- /dev/null
@@ -0,0 +1 @@
+Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/jit/legacynonjit/CMakeLists.txt b/src/jit/legacynonjit/CMakeLists.txt
new file mode 100644 (file)
index 0000000..de66d81
--- /dev/null
@@ -0,0 +1,67 @@
+project(legacynonjit)
+
+add_definitions(-DALT_JIT)
+add_definitions(-DFEATURE_NO_HOST)
+add_definitions(-DSELF_NO_HOST)
+add_definitions(-DFEATURE_READYTORUN_COMPILER)
+remove_definitions(-DFEATURE_MERGE_JIT_AND_ENGINE)
+
+remove_definitions(-DFEATURE_SIMD)
+remove_definitions(-DFEATURE_AVX_SUPPORT)
+
+add_definitions(-DLEGACY_BACKEND)
+
+remove_definitions(-D_TARGET_X86_=1)
+add_definitions(-D_TARGET_ARM_)
+set(JIT_ARCH_ALTJIT_SOURCES ${JIT_ARM_SOURCES})
+
+if(WIN32)
+  add_definitions(-DFX_VER_INTERNALNAME_STR=legacynonjit.dll)
+endif(WIN32)
+
+add_library_clr(legacynonjit
+   SHARED
+   ${SHARED_LIB_SOURCES}
+   ${JIT_ARCH_ALTJIT_SOURCES}
+)
+
+add_dependencies(legacynonjit jit_exports)
+
+set_property(TARGET legacynonjit APPEND_STRING PROPERTY LINK_FLAGS ${JIT_EXPORTS_LINKER_OPTION})
+set_property(TARGET legacynonjit APPEND_STRING PROPERTY LINK_DEPENDS ${JIT_EXPORTS_FILE})
+
+set(RYUJIT_LINK_LIBRARIES
+   utilcodestaticnohost
+   gcinfo
+)
+
+if(CLR_CMAKE_PLATFORM_UNIX)
+    list(APPEND RYUJIT_LINK_LIBRARIES
+       mscorrc_debug
+       coreclrpal
+       palrt
+    )
+else()
+    list(APPEND RYUJIT_LINK_LIBRARIES
+       ${STATIC_MT_CRT_LIB}
+       ${STATIC_MT_VCRT_LIB}
+       kernel32.lib
+       advapi32.lib
+       ole32.lib
+       oleaut32.lib
+       uuid.lib
+       user32.lib
+       version.lib
+       shlwapi.lib
+       bcrypt.lib
+       crypt32.lib
+       RuntimeObject.lib
+    )
+endif(CLR_CMAKE_PLATFORM_UNIX)
+
+target_link_libraries(legacynonjit
+   ${RYUJIT_LINK_LIBRARIES}
+)
+
+# add the install targets
+install_clr(legacynonjit)
diff --git a/src/jit/legacynonjit/legacynonjit.def b/src/jit/legacynonjit/legacynonjit.def
new file mode 100644 (file)
index 0000000..1603af7
--- /dev/null
@@ -0,0 +1,7 @@
+; Licensed to the .NET Foundation under one or more agreements.
+; The .NET Foundation licenses this file to you under the MIT license.
+; See the LICENSE file in the project root for more information.
+EXPORTS
+    getJit
+    jitStartup
+    sxsJitStartup
index 5015423..912fd36 100644 (file)
@@ -979,7 +979,6 @@ void Lowering::TreeNodeInfoInit(GenTree* tree)
     JITDUMP("TreeNodeInfoInit for: ");
     DISPNODE(tree);
 
-    NYI_IF(tree->TypeGet() == TYP_STRUCT, "lowering struct");
     NYI_IF(tree->TypeGet() == TYP_DOUBLE, "lowering double");
 
     switch (tree->OperGet())
@@ -1444,11 +1443,6 @@ void Lowering::TreeNodeInfoInit(GenTree* tree)
         case GT_LCL_FLD_ADDR:
         case GT_LCL_VAR:
         case GT_LCL_VAR_ADDR:
-        {
-            unsigned   varNum = tree->gtLclVarCommon.gtLclNum;
-            LclVarDsc* varDsc = comp->lvaTable + varNum;
-            NYI_IF(varTypeIsStruct(varDsc), "lowering struct var");
-        }
         case GT_PHYSREG:
         case GT_CLS_VAR_ADDR:
         case GT_IL_OFFSET:
index ed6932e..e209e4c 100644 (file)
@@ -21,6 +21,17 @@ else()
     clr_unknown_arch()
 endif()
 
+if (NOT WIN32)
+    if (CLR_CMAKE_PLATFORM_ARCH_I386)
+        remove_definitions(-DUNIX_X86_ABI)
+    elseif(CLR_CMAKE_PLATFORM_ARCH_AMD64)
+        remove_definitions(-DUNIX_AMD64_ABI)
+        remove_definitions(-DFEATURE_UNIX_AMD64_STRUCT_PASSING)
+    else()
+        clr_unknown_arch()
+    endif()
+endif(NOT WIN32)
+
 if(WIN32)
   add_definitions(-DFX_VER_INTERNALNAME_STR=protononjit.dll)
 endif(WIN32)
index 0b86738..ce6c14e 100644 (file)
@@ -5207,7 +5207,7 @@ HRESULT RegMeta::ValidateAssembly(RID rid)
     dwFlags = (CorAssemblyFlags) pMiniMd->getFlagsOfAssembly(pRecord);
 
     // Validate the flags 
-    invalidAssemblyFlags = dwFlags & (~(afPublicKey | afRetargetable | afPA_FullMask | afEnableJITcompileTracking | afDisableJITcompileOptimizer | afContentType_Mask));
+    invalidAssemblyFlags = dwFlags & (~(afPublicKey | afRetargetable | afPA_FullMask | afDebuggableAttributeMask | afContentType_Mask));
 
     // Validate we only set a legal processor architecture flags
     // The processor architecture flags were introduced in CLR v2.0.
index 9769d5e..0ff4814 100644 (file)
   <data name="Word_At" xml:space="preserve">
     <value>at</value>
   </data>
-  </root>
+  <data name="DebugAssertBanner" xml:space="preserve">
+    <value>---- DEBUG ASSERTION FAILED ----</value>
+  </data>
+  <data name="DebugAssertLongMessage" xml:space="preserve">
+    <value>---- Assert Long Message ----</value>
+  </data>
+  <data name="DebugAssertShortMessage" xml:space="preserve">
+    <value>---- Assert Short Message ----</value>
+  </data>
+</root>
index 489bda3..2153d78 100644 (file)
     <Compile Include="$(BclSourcesRoot)\System\AppContext\AppContextDefaultValues.CoreClrOverrides.cs" />
     <Compile Include="$(BclSourcesRoot)\System\AppContext\AppContextDefaultValues.Defaults.cs" />
     <Compile Include="$(BclSourcesRoot)\System\AppContext\AppContextDefaultValues.Defaults.Central.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\CurrentSystemTimeZone.cs" />
     <Compile Include="$(BclSourcesRoot)\System\CurrentSystemTimeZone.Cache.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\TimeZone.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Object.cs" />
     <Compile Include="$(BclSourcesRoot)\System\ICloneable.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Array.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Boolean.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Buffer.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Byte.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\TypeUnloadedException.cs" />
     <Compile Include="$(BclSourcesRoot)\System\CompatibilitySwitches.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Currency.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Decimal.cs" />
   <ItemGroup>
     <Compile Include="$(BclSourcesRoot)\System\Globalization\BidiCategory.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Globalization\Calendar.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Globalization\CalendarAlgorithmType.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Globalization\CalendarData.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Globalization\CalendarWeekRule.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Globalization\CalendricalCalculationsHelper.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Globalization\CharUnicodeInfo.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Globalization\CharUnicodeInfoData.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Globalization\ChineseLunisolarCalendar.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Globalization\CompareInfo.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Globalization\CompareInfo.Invariant.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Globalization\CultureData.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Globalization\CultureInfo.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Globalization\CultureNotFoundException.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Globalization\CultureTypes.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Globalization\DaylightTime.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Globalization\DateTimeStyles.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Globalization\DigitShapes.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Globalization\EastAsianLunisolarCalendar.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Globalization\GlobalizationMode.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Globalization\GregorianCalendar.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Globalization\GregorianCalendarHelper.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Globalization\GregorianCalendarTypes.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Globalization\HebrewCalendar.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Globalization\HebrewNumber.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Globalization\HijriCalendar.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Globalization\IdnMapping.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Globalization\InternalGlobalizationHelper.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Globalization\JapaneseCalendar.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Globalization\JapaneseLunisolarCalendar.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Globalization\JulianCalendar.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Globalization\KoreanCalendar.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Globalization\KoreanLunisolarCalendar.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Globalization\NumberFormatInfo.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Globalization\NumberStyles.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Globalization\PersianCalendar.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Globalization\RegionInfo.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Globalization\SortKey.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Globalization\SortVersion.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Globalization\StringInfo.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Globalization\TaiwanCalendar.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Globalization\TaiwanLunisolarCalendar.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Globalization\TextElementEnumerator.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Globalization\TextInfo.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Globalization\ThaiBuddhistCalendar.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Globalization\TimeSpanFormat.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Globalization\TimeSpanParse.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Globalization\UmAlQuraCalendar.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Globalization\UnicodeCategory.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Globalization\TimeSpanStyles.cs" />
   </ItemGroup>
   <ItemGroup Condition="'$(FeatureCoreFxGlobalization)' != 'true'">
     <Compile Include="$(BclSourcesRoot)\System\Globalization\EncodingDataItem.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Globalization\JapaneseCalendar.Win32.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Globalization\TextInfo.Windows.cs" />
   </ItemGroup>
-  <ItemGroup Condition="'$(FeatureCoreFxGlobalization)' == 'true' and '$(TargetsUnix)' == 'true'">
+  <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
     <Compile Include="$(BclSourcesRoot)\System\Globalization\EncodingTable.Unix.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Globalization\EncodingDataItem.Unix.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Text\Normalization.Unix.cs" />
-    <Compile Include="$(BclSourcesRoot)\Interop\Unix\System.Globalization.Native\Interop.Calendar.cs" />
-    <Compile Include="$(BclSourcesRoot)\Interop\Unix\System.Globalization.Native\Interop.Casing.cs" />
     <Compile Include="$(BclSourcesRoot)\Interop\Unix\System.Globalization.Native\Interop.Collation.cs" />
     <Compile Include="$(BclSourcesRoot)\Interop\Unix\System.Globalization.Native\Interop.ICU.cs" />
-    <Compile Include="$(BclSourcesRoot)\Interop\Unix\System.Globalization.Native\Interop.Idna.cs" />
-    <Compile Include="$(BclSourcesRoot)\Interop\Unix\System.Globalization.Native\Interop.Locale.cs" />
-    <Compile Include="$(BclSourcesRoot)\Interop\Unix\System.Globalization.Native\Interop.Normalization.cs" />
-    <Compile Include="$(BclSourcesRoot)\Interop\Unix\System.Globalization.Native\Interop.ResultCode.cs" />
-    <Compile Include="$(BclSourcesRoot)\Interop\Unix\System.Globalization.Native\Interop.TimeZoneInfo.cs" />
-    <Compile Include="$(BclSourcesRoot)\Interop\Unix\System.Globalization.Native\Interop.Utils.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Globalization\HijriCalendar.Unix.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Globalization\IdnMapping.Unix.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Globalization\JapaneseCalendar.Unix.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Globalization\LocaleData.Unix.cs" />
   </ItemGroup>
   <ItemGroup>
     <Compile Include="$(BclSourcesRoot)\System\Threading\AbandonedMutexException.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Threading\Tasks\FutureFactory.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Threading\Tasks\Task.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Threading\Tasks\TaskContinuation.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Threading\Tasks\TaskCanceledException.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Threading\Tasks\TaskExtensions.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Threading\Tasks\TaskSchedulerException.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Threading\Tasks\TaskExceptionHolder.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Threading\Tasks\TaskFactory.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Threading\Tasks\TaskScheduler.cs" />
     <Compile Include="$(BclSourcesRoot)\System\IO\PinnedBufferMemoryStream.cs" />
     <Compile Include="$(BclSourcesRoot)\System\IO\SeekOrigin.cs" />
     <Compile Include="$(BclSourcesRoot)\System\IO\Stream.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\IO\StreamHelpers.CopyValidation.cs" />
     <Compile Include="$(BclSourcesRoot)\System\IO\TextReader.cs" Condition="'$(TargetsUnix)' == 'true'" />
     <Compile Include="$(BclSourcesRoot)\System\IO\StreamReader.cs" Condition="'$(TargetsUnix)' == 'true'" />
     <Compile Include="$(BclSourcesRoot)\System\IO\UnmanagedMemoryAccessor.cs" />
   </ItemGroup>
   <ItemGroup>
     <Compile Include="$(BclSourcesRoot)\System\Security\DynamicSecurityMethodAttribute.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Security\SecurityState.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Security\VerificationException.cs" />
   </ItemGroup>
   <ItemGroup>
     <Compile Include="$(BclSourcesRoot)\System\Diagnostics\AssertFilter.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Diagnostics\AssertFilters.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Diagnostics\ConditionalAttribute.cs" />
+    <Compile Include="$(BclSourcesRoot)\System\Diagnostics\Debug.cs" />
+    <Compile Include="$(BclSourcesRoot)\System\Diagnostics\Debug.Unix.cs" Condition="'$(TargetsUnix)' == 'true'" />
+    <Compile Include="$(BclSourcesRoot)\System\Diagnostics\Debug.Windows.cs" Condition="'$(TargetsUnix)' != 'true'" />
+    <Compile Include="$(BclSourcesRoot)\Interop\Windows\kernel32\Interop.OutputDebugString.cs" Condition="'$(TargetsUnix)' != 'true'" />
     <Compile Include="$(BclSourcesRoot)\System\Diagnostics\Debugger.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Diagnostics\DebuggerAttributes.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Diagnostics\ICustomDebuggerNotification.cs" />
     <Compile Include="$(BclSourcesRoot)\Interop\Windows\Normaliz\Interop.Idna.cs" />
     <Compile Include="$(BclSourcesRoot)\Interop\Windows\Normaliz\Interop.Normalization.cs" />
   </ItemGroup>
-  <ItemGroup>
-    <Compile Include="$(BclSourcesRoot)\System\Security\SecureString.cs" />
-  </ItemGroup>
   <ItemGroup Condition="'$(TargetsUnix)' != 'true'">
     <Compile Include="$(BclSourcesRoot)\System\Security\SafeBSTRHandle.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Security\SecureString.Windows.cs" />
     <!-- Interop sources -->
-    <Compile Include="$(BclSourcesRoot)\Interop\Windows\Crypt32\Interop.CryptProtectMemory.cs" />
     <Compile Include="$(BclSourcesRoot)\Interop\Windows\NtDll\Interop.ZeroMemory.cs" />
-    <Compile Include="$(BclSourcesRoot)\Interop\Windows\kernel32\Interop.WideCharToMultiByte.cs" />
     <Compile Include="$(BclSourcesRoot)\Interop\Windows\oleaut32\Interop.SysAllocStringLen.cs" />
     <Compile Include="$(BclSourcesRoot)\Interop\Windows\oleaut32\Interop.SysStringLen.cs" />
   </ItemGroup>
   <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
-    <Compile Include="$(BclSourcesRoot)\System\Security\SecureString.Unix.cs" />
-  </ItemGroup>
-  <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
     <Compile Include="$(BclSourcesRoot)\System\HResults.cs" />
     <Compile Include="$(BclSourcesRoot)\Interop\Unix\System.Native\Interop.GetRandomBytes.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="$(BclSourcesRoot)\Debug.cs" />
+    <Compile Include="$(BclSourcesRoot)\Interop\Unix\System.Native\Interop.SysLog.cs" />
   </ItemGroup>
   <!-- Include additional sources shared files in the compilation -->
   <ItemGroup>
index ed578b3..7c6d039 100644 (file)
@@ -15,6 +15,7 @@
   </PropertyGroup>
   <ItemGroup Condition="$(TargetsWindows)">
     <Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\BCrypt\Interop.BCryptGenRandom.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Crypt32\Interop.CryptProtectMemory.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Interop.BOOL.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Interop.Errors.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Interop.Libraries.cs"/>
@@ -40,6 +41,7 @@
     <Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.SetEndOfFile.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.SetErrorMode.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.SetFilePointerEx.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.WideCharToMultiByte.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.WriteFile_SafeHandle_IntPtr.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.WriteFile_SafeHandle_NativeOverlapped.cs"/>
   </ItemGroup>
     <Compile Include="$(MSBuildThisFileDirectory)Interop\Unix\Interop.Errors.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)Interop\Unix\Interop.IOErrors.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)Interop\Unix\Interop.Libraries.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)Interop\Unix\System.Globalization.Native\Interop.Calendar.cs" Condition="'$(EnableDummyGlobalizationImplementation)' != 'true'"/>
+    <Compile Include="$(MSBuildThisFileDirectory)Interop\Unix\System.Globalization.Native\Interop.Casing.cs" Condition="'$(EnableDummyGlobalizationImplementation)' != 'true'"/>
+    <Compile Include="$(MSBuildThisFileDirectory)Interop\Unix\System.Globalization.Native\Interop.Idna.cs" Condition="'$(EnableDummyGlobalizationImplementation)' != 'true'"/>
+    <Compile Include="$(MSBuildThisFileDirectory)Interop\Unix\System.Globalization.Native\Interop.Locale.cs" Condition="'$(EnableDummyGlobalizationImplementation)' != 'true'"/>
+    <Compile Include="$(MSBuildThisFileDirectory)Interop\Unix\System.Globalization.Native\Interop.Normalization.cs" Condition="'$(EnableDummyGlobalizationImplementation)' != 'true'"/>
+    <Compile Include="$(MSBuildThisFileDirectory)Interop\Unix\System.Globalization.Native\Interop.ResultCode.cs" Condition="'$(EnableDummyGlobalizationImplementation)' != 'true'"/>
+    <Compile Include="$(MSBuildThisFileDirectory)Interop\Unix\System.Globalization.Native\Interop.TimeZoneInfo.cs" Condition="'$(EnableDummyGlobalizationImplementation)' != 'true'"/>
+    <Compile Include="$(MSBuildThisFileDirectory)Interop\Unix\System.Globalization.Native\Interop.Utils.cs" Condition="'$(EnableDummyGlobalizationImplementation)' != 'true'"/>
     <Compile Include="$(MSBuildThisFileDirectory)Interop\Unix\System.Native\Interop.Close.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)Interop\Unix\System.Native\Interop.FLock.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)Interop\Unix\System.Native\Interop.FSync.cs"/>
@@ -73,6 +83,8 @@
     <Compile Include="$(MSBuildThisFileDirectory)System\ArgumentNullException.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\ArithmeticException.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\ArrayTypeMismatchException.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\AssemblyLoadEventArgs.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)System\AssemblyLoadEventHandler.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\AsyncCallback.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\AttributeTargets.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\AttributeUsageAttribute.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\Collections\IStructuralEquatable.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\ComponentModel\EditorBrowsableAttribute.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\Convert.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\CurrentSystemTimeZone.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\DataMisalignedException.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\DateTime.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\DateTimeKind.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\FlagsAttribute.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\FormatException.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\FormattableString.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\Globalization\CalendarAlgorithmType.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\Globalization\CalendarWeekRule.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\Globalization\CalendricalCalculationsHelper.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\Globalization\ChineseLunisolarCalendar.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\Globalization\CultureNotFoundException.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\Globalization\CultureTypes.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\Globalization\DateTimeFormat.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\Globalization\DateTimeFormatInfo.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\Globalization\DateTimeFormatInfoScanner.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\Globalization\DateTimeParse.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\Globalization\DateTimeStyles.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\Globalization\DaylightTime.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\Globalization\DigitShapes.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\Globalization\EastAsianLunisolarCalendar.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\Globalization\GregorianCalendarTypes.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\Globalization\HebrewCalendar.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\Globalization\HebrewNumber.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\Globalization\HijriCalendar.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\Globalization\InternalGlobalizationHelper.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\Globalization\JapaneseCalendar.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\Globalization\JapaneseLunisolarCalendar.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\Globalization\JulianCalendar.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\Globalization\KoreanCalendar.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\Globalization\KoreanLunisolarCalendar.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\Globalization\NumberStyles.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\Globalization\PersianCalendar.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\Globalization\SortVersion.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\Globalization\TaiwanCalendar.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\Globalization\TaiwanLunisolarCalendar.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\Globalization\ThaiBuddhistCalendar.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\Globalization\TimeSpanStyles.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\Globalization\UmAlQuraCalendar.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\Globalization\UnicodeCategory.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\IAsyncResult.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\IComparable.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\IConvertible.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\InvalidProgramException.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\InvalidTimeZoneException.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\IO\Error.cs"/>
-    <Compile Include="$(MSBuildThisFileDirectory)System\IO\FileStream.cs" />
-    <Compile Include="$(MSBuildThisFileDirectory)System\IO\Path.cs" />
-    <Compile Include="$(MSBuildThisFileDirectory)System\IO\PathInternal.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)System\IO\FileStream.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\IO\Path.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\IO\PathInternal.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\IO\StreamHelpers.CopyValidation.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\IObservable.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\IObserver.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\IProgress.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\Reflection\TypeDelegator.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\Reflection\TypeFilter.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\Reflection\TypeInfo.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)System\ResolveEventArgs.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)System\ResolveEventHandler.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\CompilerServices\CompilationRelaxations.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\CompilerServices\CompilerGlobalScopeAttribute.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\CompilerServices\DefaultDependencyAttribute.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\Security\AllowPartiallyTrustedCallersAttribute.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\Security\CryptographicException.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\Security\PartialTrustVisibilityLevel.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\Security\SecureString.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\Security\SecurityCriticalAttribute.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\Security\SecurityCriticalScope.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\Security\SecurityException.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\StringComparison.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\StringSplitOptions.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\SystemException.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\TimeZone.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\Text\Normalization.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\Text\StringBuilder.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\ThreadAttributes.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\Threading\DeferredDisposableLifetime.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\Threading\Tasks\TaskCanceledException.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\Threading\Tasks\TaskExtensions.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\Threading\Tasks\TaskSchedulerException.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\Threading\Timeout.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\ThreadStaticAttribute.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\TimeoutException.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\TypeAccessException.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\TypeCode.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\TypeInitializationException.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\TypeUnloadedException.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\UnauthorizedAccessException.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\UnhandledExceptionEventArgs.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\UnhandledExceptionEventHandler.cs"/>
   </ItemGroup>
   <ItemGroup Condition="$(TargetsUnix)">
     <Compile Include="$(MSBuildThisFileDirectory)Microsoft\Win32\SafeHandles\SafeFileHandle.Unix.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\Globalization\LocaleData.Unix.cs" Condition="'$(EnableDummyGlobalizationImplementation)' != 'true'"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\IO\FileStream.Unix.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\IO\Path.Unix.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\IO\PathInternal.Unix.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\Security\SecureString.Unix.cs"/>
   </ItemGroup>
   <ItemGroup Condition="$(TargetsUnix) and $(TargetsOSX)">
     <Compile Include="$(MSBuildThisFileDirectory)System\IO\FileStream.OSX.cs"/>
diff --git a/src/mscorlib/shared/System/AssemblyLoadEventArgs.cs b/src/mscorlib/shared/System/AssemblyLoadEventArgs.cs
new file mode 100644 (file)
index 0000000..d7e5249
--- /dev/null
@@ -0,0 +1,18 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System.Reflection;
+
+namespace System
+{
+    public class AssemblyLoadEventArgs : EventArgs
+    {
+        public AssemblyLoadEventArgs(Assembly loadedAssembly)
+        {
+            LoadedAssembly = loadedAssembly;
+        }
+
+        public Assembly LoadedAssembly { get; }
+    }
+}
diff --git a/src/mscorlib/shared/System/AssemblyLoadEventHandler.cs b/src/mscorlib/shared/System/AssemblyLoadEventHandler.cs
new file mode 100644 (file)
index 0000000..752379f
--- /dev/null
@@ -0,0 +1,8 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+namespace System
+{
+    public delegate void AssemblyLoadEventHandler(object sender, AssemblyLoadEventArgs args);
+}
@@ -2,8 +2,6 @@
 // The .NET Foundation licenses this file to you under the MIT license.
 // See the LICENSE file in the project root for more information.
 
-using System;
-
 namespace System.Globalization
 {
     public enum CalendarAlgorithmType
@@ -2,8 +2,6 @@
 // The .NET Foundation licenses this file to you under the MIT license.
 // See the LICENSE file in the project root for more information.
 
-using System;
-
 namespace System.Globalization
 {
     [Serializable]
@@ -2,16 +2,10 @@
 // The .NET Foundation licenses this file to you under the MIT license.
 // See the LICENSE file in the project root for more information.
 
-using System;
 using System.Diagnostics.Contracts;
 
 namespace System.Globalization
 {
-    ////////////////////////////////////////////////////////////////////////////
-    //
-    //  Notes about ChineseLunisolarCalendar
-    //
-    ////////////////////////////////////////////////////////////////////////////
     /*
     **  Calendar support range:
     **      Calendar               Minimum             Maximum
@@ -2,14 +2,12 @@
 // The .NET Foundation licenses this file to you under the MIT license.
 // See the LICENSE file in the project root for more information.
 
-using System;
 using System.Runtime.Serialization;
-using System.Threading;
 
 namespace System.Globalization
 {
     [Serializable]
-    public class CultureNotFoundException : ArgumentException, ISerializable
+    public class CultureNotFoundException : ArgumentException
     {
         private string _invalidCultureName; // unrecognized culture name
         private int? _invalidCultureId;     // unrecognized culture Lcid
diff --git a/src/mscorlib/shared/System/Globalization/CultureTypes.cs b/src/mscorlib/shared/System/Globalization/CultureTypes.cs
new file mode 100644 (file)
index 0000000..f52ac82
--- /dev/null
@@ -0,0 +1,27 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+// The enumeration constants used in CultureInfo.GetCultures().
+// On Linux platforms, the only enum values used there is NeutralCultures and SpecificCultures 
+// the rest are obsolete or not valid on Linux
+
+namespace System.Globalization
+{
+    [Flags]
+    public enum CultureTypes
+    {
+        NeutralCultures = 0x0001, // Neutral cultures are cultures like "en", "de", "zh", etc, for enumeration this includes ALL neutrals regardless of other flags
+        SpecificCultures = 0x0002, // Non-netural cultuers.  Examples are "en-us", "zh-tw", etc., for enumeration this includes ALL specifics regardless of other flags
+        InstalledWin32Cultures = 0x0004, // Win32 installed cultures in the system and exists in the framework too., this is effectively all cultures
+
+        AllCultures = NeutralCultures | SpecificCultures | InstalledWin32Cultures,
+
+        UserCustomCulture = 0x0008, // User defined custom culture
+        ReplacementCultures = 0x0010, // User defined replacement custom culture.
+        [Obsolete("This value has been deprecated.  Please use other values in CultureTypes.")]
+        WindowsOnlyCultures = 0x0020, // this will always return empty list.
+        [Obsolete("This value has been deprecated.  Please use other values in CultureTypes.")]
+        FrameworkCultures = 0x0040, // will return only the v2 cultures marked as Framework culture.
+    }
+}
index d3bf255..840409f 100644 (file)
@@ -2,16 +2,11 @@
 // The .NET Foundation licenses this file to you under the MIT license.
 // See the LICENSE file in the project root for more information.
 
-using System.Text;
-using System.Threading;
-using System.Globalization;
 using System.Collections.Generic;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Runtime.Versioning;
-using System.Security;
 using System.Diagnostics;
 using System.Diagnostics.Contracts;
+using System.Globalization;
+using System.Text;
 
 namespace System
 {
index ddf7d7e..15af1b7 100644 (file)
@@ -19,9 +19,6 @@
 //
 ////////////////////////////////////////////////////////////////////////////
 
-using System;
-using System.Globalization;
-using System.Collections;
 using System.Collections.Generic;
 using System.Text;
 
index 857ffc6..910fbf2 100644 (file)
@@ -2,33 +2,14 @@
 // The .NET Foundation licenses this file to you under the MIT license.
 // See the LICENSE file in the project root for more information.
 
-////////////////////////////////////////////////////////////////////////////
-//
-//
-//  Purpose:  This class is called by DateTime to parse a date/time string.
-//
-////////////////////////////////////////////////////////////////////////////
+using System.Diagnostics;
+using System.Diagnostics.Contracts;
+using System.Globalization;
+using System.Text;
 
 namespace System
 {
-    using System;
-    using System.Text;
-    using System.Globalization;
-    using System.Threading;
-    using System.Collections;
-    using System.Runtime.CompilerServices;
-    using System.Runtime.InteropServices;
-    using System.Runtime.Versioning;
-    using System.Security;
-    using System.Diagnostics;
-    using System.Diagnostics.Contracts;
-
-    ////////////////////////////////////////////////////////////////////////
-
-    //This class contains only static members
-
-    internal static
-    class DateTimeParse
+    internal static class DateTimeParse
     {
         internal const Int32 MaxDateTimeNumberDigits = 8;
 
@@ -2,8 +2,6 @@
 // The .NET Foundation licenses this file to you under the MIT license.
 // See the LICENSE file in the project root for more information.
 
-using System;
-
 namespace System.Globalization
 {
     // This class represents a starting/ending time for a period of daylight saving time.
@@ -2,13 +2,8 @@
 // The .NET Foundation licenses this file to you under the MIT license.
 // See the LICENSE file in the project root for more information.
 
-//
-// The enumeration constants used in NumberFormatInfo.DigitSubstitution.
-//
-
 namespace System.Globalization
 {
-    [Serializable]
     public enum DigitShapes : int
     {
         Context         = 0x0000,   // The shape depends on the previous text in the same output.
@@ -2,17 +2,10 @@
 // The .NET Foundation licenses this file to you under the MIT license.
 // See the LICENSE file in the project root for more information.
 
-using System;
 using System.Diagnostics.Contracts;
 
 namespace System.Globalization
 {
-    ////////////////////////////////////////////////////////////////////////////
-    //
-    //  Notes about EastAsianLunisolarCalendar
-    //
-    ////////////////////////////////////////////////////////////////////////////
-
     [Serializable]
     public abstract class EastAsianLunisolarCalendar : Calendar
     {
@@ -2,8 +2,6 @@
 // The .NET Foundation licenses this file to you under the MIT license.
 // See the LICENSE file in the project root for more information.
 
-using System;
-
 namespace System.Globalization
 {
     // Note: The values of the members of this enum must match the coresponding values
@@ -2,8 +2,6 @@
 // The .NET Foundation licenses this file to you under the MIT license.
 // See the LICENSE file in the project root for more information.
 
-using System;
-using System.Runtime.Versioning;
 using System.Diagnostics.Contracts;
 
 namespace System.Globalization
@@ -2,11 +2,9 @@
 // The .NET Foundation licenses this file to you under the MIT license.
 // See the LICENSE file in the project root for more information.
 
-using System;
-
 namespace System.Globalization
 {
-    internal class InternalGloablizationHelper
+    internal class InternalGlobalizationHelper
     {
         // Copied from the TimeSpan to be used inside the globalization code and avoid internal dependancy on TimeSpan class
         internal static long TimeToTicks(int hour, int minute, int second)
@@ -2,8 +2,6 @@
 // The .NET Foundation licenses this file to you under the MIT license.
 // See the LICENSE file in the project root for more information.
 
-using System;
-using System.Diagnostics;
 using System.Diagnostics.CodeAnalysis;
 using System.Diagnostics.Contracts;
 
@@ -2,16 +2,10 @@
 // The .NET Foundation licenses this file to you under the MIT license.
 // See the LICENSE file in the project root for more information.
 
-using System;
 using System.Diagnostics.Contracts;
 
 namespace System.Globalization
 {
-    ////////////////////////////////////////////////////////////////////////////
-    //
-    //  Notes about JapaneseLunisolarCalendar
-    //
-    ////////////////////////////////////////////////////////////////////////////
     /*
     **  Calendar support range:
     **      Calendar               Minimum             Maximum
@@ -2,7 +2,6 @@
 // The .NET Foundation licenses this file to you under the MIT license.
 // See the LICENSE file in the project root for more information.
 
-using System;
 using System.Diagnostics.Contracts;
 
 namespace System.Globalization
@@ -2,7 +2,6 @@
 // The .NET Foundation licenses this file to you under the MIT license.
 // See the LICENSE file in the project root for more information.
 
-using System;
 using System.Diagnostics.CodeAnalysis;
 using System.Diagnostics.Contracts;
 
@@ -2,16 +2,10 @@
 // The .NET Foundation licenses this file to you under the MIT license.
 // See the LICENSE file in the project root for more information.
 
-using System;
 using System.Diagnostics.Contracts;
 
 namespace System.Globalization
 {
-    ////////////////////////////////////////////////////////////////////////////
-    //
-    //  Notes about KoreanLunisolarCalendar
-    //
-    ////////////////////////////////////////////////////////////////////////////
     /*
     **  Calendar support range:
     **      Calendar               Minimum             Maximum
 **
 ===========================================================*/
 
-using System;
-
 namespace System.Globalization
 {
-    [Serializable]
     [Flags]
     public enum NumberStyles
     {
@@ -7,11 +7,6 @@ using System.Diagnostics.Contracts;
 
 namespace System.Globalization
 {
-    ////////////////////////////////////////////////////////////////////////////
-    //
-    //  Notes about PersianCalendar
-    //
-    ////////////////////////////////////////////////////////////////////////////
     // Modern Persian calendar is a solar observation based calendar. Each new year begins on the day when the vernal equinox occurs before noon.
     // The epoch is the date of the vernal equinox prior to the epoch of the Islamic calendar (March 19, 622 Julian or March 22, 622 Gregorian)
 
@@ -2,9 +2,6 @@
 // The .NET Foundation licenses this file to you under the MIT license.
 // See the LICENSE file in the project root for more information.
 
-using System;
-using System.Diagnostics.Contracts;
-
 namespace System.Globalization
 {
     [Serializable]
@@ -7,17 +7,12 @@ using System.Diagnostics.Contracts;
 
 namespace System.Globalization
 {
-    ////////////////////////////////////////////////////////////////////////////
-    //
-    //  Notes about TaiwanLunisolarCalendar
-    //
-    ////////////////////////////////////////////////////////////////////////////
     /*
     **  Calendar support range:
-    **      Calendar               Minimum             Maximum
-    **      ==========     ==========  ==========
-    **      Gregorian              1912/02/18          2051/02/10
-    **      TaiwanLunisolar     1912/01/01          2050/13/29
+    **      Calendar            Minimum     Maximum
+    **      ==========          ==========  ==========
+    **      Gregorian           1912/02/18  2051/02/10
+    **      TaiwanLunisolar     1912/01/01  2050/13/29
     */
 
     [Serializable]
@@ -7,11 +7,6 @@ using System.Diagnostics.Contracts;
 
 namespace System.Globalization
 {
-    ////////////////////////////////////////////////////////////////////////////
-    //
-    //  Notes about UmAlQuraCalendar
-    //
-    ////////////////////////////////////////////////////////////////////////////
     /*
     **  Calendar support range:
     **      Calendar    Minimum     Maximum
@@ -4,67 +4,37 @@
 
 namespace System.Globalization
 {
-    [Serializable]
     public enum UnicodeCategory
     {
         UppercaseLetter = 0,
-
         LowercaseLetter = 1,
-
         TitlecaseLetter = 2,
-
         ModifierLetter = 3,
-
         OtherLetter = 4,
-
         NonSpacingMark = 5,
-
         SpacingCombiningMark = 6,
-
         EnclosingMark = 7,
-
         DecimalDigitNumber = 8,
-
         LetterNumber = 9,
-
         OtherNumber = 10,
-
         SpaceSeparator = 11,
-
         LineSeparator = 12,
-
         ParagraphSeparator = 13,
-
         Control = 14,
-
         Format = 15,
-
         Surrogate = 16,
-
         PrivateUse = 17,
-
         ConnectorPunctuation = 18,
-
         DashPunctuation = 19,
-
         OpenPunctuation = 20,
-
         ClosePunctuation = 21,
-
         InitialQuotePunctuation = 22,
-
         FinalQuotePunctuation = 23,
-
         OtherPunctuation = 24,
-
         MathSymbol = 25,
-
         CurrencySymbol = 26,
-
         ModifierSymbol = 27,
-
         OtherSymbol = 28,
-
         OtherNotAssigned = 29,
     }
 }
diff --git a/src/mscorlib/shared/System/ResolveEventArgs.cs b/src/mscorlib/shared/System/ResolveEventArgs.cs
new file mode 100644 (file)
index 0000000..6196947
--- /dev/null
@@ -0,0 +1,25 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System.Reflection;
+
+namespace System
+{
+    public class ResolveEventArgs : EventArgs
+    {
+        public ResolveEventArgs(string name)
+        {
+            Name = name;
+        }
+
+        public ResolveEventArgs(string name, Assembly requestingAssembly)
+        {
+            Name = name;
+            RequestingAssembly = requestingAssembly;
+        }
+
+        public string Name { get; }
+        public Assembly RequestingAssembly { get; }
+    }
+}
diff --git a/src/mscorlib/shared/System/ResolveEventHandler.cs b/src/mscorlib/shared/System/ResolveEventHandler.cs
new file mode 100644 (file)
index 0000000..cb9af5d
--- /dev/null
@@ -0,0 +1,10 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System.Reflection;
+
+namespace System
+{
+    public delegate Assembly ResolveEventHandler(object sender, ResolveEventArgs args);
+}
@@ -2,16 +2,6 @@
 // The .NET Foundation licenses this file to you under the MIT license.
 // See the LICENSE file in the project root for more information.
 
-/*=============================================================================
-**
-**
-**
-** Purpose: Exception class for attempt to access an unloaded class
-**
-**
-=============================================================================*/
-
-
 using System.Runtime.Serialization;
 
 namespace System
@@ -25,13 +15,13 @@ namespace System
             SetErrorCode(__HResults.COR_E_TYPEUNLOADED);
         }
 
-        public TypeUnloadedException(String message)
+        public TypeUnloadedException(string message)
             : base(message)
         {
             SetErrorCode(__HResults.COR_E_TYPEUNLOADED);
         }
 
-        public TypeUnloadedException(String message, Exception innerException)
+        public TypeUnloadedException(string message, Exception innerException)
             : base(message, innerException)
         {
             SetErrorCode(__HResults.COR_E_TYPEUNLOADED);
@@ -40,7 +30,8 @@ namespace System
         //
         // This constructor is required for serialization;
         //
-        protected TypeUnloadedException(SerializationInfo info, StreamingContext context) : base(info, context)
+        protected TypeUnloadedException(SerializationInfo info, StreamingContext context)
+            : base(info, context)
         {
         }
     }
diff --git a/src/mscorlib/src/Debug.cs b/src/mscorlib/src/Debug.cs
deleted file mode 100644 (file)
index 35cb680..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System.Diagnostics;
-
-namespace System
-{
-    internal static class Debug
-    {
-        [Conditional("_DEBUG")]
-        static public void Assert(bool condition)
-        {
-            BCLDebug.Assert(condition);
-        }
-
-        [Conditional("_DEBUG")]
-        static public void Assert(bool condition, string message)
-        {
-            BCLDebug.Assert(condition, message);
-        }
-
-        [Conditional("_DEBUG")]
-        static public void Fail(string message)
-        {
-            BCLDebug.Assert(false, message);
-        }
-    }
-}
index 5cd2ee5..fe14560 100644 (file)
@@ -3,6 +3,7 @@
 // See the LICENSE file in the project root for more information.
 
 using System;
+using System.Diagnostics;
 using System.Globalization;
 using System.Runtime.InteropServices;
 using System.Security;
diff --git a/src/mscorlib/src/Interop/Unix/System.Native/Interop.SysLog.cs b/src/mscorlib/src/Interop/Unix/System.Native/Interop.SysLog.cs
new file mode 100644 (file)
index 0000000..6b6a74b
--- /dev/null
@@ -0,0 +1,58 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System.Runtime.InteropServices;
+
+internal static partial class Interop
+{
+    internal static partial class Sys
+    {
+        internal enum SysLogPriority : int
+        {
+            // Priorities
+            LOG_EMERG       = 0,        /* system is unusable */
+            LOG_ALERT       = 1,        /* action must be taken immediately */
+            LOG_CRIT        = 2,        /* critical conditions */
+            LOG_ERR         = 3,        /* error conditions */
+            LOG_WARNING     = 4,        /* warning conditions */
+            LOG_NOTICE      = 5,        /* normal but significant condition */
+            LOG_INFO        = 6,        /* informational */
+            LOG_DEBUG       = 7,        /* debug-level messages */
+            // Facilities
+            LOG_KERN        = (0<<3),   /* kernel messages */
+            LOG_USER        = (1<<3),   /* random user-level messages */
+            LOG_MAIL        = (2<<3),   /* mail system */
+            LOG_DAEMON      = (3<<3),   /* system daemons */
+            LOG_AUTH        = (4<<3),   /* authorization messages */
+            LOG_SYSLOG      = (5<<3),   /* messages generated internally by syslogd */
+            LOG_LPR         = (6<<3),   /* line printer subsystem */
+            LOG_NEWS        = (7<<3),   /* network news subsystem */
+            LOG_UUCP        = (8<<3),   /* UUCP subsystem */
+            LOG_CRON        = (9<<3),   /* clock daemon */
+            LOG_AUTHPRIV    = (10<<3),  /* authorization messages (private) */
+            LOG_FTP         = (11<<3),  /* ftp daemon */
+            // Between FTP and Local is reserved for system use
+            LOG_LOCAL0      = (16<<3),  /* reserved for local use */
+            LOG_LOCAL1      = (17<<3),  /* reserved for local use */
+            LOG_LOCAL2      = (18<<3),  /* reserved for local use */
+            LOG_LOCAL3      = (19<<3),  /* reserved for local use */
+            LOG_LOCAL4      = (20<<3),  /* reserved for local use */
+            LOG_LOCAL5      = (21<<3),  /* reserved for local use */
+            LOG_LOCAL6      = (22<<3),  /* reserved for local use */
+            LOG_LOCAL7      = (23<<3),  /* reserved for local use */
+        }
+
+        /// <summary>
+        /// Write a message to the system logger, which in turn writes the message to the system console, log files, etc. 
+        /// See man 3 syslog for more info
+        /// </summary>
+        /// <param name="priority">
+        /// The OR of a priority and facility in the SysLogPriority enum to declare the priority and facility of the log entry
+        /// </param>
+        /// <param name="message">The message to put in the log entry</param>
+        /// <param name="arg1">Like printf, the argument is passed to the variadic part of the C++ function to wildcards in the message</param>
+        [DllImport(Libraries.SystemNative, EntryPoint = "SystemNative_SysLog")]
+        internal static extern void SysLog(SysLogPriority priority, string message, string arg1);
+    }
+}
diff --git a/src/mscorlib/src/Interop/Windows/kernel32/Interop.OutputDebugString.cs b/src/mscorlib/src/Interop/Windows/kernel32/Interop.OutputDebugString.cs
new file mode 100644 (file)
index 0000000..8da50ff
--- /dev/null
@@ -0,0 +1,14 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System.Runtime.InteropServices;
+
+internal partial class Interop
+{
+    internal partial class Kernel32
+    {
+        [DllImport(Interop.Libraries.Kernel32, CharSet = CharSet.Unicode, EntryPoint = "OutputDebugStringW", ExactSpelling = true)]
+        internal static extern void OutputDebugString(string message);
+    }
+}
index 8408937..ee0eb25 100644 (file)
@@ -971,5 +971,15 @@ namespace Microsoft.Win32
 #else
         private const int BCRYPT_USE_SYSTEM_PREFERRED_RNG = 0x00000002;
 #endif
+
+        internal const byte VER_GREATER_EQUAL = 0x3;
+        internal const uint VER_MAJORVERSION = 0x0000002;
+        internal const uint VER_MINORVERSION = 0x0000001;
+        internal const uint VER_SERVICEPACKMAJOR = 0x0000020;
+        internal const uint VER_SERVICEPACKMINOR = 0x0000010;
+        [DllImport("kernel32.dll")]
+        internal static extern bool VerifyVersionInfoW([In, Out] OSVERSIONINFOEX lpVersionInfo, uint dwTypeMask, ulong dwlConditionMask);
+        [DllImport("kernel32.dll")]
+        internal static extern ulong VerSetConditionMask(ulong dwlConditionMask, uint dwTypeBitMask, byte dwConditionMask);        
     }
 }
index 8933896..7d2f2ce 100644 (file)
@@ -37,63 +37,6 @@ namespace System
     using System.Diagnostics.Contracts;
     using System.Runtime.ExceptionServices;
 
-    public class ResolveEventArgs : EventArgs
-    {
-        private String _Name;
-        private Assembly _RequestingAssembly;
-
-        public String Name
-        {
-            get
-            {
-                return _Name;
-            }
-        }
-
-        public Assembly RequestingAssembly
-        {
-            get
-            {
-                return _RequestingAssembly;
-            }
-        }
-
-        public ResolveEventArgs(String name)
-        {
-            _Name = name;
-        }
-
-        public ResolveEventArgs(String name, Assembly requestingAssembly)
-        {
-            _Name = name;
-            _RequestingAssembly = requestingAssembly;
-        }
-    }
-
-    public class AssemblyLoadEventArgs : EventArgs
-    {
-        private Assembly _LoadedAssembly;
-
-        public Assembly LoadedAssembly
-        {
-            get
-            {
-                return _LoadedAssembly;
-            }
-        }
-
-        public AssemblyLoadEventArgs(Assembly loadedAssembly)
-        {
-            _LoadedAssembly = loadedAssembly;
-        }
-    }
-
-    [Serializable]
-    public delegate Assembly ResolveEventHandler(Object sender, ResolveEventArgs args);
-
-    [Serializable]
-    public delegate void AssemblyLoadEventHandler(Object sender, AssemblyLoadEventArgs args);
-
     [Serializable]
     internal delegate void AppDomainInitializer(string[] args);
 
index 1c7fb08..830de29 100644 (file)
@@ -55,10 +55,5 @@ namespace System
                 return AppDomain.CurrentDomain.DomainManager;
             }
         }
-
-        public virtual bool CheckSecuritySettings(SecurityState state)
-        {
-            return false;
-        }
     }
 }
index 1e127e3..e0118c2 100644 (file)
@@ -15,6 +15,7 @@
 
 using System.Collections;
 using System.Collections.Generic;
+using System.Diagnostics;
 using System.Diagnostics.Contracts;
 
 namespace System
diff --git a/src/mscorlib/src/System/Diagnostics/Debug.Unix.cs b/src/mscorlib/src/System/Diagnostics/Debug.Unix.cs
new file mode 100644 (file)
index 0000000..495f2f7
--- /dev/null
@@ -0,0 +1,95 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using Microsoft.Win32.SafeHandles;
+
+namespace System.Diagnostics
+{
+    public static partial class Debug
+    {
+        private static readonly bool s_shouldWriteToStdErr = Environment.GetEnvironmentVariable("COMPlus_DebugWriteToStdErr") == "1";
+
+        private static void ShowAssertDialog(string stackTrace, string message, string detailMessage)
+        {
+            if (Debugger.IsAttached)
+            {
+                Debugger.Break();
+            }
+            else
+            {
+                // In Core, we do not show a dialog.
+                // Fail in order to avoid anyone catching an exception and masking
+                // an assert failure.
+                var ex = new DebugAssertException(message, detailMessage, stackTrace);
+                Environment.FailFast(ex.Message, ex);
+            }
+        }
+
+        private static void WriteCore(string message)
+        {
+            WriteToDebugger(message);
+
+            if (s_shouldWriteToStdErr)
+            {
+                WriteToStderr(message);
+            }
+        }
+
+        private static void WriteToDebugger(string message)
+        {
+            if (Debugger.IsLogging())
+            {
+                Debugger.Log(0, null, message);
+            }
+            else
+            {
+                Interop.Sys.SysLog(Interop.Sys.SysLogPriority.LOG_USER | Interop.Sys.SysLogPriority.LOG_DEBUG, "%s", message);
+            }
+        }
+
+        private static void WriteToStderr(string message)
+        {
+            // We don't want to write UTF-16 to a file like standard error.  Ideally we would transcode this
+            // to UTF8, but the downside of that is it pulls in a bunch of stuff into what is ideally
+            // a path with minimal dependencies (as to prevent re-entrency), so we'll take the strategy
+            // of just throwing away any non ASCII characters from the message and writing the rest
+
+            const int BufferLength = 256;
+
+            unsafe
+            {
+                byte* buf = stackalloc byte[BufferLength];
+                int bufCount;
+                int i = 0;
+
+                while (i < message.Length)
+                {
+                    for (bufCount = 0; bufCount < BufferLength && i < message.Length; i++)
+                    {
+                        if (message[i] <= 0x7F)
+                        {
+                            buf[bufCount] = (byte)message[i];
+                            bufCount++;
+                        }
+                    }
+
+                    int totalBytesWritten = 0;
+                    while (bufCount > 0)
+                    {
+                        int bytesWritten = Interop.Sys.Write(2 /* stderr */, buf + totalBytesWritten, bufCount);
+                        if (bytesWritten < 0)
+                        {
+                            // On error, simply stop writing the debug output.  This could commonly happen if stderr
+                            // was piped to a program that ended before this program did, resulting in EPIPE errors.
+                            return;
+                        }
+
+                        bufCount -= bytesWritten;
+                        totalBytesWritten += bytesWritten;
+                    }
+                }
+            }
+        }
+    }
+}
diff --git a/src/mscorlib/src/System/Diagnostics/Debug.Windows.cs b/src/mscorlib/src/System/Diagnostics/Debug.Windows.cs
new file mode 100644 (file)
index 0000000..095e9b6
--- /dev/null
@@ -0,0 +1,63 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+namespace System.Diagnostics
+{
+    public static partial class Debug
+    {
+        private static void ShowAssertDialog(string stackTrace, string message, string detailMessage)
+        {
+            if (Debugger.IsAttached)
+            {
+                Debugger.Break();
+            }
+            else
+            {
+                // In Core, we do not show a dialog.
+                // Fail in order to avoid anyone catching an exception and masking
+                // an assert failure.
+                var ex = new DebugAssertException(message, detailMessage, stackTrace);
+                Environment.FailFast(ex.Message, ex);
+            }
+        }
+
+        private static void WriteCore(string message)
+        {
+            // really huge messages mess up both VS and dbmon, so we chop it up into 
+            // reasonable chunks if it's too big. This is the number of characters 
+            // that OutputDebugstring chunks at.
+            const int WriteChunkLength = 4091;
+
+            // We don't want output from multiple threads to be interleaved.
+            lock (s_ForLock)
+            {
+                if (message == null || message.Length <= WriteChunkLength)
+                {
+                    WriteToDebugger(message);
+                }
+                else
+                {
+                    int offset;
+                    for (offset = 0; offset < message.Length - WriteChunkLength; offset += WriteChunkLength)
+                    {
+                        WriteToDebugger(message.Substring(offset, WriteChunkLength));
+                    }
+                    WriteToDebugger(message.Substring(offset));
+                }
+            }
+        }
+
+        private static void WriteToDebugger(string message)
+        {
+            if (Debugger.IsLogging())
+            {
+                Debugger.Log(0, null, message);
+            }
+            else
+            {
+                Interop.Kernel32.OutputDebugString(message ?? string.Empty);
+            }
+        }
+    }
+}
diff --git a/src/mscorlib/src/System/Diagnostics/Debug.cs b/src/mscorlib/src/System/Diagnostics/Debug.cs
new file mode 100644 (file)
index 0000000..59f3c37
--- /dev/null
@@ -0,0 +1,323 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+// Do not remove this, it is needed to retain calls to these conditional methods in release builds
+#define DEBUG
+
+namespace System.Diagnostics
+{
+    /// <summary>
+    /// Provides a set of properties and methods for debugging code.
+    /// </summary>
+    public static partial class Debug
+    {
+        private static readonly object s_lock = new object();
+
+        public static bool AutoFlush { get { return true; } set { } }
+
+        [ThreadStatic]
+        private static int s_indentLevel;
+        public static int IndentLevel
+        {
+            get
+            {
+                return s_indentLevel;
+            }
+            set
+            {
+                s_indentLevel = value < 0 ? 0 : value;
+            }
+        }
+
+        private static int s_indentSize = 4;
+        public static int IndentSize
+        {
+            get
+            {
+                return s_indentSize;
+            }
+            set
+            {
+                s_indentSize = value < 0 ? 0 : value;
+            }
+        }
+
+        [System.Diagnostics.Conditional("DEBUG")]
+        public static void Close() { }
+
+        [System.Diagnostics.Conditional("DEBUG")]
+        public static void Flush() { }
+
+        [System.Diagnostics.Conditional("DEBUG")]
+        public static void Indent()
+        {
+            IndentLevel++;
+        }
+
+        [System.Diagnostics.Conditional("DEBUG")]
+        public static void Unindent()
+        {
+            IndentLevel--;
+        }
+
+        [System.Diagnostics.Conditional("DEBUG")]
+        public static void Print(string message)
+        {
+            Write(message);
+        }
+
+        [System.Diagnostics.Conditional("DEBUG")]
+        public static void Print(string format, params object[] args)
+        {
+            Write(string.Format(null, format, args));
+        }
+
+        private static readonly object s_ForLock = new Object();
+
+        [System.Diagnostics.Conditional("DEBUG")]
+        public static void Assert(bool condition)
+        {
+            Assert(condition, string.Empty, string.Empty);
+        }
+
+        [System.Diagnostics.Conditional("DEBUG")]
+        public static void Assert(bool condition, string message)
+        {
+            Assert(condition, message, string.Empty);
+        }
+
+        [System.Diagnostics.Conditional("DEBUG")]
+        public static void Assert(bool condition, string message, string detailMessage)
+        {
+            if (!condition)
+            {
+                string stackTrace;
+
+                try
+                {
+                    stackTrace = Internal.Runtime.Augments.EnvironmentAugments.StackTrace;
+                }
+                catch
+                {
+                    stackTrace = "";
+                }
+
+                WriteLine(FormatAssert(stackTrace, message, detailMessage));
+                s_ShowAssertDialog(stackTrace, message, detailMessage);
+            }
+        }
+
+        [System.Diagnostics.Conditional("DEBUG")]
+        public static void Fail(string message)
+        {
+            Assert(false, message, string.Empty);
+        }
+
+        [System.Diagnostics.Conditional("DEBUG")]
+        public static void Fail(string message, string detailMessage)
+        {
+            Assert(false, message, detailMessage);
+        }
+
+        private static string FormatAssert(string stackTrace, string message, string detailMessage)
+        {
+            string newLine = GetIndentString() + Environment.NewLine;
+            return SR.DebugAssertBanner + newLine
+                   + SR.DebugAssertShortMessage + newLine
+                   + message + newLine
+                   + SR.DebugAssertLongMessage + newLine
+                   + detailMessage + newLine
+                   + stackTrace;
+        }
+
+        [System.Diagnostics.Conditional("DEBUG")]
+        public static void Assert(bool condition, string message, string detailMessageFormat, params object[] args)
+        {
+            Assert(condition, message, string.Format(detailMessageFormat, args));
+        }
+
+        [System.Diagnostics.Conditional("DEBUG")]
+        public static void WriteLine(string message)
+        {
+            Write(message + Environment.NewLine);
+        }
+
+        [System.Diagnostics.Conditional("DEBUG")]
+        public static void Write(string message)
+        {
+            lock (s_lock)
+            {
+                if (message == null)
+                {
+                    s_WriteCore(string.Empty);
+                    return;
+                }
+                if (s_needIndent)
+                {
+                    message = GetIndentString() + message;
+                    s_needIndent = false;
+                }
+                s_WriteCore(message);
+                if (message.EndsWith(Environment.NewLine))
+                {
+                    s_needIndent = true;
+                }
+            }
+        }
+
+        [System.Diagnostics.Conditional("DEBUG")]
+        public static void WriteLine(object value)
+        {
+            WriteLine(value?.ToString());
+        }
+
+        [System.Diagnostics.Conditional("DEBUG")]
+        public static void WriteLine(object value, string category)
+        {
+            WriteLine(value?.ToString(), category);
+        }
+
+        [System.Diagnostics.Conditional("DEBUG")]
+        public static void WriteLine(string format, params object[] args)
+        {
+            WriteLine(string.Format(null, format, args));
+        }
+
+        [System.Diagnostics.Conditional("DEBUG")]
+        public static void WriteLine(string message, string category)
+        {
+            if (category == null)
+            {
+                WriteLine(message);
+            }
+            else
+            {
+                WriteLine(category + ":" + message);
+            }
+        }
+
+        [System.Diagnostics.Conditional("DEBUG")]
+        public static void Write(object value)
+        {
+            Write(value?.ToString());
+        }
+
+        [System.Diagnostics.Conditional("DEBUG")]
+        public static void Write(string message, string category)
+        {
+            if (category == null)
+            {
+                Write(message);
+            }
+            else
+            {
+                Write(category + ":" + message);
+            }
+        }
+
+        [System.Diagnostics.Conditional("DEBUG")]
+        public static void Write(object value, string category)
+        {
+            Write(value?.ToString(), category);
+        }
+
+        [System.Diagnostics.Conditional("DEBUG")]
+        public static void WriteIf(bool condition, string message)
+        {
+            if (condition)
+            {
+                Write(message);
+            }
+        }
+
+        [System.Diagnostics.Conditional("DEBUG")]
+        public static void WriteIf(bool condition, object value)
+        {
+            if (condition)
+            {
+                Write(value);
+            }
+        }
+
+        [System.Diagnostics.Conditional("DEBUG")]
+        public static void WriteIf(bool condition, string message, string category)
+        {
+            if (condition)
+            {
+                Write(message, category);
+            }
+        }
+
+        [System.Diagnostics.Conditional("DEBUG")]
+        public static void WriteIf(bool condition, object value, string category)
+        {
+            if (condition)
+            {
+                Write(value, category);
+            }
+        }
+
+        [System.Diagnostics.Conditional("DEBUG")]
+        public static void WriteLineIf(bool condition, object value)
+        {
+            if (condition)
+            {
+                WriteLine(value);
+            }
+        }
+
+        [System.Diagnostics.Conditional("DEBUG")]
+        public static void WriteLineIf(bool condition, object value, string category)
+        {
+            if (condition)
+            {
+                WriteLine(value, category);
+            }
+        }
+
+        [System.Diagnostics.Conditional("DEBUG")]
+        public static void WriteLineIf(bool condition, string message)
+        {
+            if (condition)
+            {
+                WriteLine(message);
+            }
+        }
+
+        [System.Diagnostics.Conditional("DEBUG")]
+        public static void WriteLineIf(bool condition, string message, string category)
+        {
+            if (condition)
+            {
+                WriteLine(message, category);
+            }
+        }
+
+        private static bool s_needIndent;
+
+        private static string s_indentString;
+
+        private static string GetIndentString()
+        {
+            int indentCount = IndentSize * IndentLevel;
+            if (s_indentString?.Length == indentCount)
+            {
+                return s_indentString;
+            }
+            return s_indentString = new string(' ', indentCount);
+        }
+
+        private sealed class DebugAssertException : Exception
+        {
+            internal DebugAssertException(string message, string detailMessage, string stackTrace) :
+                base(message + Environment.NewLine + detailMessage + Environment.NewLine + stackTrace)
+            {
+            }
+        }
+
+        // internal and not readonly so that the tests can swap this out.
+        internal static Action<string, string, string> s_ShowAssertDialog = ShowAssertDialog;
+        internal static Action<string> s_WriteCore = WriteCore;
+    }
+}
index 3668d8c..1d5830c 100644 (file)
@@ -1470,8 +1470,7 @@ namespace System.Diagnostics.Tracing
 #if (!ES_BUILD_STANDALONE && !PROJECTN)
                 // API available on OS >= Win 8 and patched Win 7.
                 // Disable only for FrameworkEventSource to avoid recursion inside exception handling.
-                var osVer = Environment.OSVersion.Version.Major * 10 + Environment.OSVersion.Version.Minor;
-                if (this.Name != "System.Diagnostics.Eventing.FrameworkEventSource" || osVer >= 62)
+                if (this.Name != "System.Diagnostics.Eventing.FrameworkEventSource" || Environment.IsWindows8OrAbove)
 #endif
                 {
                     int setInformationResult;
index 2403b6a..489f367 100644 (file)
@@ -688,7 +688,7 @@ namespace System
 
             char formatCh = format[0];
             if (formatCh == 'G' || formatCh == 'g')
-                return GetEnumName(rtType, ToUInt64(value));
+                return GetEnumName(rtType, ToUInt64(value)) ?? value.ToString();
 
             if (formatCh == 'D' || formatCh == 'd')
                 return value.ToString();
index 453583b..062e5d9 100644 (file)
@@ -361,69 +361,38 @@ namespace System
             }
         }
 
-        /*==================================OSVersion===================================
-        **Action:
-        **Returns:
-        **Arguments:
-        **Exceptions:
-        ==============================================================================*/
-        internal static OperatingSystem OSVersion
-        {
-            get
-            {
-                Contract.Ensures(Contract.Result<OperatingSystem>() != null);
-
-                if (m_os == null)
-                { // We avoid the lock since we don't care if two threads will set this at the same time.
-                    Microsoft.Win32.Win32Native.OSVERSIONINFO osvi = new Microsoft.Win32.Win32Native.OSVERSIONINFO();
-                    if (!GetVersion(osvi))
-                    {
-                        throw new InvalidOperationException(SR.InvalidOperation_GetVersion);
-                    }
-
-                    Microsoft.Win32.Win32Native.OSVERSIONINFOEX osviEx = new Microsoft.Win32.Win32Native.OSVERSIONINFOEX();
-                    if (!GetVersionEx(osviEx))
-                        throw new InvalidOperationException(SR.InvalidOperation_GetVersion);
-
-#if PLATFORM_UNIX
-                    PlatformID id = PlatformID.Unix;
-#else
-                    PlatformID id = PlatformID.Win32NT;
-#endif // PLATFORM_UNIX
-
-                    Version v = new Version(osvi.MajorVersion, osvi.MinorVersion, osvi.BuildNumber, (osviEx.ServicePackMajor << 16) | osviEx.ServicePackMinor);
-                    m_os = new OperatingSystem(id, v, osvi.CSDVersion);
-                }
-                Debug.Assert(m_os != null, "m_os != null");
-                return m_os;
-            }
-        }
-
-
-        internal static bool IsWindows8OrAbove
-        {
-            get
-            {
-                return true;
-            }
-        }
-
+#if !FEATURE_PAL
+        private static Lazy<bool> s_IsWindows8OrAbove = new Lazy<bool>(() => 
+        {
+            ulong conditionMask = Win32Native.VerSetConditionMask(0, Win32Native.VER_MAJORVERSION, Win32Native.VER_GREATER_EQUAL);
+            conditionMask = Win32Native.VerSetConditionMask(conditionMask, Win32Native.VER_MINORVERSION, Win32Native.VER_GREATER_EQUAL);
+            conditionMask = Win32Native.VerSetConditionMask(conditionMask, Win32Native.VER_SERVICEPACKMAJOR, Win32Native.VER_GREATER_EQUAL);
+            conditionMask = Win32Native.VerSetConditionMask(conditionMask, Win32Native.VER_SERVICEPACKMINOR, Win32Native.VER_GREATER_EQUAL);
+
+            // Windows 8 version is 6.2
+            var version = new Win32Native.OSVERSIONINFOEX { MajorVersion = 6, MinorVersion = 2, ServicePackMajor = 0, ServicePackMinor = 0 };
+                
+            return Win32Native.VerifyVersionInfoW(version, 
+                       Win32Native.VER_MAJORVERSION | Win32Native.VER_MINORVERSION | Win32Native.VER_SERVICEPACKMAJOR | Win32Native.VER_SERVICEPACKMINOR,
+                       conditionMask);
+        });
+        internal static bool IsWindows8OrAbove => s_IsWindows8OrAbove.Value;
+#endif
+        
 #if FEATURE_COMINTEROP
-        internal static bool IsWinRTSupported
+        // Does the current version of Windows have Windows Runtime suppport?
+        private static Lazy<bool> s_IsWinRTSupported = new Lazy<bool>(() =>
         {
-            get
-            {
-                return true;
-            }
-        }
-#endif // FEATURE_COMINTEROP
-
+            return WinRTSupported();
+        });
 
-        [MethodImplAttribute(MethodImplOptions.InternalCall)]
-        internal static extern bool GetVersion(Microsoft.Win32.Win32Native.OSVERSIONINFO osVer);
+        internal static bool IsWinRTSupported => s_IsWinRTSupported.Value;
 
-        [MethodImplAttribute(MethodImplOptions.InternalCall)]
-        internal static extern bool GetVersionEx(Microsoft.Win32.Win32Native.OSVERSIONINFOEX osVer);
+        [DllImport(JitHelpers.QCall, CharSet = CharSet.Unicode)]
+        [SuppressUnmanagedCodeSecurity]
+        [return: MarshalAs(UnmanagedType.Bool)]
+        private static extern bool WinRTSupported();
+#endif // FEATURE_COMINTEROP
 
 
         /*==================================StackTrace==================================
index 422b72a..c23e108 100644 (file)
@@ -839,7 +839,7 @@ namespace System.Globalization
                                     CultureInfo.InvariantCulture,
                                     SR.Format(SR.ArgumentOutOfRange_Range, 0, MillisPerSecond - 1)));
                 }
-                return InternalGloablizationHelper.TimeToTicks(hour, minute, second) + millisecond * TicksPerMillisecond;
+                return InternalGlobalizationHelper.TimeToTicks(hour, minute, second) + millisecond * TicksPerMillisecond;
             }
             throw new ArgumentOutOfRangeException(null, SR.ArgumentOutOfRange_BadHourMinuteSecond);
         }
index 206d077..51a2727 100644 (file)
@@ -3,6 +3,7 @@
 // See the LICENSE file in the project root for more information.
 
 using System;
+using System.Diagnostics;
 using System.Runtime.InteropServices;
 using System.Runtime.CompilerServices;
 using System.Diagnostics.Contracts;
index 4d98dd6..7a8a9fd 100644 (file)
@@ -2,6 +2,7 @@
 // The .NET Foundation licenses this file to you under the MIT license.
 // See the LICENSE file in the project root for more information.
 
+using System.Diagnostics;
 using System.Threading;
 
 namespace System.Globalization
index 827330b..e33874e 100644 (file)
@@ -2,6 +2,8 @@
 // The .NET Foundation licenses this file to you under the MIT license.
 // See the LICENSE file in the project root for more information.
 
+using System.Diagnostics;
+
 #if ENABLE_WINRT
 using Internal.Runtime.Augments;
 #endif
diff --git a/src/mscorlib/src/System/Globalization/CultureTypes.cs b/src/mscorlib/src/System/Globalization/CultureTypes.cs
deleted file mode 100644 (file)
index 10d9246..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-// The enumeration constants used in CultureInfo.GetCultures().
-// On Linux platforms, the only enum values used there is NeutralCultures and SpecificCultures 
-// the rest are obsolete or not valid on Linux
-
-namespace System.Globalization
-{
-    [Serializable]
-    [Flags]
-    public enum CultureTypes
-    {
-        NeutralCultures = 0x0001,             // Neutral cultures are cultures like "en", "de", "zh", etc, for enumeration this includes ALL neutrals regardless of other flags
-        SpecificCultures = 0x0002,             // Non-netural cultuers.  Examples are "en-us", "zh-tw", etc., for enumeration this includes ALL specifics regardless of other flags
-        InstalledWin32Cultures = 0x0004,             // Win32 installed cultures in the system and exists in the framework too., this is effectively all cultures
-
-        AllCultures = NeutralCultures | SpecificCultures | InstalledWin32Cultures,
-
-        UserCustomCulture = 0x0008,               // User defined custom culture
-        ReplacementCultures = 0x0010,               // User defined replacement custom culture.
-        [Obsolete("This value has been deprecated.  Please use other values in CultureTypes.")]
-        WindowsOnlyCultures = 0x0020,               // this will always return empty list.
-        [Obsolete("This value has been deprecated.  Please use other values in CultureTypes.")]
-        FrameworkCultures = 0x0040,               // will return only the v2 cultures marked as Framework culture.
-    }
-}
index ee8ba13..bdc35f0 100644 (file)
@@ -315,7 +315,7 @@ namespace System.Globalization
                                     0,
                                     MillisPerSecond - 1));
                 }
-                return (InternalGloablizationHelper.TimeToTicks(hour, minute, second) + millisecond * TicksPerMillisecond); ;
+                return (InternalGlobalizationHelper.TimeToTicks(hour, minute, second) + millisecond * TicksPerMillisecond); ;
             }
             throw new ArgumentOutOfRangeException(null, SR.ArgumentOutOfRange_BadHourMinuteSecond);
         }
index aab957a..f1ad6f1 100644 (file)
@@ -2,6 +2,8 @@
 // The .NET Foundation licenses this file to you under the MIT license.
 // See the LICENSE file in the project root for more information.
 
+using System.Diagnostics;
+
 namespace System.Globalization
 {
     sealed partial class IdnMapping
index 1f6bd9b..4320e3a 100644 (file)
@@ -24,6 +24,7 @@
 //  RFC 3491 - Nameprep: A Stringprep Profile for Internationalized Domain Names (IDN)
 //  RFC 3492 - Punycode: A Bootstring encoding of Unicode for Internationalized Domain Names in Applications (IDNA)
 
+using System.Diagnostics;
 using System.Diagnostics.Contracts;
 using System.Text;
 
index 6f8e0ba..51ff809 100644 (file)
@@ -3,6 +3,7 @@
 // See the LICENSE file in the project root for more information.
 
 using System.Collections.Generic;
+using System.Diagnostics;
 
 namespace System.Globalization
 {
index c7e6220..f64211d 100644 (file)
@@ -1285,35 +1285,40 @@ namespace System
             return ToString(format, null);
         }
 
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
         private static char HexToChar(int a)
         {
             a = a & 0xf;
             return (char)((a > 9) ? a - 10 + 0x61 : a + 0x30);
         }
 
-        unsafe private static int HexsToChars(char* guidChars, int offset, int a, int b)
+        unsafe private static int HexsToChars(char* guidChars, int a, int b)
         {
-            return HexsToChars(guidChars, offset, a, b, false);
+            guidChars[0] = HexToChar(a >> 4);
+            guidChars[1] = HexToChar(a);
+
+            guidChars[2] = HexToChar(b >> 4);
+            guidChars[3] = HexToChar(b);
+
+            return 4;
         }
 
-        unsafe private static int HexsToChars(char* guidChars, int offset, int a, int b, bool hex)
+        unsafe private static int HexsToCharsHexOutput(char* guidChars, int a, int b)
         {
-            if (hex)
-            {
-                guidChars[offset++] = '0';
-                guidChars[offset++] = 'x';
-            }
-            guidChars[offset++] = HexToChar(a >> 4);
-            guidChars[offset++] = HexToChar(a);
-            if (hex)
-            {
-                guidChars[offset++] = ',';
-                guidChars[offset++] = '0';
-                guidChars[offset++] = 'x';
-            }
-            guidChars[offset++] = HexToChar(b >> 4);
-            guidChars[offset++] = HexToChar(b);
-            return offset;
+            guidChars[0] = '0';
+            guidChars[1] = 'x';
+
+            guidChars[2] = HexToChar(a >> 4);
+            guidChars[3] = HexToChar(a);
+
+            guidChars[4] = ',';
+            guidChars[5] = '0';
+            guidChars[6] = 'x';
+
+            guidChars[7] = HexToChar(b >> 4);
+            guidChars[8] = HexToChar(b);
+
+            return 9;
         }
 
         // IFormattable interface
@@ -1396,42 +1401,42 @@ namespace System
                         // {0xdddddddd,0xdddd,0xdddd,{0xdd,0xdd,0xdd,0xdd,0xdd,0xdd,0xdd,0xdd}}
                         guidChars[offset++] = '0';
                         guidChars[offset++] = 'x';
-                        offset = HexsToChars(guidChars, offset, _a >> 24, _a >> 16);
-                        offset = HexsToChars(guidChars, offset, _a >> 8, _a);
+                        offset += HexsToChars(guidChars + offset, _a >> 24, _a >> 16);
+                        offset += HexsToChars(guidChars + offset, _a >> 8, _a);
                         guidChars[offset++] = ',';
                         guidChars[offset++] = '0';
                         guidChars[offset++] = 'x';
-                        offset = HexsToChars(guidChars, offset, _b >> 8, _b);
+                        offset += HexsToChars(guidChars + offset, _b >> 8, _b);
                         guidChars[offset++] = ',';
                         guidChars[offset++] = '0';
                         guidChars[offset++] = 'x';
-                        offset = HexsToChars(guidChars, offset, _c >> 8, _c);
+                        offset += HexsToChars(guidChars + offset, _c >> 8, _c);
                         guidChars[offset++] = ',';
                         guidChars[offset++] = '{';
-                        offset = HexsToChars(guidChars, offset, _d, _e, true);
+                        offset += HexsToCharsHexOutput(guidChars + offset, _d, _e);
                         guidChars[offset++] = ',';
-                        offset = HexsToChars(guidChars, offset, _f, _g, true);
+                        offset += HexsToCharsHexOutput(guidChars + offset, _f, _g);
                         guidChars[offset++] = ',';
-                        offset = HexsToChars(guidChars, offset, _h, _i, true);
+                        offset += HexsToCharsHexOutput(guidChars + offset, _h, _i);
                         guidChars[offset++] = ',';
-                        offset = HexsToChars(guidChars, offset, _j, _k, true);
+                        offset += HexsToCharsHexOutput(guidChars + offset, _j, _k);
                         guidChars[offset++] = '}';
                     }
                     else
                     {
                         // [{|(]dddddddd[-]dddd[-]dddd[-]dddd[-]dddddddddddd[}|)]
-                        offset = HexsToChars(guidChars, offset, _a >> 24, _a >> 16);
-                        offset = HexsToChars(guidChars, offset, _a >> 8, _a);
+                        offset += HexsToChars(guidChars + offset, _a >> 24, _a >> 16);
+                        offset += HexsToChars(guidChars + offset, _a >> 8, _a);
                         if (dash) guidChars[offset++] = '-';
-                        offset = HexsToChars(guidChars, offset, _b >> 8, _b);
+                        offset += HexsToChars(guidChars + offset, _b >> 8, _b);
                         if (dash) guidChars[offset++] = '-';
-                        offset = HexsToChars(guidChars, offset, _c >> 8, _c);
+                        offset += HexsToChars(guidChars + offset, _c >> 8, _c);
                         if (dash) guidChars[offset++] = '-';
-                        offset = HexsToChars(guidChars, offset, _d, _e);
+                        offset += HexsToChars(guidChars + offset, _d, _e);
                         if (dash) guidChars[offset++] = '-';
-                        offset = HexsToChars(guidChars, offset, _f, _g);
-                        offset = HexsToChars(guidChars, offset, _h, _i);
-                        offset = HexsToChars(guidChars, offset, _j, _k);
+                        offset += HexsToChars(guidChars + offset, _f, _g);
+                        offset += HexsToChars(guidChars + offset, _h, _i);
+                        offset += HexsToChars(guidChars + offset, _j, _k);
                     }
                 }
             }
index 41d7477..241a3c4 100644 (file)
@@ -2,6 +2,8 @@
 // The .NET Foundation licenses this file to you under the MIT license.
 // See the LICENSE file in the project root for more information.
 
+using System.Diagnostics;
+
 namespace System.Reflection
 {
     public class LocalVariableInfo
index e2faf83..930e182 100644 (file)
@@ -3,6 +3,7 @@
 // See the LICENSE file in the project root for more information.
 
 using System.Collections.Generic;
+using System.Diagnostics;
 using System.Diagnostics.Contracts;
 using System.Runtime.Serialization;
 using RuntimeTypeCache = System.RuntimeType.RuntimeTypeCache;
index 77a56b4..a8d6240 100644 (file)
@@ -3,6 +3,7 @@
 // See the LICENSE file in the project root for more information.
 
 using System.Collections.Generic;
+using System.Diagnostics;
 using System.Diagnostics.Contracts;
 using System.Runtime.Serialization;
 using System.Runtime.CompilerServices;
index 9e4673b..f32cc2b 100644 (file)
@@ -61,6 +61,7 @@
 
 using System.Collections;
 using System.Collections.Generic;
+using System.Diagnostics;
 using System.Runtime.InteropServices;
 using System.Threading;
 
index 5f07c3a..1813932 100644 (file)
@@ -29,6 +29,8 @@ using System.Diagnostics.Contracts;
 
 namespace System.Runtime.Serialization
 {
+    // This class duplicates a class on CoreFX. We are keeping it here -- just this one method --
+    // as it was widely invoked by reflection to workaround it being missing in .NET Core 1.0
     internal static class FormatterServices
     {
         // Gets a new instance of the object.  The entire object is initalized to 0 and no 
@@ -56,28 +58,6 @@ namespace System.Runtime.Serialization
 
         [MethodImplAttribute(MethodImplOptions.InternalCall)]
         private static extern Object nativeGetUninitializedObject(RuntimeType type);
-        private static Binder s_binder = Type.DefaultBinder;
-
-        /*============================LoadAssemblyFromString============================
-        **Action: Loads an assembly from a given string.  The current assembly loading story
-        **        is quite confusing.  If the assembly is in the fusion cache, we can load it
-        **        using the stringized-name which we transmitted over the wire.  If that fails,
-        **        we try for a lookup of the assembly using the simple name which is the first
-        **        part of the assembly name.  If we can't find it that way, we'll return null
-        **        as our failure result.
-        **Returns: The loaded assembly or null if it can't be found.
-        **Arguments: assemblyName -- The stringized assembly name.
-        **Exceptions: None
-        ==============================================================================*/
-        internal static Assembly LoadAssemblyFromString(String assemblyName)
-        {
-            //
-            // Try using the stringized assembly name to load from the fusion cache.
-            //
-            BCLDebug.Trace("SER", "[LoadAssemblyFromString]Looking for assembly: ", assemblyName);
-            Assembly found = Assembly.Load(assemblyName);
-            return found;
-        }
     }
 }
 
diff --git a/src/mscorlib/src/System/Security/SecurityState.cs b/src/mscorlib/src/System/Security/SecurityState.cs
deleted file mode 100644 (file)
index 5f42011..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System;
-using System.Security;
-
-namespace System.Security
-{
-    internal abstract class SecurityState
-    {
-        protected SecurityState() { }
-
-        public bool IsStateAvailable()
-        {
-            AppDomainManager domainManager = AppDomainManager.CurrentAppDomainManager;
-
-            // CheckSecuritySettings only when appdomainManager is present. So if there is no 
-            // appDomain Manager return true as by default coreclr runs in fulltrust. 
-            return domainManager != null ? domainManager.CheckSecuritySettings(this) : true;
-        }
-        // override this function and throw the appropriate 
-        public abstract void EnsureState();
-    }
-}
index 51ed0f2..4211083 100644 (file)
@@ -503,56 +503,13 @@ namespace System
         /// <exception cref="System.ArgumentNullException">Thrown when <paramref name="text"/> is a null
         /// reference (Nothing in Visual Basic).</exception>
         [MethodImpl(MethodImplOptions.AggressiveInlining)]
-        public static ReadOnlySpan<char> Slice(this string text)
+        public static ReadOnlySpan<char> AsSpan(this string text)
         {
             if (text == null)
                 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.text);
 
             return new ReadOnlySpan<char>(ref text.GetFirstCharRef(), text.Length);
         }
-
-        /// <summary>
-        /// Creates a new readonly span over the portion of the target string, beginning at 'start'.
-        /// </summary>
-        /// <param name="text">The target string.</param>
-        /// <param name="start">The index at which to begin this slice.</param>
-        /// <exception cref="System.ArgumentNullException">Thrown when <paramref name="text"/> is a null
-        /// reference (Nothing in Visual Basic).</exception>
-        /// <exception cref="System.ArgumentOutOfRangeException">
-        /// Thrown when the specified <paramref name="start"/> index is not in range (&lt;0 or &gt;Length).
-        /// </exception>
-        [MethodImpl(MethodImplOptions.AggressiveInlining)]
-        public static ReadOnlySpan<char> Slice(this string text, int start)
-        {
-            if (text == null)
-                ThrowHelper.ThrowArgumentNullException(ExceptionArgument.text);
-            if ((uint)start > (uint)text.Length)
-                ThrowHelper.ThrowArgumentOutOfRangeException();
-
-            return new ReadOnlySpan<char>(ref Unsafe.Add(ref text.GetFirstCharRef(), start), text.Length - start);
-        }
-
-        /// <summary>
-        /// Creates a new readonly span over the portion of the target string, beginning at <paramref name="start"/>, of given <paramref name="length"/>.
-        /// </summary>
-        /// <param name="text">The target string.</param>
-        /// <param name="start">The index at which to begin this slice.</param>
-        /// <param name="length">The number of items in the span.</param>
-        /// <exception cref="System.ArgumentNullException">Thrown when <paramref name="text"/> is a null
-        /// reference (Nothing in Visual Basic).</exception>
-        /// <exception cref="System.ArgumentOutOfRangeException">
-        /// Thrown when the specified <paramref name="start"/> or end index is not in range (&lt;0 or &gt;&eq;Length).
-        /// </exception>
-        [MethodImpl(MethodImplOptions.AggressiveInlining)]
-        public static ReadOnlySpan<char> Slice(this string text, int start, int length)
-        {
-            if (text == null)
-                ThrowHelper.ThrowArgumentNullException(ExceptionArgument.text);
-            if ((uint)start > (uint)text.Length || (uint)length > (uint)(text.Length - start))
-                ThrowHelper.ThrowArgumentOutOfRangeException();
-
-            return new ReadOnlySpan<char>(ref Unsafe.Add(ref text.GetFirstCharRef(), start), length);
-        }
     }
 
     internal static class SpanHelper
index 445ea31..4dcf8d4 100644 (file)
@@ -38,6 +38,7 @@
 using System.Collections.Generic;
 using System.Runtime.CompilerServices;
 using System.Runtime.Serialization;
+using System.Diagnostics;
 using System.Diagnostics.Contracts;
 
 namespace System
index 5107fee..f359a2a 100644 (file)
@@ -3,6 +3,7 @@
 // See the LICENSE file in the project root for more information.
 
 using System.Collections.Generic;
+using System.Diagnostics;
 using System.Globalization;
 using System.IO;
 using System.Security;
index 3dd0aec..29ea33a 100644 (file)
@@ -4,6 +4,7 @@
 
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
+using System.Diagnostics;
 using System.Diagnostics.Contracts;
 using System.Globalization;
 using System.Runtime.Serialization;
index 1d74358..589eb54 100644 (file)
@@ -4742,18 +4742,6 @@ typedef POSVERSIONINFOEXA POSVERSIONINFOEX;
 typedef LPOSVERSIONINFOEXA LPOSVERSIONINFOEX;
 #endif
 
-PALIMPORT
-BOOL
-PALAPI
-GetVersionExW(
-          IN OUT LPOSVERSIONINFOW lpVersionInformation);
-
-#ifdef UNICODE
-#define GetVersionEx GetVersionExW
-#else
-#define GetVersionEx GetVersionExA
-#endif
-
 #define IMAGE_FILE_MACHINE_I386              0x014c
 #define IMAGE_FILE_MACHINE_ARM64             0xAA64  // ARM64 Little-Endian
 
index 2677dd6..554a502 100644 (file)
@@ -293,12 +293,6 @@ FreeEnvironmentStringsA(
 PALIMPORT
 BOOL
 PALAPI
-GetVersionExA(
-          IN OUT LPOSVERSIONINFOA lpVersionInformation);
-
-PALIMPORT
-BOOL
-PALAPI
 RemoveDirectoryA(
                  IN LPCSTR lpPathName);
 
index f21c9db..5314cdf 100644 (file)
@@ -181,7 +181,6 @@ set(SOURCES
   misc/sysinfo.cpp
   misc/time.cpp
   misc/utils.cpp
-  misc/version.cpp
   objmgr/palobjbase.cpp
   objmgr/shmobject.cpp
   objmgr/shmobjectmanager.cpp
index e46582e..2df32fe 100644 (file)
@@ -128,6 +128,11 @@ done:
     return retval;
 }
 
+UINT GetExponent(double d)
+{
+    return (*((UINT*)&d + 1) >> 20) & 0x000007ff;
+}
+
 /**
 Function:
 
@@ -150,250 +155,143 @@ NOTES:
 char * __cdecl
 _ecvt( double value, int count, int * dec, int * sign )
 {
-    CONST CHAR * FORMAT_STRING = "%.348e";
-    CHAR TempBuffer[ ECVT_MAX_BUFFER_SIZE ];
-    CPalThread *pThread = NULL;
-    LPSTR lpReturnBuffer = NULL;
-    LPSTR lpStartOfReturnBuffer = NULL;
-    LPSTR lpTempBuffer = NULL;
-    LPSTR lpEndOfTempBuffer = NULL;
-    INT nTempBufferLength = 0;
-    CHAR ExponentBuffer[ 6 ];
-    INT nExponentValue = 0;
-    INT LoopIndex = 0;
-
     PERF_ENTRY(_ecvt);
     ENTRY( "_ecvt( value=%.30g, count=%d, dec=%p, sign=%p )\n",
            value, count, dec, sign );
+    
+    _ASSERTE(dec != nullptr && sign != nullptr);
+    CPalThread *pThread = InternalGetCurrentThread();
+    LPSTR lpStartOfReturnBuffer = pThread->crtInfo.ECVTBuffer;
 
-    /* Get the per-thread buffer from the thread structure. */
-    pThread = InternalGetCurrentThread();
-
-    lpStartOfReturnBuffer = lpReturnBuffer = pThread->crtInfo.ECVTBuffer;
-
-    /* Sanity checks */
-    if ( !dec || !sign )
-    {
-        ERROR( "dec and sign have to be valid pointers.\n" );
-        *lpReturnBuffer = '\0';
-        goto done;
-    }
-    else
+    if (count > ECVT_MAX_COUNT_SIZE)
     {
-        *dec = *sign = 0;
+        count = ECVT_MAX_COUNT_SIZE;
     }
 
-    if ( value < 0.0 )
-    {
-        *sign = 1;
-    }
+    // the caller of _ecvt should already checked the Infinity and NAN values
+    _ASSERTE(GetExponent(value) != 0x7ff);
 
-    if ( count > ECVT_MAX_COUNT_SIZE )
+    CHAR TempBuffer[ECVT_MAX_BUFFER_SIZE];
+   
+    *dec = *sign = 0;
+
+    if (value < 0.0)
     {
-        count = ECVT_MAX_COUNT_SIZE;
+        *sign = 1;
     }
-
-    /* Get the string to work with. */
-    sprintf_s( TempBuffer, sizeof(TempBuffer), FORMAT_STRING, value );
-
-    /* Check to see if value was a valid number. */
-    if ( strcmp( "NaN", TempBuffer ) == 0 || strcmp( "-NaN", TempBuffer ) == 0 )
+    
     {
-        TRACE( "value was not a number!\n" );
-        if (strcpy_s( lpStartOfReturnBuffer, ECVT_MAX_BUFFER_SIZE, "1#QNAN0" ) != SAFECRT_SUCCESS)
+        // we have issue #10290 tracking fixing the sign of 0.0 across the platforms
+        if (value == 0.0)
         {
-            ERROR( "strcpy_s failed!\n" );
-            *lpStartOfReturnBuffer = '\0';
+            for (int j = 0; j < count; j++)
+            {
+                lpStartOfReturnBuffer[j] = '0';
+            }
+            lpStartOfReturnBuffer[count] = '\0';
             goto done;
+        } 
+        
+        int tempBufferLength = snprintf(TempBuffer, ECVT_MAX_BUFFER_SIZE, "%.40e", value);
+        _ASSERTE(tempBufferLength > 0 && ECVT_MAX_BUFFER_SIZE > tempBufferLength);
+        
+        //
+        // Calculate the exponent value
+        //
+
+        int exponentIndex = strrchr(TempBuffer, 'e') - TempBuffer; 
+        _ASSERTE(exponentIndex > 0 && (exponentIndex < tempBufferLength - 1));
+
+        int i = exponentIndex + 1;
+        int exponentSign = 1;
+        if (TempBuffer[i] == '-')
+        {
+            exponentSign = -1;
+            i++;
         }
-
-        *dec = 1;
-        goto done;
-    }
-
-    /* Check to see if it is infinite. */
-    if ( strcmp( "Inf", TempBuffer ) == 0 || strcmp( "-Inf", TempBuffer ) == 0 )
-    {
-        TRACE( "value is infinite!\n" );
-        if (strcpy_s( lpStartOfReturnBuffer, ECVT_MAX_BUFFER_SIZE, "1#INF00" ) != SAFECRT_SUCCESS)
+        else if (TempBuffer[i] == '+')
         {
-            ERROR( "strcpy_s failed!\n" );
-            *lpStartOfReturnBuffer = '\0';
-            goto done;
+            i++;
         }
 
-        *dec = 1;
-        if ( *TempBuffer == '-' )
+        int exponentValue = 0;
+        while (i < tempBufferLength)
         {
-            *sign = 1;
+            _ASSERTE(TempBuffer[i] >= '0' && TempBuffer[i] <= '9');
+            exponentValue = exponentValue * 10 + ((BYTE) TempBuffer[i] - (BYTE) '0');
+            i++;
         }
-        goto done;
-    }
-
-    nTempBufferLength = strlen( TempBuffer );
-    lpEndOfTempBuffer = &(TempBuffer[ nTempBufferLength ]);
-
-    /* Extract the exponent, and convert it to integer. */
-    while ( *lpEndOfTempBuffer != 'e' && nTempBufferLength > 0 )
-    {
-        nTempBufferLength--;
-        lpEndOfTempBuffer--;
-    }
-    
-    ExponentBuffer[ 0 ] = '\0';
-    if (strncat_s( ExponentBuffer, sizeof(ExponentBuffer), lpEndOfTempBuffer + 1, 5 ) != SAFECRT_SUCCESS)
-    {
-        ERROR( "strncat_s failed!\n" );
-        *lpStartOfReturnBuffer = '\0';
-        goto done;
-    }
-
-    nExponentValue = atoi( ExponentBuffer );
+        exponentValue *= exponentSign;
+        
+        //
+        // Determine decimal location.
+        // 
 
-    /* End the string at the 'e' */
-    *lpEndOfTempBuffer = '\0';
-    nTempBufferLength--;
+        if (exponentValue == 0)
+        {
+            *dec = 1;
+        }
+        else
+        {
+            *dec = exponentValue + 1;
+        }
+        
+        //
+        // Copy the string from the temp buffer upto precision characters, removing the sign, and decimal as required.
+        // 
+
+        i = 0;
+        int mantissaIndex = 0;
+        while (i < count && mantissaIndex < exponentIndex)
+        {
+            if (TempBuffer[mantissaIndex] >= '0' && TempBuffer[mantissaIndex] <= '9')
+            {
+                lpStartOfReturnBuffer[i] = TempBuffer[mantissaIndex];
+                i++;
+            }
+            mantissaIndex++;
+        }
 
-    /* Determine decimal location. */
-    if ( nExponentValue == 0 )
-    {
-        *dec = 1;
-    }
-    else
-    {
-        *dec = nExponentValue + 1;
-    }
+        while (i < count)
+        {
+            lpStartOfReturnBuffer[i] = '0'; // append zeros as needed
+            i++;
+        }
 
-    if ( value == 0.0 )
-    {
-        *dec = 0;
-    }
-    /* Copy the string from the temp buffer upto count characters, 
-    removing the sign, and decimal as required. */
-    lpTempBuffer = TempBuffer;
-    *lpReturnBuffer = '0';
-    lpReturnBuffer++;
+        lpStartOfReturnBuffer[i] = '\0';
+        
+        //
+        // Round if needed
+        //
 
-    while ( LoopIndex < ECVT_MAX_COUNT_SIZE )
-    {
-        if ( isdigit(*lpTempBuffer) )
+        if (mantissaIndex >= exponentIndex || TempBuffer[mantissaIndex] < '5')
         {
-            *lpReturnBuffer = *lpTempBuffer;
-            LoopIndex++;
-            lpReturnBuffer++;
+            goto done;
         }
-        lpTempBuffer++;
 
-        if ( LoopIndex == count + 1 )
+        i = count - 1;
+        while (lpStartOfReturnBuffer[i] == '9' && i > 0)
         {
-            break;
+            lpStartOfReturnBuffer[i] = '0';
+            i--;
         }
-    }
 
-    *lpReturnBuffer = '\0';
-
-    /* Round if needed. If count is less then 0 
-    then windows does not round for some reason.*/
-    nTempBufferLength = strlen( lpStartOfReturnBuffer ) - 1;
-    
-    /* Add one for the preceeding zero. */
-    lpReturnBuffer = ( lpStartOfReturnBuffer + 1 );
-
-    if ( nTempBufferLength >= count && count >= 0 )
-    {
-        /* Determine whether I need to round up. */
-        if ( *(lpReturnBuffer + count) >= '5' )
+        if (i == 0 && lpStartOfReturnBuffer[i] == '9')
         {
-            CHAR cNumberToBeRounded;
-            if ( count != 0 )
-            {
-                cNumberToBeRounded = *(lpReturnBuffer + count - 1);
-            }
-            else
-            {
-                cNumberToBeRounded = *lpReturnBuffer;
-            }
-            
-            if ( cNumberToBeRounded < '9' )
-            {
-                if ( count > 0 )
-                {
-                    /* Add one to the character. */
-                    (*(lpReturnBuffer + count - 1))++;
-                }
-                else
-                {
-                    if ( cNumberToBeRounded >= '5' )
-                    {
-                        (*dec)++;
-                    }
-                }
-            }
-            else
-            {
-                LPSTR lpRounding = NULL;
-
-                if ( count > 0 )
-                {
-                    lpRounding = lpReturnBuffer + count - 1;
-                }
-                else
-                {
-                    lpRounding = lpReturnBuffer + count;
-                }
-
-                while ( cNumberToBeRounded == '9' )
-                {
-                    cNumberToBeRounded = *lpRounding;
-                    
-                    if ( cNumberToBeRounded == '9' )
-                    {
-                        *lpRounding = '0';
-                        lpRounding--;
-                    }
-                }
-                
-                if ( lpRounding == lpStartOfReturnBuffer )
-                {
-                    /* Overflow. number is a whole number now. */
-                    *lpRounding = '1';
-                    memset( ++lpRounding, '0', count);
-
-                    /* The decimal has moved. */
-                    (*dec)++;
-                }
-                else
-                {
-                    *lpRounding = ++cNumberToBeRounded;
-                }
-            }
+            lpStartOfReturnBuffer[i] = '1';
+            (*dec)++;
         }
         else
         {
-            /* Get rid of the preceding 0 */
-            lpStartOfReturnBuffer++;
-        }
-    }
-
-    if ( *lpStartOfReturnBuffer == '0' )
-    {
-        lpStartOfReturnBuffer++;
-    }
-
-    if ( count >= 0 )
-    {
-        *(lpStartOfReturnBuffer + count) = '\0';
-    }
-    else
-    {
-        *lpStartOfReturnBuffer = '\0';
+            lpStartOfReturnBuffer[i]++;
+        }    
     }
 
 done:
 
     LOGEXIT( "_ecvt returning %p (%s)\n", lpStartOfReturnBuffer , lpStartOfReturnBuffer );
     PERF_EXIT(_ecvt);
-
+    
     return lpStartOfReturnBuffer;
 }
 
index fed7b69..9fc1346 100644 (file)
@@ -218,7 +218,13 @@ GetEnvironmentVariableW(
     }
     else if (size == 0)
     {
-        // handle error in GetEnvironmentVariableA
+        // If size is 0, it either means GetEnvironmentVariableA failed, or that
+        // it succeeded and the value of the variable is empty. Check GetLastError
+        // to determine which. If the call failed, we won't touch the buffer.
+        if (GetLastError() == ERROR_SUCCESS)
+        {
+            *lpBuffer = '\0';
+        }
     }
     else
     {
diff --git a/src/pal/src/misc/version.cpp b/src/pal/src/misc/version.cpp
deleted file mode 100644 (file)
index 7a9f90a..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-/*++
-
-
-
-Module Name:
-
-    version.c
-
-Abstract:
-
-    Implementation of functions for getting platform.OS versions.
-
-Revision History:
-
-
-
---*/
-
-#include "pal/palinternal.h"
-#include "pal/dbgmsg.h"
-
-SET_DEFAULT_DEBUG_CHANNEL(MISC);
-
-/*++
-Function:
-  GetVersionExA
-
-
-
-GetVersionEx
-
-The GetVersionEx function obtains extended information about the
-version of the operating system that is currently running.
-
-Parameters
-
-lpVersionInfo 
-       [in/out] Pointer to an OSVERSIONINFO data structure that the
-       function fills with operating system version information.
-
-       Before calling the GetVersionEx function, set the
-       dwOSVersionInfoSize member of the OSVERSIONINFO data structure
-       to sizeof(OSVERSIONINFO).
-
-Return Values
-
-If the function succeeds, the return value is a nonzero value.
-
-If the function fails, the return value is zero. To get extended error
-information, call GetLastError. The function fails if you specify an
-invalid value for the dwOSVersionInfoSize member of the OSVERSIONINFO
-structure.
-
---*/
-BOOL
-PALAPI
-GetVersionExA(
-             IN OUT LPOSVERSIONINFOA lpVersionInformation)
-{
-    BOOL bRet = TRUE;
-    PERF_ENTRY(GetVersionExA);
-    ENTRY("GetVersionExA (lpVersionInformation=%p)\n", lpVersionInformation);
-
-    if (lpVersionInformation->dwOSVersionInfoSize == sizeof(OSVERSIONINFOA))
-    {
-        lpVersionInformation->dwMajorVersion = 5;       /* same as WIN2000 */
-        lpVersionInformation->dwMinorVersion = 0;       /* same as WIN2000 */
-        lpVersionInformation->dwBuildNumber = 0;
-        lpVersionInformation->dwPlatformId = VER_PLATFORM_UNIX;
-        lpVersionInformation->szCSDVersion[0] = '\0'; /* no service pack */
-    } 
-    else 
-    {
-        SetLastError(ERROR_INVALID_PARAMETER);
-        bRet = FALSE;
-    }
-    LOGEXIT("GetVersionExA returning BOOL %d\n", bRet);
-    PERF_EXIT(GetVersionExA);
-    return bRet;
-}
-
-
-/*++
-Function:
-  GetVersionExW
-
-See GetVersionExA
---*/
-BOOL
-PALAPI
-GetVersionExW(
-             IN OUT LPOSVERSIONINFOW lpVersionInformation)
-{
-    BOOL bRet = TRUE;
-
-    PERF_ENTRY(GetVersionExW);
-    ENTRY("GetVersionExW (lpVersionInformation=%p)\n", lpVersionInformation);
-
-    if (lpVersionInformation->dwOSVersionInfoSize == sizeof(OSVERSIONINFOW))
-    {
-        lpVersionInformation->dwMajorVersion = 5;       /* same as WIN2000 */
-        lpVersionInformation->dwMinorVersion = 0;       /* same as WIN2000 */
-        lpVersionInformation->dwBuildNumber = 0;
-        lpVersionInformation->dwPlatformId = VER_PLATFORM_UNIX;
-        lpVersionInformation->szCSDVersion[0] = '\0'; /* no service pack */
-    } 
-    else 
-    {
-        SetLastError(ERROR_INVALID_PARAMETER);
-        bRet =  FALSE;
-    }
-    LOGEXIT("GetVersionExW returning BOOL %d\n", bRet);
-    PERF_EXIT(GetVersionExW);
-    return bRet;
-}
diff --git a/src/pal/tests/palsuite/miscellaneous/GetVersionExA/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/GetVersionExA/CMakeLists.txt
deleted file mode 100644 (file)
index f6aa0cb..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-cmake_minimum_required(VERSION 2.8.12.2)
-
-add_subdirectory(test1)
-
diff --git a/src/pal/tests/palsuite/miscellaneous/GetVersionExA/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/GetVersionExA/test1/CMakeLists.txt
deleted file mode 100644 (file)
index 1e512f3..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-cmake_minimum_required(VERSION 2.8.12.2)
-
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
-set(SOURCES
-  test.cpp
-)
-
-add_executable(paltest_getversionexa_test1
-  ${SOURCES}
-)
-
-add_dependencies(paltest_getversionexa_test1 coreclrpal)
-
-target_link_libraries(paltest_getversionexa_test1
-  ${COMMON_TEST_LIBRARIES}
-)
diff --git a/src/pal/tests/palsuite/miscellaneous/GetVersionExA/test1/test.cpp b/src/pal/tests/palsuite/miscellaneous/GetVersionExA/test1/test.cpp
deleted file mode 100644 (file)
index 5dd20c6..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-/*============================================================
-**
-** Source : test.c
-**
-** Purpose: Test for GetVersionExA() function
-**
-**
-**=========================================================*/
-
-#include <palsuite.h>
-
-int __cdecl main(int argc, char *argv[]) {
-       
-    OSVERSIONINFO TheVersionInfo;
-    OSVERSIONINFO* pVersionInfo = &TheVersionInfo;
-
-    /*
-     * Initialize the PAL and return FAILURE if this fails
-     */
-
-    if(0 != (PAL_Initialize(argc, argv)))
-    {
-        return FAIL;
-    }
-
-    /* This needs to be done before using GetVersionEx */
-    pVersionInfo->dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
-  
-    /* If GetVersionEx fails, then the test fails */
-    if(GetVersionEx(pVersionInfo) == 0) 
-    {
-        Fail("ERROR: The GetVersionEx function returned 0, which indicates "
-             "failure.");    
-    }
-  
-    /* These values are fixed, ensure they're set properly */
-    if(pVersionInfo->dwMajorVersion != 5) 
-    {
-        Fail("ERROR: The fixed value of dwMajorVersion shoud be 5, "
-             "but is really %d.",pVersionInfo->dwMajorVersion);
-    }
-
-    /* The minor version values for Win2k and XP are different 
-    for Win2k minor version equals 0 and for XP minor version
-    equals 1.  Both values are excepted here. */
-    if((pVersionInfo->dwMinorVersion != 0) && 
-       (pVersionInfo->dwMinorVersion != 1)) 
-    {
-        Fail("ERROR: The fixed value of dwMinorVersion shoud be 0 or 1, "
-             "but is really %d.",pVersionInfo->dwMinorVersion);
-    }
-    if(pVersionInfo->dwBuildNumber_PAL_Undefined < 0) 
-    {
-        Fail("ERROR: The value of dwBuildNumber shoud be at least 0, but "
-             "is really %d.",pVersionInfo->dwBuildNumber_PAL_Undefined);
-    }
-
-#if !WIN32
-    /* Under BSD, the PlatformID should be UNIX and the Service Pack
-       version should be set to "".
-    */
-
-    if(pVersionInfo->dwPlatformId != VER_PLATFORM_UNIX ||
-       pVersionInfo->szCSDVersion_PAL_Undefined[0] != 0) 
-    {
-        Fail("ERROR: The dwPlatformId should be %d but is really %d.  And the "
-             "szCSDVerion should be NULL.",
-             VER_PLATFORM_UNIX,pVersionInfo->dwPlatformId);
-    }
-#endif
-    
-    PAL_Terminate();
-    return PASS;
-}
-
-
-
diff --git a/src/pal/tests/palsuite/miscellaneous/GetVersionExA/test1/testinfo.dat b/src/pal/tests/palsuite/miscellaneous/GetVersionExA/test1/testinfo.dat
deleted file mode 100644 (file)
index 1e9c570..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-# Licensed to the .NET Foundation under one or more agreements.
-# The .NET Foundation licenses this file to you under the MIT license.
-# See the LICENSE file in the project root for more information.
-
-Version = 1.0
-Section = Miscellaneous
-Function = GetVersionExA
-Name = Positive Test for GetVersionExA
-TYPE = DEFAULT
-EXE1 = test
-Description
-= Test that all the values in the OSVERSION structure are set properly
-= for the current environment.
-
-
-
diff --git a/src/pal/tests/palsuite/miscellaneous/GetVersionExW/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/GetVersionExW/CMakeLists.txt
deleted file mode 100644 (file)
index f6aa0cb..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-cmake_minimum_required(VERSION 2.8.12.2)
-
-add_subdirectory(test1)
-
diff --git a/src/pal/tests/palsuite/miscellaneous/GetVersionExW/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/GetVersionExW/test1/CMakeLists.txt
deleted file mode 100644 (file)
index 4ef820c..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-cmake_minimum_required(VERSION 2.8.12.2)
-
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
-set(SOURCES
-  test.cpp
-)
-
-add_executable(paltest_getversionexw_test1
-  ${SOURCES}
-)
-
-add_dependencies(paltest_getversionexw_test1 coreclrpal)
-
-target_link_libraries(paltest_getversionexw_test1
-  ${COMMON_TEST_LIBRARIES}
-)
diff --git a/src/pal/tests/palsuite/miscellaneous/GetVersionExW/test1/test.cpp b/src/pal/tests/palsuite/miscellaneous/GetVersionExW/test1/test.cpp
deleted file mode 100644 (file)
index 69aae54..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-/*============================================================
-**
-** Source : test.c
-**
-** Purpose: Test for GetVersionExW() function
-**
-**
-**=========================================================*/
-
-#define UNICODE
-
-#include <palsuite.h>
-
-int __cdecl main(int argc, char *argv[]) 
-{
-       
-    OSVERSIONINFO TheVersionInfo;
-    OSVERSIONINFO* pVersionInfo = &TheVersionInfo;
-    /*
-     * Initialize the PAL and return FAILURE if this fails
-     */
-
-    if(0 != (PAL_Initialize(argc, argv)))
-    {
-        return FAIL;
-    }
-
-    /* This needs to be done before using GetVersionEx */
-    pVersionInfo->dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
-  
-    /* If GetVersionEx fails, then the test fails */
-    if(GetVersionEx(pVersionInfo) == 0) 
-    {
-        Fail("ERROR: The GetVersionEx function returned 0, which indicates " 
-             "failure.");
-    }
-  
-    /* These values are fixed, ensure they're set properly */
-    if(pVersionInfo->dwMajorVersion != 5) 
-    {
-        Fail("ERROR: The fixed value of dwMajorVersion shoud be 5, but is "
-             " really %d.",pVersionInfo->dwMajorVersion);
-    }
-
-    /* The minor version values for Win2k and XP are different 
-       for Win2k minor version equals 0 and for XP minor version
-       equals 1.  Both values are excepted here. */
-    if((pVersionInfo->dwMinorVersion != 0) && 
-       (pVersionInfo->dwMinorVersion != 1)) 
-    {
-        Fail("ERROR: The fixed value of dwMinorVersion shoud be 0 or 1, "
-             "but is really %d.",pVersionInfo->dwMinorVersion);
-    }
-
-    if(pVersionInfo->dwBuildNumber_PAL_Undefined < 0) 
-    {
-        Fail("ERROR: The value of dwBuildNumber shoud be at least 0, but is "
-             "really %d.",pVersionInfo->dwBuildNumber_PAL_Undefined);
-    }
-
-#if !WIN32
-
-
-    /* Under BSD, the PlatformID should be UNIX and the Service Pack
-       version should be set to "".
-    */
-
-    if(pVersionInfo->dwPlatformId != VER_PLATFORM_UNIX ||
-       pVersionInfo->szCSDVersion_PAL_Undefined[0] != 0) 
-    {
-        Fail("ERROR: The dwPlatformId should be %d but is really %d.  And the "
-             "szCSDVerion should be NULL.",VER_PLATFORM_UNIX,
-             pVersionInfo->dwPlatformId);
-    }
-#endif
-  
-    
-    PAL_Terminate();
-    return PASS;
-}
-
-
-
diff --git a/src/pal/tests/palsuite/miscellaneous/GetVersionExW/test1/testinfo.dat b/src/pal/tests/palsuite/miscellaneous/GetVersionExW/test1/testinfo.dat
deleted file mode 100644 (file)
index 7773245..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-# Licensed to the .NET Foundation under one or more agreements.
-# The .NET Foundation licenses this file to you under the MIT license.
-# See the LICENSE file in the project root for more information.
-
-Version = 1.0
-Section = Miscellaneous
-Function = GetVersionExW
-Name = Positive Test for GetVersionExW
-TYPE = DEFAULT
-EXE1 = test
-Description
-= Test that all the values in the OSVERSION structure are set properly
-= for the current environment.
-
-
-
index f7a293a..3f9469d 100644 (file)
@@ -144,8 +144,6 @@ miscellaneous/GetDateFormatW/GetDateFormatW_neg1/paltest_getdateformatw_getdatef
 miscellaneous/GetDateFormatW/GetDateFormatW_neg2/paltest_getdateformatw_getdateformatw_neg2
 miscellaneous/GetDateFormatW/test1/paltest_getdateformatw_test1
 miscellaneous/GetUserNameW/test1/paltest_getusernamew_test1
-miscellaneous/GetVersionExA/test1/paltest_getversionexa_test1
-miscellaneous/GetVersionExW/test1/paltest_getversionexw_test1
 miscellaneous/InterLockedExchangeAdd/test1/paltest_interlockedexchangeadd_test1
 miscellaneous/IsBadCodePtr/test1/paltest_isbadcodeptr_test1
 miscellaneous/IsBadReadPtr/test1/paltest_isbadreadptr_test1
index 6c264cb..924a365 100755 (executable)
@@ -139,6 +139,17 @@ if [[ -n "$CROSSCOMPILE" ]]; then
     fi
     cmake_extra_defines="$cmake_extra_defines -C $CONFIG_DIR/tryrun.cmake"
     cmake_extra_defines="$cmake_extra_defines -DCMAKE_TOOLCHAIN_FILE=$CONFIG_DIR/toolchain.cmake"
+    cmake_extra_defines="$cmake_extra_defines -DCLR_UNIX_CROSS_BUILD=1"
+fi
+if [ $OS == "Linux" ]; then
+    linux_id_file="/etc/os-release"
+    if [[ -n "$CROSSCOMPILE" ]]; then
+        linux_id_file="$ROOTFS_DIR/$linux_id_file"
+    fi
+    if [[ -e $linux_id_file ]]; then
+        source $linux_id_file
+        cmake_extra_defines="$cmake_extra_defines -DCLR_CMAKE_LINUX_ID=$ID"
+    fi
 fi
 if [ "$build_arch" == "armel" ]; then
     cmake_extra_defines="$cmake_extra_defines -DARM_SOFTFP=1"
index 2c184d1..5ce6e16 100644 (file)
@@ -76,7 +76,7 @@ OOPStackUnwinderX86::VirtualUnwind(
 
     FillRegDisplay(&rd, ContextRecord);
 
-    rd.SP = ContextRecord->ResumeEsp;
+    rd.SP = ContextRecord->Esp;
     rd.PCTAddr = (UINT_PTR)&(ContextRecord->Eip);
 
     if (ContextPointers)
index 27b7a4a..dfe830d 100644 (file)
@@ -1,10 +1,6 @@
 
 set(CMAKE_INCLUDE_CURRENT_DIR ON)
 
-if(WIN32)
-    add_compile_options(/wd4996)
-endif(WIN32)
-
 set(UTILCODE_COMMON_SOURCES
   clrhost_nodependencies.cpp
   ccomprc.cpp
index fdaa981..4d6ba26 100644 (file)
@@ -266,9 +266,9 @@ BOOL BaseAssemblySpec::CompareRefToDef(const BaseAssemblySpec *pRef, const BaseA
     }
 
     //
-    // flags are non-optional, except processor architecture and content type
+    // flags are non-optional, except processor architecture, content type, and debuggable attribute bits
     //
-    DWORD dwFlagsMask = ~(afPA_FullMask | afContentType_Mask);
+    DWORD dwFlagsMask = ~(afPA_FullMask | afContentType_Mask | afDebuggableAttributeMask);
     if ((pRef->m_dwFlags & dwFlagsMask) != (pDef->m_dwFlags & dwFlagsMask))
         return FALSE;
 
index 602ccc9..d5d0962 100644 (file)
@@ -483,6 +483,7 @@ void InitializeStartupFlags()
 
 
     InitializeHeapType((flags & STARTUP_SERVER_GC) != 0);
+    g_heap_type = (flags & STARTUP_SERVER_GC) == 0 ? GC_HEAP_WKS : GC_HEAP_SVR;
 
 #ifdef FEATURE_LOADER_OPTIMIZATION            
     g_dwGlobalSharePolicy = (flags&STARTUP_LOADER_OPTIMIZATION_MASK)>>1;
@@ -3396,24 +3397,4 @@ void ContractRegressionCheck()
 
 #endif // ENABLE_CONTRACTS_IMPL
 
-
 #endif // CROSSGEN_COMPILE
-
-
-//
-// GetOSVersion - Gets the real OS version bypassing the OS compatibility shim
-// Mscoree.dll resides in System32 dir and is always excluded from compat shim.
-// This function calls mscoree!shim function via mscoreei ICLRRuntimeHostInternal interface
-// to get the OS version. We do not do this PAL or coreclr..we direclty call the OS
-// in that case.
-//
-BOOL GetOSVersion(LPOSVERSIONINFO lposVer)
-{
-// Fix for warnings when building against WinBlue build 9444.0.130614-1739
-// warning C4996: 'GetVersionExW': was declared deprecated
-// externalapis\windows\winblue\sdk\inc\sysinfoapi.h(442)
-// Deprecated. Use VerifyVersionInfo* or IsWindows* macros from VersionHelpers.
-#pragma warning( disable : 4996 )
-    return WszGetVersionEx(lposVer);
-#pragma warning( default : 4996 )
-}
index c29d3cc..b106ecc 100644 (file)
@@ -133,9 +133,7 @@ BOOL g_fEEComActivatedStartup=FALSE;
 
 GVAL_IMPL_INIT(DWORD, g_fHostConfig, 0);
 
-#ifdef FEATURE_SVR_GC
-SVAL_IMPL_INIT(uint32_t,IGCHeap,gcHeapType,IGCHeap::GC_HEAP_WKS);
-#endif
+GVAL_IMPL_INIT(GCHeapType, g_heap_type, GC_HEAP_WKS);
 
 void UpdateGCSettingFromHost()
 {
index 253ebbb..2193c5a 100644 (file)
@@ -2418,14 +2418,11 @@ void DomainAssembly::GetCurrentVersionInfo(CORCOMPILE_VERSION_INFO *pNativeVersi
                                           &fForceProfiling,
                                           &fForceInstrument);
 
-    OSVERSIONINFOW osInfo;
-    osInfo.dwOSVersionInfoSize = sizeof(osInfo);
-    if (!GetOSVersion(&osInfo))
-        _ASSERTE(!"GetOSVersion failed");
-
-    _ASSERTE(osInfo.dwMajorVersion < 999);
-    _ASSERTE(osInfo.dwMinorVersion < 999);
-    pNativeVersionInfo->wOSPlatformID = (WORD) osInfo.dwPlatformId;
+#ifndef FEATURE_PAL 
+    pNativeVersionInfo->wOSPlatformID = VER_PLATFORM_WIN32_NT;
+#else
+    pNativeVersionInfo->wOSPlatformID = VER_PLATFORM_UNIX;
+#endif    
 
     // The native images should be OS-version agnostic. Do not store the actual OS version for determinism.
     // pNativeVersionInfo->wOSMajorVersion = (WORD) osInfo.dwMajorVersion;
index ad73135..415926e 100644 (file)
@@ -170,8 +170,6 @@ FCFuncStart(gDateTimeFuncs)
 FCFuncEnd()
 
 FCFuncStart(gEnvironmentFuncs)
-    FCFuncElement("GetVersion", SystemNative::GetOSVersion)
-    FCFuncElement("GetVersionEx", SystemNative::GetOSVersionEx)
     FCFuncElement("get_TickCount", SystemNative::GetTickCount)
     QCFuncElement("_Exit", SystemNative::Exit)
     FCFuncElement("set_ExitCode", SystemNative::SetExitCode)
@@ -181,7 +179,7 @@ FCFuncStart(gEnvironmentFuncs)
     FCFuncElement("GetCommandLineArgsNative", SystemNative::GetCommandLineArgs)
     FCFuncElement("get_CurrentProcessorNumber", SystemNative::GetCurrentProcessorNumber)
 
-#if defined(FEATURE_COMINTEROP) && !defined(FEATURE_CORESYSTEM)
+#if defined(FEATURE_COMINTEROP)
     QCFuncElement("WinRTSupported", SystemNative::WinRTSupported)
 #endif // FEATURE_COMINTEROP
     FCFuncElementSig("FailFast", &gsig_SM_Str_RetVoid, SystemNative::FailFast)
index 18bc24a..aff2507 100644 (file)
@@ -3815,7 +3815,10 @@ bool UnwindEbpDoubleAlignFrame(
         // TODO Currently we assume that ESP of funclet frames is always fixed but actually it could change.
         if (pCodeInfo->IsFunclet())
         {
-            baseSP = curESP + 12; // padding for 16byte stack alignment allocated in genFuncletProlog()
+            // Set baseSP as initial SP
+            baseSP = pContext->pCurrentContext->ResumeEsp;
+            // 16-byte stack alignment padding (allocated in genFuncletProlog)
+            baseSP += 12;
 
             pContext->PCTAddr = baseSP;
             pContext->ControlPC = *PTR_PCODE(pContext->PCTAddr);
@@ -4163,6 +4166,14 @@ bool EECodeManager::EnumGcRefs( PREGDISPLAY     pContext,
         GC_NOTRIGGER;
     } CONTRACTL_END;
 
+#ifdef WIN64EXCEPTIONS
+    if (flags & ParentOfFuncletStackFrame)
+    {
+        LOG((LF_GCROOTS, LL_INFO100000, "Not reporting this frame because it was already reported via another funclet.\n"));
+        return true;
+    }
+#endif // WIN64EXCEPTIONS
+
     GCInfoToken gcInfoToken = pCodeInfo->GetGCInfoToken();
     unsigned  curOffs = pCodeInfo->GetRelOffset();
 
@@ -4752,6 +4763,18 @@ bool EECodeManager::EnumGcRefs( PREGDISPLAY     pContext,
     _ASSERTE(*castto(table, unsigned short *)++ == 0xBABE);
 #endif
 
+#ifdef WIN64EXCEPTIONS   // funclets
+    //
+    // If we're in a funclet, we do not want to report the incoming varargs.  This is
+    // taken care of by the parent method and the funclet should access those arguments
+    // by way of the parent method's stack frame.
+    //
+    if(pCodeInfo->IsFunclet())
+    {
+        return true;
+    }
+#endif // WIN64EXCEPTIONS
+
     /* Are we a varargs function, if so we have to report all args
        except 'this' (note that the GC tables created by the x86 jit
        do not contain ANY arguments except 'this' (even if they
index b708f17..1eb8938 100644 (file)
@@ -4310,27 +4310,6 @@ HRESULT ETW::CEtwTracer::Register()
 {
     WRAPPER_NO_CONTRACT;
 
-#ifndef FEATURE_CORESYSTEM
-    OSVERSIONINFO osVer;
-    osVer.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
-
-    if (GetOSVersion(&osVer) == FALSE) {
-        return HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED);
-    }
-    else if (osVer.dwMajorVersion < ETW_SUPPORTED_MAJORVER) {
-        return HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED);
-    }
-
-    // if running on OS < Longhorn, skip registration unless reg key is set
-    // since ETW reg is expensive (in both time and working set) on older OSes
-    if (osVer.dwMajorVersion < ETW_ENABLED_MAJORVER && !g_fEnableETW && !CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_PreVistaETWEnabled))
-        return HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED);
-
-    // If running on OS >= Longhorn, skip registration if ETW is not enabled
-    if (osVer.dwMajorVersion >= ETW_ENABLED_MAJORVER && !g_fEnableETW && !CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_VistaAndAboveETWEnabled))
-        return HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED);
-#endif
-
     EventRegisterMicrosoft_Windows_DotNETRuntime();
     EventRegisterMicrosoft_Windows_DotNETRuntimePrivate();
     EventRegisterMicrosoft_Windows_DotNETRuntimeRundown();
index 6b34e71..4a6c3e5 100644 (file)
@@ -134,7 +134,7 @@ public:
         return m_pPrevNestedInfo;
     }
     
-    // Returns the throwble associated with the tracker
+    // Returns the throwable associated with the tracker
     inline OBJECTREF GetThrowable()
     {
         LIMITED_METHOD_CONTRACT;
index e861995..f3c139e 100644 (file)
@@ -1016,6 +1016,7 @@ void GCProfileWalkHeapWorker(BOOL fProfilerPinned, BOOL fShouldWalkHeapRootsForE
 {
     {
         ProfilingScanContext SC(fProfilerPinned);
+        unsigned max_generation = GCHeapUtilities::GetGCHeap()->GetMaxGeneration();
 
         // **** Scan roots:  Only scan roots if profiling API wants them or ETW wants them.
         if (fProfilerPinned || fShouldWalkHeapRootsForEtw)
@@ -1349,3 +1350,12 @@ void GCToEEInterface::HandleFatalError(unsigned int exitCode)
 {
     EEPOLICY_HANDLE_FATAL_ERROR(exitCode);
 }
+
+bool GCToEEInterface::ShouldFinalizeObjectForUnload(AppDomain* pDomain, Object* obj)
+{
+    // CoreCLR does not have appdomains, so this code path is dead. Other runtimes may
+    // choose to inspect the object being finalized here.
+    // [DESKTOP TODO] Desktop looks for "agile and finalizable" objects and may choose
+    // to move them to a new app domain instead of finalizing them here.
+    return true;
+}
index e3ced6c..030eb71 100644 (file)
@@ -45,6 +45,7 @@ public:
 
     void EnableFinalization(bool foundFinalizers);
     void HandleFatalError(unsigned int exitCode);
+    bool ShouldFinalizeObjectForUnload(AppDomain* pDomain, Object* obj);
 };
 
 #endif // FEATURE_STANDALONE_GC
index aa90341..91640d3 100644 (file)
@@ -4,6 +4,8 @@
 
 #include "common.h"
 #include "gcheaputilities.h"
+#include "appdomain.hpp"
+
 
 // These globals are variables used within the GC and maintained
 // by the EE for use in write barriers. It is the responsibility
@@ -12,6 +14,7 @@
 GPTR_IMPL_INIT(uint32_t, g_card_table,      nullptr);
 GPTR_IMPL_INIT(uint8_t,  g_lowest_address,  nullptr);
 GPTR_IMPL_INIT(uint8_t,  g_highest_address, nullptr);
+GVAL_IMPL_INIT(GCHeapType, g_heap_type,     GC_HEAP_INVALID);
 uint8_t* g_ephemeral_low  = (uint8_t*)1;
 uint8_t* g_ephemeral_high = (uint8_t*)~0;
 
@@ -36,3 +39,37 @@ bool g_sw_ww_enabled_for_gc_heap = false;
 
 gc_alloc_context g_global_alloc_context = {};
 
+// Debug-only validation for handle.
+void ValidateHandleAndAppDomain(OBJECTHANDLE handle)
+{
+#ifdef _DEBUG_IMPL
+    OBJECTREF objRef = ObjectToOBJECTREF(*(Object**)handle);
+    VALIDATEOBJECTREF(objRef);
+
+    IGCHandleTable *pHandleTable = GCHeapUtilities::GetGCHandleTable();
+
+    void* handleTable = pHandleTable->GetHandleTableForHandle(handle);
+    DWORD context = (DWORD)pHandleTable->GetHandleTableContext(handleTable);
+
+    ADIndex appDomainIndex = ADIndex(context);
+    AppDomain *domain = SystemDomain::GetAppDomainAtIndex(appDomainIndex);
+
+    // Access to a handle in an unloaded domain is not allowed
+    assert(domain != nullptr);
+    assert(!domain->NoAccessToHandleTable());
+
+#if CHECK_APP_DOMAIN_LEAKS
+    if (g_pConfig->AppDomainLeaks() && objRef != NULL)
+    {
+        if (appDomainIndex.m_dwIndex)
+        {
+            objRef->TryAssignAppDomain(domain);
+        }
+        else
+        {
+            objRef->TrySetAppDomainAgile();
+        }
+    }
+#endif // CHECK_APP_DOMAIN_LEAKS
+#endif // _DEBUG_IMPL
+}
index 1e92012..baa2558 100644 (file)
@@ -16,6 +16,7 @@ extern "C" {
 GPTR_DECL(uint8_t,g_lowest_address);
 GPTR_DECL(uint8_t,g_highest_address);
 GPTR_DECL(uint32_t,g_card_table);
+GVAL_DECL(GCHeapType, g_heap_type);
 #ifndef DACCESS_COMPILE
 }
 #endif // !DACCESS_COMPILE
@@ -120,10 +121,11 @@ public:
     inline static bool IsServerHeap()
     {
         LIMITED_METHOD_CONTRACT;
+
 #ifdef FEATURE_SVR_GC
-        _ASSERTE(IGCHeap::gcHeapType != IGCHeap::GC_HEAP_INVALID);
-        return (IGCHeap::gcHeapType == IGCHeap::GC_HEAP_SVR);
-#else // FEATURE_SVR_GC
+        _ASSERTE(g_heap_type != GC_HEAP_INVALID);
+        return g_heap_type == GC_HEAP_SVR;
+#else
         return false;
 #endif // FEATURE_SVR_GC
     }
@@ -209,5 +211,22 @@ private:
     GCHeapUtilities() = delete;
 };
 
+// Handle-related utilities.
+
+void ValidateHandleAndAppDomain(OBJECTHANDLE handle);
+
+// Given a handle, returns an OBJECTREF for the object it refers to.
+inline OBJECTREF ObjectFromHandle(OBJECTHANDLE handle)
+{
+    _ASSERTE(handle);
+
+#ifdef _DEBUG_IMPL
+    ValidateHandleAndAppDomain(handle);
+#endif // _DEBUG_IMPL
+
+    // Wrap the raw OBJECTREF and return it
+    return UNCHECKED_OBJECTREF_TO_OBJECTREF(*PTR_UNCHECKED_OBJECTREF(handle));
+}
+
 #endif // _GCHEAPUTILITIES_H_
 
index 30a6a38..1f2bedf 100644 (file)
@@ -398,7 +398,10 @@ HRESULT FunctionMember::GetLocalsDebugInfo(NotifyGdb::PTK_TypeInfoMap pTypeMap,
     {
         if (FindNativeInfoInILVariable(0, startNativeOffset, &locals.pVars, locals.countVars, &nativeVar) == S_OK)
         {
-            vars[0].m_var_type = GetTypeInfoFromTypeHandle(TypeHandle(md->GetMethodTable()), pTypeMap, method);
+            TypeHandle th = TypeHandle(md->GetMethodTable());
+            if (th.IsValueType())
+                th = th.MakePointer();
+            vars[0].m_var_type = GetTypeInfoFromTypeHandle(th, pTypeMap, method);
             vars[0].m_var_name = new char[strlen("this") + 1];
             strcpy(vars[0].m_var_name, "this");
             vars[0].m_il_index = 0;
index 248deac..338c274 100644 (file)
@@ -8719,7 +8719,6 @@ CORINFO_METHOD_HANDLE CEEInfo::resolveVirtualMethodHelper(CORINFO_METHOD_HANDLE
                                                           CORINFO_CONTEXT_HANDLE ownerType)
 {
     CONTRACTL {
-        SO_TOLERANT;
         THROWS;
         GC_TRIGGERS;
         MODE_PREEMPTIVE;
@@ -9917,15 +9916,12 @@ void CEEInfo::getEEInfo(CORINFO_EE_INFO *pEEInfoOut)
     pEEInfoOut->maxUncheckedOffsetForNullObject = MAX_UNCHECKED_OFFSET_FOR_NULL_OBJECT;
     pEEInfoOut->targetAbi = CORINFO_CORECLR_ABI;
 
-    OSVERSIONINFO   sVerInfo;
-    sVerInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
-    GetOSVersion(&sVerInfo);
-
     pEEInfoOut->osType = CORINFO_WINNT;
 
-    pEEInfoOut->osMajor = sVerInfo.dwMajorVersion;
-    pEEInfoOut->osMinor = sVerInfo.dwMinorVersion;
-    pEEInfoOut->osBuild = sVerInfo.dwBuildNumber;
+    // hardcode OS version to 0.0.0. These fields can be removed from JITEE interface
+    pEEInfoOut->osMajor = 0;
+    pEEInfoOut->osMinor = 0;
+    pEEInfoOut->osBuild = 0;
 
     EE_TO_JIT_TRANSITION();
 }
index e646771..67639e9 100644 (file)
@@ -285,7 +285,7 @@ PCODE MethodDesc::MakeJitWorker(COR_ILMETHOD_DECODER* ILHeader, CORJIT_FLAGS fla
     bool fBackgroundThread = flags.IsSet(CORJIT_FLAGS::CORJIT_FLAG_MCJIT_BACKGROUND);
 #endif
 
-    // If this is the first stage of a tiered compilation progression, use min-opt, otherwise
+    // If this is the first stage of a tiered compilation progression, use tier0, otherwise
     // use default compilation options
 #ifdef FEATURE_TIERED_COMPILATION
     if (!IsEligibleForTieredCompilation())
@@ -295,7 +295,7 @@ PCODE MethodDesc::MakeJitWorker(COR_ILMETHOD_DECODER* ILHeader, CORJIT_FLAGS fla
     else
     {
         fStable = FALSE;
-        flags.Add(CORJIT_FLAGS(CORJIT_FLAGS::CORJIT_FLAG_MIN_OPT));
+        flags.Add(CORJIT_FLAGS(CORJIT_FLAGS::CORJIT_FLAG_TIER0));
     }
 #endif
 
index 623556d..b85cf9a 100644 (file)
@@ -53,7 +53,7 @@ MethodDesc * ReadyToRunInfo::GetMethodDescForEntryPoint(PCODE entryPoint)
     }
     CONTRACTL_END;
 
-#ifdef _TARGET_AMD64_
+#if defined(_TARGET_AMD64_) || (defined(_TARGET_X86_) && defined(FEATURE_PAL))
     // A normal method entry point is always 8 byte aligned, but a funclet can start at an odd address.
     // Since PtrHashMap can't handle odd pointers, check for this case and return NULL.
     if ((entryPoint & 0x1) != 0)
index 0417bef..b4a8318 100644 (file)
 //
 
 DEFINE_EXCEPTION(g_ReflectionNS,       AmbiguousMatchException,        false,  COR_E_AMBIGUOUSMATCH)
-// ApplicationException is removed in CoreCLR
-#define kApplicationException kException 
+DEFINE_EXCEPTION(g_SystemNS,           ApplicationException,           false,  COR_E_APPLICATION)
 DEFINE_EXCEPTION(g_SystemNS,           AppDomainUnloadedException,     false,  COR_E_APPDOMAINUNLOADED)
 DEFINE_EXCEPTION(g_SystemNS,           ArithmeticException,            false,  COR_E_ARITHMETIC)
 
index da805bd..68a81bf 100644 (file)
@@ -5750,6 +5750,7 @@ void ThreadStore::InitThreadStore()
     }
     s_DeadThreadGCTriggerPeriodMilliseconds =
         CLRConfig::GetConfigValue(CLRConfig::INTERNAL_Thread_DeadThreadGCTriggerPeriodMilliseconds);
+    s_DeadThreadGenerationCounts = nullptr;
 }
 
 // Enter and leave the critical section around the thread store.  Clients should
@@ -5986,6 +5987,7 @@ void ThreadStore::TransferStartedThread(Thread *thread, BOOL bRequiresTSL)
 
 LONG ThreadStore::s_DeadThreadCountThresholdForGCTrigger = 0;
 DWORD ThreadStore::s_DeadThreadGCTriggerPeriodMilliseconds = 0;
+SIZE_T *ThreadStore::s_DeadThreadGenerationCounts = nullptr;
 
 void ThreadStore::IncrementDeadThreadCountForGCTrigger()
 {
@@ -6012,7 +6014,7 @@ void ThreadStore::IncrementDeadThreadCountForGCTrigger()
         return;
     }
 
-    SIZE_T gcLastMilliseconds = gcHeap->GetLastGCStartTime(max_generation);
+    SIZE_T gcLastMilliseconds = gcHeap->GetLastGCStartTime(gcHeap->GetMaxGeneration());
     SIZE_T gcNowMilliseconds = gcHeap->GetNow();
     if (gcNowMilliseconds - gcLastMilliseconds < s_DeadThreadGCTriggerPeriodMilliseconds)
     {
@@ -6088,11 +6090,22 @@ void ThreadStore::TriggerGCForDeadThreadsIfNecessary()
         return;
     }
 
-    int gcGenerationToTrigger = 0;
+    unsigned gcGenerationToTrigger = 0;
     IGCHeap *gcHeap = GCHeapUtilities::GetGCHeap();
     _ASSERTE(gcHeap != nullptr);
     SIZE_T generationCountThreshold = static_cast<SIZE_T>(s_DeadThreadCountThresholdForGCTrigger) / 2;
-    SIZE_T newDeadThreadGenerationCounts[max_generation + 1] = {0};
+    unsigned maxGeneration = gcHeap->GetMaxGeneration();
+    if (!s_DeadThreadGenerationCounts)
+    {
+        // initialize this field on first use with an entry for every table.
+        s_DeadThreadGenerationCounts = new (nothrow) SIZE_T[maxGeneration + 1];
+        if (!s_DeadThreadGenerationCounts)
+        {
+            return;
+        }
+    }
+
+    memset(s_DeadThreadGenerationCounts, 0, sizeof(SIZE_T) * (maxGeneration + 1));
     {
         ThreadStoreLockHolder threadStoreLockHolder;
         GCX_COOP();
@@ -6114,12 +6127,12 @@ void ThreadStore::TriggerGCForDeadThreadsIfNecessary()
                 continue;
             }
 
-            int exposedObjectGeneration = gcHeap->WhichGeneration(exposedObject);
-            SIZE_T newDeadThreadGenerationCount = ++newDeadThreadGenerationCounts[exposedObjectGeneration];
+            unsigned exposedObjectGeneration = gcHeap->WhichGeneration(exposedObject);
+            SIZE_T newDeadThreadGenerationCount = ++s_DeadThreadGenerationCounts[exposedObjectGeneration];
             if (exposedObjectGeneration > gcGenerationToTrigger && newDeadThreadGenerationCount >= generationCountThreshold)
             {
                 gcGenerationToTrigger = exposedObjectGeneration;
-                if (gcGenerationToTrigger >= max_generation)
+                if (gcGenerationToTrigger >= maxGeneration)
                 {
                     break;
                 }
@@ -6153,8 +6166,8 @@ void ThreadStore::TriggerGCForDeadThreadsIfNecessary()
                 continue;
             }
 
-            if (gcGenerationToTrigger < max_generation &&
-                static_cast<int>(gcHeap->WhichGeneration(exposedObject)) > gcGenerationToTrigger)
+            if (gcGenerationToTrigger < maxGeneration &&
+                gcHeap->WhichGeneration(exposedObject) > gcGenerationToTrigger)
             {
                 continue;
             }
index f34066f..697ffea 100644 (file)
@@ -5555,6 +5555,7 @@ private:
 private:
     static LONG s_DeadThreadCountThresholdForGCTrigger;
     static DWORD s_DeadThreadGCTriggerPeriodMilliseconds;
+    static SIZE_T *s_DeadThreadGenerationCounts;
 
 public:
 
index 64378db..2032e66 100644 (file)
@@ -300,7 +300,7 @@ PCODE TieredCompilationManager::CompileMethod(MethodDesc* pMethod)
     EX_TRY
     {
         CORJIT_FLAGS flags = CORJIT_FLAGS(CORJIT_FLAGS::CORJIT_FLAG_MCJIT_BACKGROUND);
-        flags.Add(CORJIT_FLAGS(CORJIT_FLAGS::CORJIT_FLAG_SPEED_OPT));
+        flags.Add(CORJIT_FLAGS(CORJIT_FLAGS::CORJIT_FLAG_TIER1));
 
         if (pMethod->IsDynamicMethod())
         {
index 2e3aace..cb69ba9 100644 (file)
@@ -1089,14 +1089,14 @@ HANDLE ZapImage::SaveImage(LPCWSTR wszOutputFileName, CORCOMPILE_NGEN_SIGNATURE
 
     OutputTables();
 
-       // Create a empty export table.  This makes tools like symchk not think
-       // that native images are resoure-only DLLs.  It is important to NOT
-       // be a resource-only DLL because those DLL's PDBS are not put up on the
-       // symbol server and we want NEN PDBS to be placed there.  
-       ZapPEExports* exports = new(GetHeap()) ZapPEExports(wszOutputFileName);
-       m_pDebugSection->Place(exports);
-       SetDirectoryEntry(IMAGE_DIRECTORY_ENTRY_EXPORT, exports);
-
+    // Create a empty export table.  This makes tools like symchk not think
+    // that native images are resoure-only DLLs.  It is important to NOT
+    // be a resource-only DLL because those DLL's PDBS are not put up on the
+    // symbol server and we want NEN PDBS to be placed there.  
+    ZapPEExports* exports = new(GetHeap()) ZapPEExports(wszOutputFileName);
+    m_pDebugSection->Place(exports);
+    SetDirectoryEntry(IMAGE_DIRECTORY_ENTRY_EXPORT, exports);
+    
     ComputeRVAs();
 
     if (!IsReadyToRunCompilation())
@@ -1610,7 +1610,7 @@ void ZapImage::ProfileDisableInlining()
             // Hot methods can be marked to be excluded from the AOT native image.
             // We also need to disable inlining of such methods.
             //
-            if ((methodProfilingDataFlags & (1 << ExcludeHotMethodCode)) != 0)
+            if ((methodProfilingDataFlags & (1 << DisableInlining)) != 0)
             {
                 // Disable the inlining of this method
                 //
@@ -1685,7 +1685,7 @@ void ZapImage::CompileHotRegion()
                 }
             }
 
-            // Update the 'flags' saved in the profileDataHashTable hash table.
+            // Update the 'flags' and 'compileResult' saved in the profileDataHashTable hash table.
             //
             hashBBUpdateFlagsAndCompileResult(token, methodProfilingDataFlags, compileResult);
         }
@@ -2100,8 +2100,8 @@ ZapImage::CompileStatus ZapImage::TryCompileMethodWorker(CORINFO_METHOD_HANDLE h
         //
         if ((methodProfilingDataFlags & (1 << ExcludeHotMethodCode)) != 0)
         {
-            // returning COMPILE_EXCLUDED excludes this method from the AOT native image
-            return COMPILE_EXCLUDED;
+            // returning COMPILE_HOT_EXCLUDED excludes this method from the AOT native image
+            return COMPILE_HOT_EXCLUDED;
         }
 
         // Cold methods can be marked to be excluded from the AOT native image.
@@ -2110,8 +2110,8 @@ ZapImage::CompileStatus ZapImage::TryCompileMethodWorker(CORINFO_METHOD_HANDLE h
         //
         if ((methodProfilingDataFlags & (1 << ExcludeColdMethodCode)) != 0)
         {
-            // returning COMPILE_EXCLUDED excludes this method from the AOT native image
-            return COMPILE_EXCLUDED;
+            // returning COMPILE_COLD_EXCLUDED excludes this method from the AOT native image
+            return COMPILE_COLD_EXCLUDED;
         }
 
         // If the code was never executed based on the profile data
@@ -2131,19 +2131,19 @@ ZapImage::CompileStatus ZapImage::TryCompileMethodWorker(CORINFO_METHOD_HANDLE h
         //
         if (m_zapper->m_pOpt->m_fPartialNGen)
         {
-            // returning COMPILE_EXCLUDED excludes this method from the AOT native image
-            return COMPILE_EXCLUDED;
+            // returning COMPILE_COLD_EXCLUDED excludes this method from the AOT native image
+            return COMPILE_COLD_EXCLUDED;
         }
 
         // Retrieve any information that we have about a previous compilation attempt of this method
         const ProfileDataHashEntry* pEntry = profileDataHashTable.LookupPtr(md);
 
         if (pEntry != nullptr)
-        {
-            if (pEntry->status == COMPILE_EXCLUDED)
+        { 
+            if ((pEntry->status == COMPILE_HOT_EXCLUDED) || (pEntry->status == COMPILE_COLD_EXCLUDED))
             {
-                // returning COMPILE_EXCLUDED excludes this method from the AOT native image
-                return COMPILE_EXCLUDED;
+                // returning COMPILE_HOT_EXCLUDED excludes this method from the AOT native image
+                return pEntry->status;
             }
         }
     }
index ba4bbc5..f0bcbcb 100644 (file)
@@ -338,10 +338,20 @@ private:
 
 public:
     enum CompileStatus {
-        LOOKUP_FAILED   = -2,  COMPILE_FAILED   = -1,      // Failure
-        NOT_COMPILED    =  0,  COMPILE_EXCLUDED =  1,      // Info
-        COMPILE_SUCCEED = 10,  ALREADY_COMPILED = 11
-    };      // Success
+        // Failure status values are negative
+        LOOKUP_FAILED    = -2,
+        COMPILE_FAILED   = -1,
+
+        // Info status values are [0..9]
+        NOT_COMPILED          =  0,
+        COMPILE_EXCLUDED      =  1,
+        COMPILE_HOT_EXCLUDED  =  2,
+        COMPILE_COLD_EXCLUDED =  3,
+
+        // Successful status values are 10 or greater
+        COMPILE_SUCCEED  = 10,
+        ALREADY_COMPILED = 11
+    };
 
 private:
     // A hash table entry that contains the profile infomation and the CompileStatus for a given method
@@ -376,8 +386,24 @@ private:
             return (count_t)k;
         }
 
-        static const element_t Null() { LIMITED_METHOD_CONTRACT; ProfileDataHashEntry e; e.pos = 0; e.size = 0; e.md = 0; return e; } // Assuming method profile data cannot start from position 0.
-        static bool IsNull(const element_t &e) { LIMITED_METHOD_CONTRACT; return e.pos == 0; }
+        static const element_t Null()
+        {
+            LIMITED_METHOD_CONTRACT; 
+            ProfileDataHashEntry e; 
+            e.md = 0; 
+            e.size = 0; 
+            e.pos = 0;
+            e.flags = 0;
+            e.status = NOT_COMPILED;
+            return e;
+        }
+
+        static bool IsNull(const element_t &e)
+        {
+            LIMITED_METHOD_CONTRACT;
+            // returns true if both md and pos are zero
+            return (e.md == 0) && (e.pos == 0);
+        }
     };
     typedef SHash<ProfileDataHashTraits> ProfileDataHashTable;
 
index 9713ce5..af0c41c 100644 (file)
@@ -1009,12 +1009,19 @@ HRESULT ZapInfo::getBBProfileData (
     }
 
     // The md must match.
-    _ASSERTE(foundEntry->md == md); 
+    _ASSERTE(foundEntry->md == md);
 
+    if (foundEntry->pos == 0)
+    {
+        // We might not have profile data and instead only have CompileStatus and flags
+        assert(foundEntry->size == 0);
+        return E_FAIL;
+    }
+
+    //
     //
     // We found the md. Let's retrieve the profile data.
     //
-    _ASSERTE(foundEntry->pos > 0);                                   // The target position cannot be 0.
     _ASSERTE(foundEntry->size >= sizeof(CORBBTPROF_METHOD_HEADER));   // The size must at least this
 
     ProfileReader profileReader(DataSection_MethodBlockCounts->pData, DataSection_MethodBlockCounts->dataSize);
index 40eb20a..ee641ef 100644 (file)
@@ -1,8 +1,8 @@
 ## This list file has been produced automatically. Any changes
 ## are subject to being overwritten when reproducing this file.
 ## 
-## Last Updated: 27-Feb-2017 16:38:10
-## Commit: 740b64d2513c68f8455444a90f477010f71093bf
+## Last Updated: 31-Mar-2017 09:36:29
+## Commit: 2401b6ed08252d48831bfd804c3533cd0142c76c
 ## 
 [Dev10_535767.cmd_0]
 RelativePath=baseservices\compilerservices\dynamicobjectproperties\Dev10_535767\Dev10_535767.cmd
@@ -9988,310 +9988,6 @@ MaxAllowedDurationSeconds=600
 Categories=Pri1;RT;EXPECTED_PASS
 HostStyle=0
 
-[DateTimeCompare.cmd_1248]
-RelativePath=CoreMangLib\cti\system\datetime\DateTimeCompare\DateTimeCompare.cmd
-WorkingDir=CoreMangLib\cti\system\datetime\DateTimeCompare
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeCompareTo1.cmd_1249]
-RelativePath=CoreMangLib\cti\system\datetime\DateTimeCompareTo1\DateTimeCompareTo1.cmd
-WorkingDir=CoreMangLib\cti\system\datetime\DateTimeCompareTo1
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeCtor1.cmd_1250]
-RelativePath=CoreMangLib\cti\system\datetime\DateTimeCtor1\DateTimeCtor1.cmd
-WorkingDir=CoreMangLib\cti\system\datetime\DateTimeCtor1
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeCtor3.cmd_1251]
-RelativePath=CoreMangLib\cti\system\datetime\DateTimeCtor3\DateTimeCtor3.cmd
-WorkingDir=CoreMangLib\cti\system\datetime\DateTimeCtor3
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeCtor4.cmd_1252]
-RelativePath=CoreMangLib\cti\system\datetime\DateTimeCtor4\DateTimeCtor4.cmd
-WorkingDir=CoreMangLib\cti\system\datetime\DateTimeCtor4
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeCtor6.cmd_1253]
-RelativePath=CoreMangLib\cti\system\datetime\DateTimeCtor6\DateTimeCtor6.cmd
-WorkingDir=CoreMangLib\cti\system\datetime\DateTimeCtor6
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeCtor7.cmd_1254]
-RelativePath=CoreMangLib\cti\system\datetime\DateTimeCtor7\DateTimeCtor7.cmd
-WorkingDir=CoreMangLib\cti\system\datetime\DateTimeCtor7
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeDate.cmd_1255]
-RelativePath=CoreMangLib\cti\system\datetime\DateTimeDate\DateTimeDate.cmd
-WorkingDir=CoreMangLib\cti\system\datetime\DateTimeDate
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeGetHashCode.cmd_1256]
-RelativePath=CoreMangLib\cti\system\datetime\DateTimeGetHashCode\DateTimeGetHashCode.cmd
-WorkingDir=CoreMangLib\cti\system\datetime\DateTimeGetHashCode
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeHour.cmd_1257]
-RelativePath=CoreMangLib\cti\system\datetime\DateTimeHour\DateTimeHour.cmd
-WorkingDir=CoreMangLib\cti\system\datetime\DateTimeHour
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeKind.cmd_1258]
-RelativePath=CoreMangLib\cti\system\datetime\DateTimeKind\DateTimeKind.cmd
-WorkingDir=CoreMangLib\cti\system\datetime\DateTimeKind
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeMaxValue.cmd_1259]
-RelativePath=CoreMangLib\cti\system\datetime\DateTimeMaxValue\DateTimeMaxValue.cmd
-WorkingDir=CoreMangLib\cti\system\datetime\DateTimeMaxValue
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeMillisecond.cmd_1260]
-RelativePath=CoreMangLib\cti\system\datetime\DateTimeMillisecond\DateTimeMillisecond.cmd
-WorkingDir=CoreMangLib\cti\system\datetime\DateTimeMillisecond
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeMinute.cmd_1261]
-RelativePath=CoreMangLib\cti\system\datetime\DateTimeMinute\DateTimeMinute.cmd
-WorkingDir=CoreMangLib\cti\system\datetime\DateTimeMinute
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeMinValue.cmd_1262]
-RelativePath=CoreMangLib\cti\system\datetime\DateTimeMinValue\DateTimeMinValue.cmd
-WorkingDir=CoreMangLib\cti\system\datetime\DateTimeMinValue
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeNow.cmd_1263]
-RelativePath=CoreMangLib\cti\system\datetime\DateTimeNow\DateTimeNow.cmd
-WorkingDir=CoreMangLib\cti\system\datetime\DateTimeNow
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeParse1.cmd_1264]
-RelativePath=CoreMangLib\cti\system\datetime\DateTimeParse1\DateTimeParse1.cmd
-WorkingDir=CoreMangLib\cti\system\datetime\DateTimeParse1
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeParse2.cmd_1265]
-RelativePath=CoreMangLib\cti\system\datetime\DateTimeParse2\DateTimeParse2.cmd
-WorkingDir=CoreMangLib\cti\system\datetime\DateTimeParse2
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeParse3.cmd_1266]
-RelativePath=CoreMangLib\cti\system\datetime\DateTimeParse3\DateTimeParse3.cmd
-WorkingDir=CoreMangLib\cti\system\datetime\DateTimeParse3
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeParseExact1.cmd_1267]
-RelativePath=CoreMangLib\cti\system\datetime\DateTimeParseExact1\DateTimeParseExact1.cmd
-WorkingDir=CoreMangLib\cti\system\datetime\DateTimeParseExact1
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeParseExact2.cmd_1268]
-RelativePath=CoreMangLib\cti\system\datetime\DateTimeParseExact2\DateTimeParseExact2.cmd
-WorkingDir=CoreMangLib\cti\system\datetime\DateTimeParseExact2
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeParseExact3.cmd_1269]
-RelativePath=CoreMangLib\cti\system\datetime\DateTimeParseExact3\DateTimeParseExact3.cmd
-WorkingDir=CoreMangLib\cti\system\datetime\DateTimeParseExact3
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeSecond.cmd_1270]
-RelativePath=CoreMangLib\cti\system\datetime\DateTimeSecond\DateTimeSecond.cmd
-WorkingDir=CoreMangLib\cti\system\datetime\DateTimeSecond
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeSubtract1.cmd_1271]
-RelativePath=CoreMangLib\cti\system\datetime\DateTimeSubtract1\DateTimeSubtract1.cmd
-WorkingDir=CoreMangLib\cti\system\datetime\DateTimeSubtract1
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeSubtract2.cmd_1272]
-RelativePath=CoreMangLib\cti\system\datetime\DateTimeSubtract2\DateTimeSubtract2.cmd
-WorkingDir=CoreMangLib\cti\system\datetime\DateTimeSubtract2
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeTicks.cmd_1273]
-RelativePath=CoreMangLib\cti\system\datetime\DateTimeTicks\DateTimeTicks.cmd
-WorkingDir=CoreMangLib\cti\system\datetime\DateTimeTicks
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeTimeOfDay.cmd_1274]
-RelativePath=CoreMangLib\cti\system\datetime\DateTimeTimeOfDay\DateTimeTimeOfDay.cmd
-WorkingDir=CoreMangLib\cti\system\datetime\DateTimeTimeOfDay
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimetoday.cmd_1275]
-RelativePath=CoreMangLib\cti\system\datetime\DateTimetoday\DateTimetoday.cmd
-WorkingDir=CoreMangLib\cti\system\datetime\DateTimetoday
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeToFileTime.cmd_1276]
-RelativePath=CoreMangLib\cti\system\datetime\DateTimeToFileTime\DateTimeToFileTime.cmd
-WorkingDir=CoreMangLib\cti\system\datetime\DateTimeToFileTime
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeToFileTimeUtc.cmd_1277]
-RelativePath=CoreMangLib\cti\system\datetime\DateTimeToFileTimeUtc\DateTimeToFileTimeUtc.cmd
-WorkingDir=CoreMangLib\cti\system\datetime\DateTimeToFileTimeUtc
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeToLocalTime.cmd_1278]
-RelativePath=CoreMangLib\cti\system\datetime\DateTimeToLocalTime\DateTimeToLocalTime.cmd
-WorkingDir=CoreMangLib\cti\system\datetime\DateTimeToLocalTime
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeToString1.cmd_1279]
-RelativePath=CoreMangLib\cti\system\datetime\DateTimeToString1\DateTimeToString1.cmd
-WorkingDir=CoreMangLib\cti\system\datetime\DateTimeToString1
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeToString2.cmd_1280]
-RelativePath=CoreMangLib\cti\system\datetime\DateTimeToString2\DateTimeToString2.cmd
-WorkingDir=CoreMangLib\cti\system\datetime\DateTimeToString2
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeToString3.cmd_1281]
-RelativePath=CoreMangLib\cti\system\datetime\DateTimeToString3\DateTimeToString3.cmd
-WorkingDir=CoreMangLib\cti\system\datetime\DateTimeToString3
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeUtcNow.cmd_1282]
-RelativePath=CoreMangLib\cti\system\datetime\DateTimeUtcNow\DateTimeUtcNow.cmd
-WorkingDir=CoreMangLib\cti\system\datetime\DateTimeUtcNow
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeKindLocal.cmd_1283]
-RelativePath=CoreMangLib\cti\system\datetimekind\DateTimeKindLocal\DateTimeKindLocal.cmd
-WorkingDir=CoreMangLib\cti\system\datetimekind\DateTimeKindLocal
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeKindUnspecified.cmd_1284]
-RelativePath=CoreMangLib\cti\system\datetimekind\DateTimeKindUnspecified\DateTimeKindUnspecified.cmd
-WorkingDir=CoreMangLib\cti\system\datetimekind\DateTimeKindUnspecified
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeKindUtc.cmd_1285]
-RelativePath=CoreMangLib\cti\system\datetimekind\DateTimeKindUtc\DateTimeKindUtc.cmd
-WorkingDir=CoreMangLib\cti\system\datetimekind\DateTimeKindUtc
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
 [DayOfWeekFriday.cmd_1286]
 RelativePath=CoreMangLib\cti\system\dayofweek\DayOfWeekFriday\DayOfWeekFriday.cmd
 WorkingDir=CoreMangLib\cti\system\dayofweek\DayOfWeekFriday
@@ -11412,1094 +11108,6 @@ MaxAllowedDurationSeconds=600
 Categories=Pri1;RT;EXPECTED_PASS
 HostStyle=0
 
-[CalendarWeekRuleFirstDay.cmd_1426]
-RelativePath=CoreMangLib\cti\system\globalization\calendarweekrule\CalendarWeekRuleFirstDay\CalendarWeekRuleFirstDay.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\calendarweekrule\CalendarWeekRuleFirstDay
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[CalendarWeekRuleFirstFourDayWeek.cmd_1427]
-RelativePath=CoreMangLib\cti\system\globalization\calendarweekrule\CalendarWeekRuleFirstFourDayWeek\CalendarWeekRuleFirstFourDayWeek.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\calendarweekrule\CalendarWeekRuleFirstFourDayWeek
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[CalendarWeekRuleFirstFullWeek.cmd_1428]
-RelativePath=CoreMangLib\cti\system\globalization\calendarweekrule\CalendarWeekRuleFirstFullWeek\CalendarWeekRuleFirstFullWeek.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\calendarweekrule\CalendarWeekRuleFirstFullWeek
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[CharUnicodeInfoGetNumericValue1.cmd_1429]
-RelativePath=CoreMangLib\cti\system\globalization\charunicodeinfo\CharUnicodeInfoGetNumericValue1\CharUnicodeInfoGetNumericValue1.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\charunicodeinfo\CharUnicodeInfoGetNumericValue1
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[CharUnicodeInfoGetNumericValue2.cmd_1430]
-RelativePath=CoreMangLib\cti\system\globalization\charunicodeinfo\CharUnicodeInfoGetNumericValue2\CharUnicodeInfoGetNumericValue2.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\charunicodeinfo\CharUnicodeInfoGetNumericValue2
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[CharUnicodeInfoGetUnicodeCategory1.cmd_1431]
-RelativePath=CoreMangLib\cti\system\globalization\charunicodeinfo\CharUnicodeInfoGetUnicodeCategory1\CharUnicodeInfoGetUnicodeCategory1.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\charunicodeinfo\CharUnicodeInfoGetUnicodeCategory1
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[CharUnicodeInfoGetUnicodeCategory2.cmd_1432]
-RelativePath=CoreMangLib\cti\system\globalization\charunicodeinfo\CharUnicodeInfoGetUnicodeCategory2\CharUnicodeInfoGetUnicodeCategory2.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\charunicodeinfo\CharUnicodeInfoGetUnicodeCategory2
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[CompareInfoCompare2.cmd_1433]
-RelativePath=CoreMangLib\cti\system\globalization\compareinfo\CompareInfoCompare2\CompareInfoCompare2.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\compareinfo\CompareInfoCompare2
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[CompareInfoIndexOf2.cmd_1434]
-RelativePath=CoreMangLib\cti\system\globalization\compareinfo\CompareInfoIndexOf2\CompareInfoIndexOf2.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\compareinfo\CompareInfoIndexOf2
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[CompareOptionsIgnoreCase.cmd_1435]
-RelativePath=CoreMangLib\cti\system\globalization\compareoptions\CompareOptionsIgnoreCase\CompareOptionsIgnoreCase.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\compareoptions\CompareOptionsIgnoreCase
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[CompareOptionsIgnoreKanaType.cmd_1436]
-RelativePath=CoreMangLib\cti\system\globalization\compareoptions\CompareOptionsIgnoreKanaType\CompareOptionsIgnoreKanaType.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\compareoptions\CompareOptionsIgnoreKanaType
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[CompareOptionsIgnoreNonSpace.cmd_1437]
-RelativePath=CoreMangLib\cti\system\globalization\compareoptions\CompareOptionsIgnoreNonSpace\CompareOptionsIgnoreNonSpace.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\compareoptions\CompareOptionsIgnoreNonSpace
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[CompareOptionsIgnoreSymbols.cmd_1438]
-RelativePath=CoreMangLib\cti\system\globalization\compareoptions\CompareOptionsIgnoreSymbols\CompareOptionsIgnoreSymbols.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\compareoptions\CompareOptionsIgnoreSymbols
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[CompareOptionsIgnoreWidth.cmd_1439]
-RelativePath=CoreMangLib\cti\system\globalization\compareoptions\CompareOptionsIgnoreWidth\CompareOptionsIgnoreWidth.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\compareoptions\CompareOptionsIgnoreWidth
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[CompareOptionsNone.cmd_1440]
-RelativePath=CoreMangLib\cti\system\globalization\compareoptions\CompareOptionsNone\CompareOptionsNone.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\compareoptions\CompareOptionsNone
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[CompareOptionsOrdinal.cmd_1441]
-RelativePath=CoreMangLib\cti\system\globalization\compareoptions\CompareOptionsOrdinal\CompareOptionsOrdinal.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\compareoptions\CompareOptionsOrdinal
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[CompareOptionsOrdinalIgoreCase.cmd_1442]
-RelativePath=CoreMangLib\cti\system\globalization\compareoptions\CompareOptionsOrdinalIgoreCase\CompareOptionsOrdinalIgoreCase.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\compareoptions\CompareOptionsOrdinalIgoreCase
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[CompareOptionsStringSort.cmd_1443]
-RelativePath=CoreMangLib\cti\system\globalization\compareoptions\CompareOptionsStringSort\CompareOptionsStringSort.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\compareoptions\CompareOptionsStringSort
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[CultureInfoClone.cmd_1444]
-RelativePath=CoreMangLib\cti\system\globalization\cultureinfo\CultureInfoClone\CultureInfoClone.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\cultureinfo\CultureInfoClone
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[CultureInfoEnglishName.cmd_1445]
-RelativePath=CoreMangLib\cti\system\globalization\cultureinfo\CultureInfoEnglishName\CultureInfoEnglishName.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\cultureinfo\CultureInfoEnglishName
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[CultureInfoEquals.cmd_1446]
-RelativePath=CoreMangLib\cti\system\globalization\cultureinfo\CultureInfoEquals\CultureInfoEquals.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\cultureinfo\CultureInfoEquals
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[CultureInfoGetCultureInfo2.cmd_1447]
-RelativePath=CoreMangLib\cti\system\globalization\cultureinfo\CultureInfoGetCultureInfo2\CultureInfoGetCultureInfo2.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\cultureinfo\CultureInfoGetCultureInfo2
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[CultureInfoGetHashCode.cmd_1448]
-RelativePath=CoreMangLib\cti\system\globalization\cultureinfo\CultureInfoGetHashCode\CultureInfoGetHashCode.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\cultureinfo\CultureInfoGetHashCode
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[CultureInfoInvariantCulture.cmd_1449]
-RelativePath=CoreMangLib\cti\system\globalization\cultureinfo\CultureInfoInvariantCulture\CultureInfoInvariantCulture.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\cultureinfo\CultureInfoInvariantCulture
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[CultureInfoIsNeutralCulture.cmd_1450]
-RelativePath=CoreMangLib\cti\system\globalization\cultureinfo\CultureInfoIsNeutralCulture\CultureInfoIsNeutralCulture.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\cultureinfo\CultureInfoIsNeutralCulture
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[CultureInfoName.cmd_1451]
-RelativePath=CoreMangLib\cti\system\globalization\cultureinfo\CultureInfoName\CultureInfoName.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\cultureinfo\CultureInfoName
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[CultureInfoNativeName.cmd_1452]
-RelativePath=CoreMangLib\cti\system\globalization\cultureinfo\CultureInfoNativeName\CultureInfoNativeName.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\cultureinfo\CultureInfoNativeName
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[CultureInfoParent.cmd_1453]
-RelativePath=CoreMangLib\cti\system\globalization\cultureinfo\CultureInfoParent\CultureInfoParent.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\cultureinfo\CultureInfoParent
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[CultureInfoReadOnly.cmd_1454]
-RelativePath=CoreMangLib\cti\system\globalization\cultureinfo\CultureInfoReadOnly\CultureInfoReadOnly.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\cultureinfo\CultureInfoReadOnly
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[CultureInfoTextInfo.cmd_1455]
-RelativePath=CoreMangLib\cti\system\globalization\cultureinfo\CultureInfoTextInfo\CultureInfoTextInfo.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\cultureinfo\CultureInfoTextInfo
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[CultureInfoToString.cmd_1456]
-RelativePath=CoreMangLib\cti\system\globalization\cultureinfo\CultureInfoToString\CultureInfoToString.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\cultureinfo\CultureInfoToString
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[CultureInfoTwoLetterISOLanguageName.cmd_1457]
-RelativePath=CoreMangLib\cti\system\globalization\cultureinfo\CultureInfoTwoLetterISOLanguageName\CultureInfoTwoLetterISOLanguageName.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\cultureinfo\CultureInfoTwoLetterISOLanguageName
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeFormatInfoClone.cmd_1458]
-RelativePath=CoreMangLib\cti\system\globalization\datetimeformatinfo\DateTimeFormatInfoClone\DateTimeFormatInfoClone.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\datetimeformatinfo\DateTimeFormatInfoClone
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeFormatInfoCurrentInfo.cmd_1459]
-RelativePath=CoreMangLib\cti\system\globalization\datetimeformatinfo\DateTimeFormatInfoCurrentInfo\DateTimeFormatInfoCurrentInfo.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\datetimeformatinfo\DateTimeFormatInfoCurrentInfo
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeFormatInfoGetAbbreviatedMonthName.cmd_1460]
-RelativePath=CoreMangLib\cti\system\globalization\datetimeformatinfo\DateTimeFormatInfoGetAbbreviatedMonthName\DateTimeFormatInfoGetAbbreviatedMonthName.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\datetimeformatinfo\DateTimeFormatInfoGetAbbreviatedMonthName
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeFormatInfoGetFormat.cmd_1461]
-RelativePath=CoreMangLib\cti\system\globalization\datetimeformatinfo\DateTimeFormatInfoGetFormat\DateTimeFormatInfoGetFormat.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\datetimeformatinfo\DateTimeFormatInfoGetFormat
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeFormatInfoGetInstance.cmd_1462]
-RelativePath=CoreMangLib\cti\system\globalization\datetimeformatinfo\DateTimeFormatInfoGetInstance\DateTimeFormatInfoGetInstance.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\datetimeformatinfo\DateTimeFormatInfoGetInstance
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeFormatInfoGetMonthName.cmd_1463]
-RelativePath=CoreMangLib\cti\system\globalization\datetimeformatinfo\DateTimeFormatInfoGetMonthName\DateTimeFormatInfoGetMonthName.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\datetimeformatinfo\DateTimeFormatInfoGetMonthName
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeFormatInfoInvariantInfo.cmd_1464]
-RelativePath=CoreMangLib\cti\system\globalization\datetimeformatinfo\DateTimeFormatInfoInvariantInfo\DateTimeFormatInfoInvariantInfo.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\datetimeformatinfo\DateTimeFormatInfoInvariantInfo
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeFormatInfoIsReadOnly.cmd_1465]
-RelativePath=CoreMangLib\cti\system\globalization\datetimeformatinfo\DateTimeFormatInfoIsReadOnly\DateTimeFormatInfoIsReadOnly.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\datetimeformatinfo\DateTimeFormatInfoIsReadOnly
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeFormatInfoReadOnly.cmd_1466]
-RelativePath=CoreMangLib\cti\system\globalization\datetimeformatinfo\DateTimeFormatInfoReadOnly\DateTimeFormatInfoReadOnly.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\datetimeformatinfo\DateTimeFormatInfoReadOnly
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeFormatInfoRFC1123Pattern.cmd_1467]
-RelativePath=CoreMangLib\cti\system\globalization\datetimeformatinfo\DateTimeFormatInfoRFC1123Pattern\DateTimeFormatInfoRFC1123Pattern.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\datetimeformatinfo\DateTimeFormatInfoRFC1123Pattern
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeFormatInfoSortableDateTimePattern.cmd_1468]
-RelativePath=CoreMangLib\cti\system\globalization\datetimeformatinfo\DateTimeFormatInfoSortableDateTimePattern\DateTimeFormatInfoSortableDateTimePattern.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\datetimeformatinfo\DateTimeFormatInfoSortableDateTimePattern
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[UniversalSortableDateTimePattern.cmd_1469]
-RelativePath=CoreMangLib\cti\system\globalization\datetimeformatinfo\UniversalSortableDateTimePattern\UniversalSortableDateTimePattern.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\datetimeformatinfo\UniversalSortableDateTimePattern
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeStyleAllowInnerWhite.cmd_1470]
-RelativePath=CoreMangLib\cti\system\globalization\datetimestyles\DateTimeStyleAllowInnerWhite\DateTimeStyleAllowInnerWhite.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\datetimestyles\DateTimeStyleAllowInnerWhite
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeStylesAdjustToUniversal.cmd_1471]
-RelativePath=CoreMangLib\cti\system\globalization\datetimestyles\DateTimeStylesAdjustToUniversal\DateTimeStylesAdjustToUniversal.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\datetimestyles\DateTimeStylesAdjustToUniversal
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeStylesAllowLeadingWhite.cmd_1472]
-RelativePath=CoreMangLib\cti\system\globalization\datetimestyles\DateTimeStylesAllowLeadingWhite\DateTimeStylesAllowLeadingWhite.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\datetimestyles\DateTimeStylesAllowLeadingWhite
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeStylesAllowTrailingWhite.cmd_1473]
-RelativePath=CoreMangLib\cti\system\globalization\datetimestyles\DateTimeStylesAllowTrailingWhite\DateTimeStylesAllowTrailingWhite.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\datetimestyles\DateTimeStylesAllowTrailingWhite
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeStylesAllowWhiteSpaces.cmd_1474]
-RelativePath=CoreMangLib\cti\system\globalization\datetimestyles\DateTimeStylesAllowWhiteSpaces\DateTimeStylesAllowWhiteSpaces.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\datetimestyles\DateTimeStylesAllowWhiteSpaces
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeStylesAssumeLocal.cmd_1475]
-RelativePath=CoreMangLib\cti\system\globalization\datetimestyles\DateTimeStylesAssumeLocal\DateTimeStylesAssumeLocal.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\datetimestyles\DateTimeStylesAssumeLocal
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeStylesAssumeUniversal.cmd_1476]
-RelativePath=CoreMangLib\cti\system\globalization\datetimestyles\DateTimeStylesAssumeUniversal\DateTimeStylesAssumeUniversal.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\datetimestyles\DateTimeStylesAssumeUniversal
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeStylesNoCurrentDateDefault.cmd_1477]
-RelativePath=CoreMangLib\cti\system\globalization\datetimestyles\DateTimeStylesNoCurrentDateDefault\DateTimeStylesNoCurrentDateDefault.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\datetimestyles\DateTimeStylesNoCurrentDateDefault
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeStylesNone.cmd_1478]
-RelativePath=CoreMangLib\cti\system\globalization\datetimestyles\DateTimeStylesNone\DateTimeStylesNone.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\datetimestyles\DateTimeStylesNone
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[DateTimeStylesRoundTripKind.cmd_1479]
-RelativePath=CoreMangLib\cti\system\globalization\datetimestyles\DateTimeStylesRoundTripKind\DateTimeStylesRoundTripKind.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\datetimestyles\DateTimeStylesRoundTripKind
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[NumberFormatInfoClone.cmd_1480]
-RelativePath=CoreMangLib\cti\system\globalization\numberformatinfo\NumberFormatInfoClone\NumberFormatInfoClone.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\numberformatinfo\NumberFormatInfoClone
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[NumberFormatInfoCtor.cmd_1481]
-RelativePath=CoreMangLib\cti\system\globalization\numberformatinfo\NumberFormatInfoCtor\NumberFormatInfoCtor.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\numberformatinfo\NumberFormatInfoCtor
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[NumberFormatInfoCurrencyDecimalSeparator.cmd_1482]
-RelativePath=CoreMangLib\cti\system\globalization\numberformatinfo\NumberFormatInfoCurrencyDecimalSeparator\NumberFormatInfoCurrencyDecimalSeparator.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\numberformatinfo\NumberFormatInfoCurrencyDecimalSeparator
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[NumberFormatInfoCurrencyGroupSeparator.cmd_1483]
-RelativePath=CoreMangLib\cti\system\globalization\numberformatinfo\NumberFormatInfoCurrencyGroupSeparator\NumberFormatInfoCurrencyGroupSeparator.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\numberformatinfo\NumberFormatInfoCurrencyGroupSeparator
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[NumberFormatInfoGetFormat.cmd_1484]
-RelativePath=CoreMangLib\cti\system\globalization\numberformatinfo\NumberFormatInfoGetFormat\NumberFormatInfoGetFormat.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\numberformatinfo\NumberFormatInfoGetFormat
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[NumberFormatInfoGetInstance.cmd_1485]
-RelativePath=CoreMangLib\cti\system\globalization\numberformatinfo\NumberFormatInfoGetInstance\NumberFormatInfoGetInstance.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\numberformatinfo\NumberFormatInfoGetInstance
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[NumberFormatInfoReadOnly.cmd_1486]
-RelativePath=CoreMangLib\cti\system\globalization\numberformatinfo\NumberFormatInfoReadOnly\NumberFormatInfoReadOnly.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\numberformatinfo\NumberFormatInfoReadOnly
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[NumberStylesAllowCurrencySymbol.cmd_1487]
-RelativePath=CoreMangLib\cti\system\globalization\numberstyles\NumberStylesAllowCurrencySymbol\NumberStylesAllowCurrencySymbol.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\numberstyles\NumberStylesAllowCurrencySymbol
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[NumberStylesAllowDecimalPoint.cmd_1488]
-RelativePath=CoreMangLib\cti\system\globalization\numberstyles\NumberStylesAllowDecimalPoint\NumberStylesAllowDecimalPoint.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\numberstyles\NumberStylesAllowDecimalPoint
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[NumberStylesAllowExponent.cmd_1489]
-RelativePath=CoreMangLib\cti\system\globalization\numberstyles\NumberStylesAllowExponent\NumberStylesAllowExponent.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\numberstyles\NumberStylesAllowExponent
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[NumberStylesAllowHexSpecifier.cmd_1490]
-RelativePath=CoreMangLib\cti\system\globalization\numberstyles\NumberStylesAllowHexSpecifier\NumberStylesAllowHexSpecifier.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\numberstyles\NumberStylesAllowHexSpecifier
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[NumberStylesAllowLeadingSign.cmd_1491]
-RelativePath=CoreMangLib\cti\system\globalization\numberstyles\NumberStylesAllowLeadingSign\NumberStylesAllowLeadingSign.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\numberstyles\NumberStylesAllowLeadingSign
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[NumberStylesAllowLeadingWhite.cmd_1492]
-RelativePath=CoreMangLib\cti\system\globalization\numberstyles\NumberStylesAllowLeadingWhite\NumberStylesAllowLeadingWhite.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\numberstyles\NumberStylesAllowLeadingWhite
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[NumberStylesAllowParentheses.cmd_1493]
-RelativePath=CoreMangLib\cti\system\globalization\numberstyles\NumberStylesAllowParentheses\NumberStylesAllowParentheses.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\numberstyles\NumberStylesAllowParentheses
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[NumberStylesAllowThousands.cmd_1494]
-RelativePath=CoreMangLib\cti\system\globalization\numberstyles\NumberStylesAllowThousands\NumberStylesAllowThousands.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\numberstyles\NumberStylesAllowThousands
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[NumberStylesAllowTrailingSign.cmd_1495]
-RelativePath=CoreMangLib\cti\system\globalization\numberstyles\NumberStylesAllowTrailingSign\NumberStylesAllowTrailingSign.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\numberstyles\NumberStylesAllowTrailingSign
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[NumberStylesAllowTrailingWhite.cmd_1496]
-RelativePath=CoreMangLib\cti\system\globalization\numberstyles\NumberStylesAllowTrailingWhite\NumberStylesAllowTrailingWhite.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\numberstyles\NumberStylesAllowTrailingWhite
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[NumberStylesAny.cmd_1497]
-RelativePath=CoreMangLib\cti\system\globalization\numberstyles\NumberStylesAny\NumberStylesAny.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\numberstyles\NumberStylesAny
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[NumberStylesCurrency.cmd_1498]
-RelativePath=CoreMangLib\cti\system\globalization\numberstyles\NumberStylesCurrency\NumberStylesCurrency.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\numberstyles\NumberStylesCurrency
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[NumberStylesFloat.cmd_1499]
-RelativePath=CoreMangLib\cti\system\globalization\numberstyles\NumberStylesFloat\NumberStylesFloat.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\numberstyles\NumberStylesFloat
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[NumberStylesHexNumber.cmd_1500]
-RelativePath=CoreMangLib\cti\system\globalization\numberstyles\NumberStylesHexNumber\NumberStylesHexNumber.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\numberstyles\NumberStylesHexNumber
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[NumberStylesInteger.cmd_1501]
-RelativePath=CoreMangLib\cti\system\globalization\numberstyles\NumberStylesInteger\NumberStylesInteger.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\numberstyles\NumberStylesInteger
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[NumberStylesNone.cmd_1502]
-RelativePath=CoreMangLib\cti\system\globalization\numberstyles\NumberStylesNone\NumberStylesNone.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\numberstyles\NumberStylesNone
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[NumberStylesNumber.cmd_1503]
-RelativePath=CoreMangLib\cti\system\globalization\numberstyles\NumberStylesNumber\NumberStylesNumber.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\numberstyles\NumberStylesNumber
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[RegionInfoEquals.cmd_1505]
-RelativePath=CoreMangLib\cti\system\globalization\regioninfo\RegionInfoEquals\RegionInfoEquals.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\regioninfo\RegionInfoEquals
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[RegionInfoGetHashCode.cmd_1506]
-RelativePath=CoreMangLib\cti\system\globalization\regioninfo\RegionInfoGetHashCode\RegionInfoGetHashCode.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\regioninfo\RegionInfoGetHashCode
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[RegionInfoIsMetric.cmd_1507]
-RelativePath=CoreMangLib\cti\system\globalization\regioninfo\RegionInfoIsMetric\RegionInfoIsMetric.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\regioninfo\RegionInfoIsMetric
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[RegionInfoISOCurrencySymbol.cmd_1508]
-RelativePath=CoreMangLib\cti\system\globalization\regioninfo\RegionInfoISOCurrencySymbol\RegionInfoISOCurrencySymbol.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\regioninfo\RegionInfoISOCurrencySymbol
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[RegionInfoName.cmd_1509]
-RelativePath=CoreMangLib\cti\system\globalization\regioninfo\RegionInfoName\RegionInfoName.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\regioninfo\RegionInfoName
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[RegionInfoToString.cmd_1510]
-RelativePath=CoreMangLib\cti\system\globalization\regioninfo\RegionInfoToString\RegionInfoToString.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\regioninfo\RegionInfoToString
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[RegionInfoTwoLetterISORegionName.cmd_1511]
-RelativePath=CoreMangLib\cti\system\globalization\regioninfo\RegionInfoTwoLetterISORegionName\RegionInfoTwoLetterISORegionName.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\regioninfo\RegionInfoTwoLetterISORegionName
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[StringInfoCtor1.cmd_1512]
-RelativePath=CoreMangLib\cti\system\globalization\stringinfo\StringInfoCtor1\StringInfoCtor1.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\stringinfo\StringInfoCtor1
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[StringInfoCtor2.cmd_1513]
-RelativePath=CoreMangLib\cti\system\globalization\stringinfo\StringInfoCtor2\StringInfoCtor2.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\stringinfo\StringInfoCtor2
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[StringInfoEquals.cmd_1514]
-RelativePath=CoreMangLib\cti\system\globalization\stringinfo\StringInfoEquals\StringInfoEquals.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\stringinfo\StringInfoEquals
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[StringInfoGetHashCode.cmd_1515]
-RelativePath=CoreMangLib\cti\system\globalization\stringinfo\StringInfoGetHashCode\StringInfoGetHashCode.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\stringinfo\StringInfoGetHashCode
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[StringInfoGetNextTextElement2.cmd_1516]
-RelativePath=CoreMangLib\cti\system\globalization\stringinfo\StringInfoGetNextTextElement2\StringInfoGetNextTextElement2.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\stringinfo\StringInfoGetNextTextElement2
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[StringInfoGetTextElementEnumerator1.cmd_1517]
-RelativePath=CoreMangLib\cti\system\globalization\stringinfo\StringInfoGetTextElementEnumerator1\StringInfoGetTextElementEnumerator1.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\stringinfo\StringInfoGetTextElementEnumerator1
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[StringInfoGetTextElementEnumerator2.cmd_1518]
-RelativePath=CoreMangLib\cti\system\globalization\stringinfo\StringInfoGetTextElementEnumerator2\StringInfoGetTextElementEnumerator2.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\stringinfo\StringInfoGetTextElementEnumerator2
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[StringInfoLengthInTextElements.cmd_1519]
-RelativePath=CoreMangLib\cti\system\globalization\stringinfo\StringInfoLengthInTextElements\StringInfoLengthInTextElements.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\stringinfo\StringInfoLengthInTextElements
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[StringInfoParseCombiningCharacters.cmd_1520]
-RelativePath=CoreMangLib\cti\system\globalization\stringinfo\StringInfoParseCombiningCharacters\StringInfoParseCombiningCharacters.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\stringinfo\StringInfoParseCombiningCharacters
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[StringInfoString.cmd_1521]
-RelativePath=CoreMangLib\cti\system\globalization\stringinfo\StringInfoString\StringInfoString.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\stringinfo\StringInfoString
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[TextElementEnumeratorCurrent.cmd_1522]
-RelativePath=CoreMangLib\cti\system\globalization\textelementenumerator\TextElementEnumeratorCurrent\TextElementEnumeratorCurrent.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\textelementenumerator\TextElementEnumeratorCurrent
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[TextElementEnumeratorElementIndex.cmd_1523]
-RelativePath=CoreMangLib\cti\system\globalization\textelementenumerator\TextElementEnumeratorElementIndex\TextElementEnumeratorElementIndex.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\textelementenumerator\TextElementEnumeratorElementIndex
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[TextElementEnumeratorGetTextElement.cmd_1524]
-RelativePath=CoreMangLib\cti\system\globalization\textelementenumerator\TextElementEnumeratorGetTextElement\TextElementEnumeratorGetTextElement.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\textelementenumerator\TextElementEnumeratorGetTextElement
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[TextElementEnumeratorMoveNext.cmd_1525]
-RelativePath=CoreMangLib\cti\system\globalization\textelementenumerator\TextElementEnumeratorMoveNext\TextElementEnumeratorMoveNext.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\textelementenumerator\TextElementEnumeratorMoveNext
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[TextElementEnumeratorReset.cmd_1526]
-RelativePath=CoreMangLib\cti\system\globalization\textelementenumerator\TextElementEnumeratorReset\TextElementEnumeratorReset.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\textelementenumerator\TextElementEnumeratorReset
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[TextInfoCultureName.cmd_1527]
-RelativePath=CoreMangLib\cti\system\globalization\textinfo\TextInfoCultureName\TextInfoCultureName.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\textinfo\TextInfoCultureName
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[TextInfoEquals.cmd_1528]
-RelativePath=CoreMangLib\cti\system\globalization\textinfo\TextInfoEquals\TextInfoEquals.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\textinfo\TextInfoEquals
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[TextInfoGetHashCode.cmd_1529]
-RelativePath=CoreMangLib\cti\system\globalization\textinfo\TextInfoGetHashCode\TextInfoGetHashCode.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\textinfo\TextInfoGetHashCode
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[TextInfoIsReadOnly.cmd_1530]
-RelativePath=CoreMangLib\cti\system\globalization\textinfo\TextInfoIsReadOnly\TextInfoIsReadOnly.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\textinfo\TextInfoIsReadOnly
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[TextInfoToString.cmd_1531]
-RelativePath=CoreMangLib\cti\system\globalization\textinfo\TextInfoToString\TextInfoToString.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\textinfo\TextInfoToString
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[TextInfoToUpper1.cmd_1532]
-RelativePath=CoreMangLib\cti\system\globalization\textinfo\TextInfoToUpper1\TextInfoToUpper1.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\textinfo\TextInfoToUpper1
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[TextInfoToUpper2.cmd_1533]
-RelativePath=CoreMangLib\cti\system\globalization\textinfo\TextInfoToUpper2\TextInfoToUpper2.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\textinfo\TextInfoToUpper2
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[UnicodeCategoryClosePunctuation.cmd_1534]
-RelativePath=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryClosePunctuation\UnicodeCategoryClosePunctuation.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryClosePunctuation
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[UnicodeCategoryConnectorPunctuation.cmd_1535]
-RelativePath=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryConnectorPunctuation\UnicodeCategoryConnectorPunctuation.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryConnectorPunctuation
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[UnicodeCategoryControl.cmd_1536]
-RelativePath=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryControl\UnicodeCategoryControl.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryControl
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[UnicodeCategoryDashPunctuation.cmd_1537]
-RelativePath=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryDashPunctuation\UnicodeCategoryDashPunctuation.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryDashPunctuation
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[UnicodeCategoryDecimalDigitNumber.cmd_1538]
-RelativePath=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryDecimalDigitNumber\UnicodeCategoryDecimalDigitNumber.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryDecimalDigitNumber
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[UnicodeCategoryEnclosingMark.cmd_1539]
-RelativePath=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryEnclosingMark\UnicodeCategoryEnclosingMark.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryEnclosingMark
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[UnicodeCategoryFinalQuotePunctuation.cmd_1540]
-RelativePath=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryFinalQuotePunctuation\UnicodeCategoryFinalQuotePunctuation.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryFinalQuotePunctuation
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[UnicodeCategoryFormat.cmd_1541]
-RelativePath=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryFormat\UnicodeCategoryFormat.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryFormat
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[UnicodeCategoryInitialQuotePunctuation.cmd_1542]
-RelativePath=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryInitialQuotePunctuation\UnicodeCategoryInitialQuotePunctuation.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryInitialQuotePunctuation
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[UnicodeCategoryLetterNumber.cmd_1543]
-RelativePath=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryLetterNumber\UnicodeCategoryLetterNumber.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryLetterNumber
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[UnicodeCategoryLineSeparator.cmd_1544]
-RelativePath=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryLineSeparator\UnicodeCategoryLineSeparator.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryLineSeparator
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[UnicodeCategoryLowercaseLetter.cmd_1545]
-RelativePath=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryLowercaseLetter\UnicodeCategoryLowercaseLetter.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryLowercaseLetter
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[UnicodeCategoryMathSymbol.cmd_1546]
-RelativePath=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryMathSymbol\UnicodeCategoryMathSymbol.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryMathSymbol
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[UnicodeCategoryModifierLetter.cmd_1547]
-RelativePath=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryModifierLetter\UnicodeCategoryModifierLetter.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryModifierLetter
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[UnicodeCategoryModifierSymbol.cmd_1548]
-RelativePath=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryModifierSymbol\UnicodeCategoryModifierSymbol.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryModifierSymbol
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[UnicodeCategoryNonSpacingMark.cmd_1549]
-RelativePath=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryNonSpacingMark\UnicodeCategoryNonSpacingMark.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryNonSpacingMark
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[UnicodeCategoryOpenPunctuation.cmd_1550]
-RelativePath=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryOpenPunctuation\UnicodeCategoryOpenPunctuation.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryOpenPunctuation
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[UnicodeCategoryOtherLetter.cmd_1551]
-RelativePath=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryOtherLetter\UnicodeCategoryOtherLetter.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryOtherLetter
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[UnicodeCategoryOtherNotAssigned.cmd_1552]
-RelativePath=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryOtherNotAssigned\UnicodeCategoryOtherNotAssigned.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryOtherNotAssigned
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[UnicodeCategoryOtherNumber.cmd_1553]
-RelativePath=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryOtherNumber\UnicodeCategoryOtherNumber.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryOtherNumber
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[UnicodeCategoryOtherPunctuation.cmd_1554]
-RelativePath=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryOtherPunctuation\UnicodeCategoryOtherPunctuation.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryOtherPunctuation
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[UnicodeCategoryOtherSymbol.cmd_1555]
-RelativePath=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryOtherSymbol\UnicodeCategoryOtherSymbol.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryOtherSymbol
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[UnicodeCategoryParagraphSeparator.cmd_1556]
-RelativePath=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryParagraphSeparator\UnicodeCategoryParagraphSeparator.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryParagraphSeparator
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[UnicodeCategoryPrivateUse.cmd_1557]
-RelativePath=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryPrivateUse\UnicodeCategoryPrivateUse.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryPrivateUse
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[UnicodeCategorySpaceSeparator.cmd_1558]
-RelativePath=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategorySpaceSeparator\UnicodeCategorySpaceSeparator.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategorySpaceSeparator
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[UnicodeCategorySpacingCombiningMark.cmd_1559]
-RelativePath=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategorySpacingCombiningMark\UnicodeCategorySpacingCombiningMark.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategorySpacingCombiningMark
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[UnicodeCategorySurrogate.cmd_1560]
-RelativePath=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategorySurrogate\UnicodeCategorySurrogate.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategorySurrogate
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[UnicodeCategoryTitlecaseLetter.cmd_1561]
-RelativePath=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryTitlecaseLetter\UnicodeCategoryTitlecaseLetter.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryTitlecaseLetter
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
-[UnicodeCategoryUppercaseLetter.cmd_1562]
-RelativePath=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryUppercaseLetter\UnicodeCategoryUppercaseLetter.cmd
-WorkingDir=CoreMangLib\cti\system\globalization\unicodecategory\UnicodeCategoryUppercaseLetter
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
 [GuidCompareTo1_cti.cmd_1563]
 RelativePath=CoreMangLib\cti\system\guid\GuidCompareTo1_cti\GuidCompareTo1_cti.cmd
 WorkingDir=CoreMangLib\cti\system\guid\GuidCompareTo1_cti
@@ -22684,14 +21292,6 @@ MaxAllowedDurationSeconds=600
 Categories=Pri1;RT;EXPECTED_PASS
 HostStyle=0
 
-[Co7510ParseExact_formatarray.cmd_2836]
-RelativePath=CoreMangLib\system\datetime\Co7510ParseExact_formatarray\Co7510ParseExact_formatarray.cmd
-WorkingDir=CoreMangLib\system\datetime\Co7510ParseExact_formatarray
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
 [NegativeGenerics.cmd_2837]
 RelativePath=CoreMangLib\system\delegate\generics\NegativeGenerics\NegativeGenerics.cmd
 WorkingDir=CoreMangLib\system\delegate\generics\NegativeGenerics
@@ -22764,14 +21364,6 @@ MaxAllowedDurationSeconds=600
 Categories=Pri1;RT;EXPECTED_PASS
 HostStyle=0
 
-[Shift_Jis.cmd_2846]
-RelativePath=CoreMangLib\system\text\encoding\Shift_Jis\Shift_Jis.cmd
-WorkingDir=CoreMangLib\system\text\encoding\Shift_Jis
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri1;RT;EXPECTED_PASS
-HostStyle=0
-
 [Version_Parsing.cmd_2847]
 RelativePath=CoreMangLib\system\version\Version_Parsing\Version_Parsing.cmd
 WorkingDir=CoreMangLib\system\version\Version_Parsing
@@ -59953,7 +58545,7 @@ RelativePath=JIT\Methodical\stringintern\_XModuletest4-xmod\_XModuletest4-xmod.c
 WorkingDir=JIT\Methodical\stringintern\_XModuletest4-xmod
 Expected=0
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_PASSPASSPASSPASS
+Categories=Pri0;EXPECTED_PASSPASSPASSPASS;EXPECTED_PASS
 HostStyle=0
 
 [structinregs.cmd_7583]
@@ -63500,14 +62092,6 @@ MaxAllowedDurationSeconds=600
 Categories=Pri0;EXPECTED_PASS
 HostStyle=0
 
-[DeltaBlue.cmd_8033]
-RelativePath=JIT\Performance\CodeQuality\V8\DeltaBlue\DeltaBlue\DeltaBlue.cmd
-WorkingDir=JIT\Performance\CodeQuality\V8\DeltaBlue\DeltaBlue
-Expected=0
-MaxAllowedDurationSeconds=1000
-Categories=GCSTRESS_FAIL;Pri0;LONG_RUNNING;ISSUE_6065;EXPECTED_PASS
-HostStyle=0
-
 [Richards.cmd_8034]
 RelativePath=JIT\Performance\CodeQuality\V8\Richards\Richards\Richards.cmd
 WorkingDir=JIT\Performance\CodeQuality\V8\Richards\Richards
@@ -70484,14 +69068,6 @@ MaxAllowedDurationSeconds=600
 Categories=Pri0;JIT;EXPECTED_PASS
 HostStyle=0
 
-[b475589.cmd_8932]
-RelativePath=JIT\Regression\CLR-x86-JIT\V2.0-RTM\b475589\b475589\b475589.cmd
-WorkingDir=JIT\Regression\CLR-x86-JIT\V2.0-RTM\b475589\b475589
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=Pri0;JIT;EXPECTED_FAIL;8156
-HostStyle=0
-
 [b487364.cmd_8933]
 RelativePath=JIT\Regression\CLR-x86-JIT\V2.0-RTM\b487364\b487364\b487364.cmd
 WorkingDir=JIT\Regression\CLR-x86-JIT\V2.0-RTM\b487364\b487364
@@ -73988,14 +72564,6 @@ MaxAllowedDurationSeconds=600
 Categories=EXPECTED_PASS
 HostStyle=0
 
-[VSW491668.cmd_9372]
-RelativePath=Loader\classloader\generics\GenericMethods\VSW491668\VSW491668.cmd
-WorkingDir=Loader\classloader\generics\GenericMethods\VSW491668
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=NEW;EXPECTED_FAIL;8156
-HostStyle=0
-
 [abstract01.cmd_9373]
 RelativePath=Loader\classloader\generics\Instantiation\Negative\abstract01\abstract01.cmd
 WorkingDir=Loader\classloader\generics\Instantiation\Negative\abstract01
@@ -79348,14 +77916,6 @@ MaxAllowedDurationSeconds=600
 Categories=EXPECTED_PASS;NEW
 HostStyle=0
 
-[ConstantArgsByte.cmd_10042]
-RelativePath=JIT\Performance\CodeQuality\Inlining\ConstantArgsByte\ConstantArgsByte.cmd
-WorkingDir=JIT\Performance\CodeQuality\Inlining\ConstantArgsByte
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=EXPECTED_PASS;NEW
-HostStyle=0
-
 [Generated1478.cmd_10043]
 RelativePath=Loader\classloader\TypeGeneratorTests\TypeGeneratorTest1478\Generated1478\Generated1478.cmd
 WorkingDir=Loader\classloader\TypeGeneratorTests\TypeGeneratorTest1478\Generated1478
@@ -80828,14 +79388,6 @@ MaxAllowedDurationSeconds=600
 Categories=EXPECTED_PASS;NEW
 HostStyle=0
 
-[ConstantArgsShort.cmd_10227]
-RelativePath=JIT\Performance\CodeQuality\Inlining\ConstantArgsShort\ConstantArgsShort.cmd
-WorkingDir=JIT\Performance\CodeQuality\Inlining\ConstantArgsShort
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=EXPECTED_PASS;NEW
-HostStyle=0
-
 [Generated908.cmd_10228]
 RelativePath=Loader\classloader\TypeGeneratorTests\TypeGeneratorTest908\Generated908\Generated908.cmd
 WorkingDir=Loader\classloader\TypeGeneratorTests\TypeGeneratorTest908\Generated908
@@ -81908,14 +80460,6 @@ MaxAllowedDurationSeconds=600
 Categories=EXPECTED_PASS;NEW
 HostStyle=0
 
-[ConstantArgsInt.cmd_10362]
-RelativePath=JIT\Performance\CodeQuality\Inlining\ConstantArgsInt\ConstantArgsInt.cmd
-WorkingDir=JIT\Performance\CodeQuality\Inlining\ConstantArgsInt
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=EXPECTED_PASS;NEW
-HostStyle=0
-
 [Generated1297.cmd_10363]
 RelativePath=Loader\classloader\TypeGeneratorTests\TypeGeneratorTest1297\Generated1297\Generated1297.cmd
 WorkingDir=Loader\classloader\TypeGeneratorTests\TypeGeneratorTest1297\Generated1297
@@ -83076,14 +81620,6 @@ MaxAllowedDurationSeconds=600
 Categories=EXPECTED_PASS;NEW
 HostStyle=0
 
-[ConstantArgsLong.cmd_10508]
-RelativePath=JIT\Performance\CodeQuality\Inlining\ConstantArgsLong\ConstantArgsLong.cmd
-WorkingDir=JIT\Performance\CodeQuality\Inlining\ConstantArgsLong
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=EXPECTED_PASS;NEW
-HostStyle=0
-
 [Generated1013.cmd_10509]
 RelativePath=Loader\classloader\TypeGeneratorTests\TypeGeneratorTest1013\Generated1013\Generated1013.cmd
 WorkingDir=Loader\classloader\TypeGeneratorTests\TypeGeneratorTest1013\Generated1013
@@ -83468,14 +82004,6 @@ MaxAllowedDurationSeconds=600
 Categories=EXPECTED_PASS;NEW
 HostStyle=0
 
-[ConstantArgsULong.cmd_10557]
-RelativePath=JIT\Performance\CodeQuality\Inlining\ConstantArgsULong\ConstantArgsULong.cmd
-WorkingDir=JIT\Performance\CodeQuality\Inlining\ConstantArgsULong
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=EXPECTED_PASS;NEW
-HostStyle=0
-
 [Generated331.cmd_10558]
 RelativePath=Loader\classloader\TypeGeneratorTests\TypeGeneratorTest331\Generated331\Generated331.cmd
 WorkingDir=Loader\classloader\TypeGeneratorTests\TypeGeneratorTest331\Generated331
@@ -84660,14 +83188,6 @@ MaxAllowedDurationSeconds=600
 Categories=EXPECTED_PASS;NEW
 HostStyle=0
 
-[ConstantArgsSByte.cmd_10706]
-RelativePath=JIT\Performance\CodeQuality\Inlining\ConstantArgsSByte\ConstantArgsSByte.cmd
-WorkingDir=JIT\Performance\CodeQuality\Inlining\ConstantArgsSByte
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=EXPECTED_PASS;NEW
-HostStyle=0
-
 [Generated806.cmd_10707]
 RelativePath=Loader\classloader\TypeGeneratorTests\TypeGeneratorTest806\Generated806\Generated806.cmd
 WorkingDir=Loader\classloader\TypeGeneratorTests\TypeGeneratorTest806\Generated806
@@ -85668,14 +84188,6 @@ MaxAllowedDurationSeconds=600
 Categories=EXPECTED_PASS;NEW
 HostStyle=0
 
-[ConstantArgsFloat.cmd_10832]
-RelativePath=JIT\Performance\CodeQuality\Inlining\ConstantArgsFloat\ConstantArgsFloat.cmd
-WorkingDir=JIT\Performance\CodeQuality\Inlining\ConstantArgsFloat
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=EXPECTED_PASS;NEW
-HostStyle=0
-
 [Generated716.cmd_10833]
 RelativePath=Loader\classloader\TypeGeneratorTests\TypeGeneratorTest716\Generated716\Generated716.cmd
 WorkingDir=Loader\classloader\TypeGeneratorTests\TypeGeneratorTest716\Generated716
@@ -86196,14 +84708,6 @@ MaxAllowedDurationSeconds=600
 Categories=EXPECTED_PASS;NEW
 HostStyle=0
 
-[ConstantArgsString.cmd_10898]
-RelativePath=JIT\Performance\CodeQuality\Inlining\ConstantArgsString\ConstantArgsString.cmd
-WorkingDir=JIT\Performance\CodeQuality\Inlining\ConstantArgsString
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=EXPECTED_PASS;NEW
-HostStyle=0
-
 [mcc_i02.cmd_10899]
 RelativePath=JIT\jit64\mcc\interop\mcc_i02\mcc_i02.cmd
 WorkingDir=JIT\jit64\mcc\interop\mcc_i02
@@ -86652,14 +85156,6 @@ MaxAllowedDurationSeconds=600
 Categories=EXPECTED_FAIL;4851;NEW
 HostStyle=0
 
-[ConstantArgsUInt.cmd_10955]
-RelativePath=JIT\Performance\CodeQuality\Inlining\ConstantArgsUInt\ConstantArgsUInt.cmd
-WorkingDir=JIT\Performance\CodeQuality\Inlining\ConstantArgsUInt
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=EXPECTED_PASS;NEW
-HostStyle=0
-
 [Generated1228.cmd_10956]
 RelativePath=Loader\classloader\TypeGeneratorTests\TypeGeneratorTest1228\Generated1228\Generated1228.cmd
 WorkingDir=Loader\classloader\TypeGeneratorTests\TypeGeneratorTest1228\Generated1228
@@ -86876,14 +85372,6 @@ MaxAllowedDurationSeconds=600
 Categories=EXPECTED_PASS;NEW
 HostStyle=0
 
-[ConstantArgsUShort.cmd_10983]
-RelativePath=JIT\Performance\CodeQuality\Inlining\ConstantArgsUShort\ConstantArgsUShort.cmd
-WorkingDir=JIT\Performance\CodeQuality\Inlining\ConstantArgsUShort
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=EXPECTED_PASS;NEW
-HostStyle=0
-
 [Generated1165.cmd_10984]
 RelativePath=Loader\classloader\TypeGeneratorTests\TypeGeneratorTest1165\Generated1165\Generated1165.cmd
 WorkingDir=Loader\classloader\TypeGeneratorTests\TypeGeneratorTest1165\Generated1165
@@ -87932,14 +86420,6 @@ MaxAllowedDurationSeconds=600
 Categories=EXPECTED_PASS;NEW
 HostStyle=0
 
-[ConstantArgsChar.cmd_11115]
-RelativePath=JIT\Performance\CodeQuality\Inlining\ConstantArgsChar\ConstantArgsChar.cmd
-WorkingDir=JIT\Performance\CodeQuality\Inlining\ConstantArgsChar
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=EXPECTED_PASS;NEW
-HostStyle=0
-
 [Generated553.cmd_11116]
 RelativePath=Loader\classloader\TypeGeneratorTests\TypeGeneratorTest553\Generated553\Generated553.cmd
 WorkingDir=Loader\classloader\TypeGeneratorTests\TypeGeneratorTest553\Generated553
@@ -90921,7 +89401,7 @@ RelativePath=JIT\Performance\CodeQuality\Span\SpanBench\SpanBench.cmd
 WorkingDir=JIT\Performance\CodeQuality\Span\SpanBench
 Expected=0
 MaxAllowedDurationSeconds=600
-Categories=EXPECTED_PASS;NEW
+Categories=EXPECTED_FAIL;10544;NEW
 HostStyle=0
 
 [Generated1202.cmd_11489]
@@ -91260,14 +89740,6 @@ MaxAllowedDurationSeconds=600
 Categories=EXPECTED_PASS;NEW
 HostStyle=0
 
-[ConstantArgsDouble.cmd_11531]
-RelativePath=JIT\Performance\CodeQuality\Inlining\ConstantArgsDouble\ConstantArgsDouble.cmd
-WorkingDir=JIT\Performance\CodeQuality\Inlining\ConstantArgsDouble
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=EXPECTED_PASS;NEW
-HostStyle=0
-
 [Generated539.cmd_11532]
 RelativePath=Loader\classloader\TypeGeneratorTests\TypeGeneratorTest539\Generated539\Generated539.cmd
 WorkingDir=Loader\classloader\TypeGeneratorTests\TypeGeneratorTest539\Generated539
@@ -91532,3 +90004,531 @@ MaxAllowedDurationSeconds=600
 Categories=EXPECTED_PASS;NEW
 HostStyle=0
 
+[MathFCos.cmd_11565]
+RelativePath=CoreMangLib\cti\system\mathf\MathFCos\MathFCos.cmd
+WorkingDir=CoreMangLib\cti\system\mathf\MathFCos
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[sealeddefault.cmd_11566]
+RelativePath=JIT\opt\Devirtualization\sealeddefault\sealeddefault.cmd
+WorkingDir=JIT\opt\Devirtualization\sealeddefault
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[StringReplace3.cmd_11567]
+RelativePath=CoreMangLib\cti\system\string\StringReplace3\StringReplace3.cmd
+WorkingDir=CoreMangLib\cti\system\string\StringReplace3
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[MathFRound1.cmd_11568]
+RelativePath=CoreMangLib\cti\system\mathf\MathFRound1\MathFRound1.cmd
+WorkingDir=CoreMangLib\cti\system\mathf\MathFRound1
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[ArrayJagged.cmd_11569]
+RelativePath=JIT\CodeGenBringUpTests\ArrayJagged\ArrayJagged.cmd
+WorkingDir=JIT\CodeGenBringUpTests\ArrayJagged
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[MathFFloor.cmd_11570]
+RelativePath=CoreMangLib\cti\system\mathf\MathFFloor\MathFFloor.cmd
+WorkingDir=CoreMangLib\cti\system\mathf\MathFFloor
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[comparable.cmd_11571]
+RelativePath=JIT\opt\Devirtualization\comparable\comparable.cmd
+WorkingDir=JIT\opt\Devirtualization\comparable
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[sealedmethod.cmd_11572]
+RelativePath=JIT\opt\Devirtualization\sealedmethod\sealedmethod.cmd
+WorkingDir=JIT\opt\Devirtualization\sealedmethod
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[generic.cmd_11573]
+RelativePath=JIT\opt\Devirtualization\generic\generic.cmd
+WorkingDir=JIT\opt\Devirtualization\generic
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[ForeignThreadExceptions.cmd_11574]
+RelativePath=Exceptions\ForeignThread\ForeignThreadExceptions\ForeignThreadExceptions.cmd
+WorkingDir=Exceptions\ForeignThread\ForeignThreadExceptions
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_FAIL;10636;NEW
+HostStyle=0
+
+[MathFExp.cmd_11575]
+RelativePath=CoreMangLib\cti\system\mathf\MathFExp\MathFExp.cmd
+WorkingDir=CoreMangLib\cti\system\mathf\MathFExp
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[MathFMax.cmd_11576]
+RelativePath=CoreMangLib\cti\system\mathf\MathFMax\MathFMax.cmd
+WorkingDir=CoreMangLib\cti\system\mathf\MathFMax
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[MathFAtan2.cmd_11577]
+RelativePath=CoreMangLib\cti\system\mathf\MathFAtan2\MathFAtan2.cmd
+WorkingDir=CoreMangLib\cti\system\mathf\MathFAtan2
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[MathFAtan.cmd_11578]
+RelativePath=CoreMangLib\cti\system\mathf\MathFAtan\MathFAtan.cmd
+WorkingDir=CoreMangLib\cti\system\mathf\MathFAtan
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[MathFRound2.cmd_11579]
+RelativePath=CoreMangLib\cti\system\mathf\MathFRound2\MathFRound2.cmd
+WorkingDir=CoreMangLib\cti\system\mathf\MathFRound2
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[fromcollection.cmd_11580]
+RelativePath=JIT\opt\Devirtualization\fromcollection\fromcollection.cmd
+WorkingDir=JIT\opt\Devirtualization\fromcollection
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[GitHub_9651.cmd_11581]
+RelativePath=JIT\Regression\JitBlue\GitHub_9651\GitHub_9651\GitHub_9651.cmd
+WorkingDir=JIT\Regression\JitBlue\GitHub_9651\GitHub_9651
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[overload.cmd_11582]
+RelativePath=JIT\opt\Devirtualization\overload\overload.cmd
+WorkingDir=JIT\opt\Devirtualization\overload
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[MathFIEEERemainder.cmd_11583]
+RelativePath=CoreMangLib\cti\system\mathf\MathFIEEERemainder\MathFIEEERemainder.cmd
+WorkingDir=CoreMangLib\cti\system\mathf\MathFIEEERemainder
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[MathFCosh.cmd_11584]
+RelativePath=CoreMangLib\cti\system\mathf\MathFCosh\MathFCosh.cmd
+WorkingDir=CoreMangLib\cti\system\mathf\MathFCosh
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[ArrayExc.cmd_11585]
+RelativePath=JIT\CodeGenBringUpTests\ArrayExc\ArrayExc.cmd
+WorkingDir=JIT\CodeGenBringUpTests\ArrayExc
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[MathFSqrt.cmd_11586]
+RelativePath=CoreMangLib\cti\system\mathf\MathFSqrt\MathFSqrt.cmd
+WorkingDir=CoreMangLib\cti\system\mathf\MathFSqrt
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[Vector3GetHash_r.cmd_11587]
+RelativePath=JIT\SIMD\Vector3GetHash_r\Vector3GetHash_r.cmd
+WorkingDir=JIT\SIMD\Vector3GetHash_r
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[CoreFX_15913.cmd_11588]
+RelativePath=JIT\Regression\JitBlue\CoreFX_15913\CoreFX_15913\CoreFX_15913.cmd
+WorkingDir=JIT\Regression\JitBlue\CoreFX_15913\CoreFX_15913
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[MathFMin.cmd_11589]
+RelativePath=CoreMangLib\cti\system\mathf\MathFMin\MathFMin.cmd
+WorkingDir=CoreMangLib\cti\system\mathf\MathFMin
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[sealedclass.cmd_11590]
+RelativePath=JIT\opt\Devirtualization\sealedclass\sealedclass.cmd
+WorkingDir=JIT\opt\Devirtualization\sealedclass
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[Array4.cmd_11591]
+RelativePath=JIT\CodeGenBringUpTests\Array4\Array4.cmd
+WorkingDir=JIT\CodeGenBringUpTests\Array4
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[override.cmd_11592]
+RelativePath=JIT\opt\Devirtualization\override\override.cmd
+WorkingDir=JIT\opt\Devirtualization\override
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[enum.cmd_11593]
+RelativePath=JIT\opt\Devirtualization\enum\enum.cmd
+WorkingDir=JIT\opt\Devirtualization\enum
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[Array3.cmd_11594]
+RelativePath=JIT\CodeGenBringUpTests\Array3\Array3.cmd
+WorkingDir=JIT\CodeGenBringUpTests\Array3
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[MathFSin.cmd_11595]
+RelativePath=CoreMangLib\cti\system\mathf\MathFSin\MathFSin.cmd
+WorkingDir=CoreMangLib\cti\system\mathf\MathFSin
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[CheckProjects.cmd_11596]
+RelativePath=JIT\CheckProjects\CheckProjects\CheckProjects.cmd
+WorkingDir=JIT\CheckProjects\CheckProjects
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_FAIL;10635;NEW
+HostStyle=0
+
+[ArrayMD1.cmd_11597]
+RelativePath=JIT\CodeGenBringUpTests\ArrayMD1\ArrayMD1.cmd
+WorkingDir=JIT\CodeGenBringUpTests\ArrayMD1
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[MathFLog10.cmd_11598]
+RelativePath=CoreMangLib\cti\system\mathf\MathFLog10\MathFLog10.cmd
+WorkingDir=CoreMangLib\cti\system\mathf\MathFLog10
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[MathFSign.cmd_11599]
+RelativePath=CoreMangLib\cti\system\mathf\MathFSign\MathFSign.cmd
+WorkingDir=CoreMangLib\cti\system\mathf\MathFSign
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[MathFE.cmd_11600]
+RelativePath=CoreMangLib\cti\system\mathf\MathFE\MathFE.cmd
+WorkingDir=CoreMangLib\cti\system\mathf\MathFE
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[MathFCeiling.cmd_11601]
+RelativePath=CoreMangLib\cti\system\mathf\MathFCeiling\MathFCeiling.cmd
+WorkingDir=CoreMangLib\cti\system\mathf\MathFCeiling
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[GitHub_10311.cmd_11602]
+RelativePath=JIT\opt\Devirtualization\GitHub_10311\GitHub_10311.cmd
+WorkingDir=JIT\opt\Devirtualization\GitHub_10311
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[late.cmd_11603]
+RelativePath=JIT\opt\Devirtualization\late\late.cmd
+WorkingDir=JIT\opt\Devirtualization\late
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[inlinedevirt.cmd_11604]
+RelativePath=JIT\opt\Devirtualization\inlinedevirt\inlinedevirt.cmd
+WorkingDir=JIT\opt\Devirtualization\inlinedevirt
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[MathFSinh.cmd_11605]
+RelativePath=CoreMangLib\cti\system\mathf\MathFSinh\MathFSinh.cmd
+WorkingDir=CoreMangLib\cti\system\mathf\MathFSinh
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[MathFPI.cmd_11606]
+RelativePath=CoreMangLib\cti\system\mathf\MathFPI\MathFPI.cmd
+WorkingDir=CoreMangLib\cti\system\mathf\MathFPI
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[MathFAbs.cmd_11607]
+RelativePath=CoreMangLib\cti\system\mathf\MathFAbs\MathFAbs.cmd
+WorkingDir=CoreMangLib\cti\system\mathf\MathFAbs
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[sharedoverride.cmd_11608]
+RelativePath=JIT\opt\Devirtualization\sharedoverride\sharedoverride.cmd
+WorkingDir=JIT\opt\Devirtualization\sharedoverride
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[MathFTan.cmd_11609]
+RelativePath=CoreMangLib\cti\system\mathf\MathFTan\MathFTan.cmd
+WorkingDir=CoreMangLib\cti\system\mathf\MathFTan
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[Vector3GetHash_ro.cmd_11610]
+RelativePath=JIT\SIMD\Vector3GetHash_ro\Vector3GetHash_ro.cmd
+WorkingDir=JIT\SIMD\Vector3GetHash_ro
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[exacttype.cmd_11611]
+RelativePath=JIT\opt\Devirtualization\exacttype\exacttype.cmd
+WorkingDir=JIT\opt\Devirtualization\exacttype
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[simple.cmd_11612]
+RelativePath=JIT\opt\Devirtualization\simple\simple.cmd
+WorkingDir=JIT\opt\Devirtualization\simple
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[Array2.cmd_11613]
+RelativePath=JIT\CodeGenBringUpTests\Array2\Array2.cmd
+WorkingDir=JIT\CodeGenBringUpTests\Array2
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[GitHub_9945.cmd_11614]
+RelativePath=JIT\opt\Devirtualization\GitHub_9945\GitHub_9945.cmd
+WorkingDir=JIT\opt\Devirtualization\GitHub_9945
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[DeadThreads.cmd_11615]
+RelativePath=baseservices\threading\DeadThreads\DeadThreads\DeadThreads.cmd
+WorkingDir=baseservices\threading\DeadThreads\DeadThreads
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[ldtokenmember.cmd_11616]
+RelativePath=reflection\ldtoken\ldtokenmember\ldtokenmember.cmd
+WorkingDir=reflection\ldtoken\ldtokenmember
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[MathFLog.cmd_11617]
+RelativePath=CoreMangLib\cti\system\mathf\MathFLog\MathFLog.cmd
+WorkingDir=CoreMangLib\cti\system\mathf\MathFLog
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[Array1.cmd_11618]
+RelativePath=JIT\CodeGenBringUpTests\Array1\Array1.cmd
+WorkingDir=JIT\CodeGenBringUpTests\Array1
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[MathFAcos.cmd_11619]
+RelativePath=CoreMangLib\cti\system\mathf\MathFAcos\MathFAcos.cmd
+WorkingDir=CoreMangLib\cti\system\mathf\MathFAcos
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[MathFPow.cmd_11620]
+RelativePath=CoreMangLib\cti\system\mathf\MathFPow\MathFPow.cmd
+WorkingDir=CoreMangLib\cti\system\mathf\MathFPow
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[covariance.cmd_11621]
+RelativePath=JIT\opt\Devirtualization\covariance\covariance.cmd
+WorkingDir=JIT\opt\Devirtualization\covariance
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[ArrBoundUnsigned.cmd_11622]
+RelativePath=JIT\opt\AssertionPropagation\ArrBoundUnsigned\ArrBoundUnsigned.cmd
+WorkingDir=JIT\opt\AssertionPropagation\ArrBoundUnsigned
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[GitHub_9891.cmd_11623]
+RelativePath=JIT\Regression\JitBlue\GitHub_9891\GitHub_9891\GitHub_9891.cmd
+WorkingDir=JIT\Regression\JitBlue\GitHub_9891\GitHub_9891
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[DynMethodJumpStubTests.cmd_11624]
+RelativePath=CoreMangLib\cti\system\reflection\emit\DynMethodJumpStubTests\DynMethodJumpStubTests\DynMethodJumpStubTests.cmd
+WorkingDir=CoreMangLib\cti\system\reflection\emit\DynMethodJumpStubTests\DynMethodJumpStubTests
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[MathFTanh.cmd_11625]
+RelativePath=CoreMangLib\cti\system\mathf\MathFTanh\MathFTanh.cmd
+WorkingDir=CoreMangLib\cti\system\mathf\MathFTanh
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[ArrayMD2.cmd_11626]
+RelativePath=JIT\CodeGenBringUpTests\ArrayMD2\ArrayMD2.cmd
+WorkingDir=JIT\CodeGenBringUpTests\ArrayMD2
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[contravariance.cmd_11627]
+RelativePath=JIT\opt\Devirtualization\contravariance\contravariance.cmd
+WorkingDir=JIT\opt\Devirtualization\contravariance
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[k-nucleotide.cmd_11628]
+RelativePath=JIT\Performance\CodeQuality\BenchmarksGame\k-nucleotide\k-nucleotide\k-nucleotide.cmd
+WorkingDir=JIT\Performance\CodeQuality\BenchmarksGame\k-nucleotide\k-nucleotide
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[ArrayObj.cmd_11629]
+RelativePath=JIT\CodeGenBringUpTests\ArrayObj\ArrayObj.cmd
+WorkingDir=JIT\CodeGenBringUpTests\ArrayObj
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
+[GitHub_9945_2.cmd_11630]
+RelativePath=JIT\opt\Devirtualization\GitHub_9945_2\GitHub_9945_2.cmd
+WorkingDir=JIT\opt\Devirtualization\GitHub_9945_2
+Expected=0
+MaxAllowedDurationSeconds=600
+Categories=EXPECTED_PASS;NEW
+HostStyle=0
+
index e542278..4ed8032 100644 (file)
@@ -34,7 +34,7 @@ from collections import defaultdict
 
 g_arm64ci_path = os.path.join(os.environ["USERPROFILE"], "bin")
 g_dotnet_url = "https://go.microsoft.com/fwlink/?LinkID=831469"
-g_test_url = "https://clrjit.blob.core.windows.net/arm64ci/CoreCLRTests-28d04376fe54aea392d75d478bd468f14d134e67.zip"
+g_test_url = "https://clrjit.blob.core.windows.net/arm64ci/CoreCLR-Pri1Testing.zip"
 g_x64_client_url = "https://clrjit.blob.core.windows.net/arm64ci/x64_client.zip"
 
 ################################################################################
index 07cf288..deebd2f 100755 (executable)
@@ -34,6 +34,7 @@ PARSER.add_argument("-lst_file", dest="old_list_file", nargs='?', default=None)
 PARSER.add_argument("-test_dir", dest="test_dir", nargs='?', default=None)
 PARSER.add_argument("-commit_hash", dest="commit_hash", nargs='?', default=None)
 PARSER.add_argument("-failures_csv", dest="failures_csv", nargs='?', default=None)
+PARSER.add_argument("--unset_new", dest="unset_new", action="store_true", default=False)
 ARGS = PARSER.parse_args(sys.argv[1:])
 
 ################################################################################
@@ -61,12 +62,12 @@ def create_list_file(file_name, metadata):
     old_metadata = [item for item in metadata if item[1] != -1]
 
     with open(file_name, "w") as file_handle:
-        file_handle.write("## This list file has been produced automatically. Any changes\n")
-        file_handle.write("## are subject to being overwritten when reproducing this file.\n")
-        file_handle.write("## \n")
-        file_handle.write("## Last Updated: %s\n" % current_time_str)
-        file_handle.write("## Commit: %s\n" % ARGS.commit_hash)
-        file_handle.write("## \n")
+        file_handle.write("## This list file has been produced automatically. Any changes" + os.pathsep)
+        file_handle.write("## are subject to being overwritten when reproducing this file." + os.pathsep))
+        file_handle.write("## " + os.pathsep))
+        file_handle.write("## Last Updated: %s%s" % (current_time_str, os.pathsep))
+        file_handle.write("## Commit: %s%s" % (ARGS.commit_hash, os.pathsep))
+        file_handle.write("## " + os.pathsep))
 
         order = ["RelativePath", "WorkingDir", "Expected", 
                 "MaxAllowedDurationSeconds", "Categories", "HostStyle"]
@@ -87,9 +88,9 @@ def create_list_file(file_name, metadata):
 
                 attribute_str = ""
                 for key in order:
-                    attribute_str += "%s=%s\n" % (key, item[key])
+                    attribute_str += "%s=%s%s" % (key, item[key], os.pathsep))
 
-                file_handle.write(attribute_str + "\n")
+                file_handle.write(attribute_str + os.pathsep))
 
         write_metadata(old_metadata)
         write_metadata(new_metadata, old_metadata[-1][1] + 1)
@@ -273,6 +274,7 @@ def main(args):
     test_dir = args.test_dir
     old_list_file = args.old_list_file
     commit_hash = args.commit_hash
+    unset_new = args.unset_new
 
     if commit_hash is None:
         print "Error please provide a commit hash."
@@ -332,8 +334,9 @@ def main(args):
                         new_split = new_metadata["Categories"].split(";")
                         old_split = old_metadata["Categories"].split(";")
 
-                        if "NEW" in old_split:
-                            old_split.remove("NEW")
+                        if unset_new:
+                            if "NEW" in old_split:
+                                old_split.remove("NEW")
 
                         # If an old test is marked as a failing test. Make
                         # sure that we carry that information along.
@@ -348,7 +351,14 @@ def main(args):
                         joined_categories = set(old_split + new_split)
 
                         overwritten = True
-                        old_metadata[attribute] = ";".join(joined_categories)
+                        ordered_categories = []
+                        for item in old_split:
+                            if item in joined_categories:
+                                ordered_categories.append(item)
+                                joined_categories.remove(item)
+
+                        old_metadata[attribute] = ";".join(ordered_categories)
+                        old_metadata[attribute] = old_metadata[attribute] + ";" + ";".join(joined_categories) if len(joined_categories) > 0 else old_metadata[attribute]
                         old_test_metadata[test_name] = (old_metadata, index)
 
                     elif new_metadata[attribute] != old_metadata[attribute]:
@@ -364,7 +374,19 @@ def main(args):
                     if overwritten:
                         update_count += 1
 
+        tests_removed = 0
+        tests_to_remove = []
+        for old_test_name in old_test_metadata:
+            # Remove all old unreferenced tests
+            if old_test_name not in test_metadata:
+                tests_to_remove.append(old_test_name)
+                tests_removed += 1
+
+        for test_name in tests_to_remove:
+            old_test_metadata.pop(test_name)
+
         print "Added %d tests." % new_test_count
+        print "Removed %d tests." % tests_removed
         print "Finished join. %d tests updated." % update_count
 
         test_metadata = old_test_metadata
diff --git a/tests/src/JIT/Methodical/Boxing/morph/sin3double.il b/tests/src/JIT/Methodical/Boxing/morph/sin3double.il
new file mode 100644 (file)
index 0000000..65cc41d
--- /dev/null
@@ -0,0 +1,436 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+.assembly extern mscorlib
+{
+}
+
+.assembly extern System.Console as console
+{
+}
+
+.assembly sin3double
+{
+}
+
+.class private sequential ansi sealed beforefieldinit VV extends [mscorlib]System.ValueType
+{
+  .pack 0
+  .size 40
+}
+
+.class public auto ansi beforefieldinit Z extends [mscorlib] System.Object
+{
+
+.method static float64 mySin(float64 Angle) cil managed
+{
+  .locals (int32 V_0,
+           float64 V_1,
+           float64 V_2,
+           float64 V_3,
+           float64 V_4,
+           object V_5,
+           object V_6,
+           object V_7,
+           object V_8,
+           object V_9,
+           object V_10,
+           object V_11,
+           object V_12,
+           object V_13,
+           object V_14,
+           float64 V_15,
+           float64 V_16)
+  IL_0000:  ldnull
+  IL_0001:  stloc.s    V_14
+  IL_0003:  ldnull
+  IL_0004:  stloc.s    V_13
+  IL_0006:  ldnull
+  IL_0007:  stloc.s    V_12
+  IL_0009:  ldnull
+  IL_000a:  stloc.s    V_11
+  IL_000c:  ldnull
+  IL_000d:  stloc.s    V_10
+  IL_000f:  ldc.r8     0.0
+  IL_0018:  box        [mscorlib]System.Double
+  IL_001d:  stloc.s    V_14
+  IL_001f:  ldc.r8     0.0
+  IL_0028:  box        [mscorlib]System.Double
+  IL_002d:  stloc.s    V_13
+  IL_002f:  ldc.r8     0.0
+  IL_0038:  box        [mscorlib]System.Double
+  IL_003d:  stloc.s    V_12
+  IL_003f:  ldc.r8     0.0
+  IL_0048:  box        [mscorlib]System.Double
+  IL_004d:  stloc.s    V_11
+  IL_004f:  ldc.r8     1.
+  IL_0058:  box        [mscorlib]System.Double
+  IL_005d:  stloc.s    V_10
+  IL_005f:  ldloc.s    V_14
+  IL_0061:  stloc.s    V_9
+  IL_0063:  ldloc.s    V_9
+  IL_0065:  isinst     [mscorlib]System.Double
+  IL_006a:  brfalse.s  IL_0075
+
+  IL_006c:  ldloc.s    V_9
+  IL_006e:  unbox      [mscorlib]System.Double
+  IL_0073:  br.s       IL_0077
+
+  IL_0075:  ldc.i4.0
+  IL_0076:  conv.i
+  IL_0077:  ldind.r8
+  IL_0078:  stloc.s    V_4
+  IL_007a:  ldloc.s    V_13
+  IL_007c:  stloc.s    V_8
+  IL_007e:  ldloc.s    V_8
+  IL_0080:  isinst     [mscorlib]System.Double
+  IL_0085:  brfalse.s  IL_0090
+
+  IL_0087:  ldloc.s    V_8
+  IL_0089:  unbox      [mscorlib]System.Double
+  IL_008e:  br.s       IL_0092
+
+  IL_0090:  ldc.i4.0
+  IL_0091:  conv.i
+  IL_0092:  ldind.r8
+  IL_0093:  stloc.3
+  IL_0094:  ldloc.s    V_12
+  IL_0096:  stloc.s    V_7
+  IL_0098:  ldloc.s    V_7
+  IL_009a:  isinst     [mscorlib]System.Double
+  IL_009f:  brfalse.s  IL_00aa
+
+  IL_00a1:  ldloc.s    V_7
+  IL_00a3:  unbox      [mscorlib]System.Double
+  IL_00a8:  br.s       IL_00ac
+
+  IL_00aa:  ldc.i4.0
+  IL_00ab:  conv.i
+  IL_00ac:  ldind.r8
+  IL_00ad:  stloc.2
+  IL_00ae:  ldloc.s    V_11
+  IL_00b0:  stloc.s    V_6
+  IL_00b2:  ldloc.s    V_6
+  IL_00b4:  isinst     [mscorlib]System.Double
+  IL_00b9:  brfalse.s  IL_00c4
+
+  IL_00bb:  ldloc.s    V_6
+  IL_00bd:  unbox      [mscorlib]System.Double
+  IL_00c2:  br.s       IL_00c6
+
+  IL_00c4:  ldc.i4.0
+  IL_00c5:  conv.i
+  IL_00c6:  ldind.r8
+  IL_00c7:  stloc.s    V_16
+  IL_00c9:  ldloc.s    V_10
+  IL_00cb:  stloc.s    V_5
+  IL_00cd:  ldloc.s    V_5
+  IL_00cf:  isinst     [mscorlib]System.Double
+  IL_00d4:  brfalse.s  IL_00df
+
+  IL_00d6:  ldloc.s    V_5
+  IL_00d8:  unbox      [mscorlib]System.Double
+  IL_00dd:  br.s       IL_00e1
+
+  IL_00df:  ldc.i4.0
+  IL_00e0:  conv.i
+  IL_00e1:  ldind.r8
+  IL_00e2:  stloc.1
+  IL_00e3:  ldarg.0
+  IL_00e4:  stloc.2
+  IL_00e5:  ldloc.2
+  IL_00e6:  stloc.s    V_4
+  IL_00e8:  ldc.r8     0.0
+  IL_00f1:  stloc.3
+  IL_00f2:  ldc.i4.1
+  IL_00f3:  stloc.0
+  IL_00f4:  br.s       IL_00fa
+
+  IL_00f6:  ldloc.0
+  IL_00f7:  ldc.i4.2
+  IL_00f8:  add
+  IL_00f9:  stloc.0
+  IL_00fa:  ldloc.0
+  IL_00fb:  ldc.i4     0xc8
+  IL_0100:  bgt.s      IL_012b
+
+  IL_0102:  ldloc.3
+  IL_0103:  ldloc.2
+  IL_0104:  add
+  IL_0105:  stloc.3
+  IL_0106:  ldloc.s    V_4
+  IL_0108:  ldarg.0
+  IL_0109:  neg
+  IL_010a:  ldarg.0
+  IL_010b:  mul
+  IL_010c:  mul
+  IL_010d:  stloc.s    V_4
+  IL_010f:  ldloc.1
+  IL_0110:  ldloc.0
+  IL_0111:  ldc.i4.1
+  IL_0112:  add
+  IL_0113:  ldloc.0
+  IL_0114:  ldc.i4.2
+  IL_0115:  add
+  IL_0116:  mul
+  IL_0117:  conv.r8
+  IL_0118:  mul
+  IL_0119:  stloc.1
+  IL_011a:  ldloc.1
+  IL_011b:  call       bool [mscorlib]System.Double::IsInfinity(float64)
+  IL_0120:  brfalse.s  IL_0124
+
+  IL_0122:  br.s       IL_012b
+
+  IL_0124:  ldloc.s    V_4
+  IL_0126:  ldloc.1
+  IL_0127:  div
+  IL_0128:  stloc.2
+  IL_0129:  br.s       IL_00f6
+
+  IL_012b:  ldloc.3
+  IL_012c:  stloc.s    V_15
+  IL_012e:  ldloc.s    V_15
+  IL_0130:  ret
+}
+
+.method static int32 Main() cil managed
+{
+  .entrypoint
+  .locals (int32 V_0,
+           float64 V_1,
+           float64 V_2,
+           float64 V_3,
+           int32 V_4,
+           object V_5,
+           object V_6,
+           object V_7,
+           object V_8,
+           object V_9,
+           object V_10,
+           valuetype VV V_11)
+  IL_0000:  ldc.i4.0
+  IL_0001:  stloc.s    V_4
+  IL_0003:  ldnull
+  IL_0004:  stloc.s    V_10
+  IL_0006:  ldnull
+  IL_0007:  stloc.s    V_9
+  IL_0009:  ldnull
+  IL_000a:  stloc.s    V_8
+  IL_000c:  ldc.r8     0.0
+  IL_0015:  box        [mscorlib]System.Double
+  IL_001a:  stloc.s    V_10
+  IL_001c:  ldc.r8     0.0
+  IL_0025:  box        [mscorlib]System.Double
+  IL_002a:  stloc.s    V_9
+  IL_002c:  ldc.r8     0.0
+  IL_0035:  box        [mscorlib]System.Double
+  IL_003a:  stloc.s    V_8
+  IL_003c:  ldloc.s    V_10
+  IL_003e:  stloc.s    V_7
+  IL_0040:  ldloc.s    V_7
+  IL_0042:  isinst     [mscorlib]System.Double
+  IL_0047:  brfalse.s  IL_0052
+
+  IL_0049:  ldloc.s    V_7
+  IL_004b:  unbox      [mscorlib]System.Double
+  IL_0050:  br.s       IL_0054
+
+  IL_0052:  ldc.i4.0
+  IL_0053:  conv.i
+  IL_0054:  ldind.r8
+  IL_0055:  stloc.3
+  IL_0056:  ldloc.s    V_9
+  IL_0058:  stloc.s    V_6
+  IL_005a:  ldloc.s    V_6
+  IL_005c:  isinst     [mscorlib]System.Double
+  IL_0061:  brfalse.s  IL_006c
+
+  IL_0063:  ldloc.s    V_6
+  IL_0065:  unbox      [mscorlib]System.Double
+  IL_006a:  br.s       IL_006e
+
+  IL_006c:  ldc.i4.0
+  IL_006d:  conv.i
+  IL_006e:  ldind.r8
+  IL_006f:  stloc.2
+  IL_0070:  ldloc.s    V_8
+  IL_0072:  stloc.s    V_5
+  IL_0074:  ldloc.s    V_5
+  IL_0076:  isinst     [mscorlib]System.Double
+  IL_007b:  brfalse.s  IL_0086
+
+  IL_007d:  ldloc.s    V_5
+  IL_007f:  unbox      [mscorlib]System.Double
+  IL_0084:  br.s       IL_0088
+
+  IL_0086:  ldc.i4.0
+  IL_0087:  conv.i
+  IL_0088:  ldind.r8
+  IL_0089:  stloc.1
+  IL_008a:  ldloca.s   V_11
+  IL_008c:  ldc.r4     0.0
+  IL_0091:  stind.r4
+  IL_0092:  ldloca.s   V_11
+  IL_0094:  ldc.i4.4
+  IL_0095:  add
+  IL_0096:  ldc.r4     0.309017
+  IL_009b:  stind.r4
+  IL_009c:  ldloca.s   V_11
+  IL_009e:  ldc.i4.8
+  IL_009f:  add
+  IL_00a0:  ldc.r4     0.58778524
+  IL_00a5:  stind.r4
+  IL_00a6:  ldloca.s   V_11
+  IL_00a8:  ldc.i4.s   12
+  IL_00aa:  add
+  IL_00ab:  ldc.r4     0.809017
+  IL_00b0:  stind.r4
+  IL_00b1:  ldloca.s   V_11
+  IL_00b3:  ldc.i4.s   16
+  IL_00b5:  add
+  IL_00b6:  ldc.r4     0.95105654
+  IL_00bb:  stind.r4
+  IL_00bc:  ldloca.s   V_11
+  IL_00be:  ldc.i4.s   20
+  IL_00c0:  add
+  IL_00c1:  ldc.r4     1.
+  IL_00c6:  stind.r4
+  IL_00c7:  ldloca.s   V_11
+  IL_00c9:  ldc.i4.s   24
+  IL_00cb:  add
+  IL_00cc:  ldc.r4     0.95105654
+  IL_00d1:  stind.r4
+  IL_00d2:  ldloca.s   V_11
+  IL_00d4:  ldc.i4.s   28
+  IL_00d6:  add
+  IL_00d7:  ldc.r4     0.809017
+  IL_00dc:  stind.r4
+  IL_00dd:  ldloca.s   V_11
+  IL_00df:  ldc.i4.s   32
+  IL_00e1:  add
+  IL_00e2:  ldc.r4     0.58778524
+  IL_00e7:  stind.r4
+  IL_00e8:  ldloca.s   V_11
+  IL_00ea:  ldc.i4.s   36
+  IL_00ec:  add
+  IL_00ed:  ldc.r4     0.309017
+  IL_00f2:  stind.r4
+  IL_00f3:  ldc.i4.0
+  IL_00f4:  stloc.0
+  IL_00f5:  br.s       IL_00fb
+
+  IL_00f7:  ldloc.0
+  IL_00f8:  ldc.i4.1
+  IL_00f9:  add
+  IL_00fa:  stloc.0
+  IL_00fb:  ldloc.0
+  IL_00fc:  ldc.i4.s   10
+  IL_00fe:  bge        IL_0227
+
+  IL_0103:  ldc.r8     3.1415926535897931
+  IL_010c:  ldloc.0
+  IL_010d:  conv.r8
+  IL_010e:  ldc.r8     10.
+  IL_0117:  div
+  IL_0118:  mul
+  IL_0119:  stloc.3
+  IL_011a:  ldstr      "Classlib Sin("
+  IL_0124:  call       void [console]System.Console::Write(string)
+  IL_0129:  ldloc.3
+  IL_012a:  call       void [console]System.Console::Write(float64)
+  IL_012f:  ldstr      ")="
+  IL_0139:  call       void [console]System.Console::Write(string)
+  IL_013e:  ldloc.3
+  IL_013f:  call       float64 [mscorlib]System.Math::Sin(float64)
+  IL_0144:  stloc.2
+  IL_0145:  ldloc.2
+  IL_0146:  call       void [console]System.Console::WriteLine(float64)
+  IL_014b:  ldstr      "This Version("
+  IL_0155:  call       void [console]System.Console::Write(string)
+  IL_015a:  ldloc.3
+  IL_015b:  call       void [console]System.Console::Write(float64)
+  IL_0160:  ldstr      ")="
+  IL_016a:  call       void [console]System.Console::Write(string)
+  IL_016f:  ldloc.3
+  IL_0170:  call       float64 Z::mySin(float64)
+  IL_0175:  stloc.1
+  IL_0176:  ldloc.1
+  IL_0177:  call       void [console]System.Console::WriteLine(float64)
+  IL_017c:  ldstr      "Error is:"
+  IL_0186:  call       void [console]System.Console::Write(string)
+  IL_018b:  ldloc.2
+  IL_018c:  ldloc.1
+  IL_018d:  sub
+  IL_018e:  call       void [console]System.Console::WriteLine(float64)
+  IL_0193:  call       void [console]System.Console::WriteLine()
+  IL_0198:  ldloc.2
+  IL_0199:  ldloc.1
+  IL_019a:  sub
+  IL_019b:  call       float64 [mscorlib]System.Math::Abs(float64)
+  IL_01a0:  ldc.r8     1.0000000000000001e-005
+  IL_01a9:  ble.un.s   IL_01c2
+
+  IL_01ab:  ldstr      "ERROR, Versions too far apart!"
+  IL_01b5:  call       void [console]System.Console::WriteLine(string)
+  IL_01ba:  ldc.i4.1
+  IL_01bb:  stloc.s    V_4
+  IL_01bd:  br         IL_023a
+
+  IL_01c2:  ldloca.s   V_11
+  IL_01c4:  ldloc.0
+  IL_01c5:  conv.i8
+  IL_01c6:  ldc.i4.4
+  IL_01c7:  conv.i8
+  IL_01c8:  mul
+  IL_01c9:  add
+            conv.i
+  IL_01ca:  ldind.r4
+  IL_01cb:  conv.r8
+  IL_01cc:  ldloc.2
+  IL_01cd:  sub
+  IL_01ce:  call       float64 [mscorlib]System.Math::Abs(float64)
+  IL_01d3:  ldc.r8     1.0000000000000001e-005
+  IL_01dc:  ble.un.s   IL_01f2
+
+  IL_01de:  ldstr      "ERROR, ClassLib version isn't right!"
+  IL_01e8:  call       void [console]System.Console::WriteLine(string)
+  IL_01ed:  ldc.i4.1
+  IL_01ee:  stloc.s    V_4
+  IL_01f0:  br.s       IL_023a
+
+  IL_01f2:  ldloca.s   V_11
+  IL_01f4:  ldloc.0
+  IL_01f5:  conv.i8
+  IL_01f6:  ldc.i4.4
+  IL_01f7:  conv.i8
+  IL_01f8:  mul
+  IL_01f9:  add
+            conv.i
+  IL_01fa:  ldind.r4
+  IL_01fb:  conv.r8
+  IL_01fc:  ldloc.1
+  IL_01fd:  sub
+  IL_01fe:  call       float64 [mscorlib]System.Math::Abs(float64)
+  IL_0203:  ldc.r8     1.0000000000000001e-005
+  IL_020c:  ble.un.s   IL_0222
+
+  IL_020e:  ldstr      "ERROR, our version isn't right!"
+  IL_0218:  call       void [console]System.Console::WriteLine(string)
+  IL_021d:  ldc.i4.1
+  IL_021e:  stloc.s    V_4
+  IL_0220:  br.s       IL_023a
+
+  IL_0222:  br         IL_00f7
+
+  IL_0227:  ldstr      "Yippee, all correct"
+  IL_0231:  call       void [console]System.Console::WriteLine(string)
+  IL_0236:  ldc.i4.s   100
+  IL_0238:  stloc.s    V_4
+  IL_023a:  ldloc.s    V_4
+  IL_023c:  ret
+}
+
+}
+
diff --git a/tests/src/JIT/Methodical/Boxing/morph/sin3double.ilproj b/tests/src/JIT/Methodical/Boxing/morph/sin3double.ilproj
new file mode 100644 (file)
index 0000000..d8ec34d
--- /dev/null
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+    <DefineConstants>$(DefineConstants);STATIC</DefineConstants>
+ </PropertyGroup>
+  <!-- Default configurations to help VS understand the configurations -->
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+  </PropertyGroup>
+  <ItemGroup>
+    <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+      <Visible>False</Visible>
+    </CodeAnalysisDependentAssemblyPaths>
+  </ItemGroup>
+  <PropertyGroup>
+     <DebugType>None</DebugType>
+     <Optimize>True</Optimize>
+  </PropertyGroup>
+  <ItemGroup>
+    <Compile Include="sin3double.il" />
+  </ItemGroup>
+  <ItemGroup>
+    <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+  </ItemGroup>
+  <PropertyGroup>
+    <ProjectJson>$(JitPackagesConfigFileDirectory)benchmark\project.json</ProjectJson>
+    <ProjectLockJson>$(JitPackagesConfigFileDirectory)benchmark\project.lock.json</ProjectLockJson>
+  </PropertyGroup>
+  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+  <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+  </PropertyGroup> 
+</Project>
\ No newline at end of file
diff --git a/tests/src/JIT/Methodical/acceptance/Boxing/boxing001.il b/tests/src/JIT/Methodical/acceptance/Boxing/boxing001.il
new file mode 100644 (file)
index 0000000..2e1fc4a
--- /dev/null
@@ -0,0 +1,437 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+.assembly extern mscorlib
+{
+}
+
+.assembly extern System.Console as console
+{
+}
+
+.assembly boxing001 
+{
+}
+
+.class private sequential ansi sealed beforefieldinit V extends [mscorlib] System.ValueType
+{
+  .field public int32 m_i
+}
+
+.class public auto ansi beforefieldinit Z extends [mscorlib] System.Object
+{
+
+.field static int32 nFailures
+
+.method static int32 Assert(int32 line, string f) cil managed
+{
+  .locals (int32 V_0)
+   ldstr      "ASSERTION FAILED AT LINE"
+   call       void [console]System.Console::Write(string)
+   ldarg.0
+   call       void [console]System.Console::Write(int32)
+   ldstr      ": '"
+   call       void [console]System.Console::Write(string)
+   ldarg.1
+   call       void [console]System.Console::Write(string)
+   ldstr      "'"
+   call       void [console]System.Console::WriteLine(string)
+   ldsfld     int32 Z::nFailures
+   ldc.i4.1
+   add
+   stsfld     int32 Z::nFailures
+   ldsfld     int32 Z::nFailures
+   stloc.0
+   ldloc.0
+   ret
+}
+
+.method public static int32 Main() cil managed
+{
+  .entrypoint
+  .locals (int32 V_0,
+           object V1,
+           valuetype V V_2,
+           valuetype V& V_3,
+           object V_4,
+           object V_5,
+           object V_6,
+           int32 V_7,
+           int32 V_8,
+           object V_9,
+           object V_10,
+           object V_11,
+           object V_12,
+           string V_13,
+           string V_14,
+           valuetype V& V_15,
+           valuetype V V_16,
+           valuetype V V_17)
+  ldc.i4.0
+  stloc.s    V_7
+  ldnull
+  stloc.1
+  ldnull
+  stloc.s    V_4
+  ldnull
+  stloc.s    V_14
+  ldnull
+  stloc.s    V_13
+  ldnull
+  stloc.s    V_6
+  ldnull
+  stloc.s    V_5
+  ldnull
+  stloc.s    V_12
+  ldnull
+  stloc.s    V_11
+  ldloca.s   V_2
+  initobj    V
+  ldloca.s   V_2
+  ldc.i4.5
+  stfld      int32 V::m_i
+  ldloc.2
+  box        V
+  stloc.1
+  ldloc.1
+  unbox      V
+  ldfld      int32 V::m_i
+  stloc.0
+  ldloc.0
+  ldc.i4.5
+  beq.s      T1
+
+  ldc.i4.s   50
+  ldstr      "i == 5"
+  call       int32 Z::Assert(int32, string)
+  pop
+
+T1:
+
+  ldloc.1
+  unbox      V
+  stloc.3
+  ldloc.3
+  ldfld      int32 V::m_i
+  ldc.i4.5
+  beq.s      T2
+
+  ldc.i4.s   53
+  ldstr      "pv->m_i == 5"
+  call       int32 Z::Assert(int32, string)
+  pop
+
+T2:
+
+  ldloc.3
+  ldfld      int32 V::m_i
+  ldc.i4.5
+  beq.s      T3
+
+  ldc.i4.s   55
+  ldstr      "(*pv).m_i == 5"
+  call       int32 Z::Assert(int32, string)
+  pop
+
+T3:
+
+  ldloc.3
+  ldobj      V
+  stloc.s    V_17
+  ldloca.s   V_17
+  ldc.i4.s   10
+  stfld      int32 V::m_i
+  ldloca.s   V_17
+  ldfld      int32 V::m_i
+  ldc.i4.s   10
+  beq.s      T4
+
+  ldc.i4.s   60
+  ldstr      "v3.m_i == 10"
+  call       int32 Z::Assert(int32, string)
+  pop
+
+T4:
+
+  ldloc.3
+  ldfld      int32 V::m_i
+  ldc.i4.5
+  beq.s      T5
+
+  ldc.i4.s   61
+  ldstr      "(*pv).m_i == 5"
+  call       int32 Z::Assert(int32, string)
+  pop
+
+T5:
+
+  ldloca.s   V_17
+  stloc.3
+  ldloc.3
+  ldfld      int32 V::m_i
+  ldc.i4.s   10
+  beq.s      T6
+
+  ldc.i4.s   64
+  ldstr      "(*pv).m_i == 10"
+  call       int32 Z::Assert(int32, string)
+  pop
+
+T6:
+
+  ldloc.1
+  unbox      V
+  ldobj      V
+  stloc.s    V_16
+  ldloca.s   V_16
+  ldfld      int32 V::m_i
+  ldc.i4.5
+  beq.s      T7
+
+  ldc.i4.s   68
+  ldstr      "v2.m_i == 5"
+  call       int32 Z::Assert(int32, string)
+  pop
+
+T7:
+
+  ldloc.1
+  unbox      V
+  ldc.i4.s   10
+  stfld      int32 V::m_i
+  ldloc.1
+  unbox      V
+  ldfld      int32 V::m_i
+  stloc.0
+  ldloc.0
+  ldc.i4.s   10
+  beq.s      T8
+
+  ldc.i4.s   72
+  ldstr      "i == 10"
+  call       int32 Z::Assert(int32, string)
+  pop
+
+T8:
+
+  ldloc.1
+  unbox      V
+  ldc.i4.s   123
+  stfld      int32 V::m_i
+  ldloc.1
+  unbox      V
+  ldobj      V
+  stloc.2
+  ldloca.s   V_2
+  ldfld      int32 V::m_i
+  ldc.i4.s   123
+  beq.s      T9
+
+  ldc.i4.s   76
+  ldstr      "v.m_i == 123"
+  call       int32 Z::Assert(int32, string)
+  pop
+
+T9:
+
+  ldloc.2
+  box        V
+  stloc.s    V_4
+  ldloc.s    V_4
+  stloc.1
+  ldloc.1
+  unbox      V
+  ldfld      int32 V::m_i
+  stloc.0
+  ldloc.0
+  ldc.i4.s   123
+  beq.s      T10
+
+  ldc.i4.s   82
+  ldstr      "i == 123"
+  call       int32 Z::Assert(int32, string)
+  pop
+
+T10:
+
+  ldstr      "V"
+  stloc.s    V_14
+  ldloc.1
+  callvirt   instance string [mscorlib]System.ValueType::ToString()
+  stloc.s    V_13
+  ldloc.s    V_14
+  ldloc.s    V_13
+  callvirt   instance bool [mscorlib]System.String::Equals(string)
+  brtrue.s   T11
+
+  ldc.i4.s   86
+  ldstr      "str1->Equals( str2 )"
+  call       int32 Z::Assert(int32, string)
+  pop
+
+T11:
+
+  ldloc.2
+  box        V
+  stloc.s    V_4
+  ldloc.s    V_4
+  stloc.s    V_10
+  ldloc.s    V_10
+  isinst     V
+  brfalse.s  X0
+
+  ldloc.s    V_10
+  unbox      V
+  br.s       X1
+
+X0:
+
+  ldc.i4.0
+  conv.i
+
+X1:
+
+  stloc.s    V_15
+  ldloc.s    V_15
+  ldobj      V
+  stloc.2
+  ldloc.s    V_4
+  stloc.s    V_9
+  ldloc.s    V_9
+  isinst     V
+  brfalse.s  X2
+
+  ldloc.s    V_9
+  unbox      V
+  br.s       X3
+
+X2:
+
+  ldc.i4.0
+  conv.i
+
+X3:
+
+  ldobj      V
+  stloc.2
+  ldloc.1
+  unbox      V
+  ldobj      V
+  box        V
+  unbox      V
+  ldobj      V
+  box        V
+  unbox      V
+  ldobj      V
+  stloc.2
+  ldloca.s   V_2
+  ldfld      int32 V::m_i
+  stloc.0
+  ldloc.1
+  unbox      V
+  ldobj      V
+  box        V
+  unbox      V
+  ldobj      V
+  box        V
+  unbox      V
+  ldobj      V
+  box        V
+  unbox      V
+  ldobj      V
+  box        V
+  stloc.1
+  ldloc.0
+  ldloc.1
+  unbox      V
+  ldfld      int32 V::m_i
+  sub
+  stloc.0
+  ldloc.0
+  brfalse.s  T12
+
+  ldc.i4.s   101
+  ldstr      "i == 0"
+  call       int32 Z::Assert(int32, string)
+  pop
+
+T12:
+  ldc.i4.5
+  stloc.s    V_8
+  ldc.i4.0
+  stloc.0
+  ldc.i4.5
+  box        [mscorlib]System.Int32
+  stloc.s    V_6
+  ldloc.0
+  ldloc.s    V_6
+  unbox      [mscorlib]System.Int32
+  ldind.i4
+  add
+  stloc.0
+  ldc.i4.5
+  box        [mscorlib]System.Int32
+  stloc.s    V_5
+  ldloc.0
+  ldloc.s    V_5
+  unbox      [mscorlib]System.Int32
+  ldind.i4
+  add
+  stloc.0
+  ldloc.s    V_8
+  box        [mscorlib]System.Int32
+  stloc.s    V_12
+  ldloc.0
+  ldloc.s    V_12
+  unbox      [mscorlib]System.Int32
+  ldind.i4
+  add
+  stloc.0
+  ldloc.s    V_8
+  box        [mscorlib]System.Int32
+  stloc.s    V_11
+  ldloc.0
+  ldloc.s    V_11
+  unbox      [mscorlib]System.Int32
+  ldind.i4
+  add
+  stloc.0
+  ldloc.0
+  ldc.i4.s   20
+  beq.s      T13
+
+  ldc.i4.s   114
+  ldstr      "i == 5+5+5+5"
+  call       int32 Z::Assert(int32, string)
+  pop
+
+T13:
+
+  ldloc.s    V_5
+  stloc.s    V_6
+  ldsfld     int32 Z::nFailures
+  brtrue.s   Fail
+
+  ldstr      "PASSED"
+  call       void [console]System.Console::WriteLine(string)
+  ldc.i4.s   100
+  stloc.s    V_7
+  br.s       Done
+
+Fail:
+
+  ldstr      "FAILED"
+  call       void [console]System.Console::WriteLine(string)
+  ldsfld     int32 Z::nFailures
+  stloc.s    V_7
+
+Done:
+
+  ldloc.s    V_7
+  ret
+}
+
+}
+
diff --git a/tests/src/JIT/Methodical/acceptance/Boxing/boxing001.ilproj b/tests/src/JIT/Methodical/acceptance/Boxing/boxing001.ilproj
new file mode 100644 (file)
index 0000000..3d7729f
--- /dev/null
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+    <DefineConstants>$(DefineConstants);STATIC</DefineConstants>
+ </PropertyGroup>
+  <!-- Default configurations to help VS understand the configurations -->
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+  </PropertyGroup>
+  <ItemGroup>
+    <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+      <Visible>False</Visible>
+    </CodeAnalysisDependentAssemblyPaths>
+  </ItemGroup>
+  <PropertyGroup>
+     <DebugType>None</DebugType>
+     <Optimize>True</Optimize>
+  </PropertyGroup>
+  <ItemGroup>
+    <Compile Include="boxing001.il" />
+  </ItemGroup>
+  <ItemGroup>
+    <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+  </ItemGroup>
+  <PropertyGroup>
+    <ProjectJson>$(JitPackagesConfigFileDirectory)benchmark\project.json</ProjectJson>
+    <ProjectLockJson>$(JitPackagesConfigFileDirectory)benchmark\project.lock.json</ProjectLockJson>
+  </PropertyGroup>
+  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+  <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+  </PropertyGroup> 
+</Project>
\ No newline at end of file
index 07e5030..8e7c40c 100644 (file)
@@ -1009,7 +1009,7 @@ namespace Span
                 Array.Clear(array, 0, length);
         }
         #endregion
-
+#if false
         #region TestSpanAsBytes<T>
         [Benchmark(InnerIterationCount = BaseIterations)]
         [InlineData(1)]
@@ -1109,6 +1109,7 @@ namespace Span
         #endregion
 
         #region TestSpanSliceStringChar<T>
+        
         [Benchmark(InnerIterationCount = BaseIterations)]
         [InlineData(1)]
         [InlineData(10)]
@@ -1137,15 +1138,16 @@ namespace Span
 
             for (int i = 0; i < iterationCount; i++)
             {
-                var charSpan = s.Slice();
+                var charSpan = s.AsSpan();
                 // Under a condition that we know is false but the jit doesn't,
                 // add a read from 'charSpan' to make sure it's not dead, and an assignment
                 // to 's' so the AsBytes call won't get hoisted.
                 if (untrue) { sink.Data = charSpan[0]; s = "block hoisting the call to Slice()"; }
             }
         }
-        #endregion
 
+        #endregion      
+ #endif
         #endregion // TestSpanAPIs
 
 
diff --git a/tests/src/JIT/Regression/JitBlue/GitHub_10621/GitHub_10621.cs b/tests/src/JIT/Regression/JitBlue/GitHub_10621/GitHub_10621.cs
new file mode 100644 (file)
index 0000000..9f2a4b3
--- /dev/null
@@ -0,0 +1,81 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System;
+using System.Runtime.CompilerServices;
+
+class GitHub_10621
+{
+    [MethodImpl(MethodImplOptions.NoInlining)]
+    static int F(int x) 
+    { 
+        return x * x;
+    }
+
+    // An empty try with nested try finallys where
+    // the inner finally cannot be cloned.
+    public static int Main()
+    {
+        int x = 0;
+        try {
+            // empty
+        }
+        finally {
+            try {
+                for (int i = 0; i < 11; i++) {
+                    x += F(i);
+                }
+            }
+            finally {
+
+                x -= 81;
+
+                try {
+                    // empty
+                }
+                finally
+                {
+                    x -= 64; 
+                    try {
+                        x -= 49;
+                    }
+                    finally {
+                        try {
+                            // empty
+                        }
+                        finally {
+                            x -= 36;
+                            try {
+                                x -= 25;
+                            }
+                            finally {
+                                try {
+                                    // empty
+                                }
+                                finally
+                                {
+                                    x -= 16; 
+                                    try {
+                                        x -= 9;
+                                    }
+                                    finally {
+                                        try {
+                                            // empty
+                                        }
+                                        finally {
+                                            x -= 4;
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+
+        return x - 1;
+    }
+}
+
diff --git a/tests/src/JIT/Regression/JitBlue/GitHub_10621/GitHub_10621.csproj b/tests/src/JIT/Regression/JitBlue/GitHub_10621/GitHub_10621.csproj
new file mode 100644 (file)
index 0000000..6b95745
--- /dev/null
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{DADEC17C-DA8A-4F7D-9927-47A9033A2E80}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <FileAlignment>512</FileAlignment>
+    <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+    <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+
+    <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+  </PropertyGroup>
+  <!-- Default configurations to help VS understand the configurations -->
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+  </PropertyGroup>
+  <ItemGroup>
+    <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+      <Visible>False</Visible>
+    </CodeAnalysisDependentAssemblyPaths>
+  </ItemGroup>
+  <PropertyGroup>
+    <DebugType></DebugType>
+    <Optimize>True</Optimize>
+  </PropertyGroup>
+  <ItemGroup>
+    <Compile Include="$(MSBuildProjectName).cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+  </ItemGroup>
+  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+  <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+  </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/SIMD/VectorConvert.cs b/tests/src/JIT/SIMD/VectorConvert.cs
new file mode 100644 (file)
index 0000000..6c65b22
--- /dev/null
@@ -0,0 +1,565 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+//
+
+using System;
+using System.Numerics;
+
+partial class VectorTest
+{
+    const int Pass = 100;
+    const int Fail = -1;
+
+    static Random random;
+    // Arrays to use for creating random Vectors.
+    static Double[] doubles;
+    static Single[] singles;
+    static Int64[] int64s;
+    static UInt64[] uint64s;
+    static Int32[] int32s;
+    static UInt32[] uint32s;
+    static Int16[] int16s;
+    static UInt16[] uint16s;
+    static SByte[] sbytes;
+    static Byte[] bytes;
+
+    static VectorTest()
+    {
+        doubles = new Double[Vector<Double>.Count];
+        singles = new Single[Vector<Single>.Count];
+        int64s = new Int64[Vector<Int64>.Count];
+        uint64s = new UInt64[Vector<UInt64>.Count];
+        int32s = new Int32[Vector<Int32>.Count];
+        uint32s = new UInt32[Vector<UInt32>.Count];
+        int16s = new Int16[Vector<Int16>.Count];
+        uint16s = new UInt16[Vector<UInt16>.Count];
+        sbytes = new SByte[Vector<SByte>.Count];
+        bytes = new Byte[Vector<Byte>.Count];
+
+        random = new Random(1234);
+    }
+
+    static T getRandomValue<T>()
+    {
+        int sign = (random.Next(0, 2) < 1) ? -1 : 1;
+        if (typeof(T) == typeof(float))
+        {
+            float floatValue = (float)random.NextDouble() * (float)(Int32.MaxValue) * (float)sign;
+            return (T)(object)floatValue;
+        }
+        if (typeof(T) == typeof(double))
+        {
+            return (T)(object)(random.NextDouble() * (double)(Int64.MaxValue) * (double)sign);
+        }
+        if (typeof(T) == typeof(Int64))
+        {
+            return (T)(object)(Int64)(random.NextDouble() * (double)(Int64.MaxValue) * (double)sign);
+        }
+        if (typeof(T) == typeof(UInt64))
+        {
+            return (T)(object)(UInt64)(random.NextDouble() * (double)(Int64.MaxValue));
+        }
+        int intValue = (int)(random.NextDouble() * (double)(Int32.MaxValue));
+        T value = GetValueFromInt<T>(intValue);
+        return value;
+    }
+
+    static Vector<T> getRandomVector<T>(T[] valueArray) where T : struct
+    {
+        for (int i = 0; i < Vector<T>.Count; i++)
+        {
+            valueArray[i] = getRandomValue<T>();
+        }
+        return new Vector<T>(valueArray);
+    }
+
+    class VectorConvertTest
+    {
+        public static int VectorConvertSingleInt(Vector<Single> A)
+        {
+            Vector<Int32> B = Vector.ConvertToInt32(A);
+            Vector<Single> C = Vector.ConvertToSingle(B);
+
+            int returnVal = Pass;
+            for (int i = 0; i < Vector<Single>.Count; i++)
+            {
+                Int32 int32Val = (Int32)A[i];
+                Single cvtSglVal = (Single)int32Val;
+                if (B[i] != int32Val)
+                {
+                    Console.WriteLine("B[" + i + "] = " + B[i] + ", int32Val = " + int32Val);
+                    returnVal = Fail;
+                }
+                if (C[i] != cvtSglVal)
+                {
+                    Console.WriteLine("C[" + i + "] = " + C[i] + ", cvtSglVal = " + cvtSglVal);
+                    returnVal = Fail;
+                }
+            }
+            return returnVal;
+        }
+
+        public static int VectorConvertSingleUInt(Vector<Single> A)
+        {
+            Vector<UInt32> B = Vector.ConvertToUInt32(A);
+            Vector<Single> C = Vector.ConvertToSingle(B);
+
+            int returnVal = Pass;
+            for (int i = 0; i < Vector<Single>.Count; i++)
+            {
+                UInt32 uint32Val = (UInt32)A[i];
+                Single cvtSglVal = (Single)uint32Val;
+                if (B[i] != uint32Val)
+                {
+                    Console.WriteLine("B[" + i + "] = " + B[i] + ", UInt32Val = " + uint32Val);
+                    returnVal = Fail;
+                }
+                if (C[i] != cvtSglVal)
+                {
+                    Console.WriteLine("C[" + i + "] = " + C[i] + ", cvtSglVal = " + cvtSglVal);
+                    returnVal = Fail;
+                }
+            }
+            return returnVal;
+        }
+
+        public static int VectorConvertDoubleInt64(Vector<Double> A)
+        {
+            Vector<Int64> B = Vector.ConvertToInt64(A);
+            Vector<Double> C = Vector.ConvertToDouble(B);
+
+            int returnVal = Pass;
+            for (int i = 0; i < Vector<Double>.Count; i++)
+            {
+                Int64 int64Val = (Int64)A[i];
+                Double cvtDblVal = (Double)int64Val;
+                if (B[i] != int64Val)
+                {
+                    Console.WriteLine("B[" + i + "] = " + B[i] + ", int64Val = " + int64Val);
+                    returnVal = Fail;
+                }
+                if (C[i] != cvtDblVal)
+                {
+                    Console.WriteLine("C[" + i + "] = " + C[i] + ", cvtDblVal = " + cvtDblVal);
+                    returnVal = Fail;
+                }
+            }
+            return returnVal;
+        }
+
+        public static int VectorConvertDoubleUInt64(Vector<Double> A)
+        {
+            Vector<UInt64> B = Vector.ConvertToUInt64(A);
+            Vector<Double> C = Vector.ConvertToDouble(B);
+
+            int returnVal = Pass;
+            for (int i = 0; i < Vector<Double>.Count; i++)
+            {
+                UInt64 uint64Val = (UInt64)A[i];
+                Double cvtDblVal = (Double)uint64Val;
+                if (B[i] != uint64Val)
+                {
+                    Console.WriteLine("B[" + i + "] = " + B[i] + ", uint64Val = " + uint64Val);
+                    returnVal = Fail;
+                }
+                if (C[i] != cvtDblVal)
+                {
+                    Console.WriteLine("C[" + i + "] = " + C[i] + ", cvtDblVal = " + cvtDblVal);
+                    returnVal = Fail;
+                }
+            }
+            return returnVal;
+        }
+
+        public static int VectorConvertDoubleSingle(Vector<Double> A1, Vector<Double> A2)
+        {
+            Vector<Single> B = Vector.Narrow(A1, A2);
+            Vector<Double> C1, C2;
+            Vector.Widen(B, out C1, out C2);
+
+            int returnVal = Pass;
+            for (int i = 0; i < Vector<Double>.Count; i++)
+            {
+                Single sglVal1 = (Single)A1[i];
+                Single sglVal2 = (Single)A2[i];
+                Double dblVal1 = (Double)sglVal1;
+                Double dblVal2 = (Double)sglVal2;
+                if (B[i] != sglVal1)
+                {
+                    Console.WriteLine("B[" + i + "] = " + B[i] + ", sglVal1 = " + sglVal1);
+                    returnVal = Fail;
+                }
+                int i2 = i + Vector<Double>.Count;
+                if (B[i2] != sglVal2)
+                {
+                    Console.WriteLine("B[" + i2 + "] = " + B[i2] + ", sglVal2 = " + sglVal2);
+                    returnVal = Fail;
+                }
+                if (C1[i] != dblVal1)
+                {
+                    Console.WriteLine("C1[" + i + "] = " + C1[i] + ", dblVal1 = " + dblVal1);
+                    returnVal = Fail;
+                }
+                if (C2[i] != dblVal2)
+                {
+                    Console.WriteLine("C2[" + i + "] = " + C2[i] + ", dblVal2 = " + dblVal2);
+                    returnVal = Fail;
+                }
+            }
+            return returnVal;
+        }
+
+        public static int VectorConvertInt64And32(Vector<Int64> A1, Vector<Int64> A2)
+        {
+            Vector<Int32> B = Vector.Narrow(A1, A2);
+            Vector<Int64> C1, C2;
+            Vector.Widen(B, out C1, out C2);
+
+            int returnVal = Pass;
+            for (int i = 0; i < Vector<Int64>.Count; i++)
+            {
+                Int32 smallVal1 = (Int32)A1[i];
+                Int32 smallVal2 = (Int32)A2[i];
+                Int64 largeVal1 = (Int64)smallVal1;
+                Int64 largeVal2 = (Int64)smallVal2;
+                if (B[i] != smallVal1)
+                {
+                    Console.WriteLine("B[" + i + "] = " + B[i] + ", smallVal1 = " + smallVal1);
+                    returnVal = Fail;
+                }
+                int i2 = i + Vector<Int64>.Count;
+                if (B[i2] != smallVal2)
+                {
+                    Console.WriteLine("B[" + i2 + "] = " + B[i2] + ", smallVal2 = " + smallVal2);
+                    returnVal = Fail;
+                }
+                if (C1[i] != largeVal1)
+                {
+                    Console.WriteLine("C1[" + i + "] = " + C1[i] + ", largeVal1 = " + largeVal1);
+                    returnVal = Fail;
+                }
+                if (C2[i] != largeVal2)
+                {
+                    Console.WriteLine("C2[" + i + "] = " + C2[i] + ", largeVal2 = " + largeVal2);
+                    returnVal = Fail;
+                }
+            }
+            return returnVal;
+        }
+
+        public static int VectorConvertInt32And16(Vector<Int32> A1, Vector<Int32> A2)
+        {
+            Vector<Int16> B = Vector.Narrow(A1, A2);
+            Vector<Int32> C1, C2;
+            Vector.Widen(B, out C1, out C2);
+
+            int returnVal = Pass;
+            for (int i = 0; i < Vector<Int32>.Count; i++)
+            {
+                Int16 smallVal1 = (Int16)A1[i];
+                Int16 smallVal2 = (Int16)A2[i];
+                Int32 largeVal1 = (Int32)smallVal1;
+                Int32 largeVal2 = (Int32)smallVal2;
+                if (B[i] != smallVal1)
+                {
+                    Console.WriteLine("B[" + i + "] = " + B[i] + ", smallVal1 = " + smallVal1);
+                    returnVal = Fail;
+                }
+                int i2 = i + Vector<Int32>.Count;
+                if (B[i2] != smallVal2)
+                {
+                    Console.WriteLine("B[" + i2 + "] = " + B[i2] + ", smallVal2 = " + smallVal2);
+                    returnVal = Fail;
+                }
+                if (C1[i] != largeVal1)
+                {
+                    Console.WriteLine("C1[" + i + "] = " + C1[i] + ", largeVal1 = " + largeVal1);
+                    returnVal = Fail;
+                }
+                if (C2[i] != largeVal2)
+                {
+                    Console.WriteLine("C2[" + i + "] = " + C2[i] + ", largeVal2 = " + largeVal2);
+                    returnVal = Fail;
+                }
+            }
+            return returnVal;
+        }
+        
+        public static int VectorConvertInt16And8(Vector<Int16> A1, Vector<Int16> A2)
+        {
+            Vector<SByte> B = Vector.Narrow(A1, A2);
+            Vector<Int16> C1, C2;
+            Vector.Widen(B, out C1, out C2);
+
+            int returnVal = Pass;
+            for (int i = 0; i < Vector<Int16>.Count; i++)
+            {
+                SByte smallVal1 = (SByte)A1[i];
+                SByte smallVal2 = (SByte)A2[i];
+                Int16 largeVal1 = (Int16)smallVal1;
+                Int16 largeVal2 = (Int16)smallVal2;
+                if (B[i] != smallVal1)
+                {
+                    Console.WriteLine("B[" + i + "] = " + B[i] + ", smallVal1 = " + smallVal1);
+                    returnVal = Fail;
+                }
+                int i2 = i + Vector<Int16>.Count;
+                if (B[i2] != smallVal2)
+                {
+                    Console.WriteLine("B[" + i2 + "] = " + B[i2] + ", smallVal2 = " + smallVal2);
+                    returnVal = Fail;
+                }
+                if (C1[i] != largeVal1)
+                {
+                    Console.WriteLine("C1[" + i + "] = " + C1[i] + ", largeVal1 = " + largeVal1);
+                    returnVal = Fail;
+                }
+                if (C2[i] != largeVal2)
+                {
+                    Console.WriteLine("C2[" + i + "] = " + C2[i] + ", largeVal2 = " + largeVal2);
+                    returnVal = Fail;
+                }
+            }
+            return returnVal;
+        }
+        
+        public static int VectorConvertUInt64And32(Vector<UInt64> A1, Vector<UInt64> A2)
+        {
+            Vector<UInt32> B = Vector.Narrow(A1, A2);
+            Vector<UInt64> C1, C2;
+            Vector.Widen(B, out C1, out C2);
+
+            int returnVal = Pass;
+            for (int i = 0; i < Vector<UInt64>.Count; i++)
+            {
+                UInt32 smallVal1 = (UInt32)A1[i];
+                UInt32 smallVal2 = (UInt32)A2[i];
+                UInt64 largeVal1 = (UInt64)smallVal1;
+                UInt64 largeVal2 = (UInt64)smallVal2;
+                if (B[i] != smallVal1)
+                {
+                    Console.WriteLine("B[" + i + "] = " + B[i] + ", smallVal1 = " + smallVal1);
+                    returnVal = Fail;
+                }
+                int i2 = i + Vector<UInt64>.Count;
+                if (B[i2] != smallVal2)
+                {
+                    Console.WriteLine("B[" + i2 + "] = " + B[i2] + ", smallVal2 = " + smallVal2);
+                    returnVal = Fail;
+                }
+                if (C1[i] != largeVal1)
+                {
+                    Console.WriteLine("C1[" + i + "] = " + C1[i] + ", largeVal1 = " + largeVal1);
+                    returnVal = Fail;
+                }
+                if (C2[i] != largeVal2)
+                {
+                    Console.WriteLine("C2[" + i + "] = " + C2[i] + ", largeVal2 = " + largeVal2);
+                    returnVal = Fail;
+                }
+            }
+            return returnVal;
+        }
+
+        public static int VectorConvertUInt32And16(Vector<UInt32> A1, Vector<UInt32> A2)
+        {
+            Vector<UInt16> B = Vector.Narrow(A1, A2);
+            Vector<UInt32> C1, C2;
+            Vector.Widen(B, out C1, out C2);
+
+            int returnVal = Pass;
+            for (int i = 0; i < Vector<UInt32>.Count; i++)
+            {
+                UInt16 smallVal1 = (UInt16)A1[i];
+                UInt16 smallVal2 = (UInt16)A2[i];
+                UInt32 largeVal1 = (UInt32)smallVal1;
+                UInt32 largeVal2 = (UInt32)smallVal2;
+                if (B[i] != smallVal1)
+                {
+                    Console.WriteLine("B[" + i + "] = " + B[i] + ", smallVal1 = " + smallVal1);
+                    returnVal = Fail;
+                }
+                int i2 = i + Vector<UInt32>.Count;
+                if (B[i2] != smallVal2)
+                {
+                    Console.WriteLine("B[" + i2 + "] = " + B[i2] + ", smallVal2 = " + smallVal2);
+                    returnVal = Fail;
+                }
+                if (C1[i] != largeVal1)
+                {
+                    Console.WriteLine("C1[" + i + "] = " + C1[i] + ", largeVal1 = " + largeVal1);
+                    returnVal = Fail;
+                }
+                if (C2[i] != largeVal2)
+                {
+                    Console.WriteLine("C2[" + i + "] = " + C2[i] + ", largeVal2 = " + largeVal2);
+                    returnVal = Fail;
+                }
+            }
+            return returnVal;
+        }
+        
+        public static int VectorConvertUInt16And8(Vector<UInt16> A1, Vector<UInt16> A2)
+        {
+            Vector<Byte> B = Vector.Narrow(A1, A2);
+            Vector<UInt16> C1, C2;
+            Vector.Widen(B, out C1, out C2);
+
+            int returnVal = Pass;
+            for (int i = 0; i < Vector<UInt16>.Count; i++)
+            {
+                Byte smallVal1 = (Byte)A1[i];
+                Byte smallVal2 = (Byte)A2[i];
+                UInt16 largeVal1 = (UInt16)smallVal1;
+                UInt16 largeVal2 = (UInt16)smallVal2;
+                if (B[i] != smallVal1)
+                {
+                    Console.WriteLine("B[" + i + "] = " + B[i] + ", smallVal1 = " + smallVal1);
+                    returnVal = Fail;
+                }
+                int i2 = i + Vector<UInt16>.Count;
+                if (B[i2] != smallVal2)
+                {
+                    Console.WriteLine("B[" + i2 + "] = " + B[i2] + ", smallVal2 = " + smallVal2);
+                    returnVal = Fail;
+                }
+                if (C1[i] != largeVal1)
+                {
+                    Console.WriteLine("C1[" + i + "] = " + C1[i] + ", largeVal1 = " + largeVal1);
+                    returnVal = Fail;
+                }
+                if (C2[i] != largeVal2)
+                {
+                    Console.WriteLine("C2[" + i + "] = " + C2[i] + ", largeVal2 = " + largeVal2);
+                    returnVal = Fail;
+                }
+            }
+            return returnVal;
+        }
+    }
+
+    static int Main()
+    {
+        int returnVal = Pass;
+
+        for (int i = 0; i < 10; i++)
+        {
+            Vector<Single> singleVector = getRandomVector<Single>(singles);
+            if (VectorConvertTest.VectorConvertSingleInt(singleVector) != Pass)
+            {
+                Console.WriteLine("Testing Converts Between Single and Int32 failed");
+                returnVal = Fail;
+            }
+        }
+        
+        for (int i = 0; i < 10; i++)
+        {
+            Vector<Single> singleVector = getRandomVector<Single>(singles);
+            if (VectorConvertTest.VectorConvertSingleUInt(singleVector) != Pass)
+            {
+                Console.WriteLine("Testing Converts Between Single and UInt32 failed");
+                returnVal = Fail;
+            }
+        }
+        
+        for (int i = 0; i < 10; i++)
+        {
+            Vector<Double> doubleVector = getRandomVector<Double>(doubles);
+            if (VectorConvertTest.VectorConvertDoubleInt64(doubleVector) != Pass)
+            {
+                Console.WriteLine("Testing Converts between Double and Int64 failed");
+                returnVal = Fail;
+            }
+        }
+        
+        for (int i = 0; i < 10; i++)
+        {
+            Vector<Double> doubleVector = getRandomVector<Double>(doubles);
+            if (VectorConvertTest.VectorConvertDoubleUInt64(doubleVector) != Pass)
+            {
+                Console.WriteLine("Testing Converts between Double and UInt64 failed");
+                returnVal = Fail;
+            }
+        }
+        
+        for (int i = 0; i < 10; i++)
+        {
+            Vector<Double> doubleVector1 = getRandomVector<Double>(doubles);
+            Vector<Double> doubleVector2 = getRandomVector<Double>(doubles);
+            if (VectorConvertTest.VectorConvertDoubleSingle(doubleVector1, doubleVector2) != Pass)
+            {
+                Console.WriteLine("Testing Converts between Single and Double failed");
+                returnVal = Fail;
+            }
+        }
+        
+        for (int i = 0; i < 10; i++)
+        {
+            Vector<Int64> int64Vector1 = getRandomVector<Int64>(int64s);
+            Vector<Int64> int64Vector2 = getRandomVector<Int64>(int64s);
+            if (VectorConvertTest.VectorConvertInt64And32(int64Vector1, int64Vector2) != Pass)
+            {
+                Console.WriteLine("Testing Converts between Int64 and Int32 failed");
+                returnVal = Fail;
+            }
+        }
+        
+        for (int i = 0; i < 10; i++)
+        {
+            Vector<Int32> int32Vector1 = getRandomVector<Int32>(int32s);
+            Vector<Int32> int32Vector2 = getRandomVector<Int32>(int32s);
+            if (VectorConvertTest.VectorConvertInt32And16(int32Vector1, int32Vector2) != Pass)
+            {
+                Console.WriteLine("Testing Converts between Int32 and Int16 failed");
+                returnVal = Fail;
+            }
+        }
+        
+        for (int i = 0; i < 10; i++)
+        {
+            Vector<Int16> int16Vector1 = getRandomVector<Int16>(int16s);
+            Vector<Int16> int16Vector2 = getRandomVector<Int16>(int16s);
+            if (VectorConvertTest.VectorConvertInt16And8(int16Vector1, int16Vector2) != Pass)
+            {
+                Console.WriteLine("Testing Converts between Int16 and SByte failed");
+                returnVal = Fail;
+            }
+        }
+        
+        for (int i = 0; i < 10; i++)
+        {
+            Vector<UInt64> uint64Vector1 = getRandomVector<UInt64>(uint64s);
+            Vector<UInt64> uint64Vector2 = getRandomVector<UInt64>(uint64s);
+            if (VectorConvertTest.VectorConvertUInt64And32(uint64Vector1, uint64Vector2) != Pass)
+            {
+                Console.WriteLine("Testing Converts between UInt64 and UInt32 failed");
+                returnVal = Fail;
+            }
+        }
+        
+        for (int i = 0; i < 10; i++)
+        {
+            Vector<UInt32> uint32Vector1 = getRandomVector<UInt32>(uint32s);
+            Vector<UInt32> uint32Vector2 = getRandomVector<UInt32>(uint32s);
+            if (VectorConvertTest.VectorConvertUInt32And16(uint32Vector1, uint32Vector2) != Pass)
+            {
+                Console.WriteLine("Testing Converts between UInt32 and UInt16 failed");
+                returnVal = Fail;
+            }
+        }
+        
+        for (int i = 0; i < 10; i++)
+        {
+            Vector<UInt16> uint16Vector1 = getRandomVector<UInt16>(uint16s);
+            Vector<UInt16> uint16Vector2 = getRandomVector<UInt16>(uint16s);
+            if (VectorConvertTest.VectorConvertUInt16And8(uint16Vector1, uint16Vector2) != Pass)
+            {
+                Console.WriteLine("Testing Converts between UInt16 and Byte failed");
+                returnVal = Fail;
+            }
+        }
+        return returnVal;
+    }
+}
+
diff --git a/tests/src/JIT/SIMD/VectorConvert_r.csproj b/tests/src/JIT/SIMD/VectorConvert_r.csproj
new file mode 100644 (file)
index 0000000..01231e2
--- /dev/null
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <FileAlignment>512</FileAlignment>
+    <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+    <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+    <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+  </PropertyGroup>
+  <!-- Default configurations to help VS understand the configurations -->
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "></PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />
+  <ItemGroup>
+    <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+      <Visible>False</Visible>
+    </CodeAnalysisDependentAssemblyPaths>
+  </ItemGroup>
+  <PropertyGroup>
+    <DebugType>None</DebugType>
+    <Optimize></Optimize>
+  </PropertyGroup>
+  <ItemGroup>
+    <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="VectorConvert.cs" />
+    <Compile Include="VectorUtil.cs" />
+  </ItemGroup>
+  <!--  <PropertyGroup>
+    <ProjectJson>$(JitPackagesConfigFileDirectory)threading+thread\project.json</ProjectJson>
+    <ProjectLockJson>$(JitPackagesConfigFileDirectory)threading+thread\project.lock.json</ProjectLockJson>
+  </PropertyGroup>-->
+  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+  <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' "></PropertyGroup>
+</Project>
\ No newline at end of file
diff --git a/tests/src/JIT/SIMD/VectorConvert_ro.csproj b/tests/src/JIT/SIMD/VectorConvert_ro.csproj
new file mode 100644 (file)
index 0000000..f751b88
--- /dev/null
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <FileAlignment>512</FileAlignment>
+    <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+    <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+    <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+  </PropertyGroup>
+  <!-- Default configurations to help VS understand the configurations -->
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "></PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />
+  <ItemGroup>
+    <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+      <Visible>False</Visible>
+    </CodeAnalysisDependentAssemblyPaths>
+  </ItemGroup>
+  <PropertyGroup>
+    <DebugType>None</DebugType>
+    <Optimize>True</Optimize>
+  </PropertyGroup>
+  <ItemGroup>
+    <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="VectorConvert.cs" />
+    <Compile Include="VectorUtil.cs" />
+  </ItemGroup>
+  <!--  <PropertyGroup>
+    <ProjectJson>$(JitPackagesConfigFileDirectory)threading+thread\project.json</ProjectJson>
+    <ProjectLockJson>$(JitPackagesConfigFileDirectory)threading+thread\project.lock.json</ProjectLockJson>
+  </PropertyGroup>-->
+  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+  <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' "></PropertyGroup>
+</Project>
\ No newline at end of file
index 55cb0a0..1c354b7 100644 (file)
   {
     // Code size       154 (0x9a)
     .maxstack  3
-    .locals init ([0] class [System.Console]System.Exception e)
+    .locals init ([0] class [mscorlib]System.Exception e)
     IL_0000:  ldstr      "Executing Condition18.Test2 - Caller(imperative se"
     + "curity): Arguments: None - ReturnType: 3 byte struct; Callee: Arguments"
     + ": None - ReturnType: 3 byte struct"
index 3e35252..179b052 100644 (file)
@@ -91,8 +91,6 @@ public class Driver<K, V>
         ConditionalWeakTable<K,V> tbl = new ConditionalWeakTable<K,V>();
 
         // Try to remove key from an empty dictionary
-        Random r = new Random();
-
         // Remove should return false
         Test.Eval(!tbl.Remove(keys[0]), "Err_005 Expected Remove to return false");
 
@@ -147,7 +145,6 @@ public class Driver<K, V>
 
         // Try to get non existing key
         // TryGetValue should return false and value should contian default(TValue)
-        Random r = new Random();
         Test.Eval(!tbl.TryGetValue(key, out val), "Err_011 Expected TryGetValue to return false");
         Test.Eval(val == null, "Err_012 Expected val to be null");
     }