Skip to content

Commit

Permalink
Merge branch 'main' into ordereddictionary
Browse files Browse the repository at this point in the history
  • Loading branch information
stephentoub committed Jun 12, 2024
2 parents 3d52d80 + 8e08396 commit 23dd201
Show file tree
Hide file tree
Showing 82 changed files with 2,538 additions and 645 deletions.
24 changes: 12 additions & 12 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -360,30 +360,30 @@
<Uri>https://github.com/dotnet/runtime-assets</Uri>
<Sha>8c8e6ecef4ffb2a8db22ca249e6b6eea2cf3bca9</Sha>
</Dependency>
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="4.11.0-3.24301.1">
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="4.11.0-3.24310.10">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>37b70f27ecf6578ad0b74d04406036b03ab90c8f</Sha>
<Sha>32b7b6b1859185c3ad0e48d40746ad44c06faf86</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis" Version="4.11.0-3.24301.1">
<Dependency Name="Microsoft.CodeAnalysis" Version="4.11.0-3.24310.10">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>37b70f27ecf6578ad0b74d04406036b03ab90c8f</Sha>
<Sha>32b7b6b1859185c3ad0e48d40746ad44c06faf86</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.CSharp" Version="4.11.0-3.24301.1">
<Dependency Name="Microsoft.CodeAnalysis.CSharp" Version="4.11.0-3.24310.10">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>37b70f27ecf6578ad0b74d04406036b03ab90c8f</Sha>
<Sha>32b7b6b1859185c3ad0e48d40746ad44c06faf86</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0-beta1.24225.1">
<Dependency Name="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0-beta1.24306.2">
<Uri>https://github.com/dotnet/roslyn-analyzers</Uri>
<Sha>8dccccec1ce3bd2fb532ec77d7e092ab9d684db7</Sha>
<Sha>4d5fd9da36d64d4c3370b8813122e226844fc6ed</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.NetAnalyzers" Version="9.0.0-preview.24225.1">
<Dependency Name="Microsoft.CodeAnalysis.NetAnalyzers" Version="9.0.0-preview.24306.2">
<Uri>https://github.com/dotnet/roslyn-analyzers</Uri>
<Sha>8dccccec1ce3bd2fb532ec77d7e092ab9d684db7</Sha>
<Sha>4d5fd9da36d64d4c3370b8813122e226844fc6ed</Sha>
</Dependency>
<!-- Intermediate is necessary for source build. -->
<Dependency Name="Microsoft.SourceBuild.Intermediate.roslyn" Version="4.11.0-3.24301.1">
<Dependency Name="Microsoft.SourceBuild.Intermediate.roslyn" Version="4.11.0-3.24310.10">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>37b70f27ecf6578ad0b74d04406036b03ab90c8f</Sha>
<Sha>32b7b6b1859185c3ad0e48d40746ad44c06faf86</Sha>
<SourceBuild RepoName="roslyn" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.DotNet.ApiCompat.Task" Version="9.0.100-preview.6.24277.1">
Expand Down
10 changes: 5 additions & 5 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@
</ItemGroup>
<PropertyGroup>
<!-- dotnet/roslyn-analyzers dependencies -->
<MicrosoftCodeAnalysisAnalyzersVersion>3.11.0-beta1.24225.1</MicrosoftCodeAnalysisAnalyzersVersion>
<MicrosoftCodeAnalysisNetAnalyzersVersion>9.0.0-preview.24225.1</MicrosoftCodeAnalysisNetAnalyzersVersion>
<MicrosoftCodeAnalysisAnalyzersVersion>3.11.0-beta1.24306.2</MicrosoftCodeAnalysisAnalyzersVersion>
<MicrosoftCodeAnalysisNetAnalyzersVersion>9.0.0-preview.24306.2</MicrosoftCodeAnalysisNetAnalyzersVersion>
<!-- dotnet/roslyn dependencies -->
<!--
These versions should not be used by any project that contributes to the design-time experience in VS, such as an analyzer, code-fix, or generator assembly.
Any tools that contribute to the design-time experience should use the MicrosoftCodeAnalysisVersion_LatestVS property above to ensure
they do not break the local dev experience.
-->
<MicrosoftCodeAnalysisCSharpVersion>4.11.0-3.24301.1</MicrosoftCodeAnalysisCSharpVersion>
<MicrosoftCodeAnalysisVersion>4.11.0-3.24301.1</MicrosoftCodeAnalysisVersion>
<MicrosoftNetCompilersToolsetVersion>4.11.0-3.24301.1</MicrosoftNetCompilersToolsetVersion>
<MicrosoftCodeAnalysisCSharpVersion>4.11.0-3.24310.10</MicrosoftCodeAnalysisCSharpVersion>
<MicrosoftCodeAnalysisVersion>4.11.0-3.24310.10</MicrosoftCodeAnalysisVersion>
<MicrosoftNetCompilersToolsetVersion>4.11.0-3.24310.10</MicrosoftNetCompilersToolsetVersion>
</PropertyGroup>
<!--
For source generator support we need to target multiple versions of Roslyn in order to be able to run on older versions of Roslyn.
Expand Down
16 changes: 10 additions & 6 deletions eng/pipelines/common/templates/wasm-library-aot-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ parameters:
runAOT: false
shouldRunSmokeOnly: false
shouldContinueOnError: false
scenarios: []

