mirror of
https://github.com/VSadov/Satori.git
synced 2025-06-08 03:27:04 +09:00
Fix typos (#79136)
This commit is contained in:
parent
4ce23f46ed
commit
3855a99c9d
71 changed files with 263 additions and 263 deletions
|
@ -102,7 +102,7 @@ The proposed ordering change for 2.1 is:
|
|||
|
||||
In addition, the additional-deps will always look for assembly and file version information present in the deps files in order to support "upgrade" scenarios where the additional-deps brings a newer version of a given assembly. Note that these version checks only occur for managed assemblies, not native files nor resource assemblies.
|
||||
|
||||
## 2.1 proposal (add runtimeconfig knob to to disable `%DOTNET_ADDITIONAL_DEPS%`)
|
||||
## 2.1 proposal (add runtimeconfig knob to disable `%DOTNET_ADDITIONAL_DEPS%`)
|
||||
<strike>
|
||||
Add an `additionalDepsLookup` option to the runtimeconfig with these values:
|
||||
|
||||
|
|
|
@ -801,7 +801,7 @@ to allow `callvirt` instructions to be made in a uniform way independent of whet
|
|||
When followed by the `call` instruction or the `ldftn` instruction,
|
||||
the method must refer to a virtual static method defined on an interface. The behavior of the
|
||||
`constrained.` prefix is to change the method that the `call` or `ldftn`
|
||||
instruction refers to to be the method on `implementorType` which implements the
|
||||
instruction refers to be the method on `implementorType` which implements the
|
||||
virtual static method (paragraph *II.10.3*).
|
||||
|
||||
(Edit the paragraph "Correctness:" second from the bottom of page 316:)
|
||||
|
|
|
@ -193,7 +193,7 @@ while (($# > 0)); do
|
|||
echo ""
|
||||
echo "Advanced settings:"
|
||||
echo " --framework <value> The framework to run, if not running in master"
|
||||
echo " --compliationmode <value> The compilation mode if not passing --configurations"
|
||||
echo " --compilationmode <value> The compilation mode if not passing --configurations"
|
||||
echo " --sourcedirectory <value> The directory of the sources. Defaults to env:BUILD_SOURCESDIRECTORY"
|
||||
echo " --repository <value> The name of the repository in the <owner>/<repository name> format. Defaults to env:BUILD_REPOSITORY_NAME"
|
||||
echo " --branch <value> The name of the branch. Defaults to env:BUILD_SOURCEBRANCH"
|
||||
|
@ -464,4 +464,4 @@ Write-PipelineSetVariable -Name 'iOSLlvmBuild' -Value "$iosllvmbuild" -is_multi_
|
|||
Write-PipelineSetVariable -name "OnlySanityCheck" -value "$only_sanity" -is_multi_job_variable false
|
||||
|
||||
# Put it back to what was set on top of this script
|
||||
set -x
|
||||
set -x
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
<Target Name="VerifyCrossDacProperties" BeforeTargets="Build;Pack">
|
||||
<Error Condition="'$(CrossDacArtifactsDir)' == '' or !Exists('$(CrossDacArtifactsDir)')"
|
||||
Text="Packaging the Cross OS DAC requires property CrossDacArtifactsDir to to a path containing all cross OS DAC assets needed." />
|
||||
Text="Packaging the Cross OS DAC requires property CrossDacArtifactsDir to a path containing all cross OS DAC assets needed." />
|
||||
</Target>
|
||||
|
||||
<Target Name="FilterSupportedCrossOsDacPackages" BeforeTargets="Build;Pack">
|
||||
|
|
|
@ -573,7 +573,7 @@ namespace System.Reflection.Emit
|
|||
[RequiresUnreferencedCode("Types might be removed")]
|
||||
private Type? GetTypeNoLock(string className, bool throwOnError, bool ignoreCase)
|
||||
{
|
||||
// public API to to a type. The reason that we need this function override from module
|
||||
// public API to a type. The reason that we need this function override from module
|
||||
// is because clients might need to get foo[] when foo is being built. For example, if
|
||||
// foo class contains a data member of type foo[].
|
||||
// This API first delegate to the Module.GetType implementation. If succeeded, great!
|
||||
|
|
|
@ -3611,7 +3611,7 @@ void DacDbiInterfaceImpl::EnumerateMemRangesForLoaderAllocator(PTR_LoaderAllocat
|
|||
heapsToEnumerate.Push(pLoaderAllocator->GetStubHeap());
|
||||
|
||||
// GetVirtualCallStubManager returns VirtualCallStubManager*, but it's really an address to target as
|
||||
// pLoaderAllocator is DACized. Cast it so we don't try to to a Host to Target translation.
|
||||
// pLoaderAllocator is DACized. Cast it so we don't try to a Host to Target translation.
|
||||
VirtualCallStubManager *pVcsMgr = pLoaderAllocator->GetVirtualCallStubManager();
|
||||
LOG((LF_CORDB, LL_INFO10000, "DDBII::EMRFLA: VirtualCallStubManager 0x%x\n", PTR_HOST_TO_TADDR(pVcsMgr)));
|
||||
if (pVcsMgr)
|
||||
|
|
|
@ -888,7 +888,7 @@ HRESULT ClrDataAccess::EnumMemWalkStackHelper(CLRDataEnumMemoryFlags flags,
|
|||
{
|
||||
// This method has a generic type token which is required to figure out the exact instantiation
|
||||
// of the method.
|
||||
// We need to to use the variable index of the generic type token in order to do the look up.
|
||||
// We need to use the variable index of the generic type token in order to do the look up.
|
||||
CLRDATA_ADDRESS address = NULL;
|
||||
DWORD dwExactGenericArgsTokenIndex = 0;
|
||||
ReleaseHolder<IXCLRDataValue> pDV(NULL);
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace
|
|||
DWORD* directoryRVA)
|
||||
{
|
||||
// Fun code ahead... below is a hand written PE decoder with some of the file offsets hardcoded.
|
||||
// It supports no more than what we absolutely have to to get to the PE directory we need. Any of the
|
||||
// It supports no more than what we absolutely have to get to the PE directory we need. Any of the
|
||||
// magic numbers used below can be determined by using the public documentation on the web.
|
||||
//
|
||||
// Yes utilcode has a PE decoder, no it does not support reading its data through a datatarget
|
||||
|
|
|
@ -5802,7 +5802,7 @@ void CordbProcess::RawDispatchEvent(
|
|||
FramePointer fp = pEvent->ExceptionCallback2.framePointer;
|
||||
if (fp != LEAF_MOST_FRAME)
|
||||
{
|
||||
// The interface forces us to to pass a FramePointer via an ICorDebugFrame.
|
||||
// The interface forces us to pass a FramePointer via an ICorDebugFrame.
|
||||
// However, we can't get a real ICDFrame without a stackwalk, and we don't
|
||||
// want to do a stackwalk now. so pass a netuered proxy frame. The shim
|
||||
// can map this to a real frame.
|
||||
|
|
|
@ -16383,7 +16383,7 @@ HRESULT DebuggerHeap::Init(BOOL fExecutable)
|
|||
#endif
|
||||
|
||||
#ifdef USE_INTEROPSAFE_CANARY
|
||||
// Small header to to prefix interop-heap blocks.
|
||||
// Small header to prefix interop-heap blocks.
|
||||
// This lets us enforce that we don't delete interopheap data from a non-interop heap.
|
||||
struct InteropHeapCanary
|
||||
{
|
||||
|
|
|
@ -796,7 +796,7 @@ void SegmentTrimExcessPages(TableSegment *pSegment);
|
|||
/*
|
||||
* TableAllocBulkHandles
|
||||
*
|
||||
* Attempts to allocate the requested number of handes of the specified type.
|
||||
* Attempts to allocate the requested number of handles of the specified type.
|
||||
*
|
||||
* Returns the number of handles that were actually allocated. This is always
|
||||
* the same as the number of handles requested except in out-of-memory conditions,
|
||||
|
|
|
@ -3052,7 +3052,7 @@ typedef struct CV_LVARFLAGS {
|
|||
unsigned short fIsParam :1; // variable is a parameter
|
||||
unsigned short fAddrTaken :1; // address is taken
|
||||
unsigned short fCompGenx :1; // variable is compiler generated
|
||||
unsigned short fIsAggregate :1; // the symbol is splitted in temporaries,
|
||||
unsigned short fIsAggregate :1; // the symbol is split in temporaries,
|
||||
// which are treated by compiler as
|
||||
// independent entities
|
||||
unsigned short fIsAggregated :1; // Counterpart of fIsAggregate - tells
|
||||
|
|
|
@ -254,7 +254,7 @@ virtual OBJECTREF GetInstance(PREGDISPLAY pContext,
|
|||
EECodeInfo* pCodeInfo) = 0;
|
||||
|
||||
/*
|
||||
Returns the extra argument passed to to shared generic code if it is still alive.
|
||||
Returns the extra argument passed to shared generic code if it is still alive.
|
||||
Returns NULL in all other cases.
|
||||
*/
|
||||
virtual PTR_VOID GetParamTypeArg(PREGDISPLAY pContext,
|
||||
|
@ -503,7 +503,7 @@ OBJECTREF GetInstance(
|
|||
EECodeInfo * pCodeInfo);
|
||||
|
||||
/*
|
||||
Returns the extra argument passed to to shared generic code if it is still alive.
|
||||
Returns the extra argument passed to shared generic code if it is still alive.
|
||||
Returns NULL in all other cases.
|
||||
*/
|
||||
virtual
|
||||
|
|
|
@ -3684,7 +3684,7 @@ GenTree* Compiler::optAssertionProp_LclVar(ASSERT_VALARG_TP assertions, GenTreeL
|
|||
{
|
||||
// If we have a var definition then bail or
|
||||
// If this is the address of the var then it will have the GTF_DONT_CSE
|
||||
// flag set and we don't want to to assertion prop on it.
|
||||
// flag set and we don't want to assertion prop on it.
|
||||
if (tree->gtFlags & (GTF_VAR_DEF | GTF_DONT_CSE))
|
||||
{
|
||||
return nullptr;
|
||||
|
@ -3789,7 +3789,7 @@ GenTree* Compiler::optAssertionProp_LclFld(ASSERT_VALARG_TP assertions, GenTreeL
|
|||
{
|
||||
// If we have a var definition then bail or
|
||||
// If this is the address of the var then it will have the GTF_DONT_CSE
|
||||
// flag set and we don't want to to assertion prop on it.
|
||||
// flag set and we don't want to assertion prop on it.
|
||||
if (tree->gtFlags & (GTF_VAR_DEF | GTF_DONT_CSE))
|
||||
{
|
||||
return nullptr;
|
||||
|
|
|
@ -115,7 +115,7 @@ bool IsRedundantLdStr(instruction ins, regNumber reg1, regNumber reg2, ssize_t i
|
|||
|
||||
/************************************************************************
|
||||
*
|
||||
* This union is used to to encode/decode the special ARM64 immediate values
|
||||
* This union is used to encode/decode the special ARM64 immediate values
|
||||
* that is listed as imm(N,r,s) and referred to as 'bitmask immediate'
|
||||
*/
|
||||
|
||||
|
@ -141,7 +141,7 @@ static INT64 emitDecodeBitMaskImm(const emitter::bitMaskImm bmImm, emitAttr size
|
|||
|
||||
/************************************************************************
|
||||
*
|
||||
* This union is used to to encode/decode the special ARM64 immediate values
|
||||
* This union is used to encode/decode the special ARM64 immediate values
|
||||
* that is listed as imm(i16,hw) and referred to as 'halfword immediate'
|
||||
*/
|
||||
|
||||
|
@ -192,7 +192,7 @@ static UINT32 emitDecodeByteShiftedImm(const emitter::byteShiftedImm bsImm, emit
|
|||
|
||||
/************************************************************************
|
||||
*
|
||||
* This union is used to to encode/decode the special ARM64 immediate values
|
||||
* This union is used to encode/decode the special ARM64 immediate values
|
||||
* that are use for FMOV immediate and referred to as 'float 8-bit immediate'
|
||||
*/
|
||||
|
||||
|
@ -217,7 +217,7 @@ static double emitDecodeFloatImm8(const emitter::floatImm8 fpImm);
|
|||
|
||||
/************************************************************************
|
||||
*
|
||||
* This union is used to to encode/decode the cond, nzcv and imm5 values for
|
||||
* This union is used to encode/decode the cond, nzcv and imm5 values for
|
||||
* instructions that use them in the small constant immediate field
|
||||
*/
|
||||
|
||||
|
|
|
@ -5651,7 +5651,7 @@ bool Compiler::fgCanFastTailCall(GenTreeCall* callee, const char** failReason)
|
|||
#ifdef TARGET_ARM
|
||||
if (arg.AbiInfo.IsSplit())
|
||||
{
|
||||
reportFastTailCallDecision("Splitted argument in callee is not supported on ARM32");
|
||||
reportFastTailCallDecision("Argument splitting in callee is not supported on ARM32");
|
||||
return false;
|
||||
}
|
||||
#endif // TARGET_ARM
|
||||
|
@ -5662,7 +5662,7 @@ bool Compiler::fgCanFastTailCall(GenTreeCall* callee, const char** failReason)
|
|||
#ifdef TARGET_ARM
|
||||
if (compHasSplitParam)
|
||||
{
|
||||
reportFastTailCallDecision("Splitted argument in caller is not supported on ARM32");
|
||||
reportFastTailCallDecision("Argument splitting in caller is not supported on ARM32");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -359,7 +359,7 @@ void CodeGenInterface::siVarLoc::siFillStackVarLoc(
|
|||
//
|
||||
// Notes:
|
||||
// The "varLoc" argument is filled depending of the "type" argument but as a VLT_REG... variation.
|
||||
// "baseReg" and "offset" are used .for not 64 bit and values that are splitted in two parts.
|
||||
// "baseReg" and "offset" are used .for not 64 bit and values that are split in two parts.
|
||||
void CodeGenInterface::siVarLoc::siFillRegisterVarLoc(
|
||||
const LclVarDsc* varDsc, var_types type, regNumber baseReg, int offset, bool isFramePointerUsed)
|
||||
{
|
||||
|
|
|
@ -1312,7 +1312,7 @@ STDMETHODIMP RegMeta::SetParent( // S_OK or error.
|
|||
|
||||
IfFailGo(m_pStgdb->m_MiniMd.GetMemberRefRecord(RidFromToken(mr), &pMemberRef));
|
||||
|
||||
// If the token is nil set it to to m_tdModule.
|
||||
// If the token is nil set it to m_tdModule.
|
||||
tk = IsNilToken(tk) ? m_tdModule : tk;
|
||||
|
||||
// Set the parent.
|
||||
|
|
|
@ -3637,7 +3637,7 @@ to the variable that 'Addend' points to.
|
|||
Parameters
|
||||
|
||||
lpAddend
|
||||
[in/out] Pointer to the variable to to added.
|
||||
[in/out] Pointer to the variable to added.
|
||||
|
||||
Return Values
|
||||
|
||||
|
|
|
@ -613,7 +613,7 @@ namespace CorUnix
|
|||
// Signal the object and trigger thread awakening
|
||||
psdSynchData->Signal(pthrCurrent, 1, false);
|
||||
|
||||
// Release reference to to SynchData
|
||||
// Release reference to SynchData
|
||||
psdSynchData->Release(pthrCurrent);
|
||||
|
||||
// Return node to the cache
|
||||
|
@ -1500,7 +1500,7 @@ namespace CorUnix
|
|||
|
||||
if ((NULL == pSynchManager) || ((LONG)SynchMgrStatusRunning != s_lInitStatus))
|
||||
{
|
||||
ERROR("Trying to to create worker thread in invalid state\n");
|
||||
ERROR("Trying to create worker thread in invalid state\n");
|
||||
return ERROR_INTERNAL_ERROR;
|
||||
}
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ namespace ILCompiler
|
|||
/// </summary>
|
||||
/// <param name="type">Type to get a module token for</param>
|
||||
/// <param name="token">Module-based token for the type</param>
|
||||
/// <returns>Returns true the type was referenced by any of the input modules in the current compliation</returns>
|
||||
/// <returns>Returns true when the type was referenced by any of the input modules in the current compilation</returns>
|
||||
public abstract bool TryGetModuleTokenForExternalType(TypeDesc type, out ModuleToken token);
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -5616,7 +5616,7 @@ GenericParamContextType EECodeManager::GetParamContextType(PREGDISPLAY pCont
|
|||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Returns the extra argument passed to to shared generic code if it is still alive.
|
||||
* Returns the extra argument passed to shared generic code if it is still alive.
|
||||
* Returns NULL in all other cases.
|
||||
*/
|
||||
PTR_VOID EECodeManager::GetParamTypeArg(PREGDISPLAY pContext,
|
||||
|
|
|
@ -187,7 +187,7 @@ HRESULT WriteData(IStream * pStream, const void * pData, unsigned len)
|
|||
return hr;
|
||||
}
|
||||
|
||||
// Write string, round to to DWORD alignment
|
||||
// Write string, round to DWORD alignment
|
||||
HRESULT WriteString(const void * pString, unsigned len, IStream * pStream)
|
||||
{
|
||||
CONTRACTL
|
||||
|
|
|
@ -8720,7 +8720,7 @@ HRESULT ProfToEEInterfaceImpl::DoStackSnapshot(ThreadID thread,
|
|||
// If the profiler did not specify a seed context of its own, use the current one we
|
||||
// just produced.
|
||||
//
|
||||
// Failing to seed the walk can cause us to to "miss" functions on the stack. This is
|
||||
// Failing to seed the walk can cause us to "miss" functions on the stack. This is
|
||||
// because StackWalkFrames(), when doing an unseeded stackwalk, sets the
|
||||
// starting regdisplay's IP/SP to 0. This, in turn causes StackWalkFramesEx
|
||||
// to set cf.isFrameless = (pEEJM != NULL); (which is FALSE, since we have no
|
||||
|
|
|
@ -2526,7 +2526,7 @@ int Thread::DecExternalCount(BOOL holdingLock)
|
|||
CONTRACT_VIOLATION(ModeViolation);
|
||||
|
||||
// Clear the handle and leave the lock.
|
||||
// We do not have to to DisablePreemptiveGC here, because
|
||||
// We do not have to DisablePreemptiveGC here, because
|
||||
// we just want to put NULL into a handle.
|
||||
StoreObjectInHandle(m_StrongHndToExposedObject, NULL);
|
||||
|
||||
|
|
|
@ -1996,7 +1996,7 @@ PCODE VirtualCallStubManager::ResolveWorker(StubCallSite* pCallSite,
|
|||
|
||||
/*
|
||||
Resolve the token in the context of the method table, and set the target to point to
|
||||
the address that we should go to to get to the implementation. Return a boolean indicating
|
||||
the address that we should go to get to the implementation. Return a boolean indicating
|
||||
whether or not this is a permenent choice or a temporary choice. For example, if the code has
|
||||
not been jitted yet, return FALSE and set the target to the prestub. If the target is set to NULL,
|
||||
it means that the token is not resolvable.
|
||||
|
@ -2399,7 +2399,7 @@ VirtualCallStubManager::GetTarget(
|
|||
//----------------------------------------------------------------------------
|
||||
/*
|
||||
Resolve the token in the context of the method table, and set the target to point to
|
||||
the address that we should go to to get to the implementation. Return a boolean indicating
|
||||
the address that we should go to get to the implementation. Return a boolean indicating
|
||||
whether or not this is a permenent choice or a temporary choice. For example, if the code has
|
||||
not been jitted yet, return FALSE and set the target to the prestub. If the target is set to NULL,
|
||||
it means that the token is not resolvable.
|
||||
|
|
|
@ -1040,7 +1040,7 @@ Namespace Microsoft.VisualBasic.CompilerServices
|
|||
End Sub
|
||||
|
||||
Friend Sub New(ByVal size As Integer)
|
||||
'Populate the cache list with the maximum number of entires.
|
||||
'Populate the cache list with the maximum number of entries.
|
||||
'This simplifies the insertion code for a small upfront cost.
|
||||
_size = size
|
||||
|
||||
|
@ -1143,7 +1143,7 @@ Namespace Microsoft.VisualBasic.CompilerServices
|
|||
End Sub
|
||||
|
||||
Friend Sub New(ByVal size As Integer)
|
||||
'Populate the list with the maximum number of entires.
|
||||
'Populate the list with the maximum number of entries.
|
||||
'This simplifies the insertion code for a small upfront cost.
|
||||
_size = size
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace System.ComponentModel.Composition.Hosting
|
|||
/// queryable state along with a sequence of actions necessary to complete the state when
|
||||
/// the atomicComposition is no longer in danger of being rolled back. State is completed or
|
||||
/// rolled back when the atomicComposition is disposed, depending on the state of the
|
||||
/// CompleteOnDipose property which defaults to false. The using(...) pattern in C# is a
|
||||
/// CompleteOnDispose property which defaults to false. The using(...) pattern in C# is a
|
||||
/// convenient mechanism for defining atomicComposition scopes.
|
||||
///
|
||||
/// The least obvious aspects of AtomicComposition deal with nesting.
|
||||
|
|
|
@ -257,7 +257,7 @@ namespace System.DirectoryServices.AccountManagement
|
|||
memberFound = _memberSearchResultsEnumerator.MoveNext();
|
||||
|
||||
// The search is complete.
|
||||
// Dipose the searcher and search results.
|
||||
// Dispose the searcher and search results.
|
||||
if (!memberFound)
|
||||
{
|
||||
_currentMembersSearcher.Dispose();
|
||||
|
|
|
@ -12,7 +12,7 @@ using System.Threading;
|
|||
namespace System.DirectoryServices.AccountManagement
|
||||
{
|
||||
/// <summary>
|
||||
/// This is a class designed to cache DirectoryEntires instead of creating them every time.
|
||||
/// This is a class designed to cache DirectoryEntries instead of creating them every time.
|
||||
/// </summary>
|
||||
internal sealed class SDSCache
|
||||
{
|
||||
|
|
|
@ -3297,7 +3297,7 @@ namespace System.Drawing
|
|||
{
|
||||
_previousContext = context.Previous;
|
||||
|
||||
// This will dipose all context object up the stack.
|
||||
// This will dispose all context object up the stack.
|
||||
context.Dispose();
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -88,7 +88,7 @@ namespace System.Drawing.Internal
|
|||
|
||||
if (clip is not null)
|
||||
{
|
||||
// We have to create the WindowsRegion and dipose the Region object before locking the Graphics object,
|
||||
// We have to create the WindowsRegion and dispose the Region object before locking the Graphics object,
|
||||
// in case of an unlikely exception before releasing the WindowsRegion, the finalizer will do it for us.
|
||||
// (no try-finally block since this method is used frequently - perf).
|
||||
|
||||
|
|
|
@ -11,49 +11,49 @@ namespace System.IO.Pipes.Tests
|
|||
{
|
||||
[Fact]
|
||||
public static void When_AnonymousPipeServer_IsClosed_AnonymousPipeClient_ReadReturnsZero()
|
||||
=> DiposeServerAndVerifyClientBehaviour(
|
||||
=> DisposeServerAndVerifyClientBehaviour(
|
||||
GetAnonymousPipeStreams(PipeDirection.Out, PipeDirection.In),
|
||||
AssertZeroByteRead);
|
||||
|
||||
[Fact]
|
||||
public static void When_AnonymousPipeServer_IsClosed_FileStreamClient_ReadReturnsZero()
|
||||
=> DiposeServerAndVerifyClientBehaviour(
|
||||
=> DisposeServerAndVerifyClientBehaviour(
|
||||
GetAnonymousPipeServerAndFileStreamClient(PipeDirection.Out, FileAccess.Read),
|
||||
AssertZeroByteRead);
|
||||
|
||||
[Fact]
|
||||
public static void When_AnonymousPipeServer_IsClosed_AnonymousPipeClient_WriteThrows()
|
||||
=> DiposeServerAndVerifyClientBehaviour(
|
||||
=> DisposeServerAndVerifyClientBehaviour(
|
||||
GetAnonymousPipeStreams(PipeDirection.In, PipeDirection.Out),
|
||||
AssertWriteThrows);
|
||||
|
||||
[Fact]
|
||||
public static void When_AnonymousPipeServer_IsClosed_FileStreamClient_WriteThrows()
|
||||
=> DiposeServerAndVerifyClientBehaviour(
|
||||
=> DisposeServerAndVerifyClientBehaviour(
|
||||
GetAnonymousPipeServerAndFileStreamClient(PipeDirection.In, FileAccess.Write),
|
||||
AssertWriteThrows);
|
||||
|
||||
[Fact]
|
||||
public static Task When_AnonymousPipeServer_IsClosed_AnonymousPipeClient_ReadAsyncReturnsZero()
|
||||
=> DiposeServerAndVerifyClientBehaviourAsync(
|
||||
=> DisposeServerAndVerifyClientBehaviourAsync(
|
||||
GetAnonymousPipeStreams(PipeDirection.Out, PipeDirection.In),
|
||||
AssertZeroByteReadAsync);
|
||||
|
||||
[Fact]
|
||||
public static Task When_AnonymousPipeServer_IsClosed_FileStreamClient_ReadAsyncReturnsZero()
|
||||
=> DiposeServerAndVerifyClientBehaviourAsync(
|
||||
=> DisposeServerAndVerifyClientBehaviourAsync(
|
||||
GetAnonymousPipeServerAndFileStreamClient(PipeDirection.Out, FileAccess.Read),
|
||||
AssertZeroByteReadAsync);
|
||||
|
||||
[Fact]
|
||||
public static Task When_AnonymousPipeServer_IsClosed_AnonymousPipeClient_WriteAsyncThrows()
|
||||
=> DiposeServerAndVerifyClientBehaviourAsync(
|
||||
=> DisposeServerAndVerifyClientBehaviourAsync(
|
||||
GetAnonymousPipeStreams(PipeDirection.In, PipeDirection.Out),
|
||||
AssertWriteAsyncThrows);
|
||||
|
||||
[Fact]
|
||||
public static Task When_AnonymousPipeServer_IsClosed_FileStreamClient_WriteAsyncThrows()
|
||||
=> DiposeServerAndVerifyClientBehaviourAsync(
|
||||
=> DisposeServerAndVerifyClientBehaviourAsync(
|
||||
GetAnonymousPipeServerAndFileStreamClient(PipeDirection.In, FileAccess.Write),
|
||||
AssertWriteAsyncThrows);
|
||||
|
||||
|
@ -63,7 +63,7 @@ namespace System.IO.Pipes.Tests
|
|||
[SkipOnPlatform(TestPlatforms.LinuxBionic, "SElinux blocks UNIX sockets in our CI environment")]
|
||||
[SkipOnPlatform(TestPlatforms.iOS | TestPlatforms.tvOS, "iOS/tvOS blocks binding to UNIX sockets")]
|
||||
public static async Task When_NamedPipeServer_IsClosed_NamedPipeClient_ReadReturnsZero(bool asyncHandles)
|
||||
=> DiposeServerAndVerifyClientBehaviour(
|
||||
=> DisposeServerAndVerifyClientBehaviour(
|
||||
await GetConnectedNamedPipeStreams(asyncHandles, PipeDirection.Out, PipeDirection.In),
|
||||
AssertZeroByteRead);
|
||||
|
||||
|
@ -73,7 +73,7 @@ namespace System.IO.Pipes.Tests
|
|||
[SkipOnPlatform(TestPlatforms.LinuxBionic, "SElinux blocks UNIX sockets in our CI environment")]
|
||||
[SkipOnPlatform(TestPlatforms.iOS | TestPlatforms.tvOS, "iOS/tvOS blocks binding to UNIX sockets")]
|
||||
public static async Task When_NamedPipeServer_IsClosed_FileStreamClient_ReadReturnsZero(bool asyncHandles)
|
||||
=> DiposeServerAndVerifyClientBehaviour(
|
||||
=> DisposeServerAndVerifyClientBehaviour(
|
||||
await GetConnectedNamedPipeServerAndFileStreamClientStreams(asyncHandles, PipeDirection.Out, FileAccess.Read),
|
||||
AssertZeroByteRead);
|
||||
|
||||
|
@ -83,7 +83,7 @@ namespace System.IO.Pipes.Tests
|
|||
[SkipOnPlatform(TestPlatforms.LinuxBionic, "SElinux blocks UNIX sockets in our CI environment")]
|
||||
[SkipOnPlatform(TestPlatforms.iOS | TestPlatforms.tvOS, "iOS/tvOS blocks binding to UNIX sockets")]
|
||||
public static async Task When_NamedPipeServer_IsClosed_NamedPipeClient_WriteThrows(bool asyncHandles)
|
||||
=> DiposeServerAndVerifyClientBehaviour(
|
||||
=> DisposeServerAndVerifyClientBehaviour(
|
||||
await GetConnectedNamedPipeStreams(asyncHandles, PipeDirection.In, PipeDirection.Out),
|
||||
AssertWriteThrows);
|
||||
|
||||
|
@ -93,7 +93,7 @@ namespace System.IO.Pipes.Tests
|
|||
[SkipOnPlatform(TestPlatforms.LinuxBionic, "SElinux blocks UNIX sockets in our CI environment")]
|
||||
[SkipOnPlatform(TestPlatforms.iOS | TestPlatforms.tvOS, "iOS/tvOS blocks binding to UNIX sockets")]
|
||||
public static async Task When_NamedPipeServer_IsClosed_FileStreamClient_WriteThrows(bool asyncHandles)
|
||||
=> DiposeServerAndVerifyClientBehaviour(
|
||||
=> DisposeServerAndVerifyClientBehaviour(
|
||||
await GetConnectedNamedPipeServerAndFileStreamClientStreams(asyncHandles, PipeDirection.In, FileAccess.Write),
|
||||
AssertWriteThrows);
|
||||
|
||||
|
@ -103,7 +103,7 @@ namespace System.IO.Pipes.Tests
|
|||
[SkipOnPlatform(TestPlatforms.LinuxBionic, "SElinux blocks UNIX sockets in our CI environment")]
|
||||
[SkipOnPlatform(TestPlatforms.iOS | TestPlatforms.tvOS, "iOS/tvOS blocks binding to UNIX sockets")]
|
||||
public static async Task When_NamedPipeServer_IsClosed_NamedPipeClient_ReadAsyncReturnsZero(bool asyncHandles)
|
||||
=> await DiposeServerAndVerifyClientBehaviourAsync(
|
||||
=> await DisposeServerAndVerifyClientBehaviourAsync(
|
||||
await GetConnectedNamedPipeStreams(asyncHandles, PipeDirection.Out, PipeDirection.In),
|
||||
AssertZeroByteReadAsync);
|
||||
|
||||
|
@ -113,7 +113,7 @@ namespace System.IO.Pipes.Tests
|
|||
[SkipOnPlatform(TestPlatforms.LinuxBionic, "SElinux blocks UNIX sockets in our CI environment")]
|
||||
[SkipOnPlatform(TestPlatforms.iOS | TestPlatforms.tvOS, "iOS/tvOS blocks binding to UNIX sockets")]
|
||||
public static async Task When_NamedPipeServer_IsClosed_FileStreamClient_ReadAsyncReturnsZero(bool asyncHandles)
|
||||
=> await DiposeServerAndVerifyClientBehaviourAsync(
|
||||
=> await DisposeServerAndVerifyClientBehaviourAsync(
|
||||
await GetConnectedNamedPipeServerAndFileStreamClientStreams(asyncHandles, PipeDirection.Out, FileAccess.Read),
|
||||
AssertZeroByteReadAsync);
|
||||
|
||||
|
@ -123,7 +123,7 @@ namespace System.IO.Pipes.Tests
|
|||
[SkipOnPlatform(TestPlatforms.LinuxBionic, "SElinux blocks UNIX sockets in our CI environment")]
|
||||
[SkipOnPlatform(TestPlatforms.iOS | TestPlatforms.tvOS, "iOS/tvOS blocks binding to UNIX sockets")]
|
||||
public static async Task When_NamedPipeServer_IsClosed_NamedPipeClient_WriteAsyncThrows(bool asyncHandles)
|
||||
=> await DiposeServerAndVerifyClientBehaviourAsync(
|
||||
=> await DisposeServerAndVerifyClientBehaviourAsync(
|
||||
await GetConnectedNamedPipeStreams(asyncHandles, PipeDirection.In, PipeDirection.Out),
|
||||
AssertWriteAsyncThrows);
|
||||
|
||||
|
@ -133,7 +133,7 @@ namespace System.IO.Pipes.Tests
|
|||
[SkipOnPlatform(TestPlatforms.LinuxBionic, "SElinux blocks UNIX sockets in our CI environment")]
|
||||
[SkipOnPlatform(TestPlatforms.iOS | TestPlatforms.tvOS, "iOS/tvOS blocks binding to UNIX sockets")]
|
||||
public static async Task When_NamedPipeServer_IsClosed_FileStreamClient_WriteAsyncThrows(bool asyncHandles)
|
||||
=> await DiposeServerAndVerifyClientBehaviourAsync(
|
||||
=> await DisposeServerAndVerifyClientBehaviourAsync(
|
||||
await GetConnectedNamedPipeServerAndFileStreamClientStreams(asyncHandles, PipeDirection.In, FileAccess.Write),
|
||||
AssertWriteAsyncThrows);
|
||||
|
||||
|
@ -319,7 +319,7 @@ namespace System.IO.Pipes.Tests
|
|||
}
|
||||
}
|
||||
|
||||
private static void DiposeServerAndVerifyClientBehaviour((Stream server, Stream client) connectedStreams, Action<Stream> assertMethod)
|
||||
private static void DisposeServerAndVerifyClientBehaviour((Stream server, Stream client) connectedStreams, Action<Stream> assertMethod)
|
||||
{
|
||||
connectedStreams.server.Dispose();
|
||||
|
||||
|
@ -333,7 +333,7 @@ namespace System.IO.Pipes.Tests
|
|||
assertMethod(connectedStreams.client);
|
||||
}
|
||||
|
||||
private static async Task DiposeServerAndVerifyClientBehaviourAsync((Stream server, Stream client) connectedStreams, Func<Stream, Task> assertMethod)
|
||||
private static async Task DisposeServerAndVerifyClientBehaviourAsync((Stream server, Stream client) connectedStreams, Func<Stream, Task> assertMethod)
|
||||
{
|
||||
await connectedStreams.server.DisposeAsync();
|
||||
|
||||
|
|
|
@ -621,7 +621,7 @@ namespace System.Net.Http
|
|||
// We are done with the HTTP2 connection attempt, no point to cancel it.
|
||||
Volatile.Write(ref waiter.ConnectionCancellationTokenSource, null);
|
||||
|
||||
// We don't care if this fails; that means the request was previously canceled or handeled by a different connection.
|
||||
// We don't care if this fails; that means the request was previously canceled or handled by a different connection.
|
||||
waiter.TrySetResult(null);
|
||||
|
||||
lock (SyncObj)
|
||||
|
|
|
@ -136,7 +136,7 @@ namespace System.Collections.Generic
|
|||
return;
|
||||
}
|
||||
|
||||
// Comparers differ need to rehash all the entires via Add
|
||||
// Comparers differ need to rehash all the entries via Add
|
||||
int count = source._count;
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
|
|
|
@ -543,7 +543,7 @@ namespace System.Runtime.Loader
|
|||
/// <param name="activating">Set CurrentContextualReflectionContext to the AssemblyLoadContext which loaded activating.</param>
|
||||
/// <returns>A disposable ContextualReflectionScope for use in a using block</returns>
|
||||
/// <remarks>
|
||||
/// Sets CurrentContextualReflectionContext to to the AssemblyLoadContext which loaded activating.
|
||||
/// Sets CurrentContextualReflectionContext to the AssemblyLoadContext which loaded activating.
|
||||
/// <see cref="System.Runtime.Loader.AssemblyLoadContext.CurrentContextualReflectionContext"/>
|
||||
///
|
||||
/// Returns a disposable ContextualReflectionScope for use in a using block. When the using calls the
|
||||
|
|
|
@ -187,9 +187,9 @@ namespace System
|
|||
// AdjustmentRule cannot express such rule using the DaylightTransitionStart and DaylightTransitionEnd because
|
||||
// the DaylightTransitionStart and DaylightTransitionEnd express the transition for every year.
|
||||
// We split the rule into more rules. The first rule will start from the start year of the original rule and ends at the end of the same year.
|
||||
// The second splitted rule would cover the middle range of the original rule and ranging from the year start+1 to
|
||||
// The second split rule would cover the middle range of the original rule and ranging from the year start+1 to
|
||||
// year end-1. The transition time in this rule would start from Jan 1st to end of December.
|
||||
// The last splitted rule would start from the Jan 1st of the end year of the original rule and ends at the end transition time of the original rule.
|
||||
// The last split rule would start from the Jan 1st of the end year of the original rule and ends at the end transition time of the original rule.
|
||||
|
||||
// Add the first rule.
|
||||
DateTime endForFirstRule = new DateTime(start.Year + 1, 1, 1).AddMilliseconds(-1); // At the end of the first year
|
||||
|
|
|
@ -59,7 +59,7 @@ namespace System.Xml.Xsl.XPath {
|
|||
// In simple XPath a/b[2] return value is pure iterator and can be left as it is
|
||||
// In more complex XPath (a/b)[2] resturn value is Tuple and should be isolated with context.
|
||||
// this can be done as grouping as well.
|
||||
// XSLT complies for-each and apply-templates in form (2) so converting to (3) shouldn't be a problem
|
||||
// XSLT compiles for-each and apply-templates in form (2) so converting to (3) shouldn't be a problem
|
||||
// -- It look like solution is group (a/b) with For(DocOrderDistinct(...)) and we are set.
|
||||
|
||||
// Methods that deal with XPath context. Xslt.QilGenerator calls these method as well:
|
||||
|
|
|
@ -150,7 +150,7 @@ namespace System.Xml.Xsl.XsltOld
|
|||
}
|
||||
if (expr.QueryTree != query)
|
||||
{
|
||||
// query was splitted and we need create new TheQuery for this template
|
||||
// query was split and we need create new TheQuery for this template
|
||||
compiler.QueryStore[this.MatchKey] = new TheQuery(
|
||||
new CompiledXpathExpr(query, expr.Expression, false),
|
||||
theQuery._ScopeManager
|
||||
|
|
|
@ -3395,9 +3395,9 @@ public static partial class DataContractSerializerTests
|
|||
|
||||
TestObjectInObjectContainerWithSimpleResolver(new SerializationTestTypes.CallBackSample_OnDeserialized_Public_Derived(), @"<ObjectContainer xmlns=""http://schemas.datacontract.org/2004/07/SerializationTestTypes"" xmlns:i=""http://www.w3.org/2001/XMLSchema-instance""><_data z:Id=""i1"" i:type=""a:SerializationTestTypes.CallBackSample_OnDeserialized_Public_Derived***"" xmlns:z=""http://schemas.microsoft.com/2003/10/Serialization/"" xmlns:a=""http://schemas.datacontract.org/2004/07/SerializationTestTypes.CallBackSample_OnDeserialized_Public_Derived***""><Data>string</Data><Data2>string</Data2></_data><_data2 z:Ref=""i1"" xmlns:z=""http://schemas.microsoft.com/2003/10/Serialization/""/></ObjectContainer>");
|
||||
|
||||
TestObjectInObjectContainerWithSimpleResolver(SerializationTestTypes.CDC_Possitive.CreateInstance(), @"<ObjectContainer xmlns=""http://schemas.datacontract.org/2004/07/SerializationTestTypes"" xmlns:i=""http://www.w3.org/2001/XMLSchema-instance""><_data z:Id=""i1"" i:type=""a:SerializationTestTypes.CDC_Possitive***"" xmlns:z=""http://schemas.microsoft.com/2003/10/Serialization/"" xmlns:a=""http://schemas.datacontract.org/2004/07/SerializationTestTypes.CDC_Possitive***""><string>112</string></_data><_data2 z:Ref=""i1"" xmlns:z=""http://schemas.microsoft.com/2003/10/Serialization/""/></ObjectContainer>");
|
||||
TestObjectInObjectContainerWithSimpleResolver(SerializationTestTypes.CDC_Positive.CreateInstance(), @"<ObjectContainer xmlns=""http://schemas.datacontract.org/2004/07/SerializationTestTypes"" xmlns:i=""http://www.w3.org/2001/XMLSchema-instance""><_data z:Id=""i1"" i:type=""a:SerializationTestTypes.CDC_Positive***"" xmlns:z=""http://schemas.microsoft.com/2003/10/Serialization/"" xmlns:a=""http://schemas.datacontract.org/2004/07/SerializationTestTypes.CDC_Positive***""><string>112</string></_data><_data2 z:Ref=""i1"" xmlns:z=""http://schemas.microsoft.com/2003/10/Serialization/""/></ObjectContainer>");
|
||||
|
||||
TestObjectInObjectContainerWithSimpleResolver(SerializationTestTypes.Base_Possitive_VirtualAdd.CreateInstance(), @"<ObjectContainer xmlns=""http://schemas.datacontract.org/2004/07/SerializationTestTypes"" xmlns:i=""http://www.w3.org/2001/XMLSchema-instance""><_data z:Id=""i1"" i:type=""a:SerializationTestTypes.Base_Possitive_VirtualAdd***"" xmlns:z=""http://schemas.microsoft.com/2003/10/Serialization/"" xmlns:a=""http://schemas.datacontract.org/2004/07/SerializationTestTypes.Base_Possitive_VirtualAdd***""><string>222323</string><string>222323</string></_data><_data2 z:Ref=""i1"" xmlns:z=""http://schemas.microsoft.com/2003/10/Serialization/""/></ObjectContainer>");
|
||||
TestObjectInObjectContainerWithSimpleResolver(SerializationTestTypes.Base_Positive_VirtualAdd.CreateInstance(), @"<ObjectContainer xmlns=""http://schemas.datacontract.org/2004/07/SerializationTestTypes"" xmlns:i=""http://www.w3.org/2001/XMLSchema-instance""><_data z:Id=""i1"" i:type=""a:SerializationTestTypes.Base_Positive_VirtualAdd***"" xmlns:z=""http://schemas.microsoft.com/2003/10/Serialization/"" xmlns:a=""http://schemas.datacontract.org/2004/07/SerializationTestTypes.Base_Positive_VirtualAdd***""><string>222323</string><string>222323</string></_data><_data2 z:Ref=""i1"" xmlns:z=""http://schemas.microsoft.com/2003/10/Serialization/""/></ObjectContainer>");
|
||||
|
||||
TestObjectInObjectContainerWithSimpleResolver(SerializationTestTypes.CDC_NewAddToPrivate.CreateInstance(), @"<ObjectContainer xmlns=""http://schemas.datacontract.org/2004/07/SerializationTestTypes"" xmlns:i=""http://www.w3.org/2001/XMLSchema-instance""><_data z:Id=""i1"" i:type=""a:SerializationTestTypes.CDC_NewAddToPrivate***"" xmlns:z=""http://schemas.microsoft.com/2003/10/Serialization/"" xmlns:a=""http://schemas.datacontract.org/2004/07/SerializationTestTypes.CDC_NewAddToPrivate***""><string>223213</string><string>223213</string></_data><_data2 z:Ref=""i1"" xmlns:z=""http://schemas.microsoft.com/2003/10/Serialization/""/></ObjectContainer>");
|
||||
|
||||
|
|
|
@ -656,9 +656,9 @@ namespace SerializationTestTypes
|
|||
_sampleTypeList.Add(typeof(CallBackSample_IDeserializationCallback_Explicit));
|
||||
_sampleTypeList.Add(typeof(CallBackSample_OnDeserialized_Private_Base));
|
||||
_sampleTypeList.Add(typeof(CallBackSample_OnDeserialized_Public_Derived));
|
||||
_sampleTypeList.Add(typeof(CDC_Possitive));
|
||||
_sampleTypeList.Add(typeof(CDC_Positive));
|
||||
_sampleTypeList.Add(typeof(CDC_PrivateAdd));
|
||||
_sampleTypeList.Add(typeof(Base_Possitive_VirtualAdd));
|
||||
_sampleTypeList.Add(typeof(Base_Positive_VirtualAdd));
|
||||
_sampleTypeList.Add(typeof(CDC_NewAddToPrivate));
|
||||
_sampleTypeList.Add(typeof(CDC_PrivateDefaultCtor));
|
||||
_sampleTypeList.Add(typeof(NonDCPerson));
|
||||
|
|
|
@ -4995,7 +4995,7 @@ namespace SerializationTestTypes
|
|||
}
|
||||
|
||||
[CollectionDataContract(IsReference = true)]
|
||||
public class CDC_Possitive : IList<string>
|
||||
public class CDC_Positive : IList<string>
|
||||
{
|
||||
private List<string> _innerList = new List<string>();
|
||||
|
||||
|
@ -5071,9 +5071,9 @@ namespace SerializationTestTypes
|
|||
return _innerList.GetEnumerator();
|
||||
}
|
||||
|
||||
public static CDC_Possitive CreateInstance()
|
||||
public static CDC_Positive CreateInstance()
|
||||
{
|
||||
CDC_Possitive list = new CDC_Possitive();
|
||||
CDC_Positive list = new CDC_Positive();
|
||||
list.Add("112");
|
||||
return list;
|
||||
}
|
||||
|
@ -5252,7 +5252,7 @@ namespace SerializationTestTypes
|
|||
}
|
||||
|
||||
[CollectionDataContract(IsReference = true)]
|
||||
public class Base_Possitive_VirtualAdd : IEnumerable<string>
|
||||
public class Base_Positive_VirtualAdd : IEnumerable<string>
|
||||
{
|
||||
private List<string> _innerList = new List<string>();
|
||||
|
||||
|
@ -5328,9 +5328,9 @@ namespace SerializationTestTypes
|
|||
return _innerList.GetEnumerator();
|
||||
}
|
||||
|
||||
public static Base_Possitive_VirtualAdd CreateInstance()
|
||||
public static Base_Positive_VirtualAdd CreateInstance()
|
||||
{
|
||||
Base_Possitive_VirtualAdd list = new Base_Possitive_VirtualAdd();
|
||||
Base_Positive_VirtualAdd list = new Base_Positive_VirtualAdd();
|
||||
list.Insert(0, "222323");
|
||||
list.Insert(1, "222323");
|
||||
return list;
|
||||
|
@ -5338,7 +5338,7 @@ namespace SerializationTestTypes
|
|||
}
|
||||
|
||||
[CollectionDataContract(IsReference = true)]
|
||||
public class CDC_NewAddToPrivate : Base_Possitive_VirtualAdd
|
||||
public class CDC_NewAddToPrivate : Base_Positive_VirtualAdd
|
||||
{
|
||||
private new void Add(string item)
|
||||
{
|
||||
|
|
|
@ -9,7 +9,7 @@ namespace System.Speech.Internal.SrgsCompiler
|
|||
{
|
||||
#region Constructors
|
||||
|
||||
internal Item(Backend backend, Rule rule, int minRepeat, int maxRepeat, float repeatProbability, float weigth)
|
||||
internal Item(Backend backend, Rule rule, int minRepeat, int maxRepeat, float repeatProbability, float weight)
|
||||
: base(backend, rule)
|
||||
{
|
||||
// Validated by the caller
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace System.Text.Json
|
|||
/// Writes the pre-encoded property name and <see cref="DateTimeOffset"/> value (as a JSON string) as part of a name/value pair of a JSON object.
|
||||
/// </summary>
|
||||
/// <param name="propertyName">The JSON-encoded name of the property to write.</param>
|
||||
/// <param name="value">The value to to write.</param>
|
||||
/// <param name="value">The value to write.</param>
|
||||
/// <exception cref="InvalidOperationException">
|
||||
/// Thrown if this would result in invalid JSON being written (while validation is enabled).
|
||||
/// </exception>
|
||||
|
@ -35,7 +35,7 @@ namespace System.Text.Json
|
|||
/// Writes the property name and <see cref="DateTimeOffset"/> value (as a JSON string) as part of a name/value pair of a JSON object.
|
||||
/// </summary>
|
||||
/// <param name="propertyName">The name of the property to write.</param>
|
||||
/// <param name="value">The value to to write.</param>
|
||||
/// <param name="value">The value to write.</param>
|
||||
/// <exception cref="ArgumentException">
|
||||
/// Thrown when the specified property name is too large.
|
||||
/// </exception>
|
||||
|
@ -62,7 +62,7 @@ namespace System.Text.Json
|
|||
/// Writes the property name and <see cref="DateTimeOffset"/> value (as a JSON string) as part of a name/value pair of a JSON object.
|
||||
/// </summary>
|
||||
/// <param name="propertyName">The name of the property to write.</param>
|
||||
/// <param name="value">The value to to write.</param>
|
||||
/// <param name="value">The value to write.</param>
|
||||
/// <exception cref="ArgumentException">
|
||||
/// Thrown when the specified property name is too large.
|
||||
/// </exception>
|
||||
|
@ -87,7 +87,7 @@ namespace System.Text.Json
|
|||
/// Writes the property name and <see cref="DateTimeOffset"/> value (as a JSON string) as part of a name/value pair of a JSON object.
|
||||
/// </summary>
|
||||
/// <param name="utf8PropertyName">The UTF-8 encoded property name of the JSON object to be written.</param>
|
||||
/// <param name="value">The value to to write.</param>
|
||||
/// <param name="value">The value to write.</param>
|
||||
/// <exception cref="ArgumentException">
|
||||
/// Thrown when the specified property name is too large.
|
||||
/// </exception>
|
||||
|
|
|
@ -971,7 +971,7 @@ namespace System.Text.RegularExpressions.Symbolic
|
|||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This function will rebuild concatenations because it pushes the FixedLengthMarker into the rightmost element.
|
||||
/// Due to this this function should not be called on every character.
|
||||
/// Due to this function should not be called on every character.
|
||||
/// </remarks>
|
||||
/// <param name="builder">the builder that owns this node</param>
|
||||
/// <param name="lengthSoFar">accumulater used in the recursion for lengths of paths</param>
|
||||
|
|
|
@ -805,7 +805,7 @@ namespace System.Threading.Tasks.Tests
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// ensure that calling ctr.Dipose() from within a cancellation callback will not deadlock.
|
||||
/// ensure that calling ctr.Dispose() from within a cancellation callback will not deadlock.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[Fact]
|
||||
|
|
|
@ -493,7 +493,7 @@ internal sealed class OletxResourceManager
|
|||
lock (ReenlistList)
|
||||
{
|
||||
// This will do a linear search of the list, but that is what we need to do because
|
||||
// the enlistments may change indicies while notifications are outstanding. Also,
|
||||
// the enlistments may change indices while notifications are outstanding. Also,
|
||||
// this does not throw if the enlistment isn't on the list.
|
||||
ReenlistPendingList.Remove(enlistment);
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ marshal_ilgen_available (void)
|
|||
static int
|
||||
stub_emit_marshal_ilgen (EmitMarshalContext *m, int argnum, MonoType *t,
|
||||
MonoMarshalSpec *spec, int conv_arg,
|
||||
MonoType **conv_arg_type, MarshalAction action, MonoMarshalLightweightCallbacks* lightweigth_cb)
|
||||
MonoType **conv_arg_type, MarshalAction action, MonoMarshalLightweightCallbacks* lightweight_cb)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ static void ilgen_init_internal (void);
|
|||
static int
|
||||
emit_marshal_ilgen (EmitMarshalContext *m, int argnum, MonoType *t,
|
||||
MonoMarshalSpec *spec, int conv_arg,
|
||||
MonoType **conv_arg_type, MarshalAction action, MonoMarshalLightweightCallbacks* lightweigth_cb);
|
||||
MonoType **conv_arg_type, MarshalAction action, MonoMarshalLightweightCallbacks* lightweight_cb);
|
||||
|
||||
static void ilgen_install_callbacks_mono (IlgenCallbacksToMono *callbacks);
|
||||
|
||||
|
@ -2723,7 +2723,7 @@ emit_marshal_variant_ilgen (EmitMarshalContext *m, int argnum, MonoType *t,
|
|||
static int
|
||||
emit_marshal_ilgen (EmitMarshalContext *m, int argnum, MonoType *t,
|
||||
MonoMarshalSpec *spec, int conv_arg,
|
||||
MonoType **conv_arg_type, MarshalAction action, MonoMarshalLightweightCallbacks* lightweigth_cb)
|
||||
MonoType **conv_arg_type, MarshalAction action, MonoMarshalLightweightCallbacks* lightweight_cb)
|
||||
{
|
||||
if (spec && spec->native == MONO_NATIVE_CUSTOM)
|
||||
return emit_marshal_custom_ilgen (m, argnum, t, spec, conv_arg, conv_arg_type, action);
|
||||
|
@ -2785,7 +2785,7 @@ emit_marshal_ilgen (EmitMarshalContext *m, int argnum, MonoType *t,
|
|||
case MONO_TYPE_I8:
|
||||
case MONO_TYPE_U8:
|
||||
case MONO_TYPE_FNPTR:
|
||||
return lightweigth_cb->emit_marshal_scalar (m, argnum, t, spec, conv_arg, conv_arg_type, action);
|
||||
return lightweight_cb->emit_marshal_scalar (m, argnum, t, spec, conv_arg, conv_arg_type, action);
|
||||
case MONO_TYPE_GENERICINST:
|
||||
if (mono_type_generic_inst_is_valuetype (t))
|
||||
return emit_marshal_vtype_ilgen (m, argnum, t, spec, conv_arg, conv_arg_type, action);
|
||||
|
|
|
@ -15,7 +15,7 @@ typedef struct MonoComponentMarshalILgen {
|
|||
void (*ilgen_init_internal) (void);
|
||||
int (*emit_marshal_ilgen) (EmitMarshalContext *m, int argnum, MonoType *t,
|
||||
MonoMarshalSpec *spec, int conv_arg,
|
||||
MonoType **conv_arg_type, MarshalAction action, MonoMarshalLightweightCallbacks* lightweigth_cb);
|
||||
MonoType **conv_arg_type, MarshalAction action, MonoMarshalLightweightCallbacks* lightweight_cb);
|
||||
void (*install_callbacks_mono) (IlgenCallbacksToMono *callbacks);
|
||||
} MonoComponentMarshalILgen;
|
||||
|
||||
|
|
|
@ -136,30 +136,30 @@ mono_public_tokens_are_equal (const unsigned char *pubt1, const unsigned char *p
|
|||
void
|
||||
mono_set_assemblies_path (const char* path)
|
||||
{
|
||||
char **splitted, **dest;
|
||||
char **split, **dest;
|
||||
|
||||
splitted = g_strsplit (path, G_SEARCHPATH_SEPARATOR_S, 1000);
|
||||
split = g_strsplit (path, G_SEARCHPATH_SEPARATOR_S, 1000);
|
||||
if (assemblies_path)
|
||||
g_strfreev (assemblies_path);
|
||||
assemblies_path = dest = splitted;
|
||||
while (*splitted) {
|
||||
char *tmp = *splitted;
|
||||
assemblies_path = dest = split;
|
||||
while (*split) {
|
||||
char *tmp = *split;
|
||||
if (*tmp)
|
||||
*dest++ = mono_path_canonicalize (tmp);
|
||||
g_free (tmp);
|
||||
splitted++;
|
||||
split++;
|
||||
}
|
||||
*dest = *splitted;
|
||||
*dest = *split;
|
||||
|
||||
if (g_hasenv ("MONO_DEBUG"))
|
||||
return;
|
||||
|
||||
splitted = assemblies_path;
|
||||
while (*splitted) {
|
||||
if (**splitted && !g_file_test (*splitted, G_FILE_TEST_IS_DIR))
|
||||
g_warning ("'%s' in MONO_PATH doesn't exist or has wrong permissions.", *splitted);
|
||||
split = assemblies_path;
|
||||
while (*split) {
|
||||
if (**split && !g_file_test (*split, G_FILE_TEST_IS_DIR))
|
||||
g_warning ("'%s' in MONO_PATH doesn't exist or has wrong permissions.", *split);
|
||||
|
||||
splitted++;
|
||||
split++;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -641,7 +641,7 @@ mono_assembly_remap_version (MonoAssemblyName *aname, MonoAssemblyName *dest_ana
|
|||
if (aname->name == NULL || !(aname->flags & ASSEMBLYREF_RETARGETABLE_FLAG))
|
||||
return aname;
|
||||
|
||||
// Retargeting was mainly done on .NET Framework or Portable Class Libraries, remap to version 4.0.0.0
|
||||
// Retargeting was mainly done on .NET Framework or Portable Class Libraries, remap to version 4.0.0.0
|
||||
// so the .NET Framework compatibility facades like mscorlib.dll can kick in
|
||||
memcpy (dest_aname, aname, sizeof(MonoAssemblyName));
|
||||
dest_aname->major = 4;
|
||||
|
|
|
@ -415,7 +415,7 @@ bb_formation_il_pass (const unsigned char *start, const unsigned char *end, Mono
|
|||
if (!branch)
|
||||
return;
|
||||
|
||||
/*If we splitted the current BB*/
|
||||
/*If we split the current BB*/
|
||||
if (offset < cli_addr && branch->start > current->start)
|
||||
current = branch;
|
||||
if (ip < end) {
|
||||
|
|
|
@ -2286,14 +2286,14 @@ mono_main (int argc, char* argv[])
|
|||
} else if (strncmp (argv [i], "--apply-bindings=", 17) == 0) {
|
||||
extra_bindings_config_file = &argv[i][17];
|
||||
} else if (strncmp (argv [i], "--aot-path=", 11) == 0) {
|
||||
char **splitted;
|
||||
char **split;
|
||||
|
||||
splitted = g_strsplit (argv [i] + 11, G_SEARCHPATH_SEPARATOR_S, 1000);
|
||||
while (*splitted) {
|
||||
char *tmp = *splitted;
|
||||
split = g_strsplit (argv [i] + 11, G_SEARCHPATH_SEPARATOR_S, 1000);
|
||||
while (*split) {
|
||||
char *tmp = *split;
|
||||
mono_aot_paths = g_list_append (mono_aot_paths, g_strdup (tmp));
|
||||
g_free (tmp);
|
||||
splitted++;
|
||||
split++;
|
||||
}
|
||||
} else if (strncmp (argv [i], "--compile-all=", 14) == 0) {
|
||||
action = DO_COMPILE;
|
||||
|
|
|
@ -25,7 +25,7 @@ public unsafe class Tests {
|
|||
{
|
||||
return int_field + a;
|
||||
}
|
||||
|
||||
|
||||
[StructLayout (LayoutKind.Sequential)]
|
||||
public struct SimpleStruct {
|
||||
public bool a;
|
||||
|
@ -70,9 +70,9 @@ public unsafe class Tests {
|
|||
public struct DelegateStruct {
|
||||
public int a;
|
||||
public SimpleDelegate del;
|
||||
[MarshalAs(UnmanagedType.FunctionPtr)]
|
||||
[MarshalAs(UnmanagedType.FunctionPtr)]
|
||||
public SimpleDelegate del2;
|
||||
[MarshalAs(UnmanagedType.FunctionPtr)]
|
||||
[MarshalAs(UnmanagedType.FunctionPtr)]
|
||||
public SimpleDelegate del3;
|
||||
}
|
||||
|
||||
|
@ -81,7 +81,7 @@ public unsafe class Tests {
|
|||
public double d;
|
||||
}
|
||||
|
||||
/* sparcv9 has complex conventions when passing structs with doubles in them
|
||||
/* sparcv9 has complex conventions when passing structs with doubles in them
|
||||
by value, some simple tests for them */
|
||||
[StructLayout (LayoutKind.Sequential)]
|
||||
public struct Point {
|
||||
|
@ -94,7 +94,7 @@ public unsafe class Tests {
|
|||
public int x;
|
||||
public double y;
|
||||
}
|
||||
|
||||
|
||||
[StructLayout (LayoutKind.Sequential)]
|
||||
public struct TinyStruct {
|
||||
public TinyStruct (int i)
|
||||
|
@ -231,7 +231,7 @@ public unsafe class Tests {
|
|||
public static extern int mono_test_marshal_unicode_string_array (string [] a1, [MarshalAs(UnmanagedType.LPArray, ArraySubType=UnmanagedType.LPStr)]string [] a2);
|
||||
|
||||
[DllImport ("libtest", EntryPoint="mono_test_marshal_stringbuilder_array")]
|
||||
public static extern int mono_test_marshal_stringbuilder_array (StringBuilder [] a1);
|
||||
public static extern int mono_test_marshal_stringbuilder_array (StringBuilder [] a1);
|
||||
|
||||
[DllImport ("libtest", EntryPoint="mono_test_marshal_inout_array")]
|
||||
public static extern int mono_test_marshal_inout_array ([In, Out] int [] a1);
|
||||
|
@ -247,10 +247,10 @@ public unsafe class Tests {
|
|||
|
||||
[DllImport ("libtest", EntryPoint="mono_test_marshal_inout_nonblittable_array", CharSet = CharSet.Unicode)]
|
||||
public static extern int mono_test_marshal_inout_nonblittable_array ([In, Out] char [] a1);
|
||||
|
||||
|
||||
[DllImport ("libtest", EntryPoint="mono_test_marshal_struct")]
|
||||
public static extern int mono_test_marshal_struct (SimpleStruct ss);
|
||||
|
||||
|
||||
[DllImport ("libtest", EntryPoint="mono_test_marshal_struct")]
|
||||
public static extern int mono_test_marshal_struct_gen (SimpleStructGen<string> ss);
|
||||
|
||||
|
@ -351,12 +351,12 @@ public unsafe class Tests {
|
|||
public static extern int mono_test_asany_unicode ([MarshalAs (UnmanagedType.AsAny)] object o, int what);
|
||||
|
||||
[DllImport("libtest", EntryPoint="mono_test_marshal_asany_in")]
|
||||
static extern void mono_test_asany_in ([MarshalAs(UnmanagedType.AsAny)][In] object obj);
|
||||
static extern void mono_test_asany_in ([MarshalAs(UnmanagedType.AsAny)][In] object obj);
|
||||
|
||||
[DllImport("libtest", EntryPoint="mono_test_marshal_asany_out")]
|
||||
static extern void mono_test_asany_out ([MarshalAs(UnmanagedType.AsAny)][Out] object obj);
|
||||
static extern void mono_test_asany_out ([MarshalAs(UnmanagedType.AsAny)][Out] object obj);
|
||||
[DllImport("libtest", EntryPoint="mono_test_marshal_asany_inout")]
|
||||
static extern void mono_test_asany_inout ([MarshalAs(UnmanagedType.AsAny)][In, Out] object obj);
|
||||
static extern void mono_test_asany_inout ([MarshalAs(UnmanagedType.AsAny)][In, Out] object obj);
|
||||
|
||||
[DllImport ("libtest")]
|
||||
static extern int class_marshal_test0 (SimpleObj obj);
|
||||
|
@ -366,7 +366,7 @@ public unsafe class Tests {
|
|||
|
||||
[DllImport ("libtest")]
|
||||
static extern int class_marshal_test4 (SimpleObj obj);
|
||||
|
||||
|
||||
[DllImport ("libtest")]
|
||||
static extern int string_marshal_test0 (string str);
|
||||
|
||||
|
@ -486,7 +486,7 @@ public unsafe class Tests {
|
|||
ss.b = true;
|
||||
ss.d = "TEST";
|
||||
ss.d2 = "OK";
|
||||
|
||||
|
||||
return mono_test_marshal_struct (ss);
|
||||
}
|
||||
|
||||
|
@ -495,7 +495,7 @@ public unsafe class Tests {
|
|||
ss.b = true;
|
||||
ss.d = "TEST";
|
||||
ss.d2 = "OK";
|
||||
|
||||
|
||||
return mono_test_marshal_struct_gen (ss);
|
||||
}
|
||||
|
||||
|
@ -540,7 +540,7 @@ public unsafe class Tests {
|
|||
EmptyStructCpp es = new EmptyStructCpp ();
|
||||
|
||||
mono_test_return_empty_struct_cpp (42);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
*/
|
||||
|
@ -549,7 +549,7 @@ public unsafe class Tests {
|
|||
SimpleStruct ss = new SimpleStruct ();
|
||||
ss.b = true;
|
||||
ss.d = "TEST";
|
||||
|
||||
|
||||
return mono_test_marshal_lpstruct (ss);
|
||||
}
|
||||
|
||||
|
@ -557,7 +557,7 @@ public unsafe class Tests {
|
|||
Point p = new Point ();
|
||||
p.x = 1.0;
|
||||
p.y = 2.0;
|
||||
|
||||
|
||||
return mono_test_marshal_lpstruct_blittable (p);
|
||||
}
|
||||
|
||||
|
@ -618,7 +618,7 @@ public unsafe class Tests {
|
|||
SimpleClass res = mono_test_marshal_class (10, 11, 12, ss, 14);
|
||||
if (res == null)
|
||||
return 1;
|
||||
if (! (res.a == ss.a && res.b == ss.b && res.c == ss.c &&
|
||||
if (! (res.a == ss.a && res.b == ss.b && res.c == ss.c &&
|
||||
res.d == ss.d && res.e == ss.e && res.f == ss.f &&
|
||||
res.g == ss.g && res.h == ss.h))
|
||||
return 2;
|
||||
|
@ -767,7 +767,7 @@ public unsafe class Tests {
|
|||
Point pt = new Point();
|
||||
pt.x = 1.25;
|
||||
pt.y = 3.5;
|
||||
|
||||
|
||||
return mono_test_marshal_point(pt);
|
||||
}
|
||||
|
||||
|
@ -775,7 +775,7 @@ public unsafe class Tests {
|
|||
MixedPoint mpt = new MixedPoint();
|
||||
mpt.x = 5;
|
||||
mpt.y = 6.75;
|
||||
|
||||
|
||||
return mono_test_marshal_mixed_point(mpt);
|
||||
}
|
||||
|
||||
|
@ -873,7 +873,7 @@ public unsafe class Tests {
|
|||
String res = sb.ToString();
|
||||
|
||||
if (res != "This is my message. Isn't it nice?")
|
||||
return 1;
|
||||
return 1;
|
||||
|
||||
// Test StringBuilder with default capacity (16)
|
||||
StringBuilder sb2 = new StringBuilder();
|
||||
|
@ -918,23 +918,23 @@ public unsafe class Tests {
|
|||
String res = sb.ToString();
|
||||
|
||||
if (res != "This is my message. Isn't it nice?")
|
||||
return 1;
|
||||
return 1;
|
||||
|
||||
// Test StringBuilder with default capacity (16)
|
||||
StringBuilder sb2 = new StringBuilder();
|
||||
mono_test_marshal_stringbuilder_unicode (sb2, sb2.Capacity);
|
||||
if (sb2.ToString () != "This is my messa")
|
||||
return 2;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static int test_0_marshal_stringbuilder_out () {
|
||||
StringBuilder sb;
|
||||
mono_test_marshal_stringbuilder_out (out sb);
|
||||
|
||||
|
||||
if (sb.ToString () != "This is my message. Isn't it nice?")
|
||||
return 1;
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -943,7 +943,7 @@ public unsafe class Tests {
|
|||
mono_test_marshal_stringbuilder_out_unicode (out sb);
|
||||
|
||||
if (sb.ToString () != "This is my message. Isn't it nice?")
|
||||
return 1;
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -953,16 +953,16 @@ public unsafe class Tests {
|
|||
int res = mono_test_marshal_stringbuilder_ref (ref sb);
|
||||
if (res != 0)
|
||||
return 1;
|
||||
|
||||
|
||||
if (sb.ToString () != "This is my message. Isn't it nice?")
|
||||
return 2;
|
||||
return 2;
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static int test_0_marshal_stringbuilder_utf16_tolower () {
|
||||
StringBuilder sb = new StringBuilder (3);
|
||||
sb.Append ("ABC").Append ("DEF");
|
||||
|
||||
|
||||
mono_test_marshal_stringbuilder_utf16_tolower (sb, sb.Length);
|
||||
if (sb.ToString () != "abcdef")
|
||||
return 1;
|
||||
|
@ -973,7 +973,7 @@ public unsafe class Tests {
|
|||
public static int test_0_marshal_stringbuilder_utf16_tolower_in () {
|
||||
StringBuilder sb = new StringBuilder (3);
|
||||
sb.Append ("ABC").Append ("DEF");
|
||||
|
||||
|
||||
mono_test_marshal_stringbuilder_utf16_tolower_in (sb, sb.Length);
|
||||
if (sb.ToString () != "ABCDEF")
|
||||
return 1;
|
||||
|
@ -1039,7 +1039,7 @@ public unsafe class Tests {
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* Check that the runtime adds lib to to the library name */
|
||||
/* Check that the runtime adds lib to the library name */
|
||||
public static int test_0_add_lib_to_name () {
|
||||
|
||||
mono_test_marshal_char_3 ('A');
|
||||
|
@ -1194,10 +1194,10 @@ public unsafe class Tests {
|
|||
public int k;
|
||||
public int l;
|
||||
}
|
||||
|
||||
|
||||
[DllImport ("libtest", EntryPoint="mono_test_marshal_amd64_pass_return_struct1")]
|
||||
public static extern Amd64Struct1 mono_test_marshal_amd64_pass_return_struct1 (Amd64Struct1 s);
|
||||
|
||||
|
||||
[DllImport ("libtest", EntryPoint="mono_test_marshal_amd64_pass_return_struct1_many_args")]
|
||||
public static extern Amd64Struct1 mono_test_marshal_amd64_pass_return_struct1_many_args (Amd64Struct1 s, int i1, int i2, int i3, int i4, int i5, int i6, int i7, int i8);
|
||||
|
||||
|
@ -1232,7 +1232,7 @@ public unsafe class Tests {
|
|||
public int i;
|
||||
public int j;
|
||||
}
|
||||
|
||||
|
||||
[DllImport ("libtest", EntryPoint="mono_test_marshal_amd64_pass_return_struct2")]
|
||||
public static extern Amd64Struct2 mono_test_marshal_amd64_pass_return_struct2 (Amd64Struct2 s);
|
||||
|
||||
|
@ -1252,7 +1252,7 @@ public unsafe class Tests {
|
|||
public struct Amd64Struct3 {
|
||||
public int i;
|
||||
}
|
||||
|
||||
|
||||
[DllImport ("libtest", EntryPoint="mono_test_marshal_amd64_pass_return_struct3")]
|
||||
public static extern Amd64Struct3 mono_test_marshal_amd64_pass_return_struct3 (Amd64Struct3 s);
|
||||
|
||||
|
@ -1271,7 +1271,7 @@ public unsafe class Tests {
|
|||
public struct Amd64Struct4 {
|
||||
public double d1, d2;
|
||||
}
|
||||
|
||||
|
||||
[DllImport ("libtest", EntryPoint="mono_test_marshal_amd64_pass_return_struct4")]
|
||||
public static extern Amd64Struct4 mono_test_marshal_amd64_pass_return_struct4 (Amd64Struct4 s);
|
||||
|
||||
|
@ -1295,7 +1295,7 @@ public unsafe class Tests {
|
|||
public struct TestStruct5 {
|
||||
public float d1, d2;
|
||||
}
|
||||
|
||||
|
||||
[DllImport ("libtest", EntryPoint="mono_test_marshal_ia64_pass_return_struct5")]
|
||||
public static extern TestStruct5 mono_test_marshal_ia64_pass_return_struct5 (double d1, double d2, TestStruct5 s, int i, double f3, double f4);
|
||||
|
||||
|
@ -1315,7 +1315,7 @@ public unsafe class Tests {
|
|||
public struct TestStruct6 {
|
||||
public double d1, d2;
|
||||
}
|
||||
|
||||
|
||||
[DllImport ("libtest", EntryPoint="mono_test_marshal_ia64_pass_return_struct6")]
|
||||
public static extern TestStruct6 mono_test_marshal_ia64_pass_return_struct6 (double d1, double d2, TestStruct6 s, int i, double f3, double f4);
|
||||
|
||||
|
@ -1328,7 +1328,7 @@ public unsafe class Tests {
|
|||
|
||||
return (s2.d1 == 12.0 && s2.d2 == 3.0) ? 0 : 1;
|
||||
}
|
||||
|
||||
|
||||
/* Blittable class */
|
||||
[DllImport("libtest")]
|
||||
private static extern BlittableClass TestBlittableClass (BlittableClass vl);
|
||||
|
@ -1341,7 +1341,7 @@ public unsafe class Tests {
|
|||
|
||||
if (v1.a != 2 || v1.b != 3)
|
||||
return 1;
|
||||
|
||||
|
||||
if (v2.a != 2 || v2.b != 3)
|
||||
return 2;
|
||||
|
||||
|
@ -1350,7 +1350,7 @@ public unsafe class Tests {
|
|||
|
||||
if (v3.a != 42 || v3.b != 43)
|
||||
return 3;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1365,7 +1365,7 @@ public unsafe class Tests {
|
|||
public T k;
|
||||
public T l;
|
||||
}
|
||||
|
||||
|
||||
[DllImport ("libtest", EntryPoint="mono_test_marshal_amd64_pass_return_struct1")]
|
||||
public static extern Amd64Struct1Gen<int> mono_test_marshal_amd64_pass_return_struct1_gen (Amd64Struct1Gen<int> s);
|
||||
|
||||
|
@ -1389,7 +1389,7 @@ public unsafe class Tests {
|
|||
SimpleObj obj0 = new SimpleObj ();
|
||||
obj0.str = "T1";
|
||||
obj0.i = 4;
|
||||
|
||||
|
||||
if (class_marshal_test0 (obj0) != 0)
|
||||
return 1;
|
||||
|
||||
|
@ -1423,7 +1423,7 @@ public unsafe class Tests {
|
|||
|
||||
public static int test_0_marshal_out_string () {
|
||||
string res;
|
||||
|
||||
|
||||
string_marshal_test1 (out res);
|
||||
|
||||
if (res != "TEST1")
|
||||
|
@ -1546,7 +1546,7 @@ public unsafe class Tests {
|
|||
|
||||
public static int test_0_pass_return_lwpstr () {
|
||||
string s;
|
||||
|
||||
|
||||
mono_test_marshal_lpwstr_out_marshal (out s);
|
||||
|
||||
if (s != "ABC")
|
||||
|
@ -1557,13 +1557,13 @@ public unsafe class Tests {
|
|||
|
||||
if (s != "ABC")
|
||||
return 2;
|
||||
|
||||
return 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static int test_0_out_lwpstr () {
|
||||
string s = "ABC";
|
||||
|
||||
|
||||
string res = mono_test_marshal_lpwstr_marshal (s, s.Length);
|
||||
|
||||
if (res != "ABC")
|
||||
|
@ -1573,8 +1573,8 @@ public unsafe class Tests {
|
|||
|
||||
if (res2 != "ABC")
|
||||
return 2;
|
||||
|
||||
return 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1584,9 +1584,9 @@ public unsafe class Tests {
|
|||
[DllImport("libtest")]
|
||||
extern static int marshal_test_ref_bool
|
||||
(
|
||||
int i,
|
||||
[MarshalAs(UnmanagedType.I1)] ref bool b1,
|
||||
[MarshalAs(UnmanagedType.VariantBool)] ref bool b2,
|
||||
int i,
|
||||
[MarshalAs(UnmanagedType.I1)] ref bool b1,
|
||||
[MarshalAs(UnmanagedType.VariantBool)] ref bool b2,
|
||||
ref bool b3
|
||||
);
|
||||
|
||||
|
@ -1718,7 +1718,7 @@ public unsafe class Tests {
|
|||
} catch (Exception ex) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -1758,7 +1758,7 @@ public unsafe class Tests {
|
|||
/*
|
||||
* Calling pinvoke functions dynamically using calli
|
||||
*/
|
||||
|
||||
|
||||
[DllImport("libtest")]
|
||||
private static extern IntPtr mono_test_marshal_lookup_symbol (string fileName);
|
||||
|
||||
|
|
|
@ -111,9 +111,9 @@ public class CriticalHandleTest
|
|||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
private static void InWorker(IntPtr handleValue)
|
||||
{
|
||||
MyCriticalHandle hande = new MyCriticalHandle() { Handle = handleValue };
|
||||
MyCriticalHandle handle = new MyCriticalHandle() { Handle = handleValue };
|
||||
IntPtr value;
|
||||
value = Native.In(hande, s_handleCallback);
|
||||
value = Native.In(handle, s_handleCallback);
|
||||
Assert.Equal(handleValue.ToInt32(), value.ToInt32());
|
||||
}
|
||||
|
||||
|
@ -129,8 +129,8 @@ public class CriticalHandleTest
|
|||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
private static void RetWorker(IntPtr handleValue)
|
||||
{
|
||||
MyCriticalHandle hande = Native.Ret(handleValue);
|
||||
Assert.Equal(handleValue.ToInt32(), hande.Handle.ToInt32());
|
||||
MyCriticalHandle handle = Native.Ret(handleValue);
|
||||
Assert.Equal(handleValue.ToInt32(), handle.Handle.ToInt32());
|
||||
}
|
||||
|
||||
public static void Out()
|
||||
|
@ -145,9 +145,9 @@ public class CriticalHandleTest
|
|||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
private static void OutWorker(IntPtr handleValue)
|
||||
{
|
||||
MyCriticalHandle hande;
|
||||
Native.Out(handleValue, out hande);
|
||||
Assert.Equal(handleValue.ToInt32(), hande.Handle.ToInt32());
|
||||
MyCriticalHandle handle;
|
||||
Native.Out(handleValue, out handle);
|
||||
Assert.Equal(handleValue.ToInt32(), handle.Handle.ToInt32());
|
||||
}
|
||||
|
||||
public static void InRef()
|
||||
|
@ -162,9 +162,9 @@ public class CriticalHandleTest
|
|||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
private static void InRefWorker(IntPtr handleValue)
|
||||
{
|
||||
MyCriticalHandle hande = new MyCriticalHandle() { Handle = handleValue };
|
||||
Native.InRef(ref hande, s_handleCallback);
|
||||
Assert.Equal(handleValue.ToInt32(), hande.Handle.ToInt32());
|
||||
MyCriticalHandle handle = new MyCriticalHandle() { Handle = handleValue };
|
||||
Native.InRef(ref handle, s_handleCallback);
|
||||
Assert.Equal(handleValue.ToInt32(), handle.Handle.ToInt32());
|
||||
}
|
||||
|
||||
public static void Ref()
|
||||
|
@ -179,9 +179,9 @@ public class CriticalHandleTest
|
|||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
private static void RefWorker(IntPtr handleValue)
|
||||
{
|
||||
MyCriticalHandle hande = new MyCriticalHandle() { Handle = handleValue };
|
||||
Native.Ref(ref hande, s_handleCallback);
|
||||
Assert.Equal(handleValue.ToInt32(), hande.Handle.ToInt32());
|
||||
MyCriticalHandle handle = new MyCriticalHandle() { Handle = handleValue };
|
||||
Native.Ref(ref handle, s_handleCallback);
|
||||
Assert.Equal(handleValue.ToInt32(), handle.Handle.ToInt32());
|
||||
}
|
||||
|
||||
public static void RefModify()
|
||||
|
@ -198,9 +198,9 @@ public class CriticalHandleTest
|
|||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
private static void RefModifyWorker(IntPtr handleValue1, IntPtr handleValue2)
|
||||
{
|
||||
MyCriticalHandle hande = new MyCriticalHandle() { Handle = handleValue1 };
|
||||
Native.RefModify(handleValue2, ref hande, s_handleCallback);
|
||||
Assert.Equal(handleValue2.ToInt32(), hande.Handle.ToInt32());
|
||||
MyCriticalHandle handle = new MyCriticalHandle() { Handle = handleValue1 };
|
||||
Native.RefModify(handleValue2, ref handle, s_handleCallback);
|
||||
Assert.Equal(handleValue2.ToInt32(), handle.Handle.ToInt32());
|
||||
}
|
||||
|
||||
internal class Native
|
||||
|
|
|
@ -9,7 +9,7 @@ namespace BMI1Intrinsics
|
|||
|
||||
static int Main()
|
||||
{
|
||||
// bmi1 expression are folded to to hwintrinsics that return identical results
|
||||
// bmi1 expression are folded to hwintrinsics that return identical results
|
||||
|
||||
var values = new (uint input1, uint input2, uint andnExpected, uint blsiExpected, uint blsrExpected, uint blmskExpected)[] {
|
||||
(0, 0, 0, 0 ,0 ,0xFFFFFFFF),
|
||||
|
|
|
@ -4,7 +4,7 @@ using Xunit;
|
|||
|
||||
public class Program_widen
|
||||
{
|
||||
// Random field we assign some bogus values to to trick the inliner below.
|
||||
// Random field we assign some bogus values to trick the inliner below.
|
||||
// We cannot use NoInlining as the runtime disables tailcalls from such functions.
|
||||
private static int s_val;
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ public static class Tests
|
|||
{
|
||||
private static byte[] smallArr => new byte[10];
|
||||
|
||||
// RangeCheck analysis should eliminate the bounds check on
|
||||
// RangeCheck analysis should eliminate the bounds check on
|
||||
// smallArr.
|
||||
public static void MulInsideRange()
|
||||
{
|
||||
|
@ -62,7 +62,7 @@ public static class Tests
|
|||
}
|
||||
}
|
||||
|
||||
// RangeCheck analysis should keep the bounds check on
|
||||
// RangeCheck analysis should keep the bounds check on
|
||||
// smallArr.
|
||||
public static void MulOutsideRange()
|
||||
{
|
||||
|
@ -72,13 +72,13 @@ public static class Tests
|
|||
}
|
||||
}
|
||||
|
||||
private static byte[] bigArr => new byte[268435460];
|
||||
private static byte[] bigArr => new byte[268435460];
|
||||
|
||||
// RangeCheck analysis should detect that the multiplcation
|
||||
// overflows and keep all range checks for bigArr. bigArr
|
||||
// size, and the bounds on the loop were carefully chosen to to
|
||||
// potentially spoof the RangeCheck analysis to eliminate a bound
|
||||
// check IF overflow detection on GT_MUL for RangeCheck is implemented
|
||||
// size, and the bounds on the loop were carefully chosen to
|
||||
// potentially spoof the RangeCheck analysis to eliminate a bound
|
||||
// check IF overflow detection on GT_MUL for RangeCheck is implemented
|
||||
// incorrectly.
|
||||
public static void MulOverflow()
|
||||
{
|
||||
|
@ -88,7 +88,7 @@ public static class Tests
|
|||
}
|
||||
}
|
||||
|
||||
// RangeCheck analysis should eliminate the bounds check on
|
||||
// RangeCheck analysis should eliminate the bounds check on
|
||||
// smallArr.
|
||||
public static void LshInsideRange()
|
||||
{
|
||||
|
@ -98,7 +98,7 @@ public static class Tests
|
|||
}
|
||||
}
|
||||
|
||||
// RangeCheck analysis should keep the bounds check on
|
||||
// RangeCheck analysis should keep the bounds check on
|
||||
// smallArr.
|
||||
public static void LshOutsideRange()
|
||||
{
|
||||
|
|
|
@ -37,7 +37,7 @@ public int FldPubInst;
|
|||
protected int FldFamInst; //Translates to "family"
|
||||
internal int FldAsmInst; //Translates to "assembly"
|
||||
protected internal int FldFoaInst; //Translates to "famorassem"
|
||||
|
||||
|
||||
//////////////////////////////
|
||||
// Static Fields
|
||||
public static int FldPubStat;
|
||||
|
@ -138,7 +138,7 @@ public int Test(){
|
|||
|
||||
//@csharp - Note that C# will not compile an illegal access of FldPrivInst
|
||||
//So there is no negative test here, it should be covered elsewhere and
|
||||
//should throw a FielAccessException within the runtime. (IL sources is
|
||||
//should throw a FieldAccessException within the runtime. (IL sources is
|
||||
//the most logical, only?, choice)
|
||||
|
||||
FldFamInst = 100;
|
||||
|
@ -174,7 +174,7 @@ public int Test(){
|
|||
mi_RetCode = 0;
|
||||
|
||||
/////////////////////////////////
|
||||
// Test instance method access
|
||||
// Test instance method access
|
||||
if(MethPubInst() != 100)
|
||||
mi_RetCode = 0;
|
||||
|
||||
|
@ -203,7 +203,7 @@ public int Test(){
|
|||
mi_RetCode = 0;
|
||||
|
||||
if(MethFoaStat() != 100)
|
||||
mi_RetCode = 0;
|
||||
mi_RetCode = 0;
|
||||
|
||||
/////////////////////////////////
|
||||
// Test virtual method access
|
||||
|
@ -219,7 +219,7 @@ public int Test(){
|
|||
mi_RetCode = 0;
|
||||
|
||||
if(MethFoaVirt() != 100)
|
||||
mi_RetCode = 0;
|
||||
mi_RetCode = 0;
|
||||
|
||||
return mi_RetCode;
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ public int Test(){
|
|||
|
||||
//@csharp - Note that C# will not compile an illegal access of FldPrivInst
|
||||
//So there is no negative test here, it should be covered elsewhere and
|
||||
//should throw a FielAccessException within the runtime. (IL sources is
|
||||
//should throw a FieldAccessException within the runtime. (IL sources is
|
||||
//the most logical, only?, choice)
|
||||
|
||||
FldFamInst = 100;
|
||||
|
@ -69,7 +69,7 @@ public int Test(){
|
|||
mi_RetCode = 0;
|
||||
|
||||
/////////////////////////////////
|
||||
// Test instance method access
|
||||
// Test instance method access
|
||||
if(MethPubInst() != 100)
|
||||
mi_RetCode = 0;
|
||||
|
||||
|
@ -92,7 +92,7 @@ public int Test(){
|
|||
mi_RetCode = 0;
|
||||
|
||||
if(MethFoaStat() != 100)
|
||||
mi_RetCode = 0;
|
||||
mi_RetCode = 0;
|
||||
|
||||
/////////////////////////////////
|
||||
// Test virtual method access
|
||||
|
@ -105,7 +105,7 @@ public int Test(){
|
|||
mi_RetCode = 0;
|
||||
|
||||
if(MethFoaVirt() != 100)
|
||||
mi_RetCode = 0;
|
||||
mi_RetCode = 0;
|
||||
|
||||
return mi_RetCode;
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ public int Test(B b){
|
|||
|
||||
//@csharp - Note that C# will not compile an illegal access of b.FldPrivInst
|
||||
//So there is no negative test here, it should be covered elsewhere and
|
||||
//should throw a FielAccessException within the runtime. (IL sources is
|
||||
//should throw a FieldAccessException within the runtime. (IL sources is
|
||||
//the most logical, only?, choice)
|
||||
|
||||
//@csharp - C# Won't compile illegal family access from non-family members
|
||||
|
@ -78,7 +78,7 @@ public int Test(B b){
|
|||
mi_RetCode = 0;
|
||||
|
||||
/////////////////////////////////
|
||||
// Test instance b.Method access
|
||||
// Test instance b.Method access
|
||||
if(b.MethPubInst() != 100)
|
||||
mi_RetCode = 0;
|
||||
|
||||
|
@ -105,7 +105,7 @@ public int Test(B b){
|
|||
mi_RetCode = 0;
|
||||
|
||||
if(B.MethFoaStat() != 100)
|
||||
mi_RetCode = 0;
|
||||
mi_RetCode = 0;
|
||||
|
||||
/////////////////////////////////
|
||||
// Test virtual b.Method access
|
||||
|
@ -120,7 +120,7 @@ public int Test(B b){
|
|||
mi_RetCode = 0;
|
||||
|
||||
if(b.MethFoaVirt() != 100)
|
||||
mi_RetCode = 0;
|
||||
mi_RetCode = 0;
|
||||
|
||||
return mi_RetCode;
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ private int FldPrivInst;
|
|||
protected int FldFamInst; //Translates to "family"
|
||||
internal int FldAsmInst; //Translates to "assembly"
|
||||
protected internal int FldFoaInst; //Translates to "famorassem"
|
||||
|
||||
|
||||
//////////////////////////////
|
||||
// Static Fields
|
||||
public static int FldPubStat;
|
||||
|
@ -233,7 +233,7 @@ public int Test(A a){
|
|||
|
||||
//@csharp - Note that C# will not compile an illegal access of a.FldPrivInst
|
||||
//So there is no negative test here, it should be covered elsewhere and
|
||||
//should throw a FielAccessException within the runtime. (IL sources is
|
||||
//should throw a FieldAccessException within the runtime. (IL sources is
|
||||
//the most logical, only?, choice)
|
||||
|
||||
//@csharp - C# Won't compile illegal family access from non-family members
|
||||
|
@ -265,7 +265,7 @@ public int Test(A a){
|
|||
mi_RetCode = 0;
|
||||
|
||||
/////////////////////////////////
|
||||
// Test instance a.Method access
|
||||
// Test instance a.Method access
|
||||
if(a.MethPubInst() != 100)
|
||||
mi_RetCode = 0;
|
||||
|
||||
|
@ -292,7 +292,7 @@ public int Test(A a){
|
|||
mi_RetCode = 0;
|
||||
|
||||
if(A.MethFoaStat() != 100)
|
||||
mi_RetCode = 0;
|
||||
mi_RetCode = 0;
|
||||
|
||||
/////////////////////////////////
|
||||
// Test virtual a.Method access
|
||||
|
@ -307,7 +307,7 @@ public int Test(A a){
|
|||
mi_RetCode = 0;
|
||||
|
||||
if(a.MethFoaVirt() != 100)
|
||||
mi_RetCode = 0;
|
||||
mi_RetCode = 0;
|
||||
|
||||
return mi_RetCode;
|
||||
}
|
||||
|
@ -320,7 +320,7 @@ private int FldPrivInst;
|
|||
protected int FldFamInst; //Translates to "family"
|
||||
internal int FldAsmInst; //Translates to "assembly"
|
||||
protected internal int FldFoaInst; //Translates to "famorassem"
|
||||
|
||||
|
||||
//////////////////////////////
|
||||
// Static Fields
|
||||
public static int FldPubStat;
|
||||
|
|
|
@ -47,7 +47,7 @@ public int Test(A a){
|
|||
|
||||
//@csharp - Note that C# will not compile an illegal access of a.FldPrivInst
|
||||
//So there is no negative test here, it should be covered elsewhere and
|
||||
//should throw a FielAccessException within the runtime. (IL sources is
|
||||
//should throw a FieldAccessException within the runtime. (IL sources is
|
||||
//the most logical, only?, choice)
|
||||
|
||||
//@csharp - C# Won't compile illegial family access from non-family members
|
||||
|
@ -63,7 +63,7 @@ public int Test(A a){
|
|||
//@csharp - C# Won't compile illegial family access from non-family members
|
||||
|
||||
/////////////////////////////////
|
||||
// Test instance a.Method access
|
||||
// Test instance a.Method access
|
||||
if(a.MethPubInst() != 100)
|
||||
mi_RetCode = 0;
|
||||
|
||||
|
@ -100,7 +100,7 @@ private int FldPrivInst;
|
|||
protected int FldFamInst; //Translates to "family"
|
||||
internal int FldAsmInst; //Translates to "assembly"
|
||||
protected internal int FldFoaInst; //Translates to "famorassem"
|
||||
|
||||
|
||||
//////////////////////////////
|
||||
// Static Fields
|
||||
public static int FldPubStat;
|
||||
|
|
|
@ -16,7 +16,7 @@ public int Test(B b){
|
|||
|
||||
//@csharp - Note that C# will not compile an illegal access of b.FldPrivInst
|
||||
//So there is no negative test here, it should be covered elsewhere and
|
||||
//should throw a FielAccessException within the runtime. (IL sources is
|
||||
//should throw a FieldAccessException within the runtime. (IL sources is
|
||||
//the most logical, only?, choice)
|
||||
|
||||
//@csharp - C# Won't compile illegial family access from non-family members
|
||||
|
@ -48,7 +48,7 @@ public int Test(B b){
|
|||
mi_RetCode = 0;
|
||||
|
||||
/////////////////////////////////
|
||||
// Test instance b.Method access
|
||||
// Test instance b.Method access
|
||||
if(b.MethPubInst() != 100)
|
||||
mi_RetCode = 0;
|
||||
|
||||
|
@ -75,7 +75,7 @@ public int Test(B b){
|
|||
mi_RetCode = 0;
|
||||
|
||||
if(B.MethFoaStat() != 100)
|
||||
mi_RetCode = 0;
|
||||
mi_RetCode = 0;
|
||||
|
||||
/////////////////////////////////
|
||||
// Test virtual b.Method access
|
||||
|
@ -90,7 +90,7 @@ public int Test(B b){
|
|||
mi_RetCode = 0;
|
||||
|
||||
if(b.MethFoaVirt() != 100)
|
||||
mi_RetCode = 0;
|
||||
mi_RetCode = 0;
|
||||
|
||||
return mi_RetCode;
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ private int FldPrivInst;
|
|||
protected int FldFamInst; //Translates to "family"
|
||||
internal int FldAsmInst; //Translates to "assembly"
|
||||
protected internal int FldFoaInst; //Translates to "famorassem"
|
||||
|
||||
|
||||
//////////////////////////////
|
||||
// Static Fields
|
||||
public static int FldPubStat;
|
||||
|
|
|
@ -37,7 +37,7 @@ private int FldPrivInst;
|
|||
protected int FldFamInst; //Translates to "family"
|
||||
internal int FldAsmInst; //Translates to "assembly"
|
||||
protected internal int FldFoaInst; //Translates to "famorassem"
|
||||
|
||||
|
||||
//////////////////////////////
|
||||
// Static Fields
|
||||
public static int FldPubStat;
|
||||
|
@ -149,7 +149,7 @@ public int Test(){
|
|||
|
||||
//@csharp - Note that C# will not compile an illegal access of FldPrivInst
|
||||
//So there is no negative test here, it should be covered elsewhere and
|
||||
//should throw a FielAccessException within the runtime. (IL sources is
|
||||
//should throw a FieldAccessException within the runtime. (IL sources is
|
||||
//the most logical, only?, choice)
|
||||
|
||||
FldFamInst = 100;
|
||||
|
@ -185,7 +185,7 @@ public int Test(){
|
|||
mi_RetCode = 0;
|
||||
|
||||
/////////////////////////////////
|
||||
// Test instance method access
|
||||
// Test instance method access
|
||||
if(MethPubInst() != 100)
|
||||
mi_RetCode = 0;
|
||||
|
||||
|
@ -214,7 +214,7 @@ public int Test(){
|
|||
mi_RetCode = 0;
|
||||
|
||||
if(MethFoaStat() != 100)
|
||||
mi_RetCode = 0;
|
||||
mi_RetCode = 0;
|
||||
|
||||
/////////////////////////////////
|
||||
// Test virtual method access
|
||||
|
@ -230,7 +230,7 @@ public int Test(){
|
|||
mi_RetCode = 0;
|
||||
|
||||
if(MethFoaVirt() != 100)
|
||||
mi_RetCode = 0;
|
||||
mi_RetCode = 0;
|
||||
|
||||
return mi_RetCode;
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ public int Test(){
|
|||
|
||||
//@csharp - Note that C# will not compile an illegal access of FldPrivInst
|
||||
//So there is no negative test here, it should be covered elsewhere and
|
||||
//should throw a FielAccessException within the runtime. (IL sources is
|
||||
//should throw a FieldAccessException within the runtime. (IL sources is
|
||||
//the most logical, only?, choice)
|
||||
|
||||
FldFamInst = 100;
|
||||
|
@ -76,7 +76,7 @@ public int Test(){
|
|||
mi_RetCode = 0;
|
||||
|
||||
/////////////////////////////////
|
||||
// Test instance method access
|
||||
// Test instance method access
|
||||
if(MethPubInst() != 100)
|
||||
mi_RetCode = 0;
|
||||
|
||||
|
@ -105,7 +105,7 @@ public int Test(){
|
|||
mi_RetCode = 0;
|
||||
*/
|
||||
if(MethFoaStat() != 100)
|
||||
mi_RetCode = 0;
|
||||
mi_RetCode = 0;
|
||||
|
||||
/////////////////////////////////
|
||||
// Test virtual method access
|
||||
|
@ -121,7 +121,7 @@ public int Test(){
|
|||
mi_RetCode = 0;
|
||||
*/
|
||||
if(MethFoaVirt() != 100)
|
||||
mi_RetCode = 0;
|
||||
mi_RetCode = 0;
|
||||
|
||||
return mi_RetCode;
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ public int Test(B b){
|
|||
|
||||
//@csharp - Note that C# will not compile an illegal access of b.FldPrivInst
|
||||
//So there is no negative test here, it should be covered elsewhere and
|
||||
//should throw a FielAccessException within the runtime. (IL sources is
|
||||
//should throw a FieldAccessException within the runtime. (IL sources is
|
||||
//the most logical, only?, choice)
|
||||
|
||||
//@csharp - C# Won't compile illegal family access from non-family members
|
||||
|
@ -70,7 +70,7 @@ public int Test(B b){
|
|||
mi_RetCode = 0;
|
||||
|
||||
/////////////////////////////////
|
||||
// Test instance b.Method access
|
||||
// Test instance b.Method access
|
||||
if(b.MethPubInst() != 100)
|
||||
mi_RetCode = 0;
|
||||
|
||||
|
@ -101,7 +101,7 @@ public int Test(B b){
|
|||
public int FldPubInst;
|
||||
private int FldPrivInst;
|
||||
internal int FldAsmInst; //Translates to "assembly"
|
||||
|
||||
|
||||
//////////////////////////////
|
||||
// Static Fields
|
||||
public static int FldPubStat;
|
||||
|
@ -155,7 +155,7 @@ public int Test(A a){
|
|||
|
||||
//@csharp - Note that C# will not compile an illegal access of a.FldPrivInst
|
||||
//So there is no negative test here, it should be covered elsewhere and
|
||||
//should throw a FielAccessException within the runtime. (IL sources is
|
||||
//should throw a FieldAccessException within the runtime. (IL sources is
|
||||
//the most logical, only?, choice)
|
||||
|
||||
//@csharp - C# Won't compile illegal family access from non-family members
|
||||
|
@ -179,7 +179,7 @@ public int Test(A a){
|
|||
mi_RetCode = 0;
|
||||
|
||||
/////////////////////////////////
|
||||
// Test instance a.Method access
|
||||
// Test instance a.Method access
|
||||
if(a.MethPubInst() != 100)
|
||||
mi_RetCode = 0;
|
||||
|
||||
|
@ -211,7 +211,7 @@ public int Test(A a){
|
|||
public int FldPubInst;
|
||||
private int FldPrivInst;
|
||||
internal int FldAsmInst; //Translates to "assembly"
|
||||
|
||||
|
||||
//////////////////////////////
|
||||
// Static Fields
|
||||
public static int FldPubStat;
|
||||
|
|
|
@ -47,7 +47,7 @@ public int Test(A a){
|
|||
|
||||
//@csharp - Note that C# will not compile an illegal access of a.FldPrivInst
|
||||
//So there is no negative test here, it should be covered elsewhere and
|
||||
//should throw a FielAccessException within the runtime. (IL sources is
|
||||
//should throw a FieldAccessException within the runtime. (IL sources is
|
||||
//the most logical, only?, choice)
|
||||
|
||||
//@csharp - C# Won't compile illegal family access from non-family members
|
||||
|
@ -63,7 +63,7 @@ public int Test(A a){
|
|||
//@csharp - C# Won't compile illegal family access from non-family members
|
||||
|
||||
/////////////////////////////////
|
||||
// Test instance a.Method access
|
||||
// Test instance a.Method access
|
||||
if(a.MethPubInst() != 100)
|
||||
mi_RetCode = 0;
|
||||
|
||||
|
@ -89,7 +89,7 @@ public int Test(A a){
|
|||
public int FldPubInst;
|
||||
private int FldPrivInst;
|
||||
internal int FldAsmInst; //Translates to "assembly"
|
||||
|
||||
|
||||
//////////////////////////////
|
||||
// Static Fields
|
||||
public static int FldPubStat;
|
||||
|
|
|
@ -15,7 +15,7 @@ public struct A{
|
|||
|
||||
//@csharp - Note that C# will not compile an illegal access of b.FldPrivInst
|
||||
//So there is no negative test here, it should be covered elsewhere and
|
||||
//should throw a FielAccessException within the runtime. (IL sources is
|
||||
//should throw a FieldAccessException within the runtime. (IL sources is
|
||||
//the most logical, only?, choice)
|
||||
|
||||
//@csharp - C# Won't compile illegal family access from non-family members
|
||||
|
@ -39,7 +39,7 @@ public struct A{
|
|||
mi_RetCode = 0;
|
||||
|
||||
/////////////////////////////////
|
||||
// Test instance b.Method access
|
||||
// Test instance b.Method access
|
||||
if(b.MethPubInst() != 100)
|
||||
mi_RetCode = 0;
|
||||
|
||||
|
@ -70,7 +70,7 @@ public struct A{
|
|||
public int FldPubInst;
|
||||
private int FldPrivInst;
|
||||
internal int FldAsmInst; //Translates to "assembly"
|
||||
|
||||
|
||||
//////////////////////////////
|
||||
// Static Fields
|
||||
public static int FldPubStat;
|
||||
|
|
|
@ -16,9 +16,9 @@ public class TestGC
|
|||
private static string value21;
|
||||
private static string value99;
|
||||
|
||||
/*
|
||||
* Ensure that a key that has no managed references to it gets automatically removed from the
|
||||
* dictionary after GC happens. Also make sure the value gets gc'd as well.
|
||||
/*
|
||||
* Ensure that a key that has no managed references to it gets automatically removed from the
|
||||
* dictionary after GC happens. Also make sure the value gets gc'd as well.
|
||||
*/
|
||||
public static void TestKeyWithNoReferences_Pass1(int length)
|
||||
{
|
||||
|
@ -32,7 +32,7 @@ public class TestGC
|
|||
String key = "KeyTestString" + i.ToString();
|
||||
String value = "ValueTestString" + i.ToString();
|
||||
tbl.Add(key, value);
|
||||
|
||||
|
||||
// create a weak reference for the key
|
||||
weakRefKeyArr[i] = new WeakReference(key, true);
|
||||
weakRefValArr[i] = new WeakReference(value, true);
|
||||
|
@ -71,13 +71,13 @@ public class TestGC
|
|||
GC.KeepAlive(tbl);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Ensure that a key whose value has a reference to the key or a reference to another object
|
||||
* which has a reference to the key, gets automatically removed from the dictionary after GC
|
||||
* happens (provided there are no references to the value outside the dictionary.)
|
||||
* Ensure that a key whose value has a reference to the key or a reference to another object
|
||||
* which has a reference to the key, gets automatically removed from the dictionary after GC
|
||||
* happens (provided there are no references to the value outside the dictionary.)
|
||||
* Also make sure the value gets gc'd as well.
|
||||
*
|
||||
*
|
||||
* In this case we pass the same string array to the function, so keys and values have references to each other
|
||||
* (But only within the dictionary)
|
||||
* */
|
||||
|
@ -135,10 +135,10 @@ public class TestGC
|
|||
}
|
||||
|
||||
/*
|
||||
* Ensure that a key whose value is referenced outside the dictionary does not get
|
||||
* Ensure that a key whose value is referenced outside the dictionary does not get
|
||||
* automatically removed from the dictionary after GC happens and the key doesn't get gc'd.
|
||||
*/
|
||||
public static void TestKeyWithOutsideReferences_Pass1(int length)
|
||||
public static void TestKeyWithOutsideReferences_Pass1(int length)
|
||||
{
|
||||
tbl = new ConditionalWeakTable<string, string>();
|
||||
|
||||
|
@ -177,7 +177,7 @@ public class TestGC
|
|||
}
|
||||
}
|
||||
|
||||
public static void TestKeyWithOutsideReferences_Pass2(int length)
|
||||
public static void TestKeyWithOutsideReferences_Pass2(int length)
|
||||
{
|
||||
// force GC to happen
|
||||
GC.Collect();
|
||||
|
@ -219,7 +219,7 @@ public class TestGC
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// check that the 3 values above were not removed from the dictionary
|
||||
string val;
|
||||
|
||||
|
@ -239,10 +239,10 @@ public class TestGC
|
|||
{
|
||||
try
|
||||
{
|
||||
// Changing this test to 2 passes - the code has been refactored so there are no
|
||||
// outstanding locals with original references to the keys.
|
||||
// Changing this test to 2 passes - the code has been refactored so there are no
|
||||
// outstanding locals with original references to the keys.
|
||||
// This test was failing on IA64 because of IA64 JIT or GC reporting locals longer than necessary
|
||||
// and the entires weren't getting reclaimed.
|
||||
// and the entries weren't getting reclaimed.
|
||||
|
||||
Console.WriteLine("\nTest keys with inside references");
|
||||
TestKeyWithInsideReferences_Pass1(100);
|
||||
|
@ -257,8 +257,8 @@ public class TestGC
|
|||
Console.WriteLine("\nTest keys with outside references");
|
||||
TestKeyWithOutsideReferences_Pass1(100);
|
||||
TestKeyWithOutsideReferences_Pass2(100);
|
||||
|
||||
|
||||
|
||||
|
||||
if (Test.result)
|
||||
{
|
||||
Console.WriteLine("Test Passed");
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace Mono.Linker
|
|||
Instruction? previousMeaningful = null;
|
||||
int meaningfulCount = 0;
|
||||
foreach (var ins in body.Instructions) {
|
||||
// Handle ignoring noops because because (1) it's a valid case to ignore
|
||||
// Handle ignoring noops because (1) it's a valid case to ignore
|
||||
// and (2) When running the tests on .net core roslyn tosses in no ops
|
||||
// and that leads to a difference in test results between mcs and .net framework csc.
|
||||
if (ins.OpCode.Code == Code.Nop)
|
||||
|
@ -195,4 +195,4 @@ namespace Mono.Linker
|
|||
set.Add (resolved);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -828,13 +828,13 @@ namespace Mono.Linker.Tests.TestCasesRunner
|
|||
|
||||
protected virtual void VerifyArrayInitializers (MethodDefinition src, MethodDefinition linked)
|
||||
{
|
||||
var expectedIndicies = GetCustomAttributeCtorValues<object> (src, nameof (KeptInitializerData))
|
||||
var expectedIndices = GetCustomAttributeCtorValues<object> (src, nameof (KeptInitializerData))
|
||||
.Cast<int> ()
|
||||
.ToArray ();
|
||||
|
||||
var expectKeptAll = src.CustomAttributes.Any (attr => attr.AttributeType.Name == nameof (KeptInitializerData) && !attr.HasConstructorArguments);
|
||||
|
||||
if (expectedIndicies.Length == 0 && !expectKeptAll)
|
||||
if (expectedIndices.Length == 0 && !expectKeptAll)
|
||||
return;
|
||||
|
||||
if (!src.HasBody)
|
||||
|
@ -856,9 +856,9 @@ namespace Mono.Linker.Tests.TestCasesRunner
|
|||
VerifyInitializerField (srcField, linkedField);
|
||||
}
|
||||
} else {
|
||||
foreach (var index in expectedIndicies) {
|
||||
foreach (var index in expectedIndices) {
|
||||
if (index < 0 || index > possibleInitializerFields.Length)
|
||||
Assert.Fail ($"Invalid expected index `{index}` in {src}. Value must be between 0 and {expectedIndicies.Length}");
|
||||
Assert.Fail ($"Invalid expected index `{index}` in {src}. Value must be between 0 and {expectedIndices.Length}");
|
||||
|
||||
var srcField = possibleInitializerFields[index];
|
||||
var linkedField = linkedImplementationDetails.Fields.FirstOrDefault (f => f.InitialValue.SequenceEqual (srcField.InitialValue));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue