Skip to content

Commit ff4ea6c

Browse files
committed
Fix build
Include classes that are part of the Java Marshal API on mono as well Disable test on mono and nativeaot.
1 parent 963f970 commit ff4ea6c

File tree

5 files changed

+13
-17
lines changed

5 files changed

+13
-17
lines changed

src/coreclr/gc/gc.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30479,7 +30479,7 @@ void gc_heap::mark_phase (int condemned_gen_number)
3047930479
size_t start_index = thread * count_per_heap;
3048030480
size_t end_index = (thread == n_heaps - 1) ? num_global_bridge_objs : (thread + 1) * count_per_heap;
3048130481

30482-
for (int obj_idx = start_index; obj_idx < end_index; obj_idx++)
30482+
for (size_t obj_idx = start_index; obj_idx < end_index; obj_idx++)
3048330483
{
3048430484
mark_object_simple (&global_bridge_list[obj_idx] THREAD_NUMBER_ARG);
3048530485
}
@@ -39247,7 +39247,7 @@ void gc_heap::background_mark_phase ()
3924739247
size_t start_index = thread * count_per_heap;
3924839248
size_t end_index = (thread == n_heaps - 1) ? num_global_bridge_objs : (thread + 1) * count_per_heap;
3924939249

39250-
for (int obj_idx = start_index; obj_idx < end_index; obj_idx++)
39250+
for (size_t obj_idx = start_index; obj_idx < end_index; obj_idx++)
3925139251
{
3925239252
mark_object_simple (&global_bridge_list[obj_idx] THREAD_NUMBER_ARG);
3925339253
}

src/coreclr/gc/gcbridge.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,6 @@ static ColorData* alloc_color_data ()
399399
static void empty_color_buckets ()
400400
{
401401
ColorBucket* cur;
402-
ColorBucket* tmp;
403402

404403
color_data_count = 0;
405404

@@ -627,7 +626,8 @@ static void add_other_colors (ColorData* color, DynPtrArray* other_colors, bool
627626
}
628627
dyn_ptr_array_add(&color->other_colors, points_to);
629628
// Inform targets
630-
points_to->incoming_colors = min(points_to->incoming_colors + 1, INCOMING_COLORS_MAX);
629+
if (points_to->incoming_colors < INCOMING_COLORS_MAX)
630+
points_to->incoming_colors++;
631631
}
632632
}
633633

@@ -1287,9 +1287,6 @@ static void build_scc_callback_data (BridgeProcessorResult *bp_res)
12871287

12881288
BridgeProcessorResult ProcessBridgeObjects()
12891289
{
1290-
int i;
1291-
uint64_t curtime;
1292-
12931290
BridgeProcessorResult bp_res = { 0 };
12941291

12951292
if (!tarjan_scc_algorithm())

src/coreclr/gc/objecthandle.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1617,7 +1617,7 @@ uint8_t** Ref_ScanBridgeObjects(uint32_t condemned, uint32_t maxgen, ScanContext
16171617
HHANDLETABLE hTable = walk->pBuckets[i]->pTable[uCPUindex];
16181618
if (hTable)
16191619
// or have a local var for bridgeObjectsToPromote/size (instead of NULL) that's passed in as lp2
1620-
HndScanHandlesForGC(hTable, GetBridgeObjectsForProcessing, uintptr_t(sc), NULL, &type, 1, condemned, maxgen, HNDGCF_EXTRAINFO | flags);
1620+
HndScanHandlesForGC(hTable, GetBridgeObjectsForProcessing, uintptr_t(sc), 0, &type, 1, condemned, maxgen, HNDGCF_EXTRAINFO | flags);
16211621
}
16221622
}
16231623
walk = walk->pNext;

src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -993,6 +993,10 @@
993993
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\InterfaceTypeAttribute.cs" />
994994
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\InvalidComObjectException.cs" />
995995
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\InvalidOleVariantTypeException.cs" />
996+
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\Java\ComponentCrossReference.cs" />
997+
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\Java\JavaMarshal.cs" />
998+
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\Java\MarkCrossReferencesArgs.cs" />
999+
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\Java\StronglyConnectedComponent.cs" />
9961000
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\LayoutKind.cs" />
9971001
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\LCIDConversionAttribute.cs" />
9981002
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\LibraryImportAttribute.cs" />
@@ -2802,12 +2806,6 @@
28022806
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\ObjectiveC\ObjectiveCMarshal.PlatformNotSupported.cs" />
28032807
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\ObjectiveC\ObjectiveCTrackedTypeAttribute.cs" />
28042808
</ItemGroup>
2805-
<ItemGroup Condition="'$(FeatureJavaMarshal)' == 'true'">
2806-
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\Java\ComponentCrossReference.cs" />
2807-
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\Java\JavaMarshal.cs" />
2808-
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\Java\MarkCrossReferencesArgs.cs" />
2809-
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\Java\StronglyConnectedComponent.cs" />
2810-
</ItemGroup>
28112809
<ItemGroup Condition="'$(FeatureCoreCLR)' != 'true' and ('$(TargetsUnix)' == 'true' or '$(TargetsBrowser)' == 'true' or '$(TargetsWasi)' == 'true')">
28122810
<Compile Include="$(MSBuildThisFileDirectory)Microsoft\Win32\SafeHandles\SafeWaitHandle.Unix.cs" />
28132811
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\EventWaitHandle.Unix.cs" />
@@ -2865,4 +2863,4 @@
28652863
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\Wasi\WasiPollWorld.wit.imports.wasi.io.v0_2_0.IPoll.cs" />
28662864
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\Wasi\WasiPollWorld.wit.imports.wasi.io.v0_2_0.PollInterop.cs" />
28672865
</ItemGroup>
2868-
</Project>
2866+
</Project>

src/tests/Interop/GCBridge/BridgeTest.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
<PropertyGroup>
33
<!-- Needed for CLRTestTargetUnsupported, CMakeProjectReference, GC.WaitForPendingFinalizers -->
44
<RequiresProcessIsolation>true</RequiresProcessIsolation>
5-
<!-- Test unsupported outside of OSX -->
6-
<CLRTestTargetUnsupported Condition="'$(TargetsUnix)' != 'true'">true</CLRTestTargetUnsupported>
5+
<DisableProjectBuild Condition="'$(RuntimeFlavor)' == 'Mono'">true</DisableProjectBuild>
6+
<!-- Support for native aot not yet implemented -->
7+
<NativeAotIncompatible>true</NativeAotIncompatible>
78
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
89
</PropertyGroup>
910
<ItemGroup>

0 commit comments

Comments
 (0)