jobs:

Expand All @@ -31,9 +32,12 @@ jobs:
shouldRunSmokeOnly: ${{ parameters.shouldRunSmokeOnly }}
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
scenarios:
- ${{ if eq(platform, 'browser_wasm') }}:
- WasmTestOnV8
- ${{ if eq(platform, 'browser_wasm_win') }}:
- WasmTestOnChrome
- ${{ if or(eq(platform, 'wasi_wasm_win'), eq(platform, 'wasi_wasm')) }}:
- WasmTestOnWasmtime
- ${{ if ne(parameters.scenarios[0], '') }}:
- ${{ parameters.scenarios }}
- ${{ else }}:
- ${{ if eq(platform, 'browser_wasm') }}:
- WasmTestOnV8
- ${{ if eq(platform, 'browser_wasm_win') }}:
- WasmTestOnChrome
- ${{ if or(eq(platform, 'wasi_wasm_win'), eq(platform, 'wasi_wasm')) }}:
- WasmTestOnWasmtime
31 changes: 16 additions & 15 deletions eng/pipelines/extra-platforms/runtime-extra-platforms-wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,21 +201,22 @@ jobs:
- WasmTestOnFirefox
- WasmTestOnNodeJS

# Hybrid Globalization AOT tests
- template: /eng/pipelines/common/templates/wasm-library-aot-tests.yml
parameters:
platforms:
- browser_wasm
- browser_wasm_win
nameSuffix: _HybridGlobalization_AOT
extraBuildArgs: /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) /p:HybridGlobalization=true
runAOT: true
isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }}
isWasmOnlyBuild: ${{ parameters.isWasmOnlyBuild }}
alwaysRun: true
scenarios:
- WasmTestOnChrome
- WasmTestOnNodeJS
# # Hybrid Globalization AOT tests
# # ActiveIssue: https://github.com/dotnet/runtime/issues/51746
# - template: /eng/pipelines/common/templates/wasm-library-aot-tests.yml
# parameters:
# platforms:
# - browser_wasm
# - browser_wasm_win
# nameSuffix: _HybridGlobalization_AOT
# extraBuildArgs: /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) /p:HybridGlobalization=true
# runAOT: true
# isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }}
# isWasmOnlyBuild: ${{ parameters.isWasmOnlyBuild }}
# alwaysRun: true
# scenarios:
# - WasmTestOnChrome
# - WasmTestOnNodeJS

