diff --git a/NuGet.config b/NuGet.config
index 8d2d351914d014..d89fa51e4679ea 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -22,6 +22,7 @@
+
diff --git a/eng/Version.Details.props b/eng/Version.Details.props
index 18628a56559b72..4615e26f498411 100644
--- a/eng/Version.Details.props
+++ b/eng/Version.Details.props
@@ -51,35 +51,35 @@ This file should be imported by eng/Versions.props
11.0.0-alpha.1.26281.1
- 19.1.0-alpha.1.26256.1
- 19.1.0-alpha.1.26256.1
- 19.1.0-alpha.1.26256.1
- 19.1.0-alpha.1.26256.1
- 19.1.0-alpha.1.26256.1
- 19.1.0-alpha.1.26256.1
- 19.1.0-alpha.1.26256.1
- 19.1.0-alpha.1.26256.1
- 19.1.0-alpha.1.26256.1
- 19.1.0-alpha.1.26256.1
- 19.1.0-alpha.1.26256.1
- 19.1.0-alpha.1.26256.1
- 19.1.0-alpha.1.26256.1
- 19.1.0-alpha.1.26256.1
- 19.1.0-alpha.1.26256.1
- 19.1.0-alpha.1.26256.1
- 19.1.0-alpha.1.26256.1
- 19.1.0-alpha.1.26256.1
- 19.1.0-alpha.1.26256.1
- 19.1.0-alpha.1.26256.1
- 19.1.0-alpha.1.26256.1
- 19.1.0-alpha.1.26256.1
- 19.1.0-alpha.1.26256.1
- 19.1.0-alpha.1.26256.1
- 19.1.0-alpha.1.26256.1
- 19.1.0-alpha.1.26256.1
- 19.1.0-alpha.1.26256.1
- 19.1.0-alpha.1.26256.1
- 19.1.0-alpha.1.26256.1
+ 23.1.0-alpha.1.26314.2
+ 23.1.0-alpha.1.26314.2
+ 23.1.0-alpha.1.26314.2
+ 23.1.0-alpha.1.26314.2
+ 23.1.0-alpha.1.26314.2
+ 23.1.0-alpha.1.26314.2
+ 23.1.0-alpha.1.26314.2
+ 23.1.0-alpha.1.26314.2
+ 23.1.0-alpha.1.26314.2
+ 23.1.0-alpha.1.26314.2
+ 23.1.0-alpha.1.26314.2
+ 23.1.0-alpha.1.26314.2
+ 23.1.0-alpha.1.26314.2
+ 23.1.0-alpha.1.26314.2
+ 23.1.0-alpha.1.26314.2
+ 23.1.0-alpha.1.26314.2
+ 23.1.0-alpha.1.26314.2
+ 23.1.0-alpha.1.26314.2
+ 23.1.0-alpha.1.26314.2
+ 23.1.0-alpha.1.26314.2
+ 23.1.0-alpha.1.26314.2
+ 23.1.0-alpha.1.26314.2
+ 23.1.0-alpha.1.26314.2
+ 23.1.0-alpha.1.26314.2
+ 23.1.0-alpha.1.26314.2
+ 23.1.0-alpha.1.26314.2
+ 23.1.0-alpha.1.26314.2
+ 23.1.0-alpha.1.26314.2
+ 23.1.0-alpha.1.26314.2
11.0.0-alpha.1.26303.1
11.0.0-alpha.1.26303.1
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index f19e350ffeee32..066d651654e589 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -5,37 +5,37 @@
https://github.com/dotnet/icu
d94093d6935a845e9a508e023ae1a94102a801b6
-
+
https://github.com/dotnet/llvm-project
- 64a0a6a5130929ccaa47b52ad28997b7922920cc
+ 921a6f0c606b4504c5d221aede62d4e35339ec1c
-
+
https://github.com/dotnet/llvm-project
- 64a0a6a5130929ccaa47b52ad28997b7922920cc
+ 921a6f0c606b4504c5d221aede62d4e35339ec1c
-
+
https://github.com/dotnet/llvm-project
- 64a0a6a5130929ccaa47b52ad28997b7922920cc
+ 921a6f0c606b4504c5d221aede62d4e35339ec1c
-
+
https://github.com/dotnet/llvm-project
- 64a0a6a5130929ccaa47b52ad28997b7922920cc
+ 921a6f0c606b4504c5d221aede62d4e35339ec1c
-
+
https://github.com/dotnet/llvm-project
- 64a0a6a5130929ccaa47b52ad28997b7922920cc
+ 921a6f0c606b4504c5d221aede62d4e35339ec1c
-
+
https://github.com/dotnet/llvm-project
- 64a0a6a5130929ccaa47b52ad28997b7922920cc
+ 921a6f0c606b4504c5d221aede62d4e35339ec1c
-
+
https://github.com/dotnet/llvm-project
- 64a0a6a5130929ccaa47b52ad28997b7922920cc
+ 921a6f0c606b4504c5d221aede62d4e35339ec1c
-
+
https://github.com/dotnet/llvm-project
- 64a0a6a5130929ccaa47b52ad28997b7922920cc
+ 921a6f0c606b4504c5d221aede62d4e35339ec1c
https://github.com/dotnet/dotnet
@@ -175,89 +175,89 @@
https://github.com/dotnet/runtime-assets
741cd9b2bf5a322b38c37367bc26c4e97ab16abe
-
+
https://github.com/dotnet/llvm-project
- 64a0a6a5130929ccaa47b52ad28997b7922920cc
+ 921a6f0c606b4504c5d221aede62d4e35339ec1c
-
+
https://github.com/dotnet/llvm-project
- 64a0a6a5130929ccaa47b52ad28997b7922920cc
+ 921a6f0c606b4504c5d221aede62d4e35339ec1c
-
+
https://github.com/dotnet/llvm-project
- 64a0a6a5130929ccaa47b52ad28997b7922920cc
+ 921a6f0c606b4504c5d221aede62d4e35339ec1c
-
+
https://github.com/dotnet/llvm-project
- 64a0a6a5130929ccaa47b52ad28997b7922920cc
+ 921a6f0c606b4504c5d221aede62d4e35339ec1c
-
+
https://github.com/dotnet/llvm-project
- 64a0a6a5130929ccaa47b52ad28997b7922920cc
+ 921a6f0c606b4504c5d221aede62d4e35339ec1c
-
+
https://github.com/dotnet/llvm-project
- 64a0a6a5130929ccaa47b52ad28997b7922920cc
+ 921a6f0c606b4504c5d221aede62d4e35339ec1c
-
+
https://github.com/dotnet/llvm-project
- 64a0a6a5130929ccaa47b52ad28997b7922920cc
+ 921a6f0c606b4504c5d221aede62d4e35339ec1c
-
+
https://github.com/dotnet/llvm-project
- 64a0a6a5130929ccaa47b52ad28997b7922920cc
+ 921a6f0c606b4504c5d221aede62d4e35339ec1c
-
+
https://github.com/dotnet/llvm-project
- 64a0a6a5130929ccaa47b52ad28997b7922920cc
+ 921a6f0c606b4504c5d221aede62d4e35339ec1c
-
+
https://github.com/dotnet/llvm-project
- 64a0a6a5130929ccaa47b52ad28997b7922920cc
+ 921a6f0c606b4504c5d221aede62d4e35339ec1c
-
+
https://github.com/dotnet/llvm-project
- 64a0a6a5130929ccaa47b52ad28997b7922920cc
+ 921a6f0c606b4504c5d221aede62d4e35339ec1c
-
+
https://github.com/dotnet/llvm-project
- 64a0a6a5130929ccaa47b52ad28997b7922920cc
+ 921a6f0c606b4504c5d221aede62d4e35339ec1c
-
+
https://github.com/dotnet/llvm-project
- 64a0a6a5130929ccaa47b52ad28997b7922920cc
+ 921a6f0c606b4504c5d221aede62d4e35339ec1c
-
+
https://github.com/dotnet/llvm-project
- 64a0a6a5130929ccaa47b52ad28997b7922920cc
+ 921a6f0c606b4504c5d221aede62d4e35339ec1c
-
+
https://github.com/dotnet/llvm-project
- 64a0a6a5130929ccaa47b52ad28997b7922920cc
+ 921a6f0c606b4504c5d221aede62d4e35339ec1c
-
+
https://github.com/dotnet/llvm-project
- 64a0a6a5130929ccaa47b52ad28997b7922920cc
+ 921a6f0c606b4504c5d221aede62d4e35339ec1c
-
+
https://github.com/dotnet/llvm-project
- 64a0a6a5130929ccaa47b52ad28997b7922920cc
+ 921a6f0c606b4504c5d221aede62d4e35339ec1c
-
+
https://github.com/dotnet/llvm-project
- 64a0a6a5130929ccaa47b52ad28997b7922920cc
+ 921a6f0c606b4504c5d221aede62d4e35339ec1c
-
+
https://github.com/dotnet/llvm-project
- 64a0a6a5130929ccaa47b52ad28997b7922920cc
+ 921a6f0c606b4504c5d221aede62d4e35339ec1c
-
+
https://github.com/dotnet/llvm-project
- 64a0a6a5130929ccaa47b52ad28997b7922920cc
+ 921a6f0c606b4504c5d221aede62d4e35339ec1c
-
+
https://github.com/dotnet/llvm-project
- 64a0a6a5130929ccaa47b52ad28997b7922920cc
+ 921a6f0c606b4504c5d221aede62d4e35339ec1c
https://github.com/dotnet/dotnet
diff --git a/eng/Versions.props b/eng/Versions.props
index 4625dbb9864ccb..3596f889d8ecd7 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -27,7 +27,12 @@
<_GlobalJsonContent>$([System.IO.File]::ReadAllText('$(MSBuildThisFileDirectory)../global.json'))
<_GlobalJsonSdkVersion Condition="'$(_GlobalJsonContent)' != ''">$([System.Text.RegularExpressions.Regex]::Match($(_GlobalJsonContent), '"sdk"\s*:\s*\{[^\}]*"version"\s*:\s*"([^"]+)"', System.Text.RegularExpressions.RegexOptions.Singleline).Groups[1].Value)
- <_DotnetSdkVersion>$(MicrosoftNETWorkloadEmscriptenCurrentManifest110100TransportVersion)
+
+ <_DotnetSdkVersion>11.0.100-preview.6.26314.102
$(_DotnetSdkVersion)
$(_GlobalJsonSdkVersion)
$([System.String]::Copy('$(SdkVersionForWorkloadTesting)').Split('.')[0])
@@ -166,13 +171,21 @@
2.5.7
-
- $(MicrosoftDotNetApiCompatTaskPackageVersion)
+
+ 11.0.100-preview.6.26314.102
- $(MicrosoftNETCoreAppRefPackageVersion)
+
+ 11.0.0-preview.6.26314.102
$(runtimewinx64MicrosoftNETCoreRuntimeWasmNodeTransportPackageVersion)
- 3.1.56
+ 5.0.6
1.1.87-gba258badda
1.0.0-v3.14.0.5722
diff --git a/eng/liveBuilds.targets b/eng/liveBuilds.targets
index 308e6fc7e2b760..6dd6ce0407489d 100644
--- a/eng/liveBuilds.targets
+++ b/eng/liveBuilds.targets
@@ -274,11 +274,6 @@
$(LibrariesNativeArtifactsPath)dotnet.diagnostics.js.map;
$(LibrariesNativeArtifactsPath)dotnet.native.js.symbols;"
IsNative="true" />
-
-
149.0.7827.53
1625079
https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/1625084
- 14.9.207
+ 15.1.103
143.0.7499.40
1536371
https://storage.googleapis.com/chromium-browser-snapshots/Mac_Arm/1536376
- 14.3.127
+ 15.1.103
150.0.7871.24
1639810
https://storage.googleapis.com/chromium-browser-snapshots/Win_x64/1639827
- 15.0.245
+ 15.1.103
140.11.0esr
0.37.0
140.11.0esr
diff --git a/eng/testing/WasmRunnerTemplate.cmd b/eng/testing/WasmRunnerTemplate.cmd
index 463883384bde3d..0e8b6c9406ee29 100644
--- a/eng/testing/WasmRunnerTemplate.cmd
+++ b/eng/testing/WasmRunnerTemplate.cmd
@@ -47,7 +47,7 @@ if /I [%XHARNESS_COMMAND%] == [test] (
)
if [%JS_ENGINE_ARGS%] == [] (
- set "JS_ENGINE_ARGS=--engine-arg^=--stack-trace-limit^=1000"
+ set "JS_ENGINE_ARGS=--engine-arg^=--stack-trace-limit^=1000 --engine-arg^=--experimental-wasm-exnref"
)
) else (
if /I [%SCENARIO%] == [WasmTestOnChrome] (
diff --git a/eng/testing/WasmRunnerTemplate.sh b/eng/testing/WasmRunnerTemplate.sh
index dc9339e1acdd62..91fcc162f4fbf4 100644
--- a/eng/testing/WasmRunnerTemplate.sh
+++ b/eng/testing/WasmRunnerTemplate.sh
@@ -44,7 +44,7 @@ if [[ "$XHARNESS_COMMAND" == "test" ]]; then
fi
if [[ -z "$JS_ENGINE_ARGS" ]]; then
- JS_ENGINE_ARGS="--engine-arg=--stack-trace-limit=1000"
+ JS_ENGINE_ARGS="--engine-arg=--stack-trace-limit=1000 --engine-arg=--experimental-wasm-exnref"
fi
else
if [[ "$SCENARIO" == "WasmTestOnChrome" || "$SCENARIO" == "wasmtestonchrome" ]]; then
diff --git a/eng/testing/tests.browser.targets b/eng/testing/tests.browser.targets
index 0db156f0ec40be..59a945fc5f82c7 100644
--- a/eng/testing/tests.browser.targets
+++ b/eng/testing/tests.browser.targets
@@ -296,7 +296,6 @@
<_HasDotnetWasm Condition="'%(WasmNativeAsset.FileName)%(WasmNativeAsset.Extension)' == 'dotnet.native.wasm'">true
- <_HasDotnetJsWorker Condition="'%(WasmNativeAsset.FileName)%(WasmNativeAsset.Extension)' == 'dotnet.native.worker.mjs'">true
<_HasDotnetJsSymbols Condition="'%(WasmNativeAsset.FileName)%(WasmNativeAsset.Extension)' == 'dotnet.native.js.symbols'">true
<_HasDotnetNativeJs Condition="'%(WasmNativeAsset.FileName)%(WasmNativeAsset.Extension)' == 'dotnet.native.js'">true
<_WasmIcuDataFileName Condition="'$(WasmIcuDataFileName)' != '' and Exists('$(WasmIcuDataFileName)')">$(WasmIcuDataFileName)
@@ -311,7 +310,6 @@
-
-
diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/FileStatus.Unix.cs b/src/libraries/System.Private.CoreLib/src/System/IO/FileStatus.Unix.cs
index 4ffd7cd8cd811c..9a54a0cd620022 100644
--- a/src/libraries/System.Private.CoreLib/src/System/IO/FileStatus.Unix.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/IO/FileStatus.Unix.cs
@@ -394,12 +394,6 @@ private unsafe void SetAccessOrWriteTimeCore(SafeFileHandle? handle, string? pat
long seconds = time.ToUnixTimeSeconds();
long nanoseconds = UnixTimeSecondsToNanoseconds(time, seconds);
-#if TARGET_BROWSER || TARGET_WASI
- buf[0].TvSec = seconds;
- buf[0].TvNsec = nanoseconds;
- buf[1].TvSec = seconds;
- buf[1].TvNsec = nanoseconds;
-#else
if (isAccessTime)
{
buf[0].TvSec = seconds;
@@ -414,7 +408,6 @@ private unsafe void SetAccessOrWriteTimeCore(SafeFileHandle? handle, string? pat
buf[1].TvSec = seconds;
buf[1].TvNsec = nanoseconds;
}
-#endif
int rv = handle is not null
? Interop.Sys.FUTimens(handle, buf)
: Interop.Sys.UTimensat(path!, buf);
diff --git a/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/Base/BaseGetSetTimes.cs b/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/Base/BaseGetSetTimes.cs
index d1205dc6ba7148..762e22ad646e99 100644
--- a/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/Base/BaseGetSetTimes.cs
+++ b/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/Base/BaseGetSetTimes.cs
@@ -11,28 +11,18 @@ namespace System.IO.Tests
{
public abstract class BaseGetSetTimes : FileSystemTest
{
- protected const string HFS = "hfs";
public delegate void SetTime(T item, DateTime time);
public delegate DateTime GetTime(T item);
// AppContainer restricts access to DriveFormat (::GetVolumeInformation)
private static string driveFormat = PlatformDetection.IsInAppContainer ? string.Empty : new DriveInfo(Path.GetTempPath()).DriveFormat;
- protected static bool isHFS => driveFormat != null && driveFormat.Equals(HFS, StringComparison.InvariantCultureIgnoreCase);
+ private static bool isHFS => driveFormat != null && driveFormat.Equals("hfs", StringComparison.InvariantCultureIgnoreCase);
- protected static bool LowTemporalResolution => PlatformDetection.IsBrowser || isHFS;
- protected static bool HighTemporalResolution => !LowTemporalResolution;
-
- private static void CheckHighTemporalResolution()
- {
- if (!HighTemporalResolution)
- throw new SkipTestException(nameof(HighTemporalResolution));
- }
-
- private static void CheckLowTemporalResolution()
- {
- if (!LowTemporalResolution)
- throw new SkipTestException(nameof(LowTemporalResolution));
- }
+ protected static bool SecondTemporalResolution => true;
+ protected static bool MilliSecondTemporalResolution => SecondTemporalResolution && !isHFS; // HFS only supports temporal resolution of 1 second
+ protected static bool NanoSecondTemporalResolution => MilliSecondTemporalResolution && !PlatformDetection.IsBrowser; // Browser does not support nanosecond resolution
+ protected static bool NotMilliSecondTemporalResolution => !MilliSecondTemporalResolution;
+ protected static bool NotNanoSecondTemporalResolution => !NanoSecondTemporalResolution;
protected abstract bool CanBeReadOnly { get; }
@@ -83,8 +73,7 @@ private void SettingUpdatesPropertiesCore(T item, T? linkTarget = default)
bool isLink = linkTarget is not null;
// Checking that milliseconds are not dropped after setter.
- // Emscripten drops milliseconds in Browser
- DateTime dt = new DateTime(2014, 12, 1, 12, 3, 3, LowTemporalResolution ? 0 : 321, function.Kind);
+ DateTime dt = new DateTime(2014, 12, 1, 12, 3, 3, NotMilliSecondTemporalResolution ? 0 : 321, function.Kind);
function.Setter(item, dt);
T getTarget = !isLink || ApiTargetsLink ? item : linkTarget;
@@ -181,7 +170,6 @@ public void SettingPropertiesOnSymlink(bool targetExists)
}
[Fact]
- [PlatformSpecific(~TestPlatforms.Browser)] // Browser is excluded as there is only 1 effective time store.
public void SettingUpdatesPropertiesAfterAnother()
{
T item = GetExistingItem();
@@ -219,9 +207,9 @@ public void SettingUpdatesPropertiesAfterAnother()
bool reverse = functions.reverse;
// Checking that milliseconds are not dropped after setter.
- DateTime dt1 = new DateTime(2002, 12, 1, 12, 3, 3, LowTemporalResolution ? 0 : 321, DateTimeKind.Utc);
- DateTime dt2 = new DateTime(2001, 12, 1, 12, 3, 3, LowTemporalResolution ? 0 : 321, DateTimeKind.Utc);
- DateTime dt3 = new DateTime(2000, 12, 1, 12, 3, 3, LowTemporalResolution ? 0 : 321, DateTimeKind.Utc);
+ DateTime dt1 = new DateTime(2002, 12, 1, 12, 3, 3, NotMilliSecondTemporalResolution ? 0 : 321, DateTimeKind.Utc);
+ DateTime dt2 = new DateTime(2001, 12, 1, 12, 3, 3, NotMilliSecondTemporalResolution ? 0 : 321, DateTimeKind.Utc);
+ DateTime dt3 = new DateTime(2000, 12, 1, 12, 3, 3, NotMilliSecondTemporalResolution ? 0 : 321, DateTimeKind.Utc);
if (reverse) //reverse the order of setting dates
{
(dt1, dt3) = (dt3, dt1);
@@ -245,10 +233,12 @@ public void CanGetAllTimesAfterCreation()
ValidateSetTimes(item, beforeTime, afterTime);
}
- [ConditionalFact] // OSX HFS driver format and Browser platform do not support millisec granularity
+ [ConditionalFact]
public void TimesIncludeMillisecondPart()
{
- CheckHighTemporalResolution();
+ if (!MilliSecondTemporalResolution)
+ throw new SkipTestException(nameof(MilliSecondTemporalResolution));
+
T item = GetExistingItem();
Assert.All(TimeFunctions(), (function) =>
{
@@ -279,11 +269,12 @@ public void TimesIncludeMillisecondPart()
}
[ConditionalFact]
- public void TimesIncludeMillisecondPart_LowTempRes()
+ public void TimesNotIncludeMillisecondPart()
{
- CheckLowTemporalResolution();
+ if (MilliSecondTemporalResolution)
+ throw new SkipTestException(nameof(MilliSecondTemporalResolution));
+
T item = GetExistingItem();
- // OSX HFS driver format and Browser do not support millisec granularity
Assert.All(TimeFunctions(), (function) =>
{
DateTime time = function.Getter(item);
diff --git a/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/File/Copy.cs b/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/File/Copy.cs
index a3a8c7526bd045..bfe2dd3040937b 100644
--- a/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/File/Copy.cs
+++ b/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/File/Copy.cs
@@ -142,15 +142,7 @@ public void CopyFileWithData(char[] data, bool readOnly)
}
// Ensure last write/access time on the new file is appropriate
- //
- // For browser, there is technically only 1 time. It's the max
- // of LastWrite and LastAccess. On browser, File.SetLastWriteTime
- // overwrites LastWrite and LastAccess, and File.Copy
- // overwrites LastWrite , so this check doesn't apply.
- if (PlatformDetection.IsNotBrowser)
- {
- Assert.InRange(File.GetLastWriteTimeUtc(testFileDest), lastWriteTime.AddSeconds(-1), lastWriteTime.AddSeconds(1));
- }
+ Assert.InRange(File.GetLastWriteTimeUtc(testFileDest), lastWriteTime.AddSeconds(-1), lastWriteTime.AddSeconds(1));
Assert.Equal(readOnly, (File.GetAttributes(testFileDest) & FileAttributes.ReadOnly) != 0);
if (readOnly)
diff --git a/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/File/GetSetTimes.cs b/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/File/GetSetTimes.cs
index 566d52cf35058d..1273a17d538626 100644
--- a/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/File/GetSetTimes.cs
+++ b/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/File/GetSetTimes.cs
@@ -138,7 +138,6 @@ public override IEnumerable TimeFunctions(bool requiresRoundtrippi
}
[Fact]
- [ActiveIssue("https://github.com/dotnet/runtime/issues/83197", TestPlatforms.Browser)]
public void SetLastWriteTimeTicks()
{
string firstFile = GetTestFilePath();
@@ -153,7 +152,7 @@ public void SetLastWriteTimeTicks()
Assert.True(firstFileTicks <= secondFileTicks, $"First File Ticks\t{firstFileTicks}\nSecond File Ticks\t{secondFileTicks}");
}
- [ConditionalFact(typeof(File_GetSetTimes), nameof(HighTemporalResolution))] // OSX HFS driver format/Browser Platform do not support nanosecond granularity.
+ [ConditionalFact(typeof(File_GetSetTimes), nameof(NanoSecondTemporalResolution))]
public void SetUptoNanoseconds()
{
string file = GetTestFilePath();
@@ -185,7 +184,6 @@ public void SetDateTimeMax()
}
[Fact]
- [ActiveIssue("https://github.com/dotnet/runtime/issues/83197", TestPlatforms.Browser)]
public void SetLastAccessTimeTicks()
{
string firstFile = GetTestFilePath();
diff --git a/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/FileInfo/GetSetTimes.cs b/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/FileInfo/GetSetTimes.cs
index 8f6000cf957787..2307287976e805 100644
--- a/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/FileInfo/GetSetTimes.cs
+++ b/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/FileInfo/GetSetTimes.cs
@@ -52,15 +52,12 @@ public FileInfo GetNonZeroNanoseconds()
if (!HasNonZeroNanoseconds(fileinfo.LastWriteTime))
{
- if (PlatformDetection.IsApplePlatform)
- return null;
-
DateTime dt = fileinfo.LastWriteTime;
dt = dt.AddTicks(1);
fileinfo.LastWriteTime = dt;
}
- Assert.True(HasNonZeroNanoseconds(fileinfo.LastWriteTime));
+ Assert.True(HasNonZeroNanoseconds(fileinfo.LastWriteTime), "Expected non-zero nanoseconds, got: " + fileinfo.LastWriteTime.Ticks);
return fileinfo;
}
@@ -113,7 +110,7 @@ public override IEnumerable TimeFunctions(bool requiresRoundtrippi
DateTimeKind.Utc);
}
- [ConditionalFact(typeof(FileInfo_GetSetTimes), nameof(HighTemporalResolution))]
+ [ConditionalFact(typeof(FileInfo_GetSetTimes), nameof(MilliSecondTemporalResolution))]
public void CopyToMillisecondPresent()
{
FileInfo input = GetNonZeroMilliseconds();
@@ -127,24 +124,21 @@ public void CopyToMillisecondPresent()
Assert.NotEqual(0, output.LastWriteTime.Millisecond);
}
- [ConditionalFact(typeof(FileInfo_GetSetTimes), nameof(HighTemporalResolution))]
+ [ConditionalFact(typeof(FileInfo_GetSetTimes), nameof(NanoSecondTemporalResolution))]
public void CopyToNanosecondsPresent()
{
FileInfo input = GetNonZeroNanoseconds();
- if (input == null)
- return;
-
FileInfo output = new FileInfo(Path.Combine(GetTestFilePath(), input.Name));
output.Directory.Create();
output = input.CopyTo(output.FullName, true);
Assert.Equal(input.LastWriteTime.Ticks, output.LastWriteTime.Ticks);
- Assert.True(HasNonZeroNanoseconds(output.LastWriteTime));
+ Assert.True(HasNonZeroNanoseconds(output.LastWriteTime), "Expected non-zero nanoseconds, got: " + output.LastWriteTime.Ticks);
}
- [ConditionalFact(typeof(FileInfo_GetSetTimes), nameof(LowTemporalResolution))]
- public void CopyToNanosecondsPresent_LowTempRes()
+ [ConditionalFact(typeof(FileInfo_GetSetTimes), nameof(NotNanoSecondTemporalResolution))]
+ public void CopyToNanosecondsNotPresent()
{
FileInfo input = new FileInfo(GetTestFilePath());
input.Create().Dispose();
@@ -153,17 +147,12 @@ public void CopyToNanosecondsPresent_LowTempRes()
output.Directory.Create();
output = input.CopyTo(output.FullName, true);
- // On Browser, we sometimes see a difference of exactly 10M, eg.,
- // Expected: 637949564520000000
- // Actual: 637949564530000000
- double tolerance = PlatformDetection.IsBrowser ? 10_000_000 : 0;
-
- Assert.Equal(input.LastWriteTime.Ticks, output.LastWriteTime.Ticks, tolerance);
- Assert.False(HasNonZeroNanoseconds(output.LastWriteTime));
+ Assert.Equal(input.LastWriteTime.Ticks, output.LastWriteTime.Ticks);
+ Assert.False(HasNonZeroNanoseconds(output.LastWriteTime), "Expected zero nanoseconds, got: " + output.LastWriteTime.Ticks);
}
- [ConditionalFact(typeof(FileInfo_GetSetTimes), nameof(LowTemporalResolution))]
- public void MoveToMillisecondPresent_LowTempRes()
+ [ConditionalFact(typeof(FileInfo_GetSetTimes), nameof(NotMilliSecondTemporalResolution))]
+ public void MoveToMillisecondNotPresent()
{
FileInfo input = new FileInfo(GetTestFilePath());
input.Create().Dispose();
@@ -174,7 +163,7 @@ public void MoveToMillisecondPresent_LowTempRes()
Assert.Equal(0, output.LastWriteTime.Millisecond);
}
- [ConditionalFact(typeof(FileInfo_GetSetTimes), nameof(HighTemporalResolution))]
+ [ConditionalFact(typeof(FileInfo_GetSetTimes), nameof(MilliSecondTemporalResolution))]
public void MoveToMillisecondPresent()
{
FileInfo input = GetNonZeroMilliseconds();
@@ -185,8 +174,8 @@ public void MoveToMillisecondPresent()
Assert.NotEqual(0, output.LastWriteTime.Millisecond);
}
- [ConditionalFact(typeof(FileInfo_GetSetTimes), nameof(LowTemporalResolution))]
- public void CopyToMillisecondPresent_LowTempRes()
+ [ConditionalFact(typeof(FileInfo_GetSetTimes), nameof(NotMilliSecondTemporalResolution))]
+ public void CopyToMillisecondNotPresent()
{
FileInfo input = new FileInfo(GetTestFilePath());
input.Create().Dispose();
diff --git a/src/mono/CMakeLists.txt b/src/mono/CMakeLists.txt
index 89f3ea3bd4fd85..d2a2348e06f96a 100644
--- a/src/mono/CMakeLists.txt
+++ b/src/mono/CMakeLists.txt
@@ -637,21 +637,21 @@ if(LLVM_PREFIX)
string(REGEX REPLACE ".*MONO_API_VERSION ([0-9]+)" "\\1" llvm_api_version ${llvm_api_version_line})
# IMPORTANT: when bumping LLVM make sure to rerun the llvm-config commands below and update the variables accordingly
- if (NOT ${llvm_api_version} EQUAL 1900)
+ if (NOT ${llvm_api_version} EQUAL 2300)
message(FATAL_ERROR "Unexpected LLVM version: ${llvm_api_version}.")
endif()
# llvm-config --libs analysis core bitwriter mcjit orcjit
- set(MONO_llvm_core_libs "LLVMOrcJIT" "LLVMPasses" "LLVMIRPrinter" "LLVMHipStdPar" "LLVMCoroutines" "LLVMipo" "LLVMInstrumentation" "LLVMVectorize" "LLVMLinker" "LLVMFrontendOpenMP" "LLVMFrontendOffloading" "LLVMCodeGen" "LLVMScalarOpts" "LLVMInstCombine" "LLVMObjCARCOpts" "LLVMCodeGenTypes" "LLVMCFGuard" "LLVMAggressiveInstCombine" "LLVMTransformUtils" "LLVMWindowsDriver" "LLVMJITLink" "LLVMOption" "LLVMMCJIT" "LLVMExecutionEngine" "LLVMTarget" "LLVMRuntimeDyld" "LLVMOrcTargetProcess" "LLVMOrcShared" "LLVMBitWriter" "LLVMAnalysis" "LLVMProfileData" "LLVMSymbolize" "LLVMDebugInfoBTF" "LLVMDebugInfoPDB" "LLVMDebugInfoMSF" "LLVMDebugInfoDWARF" "LLVMObject" "LLVMTextAPI" "LLVMMCParser" "LLVMIRReader" "LLVMAsmParser" "LLVMMC" "LLVMDebugInfoCodeView" "LLVMBitReader" "LLVMCore" "LLVMRemarks" "LLVMBitstreamReader" "LLVMBinaryFormat" "LLVMTargetParser" "LLVMSupport" "LLVMDemangle")
+ set(MONO_llvm_core_libs "LLVMOrcJIT" "LLVMPasses" "LLVMIRPrinter" "LLVMHipStdPar" "LLVMCoroutines" "LLVMipo" "LLVMInstrumentation" "LLVMVectorize" "LLVMSandboxIR" "LLVMLinker" "LLVMFrontendOpenMP" "LLVMFrontendDirective" "LLVMFrontendAtomic" "LLVMFrontendOffloading" "LLVMObjectYAML" "LLVMGlobalISel" "LLVMSelectionDAG" "LLVMCodeGen" "LLVMScalarOpts" "LLVMInstCombine" "LLVMObjCARCOpts" "LLVMCodeGenTypes" "LLVMCGData" "LLVMCFGuard" "LLVMAggressiveInstCombine" "LLVMTransformUtils" "LLVMWindowsDriver" "LLVMJITLink" "LLVMOption" "LLVMMCJIT" "LLVMExecutionEngine" "LLVMTarget" "LLVMRuntimeDyld" "LLVMOrcTargetProcess" "LLVMOrcShared" "LLVMBitWriter" "LLVMAnalysis" "LLVMProfileData" "LLVMSymbolize" "LLVMDebugInfoBTF" "LLVMDebugInfoPDB" "LLVMDebugInfoMSF" "LLVMDebugInfoCodeView" "LLVMDebugInfoGSYM" "LLVMDebugInfoDWARF" "LLVMObject" "LLVMTextAPI" "LLVMMCParser" "LLVMIRReader" "LLVMAsmParser" "LLVMMC" "LLVMDebugInfoDWARFLowLevel" "LLVMBitReader" "LLVMFrontendHLSL" "LLVMCore" "LLVMRemarks" "LLVMBitstreamReader" "LLVMBinaryFormat" "LLVMTargetParser" "LLVMSupport" "LLVMDemangle")
# llvm-config --libs x86codegen
- set(MONO_llvm_extra_libs_x86codegen "LLVMX86CodeGen" "LLVMX86Desc" "LLVMX86Info" "LLVMMCDisassembler" "LLVMInstrumentation" "LLVMIRPrinter" "LLVMGlobalISel" "LLVMSelectionDAG" "LLVMCFGuard" "LLVMAsmPrinter" "LLVMCodeGen" "LLVMTarget" "LLVMScalarOpts" "LLVMInstCombine" "LLVMAggressiveInstCombine" "LLVMObjCARCOpts" "LLVMTransformUtils" "LLVMCodeGenTypes" "LLVMBitWriter" "LLVMAnalysis" "LLVMProfileData" "LLVMSymbolize" "LLVMDebugInfoBTF" "LLVMDebugInfoPDB" "LLVMDebugInfoMSF" "LLVMDebugInfoDWARF" "LLVMObject" "LLVMTextAPI" "LLVMMCParser" "LLVMIRReader" "LLVMAsmParser" "LLVMMC" "LLVMDebugInfoCodeView" "LLVMBitReader" "LLVMCore" "LLVMRemarks" "LLVMBitstreamReader" "LLVMBinaryFormat" "LLVMTargetParser" "LLVMSupport" "LLVMDemangle")
+ set(MONO_llvm_extra_libs_x86codegen "LLVMX86CodeGen" "LLVMX86Desc" "LLVMX86Info" "LLVMMCDisassembler" "LLVMInstrumentation" "LLVMIRPrinter" "LLVMGlobalISel" "LLVMSelectionDAG" "LLVMCFGuard" "LLVMAsmPrinter" "LLVMCodeGen" "LLVMTarget" "LLVMScalarOpts" "LLVMInstCombine" "LLVMAggressiveInstCombine" "LLVMObjCARCOpts" "LLVMTransformUtils" "LLVMCodeGenTypes" "LLVMCGData" "LLVMBitWriter" "LLVMAnalysis" "LLVMProfileData" "LLVMSymbolize" "LLVMDebugInfoBTF" "LLVMDebugInfoPDB" "LLVMDebugInfoMSF" "LLVMDebugInfoCodeView" "LLVMDebugInfoGSYM" "LLVMDebugInfoDWARF" "LLVMObject" "LLVMTextAPI" "LLVMMCParser" "LLVMIRReader" "LLVMAsmParser" "LLVMMC" "LLVMDebugInfoDWARFLowLevel" "LLVMBitReader" "LLVMFrontendHLSL" "LLVMCore" "LLVMRemarks" "LLVMBitstreamReader" "LLVMBinaryFormat" "LLVMTargetParser" "LLVMSupport" "LLVMDemangle")
# llvm-config --libs armcodegen
- set(MONO_llvm_extra_libs_armcodegen "LLVMARMCodeGen" "LLVMipo" "LLVMInstrumentation" "LLVMVectorize" "LLVMLinker" "LLVMFrontendOpenMP" "LLVMFrontendOffloading" "LLVMGlobalISel" "LLVMSelectionDAG" "LLVMCFGuard" "LLVMAsmPrinter" "LLVMCodeGen" "LLVMTarget" "LLVMScalarOpts" "LLVMInstCombine" "LLVMAggressiveInstCombine" "LLVMObjCARCOpts" "LLVMTransformUtils" "LLVMBitWriter" "LLVMAnalysis" "LLVMProfileData" "LLVMSymbolize" "LLVMDebugInfoBTF" "LLVMDebugInfoPDB" "LLVMDebugInfoMSF" "LLVMDebugInfoDWARF" "LLVMARMDesc" "LLVMObject" "LLVMTextAPI" "LLVMMCParser" "LLVMIRReader" "LLVMAsmParser" "LLVMBitReader" "LLVMCore" "LLVMRemarks" "LLVMBitstreamReader" "LLVMMCDisassembler" "LLVMCodeGenTypes" "LLVMARMUtils" "LLVMARMInfo" "LLVMMC" "LLVMDebugInfoCodeView" "LLVMBinaryFormat" "LLVMTargetParser" "LLVMSupport" "LLVMDemangle")
+ set(MONO_llvm_extra_libs_armcodegen "LLVMARMCodeGen" "LLVMipo" "LLVMInstrumentation" "LLVMVectorize" "LLVMSandboxIR" "LLVMLinker" "LLVMFrontendOpenMP" "LLVMFrontendDirective" "LLVMFrontendAtomic" "LLVMFrontendOffloading" "LLVMObjectYAML" "LLVMGlobalISel" "LLVMSelectionDAG" "LLVMCFGuard" "LLVMAsmPrinter" "LLVMCodeGen" "LLVMTarget" "LLVMScalarOpts" "LLVMInstCombine" "LLVMAggressiveInstCombine" "LLVMObjCARCOpts" "LLVMTransformUtils" "LLVMCGData" "LLVMBitWriter" "LLVMAnalysis" "LLVMProfileData" "LLVMSymbolize" "LLVMDebugInfoBTF" "LLVMDebugInfoPDB" "LLVMDebugInfoMSF" "LLVMDebugInfoCodeView" "LLVMDebugInfoGSYM" "LLVMDebugInfoDWARF" "LLVMFrontendHLSL" "LLVMARMDesc" "LLVMObject" "LLVMTextAPI" "LLVMMCParser" "LLVMIRReader" "LLVMAsmParser" "LLVMBitReader" "LLVMCore" "LLVMRemarks" "LLVMBitstreamReader" "LLVMMCDisassembler" "LLVMCodeGenTypes" "LLVMARMUtils" "LLVMARMInfo" "LLVMMC" "LLVMDebugInfoDWARFLowLevel" "LLVMBinaryFormat" "LLVMTargetParser" "LLVMSupport" "LLVMDemangle")
# llvm-config --libs aarch64codegen
- set(MONO_llvm_extra_libs_aarch64codegen "LLVMAArch64CodeGen" "LLVMGlobalISel" "LLVMSelectionDAG" "LLVMCFGuard" "LLVMAsmPrinter" "LLVMCodeGen" "LLVMTarget" "LLVMScalarOpts" "LLVMInstCombine" "LLVMAggressiveInstCombine" "LLVMObjCARCOpts" "LLVMTransformUtils" "LLVMBitWriter" "LLVMAnalysis" "LLVMProfileData" "LLVMSymbolize" "LLVMDebugInfoBTF" "LLVMDebugInfoPDB" "LLVMDebugInfoMSF" "LLVMDebugInfoDWARF" "LLVMObject" "LLVMTextAPI" "LLVMMCParser" "LLVMIRReader" "LLVMAsmParser" "LLVMBitReader" "LLVMAArch64Desc" "LLVMCodeGenTypes" "LLVMAArch64Utils" "LLVMCore" "LLVMRemarks" "LLVMBitstreamReader" "LLVMAArch64Info" "LLVMMC" "LLVMDebugInfoCodeView" "LLVMBinaryFormat" "LLVMTargetParser" "LLVMSupport" "LLVMDemangle")
+ set(MONO_llvm_extra_libs_aarch64codegen "LLVMAArch64CodeGen" "LLVMPasses" "LLVMIRPrinter" "LLVMHipStdPar" "LLVMCoroutines" "LLVMipo" "LLVMInstrumentation" "LLVMVectorize" "LLVMSandboxIR" "LLVMLinker" "LLVMFrontendOpenMP" "LLVMFrontendDirective" "LLVMFrontendAtomic" "LLVMFrontendOffloading" "LLVMObjectYAML" "LLVMGlobalISel" "LLVMSelectionDAG" "LLVMCFGuard" "LLVMAsmPrinter" "LLVMCodeGen" "LLVMTarget" "LLVMScalarOpts" "LLVMInstCombine" "LLVMAggressiveInstCombine" "LLVMObjCARCOpts" "LLVMTransformUtils" "LLVMCGData" "LLVMBitWriter" "LLVMAnalysis" "LLVMProfileData" "LLVMSymbolize" "LLVMDebugInfoBTF" "LLVMDebugInfoPDB" "LLVMDebugInfoMSF" "LLVMDebugInfoCodeView" "LLVMDebugInfoGSYM" "LLVMDebugInfoDWARF" "LLVMObject" "LLVMTextAPI" "LLVMMCParser" "LLVMIRReader" "LLVMAsmParser" "LLVMBitReader" "LLVMFrontendHLSL" "LLVMCore" "LLVMRemarks" "LLVMBitstreamReader" "LLVMAArch64Desc" "LLVMCodeGenTypes" "LLVMAArch64Utils" "LLVMAArch64Info" "LLVMMC" "LLVMDebugInfoDWARFLowLevel" "LLVMBinaryFormat" "LLVMTargetParser" "LLVMSupport" "LLVMDemangle")
if(HOST_LINUX AND NOT HOST_WASM AND NOT HOST_WASI)
set(MONO_stdlib "-nostdinc++ -nostdlib++")
diff --git a/src/mono/browser/browser.proj b/src/mono/browser/browser.proj
index ba4a2cceb683dd..975ea9271620ef 100644
--- a/src/mono/browser/browser.proj
+++ b/src/mono/browser/browser.proj
@@ -324,6 +324,8 @@
-g -Os -DDEBUG=1
-Oz
+ $(CMakeConfigurationEmccFlags) -fwasm-exceptions -sWASM_LEGACY_EXCEPTIONS=0
+ $(CMakeConfigurationEmccFlags) -fexceptions
$(CMakeConfigurationEmccFlags) -s ASSERTIONS=1
-O2
@@ -333,6 +335,8 @@
$(CMakeConfigurationLinkFlags) -msimd128
$(CMakeConfigurationLinkFlags) -Wno-pthreads-mem-growth
$(CMakeConfigurationLinkFlags) --emit-symbol-map
+ $(CMakeConfigurationLinkFlags) -fwasm-exceptions -sWASM_LEGACY_EXCEPTIONS=0
+ $(CMakeConfigurationLinkFlags) -fexceptions
-DEMSDK_PATH="$(EMSDK_PATH.TrimEnd('\/').Replace('\','/'))"
@@ -347,6 +351,9 @@
$(CMakeBuildRuntimeConfigureCmd) -DNATIVE_BIN_DIR="$(NativeBinDir.TrimEnd('\/').Replace('\','/'))"
$(CMakeBuildRuntimeConfigureCmd) -DCONFIGURATION_COMPILE_OPTIONS="-msimd128" -DCONFIGURATION_INTERPSIMDTABLES_LIB="simd"
$(CMakeBuildRuntimeConfigureCmd) -DCONFIGURATION_INTERPSIMDTABLES_LIB="nosimd"
+
+ $(CMakeBuildRuntimeConfigureCmd) -DCONFIGURATION_EH_LIB="eh-wasm"
+ $(CMakeBuildRuntimeConfigureCmd) -DCONFIGURATION_EH_LIB="eh-js"
$(CMakeBuildRuntimeConfigureCmd) -DDISABLE_THREADS=0
$(CMakeBuildRuntimeConfigureCmd) -DENABLE_JS_INTEROP_BY_VALUE=1
$(CMakeBuildRuntimeConfigureCmd) $(CMakeConfigurationEmsdkPath)
@@ -439,11 +446,6 @@
DestinationFolder="$(MicrosoftNetCoreAppRuntimePackNativeDir)"
SkipUnchangedFiles="true" />
-
-
diff --git a/src/mono/browser/build/BrowserWasmApp.CoreCLR.targets b/src/mono/browser/build/BrowserWasmApp.CoreCLR.targets
index ffeaae90416967..58484f1c31b741 100644
--- a/src/mono/browser/build/BrowserWasmApp.CoreCLR.targets
+++ b/src/mono/browser/build/BrowserWasmApp.CoreCLR.targets
@@ -27,7 +27,7 @@
true
emcc
- <_WasmDefaultFlags>-fwasm-exceptions -msimd128
+ <_WasmDefaultFlags>-fwasm-exceptions -sWASM_LEGACY_EXCEPTIONS=0 -msimd128
Build
Publish
@@ -349,6 +349,7 @@
<_EmccCommonFlags Include="-v" Condition="'$(EmccVerbose)' == 'true'" />
<_EmccCommonFlags Include="-g" Condition="'$(WasmNativeDebugSymbols)' == 'true'" />
<_EmccCommonFlags Include="-fwasm-exceptions" />
+ <_EmccCommonFlags Include="-sWASM_LEGACY_EXCEPTIONS=0" />
<_EmccCommonFlags Include="-msimd128" />
diff --git a/src/mono/browser/build/BrowserWasmApp.targets b/src/mono/browser/build/BrowserWasmApp.targets
index 32541ff00fd668..d331f8313fb460 100644
--- a/src/mono/browser/build/BrowserWasmApp.targets
+++ b/src/mono/browser/build/BrowserWasmApp.targets
@@ -37,8 +37,8 @@
emcc
<_WasmDefaultFlags Condition="'$(WasmEnableExceptionHandling)' == 'false'">-fexceptions
- <_WasmDefaultFlags Condition="'$(WasmEnableExceptionHandling)' != 'false'">-fwasm-exceptions
- <_WasmDefaultFlags Condition="'$(WasmEnableSIMD)' == 'true'">-msimd128
+ <_WasmDefaultFlags Condition="'$(WasmEnableExceptionHandling)' != 'false'">-fwasm-exceptions -s WASM_LEGACY_EXCEPTIONS=0
+ <_WasmDefaultFlags Condition="'$(WasmEnableSIMD)' == 'true'">$(_WasmDefaultFlags) -msimd128
<_WasmOutputFileName Condition="'$(WasmSingleFileBundle)' != 'true'">dotnet.native.wasm
@@ -178,8 +178,10 @@
<_EmccCommonFlags Include="$(EmccFlags)" />
<_EmccCommonFlags Include="-v" Condition="'$(EmccVerbose)' != 'false'" />
<_EmccCommonFlags Include="-g" Condition="'$(WasmNativeDebugSymbols)' == 'true'" />
+ <_EmccCommonFlags Include="-fexceptions" Condition="'$(WasmEnableExceptionHandling)' == 'false'" />
<_EmccCommonFlags Include="-s DISABLE_EXCEPTION_CATCHING=0" Condition="'$(WasmEnableExceptionHandling)' == 'false'" />
<_EmccCommonFlags Include="-fwasm-exceptions" Condition="'$(WasmEnableExceptionHandling)' == 'true'" />
+ <_EmccCommonFlags Include="-s WASM_LEGACY_EXCEPTIONS=0" Condition="'$(WasmEnableExceptionHandling)' == 'true'" />
<_EmccCommonFlags Include="-s MAXIMUM_MEMORY=$(EmccMaximumHeapSize)" Condition="'$(EmccMaximumHeapSize)' != ''" />
<_EmccIncludePaths Include="$(_WasmIntermediateOutputPath.TrimEnd('\/'))" />
@@ -450,7 +452,6 @@
-
<_WasmAssembliesInternal Remove="$(_WasmDedupAssembly)"/>
@@ -469,7 +470,7 @@
diff --git a/src/mono/browser/emscripten-version.txt b/src/mono/browser/emscripten-version.txt
index 4a8bd23c1443d4..4d5e5283b97fb2 100644
--- a/src/mono/browser/emscripten-version.txt
+++ b/src/mono/browser/emscripten-version.txt
@@ -1 +1 @@
-3.1.56
\ No newline at end of file
+5.0.6
\ No newline at end of file
diff --git a/src/mono/browser/runtime/CMakeLists.txt b/src/mono/browser/runtime/CMakeLists.txt
index 788707244c11bd..a133f625d40f89 100644
--- a/src/mono/browser/runtime/CMakeLists.txt
+++ b/src/mono/browser/runtime/CMakeLists.txt
@@ -22,7 +22,7 @@ target_link_libraries(dotnet.native
${MONO_ARTIFACTS_DIR}/libmono-ee-interp.a
${MONO_ARTIFACTS_DIR}/libmonosgen-2.0.a
${MONO_ARTIFACTS_DIR}/libmono-icall-table.a
- ${MONO_ARTIFACTS_DIR}/libmono-wasm-eh-js.a
+ ${MONO_ARTIFACTS_DIR}/libmono-wasm-${CONFIGURATION_EH_LIB}.a
${MONO_ARTIFACTS_DIR}/libmono-wasm-${CONFIGURATION_INTERPSIMDTABLES_LIB}.a
${NATIVE_BIN_DIR}/libSystem.Native.a
${NATIVE_BIN_DIR}/libSystem.Native.TimeZoneData.a
@@ -44,7 +44,7 @@ set(ignoreMeEmsdkPath "${EMSDK_PATH}")
if(CMAKE_BUILD_TYPE STREQUAL "Release")
add_custom_command(TARGET dotnet.native
- POST_BUILD COMMAND ${EMSDK_PATH}/bin/wasm-opt --enable-exception-handling --enable-simd --enable-bulk-memory --enable-nontrapping-float-to-int ${CONFIGURATION_WASM_OPT_FLAGS} --strip-dwarf ${NATIVE_BIN_DIR}/dotnet.native.wasm -o ${NATIVE_BIN_DIR}/dotnet.native.wasm
+ POST_BUILD COMMAND ${EMSDK_PATH}/bin/wasm-opt --enable-exception-handling --enable-reference-types --enable-multivalue --enable-simd --enable-bulk-memory --enable-nontrapping-float-to-int ${CONFIGURATION_WASM_OPT_FLAGS} --strip-dwarf ${NATIVE_BIN_DIR}/dotnet.native.wasm -o ${NATIVE_BIN_DIR}/dotnet.native.wasm
COMMENT "Stripping debug symbols from dotnet.native.wasm using wasm-opt")
endif()
diff --git a/src/mono/browser/runtime/assets.ts b/src/mono/browser/runtime/assets.ts
index a899e1eb690565..e1d94fda04dc2d 100644
--- a/src/mono/browser/runtime/assets.ts
+++ b/src/mono/browser/runtime/assets.ts
@@ -24,7 +24,6 @@ export function instantiate_asset (asset: AssetEntry, url: string, bytes: Uint8A
switch (asset.behavior) {
case "dotnetwasm":
- case "js-module-threads":
case "js-module-diagnostics":
case "symbols":
// do nothing
diff --git a/src/mono/browser/runtime/dotnet.d.ts b/src/mono/browser/runtime/dotnet.d.ts
index 20057f71828688..2b99018f6f2897 100644
--- a/src/mono/browser/runtime/dotnet.d.ts
+++ b/src/mono/browser/runtime/dotnet.d.ts
@@ -261,7 +261,6 @@ interface Assets {
lazyAssembly?: AssemblyAsset[];
corePdb?: PdbAsset[];
pdb?: PdbAsset[];
- jsModuleWorker?: JsAsset[];
jsModuleDiagnostics?: JsAsset[];
jsModuleNative: JsAsset[];
jsModuleRuntime: JsAsset[];
@@ -422,10 +421,6 @@ type SingleAssetBehaviors =
* The javascript module for loader.
*/
| "js-module-dotnet"
-/**
- * The javascript module for threads.
- */
- | "js-module-threads"
/**
* The javascript module for diagnostic server and client.
*/
diff --git a/src/mono/browser/runtime/jiterpreter-jit-call.ts b/src/mono/browser/runtime/jiterpreter-jit-call.ts
index 3175cc5a758e5a..cbb50e23118633 100644
--- a/src/mono/browser/runtime/jiterpreter-jit-call.ts
+++ b/src/mono/browser/runtime/jiterpreter-jit-call.ts
@@ -333,11 +333,11 @@ export function mono_interp_flush_jitcall_queue (): void {
return;
}
- if (builder.options.enableWasmEh) {
- if (!runtimeHelpers.featureWasmEh) {
+ if (builder.options.enableWasmFinalEh) {
+ if (!runtimeHelpers.featureWasmFinalEh) {
// The user requested to enable wasm EH but it's not supported, so turn the option back off
- applyOptions({ enableWasmEh: false });
- builder.options.enableWasmEh = false;
+ applyOptions({ enableWasmFinalEh: false });
+ builder.options.enableWasmFinalEh = false;
}
}
@@ -639,10 +639,14 @@ function generate_wasm_body (
): boolean {
let stack_index = 0;
- // If wasm EH is enabled we will perform the call inside a catch-all block and set a flag
- // if it throws any exception
- if (builder.options.enableWasmEh)
- builder.block(WasmValtype.void, WasmOpcode.try_);
+ // If wasm EH is enabled we perform the call inside a try_table (standardized exnref proposal)
+ // and set a flag if it throws a C++ exception. Structure:
+ // (block $outer (block $catch (result i32) (try_table (catch __cpp_exception $catch) ) br $outer) )
+ if (builder.options.enableWasmFinalEh) {
+ builder.block(WasmValtype.void); // $outer
+ builder.block(WasmValtype.i32); // $catch - receives the exception pointer
+ builder.tryTable(WasmValtype.void, "__cpp_exception", 1); // catch __cpp_exception -> $catch
+ }
// Wrapper signature: [thisptr], [&retval], &arg0, ..., &funcdef
// Desired stack layout for direct calls: [&retval], [thisptr], arg0, ..., &rgctx
@@ -779,9 +783,12 @@ function generate_wasm_body (
}
// If the call threw a JS or wasm exception, set the thrown flag
- if (builder.options.enableWasmEh) {
- builder.appendU8(WasmOpcode.catch_);
- builder.appendULeb(builder.getTypeIndex("__cpp_exception"));
+ if (builder.options.enableWasmFinalEh) {
+ builder.endBlock(); // end try_table
+ // Normal completion (no exception): skip the handler by branching out to $outer
+ builder.appendU8(WasmOpcode.br);
+ builder.appendULeb(1);
+ builder.endBlock(); // end $catch - reached only when caught, stack: [exception ptr]
builder.callImport("begin_catch");
builder.callImport("end_catch");
builder.local("thrown");
@@ -789,7 +796,7 @@ function generate_wasm_body (
builder.appendU8(WasmOpcode.i32_store);
builder.appendMemarg(0, 2);
- builder.endBlock();
+ builder.endBlock(); // end $outer
}
builder.appendU8(WasmOpcode.return_);
diff --git a/src/mono/browser/runtime/jiterpreter-opcodes.ts b/src/mono/browser/runtime/jiterpreter-opcodes.ts
index 4d3ab5c3930f1c..27303091de9d07 100644
--- a/src/mono/browser/runtime/jiterpreter-opcodes.ts
+++ b/src/mono/browser/runtime/jiterpreter-opcodes.ts
@@ -81,11 +81,8 @@ export const enum WasmOpcode {
if_,
else_,
- try_ = 0x06,
- catch_,
- catch_all = 0x19,
- throw_ = 0x08,
- rethrow_ = 0x09,
+ throw_ref = 0x0a,
+ try_table = 0x1f,
end = 0x0b,
br,
diff --git a/src/mono/browser/runtime/jiterpreter-support.ts b/src/mono/browser/runtime/jiterpreter-support.ts
index 3235406cae7894..740a05bb14b4a9 100644
--- a/src/mono/browser/runtime/jiterpreter-support.ts
+++ b/src/mono/browser/runtime/jiterpreter-support.ts
@@ -481,13 +481,13 @@ export class WasmBuilder {
if (includeFunctionTable !== false)
throw new Error("function table imports are disabled");
- const enableWasmEh = this.getExceptionTag() !== undefined;
+ const enableWasmFinalEh = this.getExceptionTag() !== undefined;
// Import section
this.beginSection(2);
this.appendULeb(
1 + // memory
- (enableWasmEh ? 1 : 0) + // c++ exception tag
+ (enableWasmFinalEh ? 1 : 0) + // c++ exception tag
importsToEmit.length +
((includeFunctionTable !== false) ? 1 : 0)
);
@@ -520,7 +520,7 @@ export class WasmBuilder {
this.appendULeb(0x01);
}
- if (enableWasmEh) {
+ if (enableWasmFinalEh) {
// import the c++ exception tag
this.appendName("x");
this.appendName("e");
@@ -856,6 +856,28 @@ export class WasmBuilder {
this.appendU8(WasmOpcode.end);
}
+ // Returns the index of an imported tag within the wasm tag index space, which is SEPARATE
+ // from the type index space (so getTypeIndex must not be used for catch/throw immediates).
+ // The jiterpreter module imports exactly one tag, __cpp_exception, so it is at tag index 0.
+ getTagIndex (name: string): number {
+ if (name !== "__cpp_exception")
+ throw new Error(`Unknown wasm tag '${name}'`);
+ return 0;
+ }
+
+ // Emits a try_table block (standardized exnref EH proposal) with a single
+ // 'catch -> label' clause. On catch, the tag's parameters are pushed and control
+ // branches out by catchLabelDepth levels. Must be closed with endBlock().
+ tryTable (type: WasmValtype, catchTagName: string, catchLabelDepth: number) {
+ this.appendU8(WasmOpcode.try_table);
+ this.appendU8(type);
+ this.appendULeb(1); // one catch clause
+ this.appendU8(0x00); // 0x00 = catch (tag): push tag params, then branch
+ this.appendULeb(this.getTagIndex(catchTagName)); // tag index (separate index space from types)
+ this.appendULeb(catchLabelDepth);
+ this.activeBlocks++;
+ }
+
arg (name: string | number, opcode?: WasmOpcode) {
const index = typeof (name) === "string"
? (this.locals.has(name) ? this.locals.get(name)! : undefined)
@@ -1969,7 +1991,7 @@ export type JiterpreterOptions = {
enableJitCall: boolean;
enableBackwardBranches: boolean;
enableCallResume: boolean;
- enableWasmEh: boolean;
+ enableWasmFinalEh: boolean;
enableSimd: boolean;
enableAtomics: boolean;
zeroPageOptimization: boolean;
@@ -2016,7 +2038,7 @@ const optionNames: { [jsName: string]: string } = {
"enableJitCall": "jiterpreter-jit-call-enabled",
"enableBackwardBranches": "jiterpreter-backward-branch-entries-enabled",
"enableCallResume": "jiterpreter-call-resume-enabled",
- "enableWasmEh": "jiterpreter-wasm-eh-enabled",
+ "enableWasmFinalEh": "jiterpreter-wasm-eh-enabled",
"enableSimd": "jiterpreter-simd-enabled",
"enableAtomics": "jiterpreter-atomics-enabled",
"zeroPageOptimization": "jiterpreter-zero-page-optimization",
diff --git a/src/mono/browser/runtime/loader/assets.ts b/src/mono/browser/runtime/loader/assets.ts
index b23d66a3eac962..b2fc92a80891c4 100644
--- a/src/mono/browser/runtime/loader/assets.ts
+++ b/src/mono/browser/runtime/loader/assets.ts
@@ -27,7 +27,6 @@ const worker_empty_prefix = " - ";
const jsRuntimeModulesAssetTypes: {
[k: string]: boolean
} = {
- "js-module-threads": true,
"js-module-runtime": true,
"js-module-dotnet": true,
"js-module-native": true,
@@ -294,16 +293,12 @@ export function prepareAssets () {
mono_assert(resources.wasmNative, "resources.wasmNative must be defined");
mono_assert(resources.jsModuleNative, "resources.jsModuleNative must be defined");
mono_assert(resources.jsModuleRuntime, "resources.jsModuleRuntime must be defined");
- mono_assert(!WasmEnableThreads || resources.jsModuleWorker, "resources.jsModuleWorker must be defined");
convert_single_asset(assetsToLoad, resources.wasmNative, "dotnetwasm");
convert_single_asset(modulesAssets, resources.jsModuleNative, "js-module-native");
convert_single_asset(modulesAssets, resources.jsModuleRuntime, "js-module-runtime");
if (resources.jsModuleDiagnostics) {
convert_single_asset(modulesAssets, resources.jsModuleDiagnostics, "js-module-diagnostics");
}
- if (WasmEnableThreads) {
- convert_single_asset(modulesAssets, resources.jsModuleWorker, "js-module-threads");
- }
const addAsset = (asset: Asset, behavior: AssetBehaviors, isCore: boolean) => {
const assetEntry = asset as AssetEntryInternal;
@@ -704,8 +699,7 @@ const monoToBlazorAssetTypeMap: { [key: string]: WebAssemblyBootResourceType | u
"dotnetwasm": "dotnetwasm",
"js-module-dotnet": "dotnetjs",
"js-module-native": "dotnetjs",
- "js-module-runtime": "dotnetjs",
- "js-module-threads": "dotnetjs"
+ "js-module-runtime": "dotnetjs"
};
function invokeLoadBootResource (asset: AssetEntryInternal): string | Promise | Promise | null | undefined {
@@ -777,11 +771,10 @@ export async function streamingCompileWasm () {
export function preloadWorkers () {
if (!WasmEnableThreads) return;
- const jsModuleWorker = resolve_single_asset_path("js-module-threads");
const loadingWorkers = [];
for (let i = 0; i < loaderHelpers.config.pthreadPoolInitialSize!; i++) {
const workerNumber = loaderHelpers.workerNextNumber++;
- const worker: Partial = new Worker(jsModuleWorker.resolvedUrl!, {
+ const worker: Partial = new Worker(loaderHelpers.scriptUrl, {
name: "dotnet-worker-" + workerNumber.toString().padStart(3, "0"),
type: "module",
});
diff --git a/src/mono/browser/runtime/loader/config.ts b/src/mono/browser/runtime/loader/config.ts
index e0618be5918a46..13a58da1a58132 100644
--- a/src/mono/browser/runtime/loader/config.ts
+++ b/src/mono/browser/runtime/loader/config.ts
@@ -70,9 +70,6 @@ function deep_merge_resources (target: Assets, source: Assets): Assets {
if (providedResources.pdb !== undefined) {
providedResources.pdb = [...(target.pdb || []), ...(providedResources.pdb || [])];
}
- if (providedResources.jsModuleWorker !== undefined) {
- providedResources.jsModuleWorker = [...(target.jsModuleWorker || []), ...(providedResources.jsModuleWorker || [])];
- }
if (providedResources.jsModuleNative !== undefined) {
providedResources.jsModuleNative = [...(target.jsModuleNative || []), ...(providedResources.jsModuleNative || [])];
}
@@ -129,7 +126,6 @@ export function normalizeConfig () {
config.resources = config.resources || {
assembly: [],
jsModuleNative: [],
- jsModuleWorker: [],
jsModuleRuntime: [],
wasmNative: [],
vfs: [],
@@ -163,9 +159,6 @@ export function normalizeConfig () {
case "dotnetwasm":
toMerge.wasmNative = [asset as WasmAsset];
break;
- case "js-module-threads":
- toMerge.jsModuleWorker = [asset as JsAsset];
- break;
case "js-module-runtime":
toMerge.jsModuleRuntime = [asset as JsAsset];
break;
diff --git a/src/mono/browser/runtime/loader/globals.ts b/src/mono/browser/runtime/loader/globals.ts
index 98f6dfd30bf24c..8fd1ff269284f5 100644
--- a/src/mono/browser/runtime/loader/globals.ts
+++ b/src/mono/browser/runtime/loader/globals.ts
@@ -6,7 +6,7 @@
import WasmEnableThreads from "consts:wasmEnableThreads";
-import { exceptions, simd, relaxedSimd } from "wasm-feature-detect";
+import { simd, relaxedSimd, exceptionsFinal } from "wasm-feature-detect";
import gitHash from "consts:gitHash";
@@ -19,8 +19,8 @@ import { mono_log_error, set_thread_prefix, setup_proxy_console } from "./loggin
import { invokeLibraryInitializers } from "./libraryInitializers";
import { deep_merge_config, isDebuggingSupported } from "./config";
-// if we are ST build or the first script loaded in the web worker, we are expected to become the sidecar
-if (typeof importScripts === "function" && (!WasmEnableThreads || !globalThis.onmessage)) {
+// If we are a single-threaded build running in a web worker, we are expected to become the sidecar
+if (typeof importScripts === "function" && (!WasmEnableThreads)) {
(globalThis as any).dotnetSidecar = true;
}
@@ -131,7 +131,7 @@ export function setLoaderGlobals (
isDebuggingSupported,
// from wasm-feature-detect npm package
- exceptions,
+ exceptionsFinal,
simd,
relaxedSimd
};
diff --git a/src/mono/browser/runtime/loader/run.ts b/src/mono/browser/runtime/loader/run.ts
index b11bfddd8716e6..633f1f15ad298e 100644
--- a/src/mono/browser/runtime/loader/run.ts
+++ b/src/mono/browser/runtime/loader/run.ts
@@ -324,9 +324,7 @@ export async function createEmscripten (moduleFactory: DotnetModuleConfig | ((ap
registerEmscriptenExitHandlers();
- return emscriptenModule.ENVIRONMENT_IS_PTHREAD
- ? createEmscriptenWorker()
- : createEmscriptenMain();
+ return createEmscriptenMain();
}
let jsModuleRuntimePromise: Promise;
@@ -453,9 +451,33 @@ async function createEmscriptenWorker (): Promise {
prepareAssetsWorker();
const promises = importModules();
const es6Modules = await Promise.all(promises);
+ (globalThis as any).name = "em-pthread";
await initializeModules(es6Modules as any);
+ if (loaderHelpers.config.exitOnUnhandledError) {
+ installUnhandledErrorHandler();
+ }
+ registerEmscriptenExitHandlers();
+ if (ENVIRONMENT_IS_WEB && loaderHelpers.config.forwardConsole && typeof globalThis.WebSocket != "undefined") {
+ setup_proxy_console("main", globalThis.console, globalThis.location.origin);
+ }
+
+ await detect_features_and_polyfill(emscriptenModule);
+
await mono_download_assets();
+ self.dispatchEvent(new MessageEvent("message", {
+ data: {
+ cmd: "load",
+ handlers: emscriptenModule.handlers,
+ wasmMemory: emscriptenModule.wasmMemory,
+ wasmModule: emscriptenModule.wasmModule
+ }
+ }));
+
return emscriptenModule;
}
+
+if (ENVIRONMENT_IS_WORKER) {
+ void createEmscriptenWorker().catch((err) => mono_exit(1, err));
+}
diff --git a/src/mono/browser/runtime/pthreads/ui-thread.ts b/src/mono/browser/runtime/pthreads/ui-thread.ts
index 8a2e4f7fed7fe9..9eb4888490fa24 100644
--- a/src/mono/browser/runtime/pthreads/ui-thread.ts
+++ b/src/mono/browser/runtime/pthreads/ui-thread.ts
@@ -301,9 +301,8 @@ function getNewWorker (modulePThread: PThreadLibrary): PThreadWorker {
function allocateUnusedWorker (): PThreadWorker {
if (!WasmEnableThreads) return null as any;
- const asset = loaderHelpers.resolve_single_asset_path("js-module-threads");
- const uri = asset.resolvedUrl;
- mono_assert(uri !== undefined, "could not resolve the uri for the js-module-threads asset");
+ const uri = loaderHelpers.scriptUrl;
+ mono_assert(uri !== undefined, "loaderHelpers.scriptUrl must be defined");
const workerNumber = loaderHelpers.workerNextNumber++;
const worker = new Worker(uri, {
name: "dotnet-worker-" + workerNumber.toString().padStart(3, "0"),
diff --git a/src/mono/browser/runtime/startup.ts b/src/mono/browser/runtime/startup.ts
index 343283935a6cda..9e9ce47c2bda0c 100644
--- a/src/mono/browser/runtime/startup.ts
+++ b/src/mono/browser/runtime/startup.ts
@@ -83,7 +83,7 @@ export function configureEmscriptenStartup (module: DotnetModuleInternal): void
mono_assert(runtimeHelpers.featureWasmSimd, "This browser/engine doesn't support WASM SIMD. Please use a modern version. See also https://learn.microsoft.com/aspnet/core/blazor/supported-platforms");
}
if (runtimeHelpers.emscriptenBuildOptions.wasmEnableEH) {
- mono_assert(runtimeHelpers.featureWasmEh, "This browser/engine doesn't support WASM exception handling. Please use a modern version. See also https://learn.microsoft.com/aspnet/core/blazor/supported-platforms");
+ mono_assert(runtimeHelpers.featureWasmFinalEh, "This browser/engine doesn't support WASM exception handling. Please use a modern version. See also https://learn.microsoft.com/aspnet/core/blazor/supported-platforms");
}
module.mainScriptUrlOrBlob = loaderHelpers.scriptUrl;// this is needed by worker threads
@@ -424,10 +424,10 @@ async function instantiate_wasm_module (
async function ensureUsedWasmFeatures () {
const simd = loaderHelpers.simd();
const relaxedSimd = loaderHelpers.relaxedSimd();
- const exceptions = loaderHelpers.exceptions();
+ const exceptions = loaderHelpers.exceptionsFinal();
runtimeHelpers.featureWasmSimd = await simd;
runtimeHelpers.featureWasmRelaxedSimd = await relaxedSimd;
- runtimeHelpers.featureWasmEh = await exceptions;
+ runtimeHelpers.featureWasmFinalEh = await exceptions;
}
export async function start_runtime () {
diff --git a/src/mono/browser/runtime/types/index.ts b/src/mono/browser/runtime/types/index.ts
index c6c3aca3bae53f..1a06897003c298 100644
--- a/src/mono/browser/runtime/types/index.ts
+++ b/src/mono/browser/runtime/types/index.ts
@@ -220,7 +220,6 @@ export interface Assets {
corePdb?: PdbAsset[];
pdb?: PdbAsset[];
- jsModuleWorker?: JsAsset[];
jsModuleDiagnostics?: JsAsset[];
jsModuleNative: JsAsset[];
jsModuleRuntime: JsAsset[];
@@ -399,10 +398,6 @@ export type SingleAssetBehaviors =
* The javascript module for loader.
*/
| "js-module-dotnet"
- /**
- * The javascript module for threads.
- */
- | "js-module-threads"
/**
* The javascript module for diagnostic server and client.
*/
diff --git a/src/mono/browser/runtime/types/internal.ts b/src/mono/browser/runtime/types/internal.ts
index 48f989867fbc81..6c04f9b275b9b0 100644
--- a/src/mono/browser/runtime/types/internal.ts
+++ b/src/mono/browser/runtime/types/internal.ts
@@ -174,7 +174,7 @@ export type LoaderHelpers = {
isFirefox: boolean
// from wasm-feature-detect npm package
- exceptions: () => Promise,
+ exceptionsFinal: () => Promise,
simd: () => Promise,
relaxedSimd: () => Promise,
}
@@ -226,7 +226,7 @@ export type RuntimeHelpers = {
afterOnRuntimeInitialized: PromiseAndController,
afterPostRun: PromiseAndController,
- featureWasmEh: boolean,
+ featureWasmFinalEh: boolean,
featureWasmSimd: boolean,
featureWasmRelaxedSimd: boolean,
diff --git a/src/mono/mono.proj b/src/mono/mono.proj
index c3844d6351437a..e936acfb2ce67f 100644
--- a/src/mono/mono.proj
+++ b/src/mono/mono.proj
@@ -757,7 +757,7 @@
<_PythonCmd Condition="'$(HostOS)' != 'windows'">python3
<_PythonCmd Condition="'$(HostOS)' == 'windows'">python
- <_PythonCmd Condition="'$(HostOS)' == 'windows' and ('$(TargetsBrowser)' == 'true' or '$(TargetsWasi)' == 'true')">$([MSBuild]::NormalizePath('$(PkgMicrosoft_NET_Runtime_Emscripten_3_1_56_Python_win-x64)', 'tools', 'python.exe'))
+ <_PythonCmd Condition="'$(HostOS)' == 'windows' and ('$(TargetsBrowser)' == 'true' or '$(TargetsWasi)' == 'true')">$([MSBuild]::NormalizePath('$(PkgMicrosoft_NET_Runtime_Emscripten_5_0_6_Python_win-x64)', 'tools', 'python.exe'))
diff --git a/src/mono/mono/eventpipe/ep-rt-mono-runtime-provider.c b/src/mono/mono/eventpipe/ep-rt-mono-runtime-provider.c
index 5503c2c0b9eebf..947e9ab93184e4 100644
--- a/src/mono/mono/eventpipe/ep-rt-mono-runtime-provider.c
+++ b/src/mono/mono/eventpipe/ep-rt-mono-runtime-provider.c
@@ -1435,15 +1435,27 @@ static void update_sample_frequency ()
double now = profiler_now ();
double ms_since_last_sample = now - last_sample_time;
- if (desired_sample_interval_ms > 0 && last_sample_time != 0) {
+ // Only recompute when wall-clock time actually advanced. With coarse browser
+ // timer resolution ms_since_last_sample can round to 0 during a burst of
+ // instrumentation callbacks; dividing by it produces +Inf which, once cast to
+ // int (saturating, nontrapping-float-to-int), pins skips_per_period at INT_MAX
+ // and permanently disables sampling. Also clamp the result to keep sampling
+ // responsive, matching the CoreCLR single-threaded sampler.
+ if (desired_sample_interval_ms > 0 && last_sample_time != 0 && ms_since_last_sample > 0) {
// recalculate ideal number of skips per period
double skips_per_ms = ((double)sample_skip_counter) / ms_since_last_sample;
double newskips_per_period = (skips_per_ms * ((double)desired_sample_interval_ms));
- skips_per_period = (int)((newskips_per_period + ((double)sample_skip_counter) + ((double)prev_skips_per_period)) / 3.0);
+ double avg_skips = (newskips_per_period + ((double)sample_skip_counter) + ((double)prev_skips_per_period)) / 3.0;
+ if (avg_skips < 1.0)
+ avg_skips = 1.0;
+ else if (avg_skips > 10000.0)
+ avg_skips = 10000.0;
+ skips_per_period = (int)avg_skips;
prev_skips_per_period = sample_skip_counter;
- } else {
+ } else if (last_sample_time == 0 || desired_sample_interval_ms <= 0) {
skips_per_period = 0;
}
+ // else (ms_since_last_sample == 0): keep the previous skips_per_period unchanged
last_sample_time = now;
sample_skip_counter = 0;
}
diff --git a/src/mono/mono/metadata/assembly-load-context.c b/src/mono/mono/metadata/assembly-load-context.c
index dec9f96b6755f3..41455b46c5f6cf 100644
--- a/src/mono/mono/metadata/assembly-load-context.c
+++ b/src/mono/mono/metadata/assembly-load-context.c
@@ -12,6 +12,7 @@
#include "mono/metadata/mono-debug.h"
#include "mono/utils/mono-error-internals.h"
#include "mono/utils/mono-logger-internals.h"
+#include "mono/utils/mono-tls.h"
GENERATE_GET_CLASS_WITH_CACHE (assembly_load_context, "System.Runtime.Loader", "AssemblyLoadContext");
static GENERATE_GET_CLASS_WITH_CACHE (assembly, "System.Reflection", "Assembly");
@@ -22,6 +23,14 @@ static MonoCoopMutex alc_list_lock; /* Used when accessing 'alcs' */
/* Protected by alc_list_lock */
static GSList *loaded_assemblies;
+/*
+ * Per-thread list of "alc:resolve_method:assembly_name" keys currently being resolved via a
+ * managed ALC resolve hook. Used to break re-entrant resolution: invoking a managed hook
+ * (e.g. MonoResolveUsingLoad) may need to JIT-compile methods, and under full-AOT that
+ * compilation may re-trigger resolution of the same assembly, causing unbounded recursion.
+ */
+static MonoNativeTlsKey alc_resolve_in_progress_tls_id;
+
static inline void
alcs_lock (void)
{
@@ -79,6 +88,7 @@ void
mono_alcs_init (void)
{
mono_coop_mutex_init (&alc_list_lock);
+ mono_native_tls_alloc (&alc_resolve_in_progress_tls_id, NULL);
default_alc = mono_alc_create (FALSE);
default_alc->gchandle = mono_gchandle_new_internal (NULL, FALSE);
@@ -477,14 +487,38 @@ invoke_resolve_method (MonoMethod *resolve_method, MonoAssemblyLoadContext *alc,
{
MonoAssembly *result = NULL;
char* aname_str = NULL;
+ char *resolve_key = NULL;
+ GSList *in_progress;
if (mono_runtime_get_no_exec ())
return NULL;
- HANDLE_FUNCTION_ENTER ();
-
aname_str = mono_stringify_assembly_name (aname);
+ /*
+ * Invoking a managed resolve hook can re-enter assembly resolution for the same
+ * assembly: constructing the AssemblyName inside the hook parses the name using a
+ * generic method, and under full-AOT JIT-compiling that method can itself trigger
+ * resolution of the same assembly -> unbounded recursion -> stack overflow.
+ * Guard against re-entering the same hook for the same name on the same ALC on the
+ * current thread (mirrors the TLS recursion guard in mono_class_setup_fields). The key
+ * includes the ALC instance because resolve_method is a single cached MonoMethod shared
+ * by all ALCs, so keying on it alone would wrongly suppress a legitimate nested resolve
+ * of the same name on a different ALC.
+ */
+ resolve_key = g_strdup_printf ("%p:%p:%s", (gpointer)alc, (gpointer)resolve_method, aname_str);
+ in_progress = (GSList *)mono_native_tls_get_value (alc_resolve_in_progress_tls_id);
+ if (g_slist_find_custom (in_progress, resolve_key, (GCompareFunc)strcmp)) {
+ mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_ASSEMBLY, "Skipping re-entrant ALC resolve for '%s'.", aname_str);
+ g_free (resolve_key);
+ g_free (aname_str);
+ return NULL;
+ }
+ in_progress = g_slist_prepend (in_progress, resolve_key);
+ mono_native_tls_set_value (alc_resolve_in_progress_tls_id, in_progress);
+
+ HANDLE_FUNCTION_ENTER ();
+
MonoStringHandle aname_obj = mono_string_new_handle (aname_str, error);
goto_if_nok (error, leave);
@@ -500,6 +534,10 @@ invoke_resolve_method (MonoMethod *resolve_method, MonoAssemblyLoadContext *alc,
result = MONO_HANDLE_GETVAL (assm, assembly);
leave:
+ in_progress = (GSList *)mono_native_tls_get_value (alc_resolve_in_progress_tls_id);
+ in_progress = g_slist_remove (in_progress, resolve_key);
+ mono_native_tls_set_value (alc_resolve_in_progress_tls_id, in_progress);
+ g_free (resolve_key);
g_free (aname_str);
HANDLE_FUNCTION_RETURN_VAL (result);
}
diff --git a/src/mono/mono/mini/CMakeLists.txt b/src/mono/mono/mini/CMakeLists.txt
index 23b8d15bf708f1..33623aae258757 100644
--- a/src/mono/mono/mini/CMakeLists.txt
+++ b/src/mono/mono/mini/CMakeLists.txt
@@ -476,8 +476,8 @@ if(HOST_BROWSER)
add_library(mono-wasm-eh-wasm STATIC llvm-runtime.cpp)
target_link_libraries (mono-wasm-eh-wasm PRIVATE monoapi eglib_api)
- set_target_properties(mono-wasm-eh-wasm PROPERTIES COMPILE_FLAGS "-fwasm-exceptions")
- set_target_properties(mono-wasm-eh-wasm PROPERTIES LINK_FLAGS "-fwasm-exceptions")
+ set_target_properties(mono-wasm-eh-wasm PROPERTIES COMPILE_FLAGS "-fwasm-exceptions -sWASM_LEGACY_EXCEPTIONS=0")
+ set_target_properties(mono-wasm-eh-wasm PROPERTIES LINK_FLAGS "-fwasm-exceptions -sWASM_LEGACY_EXCEPTIONS=0")
install(TARGETS mono-wasm-eh-wasm LIBRARY)
endif()
diff --git a/src/mono/mono/mini/aot-compiler.c b/src/mono/mono/mini/aot-compiler.c
index 8e9cdc6120f4bd..465062d04c7f9d 100644
--- a/src/mono/mono/mini/aot-compiler.c
+++ b/src/mono/mono/mini/aot-compiler.c
@@ -4545,7 +4545,7 @@ get_runtime_invoke (MonoAotCompile *acfg, MonoMethod *method, gboolean virtual_)
}
static gboolean
-can_marshal_struct (MonoClass *klass)
+can_marshal_struct_internal (MonoClass *klass, int depth)
{
MonoClassField *field;
gboolean can_marshal = TRUE;
@@ -4555,6 +4555,15 @@ can_marshal_struct (MonoClass *klass)
if (mono_class_is_auto_layout (klass))
return FALSE;
+ /*
+ * Guard against runaway recursion for self-referential or cyclic layout types: a
+ * reference-class field can point back to its declaring class, directly or indirectly.
+ * Such a type cannot be marshalled as a flat struct anyway, so treat it as
+ * non-marshalable instead of overflowing the stack.
+ */
+ if (depth > 32)
+ return FALSE;
+
info = mono_marshal_load_type_info (klass);
/* Only allow a few field types to avoid asserts in the marshalling code */
@@ -4581,7 +4590,17 @@ can_marshal_struct (MonoClass *klass)
case MONO_TYPE_STRING:
break;
case MONO_TYPE_VALUETYPE:
- if (!m_class_is_enumtype (mono_class_from_mono_type_internal (field->type)) && !can_marshal_struct (mono_class_from_mono_type_internal (field->type)))
+ if (!m_class_is_enumtype (mono_class_from_mono_type_internal (field->type)) && !can_marshal_struct_internal (mono_class_from_mono_type_internal (field->type), depth + 1))
+ can_marshal = FALSE;
+ break;
+ case MONO_TYPE_CLASS:
+ /*
+ * A field whose type is a non-auto-layout (sequential/explicit) class is marshalled
+ * as an embedded struct, the same way the runtime marshalling code handles it. Allow it
+ * if the nested class is itself marshalable; otherwise the StructureToPtr/PtrToStructure
+ * wrappers are not AOT compiled and full-AOT fails with a JIT-in-aot-only error.
+ */
+ if (!can_marshal_struct_internal (mono_class_from_mono_type_internal (field->type), depth + 1))
can_marshal = FALSE;
break;
case MONO_TYPE_SZARRAY: {
@@ -4611,6 +4630,12 @@ can_marshal_struct (MonoClass *klass)
return can_marshal;
}
+static gboolean
+can_marshal_struct (MonoClass *klass)
+{
+ return can_marshal_struct_internal (klass, 0);
+}
+
/* Create a ref shared instantiation */
static void
create_ref_shared_inst (MonoAotCompile *acfg, MonoMethod *method, MonoGenericContext *ctx)
diff --git a/src/mono/mono/mini/iltests.il b/src/mono/mono/mini/iltests.il
index 12e7a845589c54..b96973d9c00adb 100644
--- a/src/mono/mono/mini/iltests.il
+++ b/src/mono/mono/mini/iltests.il
@@ -743,9 +743,6 @@ COND: ldloc.0
}
.method public static int32 test_5_jmp () cil managed {
- // Some platforms might not be able to AOT tail calls
- .custom instance void class [TestDriver]CategoryAttribute::'.ctor'(string) = (01 00 08 21 46 55 4C 4C 41 4F 54 00 00 ) // ...!FULLAOT..
-
ldc.i4.1
ldc.i4.2
call int32 Tests::jmp2 (int32, int32)
diff --git a/src/mono/mono/mini/method-to-ir.c b/src/mono/mono/mini/method-to-ir.c
index f4e661edd4eea2..757ac0aff21f1d 100644
--- a/src/mono/mono/mini/method-to-ir.c
+++ b/src/mono/mono/mini/method-to-ir.c
@@ -7493,13 +7493,22 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
fsig = mono_method_signature_internal (cmethod);
int nargs = fsig->param_count + fsig->hasthis;
- if (cfg->llvm_only) {
+ if (cfg->llvm_only || cfg->compile_aot) {
MonoInst **args;
+ /*
+ * A real tailcall (OP_TAILCALL) disables AOT for the method (see DISABLE_AOT
+ * below), which under aot-only/full-AOT leaves the method out of the image and
+ * crashes at runtime. For AOT (and llvm_only) emit the jmp as a normal call
+ * followed by a return instead. This preserves the jmp semantics that matter
+ * here (transfer to the target with the current arguments and return its
+ * result), but it is not a true tailcall: it adds a stack frame, so observable
+ * details such as stack traces can differ. Keep the real tailcall for the JIT.
+ */
args = (MonoInst **)mono_mempool_alloc (cfg->mempool, sizeof (MonoInst*) * nargs);
for (int i = 0; i < nargs; ++i)
EMIT_NEW_ARGLOAD (cfg, args [i], i);
- ins = mini_emit_method_call_full (cfg, cmethod, fsig, TRUE, args, NULL, NULL, NULL);
+ ins = mini_emit_method_call_full (cfg, cmethod, fsig, cfg->llvm_only, args, NULL, NULL, NULL);
/*
* The code in mono-basic-block.c treats the rest of the code as dead, but we
* have to emit a normal return since llvm expects it.
@@ -9409,6 +9418,20 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
MonoInst *vtable_arg = NULL;
cmethod = mini_get_method (cfg, method, token, NULL, generic_context);
+ /*
+ * In AOT mode, a type-load failure while resolving the constructor (e.g. an
+ * invalid covariant override on the declaring type) should turn the method
+ * into one that throws TypeLoadException at runtime, matching the JIT
+ * behavior, instead of aborting compilation. Aborting would exclude the
+ * method from the AOT image, and calling it under full-AOT would surface a
+ * confusing 'JIT compile while running in aot-only mode' error instead.
+ */
+ if (cfg->compile_aot && !is_ok (cfg->error) && mono_error_get_error_code (cfg->error) == MONO_ERROR_TYPE_LOAD) {
+ clear_cfg_error (cfg);
+ INLINE_FAILURE ("type load error");
+ method_make_alwaysthrow_typeloadfailure (cfg, cmethod ? cmethod->klass : NULL);
+ goto all_bbs_done;
+ }
CHECK_CFG_ERROR;
fsig = mono_method_get_signature_checked (cmethod, image, token, generic_context, cfg->error);
@@ -9416,8 +9439,20 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
mono_save_token_info (cfg, image, token, cmethod);
- if (mono_class_has_failure (cmethod->klass) || !mono_class_init_internal (cmethod->klass))
- TYPE_LOAD_ERROR (cmethod->klass);
+ if (mono_class_has_failure (cmethod->klass) || !mono_class_init_internal (cmethod->klass)) {
+ if (!cfg->compile_aot)
+ TYPE_LOAD_ERROR (cmethod->klass);
+ /*
+ * In AOT mode, rather than aborting compilation of the whole method
+ * (which would exclude it from the AOT image and make a full-AOT call
+ * site throw a confusing 'JIT compile while running in aot-only mode'
+ * error), turn the method into one that throws the TypeLoadException at
+ * runtime, matching the JIT behavior.
+ */
+ INLINE_FAILURE ("type load error");
+ method_make_alwaysthrow_typeloadfailure (cfg, cmethod->klass);
+ goto all_bbs_done;
+ }
context_used = mini_method_check_context_used (cfg, cmethod);
diff --git a/src/mono/mono/mini/mini-amd64.c b/src/mono/mono/mini/mini-amd64.c
index cb6002dd87630c..08af9347ccd223 100644
--- a/src/mono/mono/mini/mini-amd64.c
+++ b/src/mono/mono/mini/mini-amd64.c
@@ -708,10 +708,36 @@ add_valuetype (MonoMethodSignature *sig, ArgInfo *ainfo, MonoType *type,
fields = (StructFieldInfo*)fields_array->data;
nfields = fields_array->len;
- for (i = 0; i < nfields; ++i) {
- if ((fields [i].offset < 8) && (fields [i].offset + fields [i].size) > 8) {
+ {
+ gboolean has_straddling_field = FALSE;
+ gboolean has_float_field = FALSE;
+ for (i = 0; i < nfields; ++i) {
+ MonoType *ftype = mini_get_underlying_type (fields [i].type);
+ if (ftype->type == MONO_TYPE_R4 || ftype->type == MONO_TYPE_R8)
+ has_float_field = TRUE;
+ if ((fields [i].offset < 8) && (fields [i].offset + fields [i].size) > 8)
+ has_straddling_field = TRUE;
+ }
+ if (has_straddling_field) {
pass_on_stack = TRUE;
- break;
+ /*
+ * A <=16 byte all-integer vtype only ends up on the stack here because a field crosses
+ * the 8-byte eightbyte boundary, which the (non-LLVM) JIT cannot place in a register
+ * pair. The LLVM backend has no such restriction, so record that it may pass the value
+ * in two integer registers. This keeps the calling convention identical to a
+ * fully-flattened instantiation of the same layout, which matters for gshared /
+ * partially-shared generic code: a partially-shared caller sees the value type as an
+ * opaque type parameter (one straddling field) while the concrete callee sees the
+ * flattened layout. Without this they disagree on the calling convention, and recent
+ * LLVM lowers the byval form onto the stack while the callee reads it from registers.
+ *
+ * This only applies to managed calls. For P/Invoke the calling convention must follow
+ * the native ABI as implemented by the byval/stack path, so leave llvm_inreg_straddle
+ * unset for pinvoke signatures (the value keeps the ArgOnStack -> LLVMArgVtypeByVal
+ * lowering it had before this change).
+ */
+ if (!is_return && size <= 16 && !has_float_field && !sig->pinvoke)
+ ainfo->llvm_inreg_straddle = 1;
}
}
@@ -2428,10 +2454,20 @@ mono_arch_get_llvm_call_info (MonoCompile *cfg, MonoMethodSignature *sig)
linfo->args [i].storage = LLVMArgNormal;
break;
case ArgOnStack:
- if (MONO_TYPE_ISSTRUCT (t))
- linfo->args [i].storage = LLVMArgVtypeByVal;
- else
+ if (MONO_TYPE_ISSTRUCT (t)) {
+ if (ainfo->llvm_inreg_straddle) {
+ /* See add_valuetype (): pass the straddling vtype in two integer registers
+ * rather than as a byval struct, so the calling convention matches a
+ * fully-flattened instantiation of the same layout. */
+ linfo->args [i].storage = LLVMArgVtypeInReg;
+ linfo->args [i].pair_storage [0] = LLVMArgInIReg;
+ linfo->args [i].pair_storage [1] = (ainfo->arg_size > 8) ? LLVMArgInIReg : LLVMArgNone;
+ } else {
+ linfo->args [i].storage = LLVMArgVtypeByVal;
+ }
+ } else {
linfo->args [i].storage = LLVMArgNormal;
+ }
break;
case ArgValuetypeInReg:
if (sig->pinvoke &&
diff --git a/src/mono/mono/mini/mini-amd64.h b/src/mono/mono/mini/mini-amd64.h
index ea7a06c4c66068..6fa93823028443 100644
--- a/src/mono/mono/mini/mini-amd64.h
+++ b/src/mono/mono/mini/mini-amd64.h
@@ -345,6 +345,11 @@ typedef struct {
int byte_arg_size;
guint8 pass_empty_struct : 1; // Set in scenarios when empty structs needs to be represented as argument.
guint8 is_signed : 1;
+ // Set for a <=16 byte all-integer vtype that is passed on the stack (storage == ArgOnStack)
+ // only because a field straddles the 8-byte eightbyte boundary, which the JIT cannot place in
+ // a register pair. The LLVM backend has no such limitation, so get_llvm_call_info () passes it
+ // in two integer registers instead. See add_valuetype ().
+ guint8 llvm_inreg_straddle : 1;
} ArgInfo;
struct CallInfo {
diff --git a/src/mono/mono/mini/mini-exceptions.c b/src/mono/mono/mini/mini-exceptions.c
index c795fd2adc5d55..32ff572eb30dae 100644
--- a/src/mono/mono/mini/mini-exceptions.c
+++ b/src/mono/mono/mini/mini-exceptions.c
@@ -2498,8 +2498,16 @@ mono_handle_exception_internal (MonoContext *ctx, MonoObject *obj, gboolean resu
* methods, then execute the clause and the rest of the method
* using the interpreter.
*/
- g_assert (!jit_tls->resume_state.ex_gchandle);
- jit_tls->resume_state.ex_gchandle = mono_gchandle_new_internal ((MonoObject*)obj, TRUE);
+ /*
+ * resume_state.ex_gchandle is shared with the finally-resume path
+ * (mono_handle_exception_internal above). If a finally handler threw a
+ * superseding exception that is now being caught here, that path left a
+ * handle behind that will never be resumed; free it instead of
+ * asserting, mirroring the finally path.
+ */
+ if (jit_tls->resume_state.ex_gchandle)
+ mono_gchandle_free_internal (jit_tls->resume_state.ex_gchandle);
+ jit_tls->resume_state.ex_gchandle = mono_gchandle_new_internal ((MonoObject*)obj, FALSE);
jit_tls->resume_state.ji = ji;
jit_tls->resume_state.clause_index = i;
jit_tls->resume_state.il_state = frame.il_state;
@@ -2560,7 +2568,16 @@ mono_handle_exception_internal (MonoContext *ctx, MonoObject *obj, gboolean resu
* mono_resume_unwind () will call us again to continue
* the unwinding.
*/
- jit_tls->resume_state.ex_obj = obj;
+ /*
+ * Keep the exception object alive across the (managed) finally
+ * handler using a GC handle. The handler can reach a GC
+ * safepoint, and a moving GC would otherwise collect the exception
+ * (or invalidate a raw pointer stored here); the handle keeps it
+ * alive and tracks relocation (see mono_resume_unwind ()).
+ */
+ if (jit_tls->resume_state.ex_gchandle)
+ mono_gchandle_free_internal (jit_tls->resume_state.ex_gchandle);
+ jit_tls->resume_state.ex_gchandle = mono_gchandle_new_internal (obj, FALSE);
jit_tls->resume_state.ji = ji;
jit_tls->resume_state.clause_index = i + 1;
jit_tls->resume_state.ctx = *ctx;
@@ -3095,7 +3112,23 @@ mono_resume_unwind (MonoContext *ctx)
MONO_CONTEXT_SET_SP (ctx, MONO_CONTEXT_GET_SP (&jit_tls->resume_state.ctx));
new_ctx = *ctx;
- mono_handle_exception_internal (&new_ctx, (MonoObject *)jit_tls->resume_state.ex_obj, TRUE, NULL);
+ /*
+ * Copy the GC handle to a local and clear resume_state.ex_gchandle *before* calling
+ * mono_handle_exception_internal (). That call runs the managed catch/finally search,
+ * which can trigger a GC or a nested LLVM finally resume that installs its own
+ * ex_gchandle. Keeping the handle alive across the call (and freeing it only afterwards)
+ * ensures ex_obj stays rooted, and clearing the field first avoids accidentally freeing a
+ * newly-installed handle from a nested resume.
+ */
+ MonoGCHandle ex_gchandle = jit_tls->resume_state.ex_gchandle;
+ jit_tls->resume_state.ex_gchandle = NULL;
+
+ MonoObject *ex_obj = ex_gchandle ? mono_gchandle_get_target_internal (ex_gchandle) : NULL;
+
+ mono_handle_exception_internal (&new_ctx, ex_obj, TRUE, NULL);
+
+ if (ex_gchandle)
+ mono_gchandle_free_internal (ex_gchandle);
mono_restore_context (&new_ctx);
}
diff --git a/src/mono/mono/mini/mini-llvm.c b/src/mono/mono/mini/mini-llvm.c
index 9e33b23de7c1c4..324aca3ed4eda2 100644
--- a/src/mono/mono/mini/mini-llvm.c
+++ b/src/mono/mono/mini/mini-llvm.c
@@ -1374,8 +1374,6 @@ resolve_patch (MonoCompile *cfg, MonoJumpInfoType type, gconstpointer target)
return res;
}
-static LLVMValueRef emit_fpnarrow (EmitContext *ctx, LLVMValueRef v, LLVMTypeRef dtype);
-
/*
* convert_full:
*
@@ -1413,23 +1411,6 @@ convert_full (EmitContext *ctx, LLVMValueRef v, LLVMTypeRef dtype, gboolean is_u
if (stype == LLVMDoubleType () && dtype == LLVMFloatType ())
return LLVMBuildFPTrunc (ctx->builder, v, dtype, "");
- /*
- * Narrowing a float/double to half (IEEE binary16) must preserve NaN. Route it
- * through emit_fpnarrow, which detects a NaN input explicitly and selects a
- * canonical quiet NaN, so a target that drops the NaN mantissa during the
- * fptrunc (yielding +/-Infinity) cannot turn a NaN into an infinity. Handles
- * both scalar and vector half destinations. Mono itself does not emit half
- * typed IR today, but keep the central converter correct and NaN-safe instead
- * of hitting g_assert_not_reached () below.
- */
- if (dtype == LLVMHalfType () && (stype == LLVMFloatType () || stype == LLVMDoubleType ()))
- return emit_fpnarrow (ctx, v, dtype);
- if (LLVMGetTypeKind (stype) == LLVMVectorTypeKind && LLVMGetTypeKind (dtype) == LLVMVectorTypeKind &&
- LLVMGetVectorSize (stype) == LLVMGetVectorSize (dtype) &&
- LLVMGetElementType (dtype) == LLVMHalfType () &&
- (LLVMGetElementType (stype) == LLVMFloatType () || LLVMGetElementType (stype) == LLVMDoubleType ()))
- return emit_fpnarrow (ctx, v, dtype);
-
#ifdef USE_OPAQUE_POINTERS
if (LLVMGetTypeKind (stype) == LLVMPointerTypeKind && LLVMGetTypeKind (dtype) == LLVMPointerTypeKind)
return v;
@@ -1470,75 +1451,6 @@ convert (EmitContext *ctx, LLVMValueRef v, LLVMTypeRef dtype)
return convert_full (ctx, v, dtype, FALSE);
}
-/*
- * quiet_nan_for_fptype:
- *
- * Return a constant quiet NaN matching the floating point type T. T can be a
- * scalar (half/float/double) or a vector of those.
- */
-#if LLVM_API_VERSION >= 2300
-static LLVMValueRef
-quiet_nan_for_fptype (LLVMTypeRef t)
-{
- LLVMTypeRef elem_t = LLVMGetTypeKind (t) == LLVMVectorTypeKind ? LLVMGetElementType (t) : t;
- guint64 bits;
- LLVMTypeRef int_t;
-
- switch (LLVMGetTypeKind (elem_t)) {
- case LLVMHalfTypeKind:
- bits = 0x7e00; /* IEEE binary16 quiet NaN */
- int_t = LLVMInt16Type ();
- break;
- case LLVMFloatTypeKind:
- bits = 0x7fc00000; /* IEEE binary32 quiet NaN */
- int_t = LLVMInt32Type ();
- break;
- default:
- bits = 0x7ff8000000000000ULL; /* IEEE binary64 quiet NaN */
- int_t = LLVMInt64Type ();
- break;
- }
-
- LLVMValueRef nan = LLVMConstBitCast (LLVMConstInt (int_t, bits, FALSE), elem_t);
- if (LLVMGetTypeKind (t) == LLVMVectorTypeKind) {
- unsigned int n = LLVMGetVectorSize (t);
- LLVMValueRef elems [MAX_VECTOR_ELEMS];
- g_assert (n <= MAX_VECTOR_ELEMS);
- for (unsigned int i = 0; i < n; ++i)
- elems [i] = nan;
- nan = LLVMConstVector (elems, n);
- }
- return nan;
-}
-#endif
-
-/*
- * emit_fpnarrow:
- *
- * Emit a floating point narrowing conversion (fptrunc) of V to DTYPE which is
- * guaranteed to preserve NaN.
- *
- * Background: the branchless software float->Half (IEEE binary16) conversion used
- * by System.Half is, starting with LLVM 23, recognized by the optimizer and may be
- * lowered to a hardware narrowing 'fptrunc to '. On some targets
- * (e.g. arm64) that narrowing drops the NaN mantissa, leaving an all-ones exponent
- * with a zero mantissa, i.e. +/-Infinity. The result is that operations which must
- * produce or propagate NaN end up yielding +/-inf. To stay robust against the
- * toolchain mis-handling NaN during FP narrowing, detect NaN inputs explicitly and
- * select a canonical quiet NaN of the destination type.
- */
-static LLVMValueRef
-emit_fpnarrow (EmitContext *ctx, LLVMValueRef v, LLVMTypeRef dtype)
-{
- LLVMValueRef trunc = LLVMBuildFPTrunc (ctx->builder, v, dtype, "");
-#if LLVM_API_VERSION >= 2300
- /* 'uno' (unordered) is true iff V is NaN, since a NaN is unordered with itself. */
- LLVMValueRef is_nan = LLVMBuildFCmp (ctx->builder, LLVMRealUNO, v, v, "");
- trunc = LLVMBuildSelect (ctx->builder, is_nan, quiet_nan_for_fptype (dtype), trunc, "");
-#endif
- return trunc;
-}
-
static void
emit_memset (EmitContext *ctx, LLVMValueRef dest, LLVMValueRef val, LLVMValueRef size, int alignment)
{
@@ -7120,7 +7032,7 @@ MONO_RESTORE_WARNING
values [ins->dreg] = LLVMBuildSIToFP (builder, lhs, LLVMFloatType (), "");
break;
case OP_FCONV_TO_R4:
- values [ins->dreg] = emit_fpnarrow (ctx, lhs, LLVMFloatType ());
+ values [ins->dreg] = LLVMBuildFPTrunc (builder, lhs, LLVMFloatType (), "");
break;
case OP_RCONV_TO_R8:
values [ins->dreg] = LLVMBuildFPExt (builder, lhs, LLVMDoubleType (), dname);
diff --git a/src/mono/mono/mini/mini-runtime.h b/src/mono/mono/mini/mini-runtime.h
index 9ca4d1dbf59aa2..487a5295648ccd 100644
--- a/src/mono/mono/mini/mini-runtime.h
+++ b/src/mono/mono/mini/mini-runtime.h
@@ -131,8 +131,6 @@ typedef struct {
MonoJitInfo *ji;
int clause_index;
MonoContext ctx, new_ctx;
- /* FIXME: GC */
- gpointer ex_obj;
MonoLMF *lmf;
int first_filter_idx, filter_idx;
/* MonoMethodILState */
diff --git a/src/mono/mono/offsets/aarch64-apple-darwin10.h b/src/mono/mono/offsets/aarch64-apple-darwin10.h
index be48c3a4df13c9..b84e2149318a8b 100644
--- a/src/mono/mono/offsets/aarch64-apple-darwin10.h
+++ b/src/mono/mono/offsets/aarch64-apple-darwin10.h
@@ -240,7 +240,7 @@ DECL_OFFSET2(MonoMethodRuntimeGenericContext,method,8)
DECL_OFFSET2(MonoMethodRuntimeGenericContext,method_inst,16)
DECL_OFFSET2(MonoMethodRuntimeGenericContext,entries,24)
DECL_OFFSET2(MonoMethodRuntimeGenericContext,infos,32)
-DECL_SIZE2(MonoJitTlsData,4160)
+DECL_SIZE2(MonoJitTlsData,4152)
DECL_OFFSET2(MonoJitTlsData,end_of_stack,0)
DECL_OFFSET2(MonoJitTlsData,stack_size,8)
DECL_OFFSET2(MonoJitTlsData,lmf,16)
@@ -254,16 +254,16 @@ DECL_OFFSET2(MonoJitTlsData,class_cast_from,80)
DECL_OFFSET2(MonoJitTlsData,class_cast_to,88)
DECL_OFFSET2(MonoJitTlsData,ex_ctx,96)
DECL_OFFSET2(MonoJitTlsData,resume_state,880)
-DECL_OFFSET2(MonoJitTlsData,handler_block,2512)
-DECL_OFFSET2(MonoJitTlsData,handler_block_context,2528)
-DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx,3312)
-DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx_set,4096)
-DECL_OFFSET2(MonoJitTlsData,thrown_exc,4104)
-DECL_OFFSET2(MonoJitTlsData,thrown_non_exc,4112)
-DECL_OFFSET2(MonoJitTlsData,calling_image,4120)
-DECL_OFFSET2(MonoJitTlsData,abort_exc_stack_threshold,4128)
-DECL_OFFSET2(MonoJitTlsData,active_jit_methods,4136)
-DECL_OFFSET2(MonoJitTlsData,interp_context,4144)
+DECL_OFFSET2(MonoJitTlsData,handler_block,2504)
+DECL_OFFSET2(MonoJitTlsData,handler_block_context,2520)
+DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx,3304)
+DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx_set,4088)
+DECL_OFFSET2(MonoJitTlsData,thrown_exc,4096)
+DECL_OFFSET2(MonoJitTlsData,thrown_non_exc,4104)
+DECL_OFFSET2(MonoJitTlsData,calling_image,4112)
+DECL_OFFSET2(MonoJitTlsData,abort_exc_stack_threshold,4120)
+DECL_OFFSET2(MonoJitTlsData,active_jit_methods,4128)
+DECL_OFFSET2(MonoJitTlsData,interp_context,4136)
DECL_SIZE2(MonoGSharedVtMethodRuntimeInfo,8)
DECL_OFFSET2(MonoGSharedVtMethodRuntimeInfo,locals_size,0)
DECL_OFFSET2(MonoGSharedVtMethodRuntimeInfo,entries,8)
diff --git a/src/mono/mono/offsets/aarch64-apple-maccatalyst.h b/src/mono/mono/offsets/aarch64-apple-maccatalyst.h
index 287077fa12f0df..941b4879df71da 100644
--- a/src/mono/mono/offsets/aarch64-apple-maccatalyst.h
+++ b/src/mono/mono/offsets/aarch64-apple-maccatalyst.h
@@ -240,7 +240,7 @@ DECL_OFFSET2(MonoMethodRuntimeGenericContext,method,8)
DECL_OFFSET2(MonoMethodRuntimeGenericContext,method_inst,16)
DECL_OFFSET2(MonoMethodRuntimeGenericContext,entries,24)
DECL_OFFSET2(MonoMethodRuntimeGenericContext,infos,32)
-DECL_SIZE2(MonoJitTlsData,4160)
+DECL_SIZE2(MonoJitTlsData,4152)
DECL_OFFSET2(MonoJitTlsData,end_of_stack,0)
DECL_OFFSET2(MonoJitTlsData,stack_size,8)
DECL_OFFSET2(MonoJitTlsData,lmf,16)
@@ -254,16 +254,16 @@ DECL_OFFSET2(MonoJitTlsData,class_cast_from,80)
DECL_OFFSET2(MonoJitTlsData,class_cast_to,88)
DECL_OFFSET2(MonoJitTlsData,ex_ctx,96)
DECL_OFFSET2(MonoJitTlsData,resume_state,880)
-DECL_OFFSET2(MonoJitTlsData,handler_block,2512)
-DECL_OFFSET2(MonoJitTlsData,handler_block_context,2528)
-DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx,3312)
-DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx_set,4096)
-DECL_OFFSET2(MonoJitTlsData,thrown_exc,4104)
-DECL_OFFSET2(MonoJitTlsData,thrown_non_exc,4112)
-DECL_OFFSET2(MonoJitTlsData,calling_image,4120)
-DECL_OFFSET2(MonoJitTlsData,abort_exc_stack_threshold,4128)
-DECL_OFFSET2(MonoJitTlsData,active_jit_methods,4136)
-DECL_OFFSET2(MonoJitTlsData,interp_context,4144)
+DECL_OFFSET2(MonoJitTlsData,handler_block,2504)
+DECL_OFFSET2(MonoJitTlsData,handler_block_context,2520)
+DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx,3304)
+DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx_set,4088)
+DECL_OFFSET2(MonoJitTlsData,thrown_exc,4096)
+DECL_OFFSET2(MonoJitTlsData,thrown_non_exc,4104)
+DECL_OFFSET2(MonoJitTlsData,calling_image,4112)
+DECL_OFFSET2(MonoJitTlsData,abort_exc_stack_threshold,4120)
+DECL_OFFSET2(MonoJitTlsData,active_jit_methods,4128)
+DECL_OFFSET2(MonoJitTlsData,interp_context,4136)
DECL_SIZE2(MonoGSharedVtMethodRuntimeInfo,8)
DECL_OFFSET2(MonoGSharedVtMethodRuntimeInfo,locals_size,0)
DECL_OFFSET2(MonoGSharedVtMethodRuntimeInfo,entries,8)
diff --git a/src/mono/mono/offsets/aarch64-v8a-linux-android.h b/src/mono/mono/offsets/aarch64-v8a-linux-android.h
index 11f5553434c891..581c061e243d9e 100644
--- a/src/mono/mono/offsets/aarch64-v8a-linux-android.h
+++ b/src/mono/mono/offsets/aarch64-v8a-linux-android.h
@@ -240,7 +240,7 @@ DECL_OFFSET2(MonoMethodRuntimeGenericContext,method,8)
DECL_OFFSET2(MonoMethodRuntimeGenericContext,method_inst,16)
DECL_OFFSET2(MonoMethodRuntimeGenericContext,entries,24)
DECL_OFFSET2(MonoMethodRuntimeGenericContext,infos,32)
-DECL_SIZE2(MonoJitTlsData,4160)
+DECL_SIZE2(MonoJitTlsData,4152)
DECL_OFFSET2(MonoJitTlsData,end_of_stack,0)
DECL_OFFSET2(MonoJitTlsData,stack_size,8)
DECL_OFFSET2(MonoJitTlsData,lmf,16)
@@ -254,16 +254,16 @@ DECL_OFFSET2(MonoJitTlsData,class_cast_from,80)
DECL_OFFSET2(MonoJitTlsData,class_cast_to,88)
DECL_OFFSET2(MonoJitTlsData,ex_ctx,96)
DECL_OFFSET2(MonoJitTlsData,resume_state,880)
-DECL_OFFSET2(MonoJitTlsData,handler_block,2512)
-DECL_OFFSET2(MonoJitTlsData,handler_block_context,2528)
-DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx,3312)
-DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx_set,4096)
-DECL_OFFSET2(MonoJitTlsData,thrown_exc,4104)
-DECL_OFFSET2(MonoJitTlsData,thrown_non_exc,4112)
-DECL_OFFSET2(MonoJitTlsData,calling_image,4120)
-DECL_OFFSET2(MonoJitTlsData,abort_exc_stack_threshold,4128)
-DECL_OFFSET2(MonoJitTlsData,active_jit_methods,4136)
-DECL_OFFSET2(MonoJitTlsData,interp_context,4144)
+DECL_OFFSET2(MonoJitTlsData,handler_block,2504)
+DECL_OFFSET2(MonoJitTlsData,handler_block_context,2520)
+DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx,3304)
+DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx_set,4088)
+DECL_OFFSET2(MonoJitTlsData,thrown_exc,4096)
+DECL_OFFSET2(MonoJitTlsData,thrown_non_exc,4104)
+DECL_OFFSET2(MonoJitTlsData,calling_image,4112)
+DECL_OFFSET2(MonoJitTlsData,abort_exc_stack_threshold,4120)
+DECL_OFFSET2(MonoJitTlsData,active_jit_methods,4128)
+DECL_OFFSET2(MonoJitTlsData,interp_context,4136)
DECL_SIZE2(MonoGSharedVtMethodRuntimeInfo,8)
DECL_OFFSET2(MonoGSharedVtMethodRuntimeInfo,locals_size,0)
DECL_OFFSET2(MonoGSharedVtMethodRuntimeInfo,entries,8)
diff --git a/src/mono/mono/offsets/armv7-none-linux-androideabi.h b/src/mono/mono/offsets/armv7-none-linux-androideabi.h
index 54b7496e94885e..71c27cd5e65c2f 100644
--- a/src/mono/mono/offsets/armv7-none-linux-androideabi.h
+++ b/src/mono/mono/offsets/armv7-none-linux-androideabi.h
@@ -244,7 +244,7 @@ DECL_OFFSET2(MonoMethodRuntimeGenericContext,method,4)
DECL_OFFSET2(MonoMethodRuntimeGenericContext,method_inst,8)
DECL_OFFSET2(MonoMethodRuntimeGenericContext,entries,12)
DECL_OFFSET2(MonoMethodRuntimeGenericContext,infos,16)
-DECL_SIZE2(MonoJitTlsData,1168)
+DECL_SIZE2(MonoJitTlsData,1164)
DECL_OFFSET2(MonoJitTlsData,end_of_stack,0)
DECL_OFFSET2(MonoJitTlsData,stack_size,4)
DECL_OFFSET2(MonoJitTlsData,lmf,8)
@@ -258,16 +258,16 @@ DECL_OFFSET2(MonoJitTlsData,class_cast_from,44)
DECL_OFFSET2(MonoJitTlsData,class_cast_to,48)
DECL_OFFSET2(MonoJitTlsData,ex_ctx,56)
DECL_OFFSET2(MonoJitTlsData,resume_state,264)
-DECL_OFFSET2(MonoJitTlsData,handler_block,712)
-DECL_OFFSET2(MonoJitTlsData,handler_block_context,720)
-DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx,928)
-DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx_set,1136)
-DECL_OFFSET2(MonoJitTlsData,thrown_exc,1140)
-DECL_OFFSET2(MonoJitTlsData,thrown_non_exc,1144)
-DECL_OFFSET2(MonoJitTlsData,calling_image,1148)
-DECL_OFFSET2(MonoJitTlsData,abort_exc_stack_threshold,1152)
-DECL_OFFSET2(MonoJitTlsData,active_jit_methods,1156)
-DECL_OFFSET2(MonoJitTlsData,interp_context,1160)
+DECL_OFFSET2(MonoJitTlsData,handler_block,708)
+DECL_OFFSET2(MonoJitTlsData,handler_block_context,716)
+DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx,924)
+DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx_set,1132)
+DECL_OFFSET2(MonoJitTlsData,thrown_exc,1136)
+DECL_OFFSET2(MonoJitTlsData,thrown_non_exc,1140)
+DECL_OFFSET2(MonoJitTlsData,calling_image,1144)
+DECL_OFFSET2(MonoJitTlsData,abort_exc_stack_threshold,1148)
+DECL_OFFSET2(MonoJitTlsData,active_jit_methods,1152)
+DECL_OFFSET2(MonoJitTlsData,interp_context,1156)
DECL_SIZE2(MonoGSharedVtMethodRuntimeInfo,4)
DECL_OFFSET2(MonoGSharedVtMethodRuntimeInfo,locals_size,0)
DECL_OFFSET2(MonoGSharedVtMethodRuntimeInfo,entries,4)
diff --git a/src/mono/mono/offsets/i686-none-linux-android.h b/src/mono/mono/offsets/i686-none-linux-android.h
index cc36503f7561f3..d991571cc0812d 100644
--- a/src/mono/mono/offsets/i686-none-linux-android.h
+++ b/src/mono/mono/offsets/i686-none-linux-android.h
@@ -245,7 +245,7 @@ DECL_OFFSET2(MonoMethodRuntimeGenericContext,method,4)
DECL_OFFSET2(MonoMethodRuntimeGenericContext,method_inst,8)
DECL_OFFSET2(MonoMethodRuntimeGenericContext,entries,12)
DECL_OFFSET2(MonoMethodRuntimeGenericContext,infos,16)
-DECL_SIZE2(MonoJitTlsData,296)
+DECL_SIZE2(MonoJitTlsData,292)
DECL_OFFSET2(MonoJitTlsData,end_of_stack,0)
DECL_OFFSET2(MonoJitTlsData,stack_size,4)
DECL_OFFSET2(MonoJitTlsData,lmf,8)
@@ -259,16 +259,16 @@ DECL_OFFSET2(MonoJitTlsData,class_cast_from,44)
DECL_OFFSET2(MonoJitTlsData,class_cast_to,48)
DECL_OFFSET2(MonoJitTlsData,ex_ctx,52)
DECL_OFFSET2(MonoJitTlsData,resume_state,88)
-DECL_OFFSET2(MonoJitTlsData,handler_block,192)
-DECL_OFFSET2(MonoJitTlsData,handler_block_context,196)
-DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx,232)
-DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx_set,268)
-DECL_OFFSET2(MonoJitTlsData,thrown_exc,272)
-DECL_OFFSET2(MonoJitTlsData,thrown_non_exc,276)
-DECL_OFFSET2(MonoJitTlsData,calling_image,280)
-DECL_OFFSET2(MonoJitTlsData,abort_exc_stack_threshold,284)
-DECL_OFFSET2(MonoJitTlsData,active_jit_methods,288)
-DECL_OFFSET2(MonoJitTlsData,interp_context,292)
+DECL_OFFSET2(MonoJitTlsData,handler_block,188)
+DECL_OFFSET2(MonoJitTlsData,handler_block_context,192)
+DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx,228)
+DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx_set,264)
+DECL_OFFSET2(MonoJitTlsData,thrown_exc,268)
+DECL_OFFSET2(MonoJitTlsData,thrown_non_exc,272)
+DECL_OFFSET2(MonoJitTlsData,calling_image,276)
+DECL_OFFSET2(MonoJitTlsData,abort_exc_stack_threshold,280)
+DECL_OFFSET2(MonoJitTlsData,active_jit_methods,284)
+DECL_OFFSET2(MonoJitTlsData,interp_context,288)
DECL_SIZE2(MonoGSharedVtMethodRuntimeInfo,4)
DECL_OFFSET2(MonoGSharedVtMethodRuntimeInfo,locals_size,0)
DECL_OFFSET2(MonoGSharedVtMethodRuntimeInfo,entries,4)
diff --git a/src/mono/mono/offsets/wasm32-unknown-none.h b/src/mono/mono/offsets/wasm32-unknown-none.h
index 1f3710d5a3cb58..9ea2c56162bb8d 100644
--- a/src/mono/mono/offsets/wasm32-unknown-none.h
+++ b/src/mono/mono/offsets/wasm32-unknown-none.h
@@ -239,7 +239,7 @@ DECL_OFFSET2(MonoMethodRuntimeGenericContext,method,4)
DECL_OFFSET2(MonoMethodRuntimeGenericContext,method_inst,8)
DECL_OFFSET2(MonoMethodRuntimeGenericContext,entries,12)
DECL_OFFSET2(MonoMethodRuntimeGenericContext,infos,16)
-DECL_SIZE2(MonoJitTlsData,216)
+DECL_SIZE2(MonoJitTlsData,212)
DECL_OFFSET2(MonoJitTlsData,end_of_stack,0)
DECL_OFFSET2(MonoJitTlsData,stack_size,4)
DECL_OFFSET2(MonoJitTlsData,lmf,8)
@@ -253,16 +253,16 @@ DECL_OFFSET2(MonoJitTlsData,class_cast_from,44)
DECL_OFFSET2(MonoJitTlsData,class_cast_to,48)
DECL_OFFSET2(MonoJitTlsData,ex_ctx,52)
DECL_OFFSET2(MonoJitTlsData,resume_state,72)
-DECL_OFFSET2(MonoJitTlsData,handler_block,144)
-DECL_OFFSET2(MonoJitTlsData,handler_block_context,148)
-DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx,168)
-DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx_set,188)
-DECL_OFFSET2(MonoJitTlsData,thrown_exc,192)
-DECL_OFFSET2(MonoJitTlsData,thrown_non_exc,196)
-DECL_OFFSET2(MonoJitTlsData,calling_image,200)
-DECL_OFFSET2(MonoJitTlsData,abort_exc_stack_threshold,204)
-DECL_OFFSET2(MonoJitTlsData,active_jit_methods,208)
-DECL_OFFSET2(MonoJitTlsData,interp_context,212)
+DECL_OFFSET2(MonoJitTlsData,handler_block,140)
+DECL_OFFSET2(MonoJitTlsData,handler_block_context,144)
+DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx,164)
+DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx_set,184)
+DECL_OFFSET2(MonoJitTlsData,thrown_exc,188)
+DECL_OFFSET2(MonoJitTlsData,thrown_non_exc,192)
+DECL_OFFSET2(MonoJitTlsData,calling_image,196)
+DECL_OFFSET2(MonoJitTlsData,abort_exc_stack_threshold,200)
+DECL_OFFSET2(MonoJitTlsData,active_jit_methods,204)
+DECL_OFFSET2(MonoJitTlsData,interp_context,208)
DECL_SIZE2(MonoGSharedVtMethodRuntimeInfo,4)
DECL_OFFSET2(MonoGSharedVtMethodRuntimeInfo,locals_size,0)
DECL_OFFSET2(MonoGSharedVtMethodRuntimeInfo,entries,4)
diff --git a/src/mono/mono/offsets/wasm32-unknown-wasip2.h b/src/mono/mono/offsets/wasm32-unknown-wasip2.h
index ba5cba52e72f58..101023d9b7b60c 100644
--- a/src/mono/mono/offsets/wasm32-unknown-wasip2.h
+++ b/src/mono/mono/offsets/wasm32-unknown-wasip2.h
@@ -239,7 +239,7 @@ DECL_OFFSET2(MonoMethodRuntimeGenericContext,method,4)
DECL_OFFSET2(MonoMethodRuntimeGenericContext,method_inst,8)
DECL_OFFSET2(MonoMethodRuntimeGenericContext,entries,12)
DECL_OFFSET2(MonoMethodRuntimeGenericContext,infos,16)
-DECL_SIZE2(MonoJitTlsData,216)
+DECL_SIZE2(MonoJitTlsData,212)
DECL_OFFSET2(MonoJitTlsData,end_of_stack,0)
DECL_OFFSET2(MonoJitTlsData,stack_size,4)
DECL_OFFSET2(MonoJitTlsData,lmf,8)
@@ -253,16 +253,16 @@ DECL_OFFSET2(MonoJitTlsData,class_cast_from,44)
DECL_OFFSET2(MonoJitTlsData,class_cast_to,48)
DECL_OFFSET2(MonoJitTlsData,ex_ctx,52)
DECL_OFFSET2(MonoJitTlsData,resume_state,72)
-DECL_OFFSET2(MonoJitTlsData,handler_block,144)
-DECL_OFFSET2(MonoJitTlsData,handler_block_context,148)
-DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx,168)
-DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx_set,188)
-DECL_OFFSET2(MonoJitTlsData,thrown_exc,192)
-DECL_OFFSET2(MonoJitTlsData,thrown_non_exc,196)
-DECL_OFFSET2(MonoJitTlsData,calling_image,200)
-DECL_OFFSET2(MonoJitTlsData,abort_exc_stack_threshold,204)
-DECL_OFFSET2(MonoJitTlsData,active_jit_methods,208)
-DECL_OFFSET2(MonoJitTlsData,interp_context,212)
+DECL_OFFSET2(MonoJitTlsData,handler_block,140)
+DECL_OFFSET2(MonoJitTlsData,handler_block_context,144)
+DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx,164)
+DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx_set,184)
+DECL_OFFSET2(MonoJitTlsData,thrown_exc,188)
+DECL_OFFSET2(MonoJitTlsData,thrown_non_exc,192)
+DECL_OFFSET2(MonoJitTlsData,calling_image,196)
+DECL_OFFSET2(MonoJitTlsData,abort_exc_stack_threshold,200)
+DECL_OFFSET2(MonoJitTlsData,active_jit_methods,204)
+DECL_OFFSET2(MonoJitTlsData,interp_context,208)
DECL_SIZE2(MonoGSharedVtMethodRuntimeInfo,4)
DECL_OFFSET2(MonoGSharedVtMethodRuntimeInfo,locals_size,0)
DECL_OFFSET2(MonoGSharedVtMethodRuntimeInfo,entries,4)
diff --git a/src/mono/mono/offsets/x86_64-apple-darwin10.h b/src/mono/mono/offsets/x86_64-apple-darwin10.h
index 7739eddddb44cf..3fa58d86031985 100644
--- a/src/mono/mono/offsets/x86_64-apple-darwin10.h
+++ b/src/mono/mono/offsets/x86_64-apple-darwin10.h
@@ -238,7 +238,7 @@ DECL_OFFSET2(MonoMethodRuntimeGenericContext,method,8)
DECL_OFFSET2(MonoMethodRuntimeGenericContext,method_inst,16)
DECL_OFFSET2(MonoMethodRuntimeGenericContext,entries,24)
DECL_OFFSET2(MonoMethodRuntimeGenericContext,infos,32)
-DECL_SIZE2(MonoJitTlsData,2240)
+DECL_SIZE2(MonoJitTlsData,2232)
DECL_OFFSET2(MonoJitTlsData,end_of_stack,0)
DECL_OFFSET2(MonoJitTlsData,stack_size,8)
DECL_OFFSET2(MonoJitTlsData,lmf,16)
@@ -252,16 +252,16 @@ DECL_OFFSET2(MonoJitTlsData,class_cast_from,80)
DECL_OFFSET2(MonoJitTlsData,class_cast_to,88)
DECL_OFFSET2(MonoJitTlsData,ex_ctx,96)
DECL_OFFSET2(MonoJitTlsData,resume_state,496)
-DECL_OFFSET2(MonoJitTlsData,handler_block,1360)
-DECL_OFFSET2(MonoJitTlsData,handler_block_context,1376)
-DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx,1776)
-DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx_set,2176)
-DECL_OFFSET2(MonoJitTlsData,thrown_exc,2184)
-DECL_OFFSET2(MonoJitTlsData,thrown_non_exc,2192)
-DECL_OFFSET2(MonoJitTlsData,calling_image,2200)
-DECL_OFFSET2(MonoJitTlsData,abort_exc_stack_threshold,2208)
-DECL_OFFSET2(MonoJitTlsData,active_jit_methods,2216)
-DECL_OFFSET2(MonoJitTlsData,interp_context,2224)
+DECL_OFFSET2(MonoJitTlsData,handler_block,1352)
+DECL_OFFSET2(MonoJitTlsData,handler_block_context,1368)
+DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx,1768)
+DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx_set,2168)
+DECL_OFFSET2(MonoJitTlsData,thrown_exc,2176)
+DECL_OFFSET2(MonoJitTlsData,thrown_non_exc,2184)
+DECL_OFFSET2(MonoJitTlsData,calling_image,2192)
+DECL_OFFSET2(MonoJitTlsData,abort_exc_stack_threshold,2200)
+DECL_OFFSET2(MonoJitTlsData,active_jit_methods,2208)
+DECL_OFFSET2(MonoJitTlsData,interp_context,2216)
DECL_SIZE2(MonoGSharedVtMethodRuntimeInfo,8)
DECL_OFFSET2(MonoGSharedVtMethodRuntimeInfo,locals_size,0)
DECL_OFFSET2(MonoGSharedVtMethodRuntimeInfo,entries,8)
diff --git a/src/mono/mono/offsets/x86_64-apple-maccatalyst.h b/src/mono/mono/offsets/x86_64-apple-maccatalyst.h
index e830a1f6a5b95f..f2ae8d80a0cb75 100644
--- a/src/mono/mono/offsets/x86_64-apple-maccatalyst.h
+++ b/src/mono/mono/offsets/x86_64-apple-maccatalyst.h
@@ -239,7 +239,7 @@ DECL_OFFSET2(MonoMethodRuntimeGenericContext,method,8)
DECL_OFFSET2(MonoMethodRuntimeGenericContext,method_inst,16)
DECL_OFFSET2(MonoMethodRuntimeGenericContext,entries,24)
DECL_OFFSET2(MonoMethodRuntimeGenericContext,infos,32)
-DECL_SIZE2(MonoJitTlsData,2240)
+DECL_SIZE2(MonoJitTlsData,2232)
DECL_OFFSET2(MonoJitTlsData,end_of_stack,0)
DECL_OFFSET2(MonoJitTlsData,stack_size,8)
DECL_OFFSET2(MonoJitTlsData,lmf,16)
@@ -253,16 +253,16 @@ DECL_OFFSET2(MonoJitTlsData,class_cast_from,80)
DECL_OFFSET2(MonoJitTlsData,class_cast_to,88)
DECL_OFFSET2(MonoJitTlsData,ex_ctx,96)
DECL_OFFSET2(MonoJitTlsData,resume_state,496)
-DECL_OFFSET2(MonoJitTlsData,handler_block,1360)
-DECL_OFFSET2(MonoJitTlsData,handler_block_context,1376)
-DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx,1776)
-DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx_set,2176)
-DECL_OFFSET2(MonoJitTlsData,thrown_exc,2184)
-DECL_OFFSET2(MonoJitTlsData,thrown_non_exc,2192)
-DECL_OFFSET2(MonoJitTlsData,calling_image,2200)
-DECL_OFFSET2(MonoJitTlsData,abort_exc_stack_threshold,2208)
-DECL_OFFSET2(MonoJitTlsData,active_jit_methods,2216)
-DECL_OFFSET2(MonoJitTlsData,interp_context,2224)
+DECL_OFFSET2(MonoJitTlsData,handler_block,1352)
+DECL_OFFSET2(MonoJitTlsData,handler_block_context,1368)
+DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx,1768)
+DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx_set,2168)
+DECL_OFFSET2(MonoJitTlsData,thrown_exc,2176)
+DECL_OFFSET2(MonoJitTlsData,thrown_non_exc,2184)
+DECL_OFFSET2(MonoJitTlsData,calling_image,2192)
+DECL_OFFSET2(MonoJitTlsData,abort_exc_stack_threshold,2200)
+DECL_OFFSET2(MonoJitTlsData,active_jit_methods,2208)
+DECL_OFFSET2(MonoJitTlsData,interp_context,2216)
DECL_SIZE2(MonoGSharedVtMethodRuntimeInfo,8)
DECL_OFFSET2(MonoGSharedVtMethodRuntimeInfo,locals_size,0)
DECL_OFFSET2(MonoGSharedVtMethodRuntimeInfo,entries,8)
diff --git a/src/mono/mono/offsets/x86_64-none-linux-android.h b/src/mono/mono/offsets/x86_64-none-linux-android.h
index 6801adfeb9f673..adba79eb10b1e0 100644
--- a/src/mono/mono/offsets/x86_64-none-linux-android.h
+++ b/src/mono/mono/offsets/x86_64-none-linux-android.h
@@ -239,7 +239,7 @@ DECL_OFFSET2(MonoMethodRuntimeGenericContext,method,8)
DECL_OFFSET2(MonoMethodRuntimeGenericContext,method_inst,16)
DECL_OFFSET2(MonoMethodRuntimeGenericContext,entries,24)
DECL_OFFSET2(MonoMethodRuntimeGenericContext,infos,32)
-DECL_SIZE2(MonoJitTlsData,2176)
+DECL_SIZE2(MonoJitTlsData,2168)
DECL_OFFSET2(MonoJitTlsData,end_of_stack,0)
DECL_OFFSET2(MonoJitTlsData,stack_size,8)
DECL_OFFSET2(MonoJitTlsData,lmf,16)
@@ -253,16 +253,16 @@ DECL_OFFSET2(MonoJitTlsData,class_cast_from,80)
DECL_OFFSET2(MonoJitTlsData,class_cast_to,88)
DECL_OFFSET2(MonoJitTlsData,ex_ctx,96)
DECL_OFFSET2(MonoJitTlsData,resume_state,488)
-DECL_OFFSET2(MonoJitTlsData,handler_block,1328)
-DECL_OFFSET2(MonoJitTlsData,handler_block_context,1336)
-DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx,1728)
-DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx_set,2120)
-DECL_OFFSET2(MonoJitTlsData,thrown_exc,2128)
-DECL_OFFSET2(MonoJitTlsData,thrown_non_exc,2136)
-DECL_OFFSET2(MonoJitTlsData,calling_image,2144)
-DECL_OFFSET2(MonoJitTlsData,abort_exc_stack_threshold,2152)
-DECL_OFFSET2(MonoJitTlsData,active_jit_methods,2160)
-DECL_OFFSET2(MonoJitTlsData,interp_context,2168)
+DECL_OFFSET2(MonoJitTlsData,handler_block,1320)
+DECL_OFFSET2(MonoJitTlsData,handler_block_context,1328)
+DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx,1720)
+DECL_OFFSET2(MonoJitTlsData,orig_ex_ctx_set,2112)
+DECL_OFFSET2(MonoJitTlsData,thrown_exc,2120)
+DECL_OFFSET2(MonoJitTlsData,thrown_non_exc,2128)
+DECL_OFFSET2(MonoJitTlsData,calling_image,2136)
+DECL_OFFSET2(MonoJitTlsData,abort_exc_stack_threshold,2144)
+DECL_OFFSET2(MonoJitTlsData,active_jit_methods,2152)
+DECL_OFFSET2(MonoJitTlsData,interp_context,2160)
DECL_SIZE2(MonoGSharedVtMethodRuntimeInfo,8)
DECL_OFFSET2(MonoGSharedVtMethodRuntimeInfo,locals_size,0)
DECL_OFFSET2(MonoGSharedVtMethodRuntimeInfo,entries,8)
diff --git a/src/mono/nuget/Microsoft.NET.Runtime.WorkloadTesting.Internal/Sdk/WorkloadTesting.Core.targets b/src/mono/nuget/Microsoft.NET.Runtime.WorkloadTesting.Internal/Sdk/WorkloadTesting.Core.targets
index c8a742387b7183..6a35675fe292fe 100755
--- a/src/mono/nuget/Microsoft.NET.Runtime.WorkloadTesting.Internal/Sdk/WorkloadTesting.Core.targets
+++ b/src/mono/nuget/Microsoft.NET.Runtime.WorkloadTesting.Internal/Sdk/WorkloadTesting.Core.targets
@@ -84,6 +84,19 @@
Retries="3"
Condition="!Exists($(_DotNetInstallScriptPath))"/>
+
+
+
+
+
+
diff --git a/src/mono/sample/wasm/console-node/Wasm.Console.Node.Sample.csproj b/src/mono/sample/wasm/console-node/Wasm.Console.Node.Sample.csproj
index 5e9ae0d965fe6f..65301b3087520a 100644
--- a/src/mono/sample/wasm/console-node/Wasm.Console.Node.Sample.csproj
+++ b/src/mono/sample/wasm/console-node/Wasm.Console.Node.Sample.csproj
@@ -6,7 +6,7 @@
true
2
- $(ExecXHarnessVar) wasm test --app=. --engine=NodeJS --engine-arg=--stack-trace-limit=1000 --js-file=main.mjs --output-directory=$(XHarnessOutputVar) --expected-exit-code $(ExpectedExitCode)
+ $(ExecXHarnessVar) wasm test --app=. --engine=NodeJS --engine-arg=--stack-trace-limit=1000 --engine-arg=--experimental-wasm-exnref --js-file=main.mjs --output-directory=$(XHarnessOutputVar) --expected-exit-code $(ExpectedExitCode)
diff --git a/src/mono/sample/wasm/console-v8/Wasm.Console.V8.Sample.csproj b/src/mono/sample/wasm/console-v8/Wasm.Console.V8.Sample.csproj
index cbd591be53286b..dfc937e8569bea 100644
--- a/src/mono/sample/wasm/console-v8/Wasm.Console.V8.Sample.csproj
+++ b/src/mono/sample/wasm/console-v8/Wasm.Console.V8.Sample.csproj
@@ -5,7 +5,7 @@
true
true
- $(ExecXHarnessVar) wasm test --app=. --engine=V8 --engine-arg=--stack-trace-limit=1000 --js-file=main.mjs --output-directory=$(XHarnessOutputVar)
+ $(ExecXHarnessVar) wasm test --app=. --engine=V8 --engine-arg=--stack-trace-limit=1000 --engine-arg=--experimental-wasm-exnref --js-file=main.mjs --output-directory=$(XHarnessOutputVar)
diff --git a/src/mono/sample/wasm/wasm.mk b/src/mono/sample/wasm/wasm.mk
index 22db9a0d89fa9e..658d77ead989b4 100644
--- a/src/mono/sample/wasm/wasm.mk
+++ b/src/mono/sample/wasm/wasm.mk
@@ -42,10 +42,10 @@ run-browser:
fi
run-console:
- cd bin/$(CONFIG)/wwwroot && $(V8_PATH) --stack-trace-limit=1000 --single-threaded $(MAIN_JS) -- $(ARGS)
+ cd bin/$(CONFIG)/wwwroot && $(V8_PATH) --stack-trace-limit=1000 --experimental-wasm-exnref --single-threaded $(MAIN_JS) -- $(ARGS)
run-console-node:
- cd bin/$(CONFIG)/wwwroot && node --stack-trace-limit=1000 --single-threaded $(MAIN_JS) $(ARGS)
+ cd bin/$(CONFIG)/wwwroot && node --stack-trace-limit=1000 --experimental-wasm-exnref --single-threaded $(MAIN_JS) $(ARGS)
debug-console-node:
- cd bin/$(CONFIG)/wwwroot && node --inspect=9222 --stack-trace-limit=1000 --single-threaded $(MAIN_JS) $(ARGS)
\ No newline at end of file
+ cd bin/$(CONFIG)/wwwroot && node --inspect=9222 --stack-trace-limit=1000 --experimental-wasm-exnref --single-threaded $(MAIN_JS) $(ARGS)
\ No newline at end of file
diff --git a/src/mono/wasm/Wasm.Build.Tests/Blazor/EventPipeDiagnosticsTests.cs b/src/mono/wasm/Wasm.Build.Tests/Blazor/EventPipeDiagnosticsTests.cs
index b3b91ab00abc38..00045911bda7a2 100644
--- a/src/mono/wasm/Wasm.Build.Tests/Blazor/EventPipeDiagnosticsTests.cs
+++ b/src/mono/wasm/Wasm.Build.Tests/Blazor/EventPipeDiagnosticsTests.cs
@@ -30,13 +30,11 @@ public EventPipeDiagnosticsTests(ITestOutputHelper output, SharedBuildPerTestCla
[Fact]
[TestCategory("native-mono")]
- [ActiveIssue("https://github.com/dotnet/runtime/issues/129584", typeof(BuildTestBase), nameof(BuildTestBase.IsMonoRuntime))]
public Task BlazorEventPipeTestWithCpuSamplesAOT() => BlazorEventPipeTestWithCpuSamples(Configuration.Release, aot: true);
[Theory]
[InlineData(Configuration.Debug, false)]
[InlineData(Configuration.Release, false)]
- [ActiveIssue("https://github.com/dotnet/runtime/issues/129584", typeof(BuildTestBase), nameof(BuildTestBase.IsMonoRuntime))]
public async Task BlazorEventPipeTestWithCpuSamples(Configuration config, bool aot)
{
string extraProperties = @"
diff --git a/src/mono/wasm/Wasm.Build.Tests/Common/BuildEnvironment.cs b/src/mono/wasm/Wasm.Build.Tests/Common/BuildEnvironment.cs
index 61a98572b2464d..d1b9594f1e0d39 100644
--- a/src/mono/wasm/Wasm.Build.Tests/Common/BuildEnvironment.cs
+++ b/src/mono/wasm/Wasm.Build.Tests/Common/BuildEnvironment.cs
@@ -213,7 +213,7 @@ private string GetRuntimePackName(RuntimeVariant runtimeType)
public string GetRuntimeNativeDir(string tfm, RuntimeVariant runtimeType = RuntimeVariant.SingleThreaded)
=> Path.Combine(GetRuntimePackDir(tfm, runtimeType), "runtimes", DefaultRuntimeIdentifier, "native");
public bool IsMultiThreadingRuntimePackAvailableFor(string tfm)
- => IsWorkload && File.Exists(Path.Combine(GetRuntimeNativeDir(tfm, RuntimeVariant.MultiThreaded), "dotnet.native.worker.mjs"));
+ => IsWorkload && File.Exists(Path.Combine(GetRuntimeNativeDir(tfm, RuntimeVariant.MultiThreaded), "dotnet.native.wasm"));
public static string WasmOverridePacksTargetsPath = Path.Combine(TestDataPath, "WasmOverridePacks.targets");
diff --git a/src/mono/wasm/Wasm.Build.Tests/ProjectProviderBase.cs b/src/mono/wasm/Wasm.Build.Tests/ProjectProviderBase.cs
index c1480d70fa91ee..301661f69af9f3 100644
--- a/src/mono/wasm/Wasm.Build.Tests/ProjectProviderBase.cs
+++ b/src/mono/wasm/Wasm.Build.Tests/ProjectProviderBase.cs
@@ -606,7 +606,6 @@ public BootJsonData AssertBootJson(AssertBundleOptions options)
var bootJsonEntries = assets.jsModuleNative.Select(a => a.name)
.Union(assets.wasmNative.Select(a => a.name))
.Union(assets.jsModuleRuntime.Select(a => a.name))
- .Union(assets.jsModuleWorker?.Select(a => a.name) ?? Enumerable.Empty())
.Union(assets.jsModuleDiagnostics?.Select(a => a.name) ?? Enumerable.Empty())
.Union(assets.wasmSymbols?.Select(a => a.name) ?? Enumerable.Empty())
.ToArray();
diff --git a/src/mono/wasm/Wasm.Build.Tests/WasmSdkBasedProjectProvider.cs b/src/mono/wasm/Wasm.Build.Tests/WasmSdkBasedProjectProvider.cs
index 618ae02613e576..38b88048204bfd 100644
--- a/src/mono/wasm/Wasm.Build.Tests/WasmSdkBasedProjectProvider.cs
+++ b/src/mono/wasm/Wasm.Build.Tests/WasmSdkBasedProjectProvider.cs
@@ -55,7 +55,6 @@ protected override IReadOnlyDictionary GetAllKnownDotnetFilesToFin
{ "dotnet.native.js", true },
{ "dotnet.native.js.symbols", true },
{ "dotnet.native.wasm", true },
- { "dotnet.native.worker.mjs", true },
{ "dotnet.runtime.js", true },
{ "dotnet.runtime.js.map", false },
{ "dotnet.diagnostics.js", true },
@@ -77,10 +76,6 @@ protected override IReadOnlySet GetDotNetFilesExpectedSet(AssertBundleOp
"dotnet.native.js",
"dotnet.runtime.js",
};
- if (assertOptions.BuildOptions.RuntimeType is RuntimeVariant.MultiThreaded)
- {
- res.Add("dotnet.native.worker.mjs");
- }
if (!assertOptions.BuildOptions.IsPublish)
{
@@ -162,10 +157,6 @@ private void AssertBundle(AssertBundleOptions assertOptions)
string buildType = assertOptions.BuildOptions.IsPublish ? "publish" : "build";
var nativeFilesToCheck = new List() { "dotnet.native.wasm", "dotnet.native.js" };
- if (assertOptions.BuildOptions.RuntimeType == RuntimeVariant.MultiThreaded)
- {
- nativeFilesToCheck.Add("dotnet.native.worker.mjs");
- }
foreach (string nativeFilename in nativeFilesToCheck)
{
@@ -180,11 +171,6 @@ private void AssertBundle(AssertBundleOptions assertOptions)
if (assertOptions.BuildOptions.ExpectedFileType != NativeFilesType.FromRuntimePack)
{
- if (nativeFilename == "dotnet.native.worker.mjs")
- {
- Console.WriteLine($"Skipping the verification whether {nativeFilename} is from the runtime pack. The check wouldn't be meaningful as the runtime pack file has the same size as the relinked file");
- continue;
- }
// Confirm that it doesn't match the file from the runtime pack
TestUtils.AssertNotSameFile(Path.Combine(runtimeNativeDir, nativeFilename),
actualDotnetFiles[nativeFilename].ActualPath,
@@ -284,19 +270,6 @@ private void AssertBuildBundle(Configuration config, MSBuildOptions buildOptions
AssertFileNotExists(Path.Combine(objDir, "wasm", "for-build"), file, "wasm/for-build");
}
- if (buildOptions.RuntimeType == RuntimeVariant.MultiThreaded)
- {
- // dotnet.native.worker.mjs is validated for location only and not compared against
- // the runtime pack — the publish-path AssertBundle skips the runtime-pack comparison
- // for the same reason (the runtime-pack file has the same size as the relinked file,
- // so the check is not meaningful).
- const string multiThreadedWorkerFile = "dotnet.native.worker.mjs";
- AssertFileExists(nativeDir, multiThreadedWorkerFile);
- AssertFileNotExists(objDir, multiThreadedWorkerFile, "obj root");
- if (!isNativeRebuild)
- AssertFileNotExists(Path.Combine(objDir, "wasm", "for-build"), multiThreadedWorkerFile, "wasm/for-build");
- }
-
// --- Assembly files: webcil-converted in webcil/ or materialized DLLs in fx/_framework/ ---
if (BuildTestBase.UseWebcil)
{
diff --git a/src/mono/wasm/Wasm.Build.Tests/data/nuget.config b/src/mono/wasm/Wasm.Build.Tests/data/nuget.config
index c201e61aab33bf..6b97c38d08cf5b 100644
--- a/src/mono/wasm/Wasm.Build.Tests/data/nuget.config
+++ b/src/mono/wasm/Wasm.Build.Tests/data/nuget.config
@@ -12,6 +12,7 @@
+
diff --git a/src/mono/wasm/build/WasmApp.Common.targets b/src/mono/wasm/build/WasmApp.Common.targets
index 86c53bcec5609c..a8e6211aab2741 100644
--- a/src/mono/wasm/build/WasmApp.Common.targets
+++ b/src/mono/wasm/build/WasmApp.Common.targets
@@ -930,8 +930,8 @@
<_WasmOptPostLinkFileName Condition="'$([System.IO.Path]::IsPathRooted($(_WasmOptPostLinkFileName)))' != 'true'">$([System.IO.Path]::Combine($(_WasmIntermediateOutputPath), $(_WasmOptPostLinkFileName)))
-
-
+
diff --git a/src/native/libs/Common/JavaScript/loader/assets.ts b/src/native/libs/Common/JavaScript/loader/assets.ts
index 5d09b009855530..a6869643d76951 100644
--- a/src/native/libs/Common/JavaScript/loader/assets.ts
+++ b/src/native/libs/Common/JavaScript/loader/assets.ts
@@ -588,8 +588,7 @@ const behaviorToBlazorAssetTypeMap: { [key: string]: WebAssemblyBootResourceType
"webcil": "assembly",
"js-module-dotnet": "dotnetjs",
"js-module-native": "dotnetjs",
- "js-module-runtime": "dotnetjs",
- "js-module-threads": "dotnetjs"
+ "js-module-runtime": "dotnetjs"
};
const behaviorToContentTypeMap: { [key: string]: string | undefined } = {
@@ -667,7 +666,6 @@ export async function prefetchAllResources(extraVfs?: VfsAsset[]): Promise
...(resources.jsModuleNative || []),
...(resources.jsModuleRuntime || []),
...(resources.jsModuleDiagnostics || []),
- ...(resources.jsModuleWorker || []),
...(resources.modulesAfterConfigLoaded || []),
...(resources.modulesAfterRuntimeReady || []),
]);
diff --git a/src/native/libs/Common/JavaScript/loader/config.ts b/src/native/libs/Common/JavaScript/loader/config.ts
index 71ac243d65dcea..4570a0867d22b5 100644
--- a/src/native/libs/Common/JavaScript/loader/config.ts
+++ b/src/native/libs/Common/JavaScript/loader/config.ts
@@ -66,7 +66,6 @@ function mergeResources(target: Assets, source: Assets): Assets {
source.lazyAssembly = [...target.lazyAssembly!, ...source.lazyAssembly || []];
source.corePdb = [...target.corePdb!, ...source.corePdb || []];
source.pdb = [...target.pdb!, ...source.pdb || []];
- source.jsModuleWorker = [...target.jsModuleWorker!, ...source.jsModuleWorker || []];
source.jsModuleNative = [...target.jsModuleNative!, ...source.jsModuleNative || []];
source.jsModuleDiagnostics = [...target.jsModuleDiagnostics!, ...source.jsModuleDiagnostics || []];
source.jsModuleRuntime = [...target.jsModuleRuntime!, ...source.jsModuleRuntime || []];
@@ -119,7 +118,6 @@ function normalizeResources(target: Assets) {
if (!target.lazyAssembly) target.lazyAssembly = [];
if (!target.corePdb) target.corePdb = [];
if (!target.pdb) target.pdb = [];
- if (!target.jsModuleWorker) target.jsModuleWorker = [];
if (!target.jsModuleNative) target.jsModuleNative = [];
if (!target.jsModuleDiagnostics) target.jsModuleDiagnostics = [];
if (!target.jsModuleRuntime) target.jsModuleRuntime = [];
diff --git a/src/native/libs/Common/JavaScript/loader/dotnet.d.ts b/src/native/libs/Common/JavaScript/loader/dotnet.d.ts
index 60946334f7e9f4..edec8bb8668075 100644
--- a/src/native/libs/Common/JavaScript/loader/dotnet.d.ts
+++ b/src/native/libs/Common/JavaScript/loader/dotnet.d.ts
@@ -245,7 +245,6 @@ interface Assets {
lazyAssembly?: AssemblyAsset[];
corePdb?: PdbAsset[];
pdb?: PdbAsset[];
- jsModuleWorker?: JsAsset[];
jsModuleDiagnostics?: JsAsset[];
jsModuleNative: JsAsset[];
jsModuleRuntime: JsAsset[];
@@ -396,10 +395,6 @@ type SingleAssetBehaviors =
* The javascript module for loader.
*/
| "js-module-dotnet"
-/**
- * The javascript module for threads.
- */
- | "js-module-threads"
/**
* The javascript module for diagnostic server and client.
*/
diff --git a/src/native/libs/Common/JavaScript/types/public-api.ts b/src/native/libs/Common/JavaScript/types/public-api.ts
index a187a04f1639a0..f3f0a520a978e9 100644
--- a/src/native/libs/Common/JavaScript/types/public-api.ts
+++ b/src/native/libs/Common/JavaScript/types/public-api.ts
@@ -209,7 +209,6 @@ export interface Assets {
lazyAssembly?: AssemblyAsset[];
corePdb?: PdbAsset[];
pdb?: PdbAsset[];
- jsModuleWorker?: JsAsset[];
jsModuleDiagnostics?: JsAsset[];
jsModuleNative: JsAsset[];
jsModuleRuntime: JsAsset[];
@@ -360,10 +359,6 @@ export type SingleAssetBehaviors =
* The javascript module for loader.
*/
| "js-module-dotnet"
- /**
- * The javascript module for threads.
- */
- | "js-module-threads"
/**
* The javascript module for diagnostic server and client.
*/
diff --git a/src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/BootJsonBuilderHelper.cs b/src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/BootJsonBuilderHelper.cs
index bf1b1061772d32..2c1b4ee152e1e4 100644
--- a/src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/BootJsonBuilderHelper.cs
+++ b/src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/BootJsonBuilderHelper.cs
@@ -118,7 +118,6 @@ static void AddDictionary(StringBuilder sb, Dictionary? res)
AddDictionary(sb, resources.assembly);
AddDictionary(sb, resources.coreAssembly);
- AddDictionary(sb, resources.jsModuleWorker);
AddDictionary(sb, resources.jsModuleDiagnostics);
AddDictionary(sb, resources.jsModuleNative);
AddDictionary(sb, resources.jsModuleRuntime);
@@ -154,9 +153,7 @@ static void AddDictionary(StringBuilder sb, Dictionary? res)
ResourcesData resources = (ResourcesData)bootConfig.resources;
string resourceExtension = Path.GetExtension(resourceName);
- if (resourceName.StartsWith("dotnet.native.worker", StringComparison.OrdinalIgnoreCase) && string.Equals(resourceExtension, ".mjs", StringComparison.OrdinalIgnoreCase))
- return resources.jsModuleWorker ??= new();
- else if (resourceName.StartsWith("dotnet.diagnostics", StringComparison.OrdinalIgnoreCase) && string.Equals(resourceExtension, ".js", StringComparison.OrdinalIgnoreCase))
+ if (resourceName.StartsWith("dotnet.diagnostics", StringComparison.OrdinalIgnoreCase) && string.Equals(resourceExtension, ".js", StringComparison.OrdinalIgnoreCase))
return resources.jsModuleDiagnostics ??= new();
else if (resourceName.StartsWith("dotnet.native", StringComparison.OrdinalIgnoreCase) && string.Equals(resourceExtension, ".js", StringComparison.OrdinalIgnoreCase))
return resources.jsModuleNative ??= new();
@@ -216,7 +213,6 @@ public string TransformResourcesToAssets(BootJsonData config, bool bundlerFriend
assets.hash = resources.hash;
assets.jsModuleRuntime = MapJsAssets(resources.jsModuleRuntime);
assets.jsModuleNative = MapJsAssets(resources.jsModuleNative);
- assets.jsModuleWorker = MapJsAssets(resources.jsModuleWorker);
assets.jsModuleDiagnostics = MapJsAssets(resources.jsModuleDiagnostics);
assets.wasmNative = resources.wasmNative?.Select(a =>
diff --git a/src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/BootJsonData.cs b/src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/BootJsonData.cs
index 716e468f6836af..063a365ae53163 100644
--- a/src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/BootJsonData.cs
+++ b/src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/BootJsonData.cs
@@ -182,14 +182,11 @@ public class ResourcesData
/// .NET Wasm runtime resources (dotnet.wasm, dotnet.js) etc.
///
///
- /// Deprecated in .NET 8, use , , , , , .
+ /// Deprecated in .NET 8, use , , , , .
///
[DataMember(EmitDefaultValue = false)]
public ResourceHashesByNameDictionary runtime { get; set; }
- [DataMember(EmitDefaultValue = false)]
- public ResourceHashesByNameDictionary jsModuleWorker { get; set; }
-
[DataMember(EmitDefaultValue = false)]
public ResourceHashesByNameDictionary jsModuleDiagnostics { get; set; }
@@ -284,9 +281,6 @@ public class AssetsData
///
public string hash { get; set; }
- [DataMember(EmitDefaultValue = false)]
- public List jsModuleWorker { get; set; }
-
[DataMember(EmitDefaultValue = false)]
public List jsModuleDiagnostics { get; set; }
diff --git a/src/tests/Common/CLRTest.Execute.Bash.targets b/src/tests/Common/CLRTest.Execute.Bash.targets
index f6e69ad1ab0bb2..933b04c77a9942 100644
--- a/src/tests/Common/CLRTest.Execute.Bash.targets
+++ b/src/tests/Common/CLRTest.Execute.Bash.targets
@@ -404,7 +404,7 @@ else
echo CLRTestExecutionArguments: ${CLRTestExecutionArguments[@]}
echo node version: `node -v`
echo Timeout in ms: $__TestTimeout
- cmd=( node --stack-size=8192 "${CORE_ROOT}/corerun.js" -c "${CORE_ROOT}" "${PWD}/${ExePath}" "${CLRTestExecutionArguments[@]}" )
+ cmd=( node --stack-size=8192 --experimental-wasm-exnref "${CORE_ROOT}/corerun.js" -c "${CORE_ROOT}" "${PWD}/${ExePath}" "${CLRTestExecutionArguments[@]}" )
echo Running: "${cmd[@]}"
run_with_timeout $__TestTimeout "${cmd[@]}"
fi
diff --git a/src/tests/Common/CLRTest.Execute.Batch.targets b/src/tests/Common/CLRTest.Execute.Batch.targets
index f193266a921e2c..ac19dfcbab3718 100644
--- a/src/tests/Common/CLRTest.Execute.Batch.targets
+++ b/src/tests/Common/CLRTest.Execute.Batch.targets
@@ -364,7 +364,7 @@ IF NOT DEFINED RunWithNodeJS (
ECHO CLRTestExecutionArguments: %CLRTestExecutionArguments%
ECHO Timeout in ms: !__TestTimeout!
- set "__RunCmd=node --stack-size=8192 "!__CoreRootWin!\corerun.js" -c "!__CoreRootUnix!" "!__ExePathUnix!" %CLRTestExecutionArguments%"
+ set "__RunCmd=node --stack-size=8192 --experimental-wasm-exnref "!__CoreRootWin!\corerun.js" -c "!__CoreRootUnix!" "!__ExePathUnix!" %CLRTestExecutionArguments%"
ECHO Running: !__RunCmd!
call :RunWithTimeout !__TestTimeout!
set CLRTestExitCode=!ERRORLEVEL!
diff --git a/src/tests/JIT/Directed/nullabletypes/Desktop/boxunboxvaluetype.cs b/src/tests/JIT/Directed/nullabletypes/Desktop/boxunboxvaluetype.cs
index 89fceaef8a6a2e..8d7d0ccb64ef94 100644
--- a/src/tests/JIT/Directed/nullabletypes/Desktop/boxunboxvaluetype.cs
+++ b/src/tests/JIT/Directed/nullabletypes/Desktop/boxunboxvaluetype.cs
@@ -4696,7 +4696,6 @@ public static void Run()
public class Test_boxunboxvaluetype
{
- [ActiveIssue("https://github.com/dotnet/runtime/issues/129508", TestRuntimes.Mono)]
[Fact]
public static int TestEntryPoint()
{
diff --git a/src/tests/JIT/Directed/nullabletypes/castclassvaluetype.cs b/src/tests/JIT/Directed/nullabletypes/castclassvaluetype.cs
index d5b23f43397160..1d7bbed45bdd2e 100644
--- a/src/tests/JIT/Directed/nullabletypes/castclassvaluetype.cs
+++ b/src/tests/JIT/Directed/nullabletypes/castclassvaluetype.cs
@@ -4695,7 +4695,6 @@ public static void Run()
public class Test_castclassvaluetype
{
- [ActiveIssue("https://github.com/dotnet/runtime/issues/129508", TestRuntimes.Mono)]
[Fact]
public static int TestEntryPoint()
{
diff --git a/src/tests/JIT/Regression/CLR-x86-JIT/V1.1-M1-Beta1/b143840/b143840.il b/src/tests/JIT/Regression/CLR-x86-JIT/V1.1-M1-Beta1/b143840/b143840.il
index 2565bcc03b270e..b1d74f9b87c0ea 100644
--- a/src/tests/JIT/Regression/CLR-x86-JIT/V1.1-M1-Beta1/b143840/b143840.il
+++ b/src/tests/JIT/Regression/CLR-x86-JIT/V1.1-M1-Beta1/b143840/b143840.il
@@ -45,10 +45,6 @@
.custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = (
01 00 00 00
)
- .custom instance void [Microsoft.DotNet.XUnitExtensions]Xunit.ActiveIssueAttribute::.ctor(string, valuetype [Microsoft.DotNet.XUnitExtensions]Xunit.TestRuntimes) = {
- string('https://github.com/dotnet/runtime/issues/129508')
- int32(0x2) // Mono
- }
.entrypoint
.maxstack 3
.locals init (class [System.Threading.Thread]System.Threading.Thread V_0,
diff --git a/src/tests/JIT/Regression/JitBlue/Runtime_105619/Runtime_105619.cs b/src/tests/JIT/Regression/JitBlue/Runtime_105619/Runtime_105619.cs
index 13108ab948bbe1..732db9f22bcfd8 100644
--- a/src/tests/JIT/Regression/JitBlue/Runtime_105619/Runtime_105619.cs
+++ b/src/tests/JIT/Regression/JitBlue/Runtime_105619/Runtime_105619.cs
@@ -116,7 +116,6 @@ public class Program
[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/124219", typeof(PlatformDetection), nameof(PlatformDetection.IsWasm))]
- [ActiveIssue("https://github.com/dotnet/runtime/issues/129508", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoFULLAOT))]
public static void TestEntryPoint()
{
try
diff --git a/src/tests/JIT/Regression/JitBlue/WPF_3226/CSharpRepro/WPF_3226.cs b/src/tests/JIT/Regression/JitBlue/WPF_3226/CSharpRepro/WPF_3226.cs
index 51106edc3fb893..d958abe234da5e 100644
--- a/src/tests/JIT/Regression/JitBlue/WPF_3226/CSharpRepro/WPF_3226.cs
+++ b/src/tests/JIT/Regression/JitBlue/WPF_3226/CSharpRepro/WPF_3226.cs
@@ -38,7 +38,6 @@ static void WmGetMinMaxInfo(IntPtr lParam)
Marshal.StructureToPtr(mmi, lParam, true);
}
- [ActiveIssue("https://github.com/dotnet/runtime/issues/129508", TestRuntimes.Mono)]
[Fact]
public unsafe static int TestEntryPoint()
{
diff --git a/src/tests/JIT/jit64/localloc/call/call05_large.il b/src/tests/JIT/jit64/localloc/call/call05_large.il
index c4b74924e68fa6..d68c92f0d227a7 100644
--- a/src/tests/JIT/jit64/localloc/call/call05_large.il
+++ b/src/tests/JIT/jit64/localloc/call/call05_large.il
@@ -21,10 +21,6 @@
.custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = (
01 00 00 00
)
- .custom instance void [Microsoft.DotNet.XUnitExtensions]Xunit.ActiveIssueAttribute::.ctor(string, valuetype [Microsoft.DotNet.XUnitExtensions]Xunit.TestRuntimes) = {
- string('https://github.com/dotnet/runtime/issues/129508')
- int32(0x2) // Mono
- }
.entrypoint
.maxstack 11
.locals (int32* intArray1,
diff --git a/src/tests/JIT/jit64/localloc/call/call05_small.il b/src/tests/JIT/jit64/localloc/call/call05_small.il
index d78aaeb6e2882c..7b11708e44b8ff 100644
--- a/src/tests/JIT/jit64/localloc/call/call05_small.il
+++ b/src/tests/JIT/jit64/localloc/call/call05_small.il
@@ -21,10 +21,6 @@
.custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = (
01 00 00 00
)
- .custom instance void [Microsoft.DotNet.XUnitExtensions]Xunit.ActiveIssueAttribute::.ctor(string, valuetype [Microsoft.DotNet.XUnitExtensions]Xunit.TestRuntimes) = {
- string('https://github.com/dotnet/runtime/issues/129508')
- int32(0x2) // Mono
- }
.entrypoint
.maxstack 11
.locals (int32* intArray1,
diff --git a/src/tests/Loader/classloader/MethodImpl/CovariantReturns/UnitTest/UnitTest_GVM_TypeLoadException.il b/src/tests/Loader/classloader/MethodImpl/CovariantReturns/UnitTest/UnitTest_GVM_TypeLoadException.il
index 65df84dbdafa64..cb631bf64f517f 100644
--- a/src/tests/Loader/classloader/MethodImpl/CovariantReturns/UnitTest/UnitTest_GVM_TypeLoadException.il
+++ b/src/tests/Loader/classloader/MethodImpl/CovariantReturns/UnitTest/UnitTest_GVM_TypeLoadException.il
@@ -478,10 +478,6 @@
01 00 00 00
)
.custom instance void [Microsoft.DotNet.XUnitExtensions]Xunit.ActiveIssueAttribute::.ctor(string, class [mscorlib]System.Type, string[]) = {string('Tests that expect TypeLoadException') type([TestLibrary]TestLibrary.Utilities) string[1] ('IsNativeAot') }
- .custom instance void [Microsoft.DotNet.XUnitExtensions]Xunit.ActiveIssueAttribute::.ctor(string, valuetype [Microsoft.DotNet.XUnitExtensions]Xunit.TestRuntimes) = {
- string('https://github.com/dotnet/runtime/issues/129508')
- int32(0x2) // Mono
- }
.entrypoint
.maxstack 2
.locals init ( bool result )