Skip to content

Commit f139911

Browse files
committed
[MERGE #5787 @Cellule] Merge changes from Windows 1809 October Update
Merge pull request #5787 from Cellule:1809_october
2 parents f40b55c + f5492fe commit f139911

File tree

146 files changed

+2443
-885
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+2443
-885
lines changed

Build/Common.Build.Default.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<NtTargetVersion_Win8 >0x602</NtTargetVersion_Win8>
77
<NtTargetVersion_WinBlue>0x603</NtTargetVersion_WinBlue>
88
<NtTargetVersion_Win10>0xA00</NtTargetVersion_Win10>
9+
<NtTargetVersion_Latest>$(NtTargetVersion_Win10)</NtTargetVersion_Latest>
910
</PropertyGroup>
1011

1112
<!-- Auto tool set selection -->

bin/GCStress/StubExternalApi.cpp

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,9 @@ bool GetDeviceFamilyInfo(
8282
void
8383
ChakraBinaryAutoSystemInfoInit(AutoSystemInfo * autoSystemInfo)
8484
{
85-
ULONGLONG UAPInfo;
86-
ULONG DeviceFamily;
87-
ULONG DeviceForm;
88-
if (GetDeviceFamilyInfo(&UAPInfo, &DeviceFamily, &DeviceForm))
89-
{
90-
bool isMobile = (DeviceFamily == 0x00000004 /*DEVICEFAMILYINFOENUM_MOBILE*/);
91-
autoSystemInfo->shouldQCMoreFrequently = isMobile;
92-
autoSystemInfo->supportsOnlyMultiThreadedCOM = isMobile; //TODO: pick some other platform to the list
93-
autoSystemInfo->isLowMemoryDevice = isMobile; //TODO: pick some other platform to the list
94-
}
85+
autoSystemInfo->shouldQCMoreFrequently = false;
86+
autoSystemInfo->supportsOnlyMultiThreadedCOM = false; //TODO: pick some other platform to the list
87+
autoSystemInfo->isLowMemoryDevice = false; //TODO: pick some other platform to the list
9588
}
9689

9790
enum MemProtectHeapCollectFlags {};

bin/NativeTests/CodexTests.cpp

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,16 @@ namespace CodexTest
3636
//
3737
TEST_CASE("CodexTest_EncodeTrueUtf8_SingleSurrogates", "[CodexTest]")
3838
{
39-
const charcount_t charCount = 1;
40-
utf8char_t encodedBuffer[(charCount + 1) * 3]; // +1 since the buffer will be null-terminated
39+
const size_t charCount = 1;
40+
constexpr size_t cbEncodedBuffer = charCount * 3 + 1; // +1 since the buffer will be null-terminated
41+
utf8char_t encodedBuffer[cbEncodedBuffer];
4142

4243
char16 testValues[] = { 0xD800, 0xDB7F, 0xDB80, 0xDBFF, 0xDC00, 0xDF80, 0xDFFF };
4344
const int numTestCases = _countof(testValues);
4445

4546
for (int i = 0; i < numTestCases; i++)
4647
{
47-
size_t numEncodedBytes = utf8::EncodeTrueUtf8IntoAndNullTerminate(encodedBuffer, &testValues[i], charCount);
48+
size_t numEncodedBytes = utf8::EncodeIntoAndNullTerminate<utf8::Utf8EncodingKind::TrueUtf8>(encodedBuffer, cbEncodedBuffer, &testValues[i], charCount);
4849
CHECK(numEncodedBytes == 3);
4950
CheckIsUnicodeReplacementChar(encodedBuffer);
5051
}
@@ -62,11 +63,12 @@ namespace CodexTest
6263
const int numTestCases = _countof(testCases);
6364
const charcount_t charCount = _countof(testCases[0].surrogatePair);
6465
const charcount_t maxEncodedByteCount = _countof(testCases[0].utf8Encoding);
65-
utf8char_t encodedBuffer[maxEncodedByteCount + 1]; // +1 in case a null-terminating func is passed in
66+
const size_t encodedBufferSize = maxEncodedByteCount + 1; // +1 in case a null-terminating func is passed in
67+
utf8char_t encodedBuffer[encodedBufferSize];
6668

6769
for (int i = 0; i < numTestCases; i++)
6870
{
69-
size_t numEncodedBytes = func(encodedBuffer, testCases[i].surrogatePair, charCount);
71+
size_t numEncodedBytes = func(encodedBuffer, encodedBufferSize, testCases[i].surrogatePair, charCount);
7072
CHECK(numEncodedBytes <= maxEncodedByteCount);
7173
for (size_t j = 0; j < numEncodedBytes; j++)
7274
{
@@ -106,7 +108,7 @@ namespace CodexTest
106108
{ { 0xDBFF, 0xDFFF }, { 0xED, 0xAF, 0xBF, 0xED, 0xBF, 0xBF } } // U+10FFFF
107109
};
108110

109-
RunUtf8EncodingTestCase(testCases, static_cast<size_t (*)(utf8char_t*, const char16*, charcount_t)>(utf8::EncodeInto));
111+
RunUtf8EncodingTestCase(testCases, static_cast<size_t (*)(utf8char_t*, size_t, const char16*, charcount_t)>(utf8::EncodeInto<utf8::Utf8EncodingKind::Cesu8>));
110112
}
111113

112114
TEST_CASE("CodexTest_EncodeUtf8_PairedSurrogates", "[CodexTest]")
@@ -132,7 +134,7 @@ namespace CodexTest
132134
{ { 0xDBFF, 0xDFFF }, { 0xF4, 0x8F, 0xBF, 0xBF } } // U+10FFFF
133135
};
134136

135-
RunUtf8EncodingTestCase(testCases, utf8::EncodeTrueUtf8IntoAndNullTerminate);
137+
RunUtf8EncodingTestCase(testCases, utf8::EncodeIntoAndNullTerminate<utf8::Utf8EncodingKind::TrueUtf8>);
136138
}
137139

138140
TEST_CASE("CodexTest_EncodeUtf8_NonCharacters", "[CodexTest]")
@@ -151,7 +153,7 @@ namespace CodexTest
151153
{ { 0xFFFF }, { 0xEF, 0xBF, 0xBF } } // U+FFFF
152154
};
153155