- ${{ if and(ne(parameters.isRollingBuild, true), ne(parameters.excludeNonLibTests, true), ne(parameters.debuggerTestsOnly, true)) }}:
# Builds only
Expand Down
19 changes: 8 additions & 11 deletions src/coreclr/gc/gc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3532,10 +3532,9 @@ sorted_table::delete_sorted_table()
{
if (slots != (bk*)(this+1))
{
delete slots;
delete[] slots;
}
delete_old_slots();
delete this;
}
void
sorted_table::delete_old_slots()
Expand All @@ -3545,7 +3544,7 @@ sorted_table::delete_old_slots()
{
uint8_t* dsl = sl;
sl = last_slot ((bk*)sl);
delete dsl;
delete[] dsl;
}
old_slots = 0;
}
Expand Down Expand Up @@ -15238,14 +15237,12 @@ gc_heap::destroy_semi_shared()
//#endif //BACKGROUND_GC

if (g_mark_list)
delete g_mark_list;

if (seg_mapping_table)
delete seg_mapping_table;
delete[] g_mark_list;

#ifdef FEATURE_BASICFREEZE
//destroy the segment map
seg_table->delete_sorted_table();
delete[] (char*)seg_table;
#endif //FEATURE_BASICFREEZE
}

Expand Down Expand Up @@ -15302,7 +15299,7 @@ void gc_heap::shutdown_gc()

#ifdef MULTIPLE_HEAPS
//delete the heaps array
delete g_heaps;
delete[] g_heaps;
destroy_thread_support();
n_heaps = 0;
#endif //MULTIPLE_HEAPS
Expand Down Expand Up @@ -28768,7 +28765,7 @@ BOOL gc_heap::process_mark_overflow(int condemned_gen_number)
mark* tmp = new (nothrow) mark [new_size];
if (tmp)
{
delete mark_stack_array;
delete[] mark_stack_array;
mark_stack_array = tmp;
mark_stack_array_length = new_size;
}
Expand Down Expand Up @@ -33618,7 +33615,7 @@ void gc_heap::plan_phase (int condemned_gen_number)

if (!loh_pinned_queue_decay)
{
delete loh_pinned_queue;
delete[] loh_pinned_queue;
loh_pinned_queue = 0;
}
}
Expand Down Expand Up @@ -51271,7 +51268,7 @@ bool CFinalize::Initialize()

CFinalize::~CFinalize()
{
delete m_Array;
delete[] m_Array;
}

size_t CFinalize::GetPromotedCount ()
Expand Down
4 changes: 4 additions & 0 deletions src/coreclr/hosts/corerun/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ if(CLR_CMAKE_HOST_WIN32)
${STATIC_MT_CRT_LIB}
${STATIC_MT_VCRT_LIB}
)
# Enable CET-compatibility
if (CLR_CMAKE_HOST_ARCH_AMD64)
target_link_options(corerun PRIVATE "/CETCOMPAT")
endif()
else(CLR_CMAKE_HOST_WIN32)
target_link_libraries(corerun PRIVATE ${CMAKE_DL_LIBS})
# Required to expose symbols for global symbol discovery
Expand Down
23 changes: 23 additions & 0 deletions src/coreclr/jit/compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3734,6 +3734,29 @@ bool Compiler::compPromoteFewerStructs(unsigned lclNum)
return rejectThisPromo;
}

//------------------------------------------------------------------------
// dumpRegMask: display a register mask. For well-known sets of registers, display a well-known token instead of
// a potentially large number of registers.
//
// Arguments:
// regs - The set of registers to display
// type - The type of `regs`
//
void Compiler::dumpRegMask(SingleTypeRegSet regs, var_types type) const
{
#ifdef FEATURE_MASKED_HW_INTRINSICS
if (varTypeIsMask(type))
{
dumpRegMask(regMaskTP(RBM_NONE, regs));
}
else
#endif
{
assert(varTypeUsesIntReg(type) || varTypeUsesFloatReg(type));
dumpRegMask(regMaskTP(regs, RBM_NONE));
}
}

//------------------------------------------------------------------------
// dumpRegMask: display a register mask. For well-known sets of registers, display a well-known token instead of
// a potentially large number of registers.
Expand Down
15 changes: 9 additions & 6 deletions src/coreclr/jit/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -3185,6 +3185,10 @@ class Compiler
GenTree* gtNewSimdAbsNode(
var_types type, GenTree* op1, CorInfoType simdBaseJitType, unsigned simdSize);

