Skip to content

Instantly share code, notes, and snippets.

View K2's full-sized avatar
💭
Building a better mouse trap. 💯

K2 K2

💭
Building a better mouse trap. 💯
View GitHub Profile
@mattwarren
mattwarren / StringCtorMethodMappingsInTheCLR
Last active October 14, 2017 00:57
How String ctor method calls are mapped in the CLR
String ctor - String(char *value);
---------------------------------------------------------------------------
Definition - https://github.com/dotnet/coreclr/blob/master/src/mscorlib/src/System/String.cs#L1323
Lookup pt1 - https://github.com/dotnet/coreclr/blob/master/src/vm/ecalllist.h#L215
Lookup pt2 - https://github.com/dotnet/coreclr/blob/master/src/vm/ecall.cpp#L42
Lookup pt3 - https://github.com/dotnet/coreclr/blob/master/src/vm/ecall.cpp#L34
Mapping - https://github.com/dotnet/coreclr/blob/master/src/vm/mscorlib.h#L1510
CtorCharArray impl - https://github.com/dotnet/coreclr/blob/master/src/mscorlib/src/System/String.cs#L1533-L1547
String ctor - String(sbyte *value, int startIndex, int length, Encoding enc)