summaryrefslogtreecommitdiff
path: root/src/classlibnative/bcltype
AgeCommit message (Collapse)AuthorFilesLines
2018-06-27Optimize Array.Clear using SpanHelpers (#18101)Jan Kotas2-33/+11
Reimplement most of Array.Clear in managed code using Span Clear helpers. Fixes dotnet/corefx#29848
2018-04-04[x86/Linux] Fix COMNumber::DoubleToNumberFC arguments order (#17412)Konstantin Baladurin2-2/+2
We should use FCDECL3_VII/FCIMPL3_VII instead of FCDECL3/FCIMPL3 otherwise we got incorrect order of arguments that leads to crashes.
2018-03-27Failfast windows event log (#16875)Sung Yoon Whang1-1/+1
* Add FailFast error log to Windows Event Log * change const wchar * to lpcwstr * Enable sending unhandled exception info to Windows Event Log * Change log format to match console output and address PR comments * Remove more comments * Change the order DoReportForUnhandledException to do a safety check first before calling managed code * Fix parameter name in header file * Add Windows Event logging in DefaultCatchHandler and remove DoReportForUnhandledException * Add back event reporting for ignored unhandled exception cases, fix broken UNIX builds * Fix more broken unix builds * Fix typo * Address PR comments
2018-03-27Vectorized SequenceCompareTo for Span<char> (#17237)Jan Kotas1-38/+0
- This change makes the compare for very short Span strings a bit slower and for longer Span strings many times faster. - Switch several places where it was a clear benefit to use it. `String.CompareOrdinal(string,string)` is notable exception that I have left intact for now. It is fine tuned for current string layout, and replacing with a call of vectorized SequenceCompareTo gives mixed results.
2018-03-19Switch over to managed Marvin implementation for string hashing (#17029)Jan Kotas2-28/+0
2018-03-09Log inner exceptions for Environment.Failfast (#16622)Sung Yoon Whang1-1/+9
* Add inner exception log to failfast * cleanup * Address PR comments * Address more GC hole issue * address more PR comments
2018-03-08Move String to shared corelib partition (#16749)Jan Kotas2-118/+0
2018-02-28Add Thread.GetCurrentProcessorId() API (#16650)Jan Kotas2-10/+0
Contributes to https://github.com/dotnet/corefx/issues/16767
2018-02-17delete unused mirror files (#16423)Sergey Andreenko1-1/+0
2018-02-05Reimplement string.Replace in managed code (#16214)Jan Kotas2-140/+0
2018-02-03Fix failfast stacktrace (#15895)Sung Yoon Whang2-6/+43
* attempt to fix stacktrace getting printed twice * Fix some default parameter issues, and wrong commit from last commit * Fix build errors, switch call from Debug.Assert to new FailFast FCall * Fix signature to allow more types of exception title * cleanup * Addressing comments from PR * More PR comments * remove useless using * Address comments on GC hole and few naming changes
2018-01-29Added Grisu3 algorithm support for double.ToString(). (#14646)Jingyu Ma7-64/+817
* Added Grisu3 algorithm support for double.ToString(). - Implemented Grisu3 algorithm. - When calling double.ToString(), try Grisu3 first, if it fails, fall back to Dragon4. Fix #14478 * Added comments. Fixed a minor bug. * Optimized the performance in DigitGen. * Added shortcut for numbers without fraction. * Updated according to the review comments. Added more comments. Changed the value of D_1_LOG2_10
2017-11-28Address PR feedbackStephen Toub2-9/+11
- Simplify FCALL signatures - Simplify mantissa logic copied from corert
2017-11-28Move FormatDouble/Single to managed codeStephen Toub2-231/+6
Instead of making fcalls to FormatDouble and FormatSingle, move them to managed, and use fcalls for the DoubleToNumber and NumberToDouble they call, shifting down the layer that's implemented in native. This allows us to then much more easily add TryFormat methods for double and float while also sharing more code between coreclr and corert, from which the managed implementations were taken (they're a direct port of these native implementations from coreclr). In the process, I also eliminated one fcall that can be implemented in managed easily. The remaining fcalls are more substantial and will eventually require more effort to bring to managed.
2017-11-22Add Decimal.TryFormat span-based method (#15145)Stephen Toub4-68/+0
* Move decimal formatting to managed code - Move decimal formatting to shared (decimal itself is still not shared) - Delete VM's decimal formatting code * Add Decimal.TryFormat span-based method * Workaround ProjectN compiler bug Apply the same attribution that's applied to the code in corert. * Address PR feedback * Temporarily undo explicit layout change Seeing whether it's the cause of these failures on Unix (Ubuntu, CentOS, and OSX): ``` JIT.Directed.coverage.oldtests.lclfldadd_cs_r.lclfldadd_cs_r JIT.Directed.perffix.primitivevt.mixed1_cs_ro.mixed1_cs_ro JIT.Methodical.fp.exgen.1000w1d_cs_r.1000w1d_cs_r JIT.Methodical.fp.exgen.1000w1d_cs_ro.1000w1d_cs_ro JIT.Methodical.fp.exgen.1000w1d_cs_do.1000w1d_cs_do JIT.Methodical.fp.exgen.1000w1d_cs_d.1000w1d_cs_d JIT.Methodical.fp.exgen.10w5d_cs_d.10w5d_cs_d JIT.Methodical.fp.exgen.10w5d_cs_do.10w5d_cs_do JIT.Methodical.fp.exgen.10w5d_cs_ro.10w5d_cs_ro JIT.Methodical.fp.exgen.200w1d-02_cs_do.200w1d-02_cs_do JIT.Methodical.fp.exgen.10w5d_cs_r.10w5d_cs_r JIT.Methodical.fp.exgen.200w1d-02_cs_ro.200w1d-02_cs_ro JIT.Directed.perffix.primitivevt.mixed1_cs_do.mixed1_cs_do ``` Example failure: ``` FAILED - JIT/Methodical/fp/exgen/200w1d-02_cs_ro/200w1d-02_cs_ro.sh BEGIN EXECUTION /mnt/j/workspace/dotnet_coreclr/master/checked_ubuntu_tst_prtest/bin/tests/Windows_NT.x64.Checked/Tests/coreoverlay/corerun 200w1d-02_cs_ro.exe Unhandled Exception: System.OverflowException: Value was either too large or too small for an Int32. at System.Convert.ThrowInt32OverflowException() at System.Convert.ToInt32(Int64 value) at testout1.Func_0() at testout1.Main() ./200w1d-02_cs_ro.sh: line 243: 101339 Aborted (core dumped) $_DebuggerFullPath "$CORE_ROOT/corerun" $ExePath $CLRTestExecutionArguments Expected: 100 Actual: 134 END EXECUTION - FAILED ```
2017-11-18Remove now dead code from managed parsing/formatting.Stephen Toub2-562/+0
- Remove dead "bigNumber" code. - Remove custom wcslen function. Use String's. - Delete dead fcalls from runtime. FormatInt32, FormatUInt32, FormatInt64, and FormatUInt64 are no longer needed. Delete them and many of the helpers used only by them.
2017-10-24Delete dead code (#14673)Jan Kotas2-45/+0
- assemblyusagelog - compatibilityflags - xmlparser
2017-10-18Use ascii * instead of Chinese * character. (#14584)Jim Ma1-3/+3
Currently we have Chinese `*` characters at `src\classlibnative\bcltype\number.cpp` L289-294. That would cause a `C4819: Non-ASCII character in source` warning when building on Windows via Visual Studio (version: 15.4.0 (msvc 19.11.25547)). This PR replaces the Chinese * characters with ascii *. Fix #14556
2017-10-06Delete dead code (#14365)Jan Kotas1-10/+0
Delete some dead code related to Windows Phone and code access security
2017-10-04Move String.Searching.cs to shared CoreLib partition (dotnet/corert#4673)Jan Kotas2-236/+0
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
2017-10-02Workaround GetSystemTimePreciseAsFileTime inaccuracies (#14283)Stephen Toub1-0/+27
* Workaround GetSystemTimePreciseAsFileTime inaccuracies On misconfigured systems, GetSystemTimePreciseAsFileTime may drift quickly from GetSystemTimeAsFileTime. We want to use the former, though. As a workaround/heuristic, when checking whether we have GetSystemTimePreciseAsFileTime, invoke both and ensure they're "close", falling back to GetSystemTimeAsFileTime if it seems like the precise variant has run away. * Update comment
2017-09-13Fix ARM build break (#13932)Jan Kotas1-1/+1
2017-09-12Re-implemented the ecvt function. (#12894)Jim Ma5-8/+1041
* Re-implemented the ecvt function. Instead of leveraging snprintf, re-implement the ecvt function according to the paper: https://www.cs.indiana.edu/~dyb/pubs/FP-Printing-PLDI96.pdf Note: 1. This commit won't fix any existing bug. 2. This is a raw implementation of the paper. The performance on Linux only gain 10%. We could tune the performance further. Fix #10651 * Resolve a cross platform header file issue. Fix #10651 * Fixed a minor bug. Improved the performance. Fix #10651 * Modified code according to code review feedback. This commit fixed most of the issue found in code review. However, some of the feedback may not be involved due to either little performance improvement or need a POC. Fix #10651 * Try to fix constexpr compile error on Windows. Fix #10651 * Fixed a potential overflow bug in BigNum::Compare. Fix #10651 * Improved multiply 10 operation. Use shift and add operation to replace actual multiply operation. Fix #10651 * Remove old _ecvt function. Fix #10651 * Documented the reason why we do not need m+ and m-. Fix #10651 * Changed exp > 0 to exp != 0 to remove any confusion. exp should fall in 1 ~ 2046 for normalized value. Denormalized value has exp = 0. Fix #10651 * Disable the _ecvt tests. Fix #10651 * Removed _ecvt tests. Fix #10651 * Re-implemented LogBase2. Fix #10651 * Use DWORD and DWORD64 for _BitScanReverse and _BitScanReverse64 Fix #10651 * Fixed x86 compile issue for _BitScanReverse64 x86 does not support _BitScanReverse64 so we have to add additional shift operations to handle it. Fix #10651 * Implemented BitScanReverse64 and BitScanReverse in pal.h Fix #10651 * Remove the confusion comment which is unrelated to BitScanReverse. Fix #10651 * Introduced wmemset to enhance the perf for 0.0 Fix #10651 * Improved the performance of converting 0.0. Fix #10651 * Renamed ecvt to DoubleToNumberWorker. Fix #10651 * Updated code according to the code review feedback. Fix #10651
2017-08-27Remove always defined FEATURE_RANDOMIZE_STRING_HASHING define (#13491)Dan Moseley2-23/+3
* Remove always defined FEATURE_RANDOMIZE_STRING_HASHING * Fully remove randomized hashing * Leftovers * Remove additionalEntropy from HashSortKey as it was always 0 * Remove additionalEntropy from HashString as it was always 0 * Change to private, as not in fact called by reflection in .NET Core * Fix build break due to FCDECLn * Revert removed QCALL * Remove unused strlen parameter
2017-08-08Improve performance of string.IndexOfAny for 2 & 3 char searches (#13219)Bruce Bowyer-Smyth1-14/+16
2017-08-07Cleanup code access security from the unmanaged runtime (#13241)Jan Kotas1-2/+0
2017-07-21Add CGroup CFS CPU limit support (#12797)Guillaume B1-0/+7
2017-05-17Finish deleting dead CAS code from CoreLib (#11436)Jan Kotas3-103/+0
Fixes #9321 and deletes CleanupToDoList.cs Delete unmanaged security implementation
2017-04-27Allow conversions between enum and underlying typeJan Kotas1-14/+10
Fixes https://github.com/dotnet/corefx/issues/13816
2017-04-17Improve performance of Object.GetType for arrays (#10992)Jan Kotas1-6/+0
* Improve performance of Object.GetType for arrays Cache managed Type object on MethodTable for arrays. Makes Object.GetType for arrays about 5x faster.
2017-04-14[x86/Linux] Use appropriate FCALL macro for DoToDecimal (#10963)Jonghyun Park2-2/+2
2017-03-311. Remove disable of C4996Rahul Kumar2-94/+0
2. delete some dead code 3. Remove implementation of GetOSVersion and hardcode OS version to be 0.0.0 4. Add implementation of IsWindows8OrAbove & IsWinrtSupported (donno why this was deleted earlier) 5. remove GetVersionEx from PAL
2017-03-29[x86/Linux] Use Portable ArrayInitializeWorker (#10550)Jonghyun Park1-3/+3
2017-03-24Rename resource strings to match resx (#10475)Dan Moseley1-2/+2
2017-03-09Improve span copy of pointers and structs containing pointers (#9999)Koundinya Veluri2-67/+338
Improve span copy of pointers and structs containing pointers Fixes #9161 PR #9786 fixes perf of span copy of types that don't contain references
2017-02-23Use GetSystemTimePreciseAsFileTime if available in DateTime.UtcNow (#9736)Stephen Toub1-2/+25
2017-02-14Remove never defined FEATURE_REMOTINGdanmosemsft1-11/+0
2017-02-12Remove never defined FEATURE_FUSIONdanmosemsft1-17/+0
2017-02-10Remove always defined FEATURE_CORECLRdanmosemsft6-266/+0
2017-02-06CAS Security cleanup (#9355)Jan Kotas3-198/+0
2017-01-30Merge pull request #9117 from jamesqo/copy.namesDan Moseley1-5/+5
Fix parameter names for Array.Copy
2017-01-25Use FCThrowArgumentVoidJames Ko1-2/+2
2017-01-25Fix parameter names for Array.CopyJames Ko1-3/+3
2017-01-06[Local GC] Move Software Write Watch's write barrier updates to ↵Sean Gillespie1-1/+1
GCToEEInterface::StompWriteBarrier (#8605) * Move Software Write Watch's write barrier updates to use the new GCToEEInterface::StompWriteBarrier to stomp the EE's write barrier. * Address code review feedback, move SetCardsAfterBulkCopy to EE side of the interface
2016-12-26Remove files related to legacy build system (#8723)Robert1-47/+0
2016-12-21Remove FEATURE_BLC_FORMATTING (#8699)Jan Vorlicek2-430/+43
This feature is always defined and the PAL functions that would be used if the feature was not defined are not in PAL anymore.
2016-12-04[x86/Linux] Fix dangling DoubleToNumber and NumberToDouble (#8446)Jonghyun Park1-3/+3
This commit enables portable DoubleToNumber and NumberToDouble for x86/Linux.
2016-11-30Merge pull request #8209 from stephentoub/arraypool_perfJan Kotas2-0/+11
Improve ArrayPool implementation and performance
2016-11-30Declare CtorFtnType only when it is used (#8378)Jonghyun Park1-1/+1
2016-11-28Make GetCurrentProcessorNumber an FCallStephen Toub2-0/+11