Age | Commit message (Collapse) | Author | Files | Lines |
|
* diff from just renaming folder mscorlib to System.Private.CoreLib
* Updating build.proj to reflect name change
Fixes: #17905
|
|
Related to #5776
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
This is related to dbcfd2f9d1, but about enums instead of `DateTime`.
Given e.g. a generic method with a parameter `T arg = default(T)`
where `T` is the generic type parameter, if that is instantiated with
some enum as the generic type argument, then querying the default
value of `arg` using `ParameterInfo.[Raw]DefaultValue` will throw a
`FormatException`.
(The use of generics means that the C# compiler always records a
`null` constant in metadata, which isn't usually the case for enums.)
|
|
Commit fceac03e82 removed a test from `TypeBuilder.SetConstantValue`
that is too strict when called from `ParameterBuilder`, but that both
`FieldBuilder` and `EnumBuilder` require. Add the same test back, but
in `FieldBuilder.SetConstant`.
|
|
|
|
* Delete stale PRENET45 conditional code
* Remove ConcurrentDictionary dependency from ConcurrentExclusiveSchedulerPair
|
|
* Speed up Array.Reverse by using ref reassignment
* Optimize MemoryExtensions.Reverse
|
|
Querying the default value of an optional `DateTime` parameter using
`ParameterInfo.DefaultValue` can throw a `FormatException` if that
default value is a null constant in metadata, which is how the C#
compiler encodes a default value of `default(DateTime)`.
This commit fixes that error by adding the proper handling for null
metadata constants with `DateTime` parameters.
|
|
parameters (#17887)
* Add test for dotnet/corefx#26184
The Roslyn C# compiler encodes an optional, value-typed parameter's
default value of `default(TValueType)` as a null reference constant in
metadata. Add a test that verifies that reflection can do the same
using `ParameterBuilder.SetConstant(null)`.
* Always allow ParameterBuilder.SetConstant(null)
* Remove test project as requested in review
These tests move to CoreFX. See dotnet/corefx#29532.
|
|
This change makes the code both smaller and faster. For example, the following is about 1.4x faster with this change:
```
ReadOnlySpan<char> s1 = "Hello world";
ReadOnlySpan<char> s2 = "world";
for (int i = 0; i < 100000000; i++) s1.EndsWith(s2, StringComparison.OrdinalIgnoreCase);
```
Also, I have ported GetCaseCompareOfComparisonCulture code size optimization from #16434 while I was on it because of it fit well with the rest of the changes.
|
|
Use new ref reassignment feature instead
|
|
|
|
Serialable should have been Serializable
publically should have been publicly
|
|
* Clarifying comment on overflow
* Nits
|
|
0 is a valid length.
|
|
|
|
We want to start prototyping Utf8String in CoreFxLab
and for that, we'll need a bare-bones System.Utf8String
class exposed from System.Private.CoreLib.
Unfortunately, CoreLib already has an internal
struct named System.Utf8String. Since it's only
an internal type, we'll exercise eminent domain
on its name now and get these noise changes out of
the way.
|
|
|
|
Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
|
|
* Fix Number.ParseNumber to not assume '\0' at the end of a span
This routine was written for parsing strings, which are implicitly null-terminated, and it doesn't factor in string length but instead uses tricks to exit loops when the next character is null. Now that the routine is also used for spans, this is very problematic, as spans need not be null terminated, and generally aren't when they represent slices, and expecting a null termination like this can result in walking off the end of valid memory.
I would like to see all of this code rewritten to use span. In the interim, though, as a short-term fix I've changed all dereferences of the current position to compare against the length of the span (or, rather, a pointer to the end), and pretend that a null terminator was found if we've hit the end.
* Address PR feedback
|
|
Add portable PDB caching to StackTrace.
This is the mscorlib side of the change.
|
|
This prevents the IL linker from optimizing away some properties/methods
related to tasks that are used by a debugger but are not referenced
anywhere else in coreclr.
This specifically fixes async callstack frames for the xplat C# debugger.
|
|
change in value (#17767)
Fix AsyncLocal<class> changed event to not be raised multiple times for one change in value
Functional fix for https://github.com/dotnet/coreclr/issues/17758
|
|
* Move Hashtable & friends to shared parition
* Move HashHelper serialization logic into its own file
* Remove unchecked keyword in Hashtable
|
|
* Reapply https://github.com/dotnet/coreclr/pull/17639
* tryagain-wip 4/23/2018 7:27:37 AM - Fix Invoke of enum-returning methods
* Assert for refbufargs implying valuetype
* Catch ref to void in managed layer
|
|
|
|
* Preserve pinned flag in {ReadOnly}Memory<T>.Slice
* Address PR feedback.
Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
|
|
(#17709)
Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
|
|
|
|
|
|
Fixes https://github.com/dotnet/corefx/issues/29158
|
|
* Fix reading Time zone rules using Julian days
* Order the condition correctly
* Start searching from month 1 and not 0
* Exclude n Julian format
* fix typo
* Adding the suggested assert
|
|
CAS leftover
|
|
* Enable Invoke and GetValue for ref-returning members
https://github.com/dotnet/corefx/issues/15960
Returned magic object is the object pointed to by
the ref. If the ref is null, NullReferenceException.
* Fix error message
* Found way to reuse InvokeUtil::CreateObject
* Remove comment, BYREF case.
|
|
|
|
* Adding failing string to Boolean and TimeSpan parse failure exceptions
* Avoid boxing char when using TryParse
* Removing unnecessary nameof expression
* Applying review feedback to remove ParseFailureKind from TimeSpanParse
* Added helper methods for TimeSpan parsing
|
|
|
|
* Dict: Use Ref Local Reassignment (C# 7.3)
* Use lang version latest rather than 7.3
|
|
(#17593)
Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
|
|
|
|
* Update KoreanLunisolarCalendar.cs
Corrects two issues with the conversion table for Gregorian to Korean lunisolar dates.
Issue 1: tables use Julian month/day instead of Gregorian month/day for entries prior to 1583.
Lmon and Lday have been converted from Julian month and day to Gregorian month and day for years prior to 1583.
This also required a new value for MIN_GREGORIAN_DAY (now 19) so the minimum date now supported by this class is 19 Feb 0918 Gregorian.
Issue 2: data discrepancy in years 1586, 1587, 1648, 1659, 1692, 1753 and 1754.
Table entries for 1586, 1587, 1648, 1659, 1692, 1753 and 1754 have been corrected to match Korea Astronomy and Space Science In-
stitute (KASI) data. Specifically:
•for years 1587, 1648, and 1754, the first day of year has been corrected
•for years 1586, 1587, 1659, 1692, 1753, and 1754, the lengths of each month have been corrected
Notes
A minor formatting change to the table has been made. The DaysPerMonth flag has been converted to use the binary literal to ensure that changes can be made and verified easily.
See: https://github.com/dotnet/coreclr/issues/17510 for full discussion of changes.
* Update KoreanLunisolarCalendar.cs
Added comment on sources of table data.
|
|
|
|
Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
|
|
|
|
|
|
* Some cleanup for ArrayPool trimming
- fix static names
- make config switch more specific
- tweak tls free logic for logging
* Tweak the name of the config switch
|
|
* Remove MemoryManager.Length
* Feedback
* XML comment nits
|
|
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
|
|
|