Move FormatDouble/Single to managed code
authorStephen Toub <stoub@microsoft.com>
Tue, 28 Nov 2017 16:48:37 +0000 (11:48 -0500)
committerStephen Toub <stoub@microsoft.com>
Wed, 29 Nov 2017 02:30:05 +0000 (21:30 -0500)
commit45f1a4ff3c496e7a9814cff7d3b1b1a97d61650e
tree55f63d34f109ad48afd8f07036336f6270c41495
parent39e99cabf31a89624c40b718ba2faf9829ab2455
Move FormatDouble/Single to managed code

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.
src/classlibnative/bcltype/number.cpp
src/classlibnative/bcltype/number.h
src/mscorlib/shared/System/Number.Formatting.cs
src/mscorlib/shared/System/Number.Parsing.cs
src/mscorlib/src/System/Number.CoreCLR.cs
src/vm/ecalllist.h