#if defined(TARGET_ARM64)
GenTree* gtNewSimdAllTrueMaskNode(CorInfoType simdBaseJitType, unsigned simdSize);
#endif

GenTree* gtNewSimdBinOpNode(genTreeOps op,
var_types type,
GenTree* op1,
Expand Down Expand Up @@ -3223,6 +3227,8 @@ class Compiler
CorInfoType simdBaseJitType,
unsigned simdSize);

GenTree* gtNewSimdCvtMaskToVectorNode(var_types type, GenTree* op1, CorInfoType simdBaseJitType, unsigned simdSize);

GenTree* gtNewSimdCvtNode(var_types type,
GenTree* op1,
CorInfoType simdTargetBaseJitType,
Expand All @@ -3235,6 +3241,8 @@ class Compiler
CorInfoType simdSourceBaseJitType,
unsigned simdSize);

GenTree* gtNewSimdCvtVectorToMaskNode(var_types type, GenTree* op1, CorInfoType simdBaseJitType, unsigned simdSize);

GenTree* gtNewSimdCreateBroadcastNode(
var_types type, GenTree* op1, CorInfoType simdBaseJitType, unsigned simdSize);

Expand Down Expand Up @@ -3516,12 +3524,6 @@ class Compiler

GenTreeIndir* gtNewMethodTableLookup(GenTree* obj);

#if defined(TARGET_ARM64)
GenTree* gtNewSimdConvertVectorToMaskNode(var_types type, GenTree* node, CorInfoType simdBaseJitType, unsigned simdSize);
GenTree* gtNewSimdConvertMaskToVectorNode(GenTreeHWIntrinsic* node, var_types type);
GenTree* gtNewSimdAllTrueMaskNode(CorInfoType simdBaseJitType, unsigned simdSize);
#endif

//------------------------------------------------------------------------
// Other GenTree functions

Expand Down Expand Up @@ -11112,6 +11114,7 @@ class Compiler
bool compJitHaltMethod();

void dumpRegMask(regMaskTP regs) const;
void dumpRegMask(SingleTypeRegSet regs, var_types type) const;

#endif

Expand Down
20 changes: 18 additions & 2 deletions src/coreclr/jit/compiler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1031,18 +1031,26 @@ inline regNumber genFirstRegNumFromMask(const regMaskTP& mask)
//
// Arguments:
// mask - the register mask
// type - type of the register mask
//
// Return Value:
// The number of the first register contained in the mask.
//
inline regNumber genFirstRegNumFromMask(SingleTypeRegSet mask)
inline regNumber genFirstRegNumFromMask(SingleTypeRegSet mask, var_types type)
{
assert(mask != RBM_NONE); // Must have one bit set, so can't have a mask of zero

/* Convert the mask to a register number */

regNumber regNum = (regNumber)BitOperations::BitScanForward(mask);

#ifdef HAS_MORE_THAN_64_REGISTERS
if (varTypeIsMask(type))
{
regNum = (regNumber)(64 + regNum);
}
#endif

return regNum;
}

Expand Down Expand Up @@ -1075,13 +1083,14 @@ inline regNumber genFirstRegNumFromMaskAndToggle(regMaskTP& mask)
// register number and also toggle the bit in the `mask`.
// Arguments:
// mask - the register mask
// type - type of the register mask
//
// Return Value:
// The number of the first register contained in the mask and updates the `mask` to toggle
// the bit.
//

inline regNumber genFirstRegNumFromMaskAndToggle(SingleTypeRegSet& mask)
inline regNumber genFirstRegNumFromMaskAndToggle(SingleTypeRegSet& mask, var_types type)
{
assert(mask != RBM_NONE); // Must have one bit set, so can't have a mask of zero

Expand All @@ -1091,6 +1100,13 @@ inline regNumber genFirstRegNumFromMaskAndToggle(SingleTypeRegSet& mask)

mask ^= genSingleTypeRegMask(regNum);

#ifdef HAS_MORE_THAN_64_REGISTERS
if (varTypeIsMask(type))
{
regNum = (regNumber)(64 + regNum);
}
#endif

return regNum;
}

Expand Down
Loading

0 comments on commit 23dd201

Please sign in to comment.