Move Decimal to shared by pentp · Pull Request #18948 · dotnet/coreclr (original) (raw)
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Conversation10 Commits3 Checks0 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
This is the minimum set of changes required to move decimal to a fully managed implementation shared with CoreRT. Fixes #18249.
Managed decimal performance work over the last year has made it at least as fast as the native implementation, often much faster.
pentp mentioned this pull request
How good is the code coverage of the managed implementation with our Corefx test bed?
I've been adding new tests also while doing the perf work so the coverage should be pretty good.
throw new SerializationException(SR.Overflow_Decimal, e); |
---|
} |
if (!IsValid(flags)) |
throw new SerializationException(SR.Overflow_Decimal); |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will throw exception without the inner exception now. Does it matter?
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From an API compatibility perspective it doesn't matter.
Human readability of the exception is somewhat misleading either way (the inner exception was "Decimal byte array constructor requires an array of length four containing valid decimal bytes.").
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
@@ -1278,6 +1277,7 @@ STRINGREF NumberToString(NUMBER* number, wchar format, int nMaxDigits, NUMFMTREF |
---|
*/ |
_ASSERTE(numfmt != NULL); |
_ASSERTE(!bDecimal); |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete the bDecimal
argument instead?
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this entire function (and many others) from number.cpp are not actually used anymore, but I didn't want to include that clean-up here.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. Cleaning this up can be follow up PR.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you a lot for your persistence to make this happen!
pentp deleted the SharedDecimal branch
@Anipik The mirror is not picking up this change. Could you please take a look?
pentp mentioned this pull request
dotnet-maestro-bot pushed a commit to dotnet-maestro-bot/corefx that referenced this pull request
Move Decimal to shared
Remove DecimalCanonicalize{Internal}
Signed-off-by: dotnet-bot dotnet-bot@microsoft.com
dotnet-maestro-bot pushed a commit to dotnet-maestro-bot/corert that referenced this pull request
Move Decimal to shared
Remove DecimalCanonicalize{Internal}
Signed-off-by: dotnet-bot dotnet-bot@microsoft.com
stephentoub pushed a commit to dotnet/corefx that referenced this pull request
Move Decimal to shared
Remove DecimalCanonicalize{Internal}
Signed-off-by: dotnet-bot dotnet-bot@microsoft.com
jkotas pushed a commit to dotnet/corert that referenced this pull request
Move Decimal to shared
Remove DecimalCanonicalize{Internal}
Signed-off-by: dotnet-bot dotnet-bot@microsoft.com