154-
RunUtf8EncodingTestCase(testCases, utf8::EncodeTrueUtf8IntoAndNullTerminate);
156+
RunUtf8EncodingTestCase(testCases, utf8::EncodeIntoAndNullTerminate<utf8::Utf8EncodingKind::TrueUtf8>);
155157
}
156158

157159
TEST_CASE("CodexTest_EncodeUtf8_BoundaryChars", "[CodexTest]")
@@ -180,8 +182,8 @@ namespace CodexTest
180182
{ { 0xDBFF, 0xDFFF }, { 0xF4, 0x8F, 0xBF, 0xBF } } // U+10FFFF
181183
};
182184

183-
RunUtf8EncodingTestCase(testCases, utf8::EncodeTrueUtf8IntoAndNullTerminate);
184-
RunUtf8EncodingTestCase(testCases2, utf8::EncodeTrueUtf8IntoAndNullTerminate);
185+
RunUtf8EncodingTestCase(testCases, utf8::EncodeIntoAndNullTerminate<utf8::Utf8EncodingKind::TrueUtf8>);
186+
RunUtf8EncodingTestCase(testCases2, utf8::EncodeIntoAndNullTerminate<utf8::Utf8EncodingKind::TrueUtf8>);
185187
}
186188

187189
TEST_CASE("CodexTest_EncodeUtf8_SimpleCharacters", "[CodexTest]")
@@ -201,15 +203,16 @@ namespace CodexTest
201203
{ { 0x20AC }, { 0xE2, 0x82, 0xAC } } // U+20AC - Euro symbol
202204
};
203205

204-
RunUtf8EncodingTestCase(testCases, utf8::EncodeTrueUtf8IntoAndNullTerminate);
206+
RunUtf8EncodingTestCase(testCases, utf8::EncodeIntoAndNullTerminate<utf8::Utf8EncodingKind::TrueUtf8>);
205207
}
206208

207209
TEST_CASE("CodexTest_EncodeTrueUtf8_SimpleString", "[CodexTest]")
208210
{
209211
const charcount_t charCount = 3;
210-
utf8char_t encodedBuffer[(charCount + 1) * 3]; // +1 since the buffer will be null terminated
212+
constexpr size_t cbEncodedBuffer = charCount * 3 + 1; // +1 since the buffer will be null terminated
213+
utf8char_t encodedBuffer[cbEncodedBuffer];
211214
const char16* sourceBuffer = L"abc";
212-
size_t numEncodedBytes = utf8::EncodeTrueUtf8IntoAndNullTerminate(encodedBuffer, sourceBuffer, charCount);
215+
size_t numEncodedBytes = utf8::EncodeIntoAndNullTerminate<utf8::Utf8EncodingKind::TrueUtf8>(encodedBuffer, cbEncodedBuffer, sourceBuffer, charCount);
213216
CHECK(numEncodedBytes == charCount);
214217
for (int i = 0; i < charCount; i++)
215218
{

bin/rl/rl.vcxproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<Import Condition="'$(ChakraBuildPathImported)'!='true'" Project="$(SolutionDir)Chakra.Build.Paths.props" />
44
<Import Project="$(BuildConfigPropsPath)Chakra.Build.ProjectConfiguration.props" />
@@ -9,6 +9,7 @@
99
<PropertyGroup Label="Configuration">
1010
<TargetName>rl</TargetName>
1111
<ConfigurationType>Application</ConfigurationType>
12+
<UseUniCrt>false</UseUniCrt>
1213
</PropertyGroup>
1314
<Import Project="$(BuildConfigPropsPath)Chakra.Build.Default.props" />
1415
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />

0 commit comments

Comments
 (0)