Last active
October 14, 2017 00:57
-
-
Save mattwarren/bdb14bf0a87f6b24d338 to your computer and use it in GitHub Desktop.
How String ctor method calls are mapped in the CLR
This file contains 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
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) | |
---------------------------------------------------------------------------- | |
Definition - https://github.com/dotnet/coreclr/blob/master/src/mscorlib/src/System/String.cs#L1337 | |
Lookup - https://github.com/dotnet/coreclr/blob/master/src/vm/ecalllist.h#L223 | |
StringInitSBytPtrPartialEx - https://github.com/dotnet/coreclr/blob/master/src/classlibnative/bcltype/stringnative.cpp#L64-L91 | |
CreatString impl - https://github.com/dotnet/coreclr/blob/master/src/mscorlib/src/System/String.cs#L1340-L1366 | |
String ctor - String(sbyte *value) | |
---------------------------------- | |
Definition - https://github.com/dotnet/coreclr/blob/master/src/mscorlib/src/System/String.cs#L1331 | |
Lookup -https://github.com/dotnet/coreclr/blob/master/src/vm/ecalllist.h#L220 | |
COMString::StringInitCharPtr - https://github.com/dotnet/coreclr/blob/master/src/classlibnative/bcltype/stringnative.cpp#L99-L110 | |
StringObject::StringInitCharHelper - https://github.com/dotnet/coreclr/blob/master/src/vm/object.cpp#L2086-L2130 | |
Call to AllocateString https://github.com/dotnet/coreclr/blob/master/src/vm/object.cpp#L2121 | |
AllocateString - https://github.com/dotnet/coreclr/blob/master/src/vm/gchelpers.cpp#L773-L789 | |
JIT Wiring up GenAllocString - https://github.com/dotnet/coreclr/blob/master/src/vm/i386/jitinterfacex86.cpp#L1573 | |
JIT Emitting GenAllocString - https://github.com/dotnet/coreclr/blob/master/src/vm/i386/jitinterfacex86.cpp#L1206-L1305 | |
JIT EmitCore - https://github.com/dotnet/coreclr/blob/master/src/vm/i386/jitinterfacex86.cpp#L575-L717 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
String(char *value)
is implemented by:private String CtorCharArray(char [] value)
String(sbyte *value, int startIndex, int length, Encoding enc)
is implemented by:unsafe static private String CreateString(sbyte *value, int startIndex, int length, Encoding enc)