diff options
author | Stephen Toub <stoub@microsoft.com> | 2017-07-28 12:00:09 -0400 |
---|---|---|
committer | Stephen Toub <stoub@microsoft.com> | 2017-07-28 12:00:09 -0400 |
commit | 5f2fb65bcf76354ea6ec43c00714e230378d4e4d (patch) | |
tree | 9a3f408a43ff9dcf5d96a4d144a668d1e663df35 /src/vm | |
parent | 045335bb661be28cbdffa3b1e2d8ccbc2667fd58 (diff) | |
download | coreclr-5f2fb65bcf76354ea6ec43c00714e230378d4e4d.tar.gz coreclr-5f2fb65bcf76354ea6ec43c00714e230378d4e4d.tar.bz2 coreclr-5f2fb65bcf76354ea6ec43c00714e230378d4e4d.zip |
Add String(ReadOnlySpan<char>) ctor
Diffstat (limited to 'src/vm')
-rw-r--r-- | src/vm/ecall.cpp | 4 | ||||
-rw-r--r-- | src/vm/ecall.h | 1 | ||||
-rw-r--r-- | src/vm/ecalllist.h | 1 | ||||
-rw-r--r-- | src/vm/metasig.h | 2 | ||||
-rw-r--r-- | src/vm/mscorlib.h | 1 |
5 files changed, 8 insertions, 1 deletions
diff --git a/src/vm/ecall.cpp b/src/vm/ecall.cpp index f3b0099e57..97255e15a1 100644 --- a/src/vm/ecall.cpp +++ b/src/vm/ecall.cpp @@ -36,6 +36,7 @@ static_assert_no_msg(METHOD__STRING__CTORF_FIRST + 1 == METHOD__STRING__CTORF_CH static_assert_no_msg(METHOD__STRING__CTORF_FIRST + 2 == METHOD__STRING__CTORF_CHAR_COUNT); static_assert_no_msg(METHOD__STRING__CTORF_FIRST + 3 == METHOD__STRING__CTORF_CHARPTR); static_assert_no_msg(METHOD__STRING__CTORF_FIRST + 4 == METHOD__STRING__CTORF_CHARPTR_START_LEN); +static_assert_no_msg(METHOD__STRING__CTORF_FIRST + 5 == METHOD__STRING__CTORF_READONLYSPANOFCHAR); // ECall::CtorCharXxx has to be in same order as METHOD__STRING__CTORF_XXX #define ECallCtor_First ECall::CtorCharArrayManaged @@ -44,8 +45,9 @@ static_assert_no_msg(ECallCtor_First + 1 == ECall::CtorCharArrayStartLengthManag static_assert_no_msg(ECallCtor_First + 2 == ECall::CtorCharCountManaged); static_assert_no_msg(ECallCtor_First + 3 == ECall::CtorCharPtrManaged); static_assert_no_msg(ECallCtor_First + 4 == ECall::CtorCharPtrStartLengthManaged); +static_assert_no_msg(ECallCtor_First + 5 == ECall::CtorReadOnlySpanOfCharManaged); -#define NumberOfStringConstructors 5 +#define NumberOfStringConstructors 6 void ECall::PopulateManagedStringConstructors() { diff --git a/src/vm/ecall.h b/src/vm/ecall.h index c4fed1ff42..26fa9eb478 100644 --- a/src/vm/ecall.h +++ b/src/vm/ecall.h @@ -110,6 +110,7 @@ class ECall DYNAMICALLY_ASSIGNED_FCALL_IMPL(CtorCharCountManaged, NULL) \ DYNAMICALLY_ASSIGNED_FCALL_IMPL(CtorCharPtrManaged, NULL) \ DYNAMICALLY_ASSIGNED_FCALL_IMPL(CtorCharPtrStartLengthManaged, NULL) \ + DYNAMICALLY_ASSIGNED_FCALL_IMPL(CtorReadOnlySpanOfCharManaged, NULL) \ DYNAMICALLY_ASSIGNED_FCALL_IMPL(InternalGetCurrentThread, NULL) \ enum diff --git a/src/vm/ecalllist.h b/src/vm/ecalllist.h index 13cd6d58df..5bac53635d 100644 --- a/src/vm/ecalllist.h +++ b/src/vm/ecalllist.h @@ -109,6 +109,7 @@ FCFuncStart(gStringFuncs) FCDynamicSig(COR_CTOR_METHOD_NAME, &gsig_IM_PtrChar_RetVoid, CORINFO_INTRINSIC_Illegal, ECall::CtorCharPtrManaged) FCDynamicSig(COR_CTOR_METHOD_NAME, &gsig_IM_PtrChar_Int_Int_RetVoid, CORINFO_INTRINSIC_Illegal, ECall::CtorCharPtrStartLengthManaged) FCDynamicSig(COR_CTOR_METHOD_NAME, &gsig_IM_Char_Int_RetVoid, CORINFO_INTRINSIC_Illegal, ECall::CtorCharCountManaged) + FCDynamicSig(COR_CTOR_METHOD_NAME, &gsig_IM_ReadOnlySpanOfChar_RetVoid, CORINFO_INTRINSIC_Illegal, ECall::CtorReadOnlySpanOfCharManaged) FCFuncElementSig(COR_CTOR_METHOD_NAME, &gsig_IM_PtrSByt_RetVoid, COMString::StringInitCharPtr) FCFuncElementSig(COR_CTOR_METHOD_NAME, &gsig_IM_PtrSByt_Int_Int_RetVoid, COMString::StringInitCharPtrPartial) FCFuncElementSig(COR_CTOR_METHOD_NAME, &gsig_IM_PtrSByt_Int_Int_Encoding_RetVoid, COMString::StringInitSBytPtrPartialEx) diff --git a/src/vm/metasig.h b/src/vm/metasig.h index f8d9cfe5e1..9a037aa3e0 100644 --- a/src/vm/metasig.h +++ b/src/vm/metasig.h @@ -387,6 +387,7 @@ DEFINE_METASIG(IM(Bool_Bool_RetStr, F F, s)) DEFINE_METASIG(IM(PtrChar_RetVoid, P(u), v)) DEFINE_METASIG(IM(PtrChar_Int_Int_RetVoid, P(u) i i, v)) +DEFINE_METASIG_T(IM(ReadOnlySpanOfChar_RetVoid, GI(g(READONLY_SPAN), 1, u), v)) DEFINE_METASIG(IM(PtrSByt_RetVoid, P(B), v)) DEFINE_METASIG(IM(PtrSByt_Int_Int_RetVoid, P(B) i i, v)) DEFINE_METASIG_T(IM(PtrSByt_Int_Int_Encoding_RetVoid, P(B) i i C(ENCODING), v)) @@ -398,6 +399,7 @@ DEFINE_METASIG(IM(ArrChar_Int_Int_RetStr, a(u) i i, s)) DEFINE_METASIG(IM(Char_Int_RetStr, u i, s)) DEFINE_METASIG(IM(PtrChar_RetStr, P(u), s)) DEFINE_METASIG(IM(PtrChar_Int_Int_RetStr, P(u) i i, s)) +DEFINE_METASIG_T(IM(ReadOnlySpanOfChar_RetStr, GI(g(READONLY_SPAN), 1, u), s)) DEFINE_METASIG(IM(Obj_Int_RetIntPtr, j i, I)) DEFINE_METASIG(IM(Char_Char_RetStr, u u, s)) diff --git a/src/vm/mscorlib.h b/src/vm/mscorlib.h index a9574213af..1753149a0e 100644 --- a/src/vm/mscorlib.h +++ b/src/vm/mscorlib.h @@ -881,6 +881,7 @@ DEFINE_METHOD(STRING, CTORF_CHARARRAY_START_LEN,CtorCharArrayStart DEFINE_METHOD(STRING, CTORF_CHAR_COUNT, CtorCharCount, IM_Char_Int_RetStr) DEFINE_METHOD(STRING, CTORF_CHARPTR, CtorCharPtr, IM_PtrChar_RetStr) DEFINE_METHOD(STRING, CTORF_CHARPTR_START_LEN,CtorCharPtrStartLength, IM_PtrChar_Int_Int_RetStr) +DEFINE_METHOD(STRING, CTORF_READONLYSPANOFCHAR,CtorReadOnlySpanOfChar, IM_ReadOnlySpanOfChar_RetStr) DEFINE_METHOD(STRING, INTERNAL_COPY, InternalCopy, SM_Str_IntPtr_Int_RetVoid) DEFINE_METHOD(STRING, WCSLEN, wcslen, SM_PtrChar_RetInt) DEFINE_PROPERTY(STRING, LENGTH, Length, Int) |