Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[corlib] Import System.IO.Stream/BufferedStream from CoreFX #10880

Merged
merged 3 commits into from
Nov 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion external/corert
2 changes: 2 additions & 0 deletions mcs/class/corlib/corefx/SR.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1506,4 +1506,6 @@ partial class SR
public const string ObjectDisposed_RegKeyClosed = "Cannot access a closed registry key.";
public const string PlatformNotSupported_Registry = "Registry is not supported on this platform.";
public const string UnauthorizedAccess_RegistryNoWrite = "Cannot write to the registry key.";
public const string InvalidOperation_WrongAsyncResultOrEndReadCalledMultiple = "Either the IAsyncResult object did not come from the corresponding async method on this type, or EndRead was called multiple times with the same IAsyncResult.";
public const string InvalidOperation_WrongAsyncResultOrEndWriteCalledMultiple = "Either the IAsyncResult object did not come from the corresponding async method on this type, or EndWrite was called multiple times with the same IAsyncResult.";
}
35 changes: 0 additions & 35 deletions mcs/class/corlib/corert/Stream.cs

This file was deleted.

6 changes: 3 additions & 3 deletions mcs/class/corlib/corlib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,7 @@
<Compile Include="..\..\..\external\corefx\src\System.Runtime.Extensions\src\System\Collections\ArrayList.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Runtime.Extensions\src\System\Collections\Hashtable.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Runtime.Extensions\src\System\Collections\IHashCodeProvider.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Runtime.Extensions\src\System\IO\BufferedStream.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Runtime.Extensions\src\System\LoaderOptimization.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Runtime.Extensions\src\System\LoaderOptimizationAttribute.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Runtime.Extensions\src\System\OperatingSystem.cs" />
Expand Down Expand Up @@ -873,6 +874,7 @@
<Compile Include="..\..\..\external\corert\src\Common\src\System\Numerics\Hashing\HashHelpers.cs" />
<Compile Include="..\..\..\external\corert\src\Runtime.Base\src\System\Runtime\InteropServices\GCHandleType.cs" />
<Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\shared\System\Collections\Generic\ArraySortHelper.cs" />
<Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\shared\System\IO\Stream.cs" />
<Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\shared\System\InsufficientMemoryException.cs" />
<Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\shared\System\MissingFieldException.cs" />
<Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\shared\System\MissingMemberException.cs" />
Expand All @@ -894,6 +896,7 @@
<Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\src\System\Collections\Generic\ArraySortHelper.CoreRT.cs" />
<Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\src\System\Globalization\GlobalizationMode.cs" />
<Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\src\System\IO\FileLoadException.CoreRT.cs" />
<Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\src\System\IO\Stream.CoreRT.cs" />
<Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\src\System\MissingMemberException.CoreRT.cs" />
<Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\src\System\Number.CoreRT.cs" />
<Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\src\System\Reflection\CustomAttributeNamedArgument.cs" />
Expand Down Expand Up @@ -1019,12 +1022,10 @@
<Compile Include="..\referencesource\mscorlib\system\io\__hresults.cs" />
<Compile Include="..\referencesource\mscorlib\system\io\binaryreader.cs" />
<Compile Include="..\referencesource\mscorlib\system\io\binarywriter.cs" />
<Compile Include="..\referencesource\mscorlib\system\io\bufferedstream.cs" />
<Compile Include="..\referencesource\mscorlib\system\io\directory.cs" />
<Compile Include="..\referencesource\mscorlib\system\io\fileinfo.cs" />
<Compile Include="..\referencesource\mscorlib\system\io\filesystemenumerable.cs" />
<Compile Include="..\referencesource\mscorlib\system\io\filesysteminfo.cs" />
<Compile Include="..\referencesource\mscorlib\system\io\stream.cs" />
<Compile Include="..\referencesource\mscorlib\system\io\streamwriter.cs" />
<Compile Include="..\referencesource\mscorlib\system\io\stringreader.cs" />
<Compile Include="..\referencesource\mscorlib\system\io\stringwriter.cs" />
Expand Down Expand Up @@ -2012,7 +2013,6 @@
<Compile Include="corert\RelocatedTypeAttribute.cs" />
<Compile Include="corert\RuntimeAugments.cs" />
<Compile Include="corert\RuntimeThread.cs" />
<Compile Include="corert\Stream.cs" />
<Compile Include="corert\Task.cs" />
<Compile Include="corert\ThreadPool.cs" />
<Compile Include="corert\Type.cs" />
Expand Down
6 changes: 3 additions & 3 deletions mcs/class/corlib/corlib.dll.sources
Original file line number Diff line number Diff line change
Expand Up @@ -1120,7 +1120,7 @@ ReferenceSources/AppContextDefaultValues.cs
../referencesource/mscorlib/system/io/__hresults.cs
../referencesource/mscorlib/system/io/binaryreader.cs
../referencesource/mscorlib/system/io/binarywriter.cs
../referencesource/mscorlib/system/io/bufferedstream.cs
../../../external/corefx/src/System.Runtime.Extensions/src/System/IO/BufferedStream.cs
../referencesource/mscorlib/system/io/directory.cs
../../../external/corefx/src/Common/src/CoreLib/System/IO/DirectoryNotFoundException.cs
../../../external/corefx/src/System.IO.FileSystem.DriveInfo/src/System/IO/DriveNotFoundException.cs
Expand All @@ -1135,7 +1135,8 @@ ReferenceSources/AppContextDefaultValues.cs
../../../external/corefx/src/Common/src/CoreLib/System/IO/MemoryStream.cs
../../../external/corefx/src/Common/src/CoreLib/System/IO/PathTooLongException.cs
../../../external/corefx/src/Common/src/CoreLib/System/IO/PinnedBufferMemoryStream.cs
../referencesource/mscorlib/system/io/stream.cs
../../../external/corert/src/System.Private.CoreLib/shared/System/IO/Stream.cs
../../../external/corert/src/System.Private.CoreLib/src/System/IO/Stream.CoreRT.cs
../../../external/corefx/src/Common/src/CoreLib/System/IO/StreamReader.cs
../referencesource/mscorlib/system/io/streamwriter.cs
../referencesource/mscorlib/system/io/stringreader.cs
Expand Down Expand Up @@ -1596,7 +1597,6 @@ corert/AddrofIntrinsics.cs
corert/EnvironmentAugments.cs
corert/RelocatedTypeAttribute.cs
corert/RuntimeThread.cs
corert/Stream.cs
corert/Task.cs
corert/ThreadPool.cs
corert/ThreadPoolBoundHandle.platformnotsupported.cs
Expand Down
16 changes: 16 additions & 0 deletions mcs/class/corlib/corlib_xtest.dll.sources
Original file line number Diff line number Diff line change
Expand Up @@ -337,3 +337,19 @@
../../../external/corefx/src/System.IO/tests/TextReader/*.cs
../../../external/corefx/src/System.IO/tests/StreamReader/*.cs
../../../external/corefx/src/System.IO/tests/TestDataProvider/TestDataProvider.cs

# System.IO.Stream
../../../external/corefx/src/Common/tests/System/IO/CallTrackingStream.cs
../../../external/corefx/src/System.IO/tests/Stream/*.cs

# System.IO.BufferedStream
../../../external/corefx/src/System.IO/tests/StreamWriter/StreamWriter.CloseTests.cs
../../../external/corefx/src/System.IO/tests/StreamWriter/StreamWriter.WriteTests.cs
../../../external/corefx/src/System.IO/tests/StreamWriter/StreamWriter.FlushTests.cs
../../../external/corefx/src/System.IO/tests/BinaryWriter/BinaryWriterTests.cs
../../../external/corefx/src/System.IO/tests/BinaryWriter/BinaryWriter.WriteTests.cs
../../../external/corefx/src/System.IO/tests/BinaryWriter/BinaryWriter.WriteByteCharTests.cs
../../../external/corefx/src/System.IO/tests/StreamReader/StreamReaderTests.cs
../../../external/corefx/src/System.IO/tests/TestDataProvider/TestDataProvider.cs
../../../external/corefx/src/Common/tests/System/IO/WrappedMemoryStream.cs
../../../external/corefx/src/System.IO/tests/BufferedStream/*.cs
Original file line number Diff line number Diff line change
Expand Up @@ -908,6 +908,11 @@ internal static void Run(ExecutionContext executionContext, ContextCallback call
RunInternal(executionContext, callback, state, preserveSyncCtx);
}

internal static void RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
{
RunInternal(executionContext, callback, state, false);
}

// Actual implementation of Run is here, in a non-DynamicSecurityMethod, because the JIT seems to refuse to inline callees into
// a DynamicSecurityMethod.
[SecurityCritical]
Expand Down