1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-08 03:27:04 +09:00

Fix miscellaneous typos (#71896)

This commit is contained in:
Adeel Mujahid 2022-07-10 14:03:08 +03:00 committed by GitHub
parent a959c3ee2f
commit f77171b224
Signed by: github
GPG key ID: 4AEE18F83AFDEB23
88 changed files with 2321 additions and 2324 deletions

View file

@ -8,7 +8,7 @@ This document describes current behavior for dealing with references to assembli
When a CoreCLR app is being launched, it builds a list of "probing" locations and then iterates through each <*layer*'s'>.app.deps.json file. For each assembly entry in that file, it uses the probing locations in order to determine the physical location of the assembly. Once all deps.json files are parsed, that information (which consists of a list of full paths to assemblies) is passed to the CLR which it uses to load each assembly when it is accessed. When a CoreCLR app is being launched, it builds a list of "probing" locations and then iterates through each <*layer*'s'>.app.deps.json file. For each assembly entry in that file, it uses the probing locations in order to determine the physical location of the assembly. Once all deps.json files are parsed, that information (which consists of a list of full paths to assemblies) is passed to the CLR which it uses to load each assembly when it is accessed.
A *layer* consists of the app at the highest layer, then then a chain of one or more framework layers ending with Microsoft.NETCore.App as the lowest layer. For 2.0 and earlier, there were only the app and Microsoft.NETCore.App layers. For 2.1+, those two layers exist plus additional, optional frameworks in-between those two. A *layer* consists of the app at the highest layer, then a chain of one or more framework layers ending with Microsoft.NETCore.App as the lowest layer. For 2.0 and earlier, there were only the app and Microsoft.NETCore.App layers. For 2.1+, those two layers exist plus additional, optional frameworks in-between those two.
Since each layer (and other probing locations) can contain the same assembly by name, the "host policy" determines the semantics for conflict cases where the same assembly exists more than once. The "host policy" logic lives in hostpolicy.dll located in the Microsoft.NETCore.App's folder. Since each layer (and other probing locations) can contain the same assembly by name, the "host policy" determines the semantics for conflict cases where the same assembly exists more than once. The "host policy" logic lives in hostpolicy.dll located in the Microsoft.NETCore.App's folder.

View file

@ -3,7 +3,7 @@ When submitting a PR to the `dotnet/runtime` repository various builds will run
The `dotnet/runtime` validation system can become overwhelming as we need to cover a lot of build scenarios and test in all the platforms that we support. In order to try to make this more reliable and spend the least amount of time testing what the PR changes need we have various pipelines, required and optional that are covered in this document. The `dotnet/runtime` validation system can become overwhelming as we need to cover a lot of build scenarios and test in all the platforms that we support. In order to try to make this more reliable and spend the least amount of time testing what the PR changes need we have various pipelines, required and optional that are covered in this document.
Most of the repository pipelines use a custom mechanism to evaluate paths based on the changes contained in the PR to try and build/test the least that we can without compromising quality. This is the initial step on every pipeline that depends on this infrastructure, called "Evalute Paths". In this step you can see the result of the evaluation for each subset of the repository. For more details on which subsets we have based on paths see [here](https://github.com/dotnet/runtime/blob/513fe2863ad5ec6dc453d223d4b60f787a0ffa78/eng/pipelines/common/evaluate-default-paths.yml). Also to understand how this mechanism works you can read this [comment](https://github.com/dotnet/runtime/blob/513fe2863ad5ec6dc453d223d4b60f787a0ffa78/eng/pipelines/evaluate-changed-paths.sh#L3-L12). Most of the repository pipelines use a custom mechanism to evaluate paths based on the changes contained in the PR to try and build/test the least that we can without compromising quality. This is the initial step on every pipeline that depends on this infrastructure, called "Evaluate Paths". In this step you can see the result of the evaluation for each subset of the repository. For more details on which subsets we have based on paths see [here](https://github.com/dotnet/runtime/blob/513fe2863ad5ec6dc453d223d4b60f787a0ffa78/eng/pipelines/common/evaluate-default-paths.yml). Also to understand how this mechanism works you can read this [comment](https://github.com/dotnet/runtime/blob/513fe2863ad5ec6dc453d223d4b60f787a0ffa78/eng/pipelines/evaluate-changed-paths.sh#L3-L12).
### Runtime pipeline ### Runtime pipeline
This is the "main" pipeline for the runtime product. In this pipeline we include the most critical tests and platforms where we have enough test resources in order to deliver test results in a reasonable amount of time. The tests executed in this pipeline for runtime and libraries are considered innerloop, are the tests that are executed locally when one runs tests locally. This is the "main" pipeline for the runtime product. In this pipeline we include the most critical tests and platforms where we have enough test resources in order to deliver test results in a reasonable amount of time. The tests executed in this pipeline for runtime and libraries are considered innerloop, are the tests that are executed locally when one runs tests locally.
@ -91,4 +91,4 @@ If you have determined the failure is definitely not caused by changes in your P
* For libraries tests add a [`[ActiveIssue(link)]`](https://github.com/dotnet/arcade/blob/master/src/Microsoft.DotNet.XUnitExtensions/src/Attributes/ActiveIssueAttribute.cs) attribute on the test method. You can narrow the disabling down to runtime variant, flavor, and platform. For an example see [File_AppendAllLinesAsync_Encoded](https://github.com/dotnet/runtime/blob/cf49643711ad8aa4685a8054286c1348cef6e1d8/src/libraries/System.IO.FileSystem/tests/File/AppendAsync.cs#L74) * For libraries tests add a [`[ActiveIssue(link)]`](https://github.com/dotnet/arcade/blob/master/src/Microsoft.DotNet.XUnitExtensions/src/Attributes/ActiveIssueAttribute.cs) attribute on the test method. You can narrow the disabling down to runtime variant, flavor, and platform. For an example see [File_AppendAllLinesAsync_Encoded](https://github.com/dotnet/runtime/blob/cf49643711ad8aa4685a8054286c1348cef6e1d8/src/libraries/System.IO.FileSystem/tests/File/AppendAsync.cs#L74)
* For runtime tests found under `src/tests`, please edit [`issues.targets`](https://github.com/dotnet/runtime/blob/main/src/tests/issues.targets). There are several groups for different types of disable (mono vs. coreclr, different platforms, different scenarios). Add the folder containing the test and issue mimicking any of the samples in the file. * For runtime tests found under `src/tests`, please edit [`issues.targets`](https://github.com/dotnet/runtime/blob/main/src/tests/issues.targets). There are several groups for different types of disable (mono vs. coreclr, different platforms, different scenarios). Add the folder containing the test and issue mimicking any of the samples in the file.
There are plenty of possible bugs, e.g. race conditions, where a failure might highlight a real problem and it won't manifest again on a retry. Therefore these steps should be followed for every iteration of the PR build, e.g. before retrying/rebuilding. There are plenty of possible bugs, e.g. race conditions, where a failure might highlight a real problem and it won't manifest again on a retry. Therefore these steps should be followed for every iteration of the PR build, e.g. before retrying/rebuilding.

View file

@ -23,7 +23,7 @@
<UsingToolMicrosoftNetCompilers>true</UsingToolMicrosoftNetCompilers> <UsingToolMicrosoftNetCompilers>true</UsingToolMicrosoftNetCompilers>
</PropertyGroup> </PropertyGroup>
<!-- <!--
For source generator support we need to target multiple versions of Rolsyn in order to be able to run on older versions of Roslyn. For source generator support we need to target multiple versions of Roslyn in order to be able to run on older versions of Roslyn.
We pin these versions as we need to match them exactly for any scenarios that run Roslyn on .NET Framework, like Visual Studio. We pin these versions as we need to match them exactly for any scenarios that run Roslyn on .NET Framework, like Visual Studio.
--> -->
<PropertyGroup> <PropertyGroup>

View file

@ -261,9 +261,9 @@ namespace System.Reflection.Emit
public override Assembly GetSatelliteAssembly(CultureInfo culture) => public override Assembly GetSatelliteAssembly(CultureInfo culture) =>
InternalAssembly.GetSatelliteAssembly(culture, null); InternalAssembly.GetSatelliteAssembly(culture, null);
/// <sumary> /// <summary>
/// Useful for binding to a very specific version of a satellite assembly /// Useful for binding to a very specific version of a satellite assembly
/// </sumary> /// </summary>
public override Assembly GetSatelliteAssembly(CultureInfo culture, Version? version) => public override Assembly GetSatelliteAssembly(CultureInfo culture, Version? version) =>
InternalAssembly.GetSatelliteAssembly(culture, version); InternalAssembly.GetSatelliteAssembly(culture, version);

View file

@ -681,7 +681,6 @@ void DacDbiInterfaceImpl::GetAppDomainFullName(
} }
// Very important that this either sets pStrName or Throws. // Very important that this either sets pStrName or Throws.
// Don't set it and then then throw.
IfFailThrow(hrStatus); IfFailThrow(hrStatus);
} }

View file

@ -13117,7 +13117,7 @@ HRESULT gc_heap::initialize_gc (size_t soh_segment_size,
} }
GCConfig::SetConcurrentGC(gc_can_use_concurrent); GCConfig::SetConcurrentGC(gc_can_use_concurrent);
#else //BACKGROUND_GC #else //BACKGROUND_GC
GCConfig::SetConcurrentGC(false); GCConfig::SetConcurrentGC(false);
#endif //BACKGROUND_GC #endif //BACKGROUND_GC
#endif //WRITE_WATCH #endif //WRITE_WATCH
@ -18228,7 +18228,7 @@ BOOL gc_heap::should_set_bgc_mark_bit (uint8_t* o)
return FALSE; return FALSE;
} }
// This is cheaper so I am doing this comparision first before having to get the seg for o. // This is cheaper so I am doing this comparison first before having to get the seg for o.
if (in_range_for_segment (o, current_sweep_seg)) if (in_range_for_segment (o, current_sweep_seg))
{ {
// The current sweep seg could have free spaces beyond its background_allocated so we need // The current sweep seg could have free spaces beyond its background_allocated so we need
@ -44255,7 +44255,7 @@ HRESULT GCHeap::Initialize()
GCConfig::SetGCCpuGroup(can_use_cpu_groups); GCConfig::SetGCCpuGroup(can_use_cpu_groups);
#ifdef HEAP_BALANCE_INSTRUMENTATION #ifdef HEAP_BALANCE_INSTRUMENTATION
cpu_group_enabled_p = can_use_cpu_groups; cpu_group_enabled_p = can_use_cpu_groups;
if (!GCToOSInterface::GetNumaInfo (&total_numa_nodes_on_machine, &procs_per_numa_node)) if (!GCToOSInterface::GetNumaInfo (&total_numa_nodes_on_machine, &procs_per_numa_node))
{ {
@ -44566,13 +44566,13 @@ Object * GCHeap::NextObj (Object * object)
// We still want to verify nextobj that lands between heap_segment_allocated and alloc_allocated // We still want to verify nextobj that lands between heap_segment_allocated and alloc_allocated
// on the ephemeral segment. In regions these 2 could be changed by another thread so we need // on the ephemeral segment. In regions these 2 could be changed by another thread so we need
// to make sure they are still in sync by the time we check. If they are not in sync, we just // to make sure they are still in sync by the time we check. If they are not in sync, we just
// bail which means we don't validate the next object during that small window and that's fine. // bail which means we don't validate the next object during that small window and that's fine.
// //
// We also miss validating nextobj if it's in the segment that just turned into the new ephemeral // We also miss validating nextobj if it's in the segment that just turned into the new ephemeral
// segment since we saved which is also a very small window and again that's fine. // segment since we saved which is also a very small window and again that's fine.
if ((nextobj >= heap_segment_allocated (hs)) && if ((nextobj >= heap_segment_allocated (hs)) &&
((hs != saved_ephemeral_heap_segment) || ((hs != saved_ephemeral_heap_segment) ||
!in_range_for_segment(saved_alloc_allocated, saved_ephemeral_heap_segment) || !in_range_for_segment(saved_alloc_allocated, saved_ephemeral_heap_segment) ||
(nextobj >= saved_alloc_allocated))) (nextobj >= saved_alloc_allocated)))
{ {

View file

@ -297,7 +297,7 @@ public:
}; };
// VLT_FPSTK -- enregisterd TYP_DOUBLE (on the FP stack) // VLT_FPSTK -- enregisterd TYP_DOUBLE (on the FP stack)
// eg. ST(3). Actually it is ST("FPstkHeigth - vpFpStk") // eg. ST(3). Actually it is ST("FPstkHeight - vpFpStk")
struct vlFPstk struct vlFPstk
{ {

View file

@ -445,7 +445,7 @@ enum CorInfoHelpFunc
CORINFO_HELP_GETREFANY, // Extract the byref from a TypedReference, checking that it is the expected type CORINFO_HELP_GETREFANY, // Extract the byref from a TypedReference, checking that it is the expected type
CORINFO_HELP_ARRADDR_ST, // assign to element of object array with type-checking CORINFO_HELP_ARRADDR_ST, // assign to element of object array with type-checking
CORINFO_HELP_LDELEMA_REF, // does a precise type comparision and returns address CORINFO_HELP_LDELEMA_REF, // does a precise type comparison and returns address
/* Exceptions */ /* Exceptions */

View file

@ -6380,7 +6380,7 @@ void CodeGen::genFnProlog()
#endif #endif
//------------------------------------------------------------------------ //------------------------------------------------------------------------
// getCallTarget - Get the node that evalutes to the call target // getCallTarget - Get the node that evaluates to the call target
// //
// Arguments: // Arguments:
// call - the GT_CALL node // call - the GT_CALL node

View file

@ -2780,7 +2780,7 @@ void EfficientEdgeCountReconstructor::Solve()
bool weightKnown = false; bool weightKnown = false;
if (info->m_incomingUnknown == 0) if (info->m_incomingUnknown == 0)
{ {
JITDUMP(FMT_BB ": all incoming edge weights known, summming...\n", block->bbNum); JITDUMP(FMT_BB ": all incoming edge weights known, summing...\n", block->bbNum);
for (Edge* edge = info->m_incomingEdges; edge != nullptr; edge = edge->m_nextIncomingEdge) for (Edge* edge = info->m_incomingEdges; edge != nullptr; edge = edge->m_nextIncomingEdge)
{ {
if (!edge->m_weightKnown) if (!edge->m_weightKnown)
@ -2798,7 +2798,7 @@ void EfficientEdgeCountReconstructor::Solve()
} }
else if (info->m_outgoingUnknown == 0) else if (info->m_outgoingUnknown == 0)
{ {
JITDUMP(FMT_BB ": all outgoing edge weights known, summming...\n", block->bbNum); JITDUMP(FMT_BB ": all outgoing edge weights known, summing...\n", block->bbNum);
for (Edge* edge = info->m_outgoingEdges; edge != nullptr; edge = edge->m_nextOutgoingEdge) for (Edge* edge = info->m_outgoingEdges; edge != nullptr; edge = edge->m_nextOutgoingEdge)
{ {
if (!edge->m_weightKnown) if (!edge->m_weightKnown)

View file

@ -16895,7 +16895,7 @@ void Compiler::impImportBlockCode(BasicBlock* block)
CORINFO_CLASS_HANDLE clsHnd = gtGetClassHandle(op1, &isExact, &isNonNull); CORINFO_CLASS_HANDLE clsHnd = gtGetClassHandle(op1, &isExact, &isNonNull);
// We can skip the "exact" bit here as we are comparing to a value class. // We can skip the "exact" bit here as we are comparing to a value class.
// compareTypesForEquality should bail on comparisions for shared value classes. // compareTypesForEquality should bail on comparisons for shared value classes.
if (clsHnd != NO_CLASS_HANDLE) if (clsHnd != NO_CLASS_HANDLE)
{ {
const TypeCompareState compare = const TypeCompareState compare =

View file

@ -4084,7 +4084,7 @@ void Compiler::fgMakeOutgoingStructArgCopy(GenTreeCall* call, CallArg* arg)
call->gtArgs.SetTemp(arg, tmp); call->gtArgs.SetTemp(arg, tmp);
#if FEATURE_FIXED_OUT_ARGS #if FEATURE_FIXED_OUT_ARGS
// Do the copy early, and evalute the temp later (see EvalArgsToTemps) // Do the copy early, and evaluate the temp later (see EvalArgsToTemps)
// When on Unix create LCL_FLD for structs passed in more than one registers. See fgMakeTmpArgNode // When on Unix create LCL_FLD for structs passed in more than one registers. See fgMakeTmpArgNode
GenTree* argNode = copyBlk; GenTree* argNode = copyBlk;
@ -7070,7 +7070,7 @@ GenTree* Compiler::fgMorphTailCallViaHelpers(GenTreeCall* call, CORINFO_TAILCALL
// JIT will need one or two copies of "this" in the following cases: // JIT will need one or two copies of "this" in the following cases:
// 1) the call needs null check; // 1) the call needs null check;
// 2) StoreArgs stub needs the target function pointer address and if the call is virtual // 2) StoreArgs stub needs the target function pointer address and if the call is virtual
// the stub also needs "this" in order to evalute the target. // the stub also needs "this" in order to evaluate the target.
const bool callNeedsNullCheck = call->NeedsNullCheck(); const bool callNeedsNullCheck = call->NeedsNullCheck();
const bool stubNeedsThisPtr = stubNeedsTargetFnPtr && call->IsVirtual(); const bool stubNeedsThisPtr = stubNeedsTargetFnPtr && call->IsVirtual();

View file

@ -1800,7 +1800,7 @@ inline bool ValueNumStore::VNFuncIsComparison(VNFunc vnf)
{ {
if (vnf >= VNF_Boundary) if (vnf >= VNF_Boundary)
{ {
// For integer types we have unsigned comparisions, and // For integer types we have unsigned comparisons, and
// for floating point types these are the unordered variants. // for floating point types these are the unordered variants.
// //
return ((vnf == VNF_LT_UN) || (vnf == VNF_LE_UN) || (vnf == VNF_GE_UN) || (vnf == VNF_GT_UN)); return ((vnf == VNF_LT_UN) || (vnf == VNF_LE_UN) || (vnf == VNF_GE_UN) || (vnf == VNF_GT_UN));

View file

@ -91,7 +91,7 @@ namespace Internal.IntrinsicSupport
return RuntimeAugments.NewObject(comparerType); return RuntimeAugments.NewObject(comparerType);
} }
// This one is an intrinsic that is used to make enum comparisions more efficient. // This one is an intrinsic that is used to make enum comparisons more efficient.
[Intrinsic] [Intrinsic]
internal static int EnumOnlyCompare<T>(T x, T y) where T : struct, Enum internal static int EnumOnlyCompare<T>(T x, T y) where T : struct, Enum
{ {

View file

@ -98,7 +98,7 @@ namespace Internal.IntrinsicSupport
// Redirection target functions for redirecting behavior of Array.IndexOf // Redirection target functions for redirecting behavior of Array.IndexOf
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
// This one is an intrinsic that is used to make enum comparisions more efficient. // This one is an intrinsic that is used to make enum comparisons more efficient.
[Intrinsic] [Intrinsic]
internal static bool EnumOnlyEquals<T>(T x, T y) where T : struct internal static bool EnumOnlyEquals<T>(T x, T y) where T : struct
{ {

View file

@ -61,9 +61,9 @@ namespace System
Debug.Assert(obj is MulticastDelegate, "Shouldn't have failed here since we already checked the types are the same!"); Debug.Assert(obj is MulticastDelegate, "Shouldn't have failed here since we already checked the types are the same!");
var d = Unsafe.As<MulticastDelegate>(obj); var d = Unsafe.As<MulticastDelegate>(obj);
// there are 2 kind of delegate kinds for comparision // there are 2 kind of delegate kinds for comparison
// 1- Multicast (m_helperObject is Delegate[]) // 1- Multicast (m_helperObject is Delegate[])
// 2- Single-cast delegate, which can be compared with a structural comparision // 2- Single-cast delegate, which can be compared with a structural comparison
IntPtr multicastThunk = GetThunk(MulticastThunk); IntPtr multicastThunk = GetThunk(MulticastThunk);
if (m_functionPointer == multicastThunk) if (m_functionPointer == multicastThunk)

View file

@ -67,7 +67,7 @@ namespace Internal.TypeSystem
} }
/// <summary> /// <summary>
/// Convert an IntPtr into a value for comparisions, or for returning. /// Convert an IntPtr into a value for comparisons, or for returning.
/// </summary> /// </summary>
protected override GCHandle ConvertIntPtrToValue(IntPtr pointer) protected override GCHandle ConvertIntPtrToValue(IntPtr pointer)
{ {

View file

@ -5,7 +5,7 @@
** **
** Source: test1.c (CreatePipe) ** Source: test1.c (CreatePipe)
** **
** Purpose: Tests the PAL implementation of the CreatePipe function. ** Purpose: Tests the PAL implementation of the CreatePipe function.
** This test will create two pipes, a read and a write. Once ** This test will create two pipes, a read and a write. Once
** the pipes have been created, they will be tested by writing ** the pipes have been created, they will be tested by writing
** and then reading, then comparing the results. ** and then reading, then comparing the results.
@ -40,9 +40,9 @@ PALTEST(miscellaneous_CreatePipe_test1_paltest_createpipe_test1, "miscellaneous/
} }
/*Setup SECURITY_ATTRIBUTES structure for CreatePipe*/ /*Setup SECURITY_ATTRIBUTES structure for CreatePipe*/
lpPipeAttributes.nLength = sizeof(lpPipeAttributes); lpPipeAttributes.nLength = sizeof(lpPipeAttributes);
lpPipeAttributes.lpSecurityDescriptor = NULL; lpPipeAttributes.lpSecurityDescriptor = NULL;
lpPipeAttributes.bInheritHandle = TRUE; lpPipeAttributes.bInheritHandle = TRUE;
/*Create a Pipe*/ /*Create a Pipe*/
bRetVal = CreatePipe(&hReadPipe, /* read handle*/ bRetVal = CreatePipe(&hReadPipe, /* read handle*/
@ -53,7 +53,7 @@ PALTEST(miscellaneous_CreatePipe_test1_paltest_createpipe_test1, "miscellaneous/
{ {
Fail("ERROR: %ld :Unable to create pipe\n", GetLastError()); Fail("ERROR: %ld :Unable to create pipe\n", GetLastError());
} }
/*Write to the write pipe handle*/ /*Write to the write pipe handle*/
bRetVal = WriteFile(hWritePipe, /* handle to write pipe*/ bRetVal = WriteFile(hWritePipe, /* handle to write pipe*/
cTestString, /* buffer to write*/ cTestString, /* buffer to write*/
@ -68,7 +68,7 @@ PALTEST(miscellaneous_CreatePipe_test1_paltest_createpipe_test1, "miscellaneous/
/*Read, 256 bytes, more bytes then actually written. /*Read, 256 bytes, more bytes then actually written.
This will give allow us to use the value that ReadFile This will give allow us to use the value that ReadFile
returns for comparision.*/ returns for comparison.*/
bRetVal = ReadFile(hReadPipe, /* handle to read pipe*/ bRetVal = ReadFile(hReadPipe, /* handle to read pipe*/
buffer, /* buffer to write to*/ buffer, /* buffer to write to*/
256, /* number of bytes to read*/ 256, /* number of bytes to read*/

View file

@ -40,9 +40,9 @@ PALTEST(threading_DuplicateHandle_test5_paltest_duplicatehandle_test5, "threadin
} }
/*Setup SECURITY_ATTRIBUTES structure for CreatePipe*/ /*Setup SECURITY_ATTRIBUTES structure for CreatePipe*/
lpPipeAttributes.nLength = sizeof(lpPipeAttributes); lpPipeAttributes.nLength = sizeof(lpPipeAttributes);
lpPipeAttributes.lpSecurityDescriptor = NULL; lpPipeAttributes.lpSecurityDescriptor = NULL;
lpPipeAttributes.bInheritHandle = TRUE; lpPipeAttributes.bInheritHandle = TRUE;
/*Create a Pipe*/ /*Create a Pipe*/
bRetVal = CreatePipe(&hReadPipe, /* read handle*/ bRetVal = CreatePipe(&hReadPipe, /* read handle*/
@ -86,10 +86,10 @@ PALTEST(threading_DuplicateHandle_test5_paltest_duplicatehandle_test5, "threadin
CloseHandle(hWritePipe); CloseHandle(hWritePipe);
Fail(""); Fail("");
} }
/*Read from the duplicated handle, 256 bytes, more bytes /*Read from the duplicated handle, 256 bytes, more bytes
than actually written. This will allow us to use the than actually written. This will allow us to use the
value that ReadFile returns for comparision.*/ value that ReadFile returns for comparison.*/
bRetVal = ReadFile(hDupPipe, /* handle to read pipe*/ bRetVal = ReadFile(hDupPipe, /* handle to read pipe*/
buffer, /* buffer to write to*/ buffer, /* buffer to write to*/
256, /* number of bytes to read*/ 256, /* number of bytes to read*/
@ -97,9 +97,9 @@ PALTEST(threading_DuplicateHandle_test5_paltest_duplicatehandle_test5, "threadin
NULL); /* overlapped buffer*/ NULL); /* overlapped buffer*/
if (bRetVal == FALSE) if (bRetVal == FALSE)
{ {
Trace("ERROR:%u:unable read from the duplicated pipe " Trace("ERROR:%u:unable read from the duplicated pipe "
"hDupPipe=0x%lx\n", "hDupPipe=0x%lx\n",
GetLastError(), GetLastError(),
hDupPipe); hDupPipe);
CloseHandle(hReadPipe); CloseHandle(hReadPipe);
CloseHandle(hWritePipe); CloseHandle(hWritePipe);
@ -110,7 +110,7 @@ PALTEST(threading_DuplicateHandle_test5_paltest_duplicatehandle_test5, "threadin
/*Compare what was read with what was written.*/ /*Compare what was read with what was written.*/
if ((memcmp(cTestString, buffer, dwBytesRead)) != 0) if ((memcmp(cTestString, buffer, dwBytesRead)) != 0)
{ {
Trace("ERROR:%u: read \"%s\" expected \"%s\" \n", Trace("ERROR:%u: read \"%s\" expected \"%s\" \n",
GetLastError(), GetLastError(),
buffer, buffer,
cTestString); cTestString);
@ -124,9 +124,9 @@ PALTEST(threading_DuplicateHandle_test5_paltest_duplicatehandle_test5, "threadin
if (dwBytesWritten != dwBytesRead) if (dwBytesWritten != dwBytesRead)
{ {
Trace("ERROR:%u: WriteFile wrote \"%s\", but ReadFile read \"%s\"," Trace("ERROR:%u: WriteFile wrote \"%s\", but ReadFile read \"%s\","
" these should be the same\n", " these should be the same\n",
GetLastError(), GetLastError(),
buffer, buffer,
cTestString); cTestString);
CloseHandle(hReadPipe); CloseHandle(hReadPipe);
CloseHandle(hWritePipe); CloseHandle(hWritePipe);
@ -138,7 +138,7 @@ PALTEST(threading_DuplicateHandle_test5_paltest_duplicatehandle_test5, "threadin
CloseHandle(hWritePipe); CloseHandle(hWritePipe);
CloseHandle(hReadPipe); CloseHandle(hReadPipe);
CloseHandle(hDupPipe); CloseHandle(hDupPipe);
PAL_Terminate(); PAL_Terminate();
return (PASS); return (PASS);
} }

View file

@ -41,9 +41,9 @@ PALTEST(threading_DuplicateHandle_test6_paltest_duplicatehandle_test6, "threadin
} }
/*Setup SECURITY_ATTRIBUTES structure for CreatePipe*/ /*Setup SECURITY_ATTRIBUTES structure for CreatePipe*/
lpPipeAttributes.nLength = sizeof(lpPipeAttributes); lpPipeAttributes.nLength = sizeof(lpPipeAttributes);
lpPipeAttributes.lpSecurityDescriptor = NULL; lpPipeAttributes.lpSecurityDescriptor = NULL;
lpPipeAttributes.bInheritHandle = TRUE; lpPipeAttributes.bInheritHandle = TRUE;
/*Create a Pipe*/ /*Create a Pipe*/
bRetVal = CreatePipe(&hReadPipe, /* read handle*/ bRetVal = CreatePipe(&hReadPipe, /* read handle*/
@ -82,18 +82,18 @@ PALTEST(threading_DuplicateHandle_test6_paltest_duplicatehandle_test6, "threadin
if (bRetVal == FALSE) if (bRetVal == FALSE)
{ {
Trace("ERROR: %ld :unable to write to duplicate write pipe handle " Trace("ERROR: %ld :unable to write to duplicate write pipe handle "
"hDupPipe=0x%lx\n", "hDupPipe=0x%lx\n",
GetLastError(), GetLastError(),
hDupPipe); hDupPipe);
CloseHandle(hReadPipe); CloseHandle(hReadPipe);
CloseHandle(hWritePipe); CloseHandle(hWritePipe);
CloseHandle(hDupPipe); CloseHandle(hDupPipe);
Fail(""); Fail("");
} }
/*Read from the read handle, 256 bytes, more bytes /*Read from the read handle, 256 bytes, more bytes
then actually written. This will give allow us to use then actually written. This will give allow us to use
the value that ReadFile returns for comparision.*/ the value that ReadFile returns for comparison.*/
bRetVal = ReadFile(hReadPipe, /* handle to read pipe*/ bRetVal = ReadFile(hReadPipe, /* handle to read pipe*/
buffer, /* buffer to write to*/ buffer, /* buffer to write to*/
256, /* number of bytes to read*/ 256, /* number of bytes to read*/
@ -112,8 +112,8 @@ PALTEST(threading_DuplicateHandle_test6_paltest_duplicatehandle_test6, "threadin
/*Compare what was read with what was written.*/ /*Compare what was read with what was written.*/
if ((memcmp(cTestString, buffer, dwBytesRead)) != 0) if ((memcmp(cTestString, buffer, dwBytesRead)) != 0)
{ {
Trace("ERROR: read \"%s\" expected \"%s\" \n", Trace("ERROR: read \"%s\" expected \"%s\" \n",
buffer, buffer,
cTestString); cTestString);
CloseHandle(hReadPipe); CloseHandle(hReadPipe);
CloseHandle(hWritePipe); CloseHandle(hWritePipe);
@ -133,13 +133,13 @@ PALTEST(threading_DuplicateHandle_test6_paltest_duplicatehandle_test6, "threadin
CloseHandle(hDupPipe); CloseHandle(hDupPipe);
Fail(""); Fail("");
} }
/*Cleanup.*/ /*Cleanup.*/
CloseHandle(hReadPipe); CloseHandle(hReadPipe);
CloseHandle(hWritePipe); CloseHandle(hWritePipe);
CloseHandle(hDupPipe); CloseHandle(hDupPipe);
PAL_Terminate(); PAL_Terminate();
return (PASS); return (PASS);
} }

View file

@ -147,7 +147,7 @@ def main(argv):
required = parser.add_argument_group('required arguments') required = parser.add_argument_group('required arguments')
required.add_argument('--man', type=str, required=True, required.add_argument('--man', type=str, required=True,
help='full path to manifest containig the description of events') help='full path to manifest containing the description of events')
required.add_argument('--intermediate', type=str, required=True, required.add_argument('--intermediate', type=str, required=True,
help='full path to eventprovider intermediate directory') help='full path to eventprovider intermediate directory')
required.add_argument('--runtimeflavor', type=str,default="CoreCLR", required.add_argument('--runtimeflavor', type=str,default="CoreCLR",

View file

@ -220,7 +220,7 @@ def main(argv):
required = parser.add_argument_group('required arguments') required = parser.add_argument_group('required arguments')
required.add_argument('--man', type=str, required=True, required.add_argument('--man', type=str, required=True,
help='full path to manifest containig the description of events') help='full path to manifest containing the description of events')
required.add_argument('--exc', type=str, required=True, required.add_argument('--exc', type=str, required=True,
help='full path to exclusion list') help='full path to exclusion list')
required.add_argument('--intermediate', type=str, required=True, required.add_argument('--intermediate', type=str, required=True,

View file

@ -1162,7 +1162,7 @@ def main(argv):
required = parser.add_argument_group('required arguments') required = parser.add_argument_group('required arguments')
required.add_argument('--man', type=str, required=True, required.add_argument('--man', type=str, required=True,
help='full path to manifest containig the description of events') help='full path to manifest containing the description of events')
required.add_argument('--exc', type=str, required=True, required.add_argument('--exc', type=str, required=True,
help='full path to exclusion list') help='full path to exclusion list')
required.add_argument('--inc', type=str,default="", required.add_argument('--inc', type=str,default="",

View file

@ -833,7 +833,7 @@ def main(argv):
required = parser.add_argument_group('required arguments') required = parser.add_argument_group('required arguments')
required.add_argument('--man', type=str, required=True, required.add_argument('--man', type=str, required=True,
help='full path to manifest containig the description of events') help='full path to manifest containing the description of events')
required.add_argument('--inc', type=str, default=None, required.add_argument('--inc', type=str, default=None,
help='full path to directory where the header files will be generated') help='full path to directory where the header files will be generated')
required.add_argument('--dummy', type=str,default=None, required.add_argument('--dummy', type=str,default=None,

View file

@ -188,7 +188,7 @@ def main(argv):
required = parser.add_argument_group('required arguments') required = parser.add_argument_group('required arguments')
required.add_argument('--man', type=str, required=True, required.add_argument('--man', type=str, required=True,
help='full path to manifest containig the description of events') help='full path to manifest containing the description of events')
required.add_argument('--testdir', type=str, required=True, required.add_argument('--testdir', type=str, required=True,
help='full path to directory where the test assets will be deployed' ) help='full path to directory where the test assets will be deployed' )
args, unknown = parser.parse_known_args(argv) args, unknown = parser.parse_known_args(argv)

View file

@ -624,7 +624,7 @@ def main(argv):
required = parser.add_argument_group('required arguments') required = parser.add_argument_group('required arguments')
required.add_argument('--man', type=str, required=True, required.add_argument('--man', type=str, required=True,
help='full path to manifest containig the description of events') help='full path to manifest containing the description of events')
required.add_argument('--intermediate', type=str, required=True, required.add_argument('--intermediate', type=str, required=True,
help='full path to eventprovider intermediate directory') help='full path to eventprovider intermediate directory')
required.add_argument('--runtimeflavor', type=str,default="CoreCLR", required.add_argument('--runtimeflavor', type=str,default="CoreCLR",

View file

@ -89,7 +89,7 @@ def generateEvent(eventNode, providerNode, outputFile, stringTable):
symbol = eventNode.getAttribute("symbol") symbol = eventNode.getAttribute("symbol")
if "ThreadPool" in symbol: if "ThreadPool" in symbol:
return return
evtLevel = eventNode.getAttribute("level")[4:] evtLevel = eventNode.getAttribute("level")[4:]
evtKeywords = "" evtKeywords = ""
# Write the event attribute. # Write the event attribute.
@ -107,7 +107,7 @@ def generateEvent(eventNode, providerNode, outputFile, stringTable):
for keywordIndex in range(len(keywords)): for keywordIndex in range(len(keywords)):
evtKeywords += "Keywords." + keywords[keywordIndex] evtKeywords += "Keywords." + keywords[keywordIndex]
if keywordIndex < (len(keywords) - 1): if keywordIndex < (len(keywords) - 1):
evtKeywords += " | " evtKeywords += " | "
outputFile.write(evtKeywords) outputFile.write(evtKeywords)
outputFile.write(")]\n") outputFile.write(")]\n")
@ -410,7 +410,7 @@ def main(argv):
required = parser.add_argument_group('required arguments') required = parser.add_argument_group('required arguments')
required.add_argument('--man', type=str, required=True, required.add_argument('--man', type=str, required=True,
help='full path to manifest containig the description of events') help='full path to manifest containing the description of events')
required.add_argument('--intermediate', type=str, required=True, required.add_argument('--intermediate', type=str, required=True,
help='full path to eventprovider intermediate directory') help='full path to eventprovider intermediate directory')
required.add_argument('--runtimeflavor', type=str,default="CoreCLR", required.add_argument('--runtimeflavor', type=str,default="CoreCLR",

View file

@ -91,7 +91,7 @@ namespace Internal.JitInterface
CORINFO_HELP_GETREFANY, // Extract the byref from a TypedReference, checking that it is the expected type CORINFO_HELP_GETREFANY, // Extract the byref from a TypedReference, checking that it is the expected type
CORINFO_HELP_ARRADDR_ST, // assign to element of object array with type-checking CORINFO_HELP_ARRADDR_ST, // assign to element of object array with type-checking
CORINFO_HELP_LDELEMA_REF, // does a precise type comparision and returns address CORINFO_HELP_LDELEMA_REF, // does a precise type comparison and returns address
/* Exceptions */ /* Exceptions */

View file

@ -150,7 +150,7 @@ namespace Internal.JitInterface
} vlStk2; } vlStk2;
// VLT_FPSTK -- enregisterd TYP_DOUBLE (on the FP stack) // VLT_FPSTK -- enregisterd TYP_DOUBLE (on the FP stack)
// eg. ST(3). Actually it is ST("FPstkHeigth - vpFpStk") // eg. ST(3). Actually it is ST("FPstkHeight - vpFpStk")
struct struct
{ {

View file

@ -690,7 +690,7 @@ namespace Internal.TypeSystem
protected abstract IntPtr ConvertValueToIntPtr(TValue value); protected abstract IntPtr ConvertValueToIntPtr(TValue value);
/// <summary> /// <summary>
/// Convert an IntPtr into a value for comparisions, or for returning. /// Convert an IntPtr into a value for comparisons, or for returning.
/// </summary> /// </summary>
protected abstract TValue ConvertIntPtrToValue(IntPtr pointer); protected abstract TValue ConvertIntPtrToValue(IntPtr pointer);
} }

View file

@ -16,12 +16,12 @@ namespace ILCompiler.DependencyAnalysis
{ {
/// <summary> /// <summary>
/// Given a type, EETypeNode writes an MethodTable data structure in the format expected by the runtime. /// Given a type, EETypeNode writes an MethodTable data structure in the format expected by the runtime.
/// ///
/// Format of an MethodTable: /// Format of an MethodTable:
/// ///
/// Field Size | Contents /// Field Size | Contents
/// ----------------+----------------------------------- /// ----------------+-----------------------------------
/// UInt16 | Component Size. For arrays this is the element type size, for strings it is 2 (.NET uses /// UInt16 | Component Size. For arrays this is the element type size, for strings it is 2 (.NET uses
/// | UTF16 character encoding), for generic type definitions it is the number of generic parameters, /// | UTF16 character encoding), for generic type definitions it is the number of generic parameters,
/// | and 0 for all other types. /// | and 0 for all other types.
/// | /// |
@ -83,14 +83,14 @@ namespace ILCompiler.DependencyAnalysis
static TypeDesc WithoutParameterizeTypes(TypeDesc t) => t is ParameterizedType pt ? WithoutParameterizeTypes(pt.ParameterType) : t; static TypeDesc WithoutParameterizeTypes(TypeDesc t) => t is ParameterizedType pt ? WithoutParameterizeTypes(pt.ParameterType) : t;
} }
protected bool MightHaveInterfaceDispatchMap(NodeFactory factory) protected bool MightHaveInterfaceDispatchMap(NodeFactory factory)
{ {
if (!_mightHaveInterfaceDispatchMap.HasValue) if (!_mightHaveInterfaceDispatchMap.HasValue)
{ {
_mightHaveInterfaceDispatchMap = EmitVirtualSlotsAndInterfaces && InterfaceDispatchMapNode.MightHaveInterfaceDispatchMap(_type, factory); _mightHaveInterfaceDispatchMap = EmitVirtualSlotsAndInterfaces && InterfaceDispatchMapNode.MightHaveInterfaceDispatchMap(_type, factory);
} }
return _mightHaveInterfaceDispatchMap.Value; return _mightHaveInterfaceDispatchMap.Value;
} }
@ -168,8 +168,8 @@ namespace ILCompiler.DependencyAnalysis
if (method.HasInstantiation) if (method.HasInstantiation)
{ {
// We found a GVM on one of the implemented interfaces. Find if the type implements this method. // We found a GVM on one of the implemented interfaces. Find if the type implements this method.
// (Note, do this comparision against the generic definition of the method, not the specific method instantiation // (Note, do this comparison against the generic definition of the method, not the specific method instantiation
MethodDesc genericDefinition = method.GetMethodDefinition(); MethodDesc genericDefinition = method.GetMethodDefinition();
MethodDesc slotDecl = _type.ResolveInterfaceMethodTarget(genericDefinition); MethodDesc slotDecl = _type.ResolveInterfaceMethodTarget(genericDefinition);
if (slotDecl != null) if (slotDecl != null)
@ -212,9 +212,9 @@ namespace ILCompiler.DependencyAnalysis
{ {
return _optionalFieldsBuilder.GetBytes(); return _optionalFieldsBuilder.GetBytes();
} }
public override bool StaticDependenciesAreComputed => true; public override bool StaticDependenciesAreComputed => true;
public static string GetMangledName(TypeDesc type, NameMangler nameMangler) public static string GetMangledName(TypeDesc type, NameMangler nameMangler)
{ {
return nameMangler.NodeMangler.MethodTable(type); return nameMangler.NodeMangler.MethodTable(type);
@ -323,7 +323,7 @@ namespace ILCompiler.DependencyAnalysis
// If we're producing a full vtable, none of the dependencies are conditional. // If we're producing a full vtable, none of the dependencies are conditional.
needsDependenciesForVirtualMethodImpls &= !factory.VTable(defType).HasFixedSlots; needsDependenciesForVirtualMethodImpls &= !factory.VTable(defType).HasFixedSlots;
if (needsDependenciesForVirtualMethodImpls) if (needsDependenciesForVirtualMethodImpls)
{ {
foreach (MethodDesc decl in defType.EnumAllVirtualSlots()) foreach (MethodDesc decl in defType.EnumAllVirtualSlots())
@ -518,11 +518,11 @@ namespace ILCompiler.DependencyAnalysis
{ {
if (_type.IsArray || _type.IsDefType) if (_type.IsArray || _type.IsDefType)
{ {
// If the compilation group wants this type to be fully promoted, ensure that all non-generic methods of the // If the compilation group wants this type to be fully promoted, ensure that all non-generic methods of the
// type are generated. // type are generated.
// This may be done for several reasons: // This may be done for several reasons:
// - The MethodTable may be going to be COMDAT folded with other EETypes generated in a different object file // - The MethodTable may be going to be COMDAT folded with other EETypes generated in a different object file
// This means their generic dictionaries need to have identical contents. The only way to achieve that is // This means their generic dictionaries need to have identical contents. The only way to achieve that is
// by generating the entries for all methods that contribute to the dictionary, and sorting the dictionaries. // by generating the entries for all methods that contribute to the dictionary, and sorting the dictionaries.
// - The generic type may be imported into another module, in which case the generic dictionary imported // - The generic type may be imported into another module, in which case the generic dictionary imported
// must represent all of the methods, as the set of used methods cannot be known at compile time // must represent all of the methods, as the set of used methods cannot be known at compile time
@ -632,7 +632,7 @@ namespace ILCompiler.DependencyAnalysis
// Non-constructed EETypeNodes get no GC Desc // Non-constructed EETypeNodes get no GC Desc
Debug.Assert(GCDescSize == 0); Debug.Assert(GCDescSize == 0);
} }
private void OutputComponentSize(ref ObjectDataBuilder objData) private void OutputComponentSize(ref ObjectDataBuilder objData)
{ {
if (_type.IsArray) if (_type.IsArray)
@ -847,7 +847,7 @@ namespace ILCompiler.DependencyAnalysis
// class Derived<T> : Middle<T, MyStruct> { } // -> Template is Derived<__UniversalCanon> and needs a dictionary slot // class Derived<T> : Middle<T, MyStruct> { } // -> Template is Derived<__UniversalCanon> and needs a dictionary slot
// // -> Basetype tempalte is Middle<__UniversalCanon, MyStruct>. It's a partial // // -> Basetype tempalte is Middle<__UniversalCanon, MyStruct>. It's a partial
// Universal canonical type, so we need to fully canonicalize it. // Universal canonical type, so we need to fully canonicalize it.
// //
// class Middle<T, U> : Base<U> { } // -> Template is Middle<__UniversalCanon, __UniversalCanon> and needs a dictionary slot // class Middle<T, U> : Base<U> { } // -> Template is Middle<__UniversalCanon, __UniversalCanon> and needs a dictionary slot
// // -> Basetype template is Base<__UniversalCanon> // // -> Basetype template is Base<__UniversalCanon>
// //
@ -922,7 +922,7 @@ namespace ILCompiler.DependencyAnalysis
} }
} }
} }
protected virtual IEETypeNode GetInterfaceTypeNode(NodeFactory factory, TypeDesc interfaceType) protected virtual IEETypeNode GetInterfaceTypeNode(NodeFactory factory, TypeDesc interfaceType)
{ {
return factory.NecessaryTypeSymbol(interfaceType); return factory.NecessaryTypeSymbol(interfaceType);
@ -1045,7 +1045,7 @@ namespace ILCompiler.DependencyAnalysis
{ {
_optionalFieldsBuilder.SetFieldValue(EETypeOptionalFieldTag.DispatchMap, checked((uint)factory.InterfaceDispatchMapIndirection(Type).IndexFromBeginningOfArray)); _optionalFieldsBuilder.SetFieldValue(EETypeOptionalFieldTag.DispatchMap, checked((uint)factory.InterfaceDispatchMapIndirection(Type).IndexFromBeginningOfArray));
} }
ComputeRareFlags(factory, relocsOnly); ComputeRareFlags(factory, relocsOnly);
ComputeNullableValueOffset(); ComputeNullableValueOffset();
ComputeValueTypeFieldPadding(); ComputeValueTypeFieldPadding();
@ -1123,7 +1123,7 @@ namespace ILCompiler.DependencyAnalysis
protected virtual void ComputeValueTypeFieldPadding() protected virtual void ComputeValueTypeFieldPadding()
{ {
// All objects that can have appreciable which can be derived from size compute ValueTypeFieldPadding. // All objects that can have appreciable which can be derived from size compute ValueTypeFieldPadding.
// Unfortunately, the name ValueTypeFieldPadding is now wrong to avoid integration conflicts. // Unfortunately, the name ValueTypeFieldPadding is now wrong to avoid integration conflicts.
// Interfaces, sealed types, and non-DefTypes cannot be derived from // Interfaces, sealed types, and non-DefTypes cannot be derived from
@ -1149,17 +1149,17 @@ namespace ILCompiler.DependencyAnalysis
// Value types should have at least 1 byte of size // Value types should have at least 1 byte of size
Debug.Assert(numInstanceFieldBytes >= 1); Debug.Assert(numInstanceFieldBytes >= 1);
// The size doesn't currently include the MethodTable pointer size. We need to add this so that // The size doesn't currently include the MethodTable pointer size. We need to add this so that
// the number of instance field bytes consistently represents the boxed size. // the number of instance field bytes consistently represents the boxed size.
numInstanceFieldBytes += _type.Context.Target.PointerSize; numInstanceFieldBytes += _type.Context.Target.PointerSize;
} }
// For unboxing to work correctly and for supporting dynamic type loading for derived types we need // For unboxing to work correctly and for supporting dynamic type loading for derived types we need
// to record the actual size of the fields of a type without any padding for GC heap allocation (since // to record the actual size of the fields of a type without any padding for GC heap allocation (since
// we can unbox into locals or arrays where this padding is not used, and because field layout for derived // we can unbox into locals or arrays where this padding is not used, and because field layout for derived
// types is effected by the unaligned base size). We don't want to store this information for all EETypes // types is effected by the unaligned base size). We don't want to store this information for all EETypes
// since it's only relevant for value types, and derivable types so it's added as an optional field. It's // since it's only relevant for value types, and derivable types so it's added as an optional field. It's
// also enough to simply store the size of the padding (between 0 and 4 or 8 bytes for 32-bit and 0 and 8 or 16 bytes // also enough to simply store the size of the padding (between 0 and 4 or 8 bytes for 32-bit and 0 and 8 or 16 bytes
// for 64-bit) which cuts down our storage requirements. // for 64-bit) which cuts down our storage requirements.
uint valueTypeFieldPadding = checked((uint)((BaseSize - _type.Context.Target.PointerSize) - numInstanceFieldBytes)); uint valueTypeFieldPadding = checked((uint)((BaseSize - _type.Context.Target.PointerSize) - numInstanceFieldBytes));
@ -1175,7 +1175,7 @@ namespace ILCompiler.DependencyAnalysis
protected override void OnMarked(NodeFactory context) protected override void OnMarked(NodeFactory context)
{ {
if (!context.IsCppCodegenTemporaryWorkaround) if (!context.IsCppCodegenTemporaryWorkaround)
{ {
Debug.Assert(_type.IsTypeDefinition || !_type.HasSameTypeDefinition(context.ArrayOfTClass), "Asking for Array<T> MethodTable"); Debug.Assert(_type.IsTypeDefinition || !_type.HasSameTypeDefinition(context.ArrayOfTClass), "Asking for Array<T> MethodTable");
} }
} }

View file

@ -168,7 +168,7 @@ namespace ILCompiler.DependencyAnalysis.ReadyToRun
// If the resolved method is the declMethod, then only types which derive from the // If the resolved method is the declMethod, then only types which derive from the
// OwningType of the decl method need to be within the version bubble. // OwningType of the decl method need to be within the version bubble.
// //
// If not, then then all the types from the implType to the Owning type of the resolved // If not, then all the types from the implType to the Owning type of the resolved
// virtual method must be within the version bubble. // virtual method must be within the version bubble.
if (firstTypeInImplTypeHierarchyNotInVersionBubble == null) if (firstTypeInImplTypeHierarchyNotInVersionBubble == null)
{ {

View file

@ -26,7 +26,7 @@ public sealed class ParallelRunner
/// error output streams to prevent them from interleaving in the final build output log. /// error output streams to prevent them from interleaving in the final build output log.
/// Multiple instances of this class representing the individual running processes /// Multiple instances of this class representing the individual running processes
/// can exist at the same time. /// can exist at the same time.
/// </summmary> /// </summary>
class ProcessSlot class ProcessSlot
{ {
/// <summary> /// <summary>

View file

@ -2773,7 +2773,7 @@ void MethodContext::recGetArgClass(CORINFO_SIG_INFO* sig,
ZeroMemory(&key, sizeof(key)); // Zero key including any struct padding ZeroMemory(&key, sizeof(key)); // Zero key including any struct padding
// Only setting values for CORINFO_SIG_INFO things the EE seems to pay attention to... this is necessary since some of the values // Only setting values for CORINFO_SIG_INFO things the EE seems to pay attention to... this is necessary since some of the values
// are unset and fail our precise comparisions... // are unset and fail our precise comparisons...
SpmiRecordsHelper::StoreAgnostic_CORINFO_SIG_INST_HandleArray(sig->sigInst.classInstCount, sig->sigInst.classInst, SigInstHandleMap, &key.sigInst_classInstCount, &key.sigInst_classInst_Index); SpmiRecordsHelper::StoreAgnostic_CORINFO_SIG_INST_HandleArray(sig->sigInst.classInstCount, sig->sigInst.classInst, SigInstHandleMap, &key.sigInst_classInstCount, &key.sigInst_classInst_Index);
SpmiRecordsHelper::StoreAgnostic_CORINFO_SIG_INST_HandleArray(sig->sigInst.methInstCount, sig->sigInst.methInst, SigInstHandleMap, &key.sigInst_methInstCount, &key.sigInst_methInst_Index); SpmiRecordsHelper::StoreAgnostic_CORINFO_SIG_INST_HandleArray(sig->sigInst.methInstCount, sig->sigInst.methInst, SigInstHandleMap, &key.sigInst_methInstCount, &key.sigInst_methInst_Index);

View file

@ -772,7 +772,7 @@ void DynamicHelpers::EmitHelperWithArg(BYTE*& p, size_t rxOffset, LoaderAllocato
} }
CONTRACTL_END; CONTRACTL_END;
// Move an an argument into the second argument register and jump to a target function. // Move an argument into the second argument register and jump to a target function.
#ifdef UNIX_AMD64_ABI #ifdef UNIX_AMD64_ABI
*(UINT16 *)p = 0xBE48; // mov rsi, XXXXXX *(UINT16 *)p = 0xBE48; // mov rsi, XXXXXX

View file

@ -358,7 +358,7 @@ class EEResourceException : public EEException
// Unmanaged message text containing only the resource name (GC safe) // Unmanaged message text containing only the resource name (GC safe)
void GetMessage(SString &result); void GetMessage(SString &result);
// Throwable message containig the resource contents (not GC safe) // Throwable message containing the resource contents (not GC safe)
BOOL GetThrowableMessage(SString &result); BOOL GetThrowableMessage(SString &result);
protected: protected:

View file

@ -672,7 +672,7 @@ void SimpleComCallWrapper::BuildRefCountLogMessage(LPCSTR szOperation, StackSStr
OBJECTHANDLE handle = GetMainWrapper()->GetObjectHandle(); OBJECTHANDLE handle = GetMainWrapper()->GetObjectHandle();
_UNCHECKED_OBJECTREF obj = NULL; _UNCHECKED_OBJECTREF obj = NULL;
// Force retriving the handle without using OBJECTREF and under cooperative mode // Force retrieving the handle without using OBJECTREF and under cooperative mode
// We only need the value in ETW events and it doesn't matter if it is super accurate // We only need the value in ETW events and it doesn't matter if it is super accurate
if (handle != NULL) if (handle != NULL)
obj = *((_UNCHECKED_OBJECTREF *)(handle)); obj = *((_UNCHECKED_OBJECTREF *)(handle));

View file

@ -1235,7 +1235,7 @@ void DynamicHelpers::EmitHelperWithArg(BYTE*& p, size_t rxOffset, LoaderAllocato
} }
CONTRACTL_END; CONTRACTL_END;
// Move an an argument into the second argument register and jump to a target function. // Move an argument into the second argument register and jump to a target function.
*p++ = 0xBA; // mov edx, XXXXXX *p++ = 0xBA; // mov edx, XXXXXX
*(INT32 *)p = (INT32)arg; *(INT32 *)p = (INT32)arg;

View file

@ -6921,7 +6921,7 @@ INT32 Interpreter::CompareOpRes(unsigned op1idx)
} }
else else
{ {
VerificationError("Binary comparision operation: type mismatch."); VerificationError("Binary comparison operation: type mismatch.");
} }
break; break;
case CORINFO_TYPE_NATIVEINT: case CORINFO_TYPE_NATIVEINT:
@ -6978,7 +6978,7 @@ INT32 Interpreter::CompareOpRes(unsigned op1idx)
} }
else else
{ {
VerificationError("Binary comparision operation: type mismatch."); VerificationError("Binary comparison operation: type mismatch.");
} }
break; break;
case CORINFO_TYPE_LONG: case CORINFO_TYPE_LONG:
@ -7015,7 +7015,7 @@ INT32 Interpreter::CompareOpRes(unsigned op1idx)
} }
else else
{ {
VerificationError("Binary comparision operation: type mismatch."); VerificationError("Binary comparison operation: type mismatch.");
} }
} }
break; break;
@ -7037,12 +7037,12 @@ INT32 Interpreter::CompareOpRes(unsigned op1idx)
} }
else else
{ {
VerificationError("Binary comparision operation: type mismatch."); VerificationError("Binary comparison operation: type mismatch.");
} }
} }
else else
{ {
VerificationError("Binary comparision operation: type mismatch."); VerificationError("Binary comparison operation: type mismatch.");
} }
break; break;
@ -7084,7 +7084,7 @@ INT32 Interpreter::CompareOpRes(unsigned op1idx)
} }
else else
{ {
VerificationError("Binary comparision operation: type mismatch."); VerificationError("Binary comparison operation: type mismatch.");
} }
} }
break; break;
@ -7126,7 +7126,7 @@ INT32 Interpreter::CompareOpRes(unsigned op1idx)
} }
else else
{ {
VerificationError("Binary comparision operation: type mismatch."); VerificationError("Binary comparison operation: type mismatch.");
} }
} }
break; break;
@ -7169,7 +7169,7 @@ INT32 Interpreter::CompareOpRes(unsigned op1idx)
} }
else else
{ {
VerificationError("Binary comparision operation: type mismatch."); VerificationError("Binary comparison operation: type mismatch.");
} }
break; break;

View file

@ -192,7 +192,7 @@ void MemberLoader::GetDescFromMemberRef(ModuleBase * pModule,
} }
MethodDesc *pMethodDef = NULL; MethodDesc *pMethodDef = NULL;
if (pModule->IsFullModule()) if (pModule->IsFullModule())
{ {
Module* pNormalModule = static_cast<Module*>(pModule); Module* pNormalModule = static_cast<Module*>(pModule);
@ -595,7 +595,7 @@ MethodDesc* MemberLoader::GetMethodDescFromMethodDef(Module *pModule,
// For internal purposes we wish to resolve MethodDef from generic classes or for generic methods to // For internal purposes we wish to resolve MethodDef from generic classes or for generic methods to
// the corresponding fully uninstantiated descriptor. For example, for // the corresponding fully uninstantiated descriptor. For example, for
// class C<T> { void m(); } // class C<T> { void m(); }
// then then MethodDef for m resolves to a method descriptor for C<T>.m(). This is the // then MethodDef for m resolves to a method descriptor for C<T>.m(). This is the
// descriptor that gets stored in the RID map. // descriptor that gets stored in the RID map.
// //
// Normal IL code that uses generic code cannot use MethodDefs in this way: all calls // Normal IL code that uses generic code cannot use MethodDefs in this way: all calls

View file

@ -1566,7 +1566,7 @@ public:
// True if a MD is an funny BoxedEntryPointStub (not from the method table) or // True if a MD is an funny BoxedEntryPointStub (not from the method table) or
// an MD for a generic instantiation...In other words the MethodDescs and the // an MD for a generic instantiation...In other words the MethodDescs and the
// MethodTable are guaranteed to be "tightly-knit", i.e. if one is present in // MethodTable are guaranteed to be "tightly-knit", i.e. if one is present in
// an NGEN image then then other will be, and if one is "used" at runtime then // an NGEN image then the other will be, and if one is "used" at runtime then
// the other will be too. // the other will be too.
BOOL IsTightlyBoundToMethodTable(); BOOL IsTightlyBoundToMethodTable();

View file

@ -341,7 +341,7 @@ MethodTableBuilder::ExpandApproxInterface(
bmtInterfaceEntry * pItfEntry = &bmtInterface->pInterfaceMap[i]; bmtInterfaceEntry * pItfEntry = &bmtInterface->pInterfaceMap[i];
bmtRTType * pItfType = pItfEntry->GetInterfaceType(); bmtRTType * pItfType = pItfEntry->GetInterfaceType();
// Type Equivalence is not respected for this comparision as you can have multiple type equivalent interfaces on a class // Type Equivalence is not respected for this comparison as you can have multiple type equivalent interfaces on a class
TokenPairList newVisited = TokenPairList::AdjustForTypeEquivalenceForbiddenScope(NULL); TokenPairList newVisited = TokenPairList::AdjustForTypeEquivalenceForbiddenScope(NULL);
if (MetaSig::CompareTypeDefsUnderSubstitutions(pItfType->GetMethodTable(), if (MetaSig::CompareTypeDefsUnderSubstitutions(pItfType->GetMethodTable(),
pNewInterface, pNewInterface,
@ -5758,7 +5758,7 @@ MethodTableBuilder::ProcessMethodImpls()
for (DWORD i = 0; i < bmtInterface->dwInterfaceMapSize; i++) for (DWORD i = 0; i < bmtInterface->dwInterfaceMapSize; i++)
{ {
bmtRTType * pCurItf = bmtInterface->pInterfaceMap[i].GetInterfaceType(); bmtRTType * pCurItf = bmtInterface->pInterfaceMap[i].GetInterfaceType();
// Type Equivalence is not respected for this comparision as you can have multiple type equivalent interfaces on a class // Type Equivalence is not respected for this comparison as you can have multiple type equivalent interfaces on a class
TokenPairList newVisited = TokenPairList::AdjustForTypeEquivalenceForbiddenScope(NULL); TokenPairList newVisited = TokenPairList::AdjustForTypeEquivalenceForbiddenScope(NULL);
if (MetaSig::CompareTypeDefsUnderSubstitutions( if (MetaSig::CompareTypeDefsUnderSubstitutions(
pCurItf->GetMethodTable(), pDeclMT, pCurItf->GetMethodTable(), pDeclMT,
@ -5788,7 +5788,7 @@ MethodTableBuilder::ProcessMethodImpls()
for (DWORD i = 0; i < bmtInterface->dwInterfaceMapSize; i++) for (DWORD i = 0; i < bmtInterface->dwInterfaceMapSize; i++)
{ {
bmtRTType * pCurItf = bmtInterface->pInterfaceMap[i].GetInterfaceType(); bmtRTType * pCurItf = bmtInterface->pInterfaceMap[i].GetInterfaceType();
// Type Equivalence is respected for this comparision as we just need to find an // Type Equivalence is respected for this comparison as we just need to find an
// equivalent interface, the particular interface is unimportant // equivalent interface, the particular interface is unimportant
if (MetaSig::CompareTypeDefsUnderSubstitutions( if (MetaSig::CompareTypeDefsUnderSubstitutions(
pCurItf->GetMethodTable(), pDeclMT, pCurItf->GetMethodTable(), pDeclMT,
@ -9687,7 +9687,7 @@ MethodTableBuilder::ExpandExactInterface(
// determined the layout of the interface map for the "generic" version of the class. // determined the layout of the interface map for the "generic" version of the class.
for (DWORD i = 0; i < bmtInfo->nAssigned; i++) for (DWORD i = 0; i < bmtInfo->nAssigned; i++)
{ {
// Type Equivalence is not respected for this comparision as you can have multiple type equivalent interfaces on a class // Type Equivalence is not respected for this comparison as you can have multiple type equivalent interfaces on a class
TokenPairList newVisited = TokenPairList::AdjustForTypeEquivalenceForbiddenScope(NULL); TokenPairList newVisited = TokenPairList::AdjustForTypeEquivalenceForbiddenScope(NULL);
if (MetaSig::CompareTypeDefsUnderSubstitutions(bmtInfo->pExactMTs[i], if (MetaSig::CompareTypeDefsUnderSubstitutions(bmtInfo->pExactMTs[i],
pIntf, pIntf,
@ -9772,7 +9772,7 @@ void MethodTableBuilder::InterfaceAmbiguityCheck(bmtInterfaceAmbiguityCheckInfo
// determined the layout of the interface map for the "generic" version of the class. // determined the layout of the interface map for the "generic" version of the class.
for (DWORD i = 0; i < bmtCheckInfo->nAssigned; i++) for (DWORD i = 0; i < bmtCheckInfo->nAssigned; i++)
{ {
// Type Equivalence is not respected for this comparision as you can have multiple type equivalent interfaces on a class // Type Equivalence is not respected for this comparison as you can have multiple type equivalent interfaces on a class
TokenPairList newVisited = TokenPairList::AdjustForTypeEquivalenceForbiddenScope(NULL); TokenPairList newVisited = TokenPairList::AdjustForTypeEquivalenceForbiddenScope(NULL);
if (MetaSig::CompareTypeDefsUnderSubstitutions(bmtCheckInfo->ppExactDeclaredInterfaces[i], if (MetaSig::CompareTypeDefsUnderSubstitutions(bmtCheckInfo->ppExactDeclaredInterfaces[i],
pIntf, pIntf,
@ -11005,7 +11005,7 @@ BOOL MethodTableBuilder::HasDefaultInterfaceImplementation(bmtRTType *pDeclType,
// If this is generic, we need to compare under substitutions // If this is generic, we need to compare under substitutions
Substitution curItfSubs(tkParent, pCurIntfModule, &pCurItf->GetSubstitution()); Substitution curItfSubs(tkParent, pCurIntfModule, &pCurItf->GetSubstitution());
// Type Equivalence is not respected for this comparision as you can have multiple type equivalent interfaces on a class // Type Equivalence is not respected for this comparison as you can have multiple type equivalent interfaces on a class
TokenPairList newVisited = TokenPairList::AdjustForTypeEquivalenceForbiddenScope(NULL); TokenPairList newVisited = TokenPairList::AdjustForTypeEquivalenceForbiddenScope(NULL);
if (MetaSig::CompareTypeDefsUnderSubstitutions( if (MetaSig::CompareTypeDefsUnderSubstitutions(
pPotentialInterfaceMT, pDeclType->GetMethodTable(), pPotentialInterfaceMT, pDeclType->GetMethodTable(),

View file

@ -2293,7 +2293,7 @@ HRESULT __stdcall RCW::ReleaseAllInterfacesCallBack(LPVOID pData)
} }
//--------------------------------------------------------------------- //---------------------------------------------------------------------
// Helper function called from ReleaseAllInterfacesCallBack do do the // Helper function called from ReleaseAllInterfacesCallBack to do the
// actual releases. // actual releases.
void RCW::ReleaseAllInterfaces() void RCW::ReleaseAllInterfaces()
{ {

View file

@ -520,7 +520,7 @@ private:
static HRESULT __stdcall ReleaseAllInterfacesCallBack(LPVOID pData); static HRESULT __stdcall ReleaseAllInterfacesCallBack(LPVOID pData);
//--------------------------------------------------------------------- //---------------------------------------------------------------------
// Helper function called from ReleaseAllInterfaces_CallBack do do the // Helper function called from ReleaseAllInterfaces_CallBack to do the
// actual releases. // actual releases.
void ReleaseAllInterfaces(); void ReleaseAllInterfaces();

View file

@ -114,7 +114,7 @@ internal static class Utils
internal static CompareResult Compare(string expected, string actual, bool runSmartXmlComparerOnFailure = true) internal static CompareResult Compare(string expected, string actual, bool runSmartXmlComparerOnFailure = true)
{ {
// for CORECLR we get different xml hence we have updated code for smartyXMLcomparision // for CORECLR we get different xml hence we have updated code for smartyXMLcomparison
CompareResult stringcompare = CompareString(expected, actual); CompareResult stringcompare = CompareString(expected, actual);

View file

@ -161,7 +161,7 @@ namespace Microsoft.Extensions.Logging.Testing.Tests
public static TheoryData< public static TheoryData<
IEnumerable<KeyValuePair<string, object>>, IEnumerable<KeyValuePair<string, object>>,
IEnumerable<KeyValuePair<string, object>>> CaseSensitivityComparisionData IEnumerable<KeyValuePair<string, object>>> CaseSensitivityComparisonData
{ {
get get
{ {
@ -198,8 +198,8 @@ namespace Microsoft.Extensions.Logging.Testing.Tests
} }
[Theory] [Theory]
[MemberData(nameof(CaseSensitivityComparisionData))] [MemberData(nameof(CaseSensitivityComparisonData))]
public void DefaultComparer_Performs_CaseSensitiveComparision( public void DefaultComparer_Performs_CaseSensitiveComparison(
IEnumerable<KeyValuePair<string, object>> expectedValues, IEnumerable<KeyValuePair<string, object>> expectedValues,
IEnumerable<KeyValuePair<string, object>> actualValues) IEnumerable<KeyValuePair<string, object>> actualValues)
{ {

View file

@ -42,11 +42,11 @@ namespace System.CodeDom.Tests
[Theory] [Theory]
[MemberData(nameof(CodeEventReferenceExpression_CodeExpression_TestData))] [MemberData(nameof(CodeEventReferenceExpression_CodeExpression_TestData))]
public void Ctor_CodeEventReferenceExpression_CodeExpression(CodeEventReferenceExpression eventExpresion, CodeExpression listener) public void Ctor_CodeEventReferenceExpression_CodeExpression(CodeEventReferenceExpression eventExpression, CodeExpression listener)
{ {
var attachEvent = new CodeAttachEventStatement(eventExpresion, listener); var attachEvent = new CodeAttachEventStatement(eventExpression, listener);
Assert.Equal((eventExpresion ?? new CodeEventReferenceExpression()).TargetObject, attachEvent.Event.TargetObject); Assert.Equal((eventExpression ?? new CodeEventReferenceExpression()).TargetObject, attachEvent.Event.TargetObject);
Assert.Equal((eventExpresion ?? new CodeEventReferenceExpression()).EventName, attachEvent.Event.EventName); Assert.Equal((eventExpression ?? new CodeEventReferenceExpression()).EventName, attachEvent.Event.EventName);
Assert.Equal(listener, attachEvent.Listener); Assert.Equal(listener, attachEvent.Listener);
} }

View file

@ -42,11 +42,11 @@ namespace System.CodeDom.Tests
[Theory] [Theory]
[MemberData(nameof(CodeEventReferenceExpression_CodeExpression_TestData))] [MemberData(nameof(CodeEventReferenceExpression_CodeExpression_TestData))]
public void Ctor_CodeEventReferenceExpression_CodeExpression(CodeEventReferenceExpression eventExpresion, CodeExpression listener) public void Ctor_CodeEventReferenceExpression_CodeExpression(CodeEventReferenceExpression eventExpression, CodeExpression listener)
{ {
var removeEvent = new CodeRemoveEventStatement(eventExpresion, listener); var removeEvent = new CodeRemoveEventStatement(eventExpression, listener);
Assert.Equal((eventExpresion ?? new CodeEventReferenceExpression()).TargetObject, removeEvent.Event.TargetObject); Assert.Equal((eventExpression ?? new CodeEventReferenceExpression()).TargetObject, removeEvent.Event.TargetObject);
Assert.Equal((eventExpresion ?? new CodeEventReferenceExpression()).EventName, removeEvent.Event.EventName); Assert.Equal((eventExpression ?? new CodeEventReferenceExpression()).EventName, removeEvent.Event.EventName);
Assert.Equal(listener, removeEvent.Listener); Assert.Equal(listener, removeEvent.Listener);
} }

View file

@ -64,7 +64,7 @@ namespace System.ComponentModel.Composition.Hosting
if ((memberType != null) && memberType.IsGenericType && specifiedContractType.IsGenericType) if ((memberType != null) && memberType.IsGenericType && specifiedContractType.IsGenericType)
{ {
// if the memeber type is closed and the specified contract type is open and they have exatly the same number of parameters // if the member type is closed and the specified contract type is open and they have exatly the same number of parameters
// we will close the specfied contract type // we will close the specfied contract type
if (specifiedContractType.ContainsGenericParameters && !memberType.ContainsGenericParameters) if (specifiedContractType.ContainsGenericParameters && !memberType.ContainsGenericParameters)
{ {
@ -476,7 +476,7 @@ namespace System.ComponentModel.Composition.Hosting
return Enumerable.Empty<KeyValuePair<string, Type>>(); return Enumerable.Empty<KeyValuePair<string, Type>>();
} }
// A metadata view is required to be an Intrerface, and therefore only properties are allowed // A metadata view is required to be an Interface, and therefore only properties are allowed
List<PropertyInfo> properties = metadataViewType.GetAllProperties(). List<PropertyInfo> properties = metadataViewType.GetAllProperties().
Where(property => property.GetFirstAttribute<DefaultValueAttribute>() == null). Where(property => property.GetFirstAttribute<DefaultValueAttribute>() == null).
ToList(); ToList();

View file

@ -120,7 +120,7 @@ namespace System.ComponentModel.Composition.ReflectionModel
return false; return false;
} }
// if any of the lazy memebers create accessors in a delay-loaded fashion, we simply compare the creators // if any of the lazy members create accessors in a delay-loaded fashion, we simply compare the creators
if ((_accessorsCreator != null) || (other._accessorsCreator != null)) if ((_accessorsCreator != null) || (other._accessorsCreator != null))
{ {
return object.Equals(_accessorsCreator, other._accessorsCreator); return object.Equals(_accessorsCreator, other._accessorsCreator);

View file

@ -9,7 +9,7 @@ using Xunit;
namespace System.ComponentModel.Tests namespace System.ComponentModel.Tests
{ {
// Mutable static comparision in the implementation // Mutable static comparison in the implementation
[Collection(nameof(DisableParallelization))] [Collection(nameof(DisableParallelization))]
public class MemberDescriptorTests public class MemberDescriptorTests
{ {

View file

@ -206,7 +206,7 @@ namespace System.Data.Common
public abstract int Compare(int recordNo1, int recordNo2); public abstract int Compare(int recordNo1, int recordNo2);
// only does comparision, expect value to be of the correct type // only does comparison, expect value to be of the correct type
public abstract int CompareValueTo(int recordNo1, object? value); public abstract int CompareValueTo(int recordNo1, object? value);
// only does conversion with support for reference null // only does conversion with support for reference null

View file

@ -2762,7 +2762,7 @@ namespace System.Data.SqlTypes
int Sign1; int Sign1;
int Sign2; int Sign2;
int iFinalResult; //Final result of comparision: positive = greater int iFinalResult; //Final result of comparison: positive = greater
//than, 0 = equal, negative = less than //than, 0 = equal, negative = less than
//Initialize the sign values to be 1(positive) or -1(negative) //Initialize the sign values to be 1(positive) or -1(negative)

View file

@ -398,7 +398,7 @@ namespace System.Data.Tests
Assert.Equal(-1, findResult); Assert.Equal(-1, findResult);
dv.Sort = "ParentId"; dv.Sort = "ParentId";
// Find // Find
findResult = dv.Find("3"); findResult = dv.Find("3");
Assert.Equal(expectedResult, findResult); Assert.Equal(expectedResult, findResult);
} }
@ -1107,7 +1107,7 @@ namespace System.Data.Tests
view1.AllowNew = view2.AllowNew; view1.AllowNew = view2.AllowNew;
Assert.True(view1.Equals(view2)); Assert.True(view1.Equals(view2));
//ApplyDefaultSort doesnet affect the comparision //ApplyDefaultSort doesnet affect the comparison
view1.ApplyDefaultSort = !view2.ApplyDefaultSort; view1.ApplyDefaultSort = !view2.ApplyDefaultSort;
Assert.True(view1.Equals(view2)); Assert.True(view1.Equals(view2));

View file

@ -404,7 +404,7 @@ namespace System.Data.Odbc
NESTED = 0x00000008, // SQL_OJ_NESTED NESTED = 0x00000008, // SQL_OJ_NESTED
NOT_ORDERED = 0x00000010, // SQL_OJ_NOT_ORDERED NOT_ORDERED = 0x00000010, // SQL_OJ_NOT_ORDERED
INNER = 0x00000020, // SQL_OJ_INNER INNER = 0x00000020, // SQL_OJ_INNER
ALL_COMPARISON_OPS = 0x00000040, //SQL_OJ_ALLCOMPARISION+OPS ALL_COMPARISON_OPS = 0x00000040, //SQL_OJ_ALLCOMPARISON+OPS
} }
internal enum SQL_UPDATABLE internal enum SQL_UPDATABLE

View file

@ -537,7 +537,7 @@ namespace System.Data.OleDb
DataTable metaDataCollectionsTable = CollectionDataSet.Tables[DbMetaDataCollectionNames.MetaDataCollections]!; DataTable metaDataCollectionsTable = CollectionDataSet.Tables[DbMetaDataCollectionNames.MetaDataCollections]!;
int numberOfSupportedRestictions = -1; int numberOfSupportedRestictions = -1;
// prepare colletion is called with the exact collection name so // prepare colletion is called with the exact collection name so
// we can do an exact string comparision here // we can do an exact string comparison here
foreach (DataRow row in metaDataCollectionsTable.Rows) foreach (DataRow row in metaDataCollectionsTable.Rows)
{ {
string candidateCollectionName = ((string)row[DbMetaDataColumnNames.CollectionName, DataRowVersion.Current]); string candidateCollectionName = ((string)row[DbMetaDataColumnNames.CollectionName, DataRowVersion.Current]);

View file

@ -2521,7 +2521,7 @@ namespace System.Management
cpde.Name = strLateBoundObject; cpde.Name = strLateBoundObject;
cctor.Parameters.Add(cpde); cctor.Parameters.Add(cpde);
// call this to call function to initialize memeber variables // call this to call function to initialize member variables
InitPrivateMemberVariables(cctor); InitPrivateMemberVariables(cctor);
cis = new CodeConditionStatement(); cis = new CodeConditionStatement();
@ -2591,7 +2591,7 @@ namespace System.Management
cpde.Name = strLateBoundObject; cpde.Name = strLateBoundObject;
cctor.Parameters.Add(cpde); cctor.Parameters.Add(cpde);
// call this to call function to initialize memeber variables // call this to call function to initialize member variables
InitPrivateMemberVariables(cctor); InitPrivateMemberVariables(cctor);
cmie = new CodeMethodInvokeExpression(); cmie = new CodeMethodInvokeExpression();
@ -2671,7 +2671,7 @@ namespace System.Management
cmmInit.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(PublicNamesUsed["PathClass"].ToString()), strPathObject)); cmmInit.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(PublicNamesUsed["PathClass"].ToString()), strPathObject));
cmmInit.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(PublicNamesUsed["GetOptionsClass"].ToString()), strGetOptions)); cmmInit.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(PublicNamesUsed["GetOptionsClass"].ToString()), strGetOptions));
// call this to call function to initialize memeber variables // call this to call function to initialize member variables
InitPrivateMemberVariables(cmmInit); InitPrivateMemberVariables(cmmInit);
//First if path is not null, then we will check whether the class name is the same. //First if path is not null, then we will check whether the class name is the same.

View file

@ -262,7 +262,7 @@ namespace System.Numerics
/// <exception cref="OverflowException"><paramref name="s" /> is not representable by <typeparamref name="TSelf" />.</exception> /// <exception cref="OverflowException"><paramref name="s" /> is not representable by <typeparamref name="TSelf" />.</exception>
static abstract TSelf Parse(ReadOnlySpan<char> s, NumberStyles style, IFormatProvider? provider); static abstract TSelf Parse(ReadOnlySpan<char> s, NumberStyles style, IFormatProvider? provider);
/// <summary>Tries to convert a value to an instance of the the current type, throwing an overflow exception for any values that fall outside the representable range of the current type.</summary> /// <summary>Tries to convert a value to an instance of the current type, throwing an overflow exception for any values that fall outside the representable range of the current type.</summary>
/// <typeparam name="TOther">The type of <paramref name="value" />.</typeparam> /// <typeparam name="TOther">The type of <paramref name="value" />.</typeparam>
/// <param name="value">The value which is used to create the instance of <typeparamref name="TSelf" />.</param> /// <param name="value">The value which is used to create the instance of <typeparamref name="TSelf" />.</param>
/// <param name="result">On return, contains an instance of <typeparamref name="TSelf" /> converted from <paramref name="value" />.</param> /// <param name="result">On return, contains an instance of <typeparamref name="TSelf" /> converted from <paramref name="value" />.</param>
@ -271,7 +271,7 @@ namespace System.Numerics
protected static abstract bool TryConvertFromChecked<TOther>(TOther value, [NotNullWhen(true)] out TSelf? result) protected static abstract bool TryConvertFromChecked<TOther>(TOther value, [NotNullWhen(true)] out TSelf? result)
where TOther : INumberBase<TOther>; where TOther : INumberBase<TOther>;
/// <summary>Tries to convert a value to an instance of the the current type, saturating any values that fall outside the representable range of the current type.</summary> /// <summary>Tries to convert a value to an instance of the current type, saturating any values that fall outside the representable range of the current type.</summary>
/// <typeparam name="TOther">The type of <paramref name="value" />.</typeparam> /// <typeparam name="TOther">The type of <paramref name="value" />.</typeparam>
/// <param name="value">The value which is used to create the instance of <typeparamref name="TSelf" />.</param> /// <param name="value">The value which is used to create the instance of <typeparamref name="TSelf" />.</param>
/// <param name="result">On return, contains an instance of <typeparamref name="TSelf" /> converted from <paramref name="value" />.</param> /// <param name="result">On return, contains an instance of <typeparamref name="TSelf" /> converted from <paramref name="value" />.</param>
@ -279,7 +279,7 @@ namespace System.Numerics
protected static abstract bool TryConvertFromSaturating<TOther>(TOther value, [NotNullWhen(true)] out TSelf? result) protected static abstract bool TryConvertFromSaturating<TOther>(TOther value, [NotNullWhen(true)] out TSelf? result)
where TOther : INumberBase<TOther>; where TOther : INumberBase<TOther>;
/// <summary>Tries to convert a value to an instance of the the current type, truncating any values that fall outside the representable range of the current type.</summary> /// <summary>Tries to convert a value to an instance of the current type, truncating any values that fall outside the representable range of the current type.</summary>
/// <typeparam name="TOther">The type of <paramref name="value" />.</typeparam> /// <typeparam name="TOther">The type of <paramref name="value" />.</typeparam>
/// <param name="value">The value which is used to create the instance of <typeparamref name="TSelf" />.</param> /// <param name="value">The value which is used to create the instance of <typeparamref name="TSelf" />.</param>
/// <param name="result">On return, contains an instance of <typeparamref name="TSelf" /> converted from <paramref name="value" />.</param> /// <param name="result">On return, contains an instance of <typeparamref name="TSelf" /> converted from <paramref name="value" />.</param>
@ -287,7 +287,7 @@ namespace System.Numerics
protected static abstract bool TryConvertFromTruncating<TOther>(TOther value, [NotNullWhen(true)] out TSelf? result) protected static abstract bool TryConvertFromTruncating<TOther>(TOther value, [NotNullWhen(true)] out TSelf? result)
where TOther : INumberBase<TOther>; where TOther : INumberBase<TOther>;
/// <summary>Tries to convert an instance of the the current type to another type, throwing an overflow exception for any values that fall outside the representable range of the current type.</summary> /// <summary>Tries to convert an instance of the current type to another type, throwing an overflow exception for any values that fall outside the representable range of the current type.</summary>
/// <typeparam name="TOther">The type to which <paramref name="value" /> should be converted.</typeparam> /// <typeparam name="TOther">The type to which <paramref name="value" /> should be converted.</typeparam>
/// <param name="value">The value which is used to create the instance of <typeparamref name="TOther" />.</param> /// <param name="value">The value which is used to create the instance of <typeparamref name="TOther" />.</param>
/// <param name="result">On return, contains an instance of <typeparamref name="TOther" /> converted from <paramref name="value" />.</param> /// <param name="result">On return, contains an instance of <typeparamref name="TOther" /> converted from <paramref name="value" />.</param>
@ -296,7 +296,7 @@ namespace System.Numerics
protected static abstract bool TryConvertToChecked<TOther>(TSelf value, [NotNullWhen(true)] out TOther? result) protected static abstract bool TryConvertToChecked<TOther>(TSelf value, [NotNullWhen(true)] out TOther? result)
where TOther : INumberBase<TOther>; where TOther : INumberBase<TOther>;
/// <summary>Tries to convert an instance of the the current type to another type, saturating any values that fall outside the representable range of the current type.</summary> /// <summary>Tries to convert an instance of the current type to another type, saturating any values that fall outside the representable range of the current type.</summary>
/// <typeparam name="TOther">The type to which <paramref name="value" /> should be converted.</typeparam> /// <typeparam name="TOther">The type to which <paramref name="value" /> should be converted.</typeparam>
/// <param name="value">The value which is used to create the instance of <typeparamref name="TOther" />.</param> /// <param name="value">The value which is used to create the instance of <typeparamref name="TOther" />.</param>
/// <param name="result">On return, contains an instance of <typeparamref name="TOther" /> converted from <paramref name="value" />.</param> /// <param name="result">On return, contains an instance of <typeparamref name="TOther" /> converted from <paramref name="value" />.</param>
@ -304,7 +304,7 @@ namespace System.Numerics
protected static abstract bool TryConvertToSaturating<TOther>(TSelf value, [NotNullWhen(true)] out TOther? result) protected static abstract bool TryConvertToSaturating<TOther>(TSelf value, [NotNullWhen(true)] out TOther? result)
where TOther : INumberBase<TOther>; where TOther : INumberBase<TOther>;
/// <summary>Tries to convert an instance of the the current type to another type, truncating any values that fall outside the representable range of the current type.</summary> /// <summary>Tries to convert an instance of the current type to another type, truncating any values that fall outside the representable range of the current type.</summary>
/// <typeparam name="TOther">The type to which <paramref name="value" /> should be converted.</typeparam> /// <typeparam name="TOther">The type to which <paramref name="value" /> should be converted.</typeparam>
/// <param name="value">The value which is used to create the instance of <typeparamref name="TOther" />.</param> /// <param name="value">The value which is used to create the instance of <typeparamref name="TOther" />.</param>
/// <param name="result">On return, contains an instance of <typeparamref name="TOther" /> converted from <paramref name="value" />.</param> /// <param name="result">On return, contains an instance of <typeparamref name="TOther" /> converted from <paramref name="value" />.</param>

View file

@ -713,7 +713,7 @@ namespace System
result = dstDisabled || CheckDaylightSavingTimeNotSupported(timeZone) || result = dstDisabled || CheckDaylightSavingTimeNotSupported(timeZone) ||
// //
// since Daylight Saving Time is not "disabled", do a straight comparision between // since Daylight Saving Time is not "disabled", do a straight comparison between
// the Win32 API data and the registry data ... // the Win32 API data and the registry data ...
// //
(timeZone.DaylightBias == registryTimeZoneInfo.DaylightBias && (timeZone.DaylightBias == registryTimeZoneInfo.DaylightBias &&

View file

@ -130,7 +130,7 @@ namespace System
object val = values[i]; object val = values[i];
bool exchanged = false; bool exchanged = false;
// Since the elements are sorted we only need to do one comparision, we keep the check for j inside the loop. // Since the elements are sorted we only need to do one comparison, we keep the check for j inside the loop.
while (comparer.Compare(values[j - 1], val) > 0) while (comparer.Compare(values[j - 1], val) > 0)
{ {
names[j] = names[j - 1]; names[j] = names[j - 1];

View file

@ -287,7 +287,7 @@ namespace System
} }
else else
{ {
// For values greater than than 2^104 we basically do the same as before but we need to account // For values greater than 2^104 we basically do the same as before but we need to account
// for the precision loss that double will have. As such, the lower value effectively drops the // for the precision loss that double will have. As such, the lower value effectively drops the
// lowest 24 bits and then or's them back to ensure rounding stays correct. // lowest 24 bits and then or's them back to ensure rounding stays correct.

View file

@ -678,7 +678,7 @@ namespace System.Xml.Xsl.IlGen
break; break;
default: default:
// If last condition evalutes to false, branch to false label // If last condition evaluates to false, branch to false label
// Else fall through to true code path // Else fall through to true code path
_iterCurr.SetBranching(BranchingContext.OnFalse, lblOnFalse); _iterCurr.SetBranching(BranchingContext.OnFalse, lblOnFalse);
break; break;
@ -752,7 +752,7 @@ namespace System.Xml.Xsl.IlGen
break; break;
default: default:
// If left condition evalutes to true, jump to code that pushes "true" // If left condition evaluates to true, jump to code that pushes "true"
Debug.Assert(_iterCurr.CurrentBranchingContext == BranchingContext.None); Debug.Assert(_iterCurr.CurrentBranchingContext == BranchingContext.None);
lblTemp = _helper.DefineLabel(); lblTemp = _helper.DefineLabel();
NestedVisitWithBranch(ndOr.Left, BranchingContext.OnTrue, lblTemp); NestedVisitWithBranch(ndOr.Left, BranchingContext.OnTrue, lblTemp);
@ -773,7 +773,7 @@ namespace System.Xml.Xsl.IlGen
break; break;
default: default:
// If right condition evalutes to true, jump to code that pushes "true". // If right condition evaluates to true, jump to code that pushes "true".
// Otherwise, if both conditions evaluate to false, fall through code path // Otherwise, if both conditions evaluate to false, fall through code path
// will push "false". // will push "false".
NestedVisitWithBranch(ndOr.Right, BranchingContext.OnTrue, lblTemp); NestedVisitWithBranch(ndOr.Right, BranchingContext.OnTrue, lblTemp);
@ -3439,7 +3439,7 @@ namespace System.Xml.Xsl.IlGen
// If the expression is a singleton, // If the expression is a singleton,
if (ndVal.Child.XmlType.IsSingleton) if (ndVal.Child.XmlType.IsSingleton)
{ {
// Then generate code to push expresion result onto the stack // Then generate code to push expression result onto the stack
NestedVisitEnsureStack(ndVal.Child, typeof(XPathNavigator), false); NestedVisitEnsureStack(ndVal.Child, typeof(XPathNavigator), false);
// navigator.Value; // navigator.Value;
@ -3514,7 +3514,7 @@ namespace System.Xml.Xsl.IlGen
// If the expression is a singleton, // If the expression is a singleton,
if (ndGenId.Child.XmlType!.IsSingleton) if (ndGenId.Child.XmlType!.IsSingleton)
{ {
// Then generate code to push expresion result onto the stack // Then generate code to push expression result onto the stack
NestedVisitEnsureStack(ndGenId.Child, typeof(XPathNavigator), false); NestedVisitEnsureStack(ndGenId.Child, typeof(XPathNavigator), false);
// runtime.GenerateId(value); // runtime.GenerateId(value);

View file

@ -458,7 +458,7 @@ namespace System.Xml.Xsl.XPath
"ReverseAxe in Qil is actually reverse and we compile them here in builder by wrapping to DocOrderDistinct()" "ReverseAxe in Qil is actually reverse and we compile them here in builder by wrapping to DocOrderDistinct()"
); );
// The trick here is that we unwarp it back, compile as regular predicate and wrap again. // The trick here is that we unwarp it back, compile as regular predicate and wrap again.
// this way this wat we hold invariant that path expresion are always DOD and make predicates on reverse axe // this way this wat we hold invariant that path expression are always DOD and make predicates on reverse axe
// work as specified in XPath 2.0 FS: http://www.w3.org/TR/xquery-semantics/#id-axis-steps // work as specified in XPath 2.0 FS: http://www.w3.org/TR/xquery-semantics/#id-axis-steps
nodeset = ((QilUnary)nodeset).Child; nodeset = ((QilUnary)nodeset).Child;
} }

View file

@ -860,7 +860,7 @@ namespace System.Xml.Xsl.XsltOld
case '}': case '}':
i++; // include '}' i++; // include '}'
if (i == start + 2) if (i == start + 2)
{ // empty XPathExpresion { // empty XPathExpression
throw XsltException.Create(SR.Xslt_EmptyAvtExpr, avt); throw XsltException.Create(SR.Xslt_EmptyAvtExpr, avt);
} }
lex.Append(avt, start + 1, i - start - 2); // avt without {} lex.Append(avt, start + 1, i - start - 2); // avt without {}

View file

@ -11,13 +11,13 @@ using System.Xml.Serialization;
namespace SerializationTestTypes namespace SerializationTestTypes
{ {
public enum ComparisionType public enum ComparisonType
{ {
DCS, DCS,
POCO POCO
} }
#region ComparisionType passed as parameter #region ComparisonType passed as parameter
/// <summary> /// <summary>
/// A type which does not have DataContract,MessageContract,Serializable,does not implements ISerializable or does not implement IXmlSerializable is considered a POCO type /// A type which does not have DataContract,MessageContract,Serializable,does not implements ISerializable or does not implement IXmlSerializable is considered a POCO type
@ -29,11 +29,11 @@ namespace SerializationTestTypes
public static void CompareRecursively(object originalData, object deserializedData, bool approxComparisonForFloatingPointAnd64BitValues = false) public static void CompareRecursively(object originalData, object deserializedData, bool approxComparisonForFloatingPointAnd64BitValues = false)
{ {
ComparisionType cmpType = ComparisionType.DCS; ComparisonType cmpType = ComparisonType.DCS;
SerializationMechanism att = ComparisonHelper.GetSerializationMechanism(originalData); SerializationMechanism att = ComparisonHelper.GetSerializationMechanism(originalData);
if (att.Equals(SerializationMechanism.POCO)) if (att.Equals(SerializationMechanism.POCO))
{ {
cmpType = ComparisionType.POCO; cmpType = ComparisonType.POCO;
} }
ComparisonHelper.CompareData(originalData, deserializedData, att, cmpType); ComparisonHelper.CompareData(originalData, deserializedData, att, cmpType);
} }
@ -98,7 +98,7 @@ namespace SerializationTestTypes
/// </summary> /// </summary>
/// <param name="originalData"></param> /// <param name="originalData"></param>
/// <param name="deserializedData"></param> /// <param name="deserializedData"></param>
private static void CompareData(object originalData, object deserializedData, SerializationMechanism containerTypeAttribute, ComparisionType cmpType) private static void CompareData(object originalData, object deserializedData, SerializationMechanism containerTypeAttribute, ComparisonType cmpType)
{ {
if (originalData == null) // both are null, comparison succeeded if (originalData == null) // both are null, comparison succeeded
{ {
@ -113,7 +113,7 @@ namespace SerializationTestTypes
//Fail if only one of the objects is null //Fail if only one of the objects is null
if ((null == originalData) != (null == deserializedData)) if ((null == originalData) != (null == deserializedData))
{ {
string message = string.Format("Comparision failed: Original data is {0}, deserialized data is {1}", string message = string.Format("Comparison failed: Original data is {0}, deserialized data is {1}",
originalData == null ? "null" : "not null", deserializedData == null ? "null" : "not null"); originalData == null ? "null" : "not null", deserializedData == null ? "null" : "not null");
if (originalData != null) if (originalData != null)
@ -133,7 +133,7 @@ namespace SerializationTestTypes
bool result = originalData.Equals(deserializedData); bool result = originalData.Equals(deserializedData);
if (!result) if (!result)
{ {
throw new Exception("Comparision failed for type " + originalData.GetType().Name); throw new Exception("Comparison failed for type " + originalData.GetType().Name);
} }
return; return;
} }
@ -144,7 +144,7 @@ namespace SerializationTestTypes
if (!originalDataType.Equals(deserializedDataType)) if (!originalDataType.Equals(deserializedDataType))
{ {
throw new Exception(string.Format("Comparision failed : Original type {0} not same as deserialized type {1}", originalDataType.ToString(), deserializedDataType.ToString())); throw new Exception(string.Format("Comparison failed : Original type {0} not same as deserialized type {1}", originalDataType.ToString(), deserializedDataType.ToString()));
} }
object[] dataContractAttributes = originalDataType.GetCustomAttributes(typeof(DataContractAttribute), false); object[] dataContractAttributes = originalDataType.GetCustomAttributes(typeof(DataContractAttribute), false);
@ -171,7 +171,7 @@ namespace SerializationTestTypes
{ {
if (!originalData.Equals(deserializedData)) if (!originalData.Equals(deserializedData))
{ {
throw new Exception(string.Format("Comparision failed: Original string data {0} is not same as deserialized string data {1}", originalData, deserializedData)); throw new Exception(string.Format("Comparison failed: Original string data {0} is not same as deserialized string data {1}", originalData, deserializedData));
} }
} }
#endregion #endregion
@ -185,7 +185,7 @@ namespace SerializationTestTypes
Trace.WriteLine(string.Format(LogMessage, originalDataType, originalDataXml, deserializedDataType, deserializedDataXml)); Trace.WriteLine(string.Format(LogMessage, originalDataType, originalDataXml, deserializedDataType, deserializedDataXml));
if (!originalDataXml.Equals(deserializedDataXml)) if (!originalDataXml.Equals(deserializedDataXml))
{ {
throw new Exception(string.Format("Comparision failed: Original XML data ({0}) is not the same as the deserialized XML data ({1})", throw new Exception(string.Format("Comparison failed: Original XML data ({0}) is not the same as the deserialized XML data ({1})",
originalDataXml, deserializedDataXml)); originalDataXml, deserializedDataXml));
} }
} }
@ -204,7 +204,7 @@ namespace SerializationTestTypes
{ {
if (!(((DateTime)originalData).ToUniversalTime().Equals(((DateTime)deserializedData).ToUniversalTime()))) if (!(((DateTime)originalData).ToUniversalTime().Equals(((DateTime)deserializedData).ToUniversalTime())))
{ {
throw new Exception(string.Format("Comparision failed: Original Datetime ticks {0} is not same as deserialized Datetime ticks {1}", ((DateTime)originalData).Ticks.ToString(), ((DateTime)deserializedData).Ticks.ToString())); throw new Exception(string.Format("Comparison failed: Original Datetime ticks {0} is not same as deserialized Datetime ticks {1}", ((DateTime)originalData).Ticks.ToString(), ((DateTime)deserializedData).Ticks.ToString()));
} }
} }
else if ( else if (
@ -218,7 +218,7 @@ namespace SerializationTestTypes
{ {
if (!originalData.Equals(deserializedData)) if (!originalData.Equals(deserializedData))
{ {
throw new Exception(string.Format("Comparision failed : Original type data {0} is not same as deserialized type data {1}", originalData.ToString(), deserializedData.ToString())); throw new Exception(string.Format("Comparison failed : Original type data {0} is not same as deserialized type data {1}", originalData.ToString(), deserializedData.ToString()));
} }
} }
@ -237,7 +237,7 @@ namespace SerializationTestTypes
bool different = !originalData.Equals(deserializedData); bool different = !originalData.Equals(deserializedData);
if (different) if (different)
{ {
throw new Exception(string.Format("Comparision failed: Original primitive data {0} is not same as deserialized primitive data {1}", originalData.ToString(), deserializedData.ToString())); throw new Exception(string.Format("Comparison failed: Original primitive data {0} is not same as deserialized primitive data {1}", originalData.ToString(), deserializedData.ToString()));
} }
} }
#endregion #endregion
@ -255,7 +255,7 @@ namespace SerializationTestTypes
//Verify this will work for all scenarios //Verify this will work for all scenarios
if (!originalData.ToString().Equals(deserializedData.ToString())) if (!originalData.ToString().Equals(deserializedData.ToString()))
{ {
throw new Exception(string.Format("Comparision failed: Original enum data {0} is not same as deserialized enum data {1}", originalData.ToString(), deserializedData.ToString())); throw new Exception(string.Format("Comparison failed: Original enum data {0} is not same as deserialized enum data {1}", originalData.ToString(), deserializedData.ToString()));
} }
} }
} }
@ -285,7 +285,7 @@ namespace SerializationTestTypes
// the type knows how to compare itself, we'll use it // the type knows how to compare itself, we'll use it
if (!originalData.Equals(deserializedData)) if (!originalData.Equals(deserializedData))
{ {
throw new Exception(string.Format("Comparision failed: Original type data {0} is not same as deserialized type data {1}", originalData.ToString(), deserializedData.ToString())); throw new Exception(string.Format("Comparison failed: Original type data {0} is not same as deserialized type data {1}", originalData.ToString(), deserializedData.ToString()));
} }
} }
#endregion #endregion
@ -311,7 +311,7 @@ namespace SerializationTestTypes
} }
else else
{ {
throw new Exception(string.Format("Comparision failed: Original IDictionary type {0} and deserialized IDictionary type {1} are not of same", originalDataType.GetType().ToString(), deserializedDataType.GetType().ToString())); throw new Exception(string.Format("Comparison failed: Original IDictionary type {0} and deserialized IDictionary type {1} are not of same", originalDataType.GetType().ToString(), deserializedDataType.GetType().ToString()));
} }
} }
#endregion #endregion
@ -332,7 +332,7 @@ namespace SerializationTestTypes
} }
else else
{ {
throw new Exception(string.Format("Comparision failed: Original type {0} and deserialized type {1} are not IEnumerable", originalDataType.GetType().ToString(), deserializedDataType.GetType().ToString())); throw new Exception(string.Format("Comparison failed: Original type {0} and deserialized type {1} are not IEnumerable", originalDataType.GetType().ToString(), deserializedDataType.GetType().ToString()));
} }
} }
@ -352,12 +352,12 @@ namespace SerializationTestTypes
#endregion #endregion
} }
private static bool IsMemberMarkedWithEnumMember(object data, ComparisionType cmpType) private static bool IsMemberMarkedWithEnumMember(object data, ComparisonType cmpType)
{ {
bool isEnumMember = false; bool isEnumMember = false;
//Non-public members are not serialized for POCO types //Non-public members are not serialized for POCO types
BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static; BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static;
if (cmpType.Equals(ComparisionType.DCS)) if (cmpType.Equals(ComparisonType.DCS))
{ {
flag = flag | BindingFlags.NonPublic; flag = flag | BindingFlags.NonPublic;
} }
@ -377,11 +377,11 @@ namespace SerializationTestTypes
/// <param name="originalData"></param> /// <param name="originalData"></param>
/// <param name="deserializedData"></param> /// <param name="deserializedData"></param>
/// <param name="containerTypeAttribute"></param> /// <param name="containerTypeAttribute"></param>
private static void CompareProperties(object originalData, object deserializedData, SerializationMechanism containerTypeAttribute, ComparisionType cmpType) private static void CompareProperties(object originalData, object deserializedData, SerializationMechanism containerTypeAttribute, ComparisonType cmpType)
{ {
BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static; BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static;
//Include private fields for DCS types //Include private fields for DCS types
if (cmpType.Equals(ComparisionType.DCS)) if (cmpType.Equals(ComparisonType.DCS))
{ {
flag = flag | BindingFlags.NonPublic; flag = flag | BindingFlags.NonPublic;
} }
@ -390,7 +390,7 @@ namespace SerializationTestTypes
{ {
object newData = property.GetValue(originalData, null); object newData = property.GetValue(originalData, null);
SerializationMechanism fieldAttribute = ComparisonHelper.GetSerializationMechanism(newData); SerializationMechanism fieldAttribute = ComparisonHelper.GetSerializationMechanism(newData);
if (cmpType.Equals(ComparisionType.DCS)) if (cmpType.Equals(ComparisonType.DCS))
{ {
if (containerTypeAttribute.Equals(SerializationMechanism.DataContractAttribute)) if (containerTypeAttribute.Equals(SerializationMechanism.DataContractAttribute))
{ {
@ -427,7 +427,7 @@ namespace SerializationTestTypes
} }
} }
} }
else if (cmpType.Equals(ComparisionType.POCO)) else if (cmpType.Equals(ComparisonType.POCO))
{ {
//Ignore member with [IgnoreDataMember] attribute on a POCO type //Ignore member with [IgnoreDataMember] attribute on a POCO type
if (property.GetCustomAttributes(typeof(IgnoreDataMemberAttribute), false).Length == 0) if (property.GetCustomAttributes(typeof(IgnoreDataMemberAttribute), false).Length == 0)
@ -488,12 +488,12 @@ namespace SerializationTestTypes
return complexType; return complexType;
} }
private static void CompareFields(object originalData, object deserializedData, SerializationMechanism containerTypeAttribute, ComparisionType cmpType) private static void CompareFields(object originalData, object deserializedData, SerializationMechanism containerTypeAttribute, ComparisonType cmpType)
{ {
//Compare fields //Compare fields
//Non-public members are not serialized for POCO types //Non-public members are not serialized for POCO types
BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static; BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static;
if (cmpType.Equals(ComparisionType.DCS)) if (cmpType.Equals(ComparisonType.DCS))
{ {
flag = flag | BindingFlags.NonPublic; flag = flag | BindingFlags.NonPublic;
} }
@ -502,7 +502,7 @@ namespace SerializationTestTypes
{ {
object newData = field.GetValue(originalData); object newData = field.GetValue(originalData);
SerializationMechanism fieldAttribute = GetSerializationMechanism(newData); SerializationMechanism fieldAttribute = GetSerializationMechanism(newData);
if (cmpType.Equals(ComparisionType.DCS)) if (cmpType.Equals(ComparisonType.DCS))
{ {
if (containerTypeAttribute.Equals(SerializationMechanism.DataContractAttribute)) if (containerTypeAttribute.Equals(SerializationMechanism.DataContractAttribute))
{ {
@ -539,7 +539,7 @@ namespace SerializationTestTypes
} }
} }
} }
else if (cmpType.Equals(ComparisionType.POCO)) else if (cmpType.Equals(ComparisonType.POCO))
{ {
//ReadOnly fields should be ignored for POCO type //ReadOnly fields should be ignored for POCO type
//Ignore member with [IgnoreDataMember] attribute on a POCO type //Ignore member with [IgnoreDataMember] attribute on a POCO type

View file

@ -1609,7 +1609,7 @@ namespace System.Tests
} }
} }
public static IEnumerable<object[]> Copy_UnreliableCoversion_CantPerform_TestData() public static IEnumerable<object[]> Copy_UnreliableConversion_CantPerform_TestData()
{ {
yield return new object[] { new object[] { "1" }, new int[1] }; yield return new object[] { new object[] { "1" }, new int[1] };
@ -1633,8 +1633,8 @@ namespace System.Tests
} }
[Theory] [Theory]
[MemberData(nameof(Copy_UnreliableCoversion_CantPerform_TestData))] [MemberData(nameof(Copy_UnreliableConversion_CantPerform_TestData))]
public static void Copy_UnreliableConverson_CantPerform_ThrowsInvalidCastException(Array sourceArray, Array destinationArray) public static void Copy_UnreliableConversion_CantPerform_ThrowsInvalidCastException(Array sourceArray, Array destinationArray)
{ {
int length = Math.Min(sourceArray.Length, destinationArray.Length); int length = Math.Min(sourceArray.Length, destinationArray.Length);
Assert.Throws<InvalidCastException>(() => Array.Copy(sourceArray, destinationArray, length)); Assert.Throws<InvalidCastException>(() => Array.Copy(sourceArray, destinationArray, length));
@ -1651,7 +1651,7 @@ namespace System.Tests
} }
[Theory] [Theory]
[MemberData(nameof(Copy_UnreliableCoversion_CantPerform_TestData))] [MemberData(nameof(Copy_UnreliableConversion_CantPerform_TestData))]
public static void ConstrainedCopy_UnreliableConversion_CantPerform_ThrowsArrayTypeMismatchException(Array sourceArray, Array destinationArray) public static void ConstrainedCopy_UnreliableConversion_CantPerform_ThrowsArrayTypeMismatchException(Array sourceArray, Array destinationArray)
{ {
int length = Math.Min(sourceArray.Length, destinationArray.Length); int length = Math.Min(sourceArray.Length, destinationArray.Length);

View file

@ -215,9 +215,9 @@ namespace System.Tests
[InlineData("Hello", 'e', StringComparison.OrdinalIgnoreCase, true)] [InlineData("Hello", 'e', StringComparison.OrdinalIgnoreCase, true)]
[InlineData("Hello", 'E', StringComparison.OrdinalIgnoreCase, true)] [InlineData("Hello", 'E', StringComparison.OrdinalIgnoreCase, true)]
[InlineData("", 'H', StringComparison.OrdinalIgnoreCase, false)] [InlineData("", 'H', StringComparison.OrdinalIgnoreCase, false)]
public static void Contains_Char_StringComparison(string s, char value, StringComparison comparisionType, bool expected) public static void Contains_Char_StringComparison(string s, char value, StringComparison comparisonType, bool expected)
{ {
Assert.Equal(expected, s.Contains(value, comparisionType)); Assert.Equal(expected, s.Contains(value, comparisonType));
} }
public static IEnumerable<object[]> Contains_String_StringComparison_TestData() public static IEnumerable<object[]> Contains_String_StringComparison_TestData()

View file

@ -27,7 +27,7 @@ namespace System.Security.Cryptography.Cose.Tests
=> Sign(content, GetCoseSigner(key, hashAlgorithm, protectedHeaders, unprotectedHeaders, padding), null, null, null, isDetached); => Sign(content, GetCoseSigner(key, hashAlgorithm, protectedHeaders, unprotectedHeaders, padding), null, null, null, isDetached);
// Returns the map that is set in CoseSigner and used for Signing. // Returns the map that is set in CoseSigner and used for Signing.
// For sign1, it returns one of the the body header maps. // For sign1, it returns one of the body header maps.
// For multisign, it returns one of the sign header maps. // For multisign, it returns one of the sign header maps.
internal abstract CoseHeaderMap GetSigningHeaderMap(CoseMessage msg, bool getProtectedMap); internal abstract CoseHeaderMap GetSigningHeaderMap(CoseMessage msg, bool getProtectedMap);

View file

@ -581,7 +581,7 @@ namespace System.Text.Json.Serialization.Metadata
// There are 3 copies of the property name: // There are 3 copies of the property name:
// 1) Name. The unescaped property name. // 1) Name. The unescaped property name.
// 2) NameAsUtf8Bytes. The Utf8 version of Name. Used during during deserialization for property lookup. // 2) NameAsUtf8Bytes. The Utf8 version of Name. Used during during deserialization for property lookup.
// 3) EscapedNameSection. The escaped verson of NameAsUtf8Bytes plus the wrapping quotes and a trailing colon. Used during serialization. // 3) EscapedNameSection. The escaped version of NameAsUtf8Bytes plus the wrapping quotes and a trailing colon. Used during serialization.
/// <summary> /// <summary>
/// Gets or sets the JSON property name used when serializing the property. /// Gets or sets the JSON property name used when serializing the property.

View file

@ -19,7 +19,7 @@
<ApiCompatExcludeAttributesFile Include="ApiCompatBaselineExcludedAttributes.txt" /> <ApiCompatExcludeAttributesFile Include="ApiCompatBaselineExcludedAttributes.txt" />
</ItemGroup> </ItemGroup>
<!-- For API comparision, ApiCompat needs both the inbox and the out-of-band assemblies plus the shims to be built. --> <!-- For API comparison, ApiCompat needs both the inbox and the out-of-band assemblies plus the shims to be built. -->
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\sfx-src.proj; <ProjectReference Include="..\sfx-src.proj;
..\oob-src.proj; ..\oob-src.proj;
@ -76,7 +76,7 @@
<Output TaskParameter="ExitCode" PropertyName="ApiCompatExitCode" /> <Output TaskParameter="ExitCode" PropertyName="ApiCompatExitCode" />
</ApiCompatTask> </ApiCompatTask>
<Error Condition="'$(ApiCompatExitCode)' != '0'" Text="ApiCompat failed comparing netstandard to $(NetCoreAppCurrent). If this breaking change is intentional, the ApiCompat baseline files can be updated by running 'dotnet build $(MSBuildThisFileFullPath) --no-incremental /p:UpdateBaselineFiles=true'." /> <Error Condition="'$(ApiCompatExitCode)' != '0'" Text="ApiCompat failed comparing netstandard to $(NetCoreAppCurrent). If this breaking change is intentional, the ApiCompat baseline files can be updated by running 'dotnet build $(MSBuildThisFileFullPath) --no-incremental /p:UpdateBaselineFiles=true'." />
<!-- ApiCompat: NetCoreAppCurrent <-> NetCoreAppLatestStable --> <!-- ApiCompat: NetCoreAppCurrent <-> NetCoreAppLatestStable -->
<ApiCompatTask Contracts="$([MSBuild]::NormalizeDirectory('$(NuGetPackageRoot)', 'microsoft.netcore.app.ref', '$(NetCoreAppLatestStablePackageBaselineVersion)', 'ref', '$(NetCoreAppLatestStable)'))" <ApiCompatTask Contracts="$([MSBuild]::NormalizeDirectory('$(NuGetPackageRoot)', 'microsoft.netcore.app.ref', '$(NetCoreAppLatestStablePackageBaselineVersion)', 'ref', '$(NetCoreAppLatestStable)'))"
ExcludeAttributes="@(ApiCompatExcludeAttributesFile)" ExcludeAttributes="@(ApiCompatExcludeAttributesFile)"

View file

@ -1145,7 +1145,7 @@ hot_reload_relative_delta_index (MonoImage *image_dmeta, DeltaInfo *delta_info,
mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_METADATA_UPDATE, "relative index for token 0x%08x -> table 0x%02x row 0x%08x", token, table, return_val); mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_METADATA_UPDATE, "relative index for token 0x%08x -> table 0x%02x row 0x%08x", token, table, return_val);
return return_val; return return_val;
} else { } else {
/* Otherwise we stopped either: because we saw an an entry for a row after /* Otherwise we stopped either: because we saw an entry for a row after
* the one we wanted - we were looking for a modification, but the encmap * the one we wanted - we were looking for a modification, but the encmap
* has an addition; or, because we saw the last entry in the encmap and it * has an addition; or, because we saw the last entry in the encmap and it
* still wasn't for a row as high as the one we wanted. either way, the * still wasn't for a row as high as the one we wanted. either way, the

View file

@ -7803,7 +7803,7 @@ TestStructWithUtf8Field(struct FieldWithUtf8 fieldStruct)
pszNative = (char*)utf8Strings[stringIndex]; pszNative = (char*)utf8Strings[stringIndex];
outLen = strlen(pszNative); outLen = strlen(pszNative);
// do byte by byte comparision // do byte by byte comparison
for (size_t i = 0; i < outLen; i++) for (size_t i = 0; i < outLen; i++)
{ {
if (pszNative[i] != pszManagedutf8[i]) if (pszNative[i] != pszManagedutf8[i])

View file

@ -1789,7 +1789,7 @@ nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
of the same size are arranged in a circularly-linked list, with only of the same size are arranged in a circularly-linked list, with only
the oldest chunk (the next to be used, in our FIFO ordering) the oldest chunk (the next to be used, in our FIFO ordering)
actually in the tree. (Tree members are distinguished by a non-null actually in the tree. (Tree members are distinguished by a non-null
parent pointer.) If a chunk with the same size an an existing node parent pointer.) If a chunk with the same size an existing node
is inserted, it is linked off the existing node using pointers that is inserted, it is linked off the existing node using pointers that
work in the same way as fd/bk pointers of small chunks. work in the same way as fd/bk pointers of small chunks.

View file

@ -344,8 +344,8 @@ namespace Microsoft.WebAssembly.Diagnostics
{ {
/* /*
Instead of invoking the method on the primitive type in the runtime, Instead of invoking the method on the primitive type in the runtime,
we emit a local for the primitive, and emit the the method call we emit a local for the primitive, and emit the method call itself
itself in the script. For example: in the script. For example:
double test_propUlong_2c64c = 12; double test_propUlong_2c64c = 12;
return (test_propUlong_2c64c.ToString()); return (test_propUlong_2c64c.ToString());
*/ */

View file

@ -33,10 +33,10 @@ char* utf16_to_utf8(const wchar_t *srcstring)
char *pszUTF8 = (char*)CoreClrAlloc(sizeof(char) * (cbUTF8 + 1)); char *pszUTF8 = (char*)CoreClrAlloc(sizeof(char) * (cbUTF8 + 1));
int nc = WideCharToMultiByte(CP_UTF8, // convert to UTF-8 int nc = WideCharToMultiByte(CP_UTF8, // convert to UTF-8
0, //default flags 0, //default flags
srcstring, //source wide string srcstring, //source wide string
(int)cchUTF16, // length of wide string (int)cchUTF16, // length of wide string
pszUTF8, // destination buffer pszUTF8, // destination buffer
cbUTF8, // destination buffer size cbUTF8, // destination buffer size
NULL, NULL,
NULL); NULL);
@ -116,7 +116,7 @@ char *get_utf8_string(int index) {
void free_utf8_string(char *str) void free_utf8_string(char *str)
{ {
// do nothing , we never allocated the temp buffer on non-windows // do nothing , we never allocated the temp buffer on non-windows
} }
#endif #endif
@ -137,7 +137,7 @@ LPSTR build_return_string(const char* pReturn)
// Modify the string builder in place, managed side validates. // Modify the string builder in place, managed side validates.
extern "C" DLL_EXPORT void __cdecl StringBuilderParameterInOut(/*[In,Out] StringBuilder*/ char *s, int index) extern "C" DLL_EXPORT void __cdecl StringBuilderParameterInOut(/*[In,Out] StringBuilder*/ char *s, int index)
{ {
// if string.empty // if string.empty
if (s == 0 || *s == 0) if (s == 0 || *s == 0)
return; return;
@ -145,16 +145,16 @@ extern "C" DLL_EXPORT void __cdecl StringBuilderParameterInOut(/*[In,Out] String
// do byte by byte validation of in string // do byte by byte validation of in string
size_t szLen = strlen(s); size_t szLen = strlen(s);
for (size_t i = 0; i < szLen; i++) for (size_t i = 0; i < szLen; i++)
{ {
if (s[i] != pszTextutf8[i]) if (s[i] != pszTextutf8[i])
{ {
printf("[in] managed string do not match native string\n"); printf("[in] managed string do not match native string\n");
throw; throw;
} }
} }
// modify the string inplace // modify the string inplace
size_t outLen = strlen(pszTextutf8); size_t outLen = strlen(pszTextutf8);
for (size_t i = 0; i < outLen; i++) { for (size_t i = 0; i < outLen; i++) {
s[i] = pszTextutf8[i]; s[i] = pszTextutf8[i];
@ -167,7 +167,7 @@ extern "C" DLL_EXPORT void __cdecl StringBuilderParameterInOut(/*[In,Out] String
extern "C" DLL_EXPORT void __cdecl StringBuilderParameterOut(/*[Out] StringBuilder*/ char *s, int index) extern "C" DLL_EXPORT void __cdecl StringBuilderParameterOut(/*[Out] StringBuilder*/ char *s, int index)
{ {
char *pszTextutf8 = get_utf8_string(index); char *pszTextutf8 = get_utf8_string(index);
// modify the string inplace // modify the string inplace
size_t outLen = strlen(pszTextutf8); size_t outLen = strlen(pszTextutf8);
for (size_t i = 0; i < outLen; i++) { for (size_t i = 0; i < outLen; i++) {
s[i] = pszTextutf8[i]; s[i] = pszTextutf8[i];
@ -177,7 +177,7 @@ extern "C" DLL_EXPORT void __cdecl StringBuilderParameterOut(/*[Out] StringBuil
} }
// return utf8 stringbuilder // return utf8 stringbuilder
extern "C" DLL_EXPORT char* __cdecl StringBuilderParameterReturn(int index) extern "C" DLL_EXPORT char* __cdecl StringBuilderParameterReturn(int index)
{ {
char *pszTextutf8 = get_utf8_string(index); char *pszTextutf8 = get_utf8_string(index);
size_t strLength = strlen(pszTextutf8); size_t strLength = strlen(pszTextutf8);
@ -194,7 +194,7 @@ extern "C" DLL_EXPORT LPSTR __cdecl StringParameterOut(/*[Out]*/ char *s, int in
return build_return_string(s); return build_return_string(s);
} }
// string // string
extern "C" DLL_EXPORT LPSTR __cdecl StringParameterInOut(/*[In,Out]*/ char *s, int index) extern "C" DLL_EXPORT LPSTR __cdecl StringParameterInOut(/*[In,Out]*/ char *s, int index)
{ {
// return a copy // return a copy
@ -221,10 +221,10 @@ extern "C" DLL_EXPORT void __cdecl TestStructWithUtf8Field(struct FieldWithUtf8
pszNative = get_utf8_string(stringIndex); pszNative = get_utf8_string(stringIndex);
outLen = strlen(pszNative); outLen = strlen(pszNative);
// do byte by byte comparision // do byte by byte comparison
for (size_t i = 0; i < outLen; i++) for (size_t i = 0; i < outLen; i++)
{ {
if (pszNative[i] != pszManagedutf8[i]) if (pszNative[i] != pszManagedutf8[i])
{ {
printf("Native and managed string do not match.\n"); printf("Native and managed string do not match.\n");
throw; throw;
@ -274,7 +274,7 @@ extern "C" DLL_EXPORT void __cdecl StringParameterRef(/*ref*/ char **s, int inde
{ {
CoreClrFree(*s); CoreClrFree(*s);
} }
// overwrite the orginal // overwrite the orginal
*s = (LPSTR)(CoreClrAlloc(sizeof(char)* (strLength + 1))); *s = (LPSTR)(CoreClrAlloc(sizeof(char)* (strLength + 1)));
memcpy(*s, pszTextutf8, strLength); memcpy(*s, pszTextutf8, strLength);
(*s)[strLength] = '\0'; (*s)[strLength] = '\0';
@ -285,8 +285,8 @@ extern "C" DLL_EXPORT void __cdecl StringParameterRef(/*ref*/ char **s, int inde
typedef void (__cdecl * Callback)(char *text, int index); typedef void (__cdecl * Callback)(char *text, int index);
extern "C" DLL_EXPORT void __cdecl Utf8DelegateAsParameter(Callback managedCallback) extern "C" DLL_EXPORT void __cdecl Utf8DelegateAsParameter(Callback managedCallback)
{ {
for (int i = 0; i < NSTRINGS; ++i) for (int i = 0; i < NSTRINGS; ++i)
{ {
char *pszNative = get_utf8_string(i); char *pszNative = get_utf8_string(i);
managedCallback(pszNative, i); managedCallback(pszNative, i);
free_utf8_string(pszNative); free_utf8_string(pszNative);

View file

@ -45,7 +45,7 @@ namespace Algorithms
{ {
int xp = 0; int xp = 0;
for (Vector<float> vx = vxmin; for (Vector<float> vx = vxmin;
Vector.LessThanOrEqualAny(vx, vxmax); // Vector.{comparision}Any|All return bools, not masks Vector.LessThanOrEqualAny(vx, vxmax); // Vector.{comparison}Any|All return bools, not masks
vx += vinc, xp += Vector<int>.Count) vx += vinc, xp += Vector<int>.Count)
{ {
ComplexVecFloat num = new ComplexVecFloat(vx, vy); ComplexVecFloat num = new ComplexVecFloat(vx, vy);
@ -62,7 +62,7 @@ namespace Algorithms
viters += increment; viters += increment;
// Create a mask that correspons to the element-wise logical operation // Create a mask that correspons to the element-wise logical operation
// "accum <= limit && iters <= max_iters" Note that the bitwise and is used, // "accum <= limit && iters <= max_iters" Note that the bitwise and is used,
// because the Vector.{comparision} operations return masks, not boolean values // because the Vector.{comparison} operations return masks, not boolean values
Vector<int> vCond = Vector.LessThanOrEqual(accum.sqabs(), vlimit) & Vector<int> vCond = Vector.LessThanOrEqual(accum.sqabs(), vlimit) &
Vector.LessThanOrEqual(viters, vmax_iters); Vector.LessThanOrEqual(viters, vmax_iters);
// increment becomes zero for the elems that have hit the limit because // increment becomes zero for the elems that have hit the limit because
@ -75,8 +75,8 @@ namespace Algorithms
// This is another little helper I created. It's definitely kind of slow but I // This is another little helper I created. It's definitely kind of slow but I
// find it pleasantly succinct. It could also be written like this: // find it pleasantly succinct. It could also be written like this:
// //
// for (int eNum = 0; eNum < Vector<int>.Count; eNum++) // for (int eNum = 0; eNum < Vector<int>.Count; eNum++)
// DrawPixel(xp + eNum, yp, viters[eNum]); // DrawPixel(xp + eNum, yp, viters[eNum]);
// //
// Neither implementation is particularly fast, because pulling individual elements // Neither implementation is particularly fast, because pulling individual elements

View file

@ -29,15 +29,15 @@ public static class GitHub_23159
[MethodImpl(MethodImplOptions.AggressiveOptimization)] [MethodImpl(MethodImplOptions.AggressiveOptimization)]
public unsafe static bool BytesOrdinalEqualsStringAndAscii(string previousValue, Span<byte> newValue) public unsafe static bool BytesOrdinalEqualsStringAndAscii(string previousValue, Span<byte> newValue)
{ {
// We just widen the bytes to char for comparision, if either the string or the bytes are not ascii // We just widen the bytes to char for comparison, if either the string or the bytes are not ascii
// this will result in non-equality, so we don't need to specifically test for non-ascii. // this will result in non-equality, so we don't need to specifically test for non-ascii.
Debug.Assert(previousValue.Length == newValue.Length); Debug.Assert(previousValue.Length == newValue.Length);
// Use IntPtr values rather than int, to avoid unnessary 32 -> 64 movs on 64-bit. // Use IntPtr values rather than int, to avoid unnessary 32 -> 64 movs on 64-bit.
// Unfortunately this means we also need to cast to byte* for comparisions as IntPtr doesn't // Unfortunately this means we also need to cast to byte* for comparisons as IntPtr doesn't
// support operator comparisions (e.g. <=, >, etc). // support operator comparisons (e.g. <=, >, etc).
// Note: Pointer comparision is unsigned, so we use the compare pattern (offset + length <= count) // Note: Pointer comparison is unsigned, so we use the compare pattern (offset + length <= count)
// rather than (offset <= count - length) which we'd do with signed comparision to avoid overflow. // rather than (offset <= count - length) which we'd do with signed comparison to avoid overflow.
var count = (IntPtr)newValue.Length; var count = (IntPtr)newValue.Length;
var offset = (IntPtr)0; var offset = (IntPtr)0;

View file

@ -218,7 +218,7 @@ EXPORT(DT) __stdcall nativeCall_PInvoke_Vector3InStruct(DT data)
ret.b.x = data.b.x + 1; ret.b.x = data.b.x + 1;
ret.b.y = data.b.y + 1; ret.b.y = data.b.y + 1;
ret.b.z = data.b.z + 1; ret.b.z = data.b.z + 1;
printf(" First struct memeber: (%f %f %f) -> (%f %f %f)\n", printf(" First struct member: (%f %f %f) -> (%f %f %f)\n",
data.a.x, data.a.y, data.a.z, ret.a.x, ret.a.y, ret.a.z); data.a.x, data.a.y, data.a.z, ret.a.x, ret.a.y, ret.a.z);
printf(" Second struct member: (%f %f %f) -> (%f %f %f)\n", printf(" Second struct member: (%f %f %f) -> (%f %f %f)\n",
data.b.x, data.b.y, data.b.z, ret.b.x, ret.b.y, ret.b.z); data.b.x, data.b.y, data.b.z, ret.b.x, ret.b.y, ret.b.z);

View file

@ -14,7 +14,7 @@
// Nesting module: Pure Managed // Nesting module: Pure Managed
// Nesting location: MainModule // Nesting location: MainModule
// enclosing type // enclosing type
// kind: class // kind: class
// flag: abstract // flag: abstract
// visibility: public // visibility: public
@ -25,7 +25,7 @@
.class abstract public EnclType extends EnclType/NestedType .class abstract public EnclType extends EnclType/NestedType
{ {
// nested type // nested type
// kind: class // kind: class
// flag: none // flag: none
// visibility: public // visibility: public
@ -35,7 +35,7 @@
.class nested public NestedType .class nested public NestedType
{ {
// nested memeber visibility: assembly // nested member visibility: assembly
.field assembly int32 i .field assembly int32 i
.method public specialname instance void .ctor() cil managed .method public specialname instance void .ctor() cil managed
@ -47,7 +47,7 @@
} }
} }
// enclosing memeber visibility: assembly // enclosing member visibility: assembly
.field assembly int32 i .field assembly int32 i
@ -58,7 +58,7 @@
01 00 00 00 01 00 00 00
) )
.entrypoint .entrypoint
.locals init (class Client V_0, .locals init (class Client V_0,
class [mscorlib]System.Exception V_1, class [mscorlib]System.Exception V_1,
int32 V_2) int32 V_2)
@ -68,14 +68,14 @@
stloc.0 stloc.0
ldloc.0 ldloc.0
call instance void Client::method4() call instance void Client::method4()
ldstr "PASS" ldstr "PASS"
call void [System.Console]System.Console::WriteLine(string) call void [System.Console]System.Console::WriteLine(string)
ldc.i4.s 100 ldc.i4.s 100
stloc.2 stloc.2
leave.s end leave.s end
} }
catch [mscorlib]System.Exception catch [mscorlib]System.Exception
{ {
stloc.1 stloc.1
ldstr "{0}Caught unexpected exception." ldstr "{0}Caught unexpected exception."
@ -89,7 +89,7 @@
} }
end: ldloc.2 end: ldloc.2
ret ret
} }
} }
// Client module: Pure Managed // Client module: Pure Managed

View file

@ -24,34 +24,32 @@ namespace ConsoleApplication1
public B[] b; public B[] b;
} }
static int Main(string[] args) static int Main(string[] args)
{ {
try try
{ {
M(); M();
Console.WriteLine("PASS"); Console.WriteLine("PASS");
return 100; return 100;
} }
catch(TypeLoadException) catch(TypeLoadException)
{ {
Console.WriteLine("Caught TypeLoadException, FAIL"); Console.WriteLine("Caught TypeLoadException, FAIL");
return 99; return 99;
} }
catch(Exception e) catch(Exception e)
{ {
Console.WriteLine("Caught unexpected exception"); Console.WriteLine("Caught unexpected exception");
Console.WriteLine(e); Console.WriteLine(e);
Console.WriteLine("\nFAIL"); Console.WriteLine("\nFAIL");
return 99; return 99;
} }
} }
[MethodImpl(MethodImplOptions.NoInlining)] [MethodImpl(MethodImplOptions.NoInlining)]
static void M() static void M()
{ {
C obj = new C(); // exception occurs in the initializing this memeber C obj = new C(); // exception occurs in the initializing this member
} }
} }
} }

View file

@ -5,10 +5,10 @@ In order to verify whether ilasm produces correct portable pdb format one can do
- LINUX: /tmp/ - LINUX: /tmp/
2. Run IlasmPortablePdb tests which reference .cs source files from 'TestMethodDebugInformation': 2. Run IlasmPortablePdb tests which reference .cs source files from 'TestMethodDebugInformation':
.\..\TestFiles\TestMethodDebugInformation_*.il .\..\TestFiles\TestMethodDebugInformation_*.il
3. On successful complition load the generated dlls from tests output directory: 3. On successful completion load the generated dlls from tests output directory:
TestMethodDebugInformation_*.dll TestMethodDebugInformation_*.dll
TestMethodDebugInformation_*.pdb TestMethodDebugInformation_*.pdb
with a debugger and step through the .cs code to verify correctness of the portable PDB format with a debugger and step through the .cs code to verify correctness of the portable PDB format
NOTE: this should work only if 'TestMethodDebugInformation' directory is properly placed in paths NOTE: this should work only if 'TestMethodDebugInformation' directory is properly placed in paths
specified in 1. specified in 1.