From 44992068f82a341ec98fcbfe6b76a291448875ca Mon Sep 17 00:00:00 2001 From: pavelsavara Date: Thu, 12 Nov 2026 19:25:23 +0100 Subject: [PATCH 1/5] [browser][coreclr] Add trimmed managed native flavors Build production and diagnostics shared-framework closures, generate flavor-specific interop helpers, and select matching managed and native assets without wasm-tools. Keep app publish trimming and workload relinking behavior unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- ...rosoft.NETCore.App.Runtime.CoreCLR.sfxproj | 18 ++++++++ src/libraries/sfx-finish.proj | 16 ++++++- ....Sdk.WebAssembly.BlazorWebAssembly.targets | 17 ++++++++ ...ET.Sdk.WebAssembly.Browser.CoreCLR.targets | 43 +++++++++++++++++-- ...k.WebAssembly.Browser.UserSettings.targets | 17 ++++++++ ...icrosoft.NET.Sdk.WebAssembly.Browser.props | 1 + ...Microsoft.NET.Sdk.WebAssembly.Pack.targets | 2 +- .../Blazor/WorkloadRequiredTests.cs | 36 +++++++++++++++- .../CoreCLRWasmNativeDefaultsTests.cs | 33 ++++++++++++++ .../corehost/browserhost/browserhost.proj | 30 ++++++++++--- 10 files changed, 199 insertions(+), 14 deletions(-) create mode 100644 src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.BlazorWebAssembly.targets create mode 100644 src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.Browser.UserSettings.targets diff --git a/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.CoreCLR.sfxproj b/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.CoreCLR.sfxproj index 7ca72daf08551c..fe694e6f6ce046 100644 --- a/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.CoreCLR.sfxproj +++ b/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.CoreCLR.sfxproj @@ -47,6 +47,11 @@ <_PublishReadyToRunCrossgen2ExtraArgs>$(_PublishReadyToRunCrossgen2ExtraArgs);--opt-cross-module:* + + + $(NoWarn);NU5100 + + true @@ -111,7 +116,20 @@ BeforeTargets="_GenerateFrameworkList" DependsOnTargets="BuildBrowserHost" Condition="'$(TargetOS)' == 'browser'"> + + <_BrowserManagedFlavorRoot>$([MSBuild]::NormalizeDirectory('$(ArtifactsObjDir)', 'sfx-finish', '$(LibrariesConfiguration)', '$(NetCoreAppCurrent)-browser')) + + + - $([MSBuild]::NormalizeDirectory('$(IntermediateOutputPath)', 'illink-$(TargetArchitecture)')) + <_SharedFrameworkTrimFlavorSuffix Condition="'$(SharedFrameworkTrimFlavor)' != ''">-$(SharedFrameworkTrimFlavor) + $([MSBuild]::NormalizeDirectory('$(IntermediateOutputPath)', 'illink-$(TargetArchitecture)$(_SharedFrameworkTrimFlavorSuffix)')) $(SharedFrameworkAssembliesTrimDir)linker-marker.txt + + + + + + @@ -118,13 +127,14 @@ AfterTargets="Build" Condition="'$(RunILLinkInBuild)' == 'true'" DependsOnTargets="ResolveProjectReferences;GetTrimSharedFrameworkAssembliesInputs;PrepareForAssembliesTrim" - Inputs="@(SharedFrameworkAssembly);@(SharedFrameworkSuppressionsXml);$(ILLinkTasksAssembly)" + Inputs="$(MSBuildProjectFullPath);@(SharedFrameworkAssembly);@(SharedFrameworkSuppressionsXml);$(ILLinkTasksAssembly)" Outputs="$(SharedFrameworkAssembliesTrimMarkerFile)"> $(ILLinkArgs) $(SharedFrameworkILLinkArgs) --link-attributes "@(SharedFrameworkSuppressionsXml, '" --link-attributes "')" + IL2121 @@ -138,7 +148,9 @@ diff --git a/src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.BlazorWebAssembly.targets b/src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.BlazorWebAssembly.targets new file mode 100644 index 00000000000000..a387a22b6b8608 --- /dev/null +++ b/src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.BlazorWebAssembly.targets @@ -0,0 +1,17 @@ + + + + <_WasmCoreClrEnableDiagnosticsSpecified Condition="'$(EnableDiagnostics)' != ''">true + <_WasmCoreClrEventSourceSupportSpecified Condition="'$(EventSourceSupport)' != ''">true + + + + diff --git a/src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.Browser.CoreCLR.targets b/src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.Browser.CoreCLR.targets index 1877fb41fa3102..ebd156951daf27 100644 --- a/src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.Browser.CoreCLR.targets +++ b/src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.Browser.CoreCLR.targets @@ -49,19 +49,26 @@ Copyright (c) .NET Foundation. All rights reserved. <_WasmCoreClrNativeFlavorUnderPublish Condition="'$(_IsPublishing)' == 'true' or '$(WasmBuildingForNestedPublish)' == 'true' or '$(WasmBuildOnlyAfterPublish)' == 'true' or '$(DeployOnBuild)' == 'true'">true - false - true + <_WasmCoreClrEffectiveEnableDiagnostics Condition="('$(_WasmCoreClrEnableDiagnosticsSpecified)' == 'true' and '$(EnableDiagnostics)' == 'true') or + ('$(_WasmCoreClrEventSourceSupportSpecified)' == 'true' and '$(EventSourceSupport)' == 'true')">true + <_WasmCoreClrEffectiveEnableDiagnostics Condition="'$(_WasmCoreClrEffectiveEnableDiagnostics)' == '' and + ('$(_WasmCoreClrEnableDiagnosticsSpecified)' == 'true' or '$(_WasmCoreClrEventSourceSupportSpecified)' == 'true')">false + <_WasmCoreClrEffectiveEnableDiagnostics Condition="'$(_WasmCoreClrEffectiveEnableDiagnostics)' == '' and '$(_WasmCoreClrNativeFlavorUnderPublish)' == 'true'">false + <_WasmCoreClrEffectiveEnableDiagnostics Condition="'$(_WasmCoreClrEffectiveEnableDiagnostics)' == ''">true + $(_WasmCoreClrEffectiveEnableDiagnostics) + $(_WasmCoreClrEffectiveEnableDiagnostics) - <_WasmCoreClrNativeFlavor Condition="'$(EnableDiagnostics)' == 'true'">diagnostics + <_WasmCoreClrNativeFlavor Condition="'$(_WasmCoreClrEffectiveEnableDiagnostics)' == 'true'">diagnostics <_WasmCoreClrNativeFlavor Condition="'$(_WasmCoreClrNativeFlavor)' == ''">production <_WasmCoreClrNativeFlavorRoot>$([MSBuild]::NormalizeDirectory('$(_RuntimePackDir)', 'data', 'native-flavors')) <_WasmCoreClrSelectedNativeFlavorDir Condition="'$(_WasmCoreClrNativeFlavor)' == 'diagnostics'">$([MSBuild]::NormalizeDirectory('$(_WasmCoreClrNativeFlavorRoot)', 'diagnostics')) <_WasmCoreClrSelectedNativeFlavorDir Condition="'$(_WasmCoreClrNativeFlavor)' == 'production'">$([MSBuild]::NormalizeDirectory('$(_RuntimePackDir)', 'runtimes', '$(RuntimeIdentifier)', 'native')) + <_WasmCoreClrSelectedManagedFlavorDir>$([MSBuild]::NormalizeDirectory('$(_WasmCoreClrNativeFlavorRoot)', '$(_WasmCoreClrNativeFlavor)', 'managed')) <_WasmCoreClrPrelinkedAsset Include="$(_WasmCoreClrSelectedNativeFlavorDir)dotnet.native.wasm; @@ -71,6 +78,36 @@ Copyright (c) .NET Foundation. All rights reserved. + + + <_WasmUsePrebuiltReadyToRun>false + <_WasmBuildPrebuiltR2RDirectory> + + + + + + + <_WasmCoreClrManagedFlavorAssembly Include="$(_WasmCoreClrSelectedManagedFlavorDir)*.dll" /> + <_WasmCoreClrManagedFlavorAssemblyName Include="@(_WasmCoreClrManagedFlavorAssembly->';%(FileName)%(Extension);')" /> + + + <_WasmCoreClrManagedFlavorAssemblyNames>@(_WasmCoreClrManagedFlavorAssemblyName) + + + <_WasmCoreClrManagedFrameworkOriginal Include="@(ReferenceCopyLocalPaths)" + Condition="'%(ReferenceCopyLocalPaths.Extension)' == '.dll' and + $([System.String]::Copy('$(_WasmCoreClrManagedFlavorAssemblyNames)').Contains(';%(ReferenceCopyLocalPaths.FileName)%(ReferenceCopyLocalPaths.Extension);'))" /> + + + + + + + + <_WasmCoreClrEnableDiagnosticsSpecified Condition="'$(EnableDiagnostics)' != ''">true + <_WasmCoreClrEventSourceSupportSpecified Condition="'$(EventSourceSupport)' != ''">true + + + + diff --git a/src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.Browser.props b/src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.Browser.props index 3b44a521a85a16..ac115a457adfcc 100644 --- a/src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.Browser.props +++ b/src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.Browser.props @@ -48,6 +48,7 @@ Copyright (c) .NET Foundation. All rights reserved. Condition="'$(Crossgen2InBuildDir)' != '' or '$(Crossgen2SdkOverridePropsPath)' != ''" /> + <_BlazorWebAssemblyTargetsFile Condition="'$(_BlazorWebAssemblyTargetsFile)' == ''">$(MSBuildThisFileDirectory)Microsoft.NET.Sdk.WebAssembly.BlazorWebAssembly.targets $(AfterMicrosoftNETSdkTargets);$(MSBuildThisFileDirectory)Microsoft.NET.Sdk.WebAssembly.Browser.CoreCLR.ReadyToRun.targets diff --git a/src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.Pack.targets b/src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.Pack.targets index f7cec5d5acedc4..f83296c2d495e0 100644 --- a/src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.Pack.targets +++ b/src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.Pack.targets @@ -11,7 +11,7 @@ Copyright (c) .NET Foundation. All rights reserved. --> - <_WebAssemblyTargetsFile>$(MSBuildThisFileDirectory)\Microsoft.NET.Sdk.WebAssembly.Browser.targets + <_WebAssemblyTargetsFile>$(MSBuildThisFileDirectory)\Microsoft.NET.Sdk.WebAssembly.Browser.UserSettings.targets diff --git a/src/mono/wasm/Wasm.Build.Tests/Blazor/WorkloadRequiredTests.cs b/src/mono/wasm/Wasm.Build.Tests/Blazor/WorkloadRequiredTests.cs index 32c543f4185ba5..41c39ccbcf0e19 100644 --- a/src/mono/wasm/Wasm.Build.Tests/Blazor/WorkloadRequiredTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/Blazor/WorkloadRequiredTests.cs @@ -92,6 +92,8 @@ public async Task DefaultTemplate_WithoutWorkload(Configuration config) [InlineData(true, "", "production")] [InlineData(false, "false", "production")] [InlineData(true, "true", "diagnostics")] + [InlineData(false, "false", "production")] + [InlineData(true, "true", "diagnostics")] [TestCategory("no-workload")] public async Task CoreClrPrelinkedNativeFlavorIsSelectedWithoutWorkload(bool publish, string extraProperties, string expectedFlavor) { @@ -101,7 +103,21 @@ public async Task CoreClrPrelinkedNativeFlavorIsSelectedWithoutWorkload(bool pub aot: false, TestAsset.BlazorBasicTestApp, $"coreclr_native_flavor_{(publish ? "publish" : "build")}_{expectedFlavor}", - extraProperties: extraProperties); + extraProperties: extraProperties, + insertAtEnd: """ + + + <_SelectedCoreLib Include="@(ReferenceCopyLocalPaths)" + Condition="'%(FileName)%(Extension)' == 'System.Private.CoreLib.dll'" /> + + + + + + + """); (string _, string output) = publish ? PublishProject(info, config, new PublishOptions(UseCache: false)) @@ -125,6 +141,24 @@ public async Task CoreClrPrelinkedNativeFlavorIsSelectedWithoutWorkload(bool pub SHA256.HashData(File.ReadAllBytes(expectedNativeWasm)), SHA256.HashData(File.ReadAllBytes(actualNativeWasm))); + if (!publish) + { + string normalizedOutput = output.Replace('\\', '/'); + string expectedManagedCoreLib = Path.Combine( + runtimePackDir, + "data", + "native-flavors", + expectedFlavor, + "managed", + "System.Private.CoreLib.dll").Replace('\\', '/'); + Assert.Contains($"** Selected managed CoreLib: {expectedManagedCoreLib}", normalizedOutput, StringComparison.OrdinalIgnoreCase); + + if (expectedFlavor == "diagnostics") + Assert.Matches(@"\*\* Selected pack R2R: '.+[/\\]r2r[/\\]?'", output); + else + Assert.Contains("** Selected pack R2R: ''", output); + } + BlazorRunOptions runOptions = new(config); _ = publish ? await RunForPublishWithWebServer(runOptions) diff --git a/src/mono/wasm/Wasm.Build.Tests/CoreCLRWasmNativeDefaultsTests.cs b/src/mono/wasm/Wasm.Build.Tests/CoreCLRWasmNativeDefaultsTests.cs index 84d33aa0677d20..16b345371e89ab 100644 --- a/src/mono/wasm/Wasm.Build.Tests/CoreCLRWasmNativeDefaultsTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/CoreCLRWasmNativeDefaultsTests.cs @@ -41,6 +41,8 @@ public CoreCLRWasmNativeDefaultsTests(ITestOutputHelper output, SharedBuildPerTe { "false", false }, { "false", false }, { "true", false }, + { "false", false }, + { "true", false }, // property left unset -> no relink { "", false }, // casing must not matter, MSBuild string comparison is case-insensitive @@ -74,6 +76,37 @@ public void PropertyDifferentFromRuntimePackTriggersRelinking(string extraProper Assert.Contains($"** WasmBuildNative: '{(expectWasmBuildNative ? "true" : "")}'", line); } + [Theory] + [InlineData("false", "production")] + [InlineData("true", "diagnostics")] + [InlineData("false", "production")] + [InlineData("true", "diagnostics")] + public void TracingPropertySelectsNativeFlavor(string extraProperties, string expectedFlavor) + { + Configuration config = Configuration.Debug; + ProjectInfo info = CopyTestAsset( + config, + aot: false, + TestAsset.WasmBasicTestApp, + "coreclr_native_flavor", + extraProperties: extraProperties, + insertAtEnd: """ + + + + + """); + + (string _, string output) = BuildProject( + info, + config, + new BuildOptions(ExpectSuccess: false)); + + Assert.Contains($"** CoreCLR native flavor: '{expectedFlavor}'", output); + Assert.Contains("Stopping the build", output); + } + [Theory] [InlineData("true")] [InlineData("true")] diff --git a/src/native/corehost/browserhost/browserhost.proj b/src/native/corehost/browserhost/browserhost.proj index cc35d381d9fd6b..2703612b768ae6 100644 --- a/src/native/corehost/browserhost/browserhost.proj +++ b/src/native/corehost/browserhost/browserhost.proj @@ -1,15 +1,23 @@ + TreatAsLocalProperty="BrowserHostNativeFlavor;IsBrowserWasmProject;RequiresCrossgen2Pack;InvariantGlobalization;InvariantTimezone;EnableDiagnostics;EventSourceSupport;WasmInitialHeapSize;EmccMaximumHeapSize;EmccStackSize"> false false production $([MSBuild]::NormalizeDirectory('$(ArtifactsObjDir)', 'browserhost', '$(TargetOS).$(TargetArchitecture).$(Configuration)', '$(BrowserHostNativeFlavor)')) $([MSBuild]::NormalizeDirectory('$(IntermediateOutputPath)', 'native')) + $([MSBuild]::NormalizeDirectory('$(ArtifactsObjDir)', 'sfx-finish', '$(LibrariesConfiguration)', '$(NetCoreAppCurrent)-browser', 'illink-wasm-$(BrowserHostNativeFlavor)')) true -O2 + + + + @@ -17,27 +25,32 @@ $(BrowserHostInvariantTimezone) false true + $(EnableDiagnostics) $(BrowserHostInitialHeapSize) $(BrowserHostMaximumHeapSize) $(BrowserHostStackSize) - - - - + + + + DependsOnTargets="BuildBrowserHostManagedFlavor;ResolveRuntimeFilesFromLocalBuild;ResolveLibrariesRuntimeFilesFromLocalBuild"> + <_BrowserHostNativeFile Include="@(RuntimeFiles->WithMetadataValue('IsNative', 'true'));@(LibrariesRuntimeFiles->WithMetadataValue('IsNative', 'true'))" Exclude="$(LibrariesSharedFrameworkDir)dotnet.native.js;$(LibrariesSharedFrameworkDir)native-flavors\**\*" Condition="'%(Extension)' == '.a' or '%(Extension)' == '.js'" /> + From fc25b58eb0ddcff9a66c84113d8ac052c2becaaa Mon Sep 17 00:00:00 2001 From: pavelsavara Date: Thu, 12 Nov 2026 21:07:59 +0100 Subject: [PATCH 2/5] [browser][coreclr] Check in native flavor helpers Generate and commit production and diagnostics call-helper tables, build separate native archives, and select them when prelinking browserhost. Keep the full framework helper archive for corerun and reserve dynamic generation for application relinking. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../wasm-coreclr-callhelpers-check.yml | 5 +- .../dlls/mscoree/coreclr/CMakeLists.txt | 24 + src/coreclr/vm/CMakeLists.txt | 20 + .../callhelpers-interp-to-managed.cpp | 783 ++++++++++ .../diagnostics/callhelpers-pinvoke.cpp | 938 ++++++++++++ .../diagnostics/callhelpers-reverse.cpp | 1324 +++++++++++++++++ .../callhelpers-interp-to-managed.cpp | 783 ++++++++++ .../production/callhelpers-pinvoke.cpp | 934 ++++++++++++ .../production/callhelpers-reverse.cpp | 1324 +++++++++++++++++ .../vm/wasm/generate-coreclr-helpers.md | 13 +- .../vm/wasm/generate-coreclr-helpers.proj | 26 +- src/coreclr/vm/wks/CMakeLists.txt | 24 + .../Directory.Build.props | 4 +- .../corehost/browserhost/browserhost.proj | 11 +- 14 files changed, 6196 insertions(+), 17 deletions(-) create mode 100644 src/coreclr/vm/wasm/browser/diagnostics/callhelpers-interp-to-managed.cpp create mode 100644 src/coreclr/vm/wasm/browser/diagnostics/callhelpers-pinvoke.cpp create mode 100644 src/coreclr/vm/wasm/browser/diagnostics/callhelpers-reverse.cpp create mode 100644 src/coreclr/vm/wasm/browser/production/callhelpers-interp-to-managed.cpp create mode 100644 src/coreclr/vm/wasm/browser/production/callhelpers-pinvoke.cpp create mode 100644 src/coreclr/vm/wasm/browser/production/callhelpers-reverse.cpp diff --git a/eng/pipelines/common/templates/wasm-coreclr-callhelpers-check.yml b/eng/pipelines/common/templates/wasm-coreclr-callhelpers-check.yml index 02f11f7132e055..cbbd1e69bf6214 100644 --- a/eng/pipelines/common/templates/wasm-coreclr-callhelpers-check.yml +++ b/eng/pipelines/common/templates/wasm-coreclr-callhelpers-check.yml @@ -1,5 +1,6 @@ # Regenerates the checked-in CoreCLR WebAssembly call helpers for this leg's target OS -# (src/coreclr/vm/wasm//callhelpers-*.cpp) from the testhost and crossgen2 the leg just built, +# (src/coreclr/vm/wasm//callhelpers-*.cpp and browser flavor subdirectories) from the managed +# closures and crossgen2 the leg just built, # and fails if they differ from what is committed. A stale table builds fine but crashes the # corerun that links it, for example with "GetUnmanagedCallersOnlyThunk: unknown thunk" when a # new [UnmanagedCallersOnly] method is missing. See src/coreclr/vm/wasm/generate-coreclr-helpers.md. @@ -44,7 +45,7 @@ steps: echo "The managed code that feeds these tables ([UnmanagedCallersOnly] methods, P/Invokes, QCalls)" echo "changed without the tables being regenerated. To fix, run from the repository root:" echo - echo " ./build.sh clr+libs -os $target_os -c $configuration" + echo " ./build.sh clr+libs+host -os $target_os -c $configuration" echo " src/coreclr/vm/wasm/generate-coreclr-helpers.sh -c $configuration --target-os $target_os" echo echo "and commit the changes under $table_dir." diff --git a/src/coreclr/dlls/mscoree/coreclr/CMakeLists.txt b/src/coreclr/dlls/mscoree/coreclr/CMakeLists.txt index 6ed1041691f7bd..54422dfa2ac412 100644 --- a/src/coreclr/dlls/mscoree/coreclr/CMakeLists.txt +++ b/src/coreclr/dlls/mscoree/coreclr/CMakeLists.txt @@ -199,6 +199,18 @@ if (TARGET cee_wks_gen) $ ) endif() +if (TARGET cee_wks_gen_production) + add_library_clr(coreclr_gen_production_static + STATIC + $ + ) +endif() +if (TARGET cee_wks_gen_diagnostics) + add_library_clr(coreclr_gen_diagnostics_static + STATIC + $ + ) +endif() if (CLR_CMAKE_HOST_ANDROID) target_link_libraries(coreclr PUBLIC log) @@ -281,6 +293,12 @@ else() if (TARGET coreclr_gen_static) install_clr(TARGETS coreclr_gen_static DESTINATIONS . sharedFramework COMPONENT runtime) endif() + if (TARGET coreclr_gen_production_static) + install_clr(TARGETS coreclr_gen_production_static DESTINATIONS . sharedFramework COMPONENT runtime) + endif() + if (TARGET coreclr_gen_diagnostics_static) + install_clr(TARGETS coreclr_gen_diagnostics_static DESTINATIONS . sharedFramework COMPONENT runtime) + endif() endif(NOT CLR_CMAKE_HOST_ARCH_WASM) if(CLR_CMAKE_HOST_MACCATALYST OR CLR_CMAKE_HOST_IOS OR CLR_CMAKE_HOST_TVOS OR CLR_CMAKE_HOST_ANDROID OR CLR_CMAKE_HOST_ARCH_WASM) @@ -288,6 +306,12 @@ if(CLR_CMAKE_HOST_MACCATALYST OR CLR_CMAKE_HOST_IOS OR CLR_CMAKE_HOST_TVOS OR CL if (TARGET coreclr_gen_static) install_clr(TARGETS coreclr_gen_static DESTINATIONS . COMPONENT runtime) endif() + if (TARGET coreclr_gen_production_static) + install_clr(TARGETS coreclr_gen_production_static DESTINATIONS . COMPONENT runtime) + endif() + if (TARGET coreclr_gen_diagnostics_static) + install_clr(TARGETS coreclr_gen_diagnostics_static DESTINATIONS . COMPONENT runtime) + endif() endif(CLR_CMAKE_HOST_MACCATALYST OR CLR_CMAKE_HOST_IOS OR CLR_CMAKE_HOST_TVOS OR CLR_CMAKE_HOST_ANDROID OR CLR_CMAKE_HOST_ARCH_WASM) # Enable profile guided optimization diff --git a/src/coreclr/vm/CMakeLists.txt b/src/coreclr/vm/CMakeLists.txt index 378947f1fd2922..2fc122e73c70c9 100644 --- a/src/coreclr/vm/CMakeLists.txt +++ b/src/coreclr/vm/CMakeLists.txt @@ -991,11 +991,29 @@ elseif(CLR_CMAKE_TARGET_ARCH_WASM) ${ARCH_SOURCES_DIR}/${WASM_THUNK_SUBDIR}/callhelpers-interp-to-managed.cpp ${ARCH_SOURCES_DIR}/${WASM_THUNK_SUBDIR}/callhelpers-reverse.cpp ) + if(CLR_CMAKE_TARGET_BROWSER) + set(VM_SOURCES_WKS_GEN_PRODUCTION + ${ARCH_SOURCES_DIR}/browser/production/callhelpers-interp-to-managed.cpp + ${ARCH_SOURCES_DIR}/browser/production/callhelpers-reverse.cpp + ) + set(VM_SOURCES_WKS_GEN_DIAGNOSTICS + ${ARCH_SOURCES_DIR}/browser/diagnostics/callhelpers-interp-to-managed.cpp + ${ARCH_SOURCES_DIR}/browser/diagnostics/callhelpers-reverse.cpp + ) + endif() if (GEN_PINVOKE) add_compile_definitions(GEN_PINVOKE=1) list(APPEND VM_SOURCES_WKS_GEN ${ARCH_SOURCES_DIR}/${WASM_THUNK_SUBDIR}/callhelpers-pinvoke.cpp ) + if(CLR_CMAKE_TARGET_BROWSER) + list(APPEND VM_SOURCES_WKS_GEN_PRODUCTION + ${ARCH_SOURCES_DIR}/browser/production/callhelpers-pinvoke.cpp + ) + list(APPEND VM_SOURCES_WKS_GEN_DIAGNOSTICS + ${ARCH_SOURCES_DIR}/browser/diagnostics/callhelpers-pinvoke.cpp + ) + endif() endif(GEN_PINVOKE) endif() @@ -1075,6 +1093,8 @@ endif() convert_to_absolute_path(VM_SOURCES_WKS ${VM_SOURCES_WKS}) convert_to_absolute_path(VM_SOURCES_WKS_GEN ${VM_SOURCES_WKS_GEN}) +convert_to_absolute_path(VM_SOURCES_WKS_GEN_PRODUCTION ${VM_SOURCES_WKS_GEN_PRODUCTION}) +convert_to_absolute_path(VM_SOURCES_WKS_GEN_DIAGNOSTICS ${VM_SOURCES_WKS_GEN_DIAGNOSTICS}) convert_to_absolute_path(VM_SOURCES_WKS_ARCH_ASM ${VM_SOURCES_WKS_ARCH_ASM}) convert_to_absolute_path(VM_SOURCES_DAC ${VM_SOURCES_DAC}) convert_to_absolute_path(VM_SOURCES_WKS_SPECIAL ${VM_SOURCES_WKS_SPECIAL}) diff --git a/src/coreclr/vm/wasm/browser/diagnostics/callhelpers-interp-to-managed.cpp b/src/coreclr/vm/wasm/browser/diagnostics/callhelpers-interp-to-managed.cpp new file mode 100644 index 00000000000000..d524b4fd266f0e --- /dev/null +++ b/src/coreclr/vm/wasm/browser/diagnostics/callhelpers-interp-to-managed.cpp @@ -0,0 +1,783 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// + +// +// GENERATED FILE, DON'T EDIT +// Generated by coreclr InterpToNativeGenerator +// + +#include +#include + +// Arguments are passed on the stack with each argument aligned to INTERP_STACK_SLOT_SIZE. +#define ARG_ADDR(i) (pArgs + (i * INTERP_STACK_SLOT_SIZE)) +#define ARG_IND(i) ((int32_t)((int32_t*)ARG_ADDR(i))) +#define ARG_I32(i) (*(int32_t*)ARG_ADDR(i)) +#define ARG_I64(i) (*(int64_t*)ARG_ADDR(i)) +#define ARG_F32(i) (*(float*)ARG_ADDR(i)) +#define ARG_F64(i) (*(double*)ARG_ADDR(i)) + +namespace +{ + NOINLINE static void CallFunc_F64_F64_F64_RetF64_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + double (*fptr)(int*, double, double, double, PCODE) = *(double (**)(int*, double, double, double, PCODE))(pPortableEntryPoint); + *((double*)pRet) = (*fptr)(&framePointer, ARG_F64(0), ARG_F64(1), ARG_F64(2), pPortableEntryPoint); + } + + NOINLINE static void CallFunc_F64_F64_RetF64_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + double (*fptr)(int*, double, double, PCODE) = *(double (**)(int*, double, double, PCODE))(pPortableEntryPoint); + *((double*)pRet) = (*fptr)(&framePointer, ARG_F64(0), ARG_F64(1), pPortableEntryPoint); + } + + NOINLINE static void CallFunc_F64_I32_RetF64_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + double (*fptr)(int*, double, int32_t, PCODE) = *(double (**)(int*, double, int32_t, PCODE))(pPortableEntryPoint); + *((double*)pRet) = (*fptr)(&framePointer, ARG_F64(0), ARG_I32(1), pPortableEntryPoint); + } + + NOINLINE static void CallFunc_F64_RetF64_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + double (*fptr)(int*, double, PCODE) = *(double (**)(int*, double, PCODE))(pPortableEntryPoint); + *((double*)pRet) = (*fptr)(&framePointer, ARG_F64(0), pPortableEntryPoint); + } + + static void CallFunc_I32_RetF64(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + double (*fptr)(int32_t) = (double (*)(int32_t))pcode; + *((double*)pRet) = (*fptr)(ARG_I32(0)); + } + + NOINLINE static void CallFunc_F32_F32_F32_RetF32_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + float (*fptr)(int*, float, float, float, PCODE) = *(float (**)(int*, float, float, float, PCODE))(pPortableEntryPoint); + *((float*)pRet) = (*fptr)(&framePointer, ARG_F32(0), ARG_F32(1), ARG_F32(2), pPortableEntryPoint); + } + + NOINLINE static void CallFunc_F32_F32_RetF32_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + float (*fptr)(int*, float, float, PCODE) = *(float (**)(int*, float, float, PCODE))(pPortableEntryPoint); + *((float*)pRet) = (*fptr)(&framePointer, ARG_F32(0), ARG_F32(1), pPortableEntryPoint); + } + + NOINLINE static void CallFunc_F32_I32_RetF32_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + float (*fptr)(int*, float, int32_t, PCODE) = *(float (**)(int*, float, int32_t, PCODE))(pPortableEntryPoint); + *((float*)pRet) = (*fptr)(&framePointer, ARG_F32(0), ARG_I32(1), pPortableEntryPoint); + } + + NOINLINE static void CallFunc_F32_RetF32_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + float (*fptr)(int*, float, PCODE) = *(float (**)(int*, float, PCODE))(pPortableEntryPoint); + *((float*)pRet) = (*fptr)(&framePointer, ARG_F32(0), pPortableEntryPoint); + } + + static void CallFunc_Void_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)() = (int32_t (*)())pcode; + *((int32_t*)pRet) = (*fptr)(); + } + + static void CallFunc_S64_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t) = (int32_t (*)(int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_IND(0), ARG_I32(8)); + } + + static void CallFunc_S8_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t) = (int32_t (*)(int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_IND(0)); + } + + static void CallFunc_S8_S8_S8_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_IND(0), ARG_IND(1), ARG_IND(2), ARG_I32(3)); + } + + static void CallFunc_S8_S8_I32_S8_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_IND(0), ARG_IND(1), ARG_I32(2), ARG_IND(3), ARG_I32(4)); + } + + static void CallFunc_S8_S8_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_IND(0), ARG_IND(1), ARG_I32(2), ARG_I32(3)); + } + + static void CallFunc_S8_S8_I32_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_IND(0), ARG_IND(1), ARG_I32(2), ARG_I32(3), ARG_I32(4)); + } + + static void CallFunc_S8_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t) = (int32_t (*)(int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_IND(0), ARG_I32(1)); + } + + static void CallFunc_S8_I32_S8_S8_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_IND(0), ARG_I32(1), ARG_IND(2), ARG_IND(3), ARG_I32(4)); + } + + static void CallFunc_S8_I32_S8_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_IND(0), ARG_I32(1), ARG_IND(2), ARG_I32(3), ARG_I32(4)); + } + + static void CallFunc_S8_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_IND(0), ARG_I32(1), ARG_I32(2)); + } + + static void CallFunc_S8_I32_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_IND(0), ARG_I32(1), ARG_I32(2), ARG_I32(3)); + } + + static void CallFunc_S8_I32_I32_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_IND(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), ARG_I32(4)); + } + + static void CallFunc_S8_I32_I32_I32_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_IND(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), ARG_I32(4), ARG_I32(5)); + } + + static void CallFunc_S8_I32_I32_I32_I32_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_IND(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), ARG_I32(4), ARG_I32(5), ARG_I32(6)); + } + + NOINLINE static void CallFunc_This_I32_RetI32_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + int32_t (*fptr)(int*, int32_t, int32_t, PCODE) = *(int32_t (**)(int*, int32_t, int32_t, PCODE))(pPortableEntryPoint); + *((int32_t*)pRet) = (*fptr)(&framePointer, ARG_I32(0), ARG_I32(1), pPortableEntryPoint); + } + + NOINLINE static void CallFunc_This_RetI32_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + int32_t (*fptr)(int*, int32_t, PCODE) = *(int32_t (**)(int*, int32_t, PCODE))(pPortableEntryPoint); + *((int32_t*)pRet) = (*fptr)(&framePointer, ARG_I32(0), pPortableEntryPoint); + } + + static void CallFunc_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t) = (int32_t (*)(int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0)); + } + + static void CallFunc_I32_S8_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0), ARG_IND(1), ARG_I32(2), ARG_I32(3)); + } + + static void CallFunc_I32_S8_I32_I32_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0), ARG_IND(1), ARG_I32(2), ARG_I32(3), ARG_I32(4), ARG_I32(5)); + } + + static void CallFunc_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t) = (int32_t (*)(int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I32(1)); + } + + static void CallFunc_I32_I32_S8_I32_I32_S8_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I32(1), ARG_IND(2), ARG_I32(3), ARG_I32(4), ARG_IND(5), ARG_I32(6)); + } + + static void CallFunc_I32_I32_S8_I32_I32_I32_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I32(1), ARG_IND(2), ARG_I32(3), ARG_I32(4), ARG_I32(5), ARG_I32(6), ARG_I32(7)); + } + + static void CallFunc_I32_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I32(2)); + } + + static void CallFunc_I32_I32_I32_S8_I32_I32_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I32(2), ARG_IND(3), ARG_I32(4), ARG_I32(5), ARG_I32(6), ARG_I32(7)); + } + + static void CallFunc_I32_I32_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I32(2), ARG_I32(3)); + } + + static void CallFunc_I32_I32_I32_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), ARG_I32(4)); + } + + static void CallFunc_I32_I32_I32_I32_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), ARG_I32(4), ARG_I32(5)); + } + + static void CallFunc_I32_I32_I32_I32_I32_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), ARG_I32(4), ARG_I32(5), ARG_I32(6)); + } + + static void CallFunc_I32_I32_I32_I32_I32_I32_I32_I32_I32_I32_I32_I32_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), ARG_I32(4), ARG_I32(5), ARG_I32(6), ARG_I32(7), ARG_I32(8), ARG_I32(9), ARG_I32(10), ARG_I32(11), ARG_I32(12), ARG_I32(13)); + } + + NOINLINE static void CallFunc_I32_I32_I32_I32_I32_I32_RetI32_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + int32_t (*fptr)(int*, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, PCODE) = *(int32_t (**)(int*, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, PCODE))(pPortableEntryPoint); + *((int32_t*)pRet) = (*fptr)(&framePointer, ARG_I32(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), ARG_I32(4), ARG_I32(5), pPortableEntryPoint); + } + + NOINLINE static void CallFunc_I32_I32_I32_I32_I32_RetI32_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + int32_t (*fptr)(int*, int32_t, int32_t, int32_t, int32_t, int32_t, PCODE) = *(int32_t (**)(int*, int32_t, int32_t, int32_t, int32_t, int32_t, PCODE))(pPortableEntryPoint); + *((int32_t*)pRet) = (*fptr)(&framePointer, ARG_I32(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), ARG_I32(4), pPortableEntryPoint); + } + + NOINLINE static void CallFunc_I32_I32_I32_I32_RetI32_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + int32_t (*fptr)(int*, int32_t, int32_t, int32_t, int32_t, PCODE) = *(int32_t (**)(int*, int32_t, int32_t, int32_t, int32_t, PCODE))(pPortableEntryPoint); + *((int32_t*)pRet) = (*fptr)(&framePointer, ARG_I32(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), pPortableEntryPoint); + } + + static void CallFunc_I32_I32_I32_I64_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int64_t) = (int32_t (*)(int32_t, int32_t, int32_t, int64_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I32(2), ARG_I64(3)); + } + + NOINLINE static void CallFunc_I32_I32_I32_RetI32_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + int32_t (*fptr)(int*, int32_t, int32_t, int32_t, PCODE) = *(int32_t (**)(int*, int32_t, int32_t, int32_t, PCODE))(pPortableEntryPoint); + *((int32_t*)pRet) = (*fptr)(&framePointer, ARG_I32(0), ARG_I32(1), ARG_I32(2), pPortableEntryPoint); + } + + static void CallFunc_I32_I32_I64_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int64_t) = (int32_t (*)(int32_t, int32_t, int64_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I64(2)); + } + + static void CallFunc_I32_I32_I64_I32_I32_I32_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int64_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int64_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I64(2), ARG_I32(3), ARG_I32(4), ARG_I32(5), ARG_I32(6), ARG_I32(7)); + } + + NOINLINE static void CallFunc_I32_I32_RetI32_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + int32_t (*fptr)(int*, int32_t, int32_t, PCODE) = *(int32_t (**)(int*, int32_t, int32_t, PCODE))(pPortableEntryPoint); + *((int32_t*)pRet) = (*fptr)(&framePointer, ARG_I32(0), ARG_I32(1), pPortableEntryPoint); + } + + static void CallFunc_I32_I64_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int64_t) = (int32_t (*)(int32_t, int64_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I64(1)); + } + + static void CallFunc_I32_I64_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int64_t, int32_t) = (int32_t (*)(int32_t, int64_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I64(1), ARG_I32(2)); + } + + static void CallFunc_I32_I64_I32_I32_I32_I64_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int64_t, int32_t, int32_t, int32_t, int64_t) = (int32_t (*)(int32_t, int64_t, int32_t, int32_t, int32_t, int64_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I64(1), ARG_I32(2), ARG_I32(3), ARG_I32(4), ARG_I64(5)); + } + + static void CallFunc_I32_I64_I64_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int64_t, int64_t) = (int32_t (*)(int32_t, int64_t, int64_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I64(1), ARG_I64(2)); + } + + static void CallFunc_I32_I64_I64_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int64_t, int64_t, int32_t) = (int32_t (*)(int32_t, int64_t, int64_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I64(1), ARG_I64(2), ARG_I32(3)); + } + + NOINLINE static void CallFunc_I32_RetI32_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + int32_t (*fptr)(int*, int32_t, PCODE) = *(int32_t (**)(int*, int32_t, PCODE))(pPortableEntryPoint); + *((int32_t*)pRet) = (*fptr)(&framePointer, ARG_I32(0), pPortableEntryPoint); + } + + static void CallFunc_I64_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int64_t, int32_t) = (int32_t (*)(int64_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I64(0), ARG_I32(1)); + } + + static void CallFunc_I64_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int64_t, int32_t, int32_t) = (int32_t (*)(int64_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I64(0), ARG_I32(1), ARG_I32(2)); + } + + static void CallFunc_I64_I32_I64_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int64_t, int32_t, int64_t, int32_t, int32_t) = (int32_t (*)(int64_t, int32_t, int64_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I64(0), ARG_I32(1), ARG_I64(2), ARG_I32(3), ARG_I32(4)); + } + + NOINLINE static void CallFunc_Void_RetI32_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + int32_t (*fptr)(int*, PCODE) = *(int32_t (**)(int*, PCODE))(pPortableEntryPoint); + *((int32_t*)pRet) = (*fptr)(&framePointer, pPortableEntryPoint); + } + + static void CallFunc_Void_RetI64(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int64_t (*fptr)() = (int64_t (*)())pcode; + *((int64_t*)pRet) = (*fptr)(); + } + + static void CallFunc_I32_RetI64(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int64_t (*fptr)(int32_t) = (int64_t (*)(int32_t))pcode; + *((int64_t*)pRet) = (*fptr)(ARG_I32(0)); + } + + static void CallFunc_I32_I32_I32_RetI64(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int64_t (*fptr)(int32_t, int32_t, int32_t) = (int64_t (*)(int32_t, int32_t, int32_t))pcode; + *((int64_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I32(2)); + } + + static void CallFunc_I32_I32_I32_I32_I32_I32_RetI64(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int64_t (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (int64_t (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + *((int64_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), ARG_I32(4), ARG_I32(5)); + } + + static void CallFunc_I32_I32_I32_I64_RetI64(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int64_t (*fptr)(int32_t, int32_t, int32_t, int64_t) = (int64_t (*)(int32_t, int32_t, int32_t, int64_t))pcode; + *((int64_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I32(2), ARG_I64(3)); + } + + static void CallFunc_I32_I64_I32_RetI64(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int64_t (*fptr)(int32_t, int64_t, int32_t) = (int64_t (*)(int32_t, int64_t, int32_t))pcode; + *((int64_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I64(1), ARG_I32(2)); + } + + NOINLINE static void CallFunc_I32_I64_I64_RetI64_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + int64_t (*fptr)(int*, int32_t, int64_t, int64_t, PCODE) = *(int64_t (**)(int*, int32_t, int64_t, int64_t, PCODE))(pPortableEntryPoint); + *((int64_t*)pRet) = (*fptr)(&framePointer, ARG_I32(0), ARG_I64(1), ARG_I64(2), pPortableEntryPoint); + } + + NOINLINE static void CallFunc_I32_I64_RetI64_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + int64_t (*fptr)(int*, int32_t, int64_t, PCODE) = *(int64_t (**)(int*, int32_t, int64_t, PCODE))(pPortableEntryPoint); + *((int64_t*)pRet) = (*fptr)(&framePointer, ARG_I32(0), ARG_I64(1), pPortableEntryPoint); + } + + NOINLINE static void CallFunc_I32_RetI64_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + int64_t (*fptr)(int*, int32_t, PCODE) = *(int64_t (**)(int*, int32_t, PCODE))(pPortableEntryPoint); + *((int64_t*)pRet) = (*fptr)(&framePointer, ARG_I32(0), pPortableEntryPoint); + } + + NOINLINE static void CallFunc_I64_I64_RetI64_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + int64_t (*fptr)(int*, int64_t, int64_t, PCODE) = *(int64_t (**)(int*, int64_t, int64_t, PCODE))(pPortableEntryPoint); + *((int64_t*)pRet) = (*fptr)(&framePointer, ARG_I64(0), ARG_I64(1), pPortableEntryPoint); + } + + NOINLINE static void CallFunc_Void_RetI64_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + int64_t (*fptr)(int*, PCODE) = *(int64_t (**)(int*, PCODE))(pPortableEntryPoint); + *((int64_t*)pRet) = (*fptr)(&framePointer, pPortableEntryPoint); + } + + static void CallFunc_Void_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)() = (void (*)())pcode; + (*fptr)(); + } + + static void CallFunc_S8_S8_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t) = (void (*)(int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_IND(0), ARG_IND(1), ARG_I32(2)); + } + + static void CallFunc_S8_S8_I32_I32_I32_I32_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (void (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_IND(0), ARG_IND(1), ARG_I32(2), ARG_I32(3), ARG_I32(4), ARG_I32(5), ARG_I32(6), ARG_I32(7)); + } + + static void CallFunc_S8_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t) = (void (*)(int32_t, int32_t))pcode; + (*fptr)(ARG_IND(0), ARG_I32(1)); + } + + static void CallFunc_S8_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t) = (void (*)(int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_IND(0), ARG_I32(1), ARG_I32(2)); + } + + static void CallFunc_S8_I32_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t, int32_t) = (void (*)(int32_t, int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_IND(0), ARG_I32(1), ARG_I32(2), ARG_I32(3)); + } + + static void CallFunc_S8_I32_I32_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t) = (void (*)(int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_IND(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), ARG_I32(4)); + } + + static void CallFunc_S8_I32_I32_I32_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (void (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_IND(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), ARG_I32(4), ARG_I32(5)); + } + + static void CallFunc_S8_I32_I32_I32_I32_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (void (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_IND(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), ARG_I32(4), ARG_I32(5), ARG_I32(6)); + } + + static void CallFunc_S8_I32_I32_I32_I32_I32_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (void (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_IND(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), ARG_I32(4), ARG_I32(5), ARG_I32(6), ARG_I32(7)); + } + + static void CallFunc_S8_I32_I32_I32_I32_I32_I32_I32_I32_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (void (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_IND(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), ARG_I32(4), ARG_I32(5), ARG_I32(6), ARG_I32(7), ARG_I32(8), ARG_I32(9), ARG_I32(10)); + } + + static void CallFunc_F64_F64_F64_F64_F64_F64_F64_F64_F64_I32_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(double, double, double, double, double, double, double, double, double, int32_t, int32_t, int32_t) = (void (*)(double, double, double, double, double, double, double, double, double, int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_F64(0), ARG_F64(1), ARG_F64(2), ARG_F64(3), ARG_F64(4), ARG_F64(5), ARG_F64(6), ARG_F64(7), ARG_F64(8), ARG_I32(9), ARG_I32(10), ARG_I32(11)); + } + + static void CallFunc_F64_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(double, int32_t, int32_t) = (void (*)(double, int32_t, int32_t))pcode; + (*fptr)(ARG_F64(0), ARG_I32(1), ARG_I32(2)); + } + + static void CallFunc_F64_I32_I32_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(double, int32_t, int32_t, int32_t, int32_t) = (void (*)(double, int32_t, int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_F64(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), ARG_I32(4)); + } + + NOINLINE static void CallFunc_F64_I32_I32_RetVoid_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + void (*fptr)(int*, double, int32_t, int32_t, PCODE) = *(void (**)(int*, double, int32_t, int32_t, PCODE))(pPortableEntryPoint); + (*fptr)(&framePointer, ARG_F64(0), ARG_I32(1), ARG_I32(2), pPortableEntryPoint); + } + + NOINLINE static void CallFunc_F32_I32_I32_RetVoid_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + void (*fptr)(int*, float, int32_t, int32_t, PCODE) = *(void (**)(int*, float, int32_t, int32_t, PCODE))(pPortableEntryPoint); + (*fptr)(&framePointer, ARG_F32(0), ARG_I32(1), ARG_I32(2), pPortableEntryPoint); + } + + static void CallFunc_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t) = (void (*)(int32_t))pcode; + (*fptr)(ARG_I32(0)); + } + + static void CallFunc_I32_S8_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t) = (void (*)(int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_I32(0), ARG_IND(1), ARG_I32(2)); + } + + static void CallFunc_I32_S8_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t, int32_t) = (void (*)(int32_t, int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_I32(0), ARG_IND(1), ARG_I32(2), ARG_I32(3)); + } + + static void CallFunc_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t) = (void (*)(int32_t, int32_t))pcode; + (*fptr)(ARG_I32(0), ARG_I32(1)); + } + + static void CallFunc_I32_I32_S8_S8_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (void (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_I32(0), ARG_I32(1), ARG_IND(2), ARG_IND(3), ARG_I32(4), ARG_I32(5)); + } + + static void CallFunc_I32_I32_S8_S8_I32_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (void (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_I32(0), ARG_I32(1), ARG_IND(2), ARG_IND(3), ARG_I32(4), ARG_I32(5), ARG_I32(6)); + } + + static void CallFunc_I32_I32_F64_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, double, int32_t) = (void (*)(int32_t, int32_t, double, int32_t))pcode; + (*fptr)(ARG_I32(0), ARG_I32(1), ARG_F64(2), ARG_I32(3)); + } + + static void CallFunc_I32_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t) = (void (*)(int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I32(2)); + } + + static void CallFunc_I32_I32_I32_S8_S8_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (void (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I32(2), ARG_IND(3), ARG_IND(4), ARG_I32(5)); + } + + static void CallFunc_I32_I32_I32_S8_S8_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (void (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I32(2), ARG_IND(3), ARG_IND(4), ARG_I32(5), ARG_I32(6)); + } + + static void CallFunc_I32_I32_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t, int32_t) = (void (*)(int32_t, int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I32(2), ARG_I32(3)); + } + + static void CallFunc_I32_I32_I32_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t) = (void (*)(int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), ARG_I32(4)); + } + + static void CallFunc_I32_I32_I32_I32_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (void (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), ARG_I32(4), ARG_I32(5)); + } + + static void CallFunc_I32_I32_I32_I32_I32_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (void (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), ARG_I32(4), ARG_I32(5), ARG_I32(6)); + } + + static void CallFunc_I32_I32_I32_I32_I64_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t, int32_t, int64_t, int32_t) = (void (*)(int32_t, int32_t, int32_t, int32_t, int64_t, int32_t))pcode; + (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), ARG_I64(4), ARG_I32(5)); + } + + NOINLINE static void CallFunc_I32_I32_I32_RetVoid_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + void (*fptr)(int*, int32_t, int32_t, int32_t, PCODE) = *(void (**)(int*, int32_t, int32_t, int32_t, PCODE))(pPortableEntryPoint); + (*fptr)(&framePointer, ARG_I32(0), ARG_I32(1), ARG_I32(2), pPortableEntryPoint); + } + + NOINLINE static void CallFunc_I32_I32_RetVoid_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + void (*fptr)(int*, int32_t, int32_t, PCODE) = *(void (**)(int*, int32_t, int32_t, PCODE))(pPortableEntryPoint); + (*fptr)(&framePointer, ARG_I32(0), ARG_I32(1), pPortableEntryPoint); + } + + NOINLINE static void CallFunc_I32_RetVoid_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + void (*fptr)(int*, int32_t, PCODE) = *(void (**)(int*, int32_t, PCODE))(pPortableEntryPoint); + (*fptr)(&framePointer, ARG_I32(0), pPortableEntryPoint); + } + + static void CallFunc_I64_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int64_t, int32_t) = (void (*)(int64_t, int32_t))pcode; + (*fptr)(ARG_I64(0), ARG_I32(1)); + } + + NOINLINE static void CallFunc_Void_RetVoid_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + void (*fptr)(int*, PCODE) = *(void (**)(int*, PCODE))(pPortableEntryPoint); + (*fptr)(&framePointer, pPortableEntryPoint); + } +} + +const StringToPortableSigThunk g_portableCallHelperThunks[] = { + { "Mddddp", (void*)&CallFunc_F64_F64_F64_RetF64_PE }, + { "Mdddp", (void*)&CallFunc_F64_F64_RetF64_PE }, + { "Mddip", (void*)&CallFunc_F64_I32_RetF64_PE }, + { "Mddp", (void*)&CallFunc_F64_RetF64_PE }, + { "Mdi", (void*)&CallFunc_I32_RetF64 }, + { "Mffffp", (void*)&CallFunc_F32_F32_F32_RetF32_PE }, + { "Mfffp", (void*)&CallFunc_F32_F32_RetF32_PE }, + { "Mffip", (void*)&CallFunc_F32_I32_RetF32_PE }, + { "Mffp", (void*)&CallFunc_F32_RetF32_PE }, + { "Mi", (void*)&CallFunc_Void_RetI32 }, + { "MiS64i", (void*)&CallFunc_S64_I32_RetI32 }, + { "MiS8", (void*)&CallFunc_S8_RetI32 }, + { "MiS8S8S8i", (void*)&CallFunc_S8_S8_S8_I32_RetI32 }, + { "MiS8S8iS8i", (void*)&CallFunc_S8_S8_I32_S8_I32_RetI32 }, + { "MiS8S8ii", (void*)&CallFunc_S8_S8_I32_I32_RetI32 }, + { "MiS8S8iii", (void*)&CallFunc_S8_S8_I32_I32_I32_RetI32 }, + { "MiS8i", (void*)&CallFunc_S8_I32_RetI32 }, + { "MiS8iS8S8i", (void*)&CallFunc_S8_I32_S8_S8_I32_RetI32 }, + { "MiS8iS8ii", (void*)&CallFunc_S8_I32_S8_I32_I32_RetI32 }, + { "MiS8ii", (void*)&CallFunc_S8_I32_I32_RetI32 }, + { "MiS8iii", (void*)&CallFunc_S8_I32_I32_I32_RetI32 }, + { "MiS8iiii", (void*)&CallFunc_S8_I32_I32_I32_I32_RetI32 }, + { "MiS8iiiii", (void*)&CallFunc_S8_I32_I32_I32_I32_I32_RetI32 }, + { "MiS8iiiiii", (void*)&CallFunc_S8_I32_I32_I32_I32_I32_I32_RetI32 }, + { "MiTip", (void*)&CallFunc_This_I32_RetI32_PE }, + { "MiTp", (void*)&CallFunc_This_RetI32_PE }, + { "Mii", (void*)&CallFunc_I32_RetI32 }, + { "MiiS8ii", (void*)&CallFunc_I32_S8_I32_I32_RetI32 }, + { "MiiS8iiii", (void*)&CallFunc_I32_S8_I32_I32_I32_I32_RetI32 }, + { "Miii", (void*)&CallFunc_I32_I32_RetI32 }, + { "MiiiS8iiS8i", (void*)&CallFunc_I32_I32_S8_I32_I32_S8_I32_RetI32 }, + { "MiiiS8iiiii", (void*)&CallFunc_I32_I32_S8_I32_I32_I32_I32_I32_RetI32 }, + { "Miiii", (void*)&CallFunc_I32_I32_I32_RetI32 }, + { "MiiiiS8iiii", (void*)&CallFunc_I32_I32_I32_S8_I32_I32_I32_I32_RetI32 }, + { "Miiiii", (void*)&CallFunc_I32_I32_I32_I32_RetI32 }, + { "Miiiiii", (void*)&CallFunc_I32_I32_I32_I32_I32_RetI32 }, + { "Miiiiiii", (void*)&CallFunc_I32_I32_I32_I32_I32_I32_RetI32 }, + { "Miiiiiiii", (void*)&CallFunc_I32_I32_I32_I32_I32_I32_I32_RetI32 }, + { "Miiiiiiiiiiiiiii", (void*)&CallFunc_I32_I32_I32_I32_I32_I32_I32_I32_I32_I32_I32_I32_I32_I32_RetI32 }, + { "Miiiiiiip", (void*)&CallFunc_I32_I32_I32_I32_I32_I32_RetI32_PE }, + { "Miiiiiip", (void*)&CallFunc_I32_I32_I32_I32_I32_RetI32_PE }, + { "Miiiiip", (void*)&CallFunc_I32_I32_I32_I32_RetI32_PE }, + { "Miiiil", (void*)&CallFunc_I32_I32_I32_I64_RetI32 }, + { "Miiiip", (void*)&CallFunc_I32_I32_I32_RetI32_PE }, + { "Miiil", (void*)&CallFunc_I32_I32_I64_RetI32 }, + { "Miiiliiiii", (void*)&CallFunc_I32_I32_I64_I32_I32_I32_I32_I32_RetI32 }, + { "Miiip", (void*)&CallFunc_I32_I32_RetI32_PE }, + { "Miil", (void*)&CallFunc_I32_I64_RetI32 }, + { "Miili", (void*)&CallFunc_I32_I64_I32_RetI32 }, + { "Miiliiil", (void*)&CallFunc_I32_I64_I32_I32_I32_I64_RetI32 }, + { "Miill", (void*)&CallFunc_I32_I64_I64_RetI32 }, + { "Miilli", (void*)&CallFunc_I32_I64_I64_I32_RetI32 }, + { "Miip", (void*)&CallFunc_I32_RetI32_PE }, + { "Mili", (void*)&CallFunc_I64_I32_RetI32 }, + { "Milii", (void*)&CallFunc_I64_I32_I32_RetI32 }, + { "Mililii", (void*)&CallFunc_I64_I32_I64_I32_I32_RetI32 }, + { "Mip", (void*)&CallFunc_Void_RetI32_PE }, + { "Ml", (void*)&CallFunc_Void_RetI64 }, + { "Mli", (void*)&CallFunc_I32_RetI64 }, + { "Mliii", (void*)&CallFunc_I32_I32_I32_RetI64 }, + { "Mliiiiii", (void*)&CallFunc_I32_I32_I32_I32_I32_I32_RetI64 }, + { "Mliiil", (void*)&CallFunc_I32_I32_I32_I64_RetI64 }, + { "Mlili", (void*)&CallFunc_I32_I64_I32_RetI64 }, + { "Mlillp", (void*)&CallFunc_I32_I64_I64_RetI64_PE }, + { "Mlilp", (void*)&CallFunc_I32_I64_RetI64_PE }, + { "Mlip", (void*)&CallFunc_I32_RetI64_PE }, + { "Mlllp", (void*)&CallFunc_I64_I64_RetI64_PE }, + { "Mlp", (void*)&CallFunc_Void_RetI64_PE }, + { "Mv", (void*)&CallFunc_Void_RetVoid }, + { "MvS8S8i", (void*)&CallFunc_S8_S8_I32_RetVoid }, + { "MvS8S8iiiiii", (void*)&CallFunc_S8_S8_I32_I32_I32_I32_I32_I32_RetVoid }, + { "MvS8i", (void*)&CallFunc_S8_I32_RetVoid }, + { "MvS8ii", (void*)&CallFunc_S8_I32_I32_RetVoid }, + { "MvS8iii", (void*)&CallFunc_S8_I32_I32_I32_RetVoid }, + { "MvS8iiii", (void*)&CallFunc_S8_I32_I32_I32_I32_RetVoid }, + { "MvS8iiiii", (void*)&CallFunc_S8_I32_I32_I32_I32_I32_RetVoid }, + { "MvS8iiiiii", (void*)&CallFunc_S8_I32_I32_I32_I32_I32_I32_RetVoid }, + { "MvS8iiiiiii", (void*)&CallFunc_S8_I32_I32_I32_I32_I32_I32_I32_RetVoid }, + { "MvS8iiiiiiiiii", (void*)&CallFunc_S8_I32_I32_I32_I32_I32_I32_I32_I32_I32_I32_RetVoid }, + { "Mvdddddddddiii", (void*)&CallFunc_F64_F64_F64_F64_F64_F64_F64_F64_F64_I32_I32_I32_RetVoid }, + { "Mvdii", (void*)&CallFunc_F64_I32_I32_RetVoid }, + { "Mvdiiii", (void*)&CallFunc_F64_I32_I32_I32_I32_RetVoid }, + { "Mvdiip", (void*)&CallFunc_F64_I32_I32_RetVoid_PE }, + { "Mvfiip", (void*)&CallFunc_F32_I32_I32_RetVoid_PE }, + { "Mvi", (void*)&CallFunc_I32_RetVoid }, + { "MviS8i", (void*)&CallFunc_I32_S8_I32_RetVoid }, + { "MviS8ii", (void*)&CallFunc_I32_S8_I32_I32_RetVoid }, + { "Mvii", (void*)&CallFunc_I32_I32_RetVoid }, + { "MviiS8S8ii", (void*)&CallFunc_I32_I32_S8_S8_I32_I32_RetVoid }, + { "MviiS8S8iii", (void*)&CallFunc_I32_I32_S8_S8_I32_I32_I32_RetVoid }, + { "Mviidi", (void*)&CallFunc_I32_I32_F64_I32_RetVoid }, + { "Mviii", (void*)&CallFunc_I32_I32_I32_RetVoid }, + { "MviiiS8S8i", (void*)&CallFunc_I32_I32_I32_S8_S8_I32_RetVoid }, + { "MviiiS8S8ii", (void*)&CallFunc_I32_I32_I32_S8_S8_I32_I32_RetVoid }, + { "Mviiii", (void*)&CallFunc_I32_I32_I32_I32_RetVoid }, + { "Mviiiii", (void*)&CallFunc_I32_I32_I32_I32_I32_RetVoid }, + { "Mviiiiii", (void*)&CallFunc_I32_I32_I32_I32_I32_I32_RetVoid }, + { "Mviiiiiii", (void*)&CallFunc_I32_I32_I32_I32_I32_I32_I32_RetVoid }, + { "Mviiiili", (void*)&CallFunc_I32_I32_I32_I32_I64_I32_RetVoid }, + { "Mviiip", (void*)&CallFunc_I32_I32_I32_RetVoid_PE }, + { "Mviip", (void*)&CallFunc_I32_I32_RetVoid_PE }, + { "Mvip", (void*)&CallFunc_I32_RetVoid_PE }, + { "Mvli", (void*)&CallFunc_I64_I32_RetVoid }, + { "Mvp", (void*)&CallFunc_Void_RetVoid_PE } +}; + +const size_t g_portableCallHelperThunksCount = sizeof(g_portableCallHelperThunks) / sizeof(g_portableCallHelperThunks[0]); diff --git a/src/coreclr/vm/wasm/browser/diagnostics/callhelpers-pinvoke.cpp b/src/coreclr/vm/wasm/browser/diagnostics/callhelpers-pinvoke.cpp new file mode 100644 index 00000000000000..6d406da5e8574d --- /dev/null +++ b/src/coreclr/vm/wasm/browser/diagnostics/callhelpers-pinvoke.cpp @@ -0,0 +1,938 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// + +// +// GENERATED FILE, DON'T EDIT +// Generated by coreclr callhelpers generator +// + +#include +#include + +extern "C" { + uint32_t CompressionNative_Crc32 (uint32_t, void *, int32_t); + int32_t CompressionNative_Deflate (void *, int32_t); + int32_t CompressionNative_DeflateEnd (void *); + int32_t CompressionNative_DeflateInit2_ (void *, int32_t, int32_t, int32_t, int32_t, int32_t); + int32_t CompressionNative_DeflateReset (void *); + int32_t CompressionNative_Inflate (void *, int32_t); + int32_t CompressionNative_InflateEnd (void *); + int32_t CompressionNative_InflateInit2_ (void *, int32_t); + int32_t CompressionNative_InflateReset2_ (void *, int32_t); + void GlobalizationNative_ChangeCase (void *, int32_t, void *, int32_t, int32_t); + void GlobalizationNative_ChangeCaseInvariant (void *, int32_t, void *, int32_t, int32_t); + void GlobalizationNative_ChangeCaseTurkish (void *, int32_t, void *, int32_t, int32_t); + void GlobalizationNative_CloseSortHandle (void *); + int32_t GlobalizationNative_CompareString (void *, void *, int32_t, void *, int32_t, int32_t); + int32_t GlobalizationNative_EndsWith (void *, void *, int32_t, void *, int32_t, int32_t, void *); + int32_t GlobalizationNative_EnumCalendarInfo (void *, void *, uint32_t, int32_t, void *); + int32_t GlobalizationNative_GetCalendarInfo (void *, uint32_t, int32_t, void *, int32_t); + int32_t GlobalizationNative_GetCalendars (void *, void *, int32_t); + int32_t GlobalizationNative_GetDefaultLocaleName (void *, int32_t); + int32_t GlobalizationNative_GetJapaneseEraStartDate (int32_t, void *, void *, void *); + int32_t GlobalizationNative_GetLatestJapaneseEra (); + int32_t GlobalizationNative_GetLocaleInfoGroupingSizes (void *, uint32_t, void *, void *); + int32_t GlobalizationNative_GetLocaleInfoInt (void *, uint32_t, void *); + int32_t GlobalizationNative_GetLocaleInfoString (void *, uint32_t, void *, int32_t, void *); + int32_t GlobalizationNative_GetLocaleName (void *, void *, int32_t); + int32_t GlobalizationNative_GetLocaleTimeFormat (void *, int32_t, void *, int32_t); + int32_t GlobalizationNative_GetLocales (void *, int32_t); + int32_t GlobalizationNative_GetSortHandle (void *, void *); + int32_t GlobalizationNative_GetSortKey (void *, void *, int32_t, void *, int32_t, int32_t); + int32_t GlobalizationNative_GetSortVersion (void *); + int32_t GlobalizationNative_IndexOf (void *, void *, int32_t, void *, int32_t, int32_t, void *); + void GlobalizationNative_InitICUFunctions (void *, void *, void *, void *); + void GlobalizationNative_InitOrdinalCasingPage (int32_t, void *); + void GlobalizationNative_InitOrdinalLowerCasingPage (int32_t, void *); + int32_t GlobalizationNative_IsNormalized (int32_t, void *, int32_t); + int32_t GlobalizationNative_IsPredefinedLocale (void *); + int32_t GlobalizationNative_LastIndexOf (void *, void *, int32_t, void *, int32_t, int32_t, void *); + int32_t GlobalizationNative_LoadICU (); + int32_t GlobalizationNative_NormalizeString (int32_t, void *, int32_t, void *, int32_t); + int32_t GlobalizationNative_StartsWith (void *, void *, int32_t, void *, int32_t, int32_t, void *); + int32_t GlobalizationNative_ToAscii (uint32_t, void *, int32_t, void *, int32_t); + int32_t GlobalizationNative_ToUnicode (uint32_t, void *, int32_t, void *, int32_t); + void * SystemInteropJS_BindJSImportST (void *); + void SystemInteropJS_CancelPromise (void *); + void SystemInteropJS_InvokeJSFunction (void *, void *); + void SystemInteropJS_InvokeJSImportST (int32_t, void *); + void SystemInteropJS_ReleaseCSOwnedObject (void *); + void SystemInteropJS_ResolveOrRejectPromise (void *); + void * SystemJS_GetLocaleInfo (void *, int32_t, void *, int32_t, void *, int32_t, void *); + int32_t SystemNative_Access (void *, int32_t); + void * SystemNative_AlignedAlloc (void *, void *); + void SystemNative_AlignedFree (void *); + void * SystemNative_AlignedRealloc (void *, void *, void *); + void * SystemNative_Calloc (void *, void *); + int32_t SystemNative_CanGetHiddenFlag (); + int32_t SystemNative_ChDir (void *); + int32_t SystemNative_ChMod (void *, int32_t); + int32_t SystemNative_Close (void *); + int32_t SystemNative_CloseDir (void *); + int32_t SystemNative_ConvertErrorPalToPlatform (int32_t); + int32_t SystemNative_ConvertErrorPlatformToPal (int32_t); + int32_t SystemNative_CopyFile (void *, void *, int64_t); + int32_t SystemNative_FAllocate (void *, int64_t, int64_t); + int32_t SystemNative_FChMod (void *, int32_t); + int32_t SystemNative_FChflags (void *, uint32_t); + int32_t SystemNative_FLock (void *, int32_t); + int32_t SystemNative_FStat (void *, void *); + int32_t SystemNative_FSync (void *); + int32_t SystemNative_FTruncate (void *, int64_t); + int32_t SystemNative_FUTimens (void *, void *); + int32_t SystemNative_FcntlGetIsNonBlocking (void *, void *); + int32_t SystemNative_FcntlSetFD (void *, int32_t); + int32_t SystemNative_FileSystemSupportsLocking (void *, int32_t, int32_t); + void SystemNative_Free (void *); + void SystemNative_FreeLibrary (void *); + double SystemNative_GetCpuUtilization (void *); + int32_t SystemNative_GetCryptographicallySecureRandomBytes (void *, int32_t); + void * SystemNative_GetCwd (void *, int32_t); + void * SystemNative_GetDefaultSearchOrderPseudoHandle (); + int32_t SystemNative_GetErrNo (); + void * SystemNative_GetLoadLibraryError (); + int64_t SystemNative_GetLowResolutionTimestamp (); + void SystemNative_GetNonCryptographicallySecureRandomBytes (void *, int32_t); + void * SystemNative_GetProcAddress (void *, void *); + int64_t SystemNative_GetSystemTimeAsTicks (); + void * SystemNative_GetTimeZoneData (void *, void *); + int64_t SystemNative_GetTimestamp (); + int32_t SystemNative_IsMemfdSupported (); + int32_t SystemNative_LChflags (void *, uint32_t); + int32_t SystemNative_LChflagsCanSetHiddenFlag (); + int64_t SystemNative_LSeek (void *, int64_t, int32_t); + int32_t SystemNative_LStat (void *, void *); + int32_t SystemNative_Link (void *, void *); + void * SystemNative_LoadLibrary (void *); + int32_t SystemNative_LockFileRegion (void *, int64_t, int64_t, int32_t); + void SystemNative_Log (void *, int32_t); + void SystemNative_LogError (void *, int32_t); + int32_t SystemNative_MAdvise (void *, uint64_t, int32_t); + void * SystemNative_MMap (void *, uint64_t, int32_t, int32_t, void *, int64_t); + int32_t SystemNative_MSync (void *, uint64_t, int32_t); + int32_t SystemNative_MUnmap (void *, uint64_t); + void * SystemNative_Malloc (void *); + void * SystemNative_MemfdCreate (void *, int32_t); + int32_t SystemNative_MkDir (void *, int32_t); + void * SystemNative_MkdTemp (void *); + void * SystemNative_MksTemps (void *, int32_t); + void * SystemNative_Open (void *, int32_t, int32_t); + void * SystemNative_OpenDir (void *); + int32_t SystemNative_PRead (void *, void *, int32_t, int64_t); + int64_t SystemNative_PReadV (void *, void *, int32_t, int64_t); + int32_t SystemNative_PWrite (void *, void *, int32_t, int64_t); + int64_t SystemNative_PWriteV (void *, void *, int32_t, int64_t); + int32_t SystemNative_Pipe (void *, int32_t); + int32_t SystemNative_PosixFAdvise (void *, int64_t, int64_t, int32_t); + int32_t SystemNative_Read (void *, void *, int32_t); + int32_t SystemNative_ReadDir (void *, void *); + int32_t SystemNative_ReadFromNonblocking (void *, void *, int32_t); + int32_t SystemNative_ReadLink (void *, void *, int32_t); + int64_t SystemNative_ReadV (void *, void *, int32_t); + void * SystemNative_Realloc (void *, void *); + int32_t SystemNative_Rename (void *, void *); + int32_t SystemNative_RmDir (void *); + void SystemNative_SetErrNo (int32_t); + void * SystemNative_ShmOpen (void *, int32_t, int32_t); + int32_t SystemNative_ShmUnlink (void *); + int32_t SystemNative_Stat (void *, void *); + void * SystemNative_StrErrorR (int32_t, void *, int32_t); + int32_t SystemNative_SymLink (void *, void *); + int64_t SystemNative_SysConf (int32_t); + void SystemNative_SysLog (int32_t, void *, void *); + int32_t SystemNative_ThreadSleep (int32_t); + int32_t SystemNative_UTimensat (void *, void *); + int32_t SystemNative_Unlink (void *); + int32_t SystemNative_Write (void *, void *, int32_t); + int32_t SystemNative_WriteToNonblocking (void *, void *, int32_t); + int64_t SystemNative_WriteV (void *, void *, int32_t); +} // extern "C" + +static const Entry s_libSystem_Globalization_Native [] = { + DllImportEntry(GlobalizationNative_ChangeCase) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_ChangeCaseInvariant) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_ChangeCaseTurkish) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_CloseSortHandle) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_CompareString) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_EndsWith) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_EnumCalendarInfo) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_GetCalendarInfo) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_GetCalendars) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_GetDefaultLocaleName) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_GetJapaneseEraStartDate) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_GetLatestJapaneseEra) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_GetLocaleInfoGroupingSizes) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_GetLocaleInfoInt) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_GetLocaleInfoString) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_GetLocaleName) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_GetLocaleTimeFormat) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_GetLocales) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_GetSortHandle) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_GetSortKey) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_GetSortVersion) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_IndexOf) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_InitICUFunctions) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_InitOrdinalCasingPage) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_InitOrdinalLowerCasingPage) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_IsNormalized) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_IsPredefinedLocale) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_LastIndexOf) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_LoadICU) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_NormalizeString) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_StartsWith) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_ToAscii) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_ToUnicode) // System.Private.CoreLib +}; + +static const Entry s_libSystem_IO_Compression_Native [] = { + DllImportEntry(CompressionNative_Crc32) // System.IO.Compression + DllImportEntry(CompressionNative_Deflate) // System.IO.Compression, System.Net.WebSockets + DllImportEntry(CompressionNative_DeflateEnd) // System.IO.Compression, System.Net.WebSockets + DllImportEntry(CompressionNative_DeflateInit2_) // System.IO.Compression, System.Net.WebSockets + DllImportEntry(CompressionNative_DeflateReset) // System.IO.Compression + DllImportEntry(CompressionNative_Inflate) // System.IO.Compression, System.Net.WebSockets + DllImportEntry(CompressionNative_InflateEnd) // System.IO.Compression, System.Net.WebSockets + DllImportEntry(CompressionNative_InflateInit2_) // System.IO.Compression, System.Net.WebSockets + DllImportEntry(CompressionNative_InflateReset2_) // System.IO.Compression +}; + +static const Entry s_libSystem_Native [] = { + DllImportEntry(SystemNative_Access) // System.Private.CoreLib + DllImportEntry(SystemNative_AlignedAlloc) // System.Private.CoreLib + DllImportEntry(SystemNative_AlignedFree) // System.Private.CoreLib + DllImportEntry(SystemNative_AlignedRealloc) // System.Private.CoreLib + DllImportEntry(SystemNative_Calloc) // System.Private.CoreLib + DllImportEntry(SystemNative_CanGetHiddenFlag) // System.Private.CoreLib + DllImportEntry(SystemNative_ChDir) // System.Private.CoreLib + DllImportEntry(SystemNative_ChMod) // System.Private.CoreLib + DllImportEntry(SystemNative_Close) // System.Private.CoreLib + DllImportEntry(SystemNative_CloseDir) // System.Private.CoreLib + DllImportEntry(SystemNative_ConvertErrorPalToPlatform) // System.Console, System.IO.Compression.ZipFile, System.IO.MemoryMappedFiles, System.Net.Primitives, System.Private.CoreLib + DllImportEntry(SystemNative_ConvertErrorPlatformToPal) // System.Console, System.IO.Compression.ZipFile, System.IO.MemoryMappedFiles, System.Net.Primitives, System.Private.CoreLib + DllImportEntry(SystemNative_CopyFile) // System.Private.CoreLib + DllImportEntry(SystemNative_FAllocate) // System.Private.CoreLib + DllImportEntry(SystemNative_FChMod) // System.Private.CoreLib + DllImportEntry(SystemNative_FChflags) // System.Private.CoreLib + DllImportEntry(SystemNative_FLock) // System.Private.CoreLib + DllImportEntry(SystemNative_FStat) // System.IO.Compression.ZipFile, System.Private.CoreLib + DllImportEntry(SystemNative_FSync) // System.Private.CoreLib + DllImportEntry(SystemNative_FTruncate) // System.IO.MemoryMappedFiles, System.Private.CoreLib + DllImportEntry(SystemNative_FUTimens) // System.Private.CoreLib + DllImportEntry(SystemNative_FcntlGetIsNonBlocking) // System.Private.CoreLib + DllImportEntry(SystemNative_FcntlSetFD) // System.IO.MemoryMappedFiles + DllImportEntry(SystemNative_FileSystemSupportsLocking) // System.Private.CoreLib + DllImportEntry(SystemNative_Free) // System.Private.CoreLib + DllImportEntry(SystemNative_FreeLibrary) // System.Private.CoreLib + DllImportEntry(SystemNative_GetCpuUtilization) // System.Private.CoreLib + DllImportEntry(SystemNative_GetCryptographicallySecureRandomBytes) // System.IO.Compression, System.Private.CoreLib, System.Security.Cryptography + DllImportEntry(SystemNative_GetCwd) // System.Private.CoreLib + DllImportEntry(SystemNative_GetDefaultSearchOrderPseudoHandle) // System.Private.CoreLib + DllImportEntry(SystemNative_GetErrNo) // System.Private.CoreLib + DllImportEntry(SystemNative_GetLoadLibraryError) // System.Private.CoreLib + DllImportEntry(SystemNative_GetLowResolutionTimestamp) // System.Private.CoreLib + DllImportEntry(SystemNative_GetNonCryptographicallySecureRandomBytes) // System.Private.CoreLib + DllImportEntry(SystemNative_GetProcAddress) // System.Private.CoreLib + DllImportEntry(SystemNative_GetSystemTimeAsTicks) // System.Private.CoreLib + DllImportEntry(SystemNative_GetTimeZoneData) // System.Private.CoreLib + DllImportEntry(SystemNative_GetTimestamp) // System.Private.CoreLib + DllImportEntry(SystemNative_IsMemfdSupported) // System.IO.MemoryMappedFiles + DllImportEntry(SystemNative_LChflags) // System.Private.CoreLib + DllImportEntry(SystemNative_LChflagsCanSetHiddenFlag) // System.Private.CoreLib + DllImportEntry(SystemNative_LSeek) // System.Private.CoreLib + DllImportEntry(SystemNative_LStat) // System.Private.CoreLib + DllImportEntry(SystemNative_Link) // System.Private.CoreLib + DllImportEntry(SystemNative_LoadLibrary) // System.Private.CoreLib + DllImportEntry(SystemNative_LockFileRegion) // System.Private.CoreLib + DllImportEntry(SystemNative_Log) // System.Private.CoreLib + DllImportEntry(SystemNative_LogError) // System.Private.CoreLib + DllImportEntry(SystemNative_MAdvise) // System.IO.MemoryMappedFiles + DllImportEntry(SystemNative_MMap) // System.IO.MemoryMappedFiles + DllImportEntry(SystemNative_MSync) // System.IO.MemoryMappedFiles + DllImportEntry(SystemNative_MUnmap) // System.IO.MemoryMappedFiles + DllImportEntry(SystemNative_Malloc) // System.Private.CoreLib + DllImportEntry(SystemNative_MemfdCreate) // System.IO.MemoryMappedFiles + DllImportEntry(SystemNative_MkDir) // System.Private.CoreLib + DllImportEntry(SystemNative_MkdTemp) // System.Private.CoreLib + DllImportEntry(SystemNative_MksTemps) // System.Private.CoreLib + DllImportEntry(SystemNative_Open) // System.Private.CoreLib + DllImportEntry(SystemNative_OpenDir) // System.Private.CoreLib + DllImportEntry(SystemNative_PRead) // System.Private.CoreLib + DllImportEntry(SystemNative_PReadV) // System.Private.CoreLib + DllImportEntry(SystemNative_PWrite) // System.Private.CoreLib + DllImportEntry(SystemNative_PWriteV) // System.Private.CoreLib + DllImportEntry(SystemNative_Pipe) // System.Private.CoreLib + DllImportEntry(SystemNative_PosixFAdvise) // System.Private.CoreLib + DllImportEntry(SystemNative_Read) // System.Private.CoreLib + DllImportEntry(SystemNative_ReadDir) // System.Private.CoreLib + DllImportEntry(SystemNative_ReadFromNonblocking) // System.Private.CoreLib + DllImportEntry(SystemNative_ReadLink) // System.Private.CoreLib + DllImportEntry(SystemNative_ReadV) // System.Private.CoreLib + DllImportEntry(SystemNative_Realloc) // System.Private.CoreLib + DllImportEntry(SystemNative_Rename) // System.Private.CoreLib + DllImportEntry(SystemNative_RmDir) // System.Private.CoreLib + DllImportEntry(SystemNative_SetErrNo) // System.Private.CoreLib + DllImportEntry(SystemNative_ShmOpen) // System.IO.MemoryMappedFiles + DllImportEntry(SystemNative_ShmUnlink) // System.IO.MemoryMappedFiles + DllImportEntry(SystemNative_Stat) // System.IO.Compression.ZipFile, System.Private.CoreLib + DllImportEntry(SystemNative_StrErrorR) // System.Console, System.IO.Compression.ZipFile, System.IO.MemoryMappedFiles, System.Net.Primitives, System.Private.CoreLib + DllImportEntry(SystemNative_SymLink) // System.Private.CoreLib + DllImportEntry(SystemNative_SysConf) // System.IO.MemoryMappedFiles, System.Private.CoreLib + DllImportEntry(SystemNative_SysLog) // System.Private.CoreLib + DllImportEntry(SystemNative_ThreadSleep) // System.Private.CoreLib + DllImportEntry(SystemNative_UTimensat) // System.Private.CoreLib + DllImportEntry(SystemNative_Unlink) // System.IO.MemoryMappedFiles, System.Private.CoreLib + DllImportEntry(SystemNative_Write) // System.Console, System.Private.CoreLib + DllImportEntry(SystemNative_WriteToNonblocking) // System.Private.CoreLib + DllImportEntry(SystemNative_WriteV) // System.Private.CoreLib +}; + +static const Entry s_libSystem_Native_Browser [] = { + DllImportEntry(SystemJS_GetLocaleInfo) // System.Private.CoreLib +}; + +static const Entry s_libSystem_Runtime_InteropServices_JavaScript_Native [] = { + DllImportEntry(SystemInteropJS_BindJSImportST) // System.Runtime.InteropServices.JavaScript + DllImportEntry(SystemInteropJS_CancelPromise) // System.Runtime.InteropServices.JavaScript + DllImportEntry(SystemInteropJS_InvokeJSFunction) // System.Runtime.InteropServices.JavaScript + DllImportEntry(SystemInteropJS_InvokeJSImportST) // System.Runtime.InteropServices.JavaScript + DllImportEntry(SystemInteropJS_ReleaseCSOwnedObject) // System.Runtime.InteropServices.JavaScript + DllImportEntry(SystemInteropJS_ResolveOrRejectPromise) // System.Runtime.InteropServices.JavaScript +}; + +typedef struct PInvokeTable { + const char* LibraryName; + const Entry* Entries; + size_t EntryCount; +} PInvokeTable; + +static PInvokeTable s_PInvokeTables[] = { + {"libSystem.Globalization.Native", s_libSystem_Globalization_Native, 33}, + {"libSystem.IO.Compression.Native", s_libSystem_IO_Compression_Native, 9}, + {"libSystem.Native", s_libSystem_Native, 87}, + {"libSystem.Native.Browser", s_libSystem_Native_Browser, 1}, + {"libSystem.Runtime.InteropServices.JavaScript.Native", s_libSystem_Runtime_InteropServices_JavaScript_Native, 6} +}; +const size_t s_PInvokeTablesCount = sizeof(s_PInvokeTables) / sizeof(s_PInvokeTables[0]); + +const void* callhelpers_pinvoke_override(const char* library_name, const char* entry_point_name) +{ + for (size_t i = 0; i < s_PInvokeTablesCount; i++) + { + if (strcmp(library_name, s_PInvokeTables[i].LibraryName) == 0) + { + LOG((LF_INTEROP, LL_INFO1000, "Wasm callhelpers PInvoke override for: lib: %s, entry: %s \n", library_name, entry_point_name)); + return minipal_resolve_dllimport(s_PInvokeTables[i].Entries, s_PInvokeTables[i].EntryCount, entry_point_name); + } + } + + return nullptr; +} +extern "C" { + void QCall_AppContext_SetFirstChanceExceptionHandler () __asm__("AppContext_SetFirstChanceExceptionHandler"); + int32_t QCall_AppContext_TryGetHostPropertyValue (void *, void *, void *) __asm__("AppContext_TryGetHostPropertyValue"); + void QCall_AppDomain_CreateDynamicAssembly (void *, void *, int32_t, int32_t, void *, void *) __asm__("AppDomain_CreateDynamicAssembly"); + void QCall_AppendExceptionStackFrame (void *, void *, void *, int32_t, void *, void *) __asm__("AppendExceptionStackFrame"); + void QCall_Array_CreateInstance (void *, int32_t, void *, void *, int32_t, void *, void *) __asm__("Array_CreateInstance"); + void QCall_Array_Ctor (void *, uint32_t, void *, void *, void *) __asm__("Array_Ctor"); + void * QCall_Array_GetElementConstructorEntrypoint (void *, void *) __asm__("Array_GetElementConstructorEntrypoint"); + void QCall_AssemblyHandle_GetManifestModuleSlow (void *, void *, void *) __asm__("AssemblyHandle_GetManifestModuleSlow"); + void QCall_AssemblyName_InitializeAssemblySpec (void *, void *, void *) __asm__("AssemblyName_InitializeAssemblySpec"); + void QCall_AssemblyNative_ApplyUpdate (void *, void *, int32_t, void *, int32_t, void *, int32_t, void *) __asm__("AssemblyNative_ApplyUpdate"); + int32_t QCall_AssemblyNative_GetCodeBase (void *, void *, void *) __asm__("AssemblyNative_GetCodeBase"); + void QCall_AssemblyNative_GetEntryAssembly (void *, void *) __asm__("AssemblyNative_GetEntryAssembly"); + void QCall_AssemblyNative_GetEntryPoint (void *, void *, void *) __asm__("AssemblyNative_GetEntryPoint"); + void QCall_AssemblyNative_GetExecutingAssembly (void *, void *, void *) __asm__("AssemblyNative_GetExecutingAssembly"); + void QCall_AssemblyNative_GetExportedTypes (void *, void *, void *) __asm__("AssemblyNative_GetExportedTypes"); + int32_t QCall_AssemblyNative_GetFlags (void *, void *) __asm__("AssemblyNative_GetFlags"); + void QCall_AssemblyNative_GetForwardedType (void *, int32_t, void *, void *) __asm__("AssemblyNative_GetForwardedType"); + void QCall_AssemblyNative_GetFullName (void *, void *, void *) __asm__("AssemblyNative_GetFullName"); + int32_t QCall_AssemblyNative_GetHashAlgorithm (void *, void *) __asm__("AssemblyNative_GetHashAlgorithm"); + void QCall_AssemblyNative_GetImageRuntimeVersion (void *, void *, void *) __asm__("AssemblyNative_GetImageRuntimeVersion"); + void * QCall_AssemblyNative_GetLoadContextForAssembly (void *, void *) __asm__("AssemblyNative_GetLoadContextForAssembly"); + void QCall_AssemblyNative_GetLoadedAssemblies (void *, void *) __asm__("AssemblyNative_GetLoadedAssemblies"); + void QCall_AssemblyNative_GetLocale (void *, void *, void *) __asm__("AssemblyNative_GetLocale"); + void QCall_AssemblyNative_GetLocation (void *, void *, void *) __asm__("AssemblyNative_GetLocation"); + int32_t QCall_AssemblyNative_GetManifestResourceInfo (void *, void *, void *, void *, void *) __asm__("AssemblyNative_GetManifestResourceInfo"); + void QCall_AssemblyNative_GetManifestResourceNames (void *, void *, void *) __asm__("AssemblyNative_GetManifestResourceNames"); + void QCall_AssemblyNative_GetModule (void *, void *, void *, void *) __asm__("AssemblyNative_GetModule"); + void QCall_AssemblyNative_GetModules (void *, int32_t, int32_t, void *, void *) __asm__("AssemblyNative_GetModules"); + void QCall_AssemblyNative_GetPublicKey (void *, void *, void *) __asm__("AssemblyNative_GetPublicKey"); + void QCall_AssemblyNative_GetReferencedAssemblies (void *, void *, void *) __asm__("AssemblyNative_GetReferencedAssemblies"); + void * QCall_AssemblyNative_GetResource (void *, void *, void *, void *) __asm__("AssemblyNative_GetResource"); + void QCall_AssemblyNative_GetSimpleName (void *, void *, void *) __asm__("AssemblyNative_GetSimpleName"); + void QCall_AssemblyNative_GetTypeCore (void *, void *, void *, int32_t, void *, void *) __asm__("AssemblyNative_GetTypeCore"); + void QCall_AssemblyNative_GetTypeCoreIgnoreCase (void *, void *, void *, int32_t, void *, void *) __asm__("AssemblyNative_GetTypeCoreIgnoreCase"); + void QCall_AssemblyNative_GetVersion (void *, void *, void *, void *, void *, void *) __asm__("AssemblyNative_GetVersion"); + void * QCall_AssemblyNative_InitializeAssemblyLoadContext (void *, int32_t, int32_t, void *) __asm__("AssemblyNative_InitializeAssemblyLoadContext"); + void QCall_AssemblyNative_InternalLoad (void *, void *, void *, int32_t, void *, void *, void *) __asm__("AssemblyNative_InternalLoad"); + int32_t QCall_AssemblyNative_InternalTryGetRawMetadata (void *, void *, void *, void *) __asm__("AssemblyNative_InternalTryGetRawMetadata"); + int32_t QCall_AssemblyNative_IsApplyUpdateSupported (void *) __asm__("AssemblyNative_IsApplyUpdateSupported"); + void QCall_AssemblyNative_LoadFromPath (void *, void *, void *, void *) __asm__("AssemblyNative_LoadFromPath"); + void QCall_AssemblyNative_LoadFromStream (void *, void *, int32_t, void *, int32_t, void *, void *) __asm__("AssemblyNative_LoadFromStream"); + void QCall_AssemblyNative_PrepareForAssemblyLoadContextRelease (void *, void *, void *) __asm__("AssemblyNative_PrepareForAssemblyLoadContextRelease"); + void QCall_AssemblyNative_TraceAssemblyLoadFromResolveHandlerInvoked (void *, int32_t, void *, void *, void *) __asm__("AssemblyNative_TraceAssemblyLoadFromResolveHandlerInvoked"); + void QCall_AssemblyNative_TraceAssemblyResolveHandlerInvoked (void *, void *, void *, void *, void *) __asm__("AssemblyNative_TraceAssemblyResolveHandlerInvoked"); + void QCall_AssemblyNative_TraceResolvingHandlerInvoked (void *, void *, void *, void *, void *, void *) __asm__("AssemblyNative_TraceResolvingHandlerInvoked"); + void QCall_AsyncHelpers_AddContinuationToExInternal (void *, void *, void *) __asm__("AsyncHelpers_AddContinuationToExInternal"); + uint32_t QCall_CallFilterFunclet (void *, void *, void *, void *) __asm__("CallFilterFunclet"); + int32_t QCall_CustomAttribute_ParseAttributeUsageAttribute (void *, int32_t, void *, void *, void *) __asm__("CustomAttribute_ParseAttributeUsageAttribute"); + void QCall_DebugDebugger_Break (void *) __asm__("DebugDebugger_Break"); + void QCall_DebugDebugger_CustomNotification (void *, void *) __asm__("DebugDebugger_CustomNotification"); + void QCall_DebugDebugger_GetFuncEvalArgumentType (void *, uint32_t, void *, void *) __asm__("DebugDebugger_GetFuncEvalArgumentType"); + void QCall_DebugDebugger_GetFuncEvalMethod (void *, void *, void *, void *) __asm__("DebugDebugger_GetFuncEvalMethod"); + int32_t QCall_DebugDebugger_IsLoggingHelper () __asm__("DebugDebugger_IsLoggingHelper"); + int32_t QCall_DebugDebugger_IsManagedDebuggerAttached () __asm__("DebugDebugger_IsManagedDebuggerAttached"); + int32_t QCall_DebugDebugger_Launch () __asm__("DebugDebugger_Launch"); + void QCall_DebugDebugger_Log (int32_t, void *, void *) __asm__("DebugDebugger_Log"); + void QCall_DebugDebugger_PrepareFuncEvalResult (void *, void *, void *) __asm__("DebugDebugger_PrepareFuncEvalResult"); + int32_t QCall_DebugDebugger_ReadFuncEvalPrimitiveRegister (void *, uint32_t, void *) __asm__("DebugDebugger_ReadFuncEvalPrimitiveRegister"); + void QCall_DebugDebugger_WriteFuncEvalObjectRegister (void *, uint32_t, void *, void *) __asm__("DebugDebugger_WriteFuncEvalObjectRegister"); + void QCall_DebugDebugger_WriteFuncEvalRegister (void *, uint32_t, void *, uint32_t, void *) __asm__("DebugDebugger_WriteFuncEvalRegister"); + void * QCall_Delegate_AdjustTarget (void *, void *, void *) __asm__("Delegate_AdjustTarget"); + int32_t QCall_Delegate_BindToMethodInfo (void *, void *, void *, void *, int32_t, void *, void *, void *) __asm__("Delegate_BindToMethodInfo"); + int32_t QCall_Delegate_BindToMethodName (void *, void *, void *, void *, int32_t, void *, void *, void *) __asm__("Delegate_BindToMethodName"); + void QCall_Delegate_Construct (void *, void *, void *, void *, void *) __asm__("Delegate_Construct"); + void QCall_Delegate_CreateMethodInfo (void *, void *, void *) __asm__("Delegate_CreateMethodInfo"); + void * QCall_Delegate_GetMethodDesc (void *, void *) __asm__("Delegate_GetMethodDesc"); + void * QCall_Delegate_GetMulticastInvokeSlow (void *, void *) __asm__("Delegate_GetMulticastInvokeSlow"); + void QCall_Delegate_InitializeVirtualCallStub (void *, void *, void *) __asm__("Delegate_InitializeVirtualCallStub"); + void * QCall_DependentHandle_InternalAllocWithGCTransition (void *, void *, void *) __asm__("DependentHandle_InternalAllocWithGCTransition"); + void QCall_DependentHandle_InternalFreeWithGCTransition (void *, void *) __asm__("DependentHandle_InternalFreeWithGCTransition"); + uint32_t QCall_EHEnumInitFromStackFrameIterator (void *, void *, void *) __asm__("EHEnumInitFromStackFrameIterator"); + uint32_t QCall_EHEnumNext (void *, void *, void *) __asm__("EHEnumNext"); + void QCall_Enum_GetValuesAndNames (void *, void *, void *, int32_t, void *) __asm__("Enum_GetValuesAndNames"); + void QCall_Environment_Exit (int32_t, void *) __asm__("Environment_Exit"); + void QCall_Environment_FailFast (void *, void *, void *, void *, void *) __asm__("Environment_FailFast"); + void * QCall_EventPipeInternal_CreateProvider (void *, void *, void *, void *) __asm__("EventPipeInternal_CreateProvider"); + void * QCall_EventPipeInternal_DefineEvent (void *, uint32_t, int64_t, uint32_t, uint32_t, void *, uint32_t, void *) __asm__("EventPipeInternal_DefineEvent"); + void QCall_EventPipeInternal_DeleteProvider (void *, void *) __asm__("EventPipeInternal_DeleteProvider"); + void QCall_EventPipeInternal_Disable (uint64_t, void *) __asm__("EventPipeInternal_Disable"); + uint64_t QCall_EventPipeInternal_Enable (void *, int32_t, uint32_t, void *, uint32_t, void *) __asm__("EventPipeInternal_Enable"); + int32_t QCall_EventPipeInternal_EventActivityIdControl (uint32_t, void *, void *) __asm__("EventPipeInternal_EventActivityIdControl"); + int32_t QCall_EventPipeInternal_GetNextEvent (uint64_t, void *, void *) __asm__("EventPipeInternal_GetNextEvent"); + void * QCall_EventPipeInternal_GetProvider (void *, void *) __asm__("EventPipeInternal_GetProvider"); + int32_t QCall_EventPipeInternal_GetSessionInfo (uint64_t, void *, void *) __asm__("EventPipeInternal_GetSessionInfo"); + int32_t QCall_EventPipeInternal_SignalSession (uint64_t, void *) __asm__("EventPipeInternal_SignalSession"); + void QCall_EventPipeInternal_WriteEventData (void *, void *, uint32_t, void *, void *, void *) __asm__("EventPipeInternal_WriteEventData"); + void QCall_ExceptionNative_GetFrozenStackTrace (void *, void *, void *) __asm__("ExceptionNative_GetFrozenStackTrace"); + void QCall_ExceptionNative_GetMessageFromNativeResources (int32_t, void *, void *) __asm__("ExceptionNative_GetMessageFromNativeResources"); + void QCall_ExceptionNative_GetMethodFromStackTrace (void *, void *, void *) __asm__("ExceptionNative_GetMethodFromStackTrace"); + void QCall_ExceptionNative_ThrowAmbiguousResolutionException (void *, void *, void *, void *) __asm__("ExceptionNative_ThrowAmbiguousResolutionException"); + void QCall_ExceptionNative_ThrowClassAccessException (void *, void *, void *) __asm__("ExceptionNative_ThrowClassAccessException"); + void QCall_ExceptionNative_ThrowEntryPointNotFoundException (void *, void *, void *, void *) __asm__("ExceptionNative_ThrowEntryPointNotFoundException"); + void QCall_ExceptionNative_ThrowFieldAccessException (void *, void *, void *) __asm__("ExceptionNative_ThrowFieldAccessException"); + void QCall_ExceptionNative_ThrowMethodAccessException (void *, void *, void *) __asm__("ExceptionNative_ThrowMethodAccessException"); + void QCall_FileLoadException_GetMessageForHR (int32_t, void *, void *) __asm__("FileLoadException_GetMessageForHR"); + int32_t QCall_FreeEnvironmentStringsW (void *) __asm__("FreeEnvironmentStringsW"); + void * QCall_GCHandle_InternalAllocWithGCTransition (void *, int32_t, void *) __asm__("GCHandle_InternalAllocWithGCTransition"); + void QCall_GCHandle_InternalFreeWithGCTransition (void *, void *) __asm__("GCHandle_InternalFreeWithGCTransition"); + void QCall_GCInterface_AddMemoryPressure (uint64_t, void *) __asm__("GCInterface_AddMemoryPressure"); + void QCall_GCInterface_AllocateNewArray (void *, int32_t, int32_t, void *, void *) __asm__("GCInterface_AllocateNewArray"); + void QCall_GCInterface_Collect (int32_t, int32_t, uint32_t, void *) __asm__("GCInterface_Collect"); + int32_t QCall_GCInterface_EnableNoGCRegionCallback (void *, int64_t, void *) __asm__("GCInterface_EnableNoGCRegionCallback"); + int32_t QCall_GCInterface_EndNoGCRegion (void *) __asm__("GCInterface_EndNoGCRegion"); + void QCall_GCInterface_EnumerateConfigurationValues (void *, void *, void *) __asm__("GCInterface_EnumerateConfigurationValues"); + void * QCall_GCInterface_GetNextFinalizableObject (void *, void *) __asm__("GCInterface_GetNextFinalizableObject"); + int64_t QCall_GCInterface_GetTotalAllocatedBytesPrecise (void *) __asm__("GCInterface_GetTotalAllocatedBytesPrecise"); + int64_t QCall_GCInterface_GetTotalMemory (void *) __asm__("GCInterface_GetTotalMemory"); + void QCall_GCInterface_ReRegisterForFinalize (void *, void *) __asm__("GCInterface_ReRegisterForFinalize"); + int32_t QCall_GCInterface_RefreshMemoryLimit (void *, void *) __asm__("GCInterface_RefreshMemoryLimit"); + void * QCall_GCInterface_RegisterFrozenSegment (void *, void *, void *) __asm__("GCInterface_RegisterFrozenSegment"); + void QCall_GCInterface_RemoveMemoryPressure (uint64_t, void *) __asm__("GCInterface_RemoveMemoryPressure"); + int32_t QCall_GCInterface_StartNoGCRegion (int64_t, int32_t, int64_t, int32_t, void *) __asm__("GCInterface_StartNoGCRegion"); + void QCall_GCInterface_UnregisterFrozenSegment (void *, void *) __asm__("GCInterface_UnregisterFrozenSegment"); + int32_t QCall_GCInterface_WaitForFullGCApproach (int32_t, void *) __asm__("GCInterface_WaitForFullGCApproach"); + int32_t QCall_GCInterface_WaitForFullGCComplete (int32_t, void *) __asm__("GCInterface_WaitForFullGCComplete"); + void QCall_GCInterface_WaitForPendingFinalizers (void *) __asm__("GCInterface_WaitForPendingFinalizers"); + void * QCall_GenericHandleWorker (void *, void *, void *, uint32_t, void *, void *) __asm__("GenericHandleWorker"); + void * QCall_GetCurrentExInfo () __asm__("GetCurrentExInfo"); + void * QCall_GetEnvironmentStringsW () __asm__("GetEnvironmentStringsW"); + uint32_t QCall_GetEnvironmentVariableW (void *, void *, uint32_t) __asm__("GetEnvironmentVariableW"); + void QCall_GetFileLoadExceptionMessage (int32_t, void *, void *) __asm__("GetFileLoadExceptionMessage"); + void QCall_GetTypeLoadExceptionMessage (int32_t, void *, void *) __asm__("GetTypeLoadExceptionMessage"); + void QCall_InitClassHelper (void *, void *) __asm__("InitClassHelper"); + void QCall_Interlocked_MemoryBarrierProcessWide () __asm__("Interlocked_MemoryBarrierProcessWide"); + int32_t QCall_IsInstanceOf_NoCacheLookup (void *, int32_t, void *, void *) __asm__("IsInstanceOf_NoCacheLookup"); + int32_t QCall_LoaderAllocator_Destroy (void *, void *) __asm__("LoaderAllocator_Destroy"); + void QCall_MarshalNative_GetDelegateForFunctionPointerInternal (void *, void *, void *, void *) __asm__("MarshalNative_GetDelegateForFunctionPointerInternal"); + void QCall_MarshalNative_GetExceptionForHR (int32_t, void *, void *, void *) __asm__("MarshalNative_GetExceptionForHR"); + void * QCall_MarshalNative_GetFunctionPointerForDelegateInternal (void *, void *) __asm__("MarshalNative_GetFunctionPointerForDelegateInternal"); + int32_t QCall_MarshalNative_HasLayout (void *, void *, void *, void *) __asm__("MarshalNative_HasLayout"); + void * QCall_MarshalNative_OffsetOf (void *, void *) __asm__("MarshalNative_OffsetOf"); + void QCall_MarshalNative_Prelink (void *, void *) __asm__("MarshalNative_Prelink"); + int32_t QCall_MarshalNative_SizeOfHelper (void *, int32_t, void *) __asm__("MarshalNative_SizeOfHelper"); + int32_t QCall_MdUtf8String_EqualsCaseInsensitive (void *, void *, int32_t, void *) __asm__("MdUtf8String_EqualsCaseInsensitive"); + void QCall_MetadataImport_Enum (void *, int32_t, int32_t, void *, void *, void *, void *) __asm__("MetadataImport_Enum"); + int32_t QCall_MetadataImport_GetMarshalAs (void *, int32_t, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *) __asm__("MetadataImport_GetMarshalAs"); + void * QCall_MethodBase_GetCurrentMethod (void *, void *) __asm__("MethodBase_GetCurrentMethod"); + int32_t QCall_MethodTable_CanCompareBitsOrUseFastGetHashCode (void *, void *) __asm__("MethodTable_CanCompareBitsOrUseFastGetHashCode"); + int32_t QCall_ModuleBuilder_GetArrayMethodToken (void *, int32_t, void *, void *, int32_t, void *) __asm__("ModuleBuilder_GetArrayMethodToken"); + int32_t QCall_ModuleBuilder_GetMemberRef (void *, void *, int32_t, int32_t, void *) __asm__("ModuleBuilder_GetMemberRef"); + int32_t QCall_ModuleBuilder_GetMemberRefFromSignature (void *, int32_t, void *, void *, int32_t, void *) __asm__("ModuleBuilder_GetMemberRefFromSignature"); + int32_t QCall_ModuleBuilder_GetMemberRefOfFieldInfo (void *, int32_t, void *, int32_t, void *) __asm__("ModuleBuilder_GetMemberRefOfFieldInfo"); + int32_t QCall_ModuleBuilder_GetMemberRefOfMethodInfo (void *, int32_t, void *, void *) __asm__("ModuleBuilder_GetMemberRefOfMethodInfo"); + int32_t QCall_ModuleBuilder_GetStringConstant (void *, void *, int32_t, void *) __asm__("ModuleBuilder_GetStringConstant"); + int32_t QCall_ModuleBuilder_GetTokenFromTypeSpec (void *, void *, int32_t, void *) __asm__("ModuleBuilder_GetTokenFromTypeSpec"); + int32_t QCall_ModuleBuilder_GetTypeRef (void *, void *, void *, int32_t, void *) __asm__("ModuleBuilder_GetTypeRef"); + void QCall_ModuleBuilder_SetFieldRVAContent (void *, int32_t, void *, int32_t, void *) __asm__("ModuleBuilder_SetFieldRVAContent"); + void QCall_ModuleHandle_GetDynamicMethod (void *, void *, void *, int32_t, void *, int32_t, void *, void *) __asm__("ModuleHandle_GetDynamicMethod"); + int32_t QCall_ModuleHandle_GetMDStreamVersion (void *) __asm__("ModuleHandle_GetMDStreamVersion"); + void QCall_ModuleHandle_GetModuleType (void *, void *, void *) __asm__("ModuleHandle_GetModuleType"); + void QCall_ModuleHandle_GetPEKind (void *, void *, void *, void *) __asm__("ModuleHandle_GetPEKind"); + int32_t QCall_ModuleHandle_GetToken (void *) __asm__("ModuleHandle_GetToken"); + void QCall_ModuleHandle_ResolveField (void *, int32_t, void *, int32_t, void *, int32_t, void *, void *) __asm__("ModuleHandle_ResolveField"); + void * QCall_ModuleHandle_ResolveMethod (void *, int32_t, void *, int32_t, void *, int32_t, void *) __asm__("ModuleHandle_ResolveMethod"); + void QCall_ModuleHandle_ResolveType (void *, int32_t, void *, int32_t, void *, int32_t, void *, void *) __asm__("ModuleHandle_ResolveType"); + void * QCall_NativeLibrary_LoadByName (void *, void *, int32_t, uint32_t, int32_t, void *) __asm__("NativeLibrary_LoadByName"); + void QCall_NativeRuntimeEventSource_LogContentionLockCreated (void *, void *, uint32_t, void *) __asm__("NativeRuntimeEventSource_LogContentionLockCreated"); + void QCall_NativeRuntimeEventSource_LogContentionStart (uint32_t, uint32_t, void *, void *, uint64_t, void *) __asm__("NativeRuntimeEventSource_LogContentionStart"); + void QCall_NativeRuntimeEventSource_LogContentionStop (uint32_t, uint32_t, double, void *) __asm__("NativeRuntimeEventSource_LogContentionStop"); + void QCall_NativeRuntimeEventSource_LogThreadPoolIODequeue (void *, void *, uint32_t, void *) __asm__("NativeRuntimeEventSource_LogThreadPoolIODequeue"); + void QCall_NativeRuntimeEventSource_LogThreadPoolIOEnqueue (void *, void *, int32_t, uint32_t, void *) __asm__("NativeRuntimeEventSource_LogThreadPoolIOEnqueue"); + void QCall_NativeRuntimeEventSource_LogThreadPoolIOPack (void *, void *, uint32_t, void *) __asm__("NativeRuntimeEventSource_LogThreadPoolIOPack"); + void QCall_NativeRuntimeEventSource_LogThreadPoolMinMaxThreads (uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, void *) __asm__("NativeRuntimeEventSource_LogThreadPoolMinMaxThreads"); + void QCall_NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentAdjustment (double, uint32_t, uint32_t, uint32_t, void *) __asm__("NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentAdjustment"); + void QCall_NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentSample (double, uint32_t, void *) __asm__("NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentSample"); + void QCall_NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentStats (double, double, double, double, double, double, double, double, double, uint32_t, uint32_t, void *) __asm__("NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentStats"); + void QCall_NativeRuntimeEventSource_LogThreadPoolWorkerThreadStart (uint32_t, uint32_t, uint32_t, void *) __asm__("NativeRuntimeEventSource_LogThreadPoolWorkerThreadStart"); + void QCall_NativeRuntimeEventSource_LogThreadPoolWorkerThreadStop (uint32_t, uint32_t, uint32_t, void *) __asm__("NativeRuntimeEventSource_LogThreadPoolWorkerThreadStop"); + void QCall_NativeRuntimeEventSource_LogThreadPoolWorkerThreadWait (uint32_t, uint32_t, uint32_t, void *) __asm__("NativeRuntimeEventSource_LogThreadPoolWorkerThreadWait"); + void QCall_NativeRuntimeEventSource_LogThreadPoolWorkingThreadCount (uint32_t, uint32_t, void *) __asm__("NativeRuntimeEventSource_LogThreadPoolWorkingThreadCount"); + void QCall_NativeRuntimeEventSource_LogWaitHandleWaitStart (uint32_t, void *, uint32_t, void *) __asm__("NativeRuntimeEventSource_LogWaitHandleWaitStart"); + void QCall_NativeRuntimeEventSource_LogWaitHandleWaitStop (uint32_t, void *) __asm__("NativeRuntimeEventSource_LogWaitHandleWaitStop"); + void QCall_ObjectHeader_GetOrCreateLockObject (void *, void *, void *) __asm__("ObjectHeader_GetOrCreateLockObject"); + void QCall_ObjectNative_AllocateUninitializedClone (void *, void *) __asm__("ObjectNative_AllocateUninitializedClone"); + int32_t QCall_ObjectNative_GetHashCodeSlow (void *, void *) __asm__("ObjectNative_GetHashCodeSlow"); + void * QCall_QCall_FreeGCHandleForTypeHandle (void *, void *, void *) __asm__("QCall_FreeGCHandleForTypeHandle"); + void * QCall_QCall_GetGCHandleForTypeHandle (void *, int32_t, void *) __asm__("QCall_GetGCHandleForTypeHandle"); + void QCall_ReflectionInvocation_CompileMethod (void *, void *) __asm__("ReflectionInvocation_CompileMethod"); + void QCall_ReflectionInvocation_GetBoxInfo (void *, void *, void *, void *, void *, void *) __asm__("ReflectionInvocation_GetBoxInfo"); + void QCall_ReflectionInvocation_GetGuid (void *, void *, void *) __asm__("ReflectionInvocation_GetGuid"); + void QCall_ReflectionInvocation_PrepareDelegate (void *, void *) __asm__("ReflectionInvocation_PrepareDelegate"); + void QCall_ReflectionInvocation_PrepareMethod (void *, void *, int32_t, void *) __asm__("ReflectionInvocation_PrepareMethod"); + void QCall_ReflectionInvocation_RunClassConstructor (void *, void *) __asm__("ReflectionInvocation_RunClassConstructor"); + void QCall_ReflectionInvocation_RunModuleConstructor (void *, void *) __asm__("ReflectionInvocation_RunModuleConstructor"); + int32_t QCall_ReflectionInvocation_SizeOf (void *) __asm__("ReflectionInvocation_SizeOf"); + void QCall_ReflectionSerialization_GetCreateUninitializedObjectInfo (void *, void *, void *, void *) __asm__("ReflectionSerialization_GetCreateUninitializedObjectInfo"); + void * QCall_ResolveVirtualFunctionPointer (void *, void *, void *, void *) __asm__("ResolveVirtualFunctionPointer"); + void * QCall_RuntimeFieldHandle_GetEnCFieldAddr (void *, void *, void *) __asm__("RuntimeFieldHandle_GetEnCFieldAddr"); + void QCall_RuntimeFieldHandle_GetFieldDataReference (void *, void *, void *, void *) __asm__("RuntimeFieldHandle_GetFieldDataReference"); + int32_t QCall_RuntimeFieldHandle_GetRVAFieldInfo (void *, void *, void *, void *) __asm__("RuntimeFieldHandle_GetRVAFieldInfo"); + void QCall_RuntimeFieldHandle_GetValue (void *, void *, void *, void *, void *, void *, void *) __asm__("RuntimeFieldHandle_GetValue"); + void QCall_RuntimeFieldHandle_GetValueDirect (void *, void *, void *, void *, void *, void *) __asm__("RuntimeFieldHandle_GetValueDirect"); + void QCall_RuntimeFieldHandle_SetValue (void *, void *, void *, void *, void *, void *, void *) __asm__("RuntimeFieldHandle_SetValue"); + void QCall_RuntimeFieldHandle_SetValueDirect (void *, void *, void *, void *, void *, void *) __asm__("RuntimeFieldHandle_SetValueDirect"); + void QCall_RuntimeMethodHandle_ConstructInstantiation (void *, int32_t, void *, void *) __asm__("RuntimeMethodHandle_ConstructInstantiation"); + void QCall_RuntimeMethodHandle_Destroy (void *, void *) __asm__("RuntimeMethodHandle_Destroy"); + void * QCall_RuntimeMethodHandle_GetDiagnosticCodeStart (void *, void *) __asm__("RuntimeMethodHandle_GetDiagnosticCodeStart"); + void * QCall_RuntimeMethodHandle_GetFunctionPointer (void *, void *) __asm__("RuntimeMethodHandle_GetFunctionPointer"); + void QCall_RuntimeMethodHandle_GetMethodBody (void *, void *, void *, void *) __asm__("RuntimeMethodHandle_GetMethodBody"); + void QCall_RuntimeMethodHandle_GetMethodInstantiation (void *, void *, int32_t, void *) __asm__("RuntimeMethodHandle_GetMethodInstantiation"); + void * QCall_RuntimeMethodHandle_GetStubIfNeededSlow (void *, void *, void *, void *) __asm__("RuntimeMethodHandle_GetStubIfNeededSlow"); + void QCall_RuntimeMethodHandle_GetTypicalMethodDefinition (void *, void *, void *) __asm__("RuntimeMethodHandle_GetTypicalMethodDefinition"); + void * QCall_RuntimeMethodHandle_GetVirtualFunctionPointer (void *, void *, void *, void *) __asm__("RuntimeMethodHandle_GetVirtualFunctionPointer"); + int32_t QCall_RuntimeMethodHandle_IsCAVisibleFromDecoratedType (void *, void *, void *, void *, void *) __asm__("RuntimeMethodHandle_IsCAVisibleFromDecoratedType"); + void QCall_RuntimeMethodHandle_StripMethodInstantiation (void *, void *, void *) __asm__("RuntimeMethodHandle_StripMethodInstantiation"); + void QCall_RuntimeModule_GetFullyQualifiedName (void *, void *, void *) __asm__("RuntimeModule_GetFullyQualifiedName"); + void QCall_RuntimeModule_GetScopeName (void *, void *, void *) __asm__("RuntimeModule_GetScopeName"); + void QCall_RuntimeModule_GetTypes (void *, void *, void *, void *) __asm__("RuntimeModule_GetTypes"); + void * QCall_RuntimeTypeHandle_AllocateTypeAssociatedMemory (void *, uint32_t, void *) __asm__("RuntimeTypeHandle_AllocateTypeAssociatedMemory"); + void * QCall_RuntimeTypeHandle_AllocateTypeAssociatedMemoryAligned (void *, uint32_t, uint32_t, void *) __asm__("RuntimeTypeHandle_AllocateTypeAssociatedMemoryAligned"); + void QCall_RuntimeTypeHandle_ConstructName (void *, int32_t, void *, void *) __asm__("RuntimeTypeHandle_ConstructName"); + void QCall_RuntimeTypeHandle_CreateInstanceForAnotherGenericParameter (void *, void *, int32_t, void *, void *) __asm__("RuntimeTypeHandle_CreateInstanceForAnotherGenericParameter"); + void QCall_RuntimeTypeHandle_GetActivationInfo (void *, void *, void *, void *, void *, void *, void *) __asm__("RuntimeTypeHandle_GetActivationInfo"); + void QCall_RuntimeTypeHandle_GetArgumentTypesFromFunctionPointer (void *, void *, void *) __asm__("RuntimeTypeHandle_GetArgumentTypesFromFunctionPointer"); + void QCall_RuntimeTypeHandle_GetAssemblySlow (void *, void *, void *) __asm__("RuntimeTypeHandle_GetAssemblySlow"); + void QCall_RuntimeTypeHandle_GetConstraints (void *, void *, void *) __asm__("RuntimeTypeHandle_GetConstraints"); + void QCall_RuntimeTypeHandle_GetDeclaringMethodForGenericParameter (void *, void *, void *) __asm__("RuntimeTypeHandle_GetDeclaringMethodForGenericParameter"); + void * QCall_RuntimeTypeHandle_GetDeclaringTypeHandle (void *, void *) __asm__("RuntimeTypeHandle_GetDeclaringTypeHandle"); + void * QCall_RuntimeTypeHandle_GetDeclaringTypeHandleForGenericVariable (void *, void *) __asm__("RuntimeTypeHandle_GetDeclaringTypeHandleForGenericVariable"); + int32_t QCall_RuntimeTypeHandle_GetFields (void *, void *, void *, void *) __asm__("RuntimeTypeHandle_GetFields"); + void QCall_RuntimeTypeHandle_GetGenericTypeDefinition (void *, void *, void *) __asm__("RuntimeTypeHandle_GetGenericTypeDefinition"); + void QCall_RuntimeTypeHandle_GetInstantiation (void *, void *, int32_t, void *) __asm__("RuntimeTypeHandle_GetInstantiation"); + void * QCall_RuntimeTypeHandle_GetInterfaceMethodImplementation (void *, void *, void *, void *) __asm__("RuntimeTypeHandle_GetInterfaceMethodImplementation"); + void QCall_RuntimeTypeHandle_GetInterfaces (void *, void *, void *) __asm__("RuntimeTypeHandle_GetInterfaces"); + void * QCall_RuntimeTypeHandle_GetMethodAt (void *, int32_t, void *) __asm__("RuntimeTypeHandle_GetMethodAt"); + void QCall_RuntimeTypeHandle_GetModuleSlow (void *, void *, void *) __asm__("RuntimeTypeHandle_GetModuleSlow"); + int32_t QCall_RuntimeTypeHandle_GetNumVirtualsAndStaticVirtuals (void *, void *) __asm__("RuntimeTypeHandle_GetNumVirtualsAndStaticVirtuals"); + void QCall_RuntimeTypeHandle_GetRuntimeTypeFromHandleSlow (void *, void *, void *) __asm__("RuntimeTypeHandle_GetRuntimeTypeFromHandleSlow"); + void QCall_RuntimeTypeHandle_Instantiate (void *, void *, int32_t, void *, void *) __asm__("RuntimeTypeHandle_Instantiate"); + void QCall_RuntimeTypeHandle_InternalAlloc (void *, void *, void *) __asm__("RuntimeTypeHandle_InternalAlloc"); + void QCall_RuntimeTypeHandle_InternalAllocNoChecks (void *, void *, void *) __asm__("RuntimeTypeHandle_InternalAllocNoChecks"); + int32_t QCall_RuntimeTypeHandle_IsVisible (void *, void *) __asm__("RuntimeTypeHandle_IsVisible"); + void QCall_RuntimeTypeHandle_MakeArray (void *, int32_t, void *, void *) __asm__("RuntimeTypeHandle_MakeArray"); + void QCall_RuntimeTypeHandle_MakeByRef (void *, void *, void *) __asm__("RuntimeTypeHandle_MakeByRef"); + void QCall_RuntimeTypeHandle_MakeFunctionPointer (void *, int32_t, int32_t, void *, void *) __asm__("RuntimeTypeHandle_MakeFunctionPointer"); + void QCall_RuntimeTypeHandle_MakePointer (void *, void *, void *) __asm__("RuntimeTypeHandle_MakePointer"); + void QCall_RuntimeTypeHandle_MakeSZArray (void *, void *, void *) __asm__("RuntimeTypeHandle_MakeSZArray"); + void QCall_RuntimeTypeHandle_RegisterCollectibleTypeDependency (void *, void *, void *) __asm__("RuntimeTypeHandle_RegisterCollectibleTypeDependency"); + int32_t QCall_RuntimeTypeHandle_SatisfiesConstraints (void *, void *, void *, void *, void *) __asm__("RuntimeTypeHandle_SatisfiesConstraints"); + void QCall_RuntimeTypeHandle_VerifyInterfaceIsImplemented (void *, void *, void *) __asm__("RuntimeTypeHandle_VerifyInterfaceIsImplemented"); + int32_t QCall_SetEnvironmentVariableW (void *, void *) __asm__("SetEnvironmentVariableW"); + uint32_t QCall_SfiInit (void *, void *, uint32_t, void *, void *) __asm__("SfiInit"); + uint32_t QCall_SfiNext (void *, void *, void *, void *, void *) __asm__("SfiNext"); + int32_t QCall_Signature_AreEqual (void *, int32_t, void *, void *, int32_t, void *, void *) __asm__("Signature_AreEqual"); + void QCall_Signature_GetCustomModifiersAtOffset (void *, int32_t, int32_t, void *, void *) __asm__("Signature_GetCustomModifiersAtOffset"); + void QCall_Signature_Init (void *, void *, int32_t, void *, void *, void *) __asm__("Signature_Init"); + void QCall_StackTrace_GetStackFramesInternal (void *, int32_t, void *, void *) __asm__("StackTrace_GetStackFramesInternal"); + int32_t QCall_Stream_HasOverriddenSlow (void *, int32_t, void *) __asm__("Stream_HasOverriddenSlow"); + void QCall_String_Intern (void *, void *) __asm__("String_Intern"); + void QCall_String_IsInterned (void *, void *) __asm__("String_IsInterned"); + void QCall_StubHelpers_CreateCustomMarshaler (void *, int32_t, void *, void *, void *) __asm__("StubHelpers_CreateCustomMarshaler"); + void QCall_StubHelpers_CreateLayoutClassMarshalStubs (void *, void *, void *, void *, void *) __asm__("StubHelpers_CreateLayoutClassMarshalStubs"); + void QCall_StubHelpers_MulticastDebuggerTraceHelper (void *, int32_t, void *) __asm__("StubHelpers_MulticastDebuggerTraceHelper"); + void QCall_StubHelpers_ThrowInteropException (int32_t, int32_t, void *) __asm__("StubHelpers_ThrowInteropException"); + void QCall_StubHelpers_ThrowInteropParamException (int32_t, int32_t, void *) __asm__("StubHelpers_ThrowInteropParamException"); + void QCall_StubHelpers_ValidateByref (void *, void *, void *) __asm__("StubHelpers_ValidateByref"); + void QCall_StubHelpers_ValidateObject (void *, void *, void *) __asm__("StubHelpers_ValidateObject"); + void QCall_SystemJS_MarkAsyncMain () __asm__("SystemJS_MarkAsyncMain"); + void QCall_SystemJS_RejectMainPromise (void *, int32_t, void *, int32_t) __asm__("SystemJS_RejectMainPromise"); + void QCall_SystemJS_ResolveMainPromise (int32_t) __asm__("SystemJS_ResolveMainPromise"); + void QCall_SystemJS_ScheduleBackgroundJob () __asm__("SystemJS_ScheduleBackgroundJob"); + void QCall_SystemJS_ScheduleTimer (int32_t) __asm__("SystemJS_ScheduleTimer"); + void * QCall_TailCallHelp_AllocTailCallArgBufferInternal (int32_t, void *) __asm__("TailCallHelp_AllocTailCallArgBufferInternal"); + void QCall_ThreadNative_Abort (void *, void *) __asm__("ThreadNative_Abort"); + void QCall_ThreadNative_GetQCallSpecialException (void *, void *, void *) __asm__("ThreadNative_GetQCallSpecialException"); + int32_t QCall_ThreadNative_GetThreadState (void *) __asm__("ThreadNative_GetThreadState"); + void QCall_ThreadNative_ResetAbort () __asm__("ThreadNative_ResetAbort"); + void QCall_ThrowInvalidCastException (void *, void *, void *) __asm__("ThrowInvalidCastException"); + void QCall_TypeBuilder_AddInterfaceImpl (void *, int32_t, int32_t, void *) __asm__("TypeBuilder_AddInterfaceImpl"); + void QCall_TypeBuilder_DefineCustomAttribute (void *, int32_t, int32_t, void *, int32_t, void *) __asm__("TypeBuilder_DefineCustomAttribute"); + int32_t QCall_TypeBuilder_DefineEvent (void *, int32_t, void *, int32_t, int32_t, void *) __asm__("TypeBuilder_DefineEvent"); + int32_t QCall_TypeBuilder_DefineField (void *, int32_t, void *, void *, int32_t, int32_t, void *) __asm__("TypeBuilder_DefineField"); + int32_t QCall_TypeBuilder_DefineGenericParam (void *, void *, int32_t, int32_t, int32_t, void *, void *) __asm__("TypeBuilder_DefineGenericParam"); + int32_t QCall_TypeBuilder_DefineMethod (void *, int32_t, void *, void *, int32_t, int32_t, void *) __asm__("TypeBuilder_DefineMethod"); + void QCall_TypeBuilder_DefineMethodImpl (void *, int32_t, int32_t, int32_t, void *) __asm__("TypeBuilder_DefineMethodImpl"); + void QCall_TypeBuilder_DefineMethodSemantics (void *, int32_t, int32_t, int32_t, void *) __asm__("TypeBuilder_DefineMethodSemantics"); + int32_t QCall_TypeBuilder_DefineMethodSpec (void *, int32_t, void *, int32_t, void *) __asm__("TypeBuilder_DefineMethodSpec"); + int32_t QCall_TypeBuilder_DefineProperty (void *, int32_t, void *, int32_t, void *, int32_t, void *) __asm__("TypeBuilder_DefineProperty"); + int32_t QCall_TypeBuilder_DefineType (void *, void *, int32_t, int32_t, int32_t, void *, void *) __asm__("TypeBuilder_DefineType"); + int32_t QCall_TypeBuilder_GetTokenFromSig (void *, void *, int32_t, void *) __asm__("TypeBuilder_GetTokenFromSig"); + void QCall_TypeBuilder_SetClassLayout (void *, int32_t, int32_t, int32_t, void *) __asm__("TypeBuilder_SetClassLayout"); + void QCall_TypeBuilder_SetConstantValue (void *, int32_t, int32_t, void *, void *) __asm__("TypeBuilder_SetConstantValue"); + void QCall_TypeBuilder_SetFieldLayoutOffset (void *, int32_t, int32_t, void *) __asm__("TypeBuilder_SetFieldLayoutOffset"); + void QCall_TypeBuilder_SetMethodIL (void *, int32_t, int32_t, void *, int32_t, void *, int32_t, int32_t, void *, int32_t, void *) __asm__("TypeBuilder_SetMethodIL"); + void QCall_TypeBuilder_SetMethodImpl (void *, int32_t, int32_t, void *) __asm__("TypeBuilder_SetMethodImpl"); + void QCall_TypeBuilder_SetPInvokeData (void *, void *, void *, int32_t, int32_t, void *) __asm__("TypeBuilder_SetPInvokeData"); + int32_t QCall_TypeBuilder_SetParamInfo (void *, int32_t, int32_t, int32_t, void *, void *) __asm__("TypeBuilder_SetParamInfo"); + void QCall_TypeBuilder_SetParentType (void *, int32_t, int32_t, void *) __asm__("TypeBuilder_SetParentType"); + void QCall_TypeBuilder_TermCreateClass (void *, int32_t, void *, void *) __asm__("TypeBuilder_TermCreateClass"); + int32_t QCall_TypeHandle_CanCastTo_NoCacheLookup (void *, void *, void *) __asm__("TypeHandle_CanCastTo_NoCacheLookup"); + int32_t QCall_TypeHandle_GetCorElementType (void *) __asm__("TypeHandle_GetCorElementType"); + void * QCall_TypeMapLazyDictionary_FindPrecachedExternalTypeMapEntry (void *, void *, void *, void *) __asm__("TypeMapLazyDictionary_FindPrecachedExternalTypeMapEntry"); + void * QCall_TypeMapLazyDictionary_FindPrecachedProxyTypeMapEntry (void *, void *, void *, void *) __asm__("TypeMapLazyDictionary_FindPrecachedProxyTypeMapEntry"); + void QCall_TypeMapLazyDictionary_ProcessAttributes (void *, void *, void *, void *, void *, void *, void *, void *) __asm__("TypeMapLazyDictionary_ProcessAttributes"); + void * QCall_UnsafeAccessors_ResolveGenericParamToTypeHandle (void *, int32_t, uint32_t, void *) __asm__("UnsafeAccessors_ResolveGenericParamToTypeHandle"); + int32_t QCall_ValueType_GetHashCodeStrategy (void *, void *, void *, void *, void *, void *) __asm__("ValueType_GetHashCodeStrategy"); + int32_t QCall_VersionResilientHashCode_TypeHashCode (void *, void *) __asm__("VersionResilientHashCode_TypeHashCode"); + void* QCall_memmove(void* dest, const void* src, size_t len); + void* QCall_memset(void* dest, int value, size_t len); +} // extern "C" + +static const Entry s_QCall[] = { + { "AppContext_SetFirstChanceExceptionHandler", (void*)&QCall_AppContext_SetFirstChanceExceptionHandler }, + { "AppContext_TryGetHostPropertyValue", (void*)&QCall_AppContext_TryGetHostPropertyValue }, + { "AppDomain_CreateDynamicAssembly", (void*)&QCall_AppDomain_CreateDynamicAssembly }, + { "AppendExceptionStackFrame", (void*)&QCall_AppendExceptionStackFrame }, + { "Array_CreateInstance", (void*)&QCall_Array_CreateInstance }, + { "Array_Ctor", (void*)&QCall_Array_Ctor }, + { "Array_GetElementConstructorEntrypoint", (void*)&QCall_Array_GetElementConstructorEntrypoint }, + { "AssemblyHandle_GetManifestModuleSlow", (void*)&QCall_AssemblyHandle_GetManifestModuleSlow }, + { "AssemblyName_InitializeAssemblySpec", (void*)&QCall_AssemblyName_InitializeAssemblySpec }, + { "AssemblyNative_ApplyUpdate", (void*)&QCall_AssemblyNative_ApplyUpdate }, + { "AssemblyNative_GetCodeBase", (void*)&QCall_AssemblyNative_GetCodeBase }, + { "AssemblyNative_GetEntryAssembly", (void*)&QCall_AssemblyNative_GetEntryAssembly }, + { "AssemblyNative_GetEntryPoint", (void*)&QCall_AssemblyNative_GetEntryPoint }, + { "AssemblyNative_GetExecutingAssembly", (void*)&QCall_AssemblyNative_GetExecutingAssembly }, + { "AssemblyNative_GetExportedTypes", (void*)&QCall_AssemblyNative_GetExportedTypes }, + { "AssemblyNative_GetFlags", (void*)&QCall_AssemblyNative_GetFlags }, + { "AssemblyNative_GetForwardedType", (void*)&QCall_AssemblyNative_GetForwardedType }, + { "AssemblyNative_GetFullName", (void*)&QCall_AssemblyNative_GetFullName }, + { "AssemblyNative_GetHashAlgorithm", (void*)&QCall_AssemblyNative_GetHashAlgorithm }, + { "AssemblyNative_GetImageRuntimeVersion", (void*)&QCall_AssemblyNative_GetImageRuntimeVersion }, + { "AssemblyNative_GetLoadContextForAssembly", (void*)&QCall_AssemblyNative_GetLoadContextForAssembly }, + { "AssemblyNative_GetLoadedAssemblies", (void*)&QCall_AssemblyNative_GetLoadedAssemblies }, + { "AssemblyNative_GetLocale", (void*)&QCall_AssemblyNative_GetLocale }, + { "AssemblyNative_GetLocation", (void*)&QCall_AssemblyNative_GetLocation }, + { "AssemblyNative_GetManifestResourceInfo", (void*)&QCall_AssemblyNative_GetManifestResourceInfo }, + { "AssemblyNative_GetManifestResourceNames", (void*)&QCall_AssemblyNative_GetManifestResourceNames }, + { "AssemblyNative_GetModule", (void*)&QCall_AssemblyNative_GetModule }, + { "AssemblyNative_GetModules", (void*)&QCall_AssemblyNative_GetModules }, + { "AssemblyNative_GetPublicKey", (void*)&QCall_AssemblyNative_GetPublicKey }, + { "AssemblyNative_GetReferencedAssemblies", (void*)&QCall_AssemblyNative_GetReferencedAssemblies }, + { "AssemblyNative_GetResource", (void*)&QCall_AssemblyNative_GetResource }, + { "AssemblyNative_GetSimpleName", (void*)&QCall_AssemblyNative_GetSimpleName }, + { "AssemblyNative_GetTypeCore", (void*)&QCall_AssemblyNative_GetTypeCore }, + { "AssemblyNative_GetTypeCoreIgnoreCase", (void*)&QCall_AssemblyNative_GetTypeCoreIgnoreCase }, + { "AssemblyNative_GetVersion", (void*)&QCall_AssemblyNative_GetVersion }, + { "AssemblyNative_InitializeAssemblyLoadContext", (void*)&QCall_AssemblyNative_InitializeAssemblyLoadContext }, + { "AssemblyNative_InternalLoad", (void*)&QCall_AssemblyNative_InternalLoad }, + { "AssemblyNative_InternalTryGetRawMetadata", (void*)&QCall_AssemblyNative_InternalTryGetRawMetadata }, + { "AssemblyNative_IsApplyUpdateSupported", (void*)&QCall_AssemblyNative_IsApplyUpdateSupported }, + { "AssemblyNative_LoadFromPath", (void*)&QCall_AssemblyNative_LoadFromPath }, + { "AssemblyNative_LoadFromStream", (void*)&QCall_AssemblyNative_LoadFromStream }, + { "AssemblyNative_PrepareForAssemblyLoadContextRelease", (void*)&QCall_AssemblyNative_PrepareForAssemblyLoadContextRelease }, + { "AssemblyNative_TraceAssemblyLoadFromResolveHandlerInvoked", (void*)&QCall_AssemblyNative_TraceAssemblyLoadFromResolveHandlerInvoked }, + { "AssemblyNative_TraceAssemblyResolveHandlerInvoked", (void*)&QCall_AssemblyNative_TraceAssemblyResolveHandlerInvoked }, + { "AssemblyNative_TraceResolvingHandlerInvoked", (void*)&QCall_AssemblyNative_TraceResolvingHandlerInvoked }, + { "AsyncHelpers_AddContinuationToExInternal", (void*)&QCall_AsyncHelpers_AddContinuationToExInternal }, + { "CallFilterFunclet", (void*)&QCall_CallFilterFunclet }, + { "CustomAttribute_ParseAttributeUsageAttribute", (void*)&QCall_CustomAttribute_ParseAttributeUsageAttribute }, + { "DebugDebugger_Break", (void*)&QCall_DebugDebugger_Break }, + { "DebugDebugger_CustomNotification", (void*)&QCall_DebugDebugger_CustomNotification }, + { "DebugDebugger_GetFuncEvalArgumentType", (void*)&QCall_DebugDebugger_GetFuncEvalArgumentType }, + { "DebugDebugger_GetFuncEvalMethod", (void*)&QCall_DebugDebugger_GetFuncEvalMethod }, + { "DebugDebugger_IsLoggingHelper", (void*)&QCall_DebugDebugger_IsLoggingHelper }, + { "DebugDebugger_IsManagedDebuggerAttached", (void*)&QCall_DebugDebugger_IsManagedDebuggerAttached }, + { "DebugDebugger_Launch", (void*)&QCall_DebugDebugger_Launch }, + { "DebugDebugger_Log", (void*)&QCall_DebugDebugger_Log }, + { "DebugDebugger_PrepareFuncEvalResult", (void*)&QCall_DebugDebugger_PrepareFuncEvalResult }, + { "DebugDebugger_ReadFuncEvalPrimitiveRegister", (void*)&QCall_DebugDebugger_ReadFuncEvalPrimitiveRegister }, + { "DebugDebugger_WriteFuncEvalObjectRegister", (void*)&QCall_DebugDebugger_WriteFuncEvalObjectRegister }, + { "DebugDebugger_WriteFuncEvalRegister", (void*)&QCall_DebugDebugger_WriteFuncEvalRegister }, + { "Delegate_AdjustTarget", (void*)&QCall_Delegate_AdjustTarget }, + { "Delegate_BindToMethodInfo", (void*)&QCall_Delegate_BindToMethodInfo }, + { "Delegate_BindToMethodName", (void*)&QCall_Delegate_BindToMethodName }, + { "Delegate_Construct", (void*)&QCall_Delegate_Construct }, + { "Delegate_CreateMethodInfo", (void*)&QCall_Delegate_CreateMethodInfo }, + { "Delegate_GetMethodDesc", (void*)&QCall_Delegate_GetMethodDesc }, + { "Delegate_GetMulticastInvokeSlow", (void*)&QCall_Delegate_GetMulticastInvokeSlow }, + { "Delegate_InitializeVirtualCallStub", (void*)&QCall_Delegate_InitializeVirtualCallStub }, + { "DependentHandle_InternalAllocWithGCTransition", (void*)&QCall_DependentHandle_InternalAllocWithGCTransition }, + { "DependentHandle_InternalFreeWithGCTransition", (void*)&QCall_DependentHandle_InternalFreeWithGCTransition }, + { "EHEnumInitFromStackFrameIterator", (void*)&QCall_EHEnumInitFromStackFrameIterator }, + { "EHEnumNext", (void*)&QCall_EHEnumNext }, + { "Enum_GetValuesAndNames", (void*)&QCall_Enum_GetValuesAndNames }, + { "Environment_Exit", (void*)&QCall_Environment_Exit }, + { "Environment_FailFast", (void*)&QCall_Environment_FailFast }, + { "EventPipeInternal_CreateProvider", (void*)&QCall_EventPipeInternal_CreateProvider }, + { "EventPipeInternal_DefineEvent", (void*)&QCall_EventPipeInternal_DefineEvent }, + { "EventPipeInternal_DeleteProvider", (void*)&QCall_EventPipeInternal_DeleteProvider }, + { "EventPipeInternal_Disable", (void*)&QCall_EventPipeInternal_Disable }, + { "EventPipeInternal_Enable", (void*)&QCall_EventPipeInternal_Enable }, + { "EventPipeInternal_EventActivityIdControl", (void*)&QCall_EventPipeInternal_EventActivityIdControl }, + { "EventPipeInternal_GetNextEvent", (void*)&QCall_EventPipeInternal_GetNextEvent }, + { "EventPipeInternal_GetProvider", (void*)&QCall_EventPipeInternal_GetProvider }, + { "EventPipeInternal_GetSessionInfo", (void*)&QCall_EventPipeInternal_GetSessionInfo }, + { "EventPipeInternal_SignalSession", (void*)&QCall_EventPipeInternal_SignalSession }, + { "EventPipeInternal_WriteEventData", (void*)&QCall_EventPipeInternal_WriteEventData }, + { "ExceptionNative_GetFrozenStackTrace", (void*)&QCall_ExceptionNative_GetFrozenStackTrace }, + { "ExceptionNative_GetMessageFromNativeResources", (void*)&QCall_ExceptionNative_GetMessageFromNativeResources }, + { "ExceptionNative_GetMethodFromStackTrace", (void*)&QCall_ExceptionNative_GetMethodFromStackTrace }, + { "ExceptionNative_ThrowAmbiguousResolutionException", (void*)&QCall_ExceptionNative_ThrowAmbiguousResolutionException }, + { "ExceptionNative_ThrowClassAccessException", (void*)&QCall_ExceptionNative_ThrowClassAccessException }, + { "ExceptionNative_ThrowEntryPointNotFoundException", (void*)&QCall_ExceptionNative_ThrowEntryPointNotFoundException }, + { "ExceptionNative_ThrowFieldAccessException", (void*)&QCall_ExceptionNative_ThrowFieldAccessException }, + { "ExceptionNative_ThrowMethodAccessException", (void*)&QCall_ExceptionNative_ThrowMethodAccessException }, + { "FileLoadException_GetMessageForHR", (void*)&QCall_FileLoadException_GetMessageForHR }, + { "FreeEnvironmentStringsW", (void*)&QCall_FreeEnvironmentStringsW }, + { "GCHandle_InternalAllocWithGCTransition", (void*)&QCall_GCHandle_InternalAllocWithGCTransition }, + { "GCHandle_InternalFreeWithGCTransition", (void*)&QCall_GCHandle_InternalFreeWithGCTransition }, + { "GCInterface_AddMemoryPressure", (void*)&QCall_GCInterface_AddMemoryPressure }, + { "GCInterface_AllocateNewArray", (void*)&QCall_GCInterface_AllocateNewArray }, + { "GCInterface_Collect", (void*)&QCall_GCInterface_Collect }, + { "GCInterface_EnableNoGCRegionCallback", (void*)&QCall_GCInterface_EnableNoGCRegionCallback }, + { "GCInterface_EndNoGCRegion", (void*)&QCall_GCInterface_EndNoGCRegion }, + { "GCInterface_EnumerateConfigurationValues", (void*)&QCall_GCInterface_EnumerateConfigurationValues }, + { "GCInterface_GetNextFinalizableObject", (void*)&QCall_GCInterface_GetNextFinalizableObject }, + { "GCInterface_GetTotalAllocatedBytesPrecise", (void*)&QCall_GCInterface_GetTotalAllocatedBytesPrecise }, + { "GCInterface_GetTotalMemory", (void*)&QCall_GCInterface_GetTotalMemory }, + { "GCInterface_ReRegisterForFinalize", (void*)&QCall_GCInterface_ReRegisterForFinalize }, + { "GCInterface_RefreshMemoryLimit", (void*)&QCall_GCInterface_RefreshMemoryLimit }, + { "GCInterface_RegisterFrozenSegment", (void*)&QCall_GCInterface_RegisterFrozenSegment }, + { "GCInterface_RemoveMemoryPressure", (void*)&QCall_GCInterface_RemoveMemoryPressure }, + { "GCInterface_StartNoGCRegion", (void*)&QCall_GCInterface_StartNoGCRegion }, + { "GCInterface_UnregisterFrozenSegment", (void*)&QCall_GCInterface_UnregisterFrozenSegment }, + { "GCInterface_WaitForFullGCApproach", (void*)&QCall_GCInterface_WaitForFullGCApproach }, + { "GCInterface_WaitForFullGCComplete", (void*)&QCall_GCInterface_WaitForFullGCComplete }, + { "GCInterface_WaitForPendingFinalizers", (void*)&QCall_GCInterface_WaitForPendingFinalizers }, + { "GenericHandleWorker", (void*)&QCall_GenericHandleWorker }, + { "GetCurrentExInfo", (void*)&QCall_GetCurrentExInfo }, + { "GetEnvironmentStringsW", (void*)&QCall_GetEnvironmentStringsW }, + { "GetEnvironmentVariableW", (void*)&QCall_GetEnvironmentVariableW }, + { "GetFileLoadExceptionMessage", (void*)&QCall_GetFileLoadExceptionMessage }, + { "GetTypeLoadExceptionMessage", (void*)&QCall_GetTypeLoadExceptionMessage }, + { "InitClassHelper", (void*)&QCall_InitClassHelper }, + { "Interlocked_MemoryBarrierProcessWide", (void*)&QCall_Interlocked_MemoryBarrierProcessWide }, + { "IsInstanceOf_NoCacheLookup", (void*)&QCall_IsInstanceOf_NoCacheLookup }, + { "LoaderAllocator_Destroy", (void*)&QCall_LoaderAllocator_Destroy }, + { "MarshalNative_GetDelegateForFunctionPointerInternal", (void*)&QCall_MarshalNative_GetDelegateForFunctionPointerInternal }, + { "MarshalNative_GetExceptionForHR", (void*)&QCall_MarshalNative_GetExceptionForHR }, + { "MarshalNative_GetFunctionPointerForDelegateInternal", (void*)&QCall_MarshalNative_GetFunctionPointerForDelegateInternal }, + { "MarshalNative_HasLayout", (void*)&QCall_MarshalNative_HasLayout }, + { "MarshalNative_OffsetOf", (void*)&QCall_MarshalNative_OffsetOf }, + { "MarshalNative_Prelink", (void*)&QCall_MarshalNative_Prelink }, + { "MarshalNative_SizeOfHelper", (void*)&QCall_MarshalNative_SizeOfHelper }, + { "MdUtf8String_EqualsCaseInsensitive", (void*)&QCall_MdUtf8String_EqualsCaseInsensitive }, + { "MetadataImport_Enum", (void*)&QCall_MetadataImport_Enum }, + { "MetadataImport_GetMarshalAs", (void*)&QCall_MetadataImport_GetMarshalAs }, + { "MethodBase_GetCurrentMethod", (void*)&QCall_MethodBase_GetCurrentMethod }, + { "MethodTable_CanCompareBitsOrUseFastGetHashCode", (void*)&QCall_MethodTable_CanCompareBitsOrUseFastGetHashCode }, + { "ModuleBuilder_GetArrayMethodToken", (void*)&QCall_ModuleBuilder_GetArrayMethodToken }, + { "ModuleBuilder_GetMemberRef", (void*)&QCall_ModuleBuilder_GetMemberRef }, + { "ModuleBuilder_GetMemberRefFromSignature", (void*)&QCall_ModuleBuilder_GetMemberRefFromSignature }, + { "ModuleBuilder_GetMemberRefOfFieldInfo", (void*)&QCall_ModuleBuilder_GetMemberRefOfFieldInfo }, + { "ModuleBuilder_GetMemberRefOfMethodInfo", (void*)&QCall_ModuleBuilder_GetMemberRefOfMethodInfo }, + { "ModuleBuilder_GetStringConstant", (void*)&QCall_ModuleBuilder_GetStringConstant }, + { "ModuleBuilder_GetTokenFromTypeSpec", (void*)&QCall_ModuleBuilder_GetTokenFromTypeSpec }, + { "ModuleBuilder_GetTypeRef", (void*)&QCall_ModuleBuilder_GetTypeRef }, + { "ModuleBuilder_SetFieldRVAContent", (void*)&QCall_ModuleBuilder_SetFieldRVAContent }, + { "ModuleHandle_GetDynamicMethod", (void*)&QCall_ModuleHandle_GetDynamicMethod }, + { "ModuleHandle_GetMDStreamVersion", (void*)&QCall_ModuleHandle_GetMDStreamVersion }, + { "ModuleHandle_GetModuleType", (void*)&QCall_ModuleHandle_GetModuleType }, + { "ModuleHandle_GetPEKind", (void*)&QCall_ModuleHandle_GetPEKind }, + { "ModuleHandle_GetToken", (void*)&QCall_ModuleHandle_GetToken }, + { "ModuleHandle_ResolveField", (void*)&QCall_ModuleHandle_ResolveField }, + { "ModuleHandle_ResolveMethod", (void*)&QCall_ModuleHandle_ResolveMethod }, + { "ModuleHandle_ResolveType", (void*)&QCall_ModuleHandle_ResolveType }, + { "NativeLibrary_LoadByName", (void*)&QCall_NativeLibrary_LoadByName }, + { "NativeRuntimeEventSource_LogContentionLockCreated", (void*)&QCall_NativeRuntimeEventSource_LogContentionLockCreated }, + { "NativeRuntimeEventSource_LogContentionStart", (void*)&QCall_NativeRuntimeEventSource_LogContentionStart }, + { "NativeRuntimeEventSource_LogContentionStop", (void*)&QCall_NativeRuntimeEventSource_LogContentionStop }, + { "NativeRuntimeEventSource_LogThreadPoolIODequeue", (void*)&QCall_NativeRuntimeEventSource_LogThreadPoolIODequeue }, + { "NativeRuntimeEventSource_LogThreadPoolIOEnqueue", (void*)&QCall_NativeRuntimeEventSource_LogThreadPoolIOEnqueue }, + { "NativeRuntimeEventSource_LogThreadPoolIOPack", (void*)&QCall_NativeRuntimeEventSource_LogThreadPoolIOPack }, + { "NativeRuntimeEventSource_LogThreadPoolMinMaxThreads", (void*)&QCall_NativeRuntimeEventSource_LogThreadPoolMinMaxThreads }, + { "NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentAdjustment", (void*)&QCall_NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentAdjustment }, + { "NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentSample", (void*)&QCall_NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentSample }, + { "NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentStats", (void*)&QCall_NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentStats }, + { "NativeRuntimeEventSource_LogThreadPoolWorkerThreadStart", (void*)&QCall_NativeRuntimeEventSource_LogThreadPoolWorkerThreadStart }, + { "NativeRuntimeEventSource_LogThreadPoolWorkerThreadStop", (void*)&QCall_NativeRuntimeEventSource_LogThreadPoolWorkerThreadStop }, + { "NativeRuntimeEventSource_LogThreadPoolWorkerThreadWait", (void*)&QCall_NativeRuntimeEventSource_LogThreadPoolWorkerThreadWait }, + { "NativeRuntimeEventSource_LogThreadPoolWorkingThreadCount", (void*)&QCall_NativeRuntimeEventSource_LogThreadPoolWorkingThreadCount }, + { "NativeRuntimeEventSource_LogWaitHandleWaitStart", (void*)&QCall_NativeRuntimeEventSource_LogWaitHandleWaitStart }, + { "NativeRuntimeEventSource_LogWaitHandleWaitStop", (void*)&QCall_NativeRuntimeEventSource_LogWaitHandleWaitStop }, + { "ObjectHeader_GetOrCreateLockObject", (void*)&QCall_ObjectHeader_GetOrCreateLockObject }, + { "ObjectNative_AllocateUninitializedClone", (void*)&QCall_ObjectNative_AllocateUninitializedClone }, + { "ObjectNative_GetHashCodeSlow", (void*)&QCall_ObjectNative_GetHashCodeSlow }, + { "QCall_FreeGCHandleForTypeHandle", (void*)&QCall_QCall_FreeGCHandleForTypeHandle }, + { "QCall_GetGCHandleForTypeHandle", (void*)&QCall_QCall_GetGCHandleForTypeHandle }, + { "ReflectionInvocation_CompileMethod", (void*)&QCall_ReflectionInvocation_CompileMethod }, + { "ReflectionInvocation_GetBoxInfo", (void*)&QCall_ReflectionInvocation_GetBoxInfo }, + { "ReflectionInvocation_GetGuid", (void*)&QCall_ReflectionInvocation_GetGuid }, + { "ReflectionInvocation_PrepareDelegate", (void*)&QCall_ReflectionInvocation_PrepareDelegate }, + { "ReflectionInvocation_PrepareMethod", (void*)&QCall_ReflectionInvocation_PrepareMethod }, + { "ReflectionInvocation_RunClassConstructor", (void*)&QCall_ReflectionInvocation_RunClassConstructor }, + { "ReflectionInvocation_RunModuleConstructor", (void*)&QCall_ReflectionInvocation_RunModuleConstructor }, + { "ReflectionInvocation_SizeOf", (void*)&QCall_ReflectionInvocation_SizeOf }, + { "ReflectionSerialization_GetCreateUninitializedObjectInfo", (void*)&QCall_ReflectionSerialization_GetCreateUninitializedObjectInfo }, + { "ResolveVirtualFunctionPointer", (void*)&QCall_ResolveVirtualFunctionPointer }, + { "RuntimeFieldHandle_GetEnCFieldAddr", (void*)&QCall_RuntimeFieldHandle_GetEnCFieldAddr }, + { "RuntimeFieldHandle_GetFieldDataReference", (void*)&QCall_RuntimeFieldHandle_GetFieldDataReference }, + { "RuntimeFieldHandle_GetRVAFieldInfo", (void*)&QCall_RuntimeFieldHandle_GetRVAFieldInfo }, + { "RuntimeFieldHandle_GetValue", (void*)&QCall_RuntimeFieldHandle_GetValue }, + { "RuntimeFieldHandle_GetValueDirect", (void*)&QCall_RuntimeFieldHandle_GetValueDirect }, + { "RuntimeFieldHandle_SetValue", (void*)&QCall_RuntimeFieldHandle_SetValue }, + { "RuntimeFieldHandle_SetValueDirect", (void*)&QCall_RuntimeFieldHandle_SetValueDirect }, + { "RuntimeMethodHandle_ConstructInstantiation", (void*)&QCall_RuntimeMethodHandle_ConstructInstantiation }, + { "RuntimeMethodHandle_Destroy", (void*)&QCall_RuntimeMethodHandle_Destroy }, + { "RuntimeMethodHandle_GetDiagnosticCodeStart", (void*)&QCall_RuntimeMethodHandle_GetDiagnosticCodeStart }, + { "RuntimeMethodHandle_GetFunctionPointer", (void*)&QCall_RuntimeMethodHandle_GetFunctionPointer }, + { "RuntimeMethodHandle_GetMethodBody", (void*)&QCall_RuntimeMethodHandle_GetMethodBody }, + { "RuntimeMethodHandle_GetMethodInstantiation", (void*)&QCall_RuntimeMethodHandle_GetMethodInstantiation }, + { "RuntimeMethodHandle_GetStubIfNeededSlow", (void*)&QCall_RuntimeMethodHandle_GetStubIfNeededSlow }, + { "RuntimeMethodHandle_GetTypicalMethodDefinition", (void*)&QCall_RuntimeMethodHandle_GetTypicalMethodDefinition }, + { "RuntimeMethodHandle_GetVirtualFunctionPointer", (void*)&QCall_RuntimeMethodHandle_GetVirtualFunctionPointer }, + { "RuntimeMethodHandle_IsCAVisibleFromDecoratedType", (void*)&QCall_RuntimeMethodHandle_IsCAVisibleFromDecoratedType }, + { "RuntimeMethodHandle_StripMethodInstantiation", (void*)&QCall_RuntimeMethodHandle_StripMethodInstantiation }, + { "RuntimeModule_GetFullyQualifiedName", (void*)&QCall_RuntimeModule_GetFullyQualifiedName }, + { "RuntimeModule_GetScopeName", (void*)&QCall_RuntimeModule_GetScopeName }, + { "RuntimeModule_GetTypes", (void*)&QCall_RuntimeModule_GetTypes }, + { "RuntimeTypeHandle_AllocateTypeAssociatedMemory", (void*)&QCall_RuntimeTypeHandle_AllocateTypeAssociatedMemory }, + { "RuntimeTypeHandle_AllocateTypeAssociatedMemoryAligned", (void*)&QCall_RuntimeTypeHandle_AllocateTypeAssociatedMemoryAligned }, + { "RuntimeTypeHandle_ConstructName", (void*)&QCall_RuntimeTypeHandle_ConstructName }, + { "RuntimeTypeHandle_CreateInstanceForAnotherGenericParameter", (void*)&QCall_RuntimeTypeHandle_CreateInstanceForAnotherGenericParameter }, + { "RuntimeTypeHandle_GetActivationInfo", (void*)&QCall_RuntimeTypeHandle_GetActivationInfo }, + { "RuntimeTypeHandle_GetArgumentTypesFromFunctionPointer", (void*)&QCall_RuntimeTypeHandle_GetArgumentTypesFromFunctionPointer }, + { "RuntimeTypeHandle_GetAssemblySlow", (void*)&QCall_RuntimeTypeHandle_GetAssemblySlow }, + { "RuntimeTypeHandle_GetConstraints", (void*)&QCall_RuntimeTypeHandle_GetConstraints }, + { "RuntimeTypeHandle_GetDeclaringMethodForGenericParameter", (void*)&QCall_RuntimeTypeHandle_GetDeclaringMethodForGenericParameter }, + { "RuntimeTypeHandle_GetDeclaringTypeHandle", (void*)&QCall_RuntimeTypeHandle_GetDeclaringTypeHandle }, + { "RuntimeTypeHandle_GetDeclaringTypeHandleForGenericVariable", (void*)&QCall_RuntimeTypeHandle_GetDeclaringTypeHandleForGenericVariable }, + { "RuntimeTypeHandle_GetFields", (void*)&QCall_RuntimeTypeHandle_GetFields }, + { "RuntimeTypeHandle_GetGenericTypeDefinition", (void*)&QCall_RuntimeTypeHandle_GetGenericTypeDefinition }, + { "RuntimeTypeHandle_GetInstantiation", (void*)&QCall_RuntimeTypeHandle_GetInstantiation }, + { "RuntimeTypeHandle_GetInterfaceMethodImplementation", (void*)&QCall_RuntimeTypeHandle_GetInterfaceMethodImplementation }, + { "RuntimeTypeHandle_GetInterfaces", (void*)&QCall_RuntimeTypeHandle_GetInterfaces }, + { "RuntimeTypeHandle_GetMethodAt", (void*)&QCall_RuntimeTypeHandle_GetMethodAt }, + { "RuntimeTypeHandle_GetModuleSlow", (void*)&QCall_RuntimeTypeHandle_GetModuleSlow }, + { "RuntimeTypeHandle_GetNumVirtualsAndStaticVirtuals", (void*)&QCall_RuntimeTypeHandle_GetNumVirtualsAndStaticVirtuals }, + { "RuntimeTypeHandle_GetRuntimeTypeFromHandleSlow", (void*)&QCall_RuntimeTypeHandle_GetRuntimeTypeFromHandleSlow }, + { "RuntimeTypeHandle_Instantiate", (void*)&QCall_RuntimeTypeHandle_Instantiate }, + { "RuntimeTypeHandle_InternalAlloc", (void*)&QCall_RuntimeTypeHandle_InternalAlloc }, + { "RuntimeTypeHandle_InternalAllocNoChecks", (void*)&QCall_RuntimeTypeHandle_InternalAllocNoChecks }, + { "RuntimeTypeHandle_IsVisible", (void*)&QCall_RuntimeTypeHandle_IsVisible }, + { "RuntimeTypeHandle_MakeArray", (void*)&QCall_RuntimeTypeHandle_MakeArray }, + { "RuntimeTypeHandle_MakeByRef", (void*)&QCall_RuntimeTypeHandle_MakeByRef }, + { "RuntimeTypeHandle_MakeFunctionPointer", (void*)&QCall_RuntimeTypeHandle_MakeFunctionPointer }, + { "RuntimeTypeHandle_MakePointer", (void*)&QCall_RuntimeTypeHandle_MakePointer }, + { "RuntimeTypeHandle_MakeSZArray", (void*)&QCall_RuntimeTypeHandle_MakeSZArray }, + { "RuntimeTypeHandle_RegisterCollectibleTypeDependency", (void*)&QCall_RuntimeTypeHandle_RegisterCollectibleTypeDependency }, + { "RuntimeTypeHandle_SatisfiesConstraints", (void*)&QCall_RuntimeTypeHandle_SatisfiesConstraints }, + { "RuntimeTypeHandle_VerifyInterfaceIsImplemented", (void*)&QCall_RuntimeTypeHandle_VerifyInterfaceIsImplemented }, + { "SetEnvironmentVariableW", (void*)&QCall_SetEnvironmentVariableW }, + { "SfiInit", (void*)&QCall_SfiInit }, + { "SfiNext", (void*)&QCall_SfiNext }, + { "Signature_AreEqual", (void*)&QCall_Signature_AreEqual }, + { "Signature_GetCustomModifiersAtOffset", (void*)&QCall_Signature_GetCustomModifiersAtOffset }, + { "Signature_Init", (void*)&QCall_Signature_Init }, + { "StackTrace_GetStackFramesInternal", (void*)&QCall_StackTrace_GetStackFramesInternal }, + { "Stream_HasOverriddenSlow", (void*)&QCall_Stream_HasOverriddenSlow }, + { "String_Intern", (void*)&QCall_String_Intern }, + { "String_IsInterned", (void*)&QCall_String_IsInterned }, + { "StubHelpers_CreateCustomMarshaler", (void*)&QCall_StubHelpers_CreateCustomMarshaler }, + { "StubHelpers_CreateLayoutClassMarshalStubs", (void*)&QCall_StubHelpers_CreateLayoutClassMarshalStubs }, + { "StubHelpers_MulticastDebuggerTraceHelper", (void*)&QCall_StubHelpers_MulticastDebuggerTraceHelper }, + { "StubHelpers_ThrowInteropException", (void*)&QCall_StubHelpers_ThrowInteropException }, + { "StubHelpers_ThrowInteropParamException", (void*)&QCall_StubHelpers_ThrowInteropParamException }, + { "StubHelpers_ValidateByref", (void*)&QCall_StubHelpers_ValidateByref }, + { "StubHelpers_ValidateObject", (void*)&QCall_StubHelpers_ValidateObject }, + { "SystemJS_MarkAsyncMain", (void*)&QCall_SystemJS_MarkAsyncMain }, + { "SystemJS_RejectMainPromise", (void*)&QCall_SystemJS_RejectMainPromise }, + { "SystemJS_ResolveMainPromise", (void*)&QCall_SystemJS_ResolveMainPromise }, + { "SystemJS_ScheduleBackgroundJob", (void*)&QCall_SystemJS_ScheduleBackgroundJob }, + { "SystemJS_ScheduleTimer", (void*)&QCall_SystemJS_ScheduleTimer }, + { "TailCallHelp_AllocTailCallArgBufferInternal", (void*)&QCall_TailCallHelp_AllocTailCallArgBufferInternal }, + { "ThreadNative_Abort", (void*)&QCall_ThreadNative_Abort }, + { "ThreadNative_GetQCallSpecialException", (void*)&QCall_ThreadNative_GetQCallSpecialException }, + { "ThreadNative_GetThreadState", (void*)&QCall_ThreadNative_GetThreadState }, + { "ThreadNative_ResetAbort", (void*)&QCall_ThreadNative_ResetAbort }, + { "ThrowInvalidCastException", (void*)&QCall_ThrowInvalidCastException }, + { "TypeBuilder_AddInterfaceImpl", (void*)&QCall_TypeBuilder_AddInterfaceImpl }, + { "TypeBuilder_DefineCustomAttribute", (void*)&QCall_TypeBuilder_DefineCustomAttribute }, + { "TypeBuilder_DefineEvent", (void*)&QCall_TypeBuilder_DefineEvent }, + { "TypeBuilder_DefineField", (void*)&QCall_TypeBuilder_DefineField }, + { "TypeBuilder_DefineGenericParam", (void*)&QCall_TypeBuilder_DefineGenericParam }, + { "TypeBuilder_DefineMethod", (void*)&QCall_TypeBuilder_DefineMethod }, + { "TypeBuilder_DefineMethodImpl", (void*)&QCall_TypeBuilder_DefineMethodImpl }, + { "TypeBuilder_DefineMethodSemantics", (void*)&QCall_TypeBuilder_DefineMethodSemantics }, + { "TypeBuilder_DefineMethodSpec", (void*)&QCall_TypeBuilder_DefineMethodSpec }, + { "TypeBuilder_DefineProperty", (void*)&QCall_TypeBuilder_DefineProperty }, + { "TypeBuilder_DefineType", (void*)&QCall_TypeBuilder_DefineType }, + { "TypeBuilder_GetTokenFromSig", (void*)&QCall_TypeBuilder_GetTokenFromSig }, + { "TypeBuilder_SetClassLayout", (void*)&QCall_TypeBuilder_SetClassLayout }, + { "TypeBuilder_SetConstantValue", (void*)&QCall_TypeBuilder_SetConstantValue }, + { "TypeBuilder_SetFieldLayoutOffset", (void*)&QCall_TypeBuilder_SetFieldLayoutOffset }, + { "TypeBuilder_SetMethodIL", (void*)&QCall_TypeBuilder_SetMethodIL }, + { "TypeBuilder_SetMethodImpl", (void*)&QCall_TypeBuilder_SetMethodImpl }, + { "TypeBuilder_SetPInvokeData", (void*)&QCall_TypeBuilder_SetPInvokeData }, + { "TypeBuilder_SetParamInfo", (void*)&QCall_TypeBuilder_SetParamInfo }, + { "TypeBuilder_SetParentType", (void*)&QCall_TypeBuilder_SetParentType }, + { "TypeBuilder_TermCreateClass", (void*)&QCall_TypeBuilder_TermCreateClass }, + { "TypeHandle_CanCastTo_NoCacheLookup", (void*)&QCall_TypeHandle_CanCastTo_NoCacheLookup }, + { "TypeHandle_GetCorElementType", (void*)&QCall_TypeHandle_GetCorElementType }, + { "TypeMapLazyDictionary_FindPrecachedExternalTypeMapEntry", (void*)&QCall_TypeMapLazyDictionary_FindPrecachedExternalTypeMapEntry }, + { "TypeMapLazyDictionary_FindPrecachedProxyTypeMapEntry", (void*)&QCall_TypeMapLazyDictionary_FindPrecachedProxyTypeMapEntry }, + { "TypeMapLazyDictionary_ProcessAttributes", (void*)&QCall_TypeMapLazyDictionary_ProcessAttributes }, + { "UnsafeAccessors_ResolveGenericParamToTypeHandle", (void*)&QCall_UnsafeAccessors_ResolveGenericParamToTypeHandle }, + { "ValueType_GetHashCodeStrategy", (void*)&QCall_ValueType_GetHashCodeStrategy }, + { "VersionResilientHashCode_TypeHashCode", (void*)&QCall_VersionResilientHashCode_TypeHashCode }, + { "memmove", (void*)&QCall_memmove }, + { "memset", (void*)&QCall_memset }, +}; + +const void* QCallResolveDllImport(const char* name) +{ + return minipal_resolve_dllimport(s_QCall, sizeof(s_QCall) / sizeof(s_QCall[0]), name); +} diff --git a/src/coreclr/vm/wasm/browser/diagnostics/callhelpers-reverse.cpp b/src/coreclr/vm/wasm/browser/diagnostics/callhelpers-reverse.cpp new file mode 100644 index 00000000000000..a7b0111e5348a5 --- /dev/null +++ b/src/coreclr/vm/wasm/browser/diagnostics/callhelpers-reverse.cpp @@ -0,0 +1,1324 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// + +// +// GENERATED FILE, DON'T EDIT +// Generated by coreclr callhelpers generator +// + +#include + +// WASM-TODO: The method lookup would ideally be fully qualified assembly and then methodDef token. +// The current approach has limitations with overloaded methods. +extern "C" void LookupUnmanagedCallersOnlyMethodByName(const char* fullQualifiedTypeName, const char* methodName, MethodDesc** ppMD); +extern "C" void ExecuteInterpretedMethodFromUnmanaged(MethodDesc* pMD, int8_t* args, size_t argSize, int8_t* ret, PCODE callerIp); +extern "C" void* GetR2RNativeCodeForUnmanagedCallersOnly(MethodDesc* pMD); + +static MethodDesc* MD_System_Private_CoreLib_System_GC__RegisterNoGCRegionCallback_g__Callback_7C_66_0_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_GC__RegisterNoGCRegionCallback_g__Callback_7C_66_0_I32_RetVoid(void * arg0) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_GC__RegisterNoGCRegionCallback_g__Callback_7C_66_0_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.GC, System.Private.CoreLib", "g__Callback|66_0", &MD_System_Private_CoreLib_System_GC__RegisterNoGCRegionCallback_g__Callback_7C_66_0_I32_RetVoid); + } + + int64_t args[1] = { (int64_t)arg0 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_GC__RegisterNoGCRegionCallback_g__Callback_7C_66_0_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_GC__RegisterNoGCRegionCallback_g__Callback_7C_66_0_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Threading_ThreadPool_BackgroundJobHandler_Void_RetVoid = nullptr; +static void* R2RCode_System_Private_CoreLib_System_Threading_ThreadPool_BackgroundJobHandler_Void_RetVoid = (void*)(intptr_t)-1; +static void Call_System_Private_CoreLib_System_Threading_ThreadPool_BackgroundJobHandler_Void_RetVoid() +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Threading_ThreadPool_BackgroundJobHandler_Void_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Threading.ThreadPool, System.Private.CoreLib", "BackgroundJobHandler", &MD_System_Private_CoreLib_System_Threading_ThreadPool_BackgroundJobHandler_Void_RetVoid); + } + // Prefer the R2R native entrypoint when this callback was compiled (partial R2R). + // Resolve once and cache; a method's native-code availability is fixed after first prepare. + void* r2r = __atomic_load_n(&R2RCode_System_Private_CoreLib_System_Threading_ThreadPool_BackgroundJobHandler_Void_RetVoid, __ATOMIC_ACQUIRE); + if (r2r == (void*)(intptr_t)-1) + { + r2r = GetR2RNativeCodeForUnmanagedCallersOnly(MD_System_Private_CoreLib_System_Threading_ThreadPool_BackgroundJobHandler_Void_RetVoid); + __atomic_store_n(&R2RCode_System_Private_CoreLib_System_Threading_ThreadPool_BackgroundJobHandler_Void_RetVoid, r2r, __ATOMIC_RELEASE); + } + if (r2r != nullptr) + { + ((void(*)())r2r)(); + return; + } + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Threading_ThreadPool_BackgroundJobHandler_Void_RetVoid, nullptr, 0, nullptr, (PCODE)&Call_System_Private_CoreLib_System_Threading_ThreadPool_BackgroundJobHandler_Void_RetVoid); +} + +extern "C" void SystemJS_ExecuteBackgroundJobCallback() +{ + Call_System_Private_CoreLib_System_Threading_ThreadPool_BackgroundJobHandler_Void_RetVoid(); +} + +static MethodDesc* MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_BindAssemblyExports_I32_RetVoid = nullptr; +static void* R2RCode_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_BindAssemblyExports_I32_RetVoid = (void*)(intptr_t)-1; +static void Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_BindAssemblyExports_I32_RetVoid(void * arg0) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_BindAssemblyExports_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.InteropServices.JavaScript.JavaScriptExports, System.Runtime.InteropServices.JavaScript", "BindAssemblyExports", &MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_BindAssemblyExports_I32_RetVoid); + } + // Prefer the R2R native entrypoint when this callback was compiled (partial R2R). + // Resolve once and cache; a method's native-code availability is fixed after first prepare. + void* r2r = __atomic_load_n(&R2RCode_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_BindAssemblyExports_I32_RetVoid, __ATOMIC_ACQUIRE); + if (r2r == (void*)(intptr_t)-1) + { + r2r = GetR2RNativeCodeForUnmanagedCallersOnly(MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_BindAssemblyExports_I32_RetVoid); + __atomic_store_n(&R2RCode_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_BindAssemblyExports_I32_RetVoid, r2r, __ATOMIC_RELEASE); + } + if (r2r != nullptr) + { + ((void(*)(void *))r2r)(arg0); + return; + } + + int64_t args[1] = { (int64_t)arg0 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_BindAssemblyExports_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_BindAssemblyExports_I32_RetVoid); +} + +extern "C" void SystemInteropJS_BindAssemblyExports(void * arg0) +{ + Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_BindAssemblyExports_I32_RetVoid(arg0); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_CompilerServices_InitHelpers_CallClassConstructor_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Runtime_CompilerServices_InitHelpers_CallClassConstructor_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_CompilerServices_InitHelpers_CallClassConstructor_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.CompilerServices.InitHelpers, System.Private.CoreLib", "CallClassConstructor", &MD_System_Private_CoreLib_System_Runtime_CompilerServices_InitHelpers_CallClassConstructor_I32_I32_I32_RetVoid); + } + + int64_t args[3] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_CompilerServices_InitHelpers_CallClassConstructor_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Runtime_CompilerServices_InitHelpers_CallClassConstructor_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_CompilerServices_RuntimeHelpers_CallDefaultConstructor_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Runtime_CompilerServices_RuntimeHelpers_CallDefaultConstructor_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_CompilerServices_RuntimeHelpers_CallDefaultConstructor_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.CompilerServices.RuntimeHelpers, System.Private.CoreLib", "CallDefaultConstructor", &MD_System_Private_CoreLib_System_Runtime_CompilerServices_RuntimeHelpers_CallDefaultConstructor_I32_I32_I32_RetVoid); + } + + int64_t args[3] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_CompilerServices_RuntimeHelpers_CallDefaultConstructor_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Runtime_CompilerServices_RuntimeHelpers_CallDefaultConstructor_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallDelegate_I32_RetVoid = nullptr; +static void* R2RCode_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallDelegate_I32_RetVoid = (void*)(intptr_t)-1; +static void Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallDelegate_I32_RetVoid(void * arg0) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallDelegate_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.InteropServices.JavaScript.JavaScriptExports, System.Runtime.InteropServices.JavaScript", "CallDelegate", &MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallDelegate_I32_RetVoid); + } + // Prefer the R2R native entrypoint when this callback was compiled (partial R2R). + // Resolve once and cache; a method's native-code availability is fixed after first prepare. + void* r2r = __atomic_load_n(&R2RCode_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallDelegate_I32_RetVoid, __ATOMIC_ACQUIRE); + if (r2r == (void*)(intptr_t)-1) + { + r2r = GetR2RNativeCodeForUnmanagedCallersOnly(MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallDelegate_I32_RetVoid); + __atomic_store_n(&R2RCode_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallDelegate_I32_RetVoid, r2r, __ATOMIC_RELEASE); + } + if (r2r != nullptr) + { + ((void(*)(void *))r2r)(arg0); + return; + } + + int64_t args[1] = { (int64_t)arg0 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallDelegate_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallDelegate_I32_RetVoid); +} + +extern "C" void SystemInteropJS_CallDelegate(void * arg0) +{ + Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallDelegate_I32_RetVoid(arg0); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Environment_CallEntryPoint_I32_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Environment_CallEntryPoint_I32_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2, int32_t arg3, void * arg4) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Environment_CallEntryPoint_I32_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Environment, System.Private.CoreLib", "CallEntryPoint", &MD_System_Private_CoreLib_System_Environment_CallEntryPoint_I32_I32_I32_I32_I32_RetVoid); + } + + int64_t args[5] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3, (int64_t)arg4 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Environment_CallEntryPoint_I32_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Environment_CallEntryPoint_I32_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallJSExport_I32_I32_RetVoid = nullptr; +static void* R2RCode_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallJSExport_I32_I32_RetVoid = (void*)(intptr_t)-1; +static void Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallJSExport_I32_I32_RetVoid(int32_t arg0, void * arg1) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallJSExport_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.InteropServices.JavaScript.JavaScriptExports, System.Runtime.InteropServices.JavaScript", "CallJSExport", &MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallJSExport_I32_I32_RetVoid); + } + // Prefer the R2R native entrypoint when this callback was compiled (partial R2R). + // Resolve once and cache; a method's native-code availability is fixed after first prepare. + void* r2r = __atomic_load_n(&R2RCode_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallJSExport_I32_I32_RetVoid, __ATOMIC_ACQUIRE); + if (r2r == (void*)(intptr_t)-1) + { + r2r = GetR2RNativeCodeForUnmanagedCallersOnly(MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallJSExport_I32_I32_RetVoid); + __atomic_store_n(&R2RCode_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallJSExport_I32_I32_RetVoid, r2r, __ATOMIC_RELEASE); + } + if (r2r != nullptr) + { + ((void(*)(int32_t, void *))r2r)(arg0, arg1); + return; + } + + int64_t args[2] = { (int64_t)arg0, (int64_t)arg1 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallJSExport_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallJSExport_I32_I32_RetVoid); +} + +extern "C" void SystemInteropJS_CallJSExport(int32_t arg0, void * arg1) +{ + Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallJSExport_I32_I32_RetVoid(arg0, arg1); +} + +static MethodDesc* MD_System_Private_CoreLib_System_StartupHookProvider_CallStartupHook_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_StartupHookProvider_CallStartupHook_I32_I32_RetVoid(void * arg0, void * arg1) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_StartupHookProvider_CallStartupHook_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.StartupHookProvider, System.Private.CoreLib", "CallStartupHook", &MD_System_Private_CoreLib_System_StartupHookProvider_CallStartupHook_I32_I32_RetVoid); + } + + int64_t args[2] = { (int64_t)arg0, (int64_t)arg1 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_StartupHookProvider_CallStartupHook_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_StartupHookProvider_CallStartupHook_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_CompilerServices_RuntimeHelpers_CallToString_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Runtime_CompilerServices_RuntimeHelpers_CallToString_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_CompilerServices_RuntimeHelpers_CallToString_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.CompilerServices.RuntimeHelpers, System.Private.CoreLib", "CallToString", &MD_System_Private_CoreLib_System_Runtime_CompilerServices_RuntimeHelpers_CallToString_I32_I32_I32_RetVoid); + } + + int64_t args[3] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_CompilerServices_RuntimeHelpers_CallToString_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Runtime_CompilerServices_RuntimeHelpers_CallToString_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Diagnostics_Tracing_EventPipeEventProvider_Callback_I32_I32_I32_I64_I64_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Diagnostics_Tracing_EventPipeEventProvider_Callback_I32_I32_I32_I64_I64_I32_I32_RetVoid(void * arg0, int32_t arg1, uint32_t arg2, int64_t arg3, int64_t arg4, void * arg5, void * arg6) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Diagnostics_Tracing_EventPipeEventProvider_Callback_I32_I32_I32_I64_I64_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Diagnostics.Tracing.EventPipeEventProvider, System.Private.CoreLib", "Callback", &MD_System_Private_CoreLib_System_Diagnostics_Tracing_EventPipeEventProvider_Callback_I32_I32_I32_I64_I64_I32_I32_RetVoid); + } + + int64_t args[7] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3, (int64_t)arg4, (int64_t)arg5, (int64_t)arg6 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Diagnostics_Tracing_EventPipeEventProvider_Callback_I32_I32_I32_I64_I64_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Diagnostics_Tracing_EventPipeEventProvider_Callback_I32_I32_I32_I64_I64_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ClearManaged_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ClearManaged_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2, void * arg3) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ClearManaged_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.StubHelpers.MngdRefCustomMarshaler, System.Private.CoreLib", "ClearManaged", &MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ClearManaged_I32_I32_I32_I32_RetVoid); + } + + int64_t args[4] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ClearManaged_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ClearManaged_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ClearNative_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ClearNative_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2, void * arg3) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ClearNative_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.StubHelpers.MngdRefCustomMarshaler, System.Private.CoreLib", "ClearNative", &MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ClearNative_I32_I32_I32_I32_RetVoid); + } + + int64_t args[4] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ClearNative_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ClearNative_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CompleteTask_I32_RetVoid = nullptr; +static void* R2RCode_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CompleteTask_I32_RetVoid = (void*)(intptr_t)-1; +static void Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CompleteTask_I32_RetVoid(void * arg0) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CompleteTask_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.InteropServices.JavaScript.JavaScriptExports, System.Runtime.InteropServices.JavaScript", "CompleteTask", &MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CompleteTask_I32_RetVoid); + } + // Prefer the R2R native entrypoint when this callback was compiled (partial R2R). + // Resolve once and cache; a method's native-code availability is fixed after first prepare. + void* r2r = __atomic_load_n(&R2RCode_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CompleteTask_I32_RetVoid, __ATOMIC_ACQUIRE); + if (r2r == (void*)(intptr_t)-1) + { + r2r = GetR2RNativeCodeForUnmanagedCallersOnly(MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CompleteTask_I32_RetVoid); + __atomic_store_n(&R2RCode_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CompleteTask_I32_RetVoid, r2r, __ATOMIC_RELEASE); + } + if (r2r != nullptr) + { + ((void(*)(void *))r2r)(arg0); + return; + } + + int64_t args[1] = { (int64_t)arg0 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CompleteTask_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CompleteTask_I32_RetVoid); +} + +extern "C" void SystemInteropJS_CompleteTask(void * arg0) +{ + Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CompleteTask_I32_RetVoid(arg0); +} + +static MethodDesc* MD_System_Private_CoreLib_System_GC_ConfigCallback_I32_I32_I32_I32_I64_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_GC_ConfigCallback_I32_I32_I32_I32_I64_RetVoid(void * arg0, void * arg1, void * arg2, int32_t arg3, int64_t arg4) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_GC_ConfigCallback_I32_I32_I32_I32_I64_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.GC, System.Private.CoreLib", "ConfigCallback", &MD_System_Private_CoreLib_System_GC_ConfigCallback_I32_I32_I32_I32_I64_RetVoid); + } + + int64_t args[5] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3, (int64_t)arg4 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_GC_ConfigCallback_I32_I32_I32_I32_I64_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_GC_ConfigCallback_I32_I32_I32_I32_I64_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ConvertContentsToManaged_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ConvertContentsToManaged_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2, void * arg3) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ConvertContentsToManaged_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.StubHelpers.MngdRefCustomMarshaler, System.Private.CoreLib", "ConvertContentsToManaged", &MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ConvertContentsToManaged_I32_I32_I32_I32_RetVoid); + } + + int64_t args[4] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ConvertContentsToManaged_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ConvertContentsToManaged_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ConvertContentsToNative_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ConvertContentsToNative_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2, void * arg3) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ConvertContentsToNative_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.StubHelpers.MngdRefCustomMarshaler, System.Private.CoreLib", "ConvertContentsToNative", &MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ConvertContentsToNative_I32_I32_I32_I32_RetVoid); + } + + int64_t args[4] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ConvertContentsToNative_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ConvertContentsToNative_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_StubHelpers_BSTRMarshaler_ConvertToManaged_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_StubHelpers_BSTRMarshaler_ConvertToManaged_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_StubHelpers_BSTRMarshaler_ConvertToManaged_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.StubHelpers.BSTRMarshaler, System.Private.CoreLib", "ConvertToManaged", &MD_System_Private_CoreLib_System_StubHelpers_BSTRMarshaler_ConvertToManaged_I32_I32_I32_RetVoid); + } + + int64_t args[3] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_StubHelpers_BSTRMarshaler_ConvertToManaged_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_StubHelpers_BSTRMarshaler_ConvertToManaged_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_StubHelpers_BSTRMarshaler_ConvertToNative_I32_I32_RetI32 = nullptr; +static void * Call_System_Private_CoreLib_System_StubHelpers_BSTRMarshaler_ConvertToNative_I32_I32_RetI32(void * arg0, void * arg1) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_StubHelpers_BSTRMarshaler_ConvertToNative_I32_I32_RetI32) + { + LookupUnmanagedCallersOnlyMethodByName("System.StubHelpers.BSTRMarshaler, System.Private.CoreLib", "ConvertToNative", &MD_System_Private_CoreLib_System_StubHelpers_BSTRMarshaler_ConvertToNative_I32_I32_RetI32); + } + + int64_t args[2] = { (int64_t)arg0, (int64_t)arg1 }; + void * result; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_StubHelpers_BSTRMarshaler_ConvertToNative_I32_I32_RetI32, (int8_t*)args, sizeof(args), (int8_t*)&result, (PCODE)&Call_System_Private_CoreLib_System_StubHelpers_BSTRMarshaler_ConvertToNative_I32_I32_RetI32); + return result; +} + +static MethodDesc* MD_System_Private_CoreLib_System_Reflection_LoaderAllocator_Create_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Reflection_LoaderAllocator_Create_I32_I32_RetVoid(void * arg0, void * arg1) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Reflection_LoaderAllocator_Create_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Reflection.LoaderAllocator, System.Private.CoreLib", "Create", &MD_System_Private_CoreLib_System_Reflection_LoaderAllocator_Create_I32_I32_RetVoid); + } + + int64_t args[2] = { (int64_t)arg0, (int64_t)arg1 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Reflection_LoaderAllocator_Create_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Reflection_LoaderAllocator_Create_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_TypeLoadException_Create_I32_I32_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_TypeLoadException_Create_I32_I32_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2, int32_t arg3, void * arg4, void * arg5) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_TypeLoadException_Create_I32_I32_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.TypeLoadException, System.Private.CoreLib", "Create", &MD_System_Private_CoreLib_System_TypeLoadException_Create_I32_I32_I32_I32_I32_I32_RetVoid); + } + + int64_t args[6] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3, (int64_t)arg4, (int64_t)arg5 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_TypeLoadException_Create_I32_I32_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_TypeLoadException_Create_I32_I32_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_IO_FileLoadException_Create_I32_I32_I32_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_IO_FileLoadException_Create_I32_I32_I32_I32_I32_I32_I32_RetVoid(int32_t arg0, void * arg1, void * arg2, int32_t arg3, void * arg4, void * arg5, void * arg6) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_IO_FileLoadException_Create_I32_I32_I32_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.IO.FileLoadException, System.Private.CoreLib", "Create", &MD_System_Private_CoreLib_System_IO_FileLoadException_Create_I32_I32_I32_I32_I32_I32_I32_RetVoid); + } + + int64_t args[7] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3, (int64_t)arg4, (int64_t)arg5, (int64_t)arg6 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_IO_FileLoadException_Create_I32_I32_I32_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_IO_FileLoadException_Create_I32_I32_I32_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Exception_CreateArgumentException_I32_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Exception_CreateArgumentException_I32_I32_I32_I32_I32_RetVoid(int32_t arg0, void * arg1, void * arg2, void * arg3, void * arg4) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Exception_CreateArgumentException_I32_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Exception, System.Private.CoreLib", "CreateArgumentException", &MD_System_Private_CoreLib_System_Exception_CreateArgumentException_I32_I32_I32_I32_I32_RetVoid); + } + + int64_t args[5] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3, (int64_t)arg4 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Exception_CreateArgumentException_I32_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Exception_CreateArgumentException_I32_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Reflection_AssemblyName_CreateAssemblyName_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Reflection_AssemblyName_CreateAssemblyName_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Reflection_AssemblyName_CreateAssemblyName_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Reflection.AssemblyName, System.Private.CoreLib", "CreateAssemblyName", &MD_System_Private_CoreLib_System_Reflection_AssemblyName_CreateAssemblyName_I32_I32_I32_RetVoid); + } + + int64_t args[3] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Reflection_AssemblyName_CreateAssemblyName_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Reflection_AssemblyName_CreateAssemblyName_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Exception_CreateRuntimeWrappedException_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Exception_CreateRuntimeWrappedException_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Exception_CreateRuntimeWrappedException_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Exception, System.Private.CoreLib", "CreateRuntimeWrappedException", &MD_System_Private_CoreLib_System_Exception_CreateRuntimeWrappedException_I32_I32_I32_RetVoid); + } + + int64_t args[3] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Exception_CreateRuntimeWrappedException_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Exception_CreateRuntimeWrappedException_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Exception_CreateTargetInvocationException_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Exception_CreateTargetInvocationException_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Exception_CreateTargetInvocationException_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Exception, System.Private.CoreLib", "CreateTargetInvocationException", &MD_System_Private_CoreLib_System_Exception_CreateTargetInvocationException_I32_I32_I32_RetVoid); + } + + int64_t args[3] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Exception_CreateTargetInvocationException_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Exception_CreateTargetInvocationException_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Exception_CreateTypeInitializationException_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Exception_CreateTypeInitializationException_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2, void * arg3) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Exception_CreateTypeInitializationException_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Exception, System.Private.CoreLib", "CreateTypeInitializationException", &MD_System_Private_CoreLib_System_Exception_CreateTypeInitializationException_I32_I32_I32_I32_RetVoid); + } + + int64_t args[4] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Exception_CreateTypeInitializationException_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Exception_CreateTypeInitializationException_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Globalization_CalendarData_EnumCalendarInfoCallback_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Globalization_CalendarData_EnumCalendarInfoCallback_I32_I32_RetVoid(void * arg0, void * arg1) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Globalization_CalendarData_EnumCalendarInfoCallback_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Globalization.CalendarData, System.Private.CoreLib", "EnumCalendarInfoCallback", &MD_System_Private_CoreLib_System_Globalization_CalendarData_EnumCalendarInfoCallback_I32_I32_RetVoid); + } + + int64_t args[2] = { (int64_t)arg0, (int64_t)arg1 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Globalization_CalendarData_EnumCalendarInfoCallback_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Globalization_CalendarData_EnumCalendarInfoCallback_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Environment_ExecuteInDefaultAppDomain_I32_I32_I32_RetI32 = nullptr; +static int32_t Call_System_Private_CoreLib_System_Environment_ExecuteInDefaultAppDomain_I32_I32_I32_RetI32(void * arg0, void * arg1, void * arg2) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Environment_ExecuteInDefaultAppDomain_I32_I32_I32_RetI32) + { + LookupUnmanagedCallersOnlyMethodByName("System.Environment, System.Private.CoreLib", "ExecuteInDefaultAppDomain", &MD_System_Private_CoreLib_System_Environment_ExecuteInDefaultAppDomain_I32_I32_I32_RetI32); + } + + int64_t args[3] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2 }; + int32_t result; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Environment_ExecuteInDefaultAppDomain_I32_I32_I32_RetI32, (int8_t*)args, sizeof(args), (int8_t*)&result, (PCODE)&Call_System_Private_CoreLib_System_Environment_ExecuteInDefaultAppDomain_I32_I32_I32_RetI32); + return result; +} + +static MethodDesc* MD_System_Private_CoreLib_System_Resolver_GetCodeInfo_I32_I32_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Resolver_GetCodeInfo_I32_I32_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2, void * arg3, void * arg4, void * arg5) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Resolver_GetCodeInfo_I32_I32_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Resolver, System.Private.CoreLib", "GetCodeInfo", &MD_System_Private_CoreLib_System_Resolver_GetCodeInfo_I32_I32_I32_I32_I32_I32_RetVoid); + } + + int64_t args[6] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3, (int64_t)arg4, (int64_t)arg5 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Resolver_GetCodeInfo_I32_I32_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Resolver_GetCodeInfo_I32_I32_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_GetCustomMarshalerInstance_I32_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_GetCustomMarshalerInstance_I32_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, int32_t arg2, void * arg3, void * arg4) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_GetCustomMarshalerInstance_I32_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.StubHelpers.MngdRefCustomMarshaler, System.Private.CoreLib", "GetCustomMarshalerInstance", &MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_GetCustomMarshalerInstance_I32_I32_I32_I32_I32_RetVoid); + } + + int64_t args[5] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3, (int64_t)arg4 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_GetCustomMarshalerInstance_I32_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_GetCustomMarshalerInstance_I32_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Resolver_GetEHInfo_I32_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Resolver_GetEHInfo_I32_I32_I32_I32_I32_RetVoid(void * arg0, int32_t arg1, void * arg2, void * arg3, void * arg4) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Resolver_GetEHInfo_I32_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Resolver, System.Private.CoreLib", "GetEHInfo", &MD_System_Private_CoreLib_System_Resolver_GetEHInfo_I32_I32_I32_I32_I32_RetVoid); + } + + int64_t args[5] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3, (int64_t)arg4 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Resolver_GetEHInfo_I32_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Resolver_GetEHInfo_I32_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_Internal_Runtime_InteropServices_ComponentActivator_GetFunctionPointer_I32_I32_I32_I32_I32_I32_RetI32 = nullptr; +static int32_t Call_System_Private_CoreLib_Internal_Runtime_InteropServices_ComponentActivator_GetFunctionPointer_I32_I32_I32_I32_I32_I32_RetI32(void * arg0, void * arg1, void * arg2, void * arg3, void * arg4, void * arg5) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_Internal_Runtime_InteropServices_ComponentActivator_GetFunctionPointer_I32_I32_I32_I32_I32_I32_RetI32) + { + LookupUnmanagedCallersOnlyMethodByName("Internal.Runtime.InteropServices.ComponentActivator, System.Private.CoreLib", "GetFunctionPointer", &MD_System_Private_CoreLib_Internal_Runtime_InteropServices_ComponentActivator_GetFunctionPointer_I32_I32_I32_I32_I32_I32_RetI32); + } + + int64_t args[6] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3, (int64_t)arg4, (int64_t)arg5 }; + int32_t result; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_Internal_Runtime_InteropServices_ComponentActivator_GetFunctionPointer_I32_I32_I32_I32_I32_I32_RetI32, (int8_t*)args, sizeof(args), (int8_t*)&result, (PCODE)&Call_System_Private_CoreLib_Internal_Runtime_InteropServices_ComponentActivator_GetFunctionPointer_I32_I32_I32_I32_I32_I32_RetI32); + return result; +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_InteropServices_DynamicInterfaceCastableHelpers_GetInterfaceImplementation_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Runtime_InteropServices_DynamicInterfaceCastableHelpers_GetInterfaceImplementation_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2, void * arg3) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_InteropServices_DynamicInterfaceCastableHelpers_GetInterfaceImplementation_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.InteropServices.DynamicInterfaceCastableHelpers, System.Private.CoreLib", "GetInterfaceImplementation", &MD_System_Private_CoreLib_System_Runtime_InteropServices_DynamicInterfaceCastableHelpers_GetInterfaceImplementation_I32_I32_I32_I32_RetVoid); + } + + int64_t args[4] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_InteropServices_DynamicInterfaceCastableHelpers_GetInterfaceImplementation_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Runtime_InteropServices_DynamicInterfaceCastableHelpers_GetInterfaceImplementation_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Resolver_GetJitContext_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Resolver_GetJitContext_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2, void * arg3) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Resolver_GetJitContext_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Resolver, System.Private.CoreLib", "GetJitContext", &MD_System_Private_CoreLib_System_Resolver_GetJitContext_I32_I32_I32_I32_RetVoid); + } + + int64_t args[4] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Resolver_GetJitContext_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Resolver_GetJitContext_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Resolver_GetLocalsSignature_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Resolver_GetLocalsSignature_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Resolver_GetLocalsSignature_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Resolver, System.Private.CoreLib", "GetLocalsSignature", &MD_System_Private_CoreLib_System_Resolver_GetLocalsSignature_I32_I32_I32_RetVoid); + } + + int64_t args[3] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Resolver_GetLocalsSignature_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Resolver_GetLocalsSignature_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_GetManagedStackTrace_I32_RetVoid = nullptr; +static void* R2RCode_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_GetManagedStackTrace_I32_RetVoid = (void*)(intptr_t)-1; +static void Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_GetManagedStackTrace_I32_RetVoid(void * arg0) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_GetManagedStackTrace_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.InteropServices.JavaScript.JavaScriptExports, System.Runtime.InteropServices.JavaScript", "GetManagedStackTrace", &MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_GetManagedStackTrace_I32_RetVoid); + } + // Prefer the R2R native entrypoint when this callback was compiled (partial R2R). + // Resolve once and cache; a method's native-code availability is fixed after first prepare. + void* r2r = __atomic_load_n(&R2RCode_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_GetManagedStackTrace_I32_RetVoid, __ATOMIC_ACQUIRE); + if (r2r == (void*)(intptr_t)-1) + { + r2r = GetR2RNativeCodeForUnmanagedCallersOnly(MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_GetManagedStackTrace_I32_RetVoid); + __atomic_store_n(&R2RCode_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_GetManagedStackTrace_I32_RetVoid, r2r, __ATOMIC_RELEASE); + } + if (r2r != nullptr) + { + ((void(*)(void *))r2r)(arg0); + return; + } + + int64_t args[1] = { (int64_t)arg0 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_GetManagedStackTrace_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_GetManagedStackTrace_I32_RetVoid); +} + +extern "C" void SystemInteropJS_GetManagedStackTrace(void * arg0) +{ + Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_GetManagedStackTrace_I32_RetVoid(arg0); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Environment_GetResourceString_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Environment_GetResourceString_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Environment_GetResourceString_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Environment, System.Private.CoreLib", "GetResourceString", &MD_System_Private_CoreLib_System_Environment_GetResourceString_I32_I32_I32_RetVoid); + } + + int64_t args[3] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Environment_GetResourceString_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Environment_GetResourceString_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Resolver_GetStringLiteral_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Resolver_GetStringLiteral_I32_I32_I32_I32_RetVoid(void * arg0, int32_t arg1, void * arg2, void * arg3) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Resolver_GetStringLiteral_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Resolver, System.Private.CoreLib", "GetStringLiteral", &MD_System_Private_CoreLib_System_Resolver_GetStringLiteral_I32_I32_I32_I32_RetVoid); + } + + int64_t args[4] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Resolver_GetStringLiteral_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Resolver_GetStringLiteral_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Reflection_TypeNameResolver_GetTypeHelper_I32_I32_I32_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Reflection_TypeNameResolver_GetTypeHelper_I32_I32_I32_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, int32_t arg2, int32_t arg3, void * arg4, void * arg5, void * arg6) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Reflection_TypeNameResolver_GetTypeHelper_I32_I32_I32_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Reflection.TypeNameResolver, System.Private.CoreLib", "GetTypeHelper", &MD_System_Private_CoreLib_System_Reflection_TypeNameResolver_GetTypeHelper_I32_I32_I32_I32_I32_I32_I32_RetVoid); + } + + int64_t args[7] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3, (int64_t)arg4, (int64_t)arg5, (int64_t)arg6 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Reflection_TypeNameResolver_GetTypeHelper_I32_I32_I32_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Reflection_TypeNameResolver_GetTypeHelper_I32_I32_I32_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Environment_InitializeCommandLineArgs_I32_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Environment_InitializeCommandLineArgs_I32_I32_I32_I32_I32_RetVoid(void * arg0, int32_t arg1, void * arg2, void * arg3, void * arg4) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Environment_InitializeCommandLineArgs_I32_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Environment, System.Private.CoreLib", "InitializeCommandLineArgs", &MD_System_Private_CoreLib_System_Environment_InitializeCommandLineArgs_I32_I32_I32_I32_I32_RetVoid); + } + + int64_t args[5] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3, (int64_t)arg4 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Environment_InitializeCommandLineArgs_I32_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Environment_InitializeCommandLineArgs_I32_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_InitializeDefaultContext_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_InitializeDefaultContext_I32_RetVoid(void * arg0) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_InitializeDefaultContext_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.Loader.AssemblyLoadContext, System.Private.CoreLib", "InitializeDefaultContext", &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_InitializeDefaultContext_I32_RetVoid); + } + + int64_t args[1] = { (int64_t)arg0 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_InitializeDefaultContext_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_InitializeDefaultContext_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Diagnostics_Tracing_EventSource_InitializeDefaultEventSources_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Diagnostics_Tracing_EventSource_InitializeDefaultEventSources_I32_RetVoid(void * arg0) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Diagnostics_Tracing_EventSource_InitializeDefaultEventSources_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Diagnostics.Tracing.EventSource, System.Private.CoreLib", "InitializeDefaultEventSources", &MD_System_Private_CoreLib_System_Diagnostics_Tracing_EventSource_InitializeDefaultEventSources_I32_RetVoid); + } + + int64_t args[1] = { (int64_t)arg0 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Diagnostics_Tracing_EventSource_InitializeDefaultEventSources_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Diagnostics_Tracing_EventSource_InitializeDefaultEventSources_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Threading_Lock_InitializeForMonitor_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Threading_Lock_InitializeForMonitor_I32_I32_I32_I32_RetVoid(void * arg0, int32_t arg1, uint32_t arg2, void * arg3) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Threading_Lock_InitializeForMonitor_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Threading.Lock, System.Private.CoreLib", "InitializeForMonitor", &MD_System_Private_CoreLib_System_Threading_Lock_InitializeForMonitor_I32_I32_I32_I32_RetVoid); + } + + int64_t args[4] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Threading_Lock_InitializeForMonitor_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Threading_Lock_InitializeForMonitor_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Exception_InternalPreserveStackTrace_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Exception_InternalPreserveStackTrace_I32_I32_RetVoid(void * arg0, void * arg1) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Exception_InternalPreserveStackTrace_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Exception, System.Private.CoreLib", "InternalPreserveStackTrace", &MD_System_Private_CoreLib_System_Exception_InternalPreserveStackTrace_I32_I32_RetVoid); + } + + int64_t args[2] = { (int64_t)arg0, (int64_t)arg1 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Exception_InternalPreserveStackTrace_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Exception_InternalPreserveStackTrace_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_StubHelpers_StubHelpers_InvokeArrayContentsConverter_I32_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_StubHelpers_StubHelpers_InvokeArrayContentsConverter_I32_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, int32_t arg2, void * arg3, void * arg4) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_StubHelpers_StubHelpers_InvokeArrayContentsConverter_I32_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.StubHelpers.StubHelpers, System.Private.CoreLib", "InvokeArrayContentsConverter", &MD_System_Private_CoreLib_System_StubHelpers_StubHelpers_InvokeArrayContentsConverter_I32_I32_I32_I32_I32_RetVoid); + } + + int64_t args[5] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3, (int64_t)arg4 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_StubHelpers_StubHelpers_InvokeArrayContentsConverter_I32_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_StubHelpers_StubHelpers_InvokeArrayContentsConverter_I32_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Diagnostics_Debugger_InvokeFunction_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Diagnostics_Debugger_InvokeFunction_I32_RetVoid(void * arg0) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Diagnostics_Debugger_InvokeFunction_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Diagnostics.Debugger, System.Private.CoreLib", "InvokeFunction", &MD_System_Private_CoreLib_System_Diagnostics_Debugger_InvokeFunction_I32_RetVoid); + } + + int64_t args[1] = { (int64_t)arg0 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Diagnostics_Debugger_InvokeFunction_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Diagnostics_Debugger_InvokeFunction_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_InteropServices_DynamicInterfaceCastableHelpers_IsInterfaceImplemented_I32_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Runtime_InteropServices_DynamicInterfaceCastableHelpers_IsInterfaceImplemented_I32_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, int32_t arg2, void * arg3, void * arg4) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_InteropServices_DynamicInterfaceCastableHelpers_IsInterfaceImplemented_I32_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.InteropServices.DynamicInterfaceCastableHelpers, System.Private.CoreLib", "IsInterfaceImplemented", &MD_System_Private_CoreLib_System_Runtime_InteropServices_DynamicInterfaceCastableHelpers_IsInterfaceImplemented_I32_I32_I32_I32_I32_RetVoid); + } + + int64_t args[5] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3, (int64_t)arg4 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_InteropServices_DynamicInterfaceCastableHelpers_IsInterfaceImplemented_I32_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Runtime_InteropServices_DynamicInterfaceCastableHelpers_IsInterfaceImplemented_I32_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_StubHelpers_StubHelpers_LayoutTypeConvertToManaged_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_StubHelpers_StubHelpers_LayoutTypeConvertToManaged_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_StubHelpers_StubHelpers_LayoutTypeConvertToManaged_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.StubHelpers.StubHelpers, System.Private.CoreLib", "LayoutTypeConvertToManaged", &MD_System_Private_CoreLib_System_StubHelpers_StubHelpers_LayoutTypeConvertToManaged_I32_I32_I32_RetVoid); + } + + int64_t args[3] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_StubHelpers_StubHelpers_LayoutTypeConvertToManaged_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_StubHelpers_StubHelpers_LayoutTypeConvertToManaged_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_StubHelpers_StubHelpers_LayoutTypeConvertToUnmanaged_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_StubHelpers_StubHelpers_LayoutTypeConvertToUnmanaged_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_StubHelpers_StubHelpers_LayoutTypeConvertToUnmanaged_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.StubHelpers.StubHelpers, System.Private.CoreLib", "LayoutTypeConvertToUnmanaged", &MD_System_Private_CoreLib_System_StubHelpers_StubHelpers_LayoutTypeConvertToUnmanaged_I32_I32_I32_RetVoid); + } + + int64_t args[3] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_StubHelpers_StubHelpers_LayoutTypeConvertToUnmanaged_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_StubHelpers_StubHelpers_LayoutTypeConvertToUnmanaged_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_InteropServices_NativeLibrary_LoadLibraryCallbackStub_I32_I32_I32_I32_I32_RetI32 = nullptr; +static void * Call_System_Private_CoreLib_System_Runtime_InteropServices_NativeLibrary_LoadLibraryCallbackStub_I32_I32_I32_I32_I32_RetI32(void * arg0, void * arg1, int32_t arg2, uint32_t arg3, void * arg4) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_InteropServices_NativeLibrary_LoadLibraryCallbackStub_I32_I32_I32_I32_I32_RetI32) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.InteropServices.NativeLibrary, System.Private.CoreLib", "LoadLibraryCallbackStub", &MD_System_Private_CoreLib_System_Runtime_InteropServices_NativeLibrary_LoadLibraryCallbackStub_I32_I32_I32_I32_I32_RetI32); + } + + int64_t args[5] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3, (int64_t)arg4 }; + void * result; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_InteropServices_NativeLibrary_LoadLibraryCallbackStub_I32_I32_I32_I32_I32_RetI32, (int8_t*)args, sizeof(args), (int8_t*)&result, (PCODE)&Call_System_Private_CoreLib_System_Runtime_InteropServices_NativeLibrary_LoadLibraryCallbackStub_I32_I32_I32_I32_I32_RetI32); + return result; +} + +static MethodDesc* MD_System_Private_CoreLib_System_StartupHookProvider_ManagedStartup_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_StartupHookProvider_ManagedStartup_I32_I32_RetVoid(void * arg0, void * arg1) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_StartupHookProvider_ManagedStartup_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.StartupHookProvider, System.Private.CoreLib", "ManagedStartup", &MD_System_Private_CoreLib_System_StartupHookProvider_ManagedStartup_I32_I32_RetVoid); + } + + int64_t args[2] = { (int64_t)arg0, (int64_t)arg1 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_StartupHookProvider_ManagedStartup_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_StartupHookProvider_ManagedStartup_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewExternalTypeEntry_I32_I32_RetI32 = nullptr; +static int32_t Call_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewExternalTypeEntry_I32_I32_RetI32(void * arg0, void * arg1) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewExternalTypeEntry_I32_I32_RetI32) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.InteropServices.TypeMapLazyDictionary, System.Private.CoreLib", "NewExternalTypeEntry", &MD_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewExternalTypeEntry_I32_I32_RetI32); + } + + int64_t args[2] = { (int64_t)arg0, (int64_t)arg1 }; + int32_t result; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewExternalTypeEntry_I32_I32_RetI32, (int8_t*)args, sizeof(args), (int8_t*)&result, (PCODE)&Call_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewExternalTypeEntry_I32_I32_RetI32); + return result; +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewPrecachedExternalTypeMap_I32_RetI32 = nullptr; +static int32_t Call_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewPrecachedExternalTypeMap_I32_RetI32(void * arg0) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewPrecachedExternalTypeMap_I32_RetI32) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.InteropServices.TypeMapLazyDictionary, System.Private.CoreLib", "NewPrecachedExternalTypeMap", &MD_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewPrecachedExternalTypeMap_I32_RetI32); + } + + int64_t args[1] = { (int64_t)arg0 }; + int32_t result; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewPrecachedExternalTypeMap_I32_RetI32, (int8_t*)args, sizeof(args), (int8_t*)&result, (PCODE)&Call_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewPrecachedExternalTypeMap_I32_RetI32); + return result; +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewPrecachedProxyTypeMap_I32_RetI32 = nullptr; +static int32_t Call_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewPrecachedProxyTypeMap_I32_RetI32(void * arg0) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewPrecachedProxyTypeMap_I32_RetI32) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.InteropServices.TypeMapLazyDictionary, System.Private.CoreLib", "NewPrecachedProxyTypeMap", &MD_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewPrecachedProxyTypeMap_I32_RetI32); + } + + int64_t args[1] = { (int64_t)arg0 }; + int32_t result; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewPrecachedProxyTypeMap_I32_RetI32, (int8_t*)args, sizeof(args), (int8_t*)&result, (PCODE)&Call_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewPrecachedProxyTypeMap_I32_RetI32); + return result; +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewProxyTypeEntry_I32_I32_RetI32 = nullptr; +static int32_t Call_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewProxyTypeEntry_I32_I32_RetI32(void * arg0, void * arg1) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewProxyTypeEntry_I32_I32_RetI32) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.InteropServices.TypeMapLazyDictionary, System.Private.CoreLib", "NewProxyTypeEntry", &MD_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewProxyTypeEntry_I32_I32_RetI32); + } + + int64_t args[2] = { (int64_t)arg0, (int64_t)arg1 }; + int32_t result; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewProxyTypeEntry_I32_I32_RetI32, (int8_t*)args, sizeof(args), (int8_t*)&result, (PCODE)&Call_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewProxyTypeEntry_I32_I32_RetI32); + return result; +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnAssemblyLoad_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnAssemblyLoad_I32_I32_RetVoid(void * arg0, void * arg1) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnAssemblyLoad_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.Loader.AssemblyLoadContext, System.Private.CoreLib", "OnAssemblyLoad", &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnAssemblyLoad_I32_I32_RetVoid); + } + + int64_t args[2] = { (int64_t)arg0, (int64_t)arg1 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnAssemblyLoad_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnAssemblyLoad_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnAssemblyResolve_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnAssemblyResolve_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2, void * arg3) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnAssemblyResolve_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.Loader.AssemblyLoadContext, System.Private.CoreLib", "OnAssemblyResolve", &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnAssemblyResolve_I32_I32_I32_I32_RetVoid); + } + + int64_t args[4] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnAssemblyResolve_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnAssemblyResolve_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_AppContext_OnFirstChanceException_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_AppContext_OnFirstChanceException_I32_I32_RetVoid(void * arg0, void * arg1) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_AppContext_OnFirstChanceException_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.AppContext, System.Private.CoreLib", "OnFirstChanceException", &MD_System_Private_CoreLib_System_AppContext_OnFirstChanceException_I32_I32_RetVoid); + } + + int64_t args[2] = { (int64_t)arg0, (int64_t)arg1 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_AppContext_OnFirstChanceException_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_AppContext_OnFirstChanceException_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_AppContext_OnProcessExit_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_AppContext_OnProcessExit_I32_RetVoid(void * arg0) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_AppContext_OnProcessExit_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.AppContext, System.Private.CoreLib", "OnProcessExit", &MD_System_Private_CoreLib_System_AppContext_OnProcessExit_I32_RetVoid); + } + + int64_t args[1] = { (int64_t)arg0 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_AppContext_OnProcessExit_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_AppContext_OnProcessExit_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnResourceResolve_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnResourceResolve_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2, void * arg3) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnResourceResolve_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.Loader.AssemblyLoadContext, System.Private.CoreLib", "OnResourceResolve", &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnResourceResolve_I32_I32_I32_I32_RetVoid); + } + + int64_t args[4] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnResourceResolve_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnResourceResolve_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Threading_Thread_OnThreadExited_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Threading_Thread_OnThreadExited_I32_I32_RetVoid(void * arg0, void * arg1) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Threading_Thread_OnThreadExited_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Threading.Thread, System.Private.CoreLib", "OnThreadExited", &MD_System_Private_CoreLib_System_Threading_Thread_OnThreadExited_I32_I32_RetVoid); + } + + int64_t args[2] = { (int64_t)arg0, (int64_t)arg1 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Threading_Thread_OnThreadExited_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Threading_Thread_OnThreadExited_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnTypeResolve_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnTypeResolve_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2, void * arg3) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnTypeResolve_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.Loader.AssemblyLoadContext, System.Private.CoreLib", "OnTypeResolve", &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnTypeResolve_I32_I32_I32_I32_RetVoid); + } + + int64_t args[4] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnTypeResolve_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnTypeResolve_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_AppContext_OnUnhandledException_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_AppContext_OnUnhandledException_I32_I32_RetVoid(void * arg0, void * arg1) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_AppContext_OnUnhandledException_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.AppContext, System.Private.CoreLib", "OnUnhandledException", &MD_System_Private_CoreLib_System_AppContext_OnUnhandledException_I32_I32_RetVoid); + } + + int64_t args[2] = { (int64_t)arg0, (int64_t)arg1 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_AppContext_OnUnhandledException_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_AppContext_OnUnhandledException_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Reflection_AssemblyName_ParseAsAssemblySpec_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Reflection_AssemblyName_ParseAsAssemblySpec_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Reflection_AssemblyName_ParseAsAssemblySpec_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Reflection.AssemblyName, System.Private.CoreLib", "ParseAsAssemblySpec", &MD_System_Private_CoreLib_System_Reflection_AssemblyName_ParseAsAssemblySpec_I32_I32_I32_RetVoid); + } + + int64_t args[3] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Reflection_AssemblyName_ParseAsAssemblySpec_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Reflection_AssemblyName_ParseAsAssemblySpec_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_ReleaseJSOwnedObjectByGCHandle_I32_RetVoid = nullptr; +static void* R2RCode_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_ReleaseJSOwnedObjectByGCHandle_I32_RetVoid = (void*)(intptr_t)-1; +static void Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_ReleaseJSOwnedObjectByGCHandle_I32_RetVoid(void * arg0) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_ReleaseJSOwnedObjectByGCHandle_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.InteropServices.JavaScript.JavaScriptExports, System.Runtime.InteropServices.JavaScript", "ReleaseJSOwnedObjectByGCHandle", &MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_ReleaseJSOwnedObjectByGCHandle_I32_RetVoid); + } + // Prefer the R2R native entrypoint when this callback was compiled (partial R2R). + // Resolve once and cache; a method's native-code availability is fixed after first prepare. + void* r2r = __atomic_load_n(&R2RCode_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_ReleaseJSOwnedObjectByGCHandle_I32_RetVoid, __ATOMIC_ACQUIRE); + if (r2r == (void*)(intptr_t)-1) + { + r2r = GetR2RNativeCodeForUnmanagedCallersOnly(MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_ReleaseJSOwnedObjectByGCHandle_I32_RetVoid); + __atomic_store_n(&R2RCode_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_ReleaseJSOwnedObjectByGCHandle_I32_RetVoid, r2r, __ATOMIC_RELEASE); + } + if (r2r != nullptr) + { + ((void(*)(void *))r2r)(arg0); + return; + } + + int64_t args[1] = { (int64_t)arg0 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_ReleaseJSOwnedObjectByGCHandle_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_ReleaseJSOwnedObjectByGCHandle_I32_RetVoid); +} + +extern "C" void SystemInteropJS_ReleaseJSOwnedObjectByGCHandle(void * arg0) +{ + Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_ReleaseJSOwnedObjectByGCHandle_I32_RetVoid(arg0); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_Resolve_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_Resolve_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2, void * arg3) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_Resolve_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.Loader.AssemblyLoadContext, System.Private.CoreLib", "Resolve", &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_Resolve_I32_I32_I32_I32_RetVoid); + } + + int64_t args[4] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_Resolve_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_Resolve_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveSatelliteAssembly_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveSatelliteAssembly_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2, void * arg3) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveSatelliteAssembly_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.Loader.AssemblyLoadContext, System.Private.CoreLib", "ResolveSatelliteAssembly", &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveSatelliteAssembly_I32_I32_I32_I32_RetVoid); + } + + int64_t args[4] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveSatelliteAssembly_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveSatelliteAssembly_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Resolver_ResolveSignature_I32_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Resolver_ResolveSignature_I32_I32_I32_I32_I32_RetVoid(void * arg0, int32_t arg1, int32_t arg2, void * arg3, void * arg4) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Resolver_ResolveSignature_I32_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Resolver, System.Private.CoreLib", "ResolveSignature", &MD_System_Private_CoreLib_System_Resolver_ResolveSignature_I32_I32_I32_I32_I32_RetVoid); + } + + int64_t args[5] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3, (int64_t)arg4 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Resolver_ResolveSignature_I32_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Resolver_ResolveSignature_I32_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Resolver_ResolveToken_I32_I32_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Resolver_ResolveToken_I32_I32_I32_I32_I32_I32_RetVoid(void * arg0, int32_t arg1, void * arg2, void * arg3, void * arg4, void * arg5) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Resolver_ResolveToken_I32_I32_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Resolver, System.Private.CoreLib", "ResolveToken", &MD_System_Private_CoreLib_System_Resolver_ResolveToken_I32_I32_I32_I32_I32_I32_RetVoid); + } + + int64_t args[6] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3, (int64_t)arg4, (int64_t)arg5 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Resolver_ResolveToken_I32_I32_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Resolver_ResolveToken_I32_I32_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUnmanagedDll_I32_I32_I32_RetI32 = nullptr; +static void * Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUnmanagedDll_I32_I32_I32_RetI32(void * arg0, void * arg1, void * arg2) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUnmanagedDll_I32_I32_I32_RetI32) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.Loader.AssemblyLoadContext, System.Private.CoreLib", "ResolveUnmanagedDll", &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUnmanagedDll_I32_I32_I32_RetI32); + } + + int64_t args[3] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2 }; + void * result; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUnmanagedDll_I32_I32_I32_RetI32, (int8_t*)args, sizeof(args), (int8_t*)&result, (PCODE)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUnmanagedDll_I32_I32_I32_RetI32); + return result; +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUnmanagedDllUsingEvent_I32_I32_I32_I32_RetI32 = nullptr; +static void * Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUnmanagedDllUsingEvent_I32_I32_I32_I32_RetI32(void * arg0, void * arg1, void * arg2, void * arg3) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUnmanagedDllUsingEvent_I32_I32_I32_I32_RetI32) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.Loader.AssemblyLoadContext, System.Private.CoreLib", "ResolveUnmanagedDllUsingEvent", &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUnmanagedDllUsingEvent_I32_I32_I32_I32_RetI32); + } + + int64_t args[4] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3 }; + void * result; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUnmanagedDllUsingEvent_I32_I32_I32_I32_RetI32, (int8_t*)args, sizeof(args), (int8_t*)&result, (PCODE)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUnmanagedDllUsingEvent_I32_I32_I32_I32_RetI32); + return result; +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUsingEvent_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUsingEvent_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2, void * arg3) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUsingEvent_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.Loader.AssemblyLoadContext, System.Private.CoreLib", "ResolveUsingEvent", &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUsingEvent_I32_I32_I32_I32_RetVoid); + } + + int64_t args[4] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUsingEvent_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUsingEvent_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_EH_RhRethrow_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Runtime_EH_RhRethrow_I32_I32_RetVoid(void * arg0, void * arg1) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_EH_RhRethrow_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.EH, System.Private.CoreLib", "RhRethrow", &MD_System_Private_CoreLib_System_Runtime_EH_RhRethrow_I32_I32_RetVoid); + } + + int64_t args[2] = { (int64_t)arg0, (int64_t)arg1 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_EH_RhRethrow_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Runtime_EH_RhRethrow_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_EH_RhThrowEx_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Runtime_EH_RhThrowEx_I32_I32_RetVoid(void * arg0, void * arg1) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_EH_RhThrowEx_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.EH, System.Private.CoreLib", "RhThrowEx", &MD_System_Private_CoreLib_System_Runtime_EH_RhThrowEx_I32_I32_RetVoid); + } + + int64_t args[2] = { (int64_t)arg0, (int64_t)arg1 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_EH_RhThrowEx_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Runtime_EH_RhThrowEx_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_EH_RhThrowHwEx_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Runtime_EH_RhThrowHwEx_I32_I32_RetVoid(uint32_t arg0, void * arg1) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_EH_RhThrowHwEx_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.EH, System.Private.CoreLib", "RhThrowHwEx", &MD_System_Private_CoreLib_System_Runtime_EH_RhThrowHwEx_I32_I32_RetVoid); + } + + int64_t args[2] = { (int64_t)arg0, (int64_t)arg1 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_EH_RhThrowHwEx_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Runtime_EH_RhThrowHwEx_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_GC_RunFinalizers_Void_RetI32 = nullptr; +static uint32_t Call_System_Private_CoreLib_System_GC_RunFinalizers_Void_RetI32() +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_GC_RunFinalizers_Void_RetI32) + { + LookupUnmanagedCallersOnlyMethodByName("System.GC, System.Private.CoreLib", "RunFinalizers", &MD_System_Private_CoreLib_System_GC_RunFinalizers_Void_RetI32); + } + uint32_t result; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_GC_RunFinalizers_Void_RetI32, nullptr, 0, (int8_t*)&result, (PCODE)&Call_System_Private_CoreLib_System_GC_RunFinalizers_Void_RetI32); + return result; +} + +static MethodDesc* MD_System_Private_CoreLib_System_AppContext_Setup_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_AppContext_Setup_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, int32_t arg2, void * arg3) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_AppContext_Setup_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.AppContext, System.Private.CoreLib", "Setup", &MD_System_Private_CoreLib_System_AppContext_Setup_I32_I32_I32_I32_RetVoid); + } + + int64_t args[4] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_AppContext_Setup_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_AppContext_Setup_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_StartAssemblyLoad_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_StartAssemblyLoad_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_StartAssemblyLoad_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.Loader.AssemblyLoadContext, System.Private.CoreLib", "StartAssemblyLoad", &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_StartAssemblyLoad_I32_I32_I32_RetVoid); + } + + int64_t args[3] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_StartAssemblyLoad_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_StartAssemblyLoad_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_StopAssemblyLoad_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_StopAssemblyLoad_I32_I32_RetVoid(void * arg0, void * arg1) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_StopAssemblyLoad_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.Loader.AssemblyLoadContext, System.Private.CoreLib", "StopAssemblyLoad", &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_StopAssemblyLoad_I32_I32_RetVoid); + } + + int64_t args[2] = { (int64_t)arg0, (int64_t)arg1 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_StopAssemblyLoad_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_StopAssemblyLoad_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Threading_TimerQueue_TimerHandler_Void_RetVoid = nullptr; +static void* R2RCode_System_Private_CoreLib_System_Threading_TimerQueue_TimerHandler_Void_RetVoid = (void*)(intptr_t)-1; +static void Call_System_Private_CoreLib_System_Threading_TimerQueue_TimerHandler_Void_RetVoid() +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Threading_TimerQueue_TimerHandler_Void_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Threading.TimerQueue, System.Private.CoreLib", "TimerHandler", &MD_System_Private_CoreLib_System_Threading_TimerQueue_TimerHandler_Void_RetVoid); + } + // Prefer the R2R native entrypoint when this callback was compiled (partial R2R). + // Resolve once and cache; a method's native-code availability is fixed after first prepare. + void* r2r = __atomic_load_n(&R2RCode_System_Private_CoreLib_System_Threading_TimerQueue_TimerHandler_Void_RetVoid, __ATOMIC_ACQUIRE); + if (r2r == (void*)(intptr_t)-1) + { + r2r = GetR2RNativeCodeForUnmanagedCallersOnly(MD_System_Private_CoreLib_System_Threading_TimerQueue_TimerHandler_Void_RetVoid); + __atomic_store_n(&R2RCode_System_Private_CoreLib_System_Threading_TimerQueue_TimerHandler_Void_RetVoid, r2r, __ATOMIC_RELEASE); + } + if (r2r != nullptr) + { + ((void(*)())r2r)(); + return; + } + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Threading_TimerQueue_TimerHandler_Void_RetVoid, nullptr, 0, nullptr, (PCODE)&Call_System_Private_CoreLib_System_Threading_TimerQueue_TimerHandler_Void_RetVoid); +} + +extern "C" void SystemJS_ExecuteTimerCallback() +{ + Call_System_Private_CoreLib_System_Threading_TimerQueue_TimerHandler_Void_RetVoid(); +} + +const ReverseThunkMapEntry g_ReverseThunks[] = +{ + { 2020995354, "g__Callback|66_0#1:System.Private.CoreLib:System:GC", { &MD_System_Private_CoreLib_System_GC__RegisterNoGCRegionCallback_g__Callback_7C_66_0_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_GC__RegisterNoGCRegionCallback_g__Callback_7C_66_0_I32_RetVoid } }, + { 1336557534, "BackgroundJobHandler#0:System.Private.CoreLib:System.Threading:ThreadPool", { &MD_System_Private_CoreLib_System_Threading_ThreadPool_BackgroundJobHandler_Void_RetVoid, (void*)&Call_System_Private_CoreLib_System_Threading_ThreadPool_BackgroundJobHandler_Void_RetVoid } }, + { 2901966433, "BindAssemblyExports#1:System.Runtime.InteropServices.JavaScript:System.Runtime.InteropServices.JavaScript:JavaScriptExports", { &MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_BindAssemblyExports_I32_RetVoid, (void*)&Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_BindAssemblyExports_I32_RetVoid } }, + { 1361004804, "CallClassConstructor#3:System.Private.CoreLib:System.Runtime.CompilerServices:InitHelpers", { &MD_System_Private_CoreLib_System_Runtime_CompilerServices_InitHelpers_CallClassConstructor_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Runtime_CompilerServices_InitHelpers_CallClassConstructor_I32_I32_I32_RetVoid } }, + { 3858976135, "CallDefaultConstructor#3:System.Private.CoreLib:System.Runtime.CompilerServices:RuntimeHelpers", { &MD_System_Private_CoreLib_System_Runtime_CompilerServices_RuntimeHelpers_CallDefaultConstructor_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Runtime_CompilerServices_RuntimeHelpers_CallDefaultConstructor_I32_I32_I32_RetVoid } }, + { 2601830388, "CallDelegate#1:System.Runtime.InteropServices.JavaScript:System.Runtime.InteropServices.JavaScript:JavaScriptExports", { &MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallDelegate_I32_RetVoid, (void*)&Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallDelegate_I32_RetVoid } }, + { 3962535319, "CallEntryPoint#5:System.Private.CoreLib:System:Environment", { &MD_System_Private_CoreLib_System_Environment_CallEntryPoint_I32_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Environment_CallEntryPoint_I32_I32_I32_I32_I32_RetVoid } }, + { 433365813, "CallJSExport#2:System.Runtime.InteropServices.JavaScript:System.Runtime.InteropServices.JavaScript:JavaScriptExports", { &MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallJSExport_I32_I32_RetVoid, (void*)&Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallJSExport_I32_I32_RetVoid } }, + { 1821934012, "CallStartupHook#2:System.Private.CoreLib:System:StartupHookProvider", { &MD_System_Private_CoreLib_System_StartupHookProvider_CallStartupHook_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_StartupHookProvider_CallStartupHook_I32_I32_RetVoid } }, + { 2915047114, "CallToString#3:System.Private.CoreLib:System.Runtime.CompilerServices:RuntimeHelpers", { &MD_System_Private_CoreLib_System_Runtime_CompilerServices_RuntimeHelpers_CallToString_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Runtime_CompilerServices_RuntimeHelpers_CallToString_I32_I32_I32_RetVoid } }, + { 4077371982, "Callback#7:System.Private.CoreLib:System.Diagnostics.Tracing:EventPipeEventProvider", { &MD_System_Private_CoreLib_System_Diagnostics_Tracing_EventPipeEventProvider_Callback_I32_I32_I32_I64_I64_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Diagnostics_Tracing_EventPipeEventProvider_Callback_I32_I32_I32_I64_I64_I32_I32_RetVoid } }, + { 3358042195, "ClearManaged#4:System.Private.CoreLib:System.StubHelpers:MngdRefCustomMarshaler", { &MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ClearManaged_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ClearManaged_I32_I32_I32_I32_RetVoid } }, + { 2311968855, "ClearNative#4:System.Private.CoreLib:System.StubHelpers:MngdRefCustomMarshaler", { &MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ClearNative_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ClearNative_I32_I32_I32_I32_RetVoid } }, + { 3113228365, "CompleteTask#1:System.Runtime.InteropServices.JavaScript:System.Runtime.InteropServices.JavaScript:JavaScriptExports", { &MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CompleteTask_I32_RetVoid, (void*)&Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CompleteTask_I32_RetVoid } }, + { 3378852959, "ConfigCallback#5:System.Private.CoreLib:System:GC", { &MD_System_Private_CoreLib_System_GC_ConfigCallback_I32_I32_I32_I32_I64_RetVoid, (void*)&Call_System_Private_CoreLib_System_GC_ConfigCallback_I32_I32_I32_I32_I64_RetVoid } }, + { 823296796, "ConvertContentsToManaged#4:System.Private.CoreLib:System.StubHelpers:MngdRefCustomMarshaler", { &MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ConvertContentsToManaged_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ConvertContentsToManaged_I32_I32_I32_I32_RetVoid } }, + { 3788988216, "ConvertContentsToNative#4:System.Private.CoreLib:System.StubHelpers:MngdRefCustomMarshaler", { &MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ConvertContentsToNative_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ConvertContentsToNative_I32_I32_I32_I32_RetVoid } }, + { 4090197812, "ConvertToManaged#3:System.Private.CoreLib:System.StubHelpers:BSTRMarshaler", { &MD_System_Private_CoreLib_System_StubHelpers_BSTRMarshaler_ConvertToManaged_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_StubHelpers_BSTRMarshaler_ConvertToManaged_I32_I32_I32_RetVoid } }, + { 1901425681, "ConvertToNative#2:System.Private.CoreLib:System.StubHelpers:BSTRMarshaler", { &MD_System_Private_CoreLib_System_StubHelpers_BSTRMarshaler_ConvertToNative_I32_I32_RetI32, (void*)&Call_System_Private_CoreLib_System_StubHelpers_BSTRMarshaler_ConvertToNative_I32_I32_RetI32 } }, + { 1243134822, "Create#2:System.Private.CoreLib:System.Reflection:LoaderAllocator", { &MD_System_Private_CoreLib_System_Reflection_LoaderAllocator_Create_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Reflection_LoaderAllocator_Create_I32_I32_RetVoid } }, + { 1263271190, "Create#6:System.Private.CoreLib:System:TypeLoadException", { &MD_System_Private_CoreLib_System_TypeLoadException_Create_I32_I32_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_TypeLoadException_Create_I32_I32_I32_I32_I32_I32_RetVoid } }, + { 1584116929, "Create#7:System.Private.CoreLib:System.IO:FileLoadException", { &MD_System_Private_CoreLib_System_IO_FileLoadException_Create_I32_I32_I32_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_IO_FileLoadException_Create_I32_I32_I32_I32_I32_I32_I32_RetVoid } }, + { 509807279, "CreateArgumentException#5:System.Private.CoreLib:System:Exception", { &MD_System_Private_CoreLib_System_Exception_CreateArgumentException_I32_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Exception_CreateArgumentException_I32_I32_I32_I32_I32_RetVoid } }, + { 1570902419, "CreateAssemblyName#3:System.Private.CoreLib:System.Reflection:AssemblyName", { &MD_System_Private_CoreLib_System_Reflection_AssemblyName_CreateAssemblyName_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Reflection_AssemblyName_CreateAssemblyName_I32_I32_I32_RetVoid } }, + { 3054399043, "CreateRuntimeWrappedException#3:System.Private.CoreLib:System:Exception", { &MD_System_Private_CoreLib_System_Exception_CreateRuntimeWrappedException_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Exception_CreateRuntimeWrappedException_I32_I32_I32_RetVoid } }, + { 271519467, "CreateTargetInvocationException#3:System.Private.CoreLib:System:Exception", { &MD_System_Private_CoreLib_System_Exception_CreateTargetInvocationException_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Exception_CreateTargetInvocationException_I32_I32_I32_RetVoid } }, + { 3064803797, "CreateTypeInitializationException#4:System.Private.CoreLib:System:Exception", { &MD_System_Private_CoreLib_System_Exception_CreateTypeInitializationException_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Exception_CreateTypeInitializationException_I32_I32_I32_I32_RetVoid } }, + { 1196551088, "EnumCalendarInfoCallback#2:System.Private.CoreLib:System.Globalization:CalendarData", { &MD_System_Private_CoreLib_System_Globalization_CalendarData_EnumCalendarInfoCallback_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Globalization_CalendarData_EnumCalendarInfoCallback_I32_I32_RetVoid } }, + { 2401666169, "ExecuteInDefaultAppDomain#3:System.Private.CoreLib:System:Environment", { &MD_System_Private_CoreLib_System_Environment_ExecuteInDefaultAppDomain_I32_I32_I32_RetI32, (void*)&Call_System_Private_CoreLib_System_Environment_ExecuteInDefaultAppDomain_I32_I32_I32_RetI32 } }, + { 2605868264, "GetCodeInfo#6:System.Private.CoreLib:System:Resolver", { &MD_System_Private_CoreLib_System_Resolver_GetCodeInfo_I32_I32_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Resolver_GetCodeInfo_I32_I32_I32_I32_I32_I32_RetVoid } }, + { 3084636701, "GetCustomMarshalerInstance#5:System.Private.CoreLib:System.StubHelpers:MngdRefCustomMarshaler", { &MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_GetCustomMarshalerInstance_I32_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_GetCustomMarshalerInstance_I32_I32_I32_I32_I32_RetVoid } }, + { 1641343147, "GetEHInfo#5:System.Private.CoreLib:System:Resolver", { &MD_System_Private_CoreLib_System_Resolver_GetEHInfo_I32_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Resolver_GetEHInfo_I32_I32_I32_I32_I32_RetVoid } }, + { 993231473, "GetFunctionPointer#6:System.Private.CoreLib:Internal.Runtime.InteropServices:ComponentActivator", { &MD_System_Private_CoreLib_Internal_Runtime_InteropServices_ComponentActivator_GetFunctionPointer_I32_I32_I32_I32_I32_I32_RetI32, (void*)&Call_System_Private_CoreLib_Internal_Runtime_InteropServices_ComponentActivator_GetFunctionPointer_I32_I32_I32_I32_I32_I32_RetI32 } }, + { 3098497371, "GetInterfaceImplementation#4:System.Private.CoreLib:System.Runtime.InteropServices:DynamicInterfaceCastableHelpers", { &MD_System_Private_CoreLib_System_Runtime_InteropServices_DynamicInterfaceCastableHelpers_GetInterfaceImplementation_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Runtime_InteropServices_DynamicInterfaceCastableHelpers_GetInterfaceImplementation_I32_I32_I32_I32_RetVoid } }, + { 4101188193, "GetJitContext#4:System.Private.CoreLib:System:Resolver", { &MD_System_Private_CoreLib_System_Resolver_GetJitContext_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Resolver_GetJitContext_I32_I32_I32_I32_RetVoid } }, + { 2512220404, "GetLocalsSignature#3:System.Private.CoreLib:System:Resolver", { &MD_System_Private_CoreLib_System_Resolver_GetLocalsSignature_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Resolver_GetLocalsSignature_I32_I32_I32_RetVoid } }, + { 1081971317, "GetManagedStackTrace#1:System.Runtime.InteropServices.JavaScript:System.Runtime.InteropServices.JavaScript:JavaScriptExports", { &MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_GetManagedStackTrace_I32_RetVoid, (void*)&Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_GetManagedStackTrace_I32_RetVoid } }, + { 1275372322, "GetResourceString#3:System.Private.CoreLib:System:Environment", { &MD_System_Private_CoreLib_System_Environment_GetResourceString_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Environment_GetResourceString_I32_I32_I32_RetVoid } }, + { 831291767, "GetStringLiteral#4:System.Private.CoreLib:System:Resolver", { &MD_System_Private_CoreLib_System_Resolver_GetStringLiteral_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Resolver_GetStringLiteral_I32_I32_I32_I32_RetVoid } }, + { 3370125186, "GetTypeHelper#7:System.Private.CoreLib:System.Reflection:TypeNameResolver", { &MD_System_Private_CoreLib_System_Reflection_TypeNameResolver_GetTypeHelper_I32_I32_I32_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Reflection_TypeNameResolver_GetTypeHelper_I32_I32_I32_I32_I32_I32_I32_RetVoid } }, + { 3481461579, "InitializeCommandLineArgs#5:System.Private.CoreLib:System:Environment", { &MD_System_Private_CoreLib_System_Environment_InitializeCommandLineArgs_I32_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Environment_InitializeCommandLineArgs_I32_I32_I32_I32_I32_RetVoid } }, + { 1351540042, "InitializeDefaultContext#1:System.Private.CoreLib:System.Runtime.Loader:AssemblyLoadContext", { &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_InitializeDefaultContext_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_InitializeDefaultContext_I32_RetVoid } }, + { 513042204, "InitializeDefaultEventSources#1:System.Private.CoreLib:System.Diagnostics.Tracing:EventSource", { &MD_System_Private_CoreLib_System_Diagnostics_Tracing_EventSource_InitializeDefaultEventSources_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Diagnostics_Tracing_EventSource_InitializeDefaultEventSources_I32_RetVoid } }, + { 266659693, "InitializeForMonitor#4:System.Private.CoreLib:System.Threading:Lock", { &MD_System_Private_CoreLib_System_Threading_Lock_InitializeForMonitor_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Threading_Lock_InitializeForMonitor_I32_I32_I32_I32_RetVoid } }, + { 288803216, "InternalPreserveStackTrace#2:System.Private.CoreLib:System:Exception", { &MD_System_Private_CoreLib_System_Exception_InternalPreserveStackTrace_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Exception_InternalPreserveStackTrace_I32_I32_RetVoid } }, + { 2611291109, "InvokeArrayContentsConverter#5:System.Private.CoreLib:System.StubHelpers:StubHelpers", { &MD_System_Private_CoreLib_System_StubHelpers_StubHelpers_InvokeArrayContentsConverter_I32_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_StubHelpers_StubHelpers_InvokeArrayContentsConverter_I32_I32_I32_I32_I32_RetVoid } }, + { 2854474997, "InvokeFunction#1:System.Private.CoreLib:System.Diagnostics:Debugger", { &MD_System_Private_CoreLib_System_Diagnostics_Debugger_InvokeFunction_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Diagnostics_Debugger_InvokeFunction_I32_RetVoid } }, + { 3290644746, "IsInterfaceImplemented#5:System.Private.CoreLib:System.Runtime.InteropServices:DynamicInterfaceCastableHelpers", { &MD_System_Private_CoreLib_System_Runtime_InteropServices_DynamicInterfaceCastableHelpers_IsInterfaceImplemented_I32_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Runtime_InteropServices_DynamicInterfaceCastableHelpers_IsInterfaceImplemented_I32_I32_I32_I32_I32_RetVoid } }, + { 1577711579, "LayoutTypeConvertToManaged#3:System.Private.CoreLib:System.StubHelpers:StubHelpers", { &MD_System_Private_CoreLib_System_StubHelpers_StubHelpers_LayoutTypeConvertToManaged_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_StubHelpers_StubHelpers_LayoutTypeConvertToManaged_I32_I32_I32_RetVoid } }, + { 2780693056, "LayoutTypeConvertToUnmanaged#3:System.Private.CoreLib:System.StubHelpers:StubHelpers", { &MD_System_Private_CoreLib_System_StubHelpers_StubHelpers_LayoutTypeConvertToUnmanaged_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_StubHelpers_StubHelpers_LayoutTypeConvertToUnmanaged_I32_I32_I32_RetVoid } }, + { 1086681967, "LoadLibraryCallbackStub#5:System.Private.CoreLib:System.Runtime.InteropServices:NativeLibrary", { &MD_System_Private_CoreLib_System_Runtime_InteropServices_NativeLibrary_LoadLibraryCallbackStub_I32_I32_I32_I32_I32_RetI32, (void*)&Call_System_Private_CoreLib_System_Runtime_InteropServices_NativeLibrary_LoadLibraryCallbackStub_I32_I32_I32_I32_I32_RetI32 } }, + { 705270488, "ManagedStartup#2:System.Private.CoreLib:System:StartupHookProvider", { &MD_System_Private_CoreLib_System_StartupHookProvider_ManagedStartup_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_StartupHookProvider_ManagedStartup_I32_I32_RetVoid } }, + { 343912841, "NewExternalTypeEntry#2:System.Private.CoreLib:System.Runtime.InteropServices:TypeMapLazyDictionary", { &MD_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewExternalTypeEntry_I32_I32_RetI32, (void*)&Call_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewExternalTypeEntry_I32_I32_RetI32 } }, + { 3515006989, "NewPrecachedExternalTypeMap#1:System.Private.CoreLib:System.Runtime.InteropServices:TypeMapLazyDictionary", { &MD_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewPrecachedExternalTypeMap_I32_RetI32, (void*)&Call_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewPrecachedExternalTypeMap_I32_RetI32 } }, + { 1731038108, "NewPrecachedProxyTypeMap#1:System.Private.CoreLib:System.Runtime.InteropServices:TypeMapLazyDictionary", { &MD_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewPrecachedProxyTypeMap_I32_RetI32, (void*)&Call_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewPrecachedProxyTypeMap_I32_RetI32 } }, + { 3327247096, "NewProxyTypeEntry#2:System.Private.CoreLib:System.Runtime.InteropServices:TypeMapLazyDictionary", { &MD_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewProxyTypeEntry_I32_I32_RetI32, (void*)&Call_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewProxyTypeEntry_I32_I32_RetI32 } }, + { 3837429452, "OnAssemblyLoad#2:System.Private.CoreLib:System.Runtime.Loader:AssemblyLoadContext", { &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnAssemblyLoad_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnAssemblyLoad_I32_I32_RetVoid } }, + { 1632250712, "OnAssemblyResolve#4:System.Private.CoreLib:System.Runtime.Loader:AssemblyLoadContext", { &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnAssemblyResolve_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnAssemblyResolve_I32_I32_I32_I32_RetVoid } }, + { 3308959471, "OnFirstChanceException#2:System.Private.CoreLib:System:AppContext", { &MD_System_Private_CoreLib_System_AppContext_OnFirstChanceException_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_AppContext_OnFirstChanceException_I32_I32_RetVoid } }, + { 3570701864, "OnProcessExit#1:System.Private.CoreLib:System:AppContext", { &MD_System_Private_CoreLib_System_AppContext_OnProcessExit_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_AppContext_OnProcessExit_I32_RetVoid } }, + { 2158495436, "OnResourceResolve#4:System.Private.CoreLib:System.Runtime.Loader:AssemblyLoadContext", { &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnResourceResolve_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnResourceResolve_I32_I32_I32_I32_RetVoid } }, + { 2049352127, "OnThreadExited#2:System.Private.CoreLib:System.Threading:Thread", { &MD_System_Private_CoreLib_System_Threading_Thread_OnThreadExited_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Threading_Thread_OnThreadExited_I32_I32_RetVoid } }, + { 3572430398, "OnTypeResolve#4:System.Private.CoreLib:System.Runtime.Loader:AssemblyLoadContext", { &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnTypeResolve_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnTypeResolve_I32_I32_I32_I32_RetVoid } }, + { 4206970338, "OnUnhandledException#2:System.Private.CoreLib:System:AppContext", { &MD_System_Private_CoreLib_System_AppContext_OnUnhandledException_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_AppContext_OnUnhandledException_I32_I32_RetVoid } }, + { 1873201650, "ParseAsAssemblySpec#3:System.Private.CoreLib:System.Reflection:AssemblyName", { &MD_System_Private_CoreLib_System_Reflection_AssemblyName_ParseAsAssemblySpec_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Reflection_AssemblyName_ParseAsAssemblySpec_I32_I32_I32_RetVoid } }, + { 1403522766, "ReleaseJSOwnedObjectByGCHandle#1:System.Runtime.InteropServices.JavaScript:System.Runtime.InteropServices.JavaScript:JavaScriptExports", { &MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_ReleaseJSOwnedObjectByGCHandle_I32_RetVoid, (void*)&Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_ReleaseJSOwnedObjectByGCHandle_I32_RetVoid } }, + { 225437511, "Resolve#4:System.Private.CoreLib:System.Runtime.Loader:AssemblyLoadContext", { &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_Resolve_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_Resolve_I32_I32_I32_I32_RetVoid } }, + { 260403842, "ResolveSatelliteAssembly#4:System.Private.CoreLib:System.Runtime.Loader:AssemblyLoadContext", { &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveSatelliteAssembly_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveSatelliteAssembly_I32_I32_I32_I32_RetVoid } }, + { 426514126, "ResolveSignature#5:System.Private.CoreLib:System:Resolver", { &MD_System_Private_CoreLib_System_Resolver_ResolveSignature_I32_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Resolver_ResolveSignature_I32_I32_I32_I32_I32_RetVoid } }, + { 2988924914, "ResolveToken#6:System.Private.CoreLib:System:Resolver", { &MD_System_Private_CoreLib_System_Resolver_ResolveToken_I32_I32_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Resolver_ResolveToken_I32_I32_I32_I32_I32_I32_RetVoid } }, + { 2195947930, "ResolveUnmanagedDll#3:System.Private.CoreLib:System.Runtime.Loader:AssemblyLoadContext", { &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUnmanagedDll_I32_I32_I32_RetI32, (void*)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUnmanagedDll_I32_I32_I32_RetI32 } }, + { 2050198231, "ResolveUnmanagedDllUsingEvent#4:System.Private.CoreLib:System.Runtime.Loader:AssemblyLoadContext", { &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUnmanagedDllUsingEvent_I32_I32_I32_I32_RetI32, (void*)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUnmanagedDllUsingEvent_I32_I32_I32_I32_RetI32 } }, + { 2533042349, "ResolveUsingEvent#4:System.Private.CoreLib:System.Runtime.Loader:AssemblyLoadContext", { &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUsingEvent_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUsingEvent_I32_I32_I32_I32_RetVoid } }, + { 2883735131, "RhRethrow#2:System.Private.CoreLib:System.Runtime:EH", { &MD_System_Private_CoreLib_System_Runtime_EH_RhRethrow_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Runtime_EH_RhRethrow_I32_I32_RetVoid } }, + { 3929107505, "RhThrowEx#2:System.Private.CoreLib:System.Runtime:EH", { &MD_System_Private_CoreLib_System_Runtime_EH_RhThrowEx_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Runtime_EH_RhThrowEx_I32_I32_RetVoid } }, + { 504238190, "RhThrowHwEx#2:System.Private.CoreLib:System.Runtime:EH", { &MD_System_Private_CoreLib_System_Runtime_EH_RhThrowHwEx_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Runtime_EH_RhThrowHwEx_I32_I32_RetVoid } }, + { 4273572779, "RunFinalizers#0:System.Private.CoreLib:System:GC", { &MD_System_Private_CoreLib_System_GC_RunFinalizers_Void_RetI32, (void*)&Call_System_Private_CoreLib_System_GC_RunFinalizers_Void_RetI32 } }, + { 1963568864, "Setup#4:System.Private.CoreLib:System:AppContext", { &MD_System_Private_CoreLib_System_AppContext_Setup_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_AppContext_Setup_I32_I32_I32_I32_RetVoid } }, + { 1343309100, "StartAssemblyLoad#3:System.Private.CoreLib:System.Runtime.Loader:AssemblyLoadContext", { &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_StartAssemblyLoad_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_StartAssemblyLoad_I32_I32_I32_RetVoid } }, + { 3495913109, "StopAssemblyLoad#2:System.Private.CoreLib:System.Runtime.Loader:AssemblyLoadContext", { &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_StopAssemblyLoad_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_StopAssemblyLoad_I32_I32_RetVoid } }, + { 167179540, "TimerHandler#0:System.Private.CoreLib:System.Threading:TimerQueue", { &MD_System_Private_CoreLib_System_Threading_TimerQueue_TimerHandler_Void_RetVoid, (void*)&Call_System_Private_CoreLib_System_Threading_TimerQueue_TimerHandler_Void_RetVoid } } +}; + +const size_t g_ReverseThunksCount = sizeof(g_ReverseThunks) / sizeof(g_ReverseThunks[0]); diff --git a/src/coreclr/vm/wasm/browser/production/callhelpers-interp-to-managed.cpp b/src/coreclr/vm/wasm/browser/production/callhelpers-interp-to-managed.cpp new file mode 100644 index 00000000000000..d524b4fd266f0e --- /dev/null +++ b/src/coreclr/vm/wasm/browser/production/callhelpers-interp-to-managed.cpp @@ -0,0 +1,783 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// + +// +// GENERATED FILE, DON'T EDIT +// Generated by coreclr InterpToNativeGenerator +// + +#include +#include + +// Arguments are passed on the stack with each argument aligned to INTERP_STACK_SLOT_SIZE. +#define ARG_ADDR(i) (pArgs + (i * INTERP_STACK_SLOT_SIZE)) +#define ARG_IND(i) ((int32_t)((int32_t*)ARG_ADDR(i))) +#define ARG_I32(i) (*(int32_t*)ARG_ADDR(i)) +#define ARG_I64(i) (*(int64_t*)ARG_ADDR(i)) +#define ARG_F32(i) (*(float*)ARG_ADDR(i)) +#define ARG_F64(i) (*(double*)ARG_ADDR(i)) + +namespace +{ + NOINLINE static void CallFunc_F64_F64_F64_RetF64_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + double (*fptr)(int*, double, double, double, PCODE) = *(double (**)(int*, double, double, double, PCODE))(pPortableEntryPoint); + *((double*)pRet) = (*fptr)(&framePointer, ARG_F64(0), ARG_F64(1), ARG_F64(2), pPortableEntryPoint); + } + + NOINLINE static void CallFunc_F64_F64_RetF64_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + double (*fptr)(int*, double, double, PCODE) = *(double (**)(int*, double, double, PCODE))(pPortableEntryPoint); + *((double*)pRet) = (*fptr)(&framePointer, ARG_F64(0), ARG_F64(1), pPortableEntryPoint); + } + + NOINLINE static void CallFunc_F64_I32_RetF64_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + double (*fptr)(int*, double, int32_t, PCODE) = *(double (**)(int*, double, int32_t, PCODE))(pPortableEntryPoint); + *((double*)pRet) = (*fptr)(&framePointer, ARG_F64(0), ARG_I32(1), pPortableEntryPoint); + } + + NOINLINE static void CallFunc_F64_RetF64_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + double (*fptr)(int*, double, PCODE) = *(double (**)(int*, double, PCODE))(pPortableEntryPoint); + *((double*)pRet) = (*fptr)(&framePointer, ARG_F64(0), pPortableEntryPoint); + } + + static void CallFunc_I32_RetF64(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + double (*fptr)(int32_t) = (double (*)(int32_t))pcode; + *((double*)pRet) = (*fptr)(ARG_I32(0)); + } + + NOINLINE static void CallFunc_F32_F32_F32_RetF32_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + float (*fptr)(int*, float, float, float, PCODE) = *(float (**)(int*, float, float, float, PCODE))(pPortableEntryPoint); + *((float*)pRet) = (*fptr)(&framePointer, ARG_F32(0), ARG_F32(1), ARG_F32(2), pPortableEntryPoint); + } + + NOINLINE static void CallFunc_F32_F32_RetF32_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + float (*fptr)(int*, float, float, PCODE) = *(float (**)(int*, float, float, PCODE))(pPortableEntryPoint); + *((float*)pRet) = (*fptr)(&framePointer, ARG_F32(0), ARG_F32(1), pPortableEntryPoint); + } + + NOINLINE static void CallFunc_F32_I32_RetF32_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + float (*fptr)(int*, float, int32_t, PCODE) = *(float (**)(int*, float, int32_t, PCODE))(pPortableEntryPoint); + *((float*)pRet) = (*fptr)(&framePointer, ARG_F32(0), ARG_I32(1), pPortableEntryPoint); + } + + NOINLINE static void CallFunc_F32_RetF32_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + float (*fptr)(int*, float, PCODE) = *(float (**)(int*, float, PCODE))(pPortableEntryPoint); + *((float*)pRet) = (*fptr)(&framePointer, ARG_F32(0), pPortableEntryPoint); + } + + static void CallFunc_Void_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)() = (int32_t (*)())pcode; + *((int32_t*)pRet) = (*fptr)(); + } + + static void CallFunc_S64_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t) = (int32_t (*)(int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_IND(0), ARG_I32(8)); + } + + static void CallFunc_S8_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t) = (int32_t (*)(int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_IND(0)); + } + + static void CallFunc_S8_S8_S8_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_IND(0), ARG_IND(1), ARG_IND(2), ARG_I32(3)); + } + + static void CallFunc_S8_S8_I32_S8_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_IND(0), ARG_IND(1), ARG_I32(2), ARG_IND(3), ARG_I32(4)); + } + + static void CallFunc_S8_S8_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_IND(0), ARG_IND(1), ARG_I32(2), ARG_I32(3)); + } + + static void CallFunc_S8_S8_I32_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_IND(0), ARG_IND(1), ARG_I32(2), ARG_I32(3), ARG_I32(4)); + } + + static void CallFunc_S8_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t) = (int32_t (*)(int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_IND(0), ARG_I32(1)); + } + + static void CallFunc_S8_I32_S8_S8_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_IND(0), ARG_I32(1), ARG_IND(2), ARG_IND(3), ARG_I32(4)); + } + + static void CallFunc_S8_I32_S8_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_IND(0), ARG_I32(1), ARG_IND(2), ARG_I32(3), ARG_I32(4)); + } + + static void CallFunc_S8_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_IND(0), ARG_I32(1), ARG_I32(2)); + } + + static void CallFunc_S8_I32_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_IND(0), ARG_I32(1), ARG_I32(2), ARG_I32(3)); + } + + static void CallFunc_S8_I32_I32_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_IND(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), ARG_I32(4)); + } + + static void CallFunc_S8_I32_I32_I32_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_IND(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), ARG_I32(4), ARG_I32(5)); + } + + static void CallFunc_S8_I32_I32_I32_I32_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_IND(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), ARG_I32(4), ARG_I32(5), ARG_I32(6)); + } + + NOINLINE static void CallFunc_This_I32_RetI32_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + int32_t (*fptr)(int*, int32_t, int32_t, PCODE) = *(int32_t (**)(int*, int32_t, int32_t, PCODE))(pPortableEntryPoint); + *((int32_t*)pRet) = (*fptr)(&framePointer, ARG_I32(0), ARG_I32(1), pPortableEntryPoint); + } + + NOINLINE static void CallFunc_This_RetI32_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + int32_t (*fptr)(int*, int32_t, PCODE) = *(int32_t (**)(int*, int32_t, PCODE))(pPortableEntryPoint); + *((int32_t*)pRet) = (*fptr)(&framePointer, ARG_I32(0), pPortableEntryPoint); + } + + static void CallFunc_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t) = (int32_t (*)(int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0)); + } + + static void CallFunc_I32_S8_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0), ARG_IND(1), ARG_I32(2), ARG_I32(3)); + } + + static void CallFunc_I32_S8_I32_I32_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0), ARG_IND(1), ARG_I32(2), ARG_I32(3), ARG_I32(4), ARG_I32(5)); + } + + static void CallFunc_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t) = (int32_t (*)(int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I32(1)); + } + + static void CallFunc_I32_I32_S8_I32_I32_S8_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I32(1), ARG_IND(2), ARG_I32(3), ARG_I32(4), ARG_IND(5), ARG_I32(6)); + } + + static void CallFunc_I32_I32_S8_I32_I32_I32_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I32(1), ARG_IND(2), ARG_I32(3), ARG_I32(4), ARG_I32(5), ARG_I32(6), ARG_I32(7)); + } + + static void CallFunc_I32_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I32(2)); + } + + static void CallFunc_I32_I32_I32_S8_I32_I32_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I32(2), ARG_IND(3), ARG_I32(4), ARG_I32(5), ARG_I32(6), ARG_I32(7)); + } + + static void CallFunc_I32_I32_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I32(2), ARG_I32(3)); + } + + static void CallFunc_I32_I32_I32_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), ARG_I32(4)); + } + + static void CallFunc_I32_I32_I32_I32_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), ARG_I32(4), ARG_I32(5)); + } + + static void CallFunc_I32_I32_I32_I32_I32_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), ARG_I32(4), ARG_I32(5), ARG_I32(6)); + } + + static void CallFunc_I32_I32_I32_I32_I32_I32_I32_I32_I32_I32_I32_I32_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), ARG_I32(4), ARG_I32(5), ARG_I32(6), ARG_I32(7), ARG_I32(8), ARG_I32(9), ARG_I32(10), ARG_I32(11), ARG_I32(12), ARG_I32(13)); + } + + NOINLINE static void CallFunc_I32_I32_I32_I32_I32_I32_RetI32_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + int32_t (*fptr)(int*, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, PCODE) = *(int32_t (**)(int*, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, PCODE))(pPortableEntryPoint); + *((int32_t*)pRet) = (*fptr)(&framePointer, ARG_I32(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), ARG_I32(4), ARG_I32(5), pPortableEntryPoint); + } + + NOINLINE static void CallFunc_I32_I32_I32_I32_I32_RetI32_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + int32_t (*fptr)(int*, int32_t, int32_t, int32_t, int32_t, int32_t, PCODE) = *(int32_t (**)(int*, int32_t, int32_t, int32_t, int32_t, int32_t, PCODE))(pPortableEntryPoint); + *((int32_t*)pRet) = (*fptr)(&framePointer, ARG_I32(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), ARG_I32(4), pPortableEntryPoint); + } + + NOINLINE static void CallFunc_I32_I32_I32_I32_RetI32_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + int32_t (*fptr)(int*, int32_t, int32_t, int32_t, int32_t, PCODE) = *(int32_t (**)(int*, int32_t, int32_t, int32_t, int32_t, PCODE))(pPortableEntryPoint); + *((int32_t*)pRet) = (*fptr)(&framePointer, ARG_I32(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), pPortableEntryPoint); + } + + static void CallFunc_I32_I32_I32_I64_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int32_t, int64_t) = (int32_t (*)(int32_t, int32_t, int32_t, int64_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I32(2), ARG_I64(3)); + } + + NOINLINE static void CallFunc_I32_I32_I32_RetI32_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + int32_t (*fptr)(int*, int32_t, int32_t, int32_t, PCODE) = *(int32_t (**)(int*, int32_t, int32_t, int32_t, PCODE))(pPortableEntryPoint); + *((int32_t*)pRet) = (*fptr)(&framePointer, ARG_I32(0), ARG_I32(1), ARG_I32(2), pPortableEntryPoint); + } + + static void CallFunc_I32_I32_I64_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int64_t) = (int32_t (*)(int32_t, int32_t, int64_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I64(2)); + } + + static void CallFunc_I32_I32_I64_I32_I32_I32_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int32_t, int64_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (int32_t (*)(int32_t, int32_t, int64_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I64(2), ARG_I32(3), ARG_I32(4), ARG_I32(5), ARG_I32(6), ARG_I32(7)); + } + + NOINLINE static void CallFunc_I32_I32_RetI32_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + int32_t (*fptr)(int*, int32_t, int32_t, PCODE) = *(int32_t (**)(int*, int32_t, int32_t, PCODE))(pPortableEntryPoint); + *((int32_t*)pRet) = (*fptr)(&framePointer, ARG_I32(0), ARG_I32(1), pPortableEntryPoint); + } + + static void CallFunc_I32_I64_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int64_t) = (int32_t (*)(int32_t, int64_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I64(1)); + } + + static void CallFunc_I32_I64_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int64_t, int32_t) = (int32_t (*)(int32_t, int64_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I64(1), ARG_I32(2)); + } + + static void CallFunc_I32_I64_I32_I32_I32_I64_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int64_t, int32_t, int32_t, int32_t, int64_t) = (int32_t (*)(int32_t, int64_t, int32_t, int32_t, int32_t, int64_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I64(1), ARG_I32(2), ARG_I32(3), ARG_I32(4), ARG_I64(5)); + } + + static void CallFunc_I32_I64_I64_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int64_t, int64_t) = (int32_t (*)(int32_t, int64_t, int64_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I64(1), ARG_I64(2)); + } + + static void CallFunc_I32_I64_I64_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int32_t, int64_t, int64_t, int32_t) = (int32_t (*)(int32_t, int64_t, int64_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I64(1), ARG_I64(2), ARG_I32(3)); + } + + NOINLINE static void CallFunc_I32_RetI32_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + int32_t (*fptr)(int*, int32_t, PCODE) = *(int32_t (**)(int*, int32_t, PCODE))(pPortableEntryPoint); + *((int32_t*)pRet) = (*fptr)(&framePointer, ARG_I32(0), pPortableEntryPoint); + } + + static void CallFunc_I64_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int64_t, int32_t) = (int32_t (*)(int64_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I64(0), ARG_I32(1)); + } + + static void CallFunc_I64_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int64_t, int32_t, int32_t) = (int32_t (*)(int64_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I64(0), ARG_I32(1), ARG_I32(2)); + } + + static void CallFunc_I64_I32_I64_I32_I32_RetI32(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int32_t (*fptr)(int64_t, int32_t, int64_t, int32_t, int32_t) = (int32_t (*)(int64_t, int32_t, int64_t, int32_t, int32_t))pcode; + *((int32_t*)pRet) = (*fptr)(ARG_I64(0), ARG_I32(1), ARG_I64(2), ARG_I32(3), ARG_I32(4)); + } + + NOINLINE static void CallFunc_Void_RetI32_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + int32_t (*fptr)(int*, PCODE) = *(int32_t (**)(int*, PCODE))(pPortableEntryPoint); + *((int32_t*)pRet) = (*fptr)(&framePointer, pPortableEntryPoint); + } + + static void CallFunc_Void_RetI64(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int64_t (*fptr)() = (int64_t (*)())pcode; + *((int64_t*)pRet) = (*fptr)(); + } + + static void CallFunc_I32_RetI64(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int64_t (*fptr)(int32_t) = (int64_t (*)(int32_t))pcode; + *((int64_t*)pRet) = (*fptr)(ARG_I32(0)); + } + + static void CallFunc_I32_I32_I32_RetI64(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int64_t (*fptr)(int32_t, int32_t, int32_t) = (int64_t (*)(int32_t, int32_t, int32_t))pcode; + *((int64_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I32(2)); + } + + static void CallFunc_I32_I32_I32_I32_I32_I32_RetI64(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int64_t (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (int64_t (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + *((int64_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), ARG_I32(4), ARG_I32(5)); + } + + static void CallFunc_I32_I32_I32_I64_RetI64(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int64_t (*fptr)(int32_t, int32_t, int32_t, int64_t) = (int64_t (*)(int32_t, int32_t, int32_t, int64_t))pcode; + *((int64_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I32(2), ARG_I64(3)); + } + + static void CallFunc_I32_I64_I32_RetI64(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + int64_t (*fptr)(int32_t, int64_t, int32_t) = (int64_t (*)(int32_t, int64_t, int32_t))pcode; + *((int64_t*)pRet) = (*fptr)(ARG_I32(0), ARG_I64(1), ARG_I32(2)); + } + + NOINLINE static void CallFunc_I32_I64_I64_RetI64_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + int64_t (*fptr)(int*, int32_t, int64_t, int64_t, PCODE) = *(int64_t (**)(int*, int32_t, int64_t, int64_t, PCODE))(pPortableEntryPoint); + *((int64_t*)pRet) = (*fptr)(&framePointer, ARG_I32(0), ARG_I64(1), ARG_I64(2), pPortableEntryPoint); + } + + NOINLINE static void CallFunc_I32_I64_RetI64_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + int64_t (*fptr)(int*, int32_t, int64_t, PCODE) = *(int64_t (**)(int*, int32_t, int64_t, PCODE))(pPortableEntryPoint); + *((int64_t*)pRet) = (*fptr)(&framePointer, ARG_I32(0), ARG_I64(1), pPortableEntryPoint); + } + + NOINLINE static void CallFunc_I32_RetI64_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + int64_t (*fptr)(int*, int32_t, PCODE) = *(int64_t (**)(int*, int32_t, PCODE))(pPortableEntryPoint); + *((int64_t*)pRet) = (*fptr)(&framePointer, ARG_I32(0), pPortableEntryPoint); + } + + NOINLINE static void CallFunc_I64_I64_RetI64_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + int64_t (*fptr)(int*, int64_t, int64_t, PCODE) = *(int64_t (**)(int*, int64_t, int64_t, PCODE))(pPortableEntryPoint); + *((int64_t*)pRet) = (*fptr)(&framePointer, ARG_I64(0), ARG_I64(1), pPortableEntryPoint); + } + + NOINLINE static void CallFunc_Void_RetI64_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + int64_t (*fptr)(int*, PCODE) = *(int64_t (**)(int*, PCODE))(pPortableEntryPoint); + *((int64_t*)pRet) = (*fptr)(&framePointer, pPortableEntryPoint); + } + + static void CallFunc_Void_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)() = (void (*)())pcode; + (*fptr)(); + } + + static void CallFunc_S8_S8_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t) = (void (*)(int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_IND(0), ARG_IND(1), ARG_I32(2)); + } + + static void CallFunc_S8_S8_I32_I32_I32_I32_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (void (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_IND(0), ARG_IND(1), ARG_I32(2), ARG_I32(3), ARG_I32(4), ARG_I32(5), ARG_I32(6), ARG_I32(7)); + } + + static void CallFunc_S8_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t) = (void (*)(int32_t, int32_t))pcode; + (*fptr)(ARG_IND(0), ARG_I32(1)); + } + + static void CallFunc_S8_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t) = (void (*)(int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_IND(0), ARG_I32(1), ARG_I32(2)); + } + + static void CallFunc_S8_I32_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t, int32_t) = (void (*)(int32_t, int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_IND(0), ARG_I32(1), ARG_I32(2), ARG_I32(3)); + } + + static void CallFunc_S8_I32_I32_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t) = (void (*)(int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_IND(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), ARG_I32(4)); + } + + static void CallFunc_S8_I32_I32_I32_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (void (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_IND(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), ARG_I32(4), ARG_I32(5)); + } + + static void CallFunc_S8_I32_I32_I32_I32_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (void (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_IND(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), ARG_I32(4), ARG_I32(5), ARG_I32(6)); + } + + static void CallFunc_S8_I32_I32_I32_I32_I32_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (void (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_IND(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), ARG_I32(4), ARG_I32(5), ARG_I32(6), ARG_I32(7)); + } + + static void CallFunc_S8_I32_I32_I32_I32_I32_I32_I32_I32_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (void (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_IND(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), ARG_I32(4), ARG_I32(5), ARG_I32(6), ARG_I32(7), ARG_I32(8), ARG_I32(9), ARG_I32(10)); + } + + static void CallFunc_F64_F64_F64_F64_F64_F64_F64_F64_F64_I32_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(double, double, double, double, double, double, double, double, double, int32_t, int32_t, int32_t) = (void (*)(double, double, double, double, double, double, double, double, double, int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_F64(0), ARG_F64(1), ARG_F64(2), ARG_F64(3), ARG_F64(4), ARG_F64(5), ARG_F64(6), ARG_F64(7), ARG_F64(8), ARG_I32(9), ARG_I32(10), ARG_I32(11)); + } + + static void CallFunc_F64_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(double, int32_t, int32_t) = (void (*)(double, int32_t, int32_t))pcode; + (*fptr)(ARG_F64(0), ARG_I32(1), ARG_I32(2)); + } + + static void CallFunc_F64_I32_I32_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(double, int32_t, int32_t, int32_t, int32_t) = (void (*)(double, int32_t, int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_F64(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), ARG_I32(4)); + } + + NOINLINE static void CallFunc_F64_I32_I32_RetVoid_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + void (*fptr)(int*, double, int32_t, int32_t, PCODE) = *(void (**)(int*, double, int32_t, int32_t, PCODE))(pPortableEntryPoint); + (*fptr)(&framePointer, ARG_F64(0), ARG_I32(1), ARG_I32(2), pPortableEntryPoint); + } + + NOINLINE static void CallFunc_F32_I32_I32_RetVoid_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + void (*fptr)(int*, float, int32_t, int32_t, PCODE) = *(void (**)(int*, float, int32_t, int32_t, PCODE))(pPortableEntryPoint); + (*fptr)(&framePointer, ARG_F32(0), ARG_I32(1), ARG_I32(2), pPortableEntryPoint); + } + + static void CallFunc_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t) = (void (*)(int32_t))pcode; + (*fptr)(ARG_I32(0)); + } + + static void CallFunc_I32_S8_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t) = (void (*)(int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_I32(0), ARG_IND(1), ARG_I32(2)); + } + + static void CallFunc_I32_S8_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t, int32_t) = (void (*)(int32_t, int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_I32(0), ARG_IND(1), ARG_I32(2), ARG_I32(3)); + } + + static void CallFunc_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t) = (void (*)(int32_t, int32_t))pcode; + (*fptr)(ARG_I32(0), ARG_I32(1)); + } + + static void CallFunc_I32_I32_S8_S8_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (void (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_I32(0), ARG_I32(1), ARG_IND(2), ARG_IND(3), ARG_I32(4), ARG_I32(5)); + } + + static void CallFunc_I32_I32_S8_S8_I32_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (void (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_I32(0), ARG_I32(1), ARG_IND(2), ARG_IND(3), ARG_I32(4), ARG_I32(5), ARG_I32(6)); + } + + static void CallFunc_I32_I32_F64_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, double, int32_t) = (void (*)(int32_t, int32_t, double, int32_t))pcode; + (*fptr)(ARG_I32(0), ARG_I32(1), ARG_F64(2), ARG_I32(3)); + } + + static void CallFunc_I32_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t) = (void (*)(int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I32(2)); + } + + static void CallFunc_I32_I32_I32_S8_S8_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (void (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I32(2), ARG_IND(3), ARG_IND(4), ARG_I32(5)); + } + + static void CallFunc_I32_I32_I32_S8_S8_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (void (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I32(2), ARG_IND(3), ARG_IND(4), ARG_I32(5), ARG_I32(6)); + } + + static void CallFunc_I32_I32_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t, int32_t) = (void (*)(int32_t, int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I32(2), ARG_I32(3)); + } + + static void CallFunc_I32_I32_I32_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t) = (void (*)(int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), ARG_I32(4)); + } + + static void CallFunc_I32_I32_I32_I32_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (void (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), ARG_I32(4), ARG_I32(5)); + } + + static void CallFunc_I32_I32_I32_I32_I32_I32_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t) = (void (*)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t))pcode; + (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), ARG_I32(4), ARG_I32(5), ARG_I32(6)); + } + + static void CallFunc_I32_I32_I32_I32_I64_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int32_t, int32_t, int32_t, int32_t, int64_t, int32_t) = (void (*)(int32_t, int32_t, int32_t, int32_t, int64_t, int32_t))pcode; + (*fptr)(ARG_I32(0), ARG_I32(1), ARG_I32(2), ARG_I32(3), ARG_I64(4), ARG_I32(5)); + } + + NOINLINE static void CallFunc_I32_I32_I32_RetVoid_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + void (*fptr)(int*, int32_t, int32_t, int32_t, PCODE) = *(void (**)(int*, int32_t, int32_t, int32_t, PCODE))(pPortableEntryPoint); + (*fptr)(&framePointer, ARG_I32(0), ARG_I32(1), ARG_I32(2), pPortableEntryPoint); + } + + NOINLINE static void CallFunc_I32_I32_RetVoid_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + void (*fptr)(int*, int32_t, int32_t, PCODE) = *(void (**)(int*, int32_t, int32_t, PCODE))(pPortableEntryPoint); + (*fptr)(&framePointer, ARG_I32(0), ARG_I32(1), pPortableEntryPoint); + } + + NOINLINE static void CallFunc_I32_RetVoid_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + void (*fptr)(int*, int32_t, PCODE) = *(void (**)(int*, int32_t, PCODE))(pPortableEntryPoint); + (*fptr)(&framePointer, ARG_I32(0), pPortableEntryPoint); + } + + static void CallFunc_I64_I32_RetVoid(PCODE pcode, int8_t* pArgs, int8_t* pRet) + { + void (*fptr)(int64_t, int32_t) = (void (*)(int64_t, int32_t))pcode; + (*fptr)(ARG_I64(0), ARG_I32(1)); + } + + NOINLINE static void CallFunc_Void_RetVoid_PE(PCODE pPortableEntryPoint, int8_t* pArgs, int8_t* pRet) + { + alignas(16) int framePointer = TERMINATE_R2R_STACK_WALK; + void (*fptr)(int*, PCODE) = *(void (**)(int*, PCODE))(pPortableEntryPoint); + (*fptr)(&framePointer, pPortableEntryPoint); + } +} + +const StringToPortableSigThunk g_portableCallHelperThunks[] = { + { "Mddddp", (void*)&CallFunc_F64_F64_F64_RetF64_PE }, + { "Mdddp", (void*)&CallFunc_F64_F64_RetF64_PE }, + { "Mddip", (void*)&CallFunc_F64_I32_RetF64_PE }, + { "Mddp", (void*)&CallFunc_F64_RetF64_PE }, + { "Mdi", (void*)&CallFunc_I32_RetF64 }, + { "Mffffp", (void*)&CallFunc_F32_F32_F32_RetF32_PE }, + { "Mfffp", (void*)&CallFunc_F32_F32_RetF32_PE }, + { "Mffip", (void*)&CallFunc_F32_I32_RetF32_PE }, + { "Mffp", (void*)&CallFunc_F32_RetF32_PE }, + { "Mi", (void*)&CallFunc_Void_RetI32 }, + { "MiS64i", (void*)&CallFunc_S64_I32_RetI32 }, + { "MiS8", (void*)&CallFunc_S8_RetI32 }, + { "MiS8S8S8i", (void*)&CallFunc_S8_S8_S8_I32_RetI32 }, + { "MiS8S8iS8i", (void*)&CallFunc_S8_S8_I32_S8_I32_RetI32 }, + { "MiS8S8ii", (void*)&CallFunc_S8_S8_I32_I32_RetI32 }, + { "MiS8S8iii", (void*)&CallFunc_S8_S8_I32_I32_I32_RetI32 }, + { "MiS8i", (void*)&CallFunc_S8_I32_RetI32 }, + { "MiS8iS8S8i", (void*)&CallFunc_S8_I32_S8_S8_I32_RetI32 }, + { "MiS8iS8ii", (void*)&CallFunc_S8_I32_S8_I32_I32_RetI32 }, + { "MiS8ii", (void*)&CallFunc_S8_I32_I32_RetI32 }, + { "MiS8iii", (void*)&CallFunc_S8_I32_I32_I32_RetI32 }, + { "MiS8iiii", (void*)&CallFunc_S8_I32_I32_I32_I32_RetI32 }, + { "MiS8iiiii", (void*)&CallFunc_S8_I32_I32_I32_I32_I32_RetI32 }, + { "MiS8iiiiii", (void*)&CallFunc_S8_I32_I32_I32_I32_I32_I32_RetI32 }, + { "MiTip", (void*)&CallFunc_This_I32_RetI32_PE }, + { "MiTp", (void*)&CallFunc_This_RetI32_PE }, + { "Mii", (void*)&CallFunc_I32_RetI32 }, + { "MiiS8ii", (void*)&CallFunc_I32_S8_I32_I32_RetI32 }, + { "MiiS8iiii", (void*)&CallFunc_I32_S8_I32_I32_I32_I32_RetI32 }, + { "Miii", (void*)&CallFunc_I32_I32_RetI32 }, + { "MiiiS8iiS8i", (void*)&CallFunc_I32_I32_S8_I32_I32_S8_I32_RetI32 }, + { "MiiiS8iiiii", (void*)&CallFunc_I32_I32_S8_I32_I32_I32_I32_I32_RetI32 }, + { "Miiii", (void*)&CallFunc_I32_I32_I32_RetI32 }, + { "MiiiiS8iiii", (void*)&CallFunc_I32_I32_I32_S8_I32_I32_I32_I32_RetI32 }, + { "Miiiii", (void*)&CallFunc_I32_I32_I32_I32_RetI32 }, + { "Miiiiii", (void*)&CallFunc_I32_I32_I32_I32_I32_RetI32 }, + { "Miiiiiii", (void*)&CallFunc_I32_I32_I32_I32_I32_I32_RetI32 }, + { "Miiiiiiii", (void*)&CallFunc_I32_I32_I32_I32_I32_I32_I32_RetI32 }, + { "Miiiiiiiiiiiiiii", (void*)&CallFunc_I32_I32_I32_I32_I32_I32_I32_I32_I32_I32_I32_I32_I32_I32_RetI32 }, + { "Miiiiiiip", (void*)&CallFunc_I32_I32_I32_I32_I32_I32_RetI32_PE }, + { "Miiiiiip", (void*)&CallFunc_I32_I32_I32_I32_I32_RetI32_PE }, + { "Miiiiip", (void*)&CallFunc_I32_I32_I32_I32_RetI32_PE }, + { "Miiiil", (void*)&CallFunc_I32_I32_I32_I64_RetI32 }, + { "Miiiip", (void*)&CallFunc_I32_I32_I32_RetI32_PE }, + { "Miiil", (void*)&CallFunc_I32_I32_I64_RetI32 }, + { "Miiiliiiii", (void*)&CallFunc_I32_I32_I64_I32_I32_I32_I32_I32_RetI32 }, + { "Miiip", (void*)&CallFunc_I32_I32_RetI32_PE }, + { "Miil", (void*)&CallFunc_I32_I64_RetI32 }, + { "Miili", (void*)&CallFunc_I32_I64_I32_RetI32 }, + { "Miiliiil", (void*)&CallFunc_I32_I64_I32_I32_I32_I64_RetI32 }, + { "Miill", (void*)&CallFunc_I32_I64_I64_RetI32 }, + { "Miilli", (void*)&CallFunc_I32_I64_I64_I32_RetI32 }, + { "Miip", (void*)&CallFunc_I32_RetI32_PE }, + { "Mili", (void*)&CallFunc_I64_I32_RetI32 }, + { "Milii", (void*)&CallFunc_I64_I32_I32_RetI32 }, + { "Mililii", (void*)&CallFunc_I64_I32_I64_I32_I32_RetI32 }, + { "Mip", (void*)&CallFunc_Void_RetI32_PE }, + { "Ml", (void*)&CallFunc_Void_RetI64 }, + { "Mli", (void*)&CallFunc_I32_RetI64 }, + { "Mliii", (void*)&CallFunc_I32_I32_I32_RetI64 }, + { "Mliiiiii", (void*)&CallFunc_I32_I32_I32_I32_I32_I32_RetI64 }, + { "Mliiil", (void*)&CallFunc_I32_I32_I32_I64_RetI64 }, + { "Mlili", (void*)&CallFunc_I32_I64_I32_RetI64 }, + { "Mlillp", (void*)&CallFunc_I32_I64_I64_RetI64_PE }, + { "Mlilp", (void*)&CallFunc_I32_I64_RetI64_PE }, + { "Mlip", (void*)&CallFunc_I32_RetI64_PE }, + { "Mlllp", (void*)&CallFunc_I64_I64_RetI64_PE }, + { "Mlp", (void*)&CallFunc_Void_RetI64_PE }, + { "Mv", (void*)&CallFunc_Void_RetVoid }, + { "MvS8S8i", (void*)&CallFunc_S8_S8_I32_RetVoid }, + { "MvS8S8iiiiii", (void*)&CallFunc_S8_S8_I32_I32_I32_I32_I32_I32_RetVoid }, + { "MvS8i", (void*)&CallFunc_S8_I32_RetVoid }, + { "MvS8ii", (void*)&CallFunc_S8_I32_I32_RetVoid }, + { "MvS8iii", (void*)&CallFunc_S8_I32_I32_I32_RetVoid }, + { "MvS8iiii", (void*)&CallFunc_S8_I32_I32_I32_I32_RetVoid }, + { "MvS8iiiii", (void*)&CallFunc_S8_I32_I32_I32_I32_I32_RetVoid }, + { "MvS8iiiiii", (void*)&CallFunc_S8_I32_I32_I32_I32_I32_I32_RetVoid }, + { "MvS8iiiiiii", (void*)&CallFunc_S8_I32_I32_I32_I32_I32_I32_I32_RetVoid }, + { "MvS8iiiiiiiiii", (void*)&CallFunc_S8_I32_I32_I32_I32_I32_I32_I32_I32_I32_I32_RetVoid }, + { "Mvdddddddddiii", (void*)&CallFunc_F64_F64_F64_F64_F64_F64_F64_F64_F64_I32_I32_I32_RetVoid }, + { "Mvdii", (void*)&CallFunc_F64_I32_I32_RetVoid }, + { "Mvdiiii", (void*)&CallFunc_F64_I32_I32_I32_I32_RetVoid }, + { "Mvdiip", (void*)&CallFunc_F64_I32_I32_RetVoid_PE }, + { "Mvfiip", (void*)&CallFunc_F32_I32_I32_RetVoid_PE }, + { "Mvi", (void*)&CallFunc_I32_RetVoid }, + { "MviS8i", (void*)&CallFunc_I32_S8_I32_RetVoid }, + { "MviS8ii", (void*)&CallFunc_I32_S8_I32_I32_RetVoid }, + { "Mvii", (void*)&CallFunc_I32_I32_RetVoid }, + { "MviiS8S8ii", (void*)&CallFunc_I32_I32_S8_S8_I32_I32_RetVoid }, + { "MviiS8S8iii", (void*)&CallFunc_I32_I32_S8_S8_I32_I32_I32_RetVoid }, + { "Mviidi", (void*)&CallFunc_I32_I32_F64_I32_RetVoid }, + { "Mviii", (void*)&CallFunc_I32_I32_I32_RetVoid }, + { "MviiiS8S8i", (void*)&CallFunc_I32_I32_I32_S8_S8_I32_RetVoid }, + { "MviiiS8S8ii", (void*)&CallFunc_I32_I32_I32_S8_S8_I32_I32_RetVoid }, + { "Mviiii", (void*)&CallFunc_I32_I32_I32_I32_RetVoid }, + { "Mviiiii", (void*)&CallFunc_I32_I32_I32_I32_I32_RetVoid }, + { "Mviiiiii", (void*)&CallFunc_I32_I32_I32_I32_I32_I32_RetVoid }, + { "Mviiiiiii", (void*)&CallFunc_I32_I32_I32_I32_I32_I32_I32_RetVoid }, + { "Mviiiili", (void*)&CallFunc_I32_I32_I32_I32_I64_I32_RetVoid }, + { "Mviiip", (void*)&CallFunc_I32_I32_I32_RetVoid_PE }, + { "Mviip", (void*)&CallFunc_I32_I32_RetVoid_PE }, + { "Mvip", (void*)&CallFunc_I32_RetVoid_PE }, + { "Mvli", (void*)&CallFunc_I64_I32_RetVoid }, + { "Mvp", (void*)&CallFunc_Void_RetVoid_PE } +}; + +const size_t g_portableCallHelperThunksCount = sizeof(g_portableCallHelperThunks) / sizeof(g_portableCallHelperThunks[0]); diff --git a/src/coreclr/vm/wasm/browser/production/callhelpers-pinvoke.cpp b/src/coreclr/vm/wasm/browser/production/callhelpers-pinvoke.cpp new file mode 100644 index 00000000000000..172acacdb9bdc9 --- /dev/null +++ b/src/coreclr/vm/wasm/browser/production/callhelpers-pinvoke.cpp @@ -0,0 +1,934 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// + +// +// GENERATED FILE, DON'T EDIT +// Generated by coreclr callhelpers generator +// + +#include +#include + +extern "C" { + uint32_t CompressionNative_Crc32 (uint32_t, void *, int32_t); + int32_t CompressionNative_Deflate (void *, int32_t); + int32_t CompressionNative_DeflateEnd (void *); + int32_t CompressionNative_DeflateInit2_ (void *, int32_t, int32_t, int32_t, int32_t, int32_t); + int32_t CompressionNative_DeflateReset (void *); + int32_t CompressionNative_Inflate (void *, int32_t); + int32_t CompressionNative_InflateEnd (void *); + int32_t CompressionNative_InflateInit2_ (void *, int32_t); + int32_t CompressionNative_InflateReset2_ (void *, int32_t); + void GlobalizationNative_ChangeCase (void *, int32_t, void *, int32_t, int32_t); + void GlobalizationNative_ChangeCaseInvariant (void *, int32_t, void *, int32_t, int32_t); + void GlobalizationNative_ChangeCaseTurkish (void *, int32_t, void *, int32_t, int32_t); + void GlobalizationNative_CloseSortHandle (void *); + int32_t GlobalizationNative_CompareString (void *, void *, int32_t, void *, int32_t, int32_t); + int32_t GlobalizationNative_EndsWith (void *, void *, int32_t, void *, int32_t, int32_t, void *); + int32_t GlobalizationNative_EnumCalendarInfo (void *, void *, uint32_t, int32_t, void *); + int32_t GlobalizationNative_GetCalendarInfo (void *, uint32_t, int32_t, void *, int32_t); + int32_t GlobalizationNative_GetCalendars (void *, void *, int32_t); + int32_t GlobalizationNative_GetDefaultLocaleName (void *, int32_t); + int32_t GlobalizationNative_GetJapaneseEraStartDate (int32_t, void *, void *, void *); + int32_t GlobalizationNative_GetLatestJapaneseEra (); + int32_t GlobalizationNative_GetLocaleInfoGroupingSizes (void *, uint32_t, void *, void *); + int32_t GlobalizationNative_GetLocaleInfoInt (void *, uint32_t, void *); + int32_t GlobalizationNative_GetLocaleInfoString (void *, uint32_t, void *, int32_t, void *); + int32_t GlobalizationNative_GetLocaleName (void *, void *, int32_t); + int32_t GlobalizationNative_GetLocaleTimeFormat (void *, int32_t, void *, int32_t); + int32_t GlobalizationNative_GetLocales (void *, int32_t); + int32_t GlobalizationNative_GetSortHandle (void *, void *); + int32_t GlobalizationNative_GetSortKey (void *, void *, int32_t, void *, int32_t, int32_t); + int32_t GlobalizationNative_GetSortVersion (void *); + int32_t GlobalizationNative_IndexOf (void *, void *, int32_t, void *, int32_t, int32_t, void *); + void GlobalizationNative_InitICUFunctions (void *, void *, void *, void *); + void GlobalizationNative_InitOrdinalCasingPage (int32_t, void *); + void GlobalizationNative_InitOrdinalLowerCasingPage (int32_t, void *); + int32_t GlobalizationNative_IsNormalized (int32_t, void *, int32_t); + int32_t GlobalizationNative_IsPredefinedLocale (void *); + int32_t GlobalizationNative_LastIndexOf (void *, void *, int32_t, void *, int32_t, int32_t, void *); + int32_t GlobalizationNative_LoadICU (); + int32_t GlobalizationNative_NormalizeString (int32_t, void *, int32_t, void *, int32_t); + int32_t GlobalizationNative_StartsWith (void *, void *, int32_t, void *, int32_t, int32_t, void *); + int32_t GlobalizationNative_ToAscii (uint32_t, void *, int32_t, void *, int32_t); + int32_t GlobalizationNative_ToUnicode (uint32_t, void *, int32_t, void *, int32_t); + void * SystemInteropJS_BindJSImportST (void *); + void SystemInteropJS_CancelPromise (void *); + void SystemInteropJS_InvokeJSFunction (void *, void *); + void SystemInteropJS_InvokeJSImportST (int32_t, void *); + void SystemInteropJS_ReleaseCSOwnedObject (void *); + void SystemInteropJS_ResolveOrRejectPromise (void *); + void * SystemJS_GetLocaleInfo (void *, int32_t, void *, int32_t, void *, int32_t, void *); + int32_t SystemNative_Access (void *, int32_t); + void * SystemNative_AlignedAlloc (void *, void *); + void SystemNative_AlignedFree (void *); + void * SystemNative_AlignedRealloc (void *, void *, void *); + void * SystemNative_Calloc (void *, void *); + int32_t SystemNative_CanGetHiddenFlag (); + int32_t SystemNative_ChDir (void *); + int32_t SystemNative_ChMod (void *, int32_t); + int32_t SystemNative_Close (void *); + int32_t SystemNative_CloseDir (void *); + int32_t SystemNative_ConvertErrorPalToPlatform (int32_t); + int32_t SystemNative_ConvertErrorPlatformToPal (int32_t); + int32_t SystemNative_CopyFile (void *, void *, int64_t); + int32_t SystemNative_FAllocate (void *, int64_t, int64_t); + int32_t SystemNative_FChMod (void *, int32_t); + int32_t SystemNative_FChflags (void *, uint32_t); + int32_t SystemNative_FLock (void *, int32_t); + int32_t SystemNative_FStat (void *, void *); + int32_t SystemNative_FSync (void *); + int32_t SystemNative_FTruncate (void *, int64_t); + int32_t SystemNative_FUTimens (void *, void *); + int32_t SystemNative_FcntlGetIsNonBlocking (void *, void *); + int32_t SystemNative_FcntlSetFD (void *, int32_t); + int32_t SystemNative_FileSystemSupportsLocking (void *, int32_t, int32_t); + void SystemNative_Free (void *); + void SystemNative_FreeLibrary (void *); + double SystemNative_GetCpuUtilization (void *); + int32_t SystemNative_GetCryptographicallySecureRandomBytes (void *, int32_t); + void * SystemNative_GetCwd (void *, int32_t); + void * SystemNative_GetDefaultSearchOrderPseudoHandle (); + int32_t SystemNative_GetErrNo (); + void * SystemNative_GetLoadLibraryError (); + int64_t SystemNative_GetLowResolutionTimestamp (); + void SystemNative_GetNonCryptographicallySecureRandomBytes (void *, int32_t); + void * SystemNative_GetProcAddress (void *, void *); + int64_t SystemNative_GetSystemTimeAsTicks (); + void * SystemNative_GetTimeZoneData (void *, void *); + int64_t SystemNative_GetTimestamp (); + int32_t SystemNative_IsMemfdSupported (); + int32_t SystemNative_LChflags (void *, uint32_t); + int32_t SystemNative_LChflagsCanSetHiddenFlag (); + int64_t SystemNative_LSeek (void *, int64_t, int32_t); + int32_t SystemNative_LStat (void *, void *); + int32_t SystemNative_Link (void *, void *); + void * SystemNative_LoadLibrary (void *); + int32_t SystemNative_LockFileRegion (void *, int64_t, int64_t, int32_t); + void SystemNative_Log (void *, int32_t); + void SystemNative_LogError (void *, int32_t); + int32_t SystemNative_MAdvise (void *, uint64_t, int32_t); + void * SystemNative_MMap (void *, uint64_t, int32_t, int32_t, void *, int64_t); + int32_t SystemNative_MSync (void *, uint64_t, int32_t); + int32_t SystemNative_MUnmap (void *, uint64_t); + void * SystemNative_Malloc (void *); + void * SystemNative_MemfdCreate (void *, int32_t); + int32_t SystemNative_MkDir (void *, int32_t); + void * SystemNative_MkdTemp (void *); + void * SystemNative_MksTemps (void *, int32_t); + void * SystemNative_Open (void *, int32_t, int32_t); + void * SystemNative_OpenDir (void *); + int32_t SystemNative_PRead (void *, void *, int32_t, int64_t); + int64_t SystemNative_PReadV (void *, void *, int32_t, int64_t); + int32_t SystemNative_PWrite (void *, void *, int32_t, int64_t); + int64_t SystemNative_PWriteV (void *, void *, int32_t, int64_t); + int32_t SystemNative_Pipe (void *, int32_t); + int32_t SystemNative_PosixFAdvise (void *, int64_t, int64_t, int32_t); + int32_t SystemNative_Read (void *, void *, int32_t); + int32_t SystemNative_ReadDir (void *, void *); + int32_t SystemNative_ReadFromNonblocking (void *, void *, int32_t); + int32_t SystemNative_ReadLink (void *, void *, int32_t); + int64_t SystemNative_ReadV (void *, void *, int32_t); + void * SystemNative_Realloc (void *, void *); + int32_t SystemNative_Rename (void *, void *); + int32_t SystemNative_RmDir (void *); + void SystemNative_SetErrNo (int32_t); + void * SystemNative_ShmOpen (void *, int32_t, int32_t); + int32_t SystemNative_ShmUnlink (void *); + int32_t SystemNative_Stat (void *, void *); + void * SystemNative_StrErrorR (int32_t, void *, int32_t); + int32_t SystemNative_SymLink (void *, void *); + int64_t SystemNative_SysConf (int32_t); + void SystemNative_SysLog (int32_t, void *, void *); + int32_t SystemNative_ThreadSleep (int32_t); + int32_t SystemNative_UTimensat (void *, void *); + int32_t SystemNative_Unlink (void *); + int32_t SystemNative_Write (void *, void *, int32_t); + int32_t SystemNative_WriteToNonblocking (void *, void *, int32_t); + int64_t SystemNative_WriteV (void *, void *, int32_t); +} // extern "C" + +static const Entry s_libSystem_Globalization_Native [] = { + DllImportEntry(GlobalizationNative_ChangeCase) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_ChangeCaseInvariant) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_ChangeCaseTurkish) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_CloseSortHandle) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_CompareString) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_EndsWith) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_EnumCalendarInfo) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_GetCalendarInfo) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_GetCalendars) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_GetDefaultLocaleName) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_GetJapaneseEraStartDate) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_GetLatestJapaneseEra) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_GetLocaleInfoGroupingSizes) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_GetLocaleInfoInt) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_GetLocaleInfoString) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_GetLocaleName) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_GetLocaleTimeFormat) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_GetLocales) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_GetSortHandle) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_GetSortKey) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_GetSortVersion) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_IndexOf) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_InitICUFunctions) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_InitOrdinalCasingPage) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_InitOrdinalLowerCasingPage) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_IsNormalized) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_IsPredefinedLocale) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_LastIndexOf) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_LoadICU) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_NormalizeString) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_StartsWith) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_ToAscii) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_ToUnicode) // System.Private.CoreLib +}; + +static const Entry s_libSystem_IO_Compression_Native [] = { + DllImportEntry(CompressionNative_Crc32) // System.IO.Compression + DllImportEntry(CompressionNative_Deflate) // System.IO.Compression, System.Net.WebSockets + DllImportEntry(CompressionNative_DeflateEnd) // System.IO.Compression, System.Net.WebSockets + DllImportEntry(CompressionNative_DeflateInit2_) // System.IO.Compression, System.Net.WebSockets + DllImportEntry(CompressionNative_DeflateReset) // System.IO.Compression + DllImportEntry(CompressionNative_Inflate) // System.IO.Compression, System.Net.WebSockets + DllImportEntry(CompressionNative_InflateEnd) // System.IO.Compression, System.Net.WebSockets + DllImportEntry(CompressionNative_InflateInit2_) // System.IO.Compression, System.Net.WebSockets + DllImportEntry(CompressionNative_InflateReset2_) // System.IO.Compression +}; + +static const Entry s_libSystem_Native [] = { + DllImportEntry(SystemNative_Access) // System.Private.CoreLib + DllImportEntry(SystemNative_AlignedAlloc) // System.Private.CoreLib + DllImportEntry(SystemNative_AlignedFree) // System.Private.CoreLib + DllImportEntry(SystemNative_AlignedRealloc) // System.Private.CoreLib + DllImportEntry(SystemNative_Calloc) // System.Private.CoreLib + DllImportEntry(SystemNative_CanGetHiddenFlag) // System.Private.CoreLib + DllImportEntry(SystemNative_ChDir) // System.Private.CoreLib + DllImportEntry(SystemNative_ChMod) // System.Private.CoreLib + DllImportEntry(SystemNative_Close) // System.Private.CoreLib + DllImportEntry(SystemNative_CloseDir) // System.Private.CoreLib + DllImportEntry(SystemNative_ConvertErrorPalToPlatform) // System.Console, System.IO.Compression.ZipFile, System.IO.MemoryMappedFiles, System.Net.Primitives, System.Private.CoreLib + DllImportEntry(SystemNative_ConvertErrorPlatformToPal) // System.Console, System.IO.Compression.ZipFile, System.IO.MemoryMappedFiles, System.Net.Primitives, System.Private.CoreLib + DllImportEntry(SystemNative_CopyFile) // System.Private.CoreLib + DllImportEntry(SystemNative_FAllocate) // System.Private.CoreLib + DllImportEntry(SystemNative_FChMod) // System.Private.CoreLib + DllImportEntry(SystemNative_FChflags) // System.Private.CoreLib + DllImportEntry(SystemNative_FLock) // System.Private.CoreLib + DllImportEntry(SystemNative_FStat) // System.IO.Compression.ZipFile, System.Private.CoreLib + DllImportEntry(SystemNative_FSync) // System.Private.CoreLib + DllImportEntry(SystemNative_FTruncate) // System.IO.MemoryMappedFiles, System.Private.CoreLib + DllImportEntry(SystemNative_FUTimens) // System.Private.CoreLib + DllImportEntry(SystemNative_FcntlGetIsNonBlocking) // System.Private.CoreLib + DllImportEntry(SystemNative_FcntlSetFD) // System.IO.MemoryMappedFiles + DllImportEntry(SystemNative_FileSystemSupportsLocking) // System.Private.CoreLib + DllImportEntry(SystemNative_Free) // System.Private.CoreLib + DllImportEntry(SystemNative_FreeLibrary) // System.Private.CoreLib + DllImportEntry(SystemNative_GetCpuUtilization) // System.Private.CoreLib + DllImportEntry(SystemNative_GetCryptographicallySecureRandomBytes) // System.IO.Compression, System.Private.CoreLib, System.Security.Cryptography + DllImportEntry(SystemNative_GetCwd) // System.Private.CoreLib + DllImportEntry(SystemNative_GetDefaultSearchOrderPseudoHandle) // System.Private.CoreLib + DllImportEntry(SystemNative_GetErrNo) // System.Private.CoreLib + DllImportEntry(SystemNative_GetLoadLibraryError) // System.Private.CoreLib + DllImportEntry(SystemNative_GetLowResolutionTimestamp) // System.Private.CoreLib + DllImportEntry(SystemNative_GetNonCryptographicallySecureRandomBytes) // System.Private.CoreLib + DllImportEntry(SystemNative_GetProcAddress) // System.Private.CoreLib + DllImportEntry(SystemNative_GetSystemTimeAsTicks) // System.Private.CoreLib + DllImportEntry(SystemNative_GetTimeZoneData) // System.Private.CoreLib + DllImportEntry(SystemNative_GetTimestamp) // System.Private.CoreLib + DllImportEntry(SystemNative_IsMemfdSupported) // System.IO.MemoryMappedFiles + DllImportEntry(SystemNative_LChflags) // System.Private.CoreLib + DllImportEntry(SystemNative_LChflagsCanSetHiddenFlag) // System.Private.CoreLib + DllImportEntry(SystemNative_LSeek) // System.Private.CoreLib + DllImportEntry(SystemNative_LStat) // System.Private.CoreLib + DllImportEntry(SystemNative_Link) // System.Private.CoreLib + DllImportEntry(SystemNative_LoadLibrary) // System.Private.CoreLib + DllImportEntry(SystemNative_LockFileRegion) // System.Private.CoreLib + DllImportEntry(SystemNative_Log) // System.Private.CoreLib + DllImportEntry(SystemNative_LogError) // System.Private.CoreLib + DllImportEntry(SystemNative_MAdvise) // System.IO.MemoryMappedFiles + DllImportEntry(SystemNative_MMap) // System.IO.MemoryMappedFiles + DllImportEntry(SystemNative_MSync) // System.IO.MemoryMappedFiles + DllImportEntry(SystemNative_MUnmap) // System.IO.MemoryMappedFiles + DllImportEntry(SystemNative_Malloc) // System.Private.CoreLib + DllImportEntry(SystemNative_MemfdCreate) // System.IO.MemoryMappedFiles + DllImportEntry(SystemNative_MkDir) // System.Private.CoreLib + DllImportEntry(SystemNative_MkdTemp) // System.Private.CoreLib + DllImportEntry(SystemNative_MksTemps) // System.Private.CoreLib + DllImportEntry(SystemNative_Open) // System.Private.CoreLib + DllImportEntry(SystemNative_OpenDir) // System.Private.CoreLib + DllImportEntry(SystemNative_PRead) // System.Private.CoreLib + DllImportEntry(SystemNative_PReadV) // System.Private.CoreLib + DllImportEntry(SystemNative_PWrite) // System.Private.CoreLib + DllImportEntry(SystemNative_PWriteV) // System.Private.CoreLib + DllImportEntry(SystemNative_Pipe) // System.Private.CoreLib + DllImportEntry(SystemNative_PosixFAdvise) // System.Private.CoreLib + DllImportEntry(SystemNative_Read) // System.Private.CoreLib + DllImportEntry(SystemNative_ReadDir) // System.Private.CoreLib + DllImportEntry(SystemNative_ReadFromNonblocking) // System.Private.CoreLib + DllImportEntry(SystemNative_ReadLink) // System.Private.CoreLib + DllImportEntry(SystemNative_ReadV) // System.Private.CoreLib + DllImportEntry(SystemNative_Realloc) // System.Private.CoreLib + DllImportEntry(SystemNative_Rename) // System.Private.CoreLib + DllImportEntry(SystemNative_RmDir) // System.Private.CoreLib + DllImportEntry(SystemNative_SetErrNo) // System.Private.CoreLib + DllImportEntry(SystemNative_ShmOpen) // System.IO.MemoryMappedFiles + DllImportEntry(SystemNative_ShmUnlink) // System.IO.MemoryMappedFiles + DllImportEntry(SystemNative_Stat) // System.IO.Compression.ZipFile, System.Private.CoreLib + DllImportEntry(SystemNative_StrErrorR) // System.Console, System.IO.Compression.ZipFile, System.IO.MemoryMappedFiles, System.Net.Primitives, System.Private.CoreLib + DllImportEntry(SystemNative_SymLink) // System.Private.CoreLib + DllImportEntry(SystemNative_SysConf) // System.IO.MemoryMappedFiles, System.Private.CoreLib + DllImportEntry(SystemNative_SysLog) // System.Private.CoreLib + DllImportEntry(SystemNative_ThreadSleep) // System.Private.CoreLib + DllImportEntry(SystemNative_UTimensat) // System.Private.CoreLib + DllImportEntry(SystemNative_Unlink) // System.IO.MemoryMappedFiles, System.Private.CoreLib + DllImportEntry(SystemNative_Write) // System.Console, System.Private.CoreLib + DllImportEntry(SystemNative_WriteToNonblocking) // System.Private.CoreLib + DllImportEntry(SystemNative_WriteV) // System.Private.CoreLib +}; + +static const Entry s_libSystem_Native_Browser [] = { + DllImportEntry(SystemJS_GetLocaleInfo) // System.Private.CoreLib +}; + +static const Entry s_libSystem_Runtime_InteropServices_JavaScript_Native [] = { + DllImportEntry(SystemInteropJS_BindJSImportST) // System.Runtime.InteropServices.JavaScript + DllImportEntry(SystemInteropJS_CancelPromise) // System.Runtime.InteropServices.JavaScript + DllImportEntry(SystemInteropJS_InvokeJSFunction) // System.Runtime.InteropServices.JavaScript + DllImportEntry(SystemInteropJS_InvokeJSImportST) // System.Runtime.InteropServices.JavaScript + DllImportEntry(SystemInteropJS_ReleaseCSOwnedObject) // System.Runtime.InteropServices.JavaScript + DllImportEntry(SystemInteropJS_ResolveOrRejectPromise) // System.Runtime.InteropServices.JavaScript +}; + +typedef struct PInvokeTable { + const char* LibraryName; + const Entry* Entries; + size_t EntryCount; +} PInvokeTable; + +static PInvokeTable s_PInvokeTables[] = { + {"libSystem.Globalization.Native", s_libSystem_Globalization_Native, 33}, + {"libSystem.IO.Compression.Native", s_libSystem_IO_Compression_Native, 9}, + {"libSystem.Native", s_libSystem_Native, 87}, + {"libSystem.Native.Browser", s_libSystem_Native_Browser, 1}, + {"libSystem.Runtime.InteropServices.JavaScript.Native", s_libSystem_Runtime_InteropServices_JavaScript_Native, 6} +}; +const size_t s_PInvokeTablesCount = sizeof(s_PInvokeTables) / sizeof(s_PInvokeTables[0]); + +const void* callhelpers_pinvoke_override(const char* library_name, const char* entry_point_name) +{ + for (size_t i = 0; i < s_PInvokeTablesCount; i++) + { + if (strcmp(library_name, s_PInvokeTables[i].LibraryName) == 0) + { + LOG((LF_INTEROP, LL_INFO1000, "Wasm callhelpers PInvoke override for: lib: %s, entry: %s \n", library_name, entry_point_name)); + return minipal_resolve_dllimport(s_PInvokeTables[i].Entries, s_PInvokeTables[i].EntryCount, entry_point_name); + } + } + + return nullptr; +} +extern "C" { + void QCall_AppContext_SetFirstChanceExceptionHandler () __asm__("AppContext_SetFirstChanceExceptionHandler"); + int32_t QCall_AppContext_TryGetHostPropertyValue (void *, void *, void *) __asm__("AppContext_TryGetHostPropertyValue"); + void QCall_AppDomain_CreateDynamicAssembly (void *, void *, int32_t, int32_t, void *, void *) __asm__("AppDomain_CreateDynamicAssembly"); + void QCall_AppendExceptionStackFrame (void *, void *, void *, int32_t, void *, void *) __asm__("AppendExceptionStackFrame"); + void QCall_Array_CreateInstance (void *, int32_t, void *, void *, int32_t, void *, void *) __asm__("Array_CreateInstance"); + void QCall_Array_Ctor (void *, uint32_t, void *, void *, void *) __asm__("Array_Ctor"); + void * QCall_Array_GetElementConstructorEntrypoint (void *, void *) __asm__("Array_GetElementConstructorEntrypoint"); + void QCall_AssemblyHandle_GetManifestModuleSlow (void *, void *, void *) __asm__("AssemblyHandle_GetManifestModuleSlow"); + void QCall_AssemblyName_InitializeAssemblySpec (void *, void *, void *) __asm__("AssemblyName_InitializeAssemblySpec"); + void QCall_AssemblyNative_ApplyUpdate (void *, void *, int32_t, void *, int32_t, void *, int32_t, void *) __asm__("AssemblyNative_ApplyUpdate"); + int32_t QCall_AssemblyNative_GetCodeBase (void *, void *, void *) __asm__("AssemblyNative_GetCodeBase"); + void QCall_AssemblyNative_GetEntryAssembly (void *, void *) __asm__("AssemblyNative_GetEntryAssembly"); + void QCall_AssemblyNative_GetEntryPoint (void *, void *, void *) __asm__("AssemblyNative_GetEntryPoint"); + void QCall_AssemblyNative_GetExecutingAssembly (void *, void *, void *) __asm__("AssemblyNative_GetExecutingAssembly"); + void QCall_AssemblyNative_GetExportedTypes (void *, void *, void *) __asm__("AssemblyNative_GetExportedTypes"); + int32_t QCall_AssemblyNative_GetFlags (void *, void *) __asm__("AssemblyNative_GetFlags"); + void QCall_AssemblyNative_GetForwardedType (void *, int32_t, void *, void *) __asm__("AssemblyNative_GetForwardedType"); + void QCall_AssemblyNative_GetFullName (void *, void *, void *) __asm__("AssemblyNative_GetFullName"); + int32_t QCall_AssemblyNative_GetHashAlgorithm (void *, void *) __asm__("AssemblyNative_GetHashAlgorithm"); + void QCall_AssemblyNative_GetImageRuntimeVersion (void *, void *, void *) __asm__("AssemblyNative_GetImageRuntimeVersion"); + void * QCall_AssemblyNative_GetLoadContextForAssembly (void *, void *) __asm__("AssemblyNative_GetLoadContextForAssembly"); + void QCall_AssemblyNative_GetLoadedAssemblies (void *, void *) __asm__("AssemblyNative_GetLoadedAssemblies"); + void QCall_AssemblyNative_GetLocale (void *, void *, void *) __asm__("AssemblyNative_GetLocale"); + void QCall_AssemblyNative_GetLocation (void *, void *, void *) __asm__("AssemblyNative_GetLocation"); + int32_t QCall_AssemblyNative_GetManifestResourceInfo (void *, void *, void *, void *, void *) __asm__("AssemblyNative_GetManifestResourceInfo"); + void QCall_AssemblyNative_GetManifestResourceNames (void *, void *, void *) __asm__("AssemblyNative_GetManifestResourceNames"); + void QCall_AssemblyNative_GetModule (void *, void *, void *, void *) __asm__("AssemblyNative_GetModule"); + void QCall_AssemblyNative_GetModules (void *, int32_t, int32_t, void *, void *) __asm__("AssemblyNative_GetModules"); + void QCall_AssemblyNative_GetPublicKey (void *, void *, void *) __asm__("AssemblyNative_GetPublicKey"); + void QCall_AssemblyNative_GetReferencedAssemblies (void *, void *, void *) __asm__("AssemblyNative_GetReferencedAssemblies"); + void * QCall_AssemblyNative_GetResource (void *, void *, void *, void *) __asm__("AssemblyNative_GetResource"); + void QCall_AssemblyNative_GetSimpleName (void *, void *, void *) __asm__("AssemblyNative_GetSimpleName"); + void QCall_AssemblyNative_GetTypeCore (void *, void *, void *, int32_t, void *, void *) __asm__("AssemblyNative_GetTypeCore"); + void QCall_AssemblyNative_GetTypeCoreIgnoreCase (void *, void *, void *, int32_t, void *, void *) __asm__("AssemblyNative_GetTypeCoreIgnoreCase"); + void QCall_AssemblyNative_GetVersion (void *, void *, void *, void *, void *, void *) __asm__("AssemblyNative_GetVersion"); + void * QCall_AssemblyNative_InitializeAssemblyLoadContext (void *, int32_t, int32_t, void *) __asm__("AssemblyNative_InitializeAssemblyLoadContext"); + void QCall_AssemblyNative_InternalLoad (void *, void *, void *, int32_t, void *, void *, void *) __asm__("AssemblyNative_InternalLoad"); + int32_t QCall_AssemblyNative_InternalTryGetRawMetadata (void *, void *, void *, void *) __asm__("AssemblyNative_InternalTryGetRawMetadata"); + int32_t QCall_AssemblyNative_IsApplyUpdateSupported (void *) __asm__("AssemblyNative_IsApplyUpdateSupported"); + void QCall_AssemblyNative_LoadFromPath (void *, void *, void *, void *) __asm__("AssemblyNative_LoadFromPath"); + void QCall_AssemblyNative_LoadFromStream (void *, void *, int32_t, void *, int32_t, void *, void *) __asm__("AssemblyNative_LoadFromStream"); + void QCall_AssemblyNative_PrepareForAssemblyLoadContextRelease (void *, void *, void *) __asm__("AssemblyNative_PrepareForAssemblyLoadContextRelease"); + void QCall_AssemblyNative_TraceAssemblyLoadFromResolveHandlerInvoked (void *, int32_t, void *, void *, void *) __asm__("AssemblyNative_TraceAssemblyLoadFromResolveHandlerInvoked"); + void QCall_AssemblyNative_TraceAssemblyResolveHandlerInvoked (void *, void *, void *, void *, void *) __asm__("AssemblyNative_TraceAssemblyResolveHandlerInvoked"); + void QCall_AssemblyNative_TraceResolvingHandlerInvoked (void *, void *, void *, void *, void *, void *) __asm__("AssemblyNative_TraceResolvingHandlerInvoked"); + void QCall_AsyncHelpers_AddContinuationToExInternal (void *, void *, void *) __asm__("AsyncHelpers_AddContinuationToExInternal"); + uint32_t QCall_CallFilterFunclet (void *, void *, void *, void *) __asm__("CallFilterFunclet"); + int32_t QCall_CustomAttribute_ParseAttributeUsageAttribute (void *, int32_t, void *, void *, void *) __asm__("CustomAttribute_ParseAttributeUsageAttribute"); + void QCall_DebugDebugger_Break (void *) __asm__("DebugDebugger_Break"); + void QCall_DebugDebugger_CustomNotification (void *, void *) __asm__("DebugDebugger_CustomNotification"); + void QCall_DebugDebugger_GetFuncEvalArgumentType (void *, uint32_t, void *, void *) __asm__("DebugDebugger_GetFuncEvalArgumentType"); + void QCall_DebugDebugger_GetFuncEvalMethod (void *, void *, void *, void *) __asm__("DebugDebugger_GetFuncEvalMethod"); + int32_t QCall_DebugDebugger_IsLoggingHelper () __asm__("DebugDebugger_IsLoggingHelper"); + int32_t QCall_DebugDebugger_IsManagedDebuggerAttached () __asm__("DebugDebugger_IsManagedDebuggerAttached"); + int32_t QCall_DebugDebugger_Launch () __asm__("DebugDebugger_Launch"); + void QCall_DebugDebugger_Log (int32_t, void *, void *) __asm__("DebugDebugger_Log"); + void QCall_DebugDebugger_PrepareFuncEvalResult (void *, void *, void *) __asm__("DebugDebugger_PrepareFuncEvalResult"); + int32_t QCall_DebugDebugger_ReadFuncEvalPrimitiveRegister (void *, uint32_t, void *) __asm__("DebugDebugger_ReadFuncEvalPrimitiveRegister"); + void QCall_DebugDebugger_WriteFuncEvalObjectRegister (void *, uint32_t, void *, void *) __asm__("DebugDebugger_WriteFuncEvalObjectRegister"); + void QCall_DebugDebugger_WriteFuncEvalRegister (void *, uint32_t, void *, uint32_t, void *) __asm__("DebugDebugger_WriteFuncEvalRegister"); + void * QCall_Delegate_AdjustTarget (void *, void *, void *) __asm__("Delegate_AdjustTarget"); + int32_t QCall_Delegate_BindToMethodInfo (void *, void *, void *, void *, int32_t, void *, void *, void *) __asm__("Delegate_BindToMethodInfo"); + int32_t QCall_Delegate_BindToMethodName (void *, void *, void *, void *, int32_t, void *, void *, void *) __asm__("Delegate_BindToMethodName"); + void QCall_Delegate_Construct (void *, void *, void *, void *, void *) __asm__("Delegate_Construct"); + void QCall_Delegate_CreateMethodInfo (void *, void *, void *) __asm__("Delegate_CreateMethodInfo"); + void * QCall_Delegate_GetMethodDesc (void *, void *) __asm__("Delegate_GetMethodDesc"); + void * QCall_Delegate_GetMulticastInvokeSlow (void *, void *) __asm__("Delegate_GetMulticastInvokeSlow"); + void QCall_Delegate_InitializeVirtualCallStub (void *, void *, void *) __asm__("Delegate_InitializeVirtualCallStub"); + void * QCall_DependentHandle_InternalAllocWithGCTransition (void *, void *, void *) __asm__("DependentHandle_InternalAllocWithGCTransition"); + void QCall_DependentHandle_InternalFreeWithGCTransition (void *, void *) __asm__("DependentHandle_InternalFreeWithGCTransition"); + uint32_t QCall_EHEnumInitFromStackFrameIterator (void *, void *, void *) __asm__("EHEnumInitFromStackFrameIterator"); + uint32_t QCall_EHEnumNext (void *, void *, void *) __asm__("EHEnumNext"); + void QCall_Enum_GetValuesAndNames (void *, void *, void *, int32_t, void *) __asm__("Enum_GetValuesAndNames"); + void QCall_Environment_Exit (int32_t, void *) __asm__("Environment_Exit"); + void QCall_Environment_FailFast (void *, void *, void *, void *, void *) __asm__("Environment_FailFast"); + void * QCall_EventPipeInternal_CreateProvider (void *, void *, void *, void *) __asm__("EventPipeInternal_CreateProvider"); + void * QCall_EventPipeInternal_DefineEvent (void *, uint32_t, int64_t, uint32_t, uint32_t, void *, uint32_t, void *) __asm__("EventPipeInternal_DefineEvent"); + void QCall_EventPipeInternal_DeleteProvider (void *, void *) __asm__("EventPipeInternal_DeleteProvider"); + void QCall_EventPipeInternal_Disable (uint64_t, void *) __asm__("EventPipeInternal_Disable"); + uint64_t QCall_EventPipeInternal_Enable (void *, int32_t, uint32_t, void *, uint32_t, void *) __asm__("EventPipeInternal_Enable"); + int32_t QCall_EventPipeInternal_GetNextEvent (uint64_t, void *, void *) __asm__("EventPipeInternal_GetNextEvent"); + void * QCall_EventPipeInternal_GetProvider (void *, void *) __asm__("EventPipeInternal_GetProvider"); + int32_t QCall_EventPipeInternal_GetSessionInfo (uint64_t, void *, void *) __asm__("EventPipeInternal_GetSessionInfo"); + int32_t QCall_EventPipeInternal_SignalSession (uint64_t, void *) __asm__("EventPipeInternal_SignalSession"); + void QCall_EventPipeInternal_WriteEventData (void *, void *, uint32_t, void *, void *, void *) __asm__("EventPipeInternal_WriteEventData"); + void QCall_ExceptionNative_GetFrozenStackTrace (void *, void *, void *) __asm__("ExceptionNative_GetFrozenStackTrace"); + void QCall_ExceptionNative_GetMessageFromNativeResources (int32_t, void *, void *) __asm__("ExceptionNative_GetMessageFromNativeResources"); + void QCall_ExceptionNative_GetMethodFromStackTrace (void *, void *, void *) __asm__("ExceptionNative_GetMethodFromStackTrace"); + void QCall_ExceptionNative_ThrowAmbiguousResolutionException (void *, void *, void *, void *) __asm__("ExceptionNative_ThrowAmbiguousResolutionException"); + void QCall_ExceptionNative_ThrowClassAccessException (void *, void *, void *) __asm__("ExceptionNative_ThrowClassAccessException"); + void QCall_ExceptionNative_ThrowEntryPointNotFoundException (void *, void *, void *, void *) __asm__("ExceptionNative_ThrowEntryPointNotFoundException"); + void QCall_ExceptionNative_ThrowFieldAccessException (void *, void *, void *) __asm__("ExceptionNative_ThrowFieldAccessException"); + void QCall_ExceptionNative_ThrowMethodAccessException (void *, void *, void *) __asm__("ExceptionNative_ThrowMethodAccessException"); + void QCall_FileLoadException_GetMessageForHR (int32_t, void *, void *) __asm__("FileLoadException_GetMessageForHR"); + int32_t QCall_FreeEnvironmentStringsW (void *) __asm__("FreeEnvironmentStringsW"); + void * QCall_GCHandle_InternalAllocWithGCTransition (void *, int32_t, void *) __asm__("GCHandle_InternalAllocWithGCTransition"); + void QCall_GCHandle_InternalFreeWithGCTransition (void *, void *) __asm__("GCHandle_InternalFreeWithGCTransition"); + void QCall_GCInterface_AddMemoryPressure (uint64_t, void *) __asm__("GCInterface_AddMemoryPressure"); + void QCall_GCInterface_AllocateNewArray (void *, int32_t, int32_t, void *, void *) __asm__("GCInterface_AllocateNewArray"); + void QCall_GCInterface_Collect (int32_t, int32_t, uint32_t, void *) __asm__("GCInterface_Collect"); + int32_t QCall_GCInterface_EnableNoGCRegionCallback (void *, int64_t, void *) __asm__("GCInterface_EnableNoGCRegionCallback"); + int32_t QCall_GCInterface_EndNoGCRegion (void *) __asm__("GCInterface_EndNoGCRegion"); + void QCall_GCInterface_EnumerateConfigurationValues (void *, void *, void *) __asm__("GCInterface_EnumerateConfigurationValues"); + void * QCall_GCInterface_GetNextFinalizableObject (void *, void *) __asm__("GCInterface_GetNextFinalizableObject"); + int64_t QCall_GCInterface_GetTotalAllocatedBytesPrecise (void *) __asm__("GCInterface_GetTotalAllocatedBytesPrecise"); + int64_t QCall_GCInterface_GetTotalMemory (void *) __asm__("GCInterface_GetTotalMemory"); + void QCall_GCInterface_ReRegisterForFinalize (void *, void *) __asm__("GCInterface_ReRegisterForFinalize"); + int32_t QCall_GCInterface_RefreshMemoryLimit (void *, void *) __asm__("GCInterface_RefreshMemoryLimit"); + void * QCall_GCInterface_RegisterFrozenSegment (void *, void *, void *) __asm__("GCInterface_RegisterFrozenSegment"); + void QCall_GCInterface_RemoveMemoryPressure (uint64_t, void *) __asm__("GCInterface_RemoveMemoryPressure"); + int32_t QCall_GCInterface_StartNoGCRegion (int64_t, int32_t, int64_t, int32_t, void *) __asm__("GCInterface_StartNoGCRegion"); + void QCall_GCInterface_UnregisterFrozenSegment (void *, void *) __asm__("GCInterface_UnregisterFrozenSegment"); + int32_t QCall_GCInterface_WaitForFullGCApproach (int32_t, void *) __asm__("GCInterface_WaitForFullGCApproach"); + int32_t QCall_GCInterface_WaitForFullGCComplete (int32_t, void *) __asm__("GCInterface_WaitForFullGCComplete"); + void QCall_GCInterface_WaitForPendingFinalizers (void *) __asm__("GCInterface_WaitForPendingFinalizers"); + void * QCall_GenericHandleWorker (void *, void *, void *, uint32_t, void *, void *) __asm__("GenericHandleWorker"); + void * QCall_GetCurrentExInfo () __asm__("GetCurrentExInfo"); + void * QCall_GetEnvironmentStringsW () __asm__("GetEnvironmentStringsW"); + uint32_t QCall_GetEnvironmentVariableW (void *, void *, uint32_t) __asm__("GetEnvironmentVariableW"); + void QCall_GetFileLoadExceptionMessage (int32_t, void *, void *) __asm__("GetFileLoadExceptionMessage"); + void QCall_GetTypeLoadExceptionMessage (int32_t, void *, void *) __asm__("GetTypeLoadExceptionMessage"); + void QCall_InitClassHelper (void *, void *) __asm__("InitClassHelper"); + void QCall_Interlocked_MemoryBarrierProcessWide () __asm__("Interlocked_MemoryBarrierProcessWide"); + int32_t QCall_IsInstanceOf_NoCacheLookup (void *, int32_t, void *, void *) __asm__("IsInstanceOf_NoCacheLookup"); + int32_t QCall_LoaderAllocator_Destroy (void *, void *) __asm__("LoaderAllocator_Destroy"); + void QCall_MarshalNative_GetDelegateForFunctionPointerInternal (void *, void *, void *, void *) __asm__("MarshalNative_GetDelegateForFunctionPointerInternal"); + void QCall_MarshalNative_GetExceptionForHR (int32_t, void *, void *, void *) __asm__("MarshalNative_GetExceptionForHR"); + void * QCall_MarshalNative_GetFunctionPointerForDelegateInternal (void *, void *) __asm__("MarshalNative_GetFunctionPointerForDelegateInternal"); + int32_t QCall_MarshalNative_HasLayout (void *, void *, void *, void *) __asm__("MarshalNative_HasLayout"); + void * QCall_MarshalNative_OffsetOf (void *, void *) __asm__("MarshalNative_OffsetOf"); + void QCall_MarshalNative_Prelink (void *, void *) __asm__("MarshalNative_Prelink"); + int32_t QCall_MarshalNative_SizeOfHelper (void *, int32_t, void *) __asm__("MarshalNative_SizeOfHelper"); + int32_t QCall_MdUtf8String_EqualsCaseInsensitive (void *, void *, int32_t, void *) __asm__("MdUtf8String_EqualsCaseInsensitive"); + void QCall_MetadataImport_Enum (void *, int32_t, int32_t, void *, void *, void *, void *) __asm__("MetadataImport_Enum"); + int32_t QCall_MetadataImport_GetMarshalAs (void *, int32_t, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *) __asm__("MetadataImport_GetMarshalAs"); + void * QCall_MethodBase_GetCurrentMethod (void *, void *) __asm__("MethodBase_GetCurrentMethod"); + int32_t QCall_MethodTable_CanCompareBitsOrUseFastGetHashCode (void *, void *) __asm__("MethodTable_CanCompareBitsOrUseFastGetHashCode"); + int32_t QCall_ModuleBuilder_GetArrayMethodToken (void *, int32_t, void *, void *, int32_t, void *) __asm__("ModuleBuilder_GetArrayMethodToken"); + int32_t QCall_ModuleBuilder_GetMemberRef (void *, void *, int32_t, int32_t, void *) __asm__("ModuleBuilder_GetMemberRef"); + int32_t QCall_ModuleBuilder_GetMemberRefFromSignature (void *, int32_t, void *, void *, int32_t, void *) __asm__("ModuleBuilder_GetMemberRefFromSignature"); + int32_t QCall_ModuleBuilder_GetMemberRefOfFieldInfo (void *, int32_t, void *, int32_t, void *) __asm__("ModuleBuilder_GetMemberRefOfFieldInfo"); + int32_t QCall_ModuleBuilder_GetMemberRefOfMethodInfo (void *, int32_t, void *, void *) __asm__("ModuleBuilder_GetMemberRefOfMethodInfo"); + int32_t QCall_ModuleBuilder_GetStringConstant (void *, void *, int32_t, void *) __asm__("ModuleBuilder_GetStringConstant"); + int32_t QCall_ModuleBuilder_GetTokenFromTypeSpec (void *, void *, int32_t, void *) __asm__("ModuleBuilder_GetTokenFromTypeSpec"); + int32_t QCall_ModuleBuilder_GetTypeRef (void *, void *, void *, int32_t, void *) __asm__("ModuleBuilder_GetTypeRef"); + void QCall_ModuleBuilder_SetFieldRVAContent (void *, int32_t, void *, int32_t, void *) __asm__("ModuleBuilder_SetFieldRVAContent"); + void QCall_ModuleHandle_GetDynamicMethod (void *, void *, void *, int32_t, void *, int32_t, void *, void *) __asm__("ModuleHandle_GetDynamicMethod"); + int32_t QCall_ModuleHandle_GetMDStreamVersion (void *) __asm__("ModuleHandle_GetMDStreamVersion"); + void QCall_ModuleHandle_GetModuleType (void *, void *, void *) __asm__("ModuleHandle_GetModuleType"); + void QCall_ModuleHandle_GetPEKind (void *, void *, void *, void *) __asm__("ModuleHandle_GetPEKind"); + int32_t QCall_ModuleHandle_GetToken (void *) __asm__("ModuleHandle_GetToken"); + void QCall_ModuleHandle_ResolveField (void *, int32_t, void *, int32_t, void *, int32_t, void *, void *) __asm__("ModuleHandle_ResolveField"); + void * QCall_ModuleHandle_ResolveMethod (void *, int32_t, void *, int32_t, void *, int32_t, void *) __asm__("ModuleHandle_ResolveMethod"); + void QCall_ModuleHandle_ResolveType (void *, int32_t, void *, int32_t, void *, int32_t, void *, void *) __asm__("ModuleHandle_ResolveType"); + void * QCall_NativeLibrary_LoadByName (void *, void *, int32_t, uint32_t, int32_t, void *) __asm__("NativeLibrary_LoadByName"); + void QCall_NativeRuntimeEventSource_LogContentionLockCreated (void *, void *, uint32_t, void *) __asm__("NativeRuntimeEventSource_LogContentionLockCreated"); + void QCall_NativeRuntimeEventSource_LogContentionStart (uint32_t, uint32_t, void *, void *, uint64_t, void *) __asm__("NativeRuntimeEventSource_LogContentionStart"); + void QCall_NativeRuntimeEventSource_LogContentionStop (uint32_t, uint32_t, double, void *) __asm__("NativeRuntimeEventSource_LogContentionStop"); + void QCall_NativeRuntimeEventSource_LogThreadPoolIODequeue (void *, void *, uint32_t, void *) __asm__("NativeRuntimeEventSource_LogThreadPoolIODequeue"); + void QCall_NativeRuntimeEventSource_LogThreadPoolIOEnqueue (void *, void *, int32_t, uint32_t, void *) __asm__("NativeRuntimeEventSource_LogThreadPoolIOEnqueue"); + void QCall_NativeRuntimeEventSource_LogThreadPoolIOPack (void *, void *, uint32_t, void *) __asm__("NativeRuntimeEventSource_LogThreadPoolIOPack"); + void QCall_NativeRuntimeEventSource_LogThreadPoolMinMaxThreads (uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, void *) __asm__("NativeRuntimeEventSource_LogThreadPoolMinMaxThreads"); + void QCall_NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentAdjustment (double, uint32_t, uint32_t, uint32_t, void *) __asm__("NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentAdjustment"); + void QCall_NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentSample (double, uint32_t, void *) __asm__("NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentSample"); + void QCall_NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentStats (double, double, double, double, double, double, double, double, double, uint32_t, uint32_t, void *) __asm__("NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentStats"); + void QCall_NativeRuntimeEventSource_LogThreadPoolWorkerThreadStart (uint32_t, uint32_t, uint32_t, void *) __asm__("NativeRuntimeEventSource_LogThreadPoolWorkerThreadStart"); + void QCall_NativeRuntimeEventSource_LogThreadPoolWorkerThreadStop (uint32_t, uint32_t, uint32_t, void *) __asm__("NativeRuntimeEventSource_LogThreadPoolWorkerThreadStop"); + void QCall_NativeRuntimeEventSource_LogThreadPoolWorkerThreadWait (uint32_t, uint32_t, uint32_t, void *) __asm__("NativeRuntimeEventSource_LogThreadPoolWorkerThreadWait"); + void QCall_NativeRuntimeEventSource_LogThreadPoolWorkingThreadCount (uint32_t, uint32_t, void *) __asm__("NativeRuntimeEventSource_LogThreadPoolWorkingThreadCount"); + void QCall_NativeRuntimeEventSource_LogWaitHandleWaitStart (uint32_t, void *, uint32_t, void *) __asm__("NativeRuntimeEventSource_LogWaitHandleWaitStart"); + void QCall_NativeRuntimeEventSource_LogWaitHandleWaitStop (uint32_t, void *) __asm__("NativeRuntimeEventSource_LogWaitHandleWaitStop"); + void QCall_ObjectHeader_GetOrCreateLockObject (void *, void *, void *) __asm__("ObjectHeader_GetOrCreateLockObject"); + void QCall_ObjectNative_AllocateUninitializedClone (void *, void *) __asm__("ObjectNative_AllocateUninitializedClone"); + int32_t QCall_ObjectNative_GetHashCodeSlow (void *, void *) __asm__("ObjectNative_GetHashCodeSlow"); + void * QCall_QCall_FreeGCHandleForTypeHandle (void *, void *, void *) __asm__("QCall_FreeGCHandleForTypeHandle"); + void * QCall_QCall_GetGCHandleForTypeHandle (void *, int32_t, void *) __asm__("QCall_GetGCHandleForTypeHandle"); + void QCall_ReflectionInvocation_CompileMethod (void *, void *) __asm__("ReflectionInvocation_CompileMethod"); + void QCall_ReflectionInvocation_GetBoxInfo (void *, void *, void *, void *, void *, void *) __asm__("ReflectionInvocation_GetBoxInfo"); + void QCall_ReflectionInvocation_GetGuid (void *, void *, void *) __asm__("ReflectionInvocation_GetGuid"); + void QCall_ReflectionInvocation_PrepareDelegate (void *, void *) __asm__("ReflectionInvocation_PrepareDelegate"); + void QCall_ReflectionInvocation_PrepareMethod (void *, void *, int32_t, void *) __asm__("ReflectionInvocation_PrepareMethod"); + void QCall_ReflectionInvocation_RunClassConstructor (void *, void *) __asm__("ReflectionInvocation_RunClassConstructor"); + void QCall_ReflectionInvocation_RunModuleConstructor (void *, void *) __asm__("ReflectionInvocation_RunModuleConstructor"); + int32_t QCall_ReflectionInvocation_SizeOf (void *) __asm__("ReflectionInvocation_SizeOf"); + void QCall_ReflectionSerialization_GetCreateUninitializedObjectInfo (void *, void *, void *, void *) __asm__("ReflectionSerialization_GetCreateUninitializedObjectInfo"); + void * QCall_ResolveVirtualFunctionPointer (void *, void *, void *, void *) __asm__("ResolveVirtualFunctionPointer"); + void * QCall_RuntimeFieldHandle_GetEnCFieldAddr (void *, void *, void *) __asm__("RuntimeFieldHandle_GetEnCFieldAddr"); + void QCall_RuntimeFieldHandle_GetFieldDataReference (void *, void *, void *, void *) __asm__("RuntimeFieldHandle_GetFieldDataReference"); + int32_t QCall_RuntimeFieldHandle_GetRVAFieldInfo (void *, void *, void *, void *) __asm__("RuntimeFieldHandle_GetRVAFieldInfo"); + void QCall_RuntimeFieldHandle_GetValue (void *, void *, void *, void *, void *, void *, void *) __asm__("RuntimeFieldHandle_GetValue"); + void QCall_RuntimeFieldHandle_GetValueDirect (void *, void *, void *, void *, void *, void *) __asm__("RuntimeFieldHandle_GetValueDirect"); + void QCall_RuntimeFieldHandle_SetValue (void *, void *, void *, void *, void *, void *, void *) __asm__("RuntimeFieldHandle_SetValue"); + void QCall_RuntimeFieldHandle_SetValueDirect (void *, void *, void *, void *, void *, void *) __asm__("RuntimeFieldHandle_SetValueDirect"); + void QCall_RuntimeMethodHandle_ConstructInstantiation (void *, int32_t, void *, void *) __asm__("RuntimeMethodHandle_ConstructInstantiation"); + void QCall_RuntimeMethodHandle_Destroy (void *, void *) __asm__("RuntimeMethodHandle_Destroy"); + void * QCall_RuntimeMethodHandle_GetFunctionPointer (void *, void *) __asm__("RuntimeMethodHandle_GetFunctionPointer"); + void QCall_RuntimeMethodHandle_GetMethodBody (void *, void *, void *, void *) __asm__("RuntimeMethodHandle_GetMethodBody"); + void QCall_RuntimeMethodHandle_GetMethodInstantiation (void *, void *, int32_t, void *) __asm__("RuntimeMethodHandle_GetMethodInstantiation"); + void * QCall_RuntimeMethodHandle_GetStubIfNeededSlow (void *, void *, void *, void *) __asm__("RuntimeMethodHandle_GetStubIfNeededSlow"); + void QCall_RuntimeMethodHandle_GetTypicalMethodDefinition (void *, void *, void *) __asm__("RuntimeMethodHandle_GetTypicalMethodDefinition"); + void * QCall_RuntimeMethodHandle_GetVirtualFunctionPointer (void *, void *, void *, void *) __asm__("RuntimeMethodHandle_GetVirtualFunctionPointer"); + int32_t QCall_RuntimeMethodHandle_IsCAVisibleFromDecoratedType (void *, void *, void *, void *, void *) __asm__("RuntimeMethodHandle_IsCAVisibleFromDecoratedType"); + void QCall_RuntimeMethodHandle_StripMethodInstantiation (void *, void *, void *) __asm__("RuntimeMethodHandle_StripMethodInstantiation"); + void QCall_RuntimeModule_GetFullyQualifiedName (void *, void *, void *) __asm__("RuntimeModule_GetFullyQualifiedName"); + void QCall_RuntimeModule_GetScopeName (void *, void *, void *) __asm__("RuntimeModule_GetScopeName"); + void QCall_RuntimeModule_GetTypes (void *, void *, void *, void *) __asm__("RuntimeModule_GetTypes"); + void * QCall_RuntimeTypeHandle_AllocateTypeAssociatedMemory (void *, uint32_t, void *) __asm__("RuntimeTypeHandle_AllocateTypeAssociatedMemory"); + void * QCall_RuntimeTypeHandle_AllocateTypeAssociatedMemoryAligned (void *, uint32_t, uint32_t, void *) __asm__("RuntimeTypeHandle_AllocateTypeAssociatedMemoryAligned"); + void QCall_RuntimeTypeHandle_ConstructName (void *, int32_t, void *, void *) __asm__("RuntimeTypeHandle_ConstructName"); + void QCall_RuntimeTypeHandle_CreateInstanceForAnotherGenericParameter (void *, void *, int32_t, void *, void *) __asm__("RuntimeTypeHandle_CreateInstanceForAnotherGenericParameter"); + void QCall_RuntimeTypeHandle_GetActivationInfo (void *, void *, void *, void *, void *, void *, void *) __asm__("RuntimeTypeHandle_GetActivationInfo"); + void QCall_RuntimeTypeHandle_GetArgumentTypesFromFunctionPointer (void *, void *, void *) __asm__("RuntimeTypeHandle_GetArgumentTypesFromFunctionPointer"); + void QCall_RuntimeTypeHandle_GetAssemblySlow (void *, void *, void *) __asm__("RuntimeTypeHandle_GetAssemblySlow"); + void QCall_RuntimeTypeHandle_GetConstraints (void *, void *, void *) __asm__("RuntimeTypeHandle_GetConstraints"); + void QCall_RuntimeTypeHandle_GetDeclaringMethodForGenericParameter (void *, void *, void *) __asm__("RuntimeTypeHandle_GetDeclaringMethodForGenericParameter"); + void * QCall_RuntimeTypeHandle_GetDeclaringTypeHandle (void *, void *) __asm__("RuntimeTypeHandle_GetDeclaringTypeHandle"); + void * QCall_RuntimeTypeHandle_GetDeclaringTypeHandleForGenericVariable (void *, void *) __asm__("RuntimeTypeHandle_GetDeclaringTypeHandleForGenericVariable"); + int32_t QCall_RuntimeTypeHandle_GetFields (void *, void *, void *, void *) __asm__("RuntimeTypeHandle_GetFields"); + void QCall_RuntimeTypeHandle_GetGenericTypeDefinition (void *, void *, void *) __asm__("RuntimeTypeHandle_GetGenericTypeDefinition"); + void QCall_RuntimeTypeHandle_GetInstantiation (void *, void *, int32_t, void *) __asm__("RuntimeTypeHandle_GetInstantiation"); + void * QCall_RuntimeTypeHandle_GetInterfaceMethodImplementation (void *, void *, void *, void *) __asm__("RuntimeTypeHandle_GetInterfaceMethodImplementation"); + void QCall_RuntimeTypeHandle_GetInterfaces (void *, void *, void *) __asm__("RuntimeTypeHandle_GetInterfaces"); + void * QCall_RuntimeTypeHandle_GetMethodAt (void *, int32_t, void *) __asm__("RuntimeTypeHandle_GetMethodAt"); + void QCall_RuntimeTypeHandle_GetModuleSlow (void *, void *, void *) __asm__("RuntimeTypeHandle_GetModuleSlow"); + int32_t QCall_RuntimeTypeHandle_GetNumVirtualsAndStaticVirtuals (void *, void *) __asm__("RuntimeTypeHandle_GetNumVirtualsAndStaticVirtuals"); + void QCall_RuntimeTypeHandle_GetRuntimeTypeFromHandleSlow (void *, void *, void *) __asm__("RuntimeTypeHandle_GetRuntimeTypeFromHandleSlow"); + void QCall_RuntimeTypeHandle_Instantiate (void *, void *, int32_t, void *, void *) __asm__("RuntimeTypeHandle_Instantiate"); + void QCall_RuntimeTypeHandle_InternalAlloc (void *, void *, void *) __asm__("RuntimeTypeHandle_InternalAlloc"); + void QCall_RuntimeTypeHandle_InternalAllocNoChecks (void *, void *, void *) __asm__("RuntimeTypeHandle_InternalAllocNoChecks"); + int32_t QCall_RuntimeTypeHandle_IsVisible (void *, void *) __asm__("RuntimeTypeHandle_IsVisible"); + void QCall_RuntimeTypeHandle_MakeArray (void *, int32_t, void *, void *) __asm__("RuntimeTypeHandle_MakeArray"); + void QCall_RuntimeTypeHandle_MakeByRef (void *, void *, void *) __asm__("RuntimeTypeHandle_MakeByRef"); + void QCall_RuntimeTypeHandle_MakeFunctionPointer (void *, int32_t, int32_t, void *, void *) __asm__("RuntimeTypeHandle_MakeFunctionPointer"); + void QCall_RuntimeTypeHandle_MakePointer (void *, void *, void *) __asm__("RuntimeTypeHandle_MakePointer"); + void QCall_RuntimeTypeHandle_MakeSZArray (void *, void *, void *) __asm__("RuntimeTypeHandle_MakeSZArray"); + void QCall_RuntimeTypeHandle_RegisterCollectibleTypeDependency (void *, void *, void *) __asm__("RuntimeTypeHandle_RegisterCollectibleTypeDependency"); + int32_t QCall_RuntimeTypeHandle_SatisfiesConstraints (void *, void *, void *, void *, void *) __asm__("RuntimeTypeHandle_SatisfiesConstraints"); + void QCall_RuntimeTypeHandle_VerifyInterfaceIsImplemented (void *, void *, void *) __asm__("RuntimeTypeHandle_VerifyInterfaceIsImplemented"); + int32_t QCall_SetEnvironmentVariableW (void *, void *) __asm__("SetEnvironmentVariableW"); + uint32_t QCall_SfiInit (void *, void *, uint32_t, void *, void *) __asm__("SfiInit"); + uint32_t QCall_SfiNext (void *, void *, void *, void *, void *) __asm__("SfiNext"); + int32_t QCall_Signature_AreEqual (void *, int32_t, void *, void *, int32_t, void *, void *) __asm__("Signature_AreEqual"); + void QCall_Signature_GetCustomModifiersAtOffset (void *, int32_t, int32_t, void *, void *) __asm__("Signature_GetCustomModifiersAtOffset"); + void QCall_Signature_Init (void *, void *, int32_t, void *, void *, void *) __asm__("Signature_Init"); + void QCall_StackTrace_GetStackFramesInternal (void *, int32_t, void *, void *) __asm__("StackTrace_GetStackFramesInternal"); + int32_t QCall_Stream_HasOverriddenSlow (void *, int32_t, void *) __asm__("Stream_HasOverriddenSlow"); + void QCall_String_Intern (void *, void *) __asm__("String_Intern"); + void QCall_String_IsInterned (void *, void *) __asm__("String_IsInterned"); + void QCall_StubHelpers_CreateCustomMarshaler (void *, int32_t, void *, void *, void *) __asm__("StubHelpers_CreateCustomMarshaler"); + void QCall_StubHelpers_CreateLayoutClassMarshalStubs (void *, void *, void *, void *, void *) __asm__("StubHelpers_CreateLayoutClassMarshalStubs"); + void QCall_StubHelpers_MulticastDebuggerTraceHelper (void *, int32_t, void *) __asm__("StubHelpers_MulticastDebuggerTraceHelper"); + void QCall_StubHelpers_ThrowInteropException (int32_t, int32_t, void *) __asm__("StubHelpers_ThrowInteropException"); + void QCall_StubHelpers_ThrowInteropParamException (int32_t, int32_t, void *) __asm__("StubHelpers_ThrowInteropParamException"); + void QCall_StubHelpers_ValidateByref (void *, void *, void *) __asm__("StubHelpers_ValidateByref"); + void QCall_StubHelpers_ValidateObject (void *, void *, void *) __asm__("StubHelpers_ValidateObject"); + void QCall_SystemJS_MarkAsyncMain () __asm__("SystemJS_MarkAsyncMain"); + void QCall_SystemJS_RejectMainPromise (void *, int32_t, void *, int32_t) __asm__("SystemJS_RejectMainPromise"); + void QCall_SystemJS_ResolveMainPromise (int32_t) __asm__("SystemJS_ResolveMainPromise"); + void QCall_SystemJS_ScheduleBackgroundJob () __asm__("SystemJS_ScheduleBackgroundJob"); + void QCall_SystemJS_ScheduleTimer (int32_t) __asm__("SystemJS_ScheduleTimer"); + void * QCall_TailCallHelp_AllocTailCallArgBufferInternal (int32_t, void *) __asm__("TailCallHelp_AllocTailCallArgBufferInternal"); + void QCall_ThreadNative_Abort (void *, void *) __asm__("ThreadNative_Abort"); + void QCall_ThreadNative_GetQCallSpecialException (void *, void *, void *) __asm__("ThreadNative_GetQCallSpecialException"); + int32_t QCall_ThreadNative_GetThreadState (void *) __asm__("ThreadNative_GetThreadState"); + void QCall_ThreadNative_ResetAbort () __asm__("ThreadNative_ResetAbort"); + void QCall_ThrowInvalidCastException (void *, void *, void *) __asm__("ThrowInvalidCastException"); + void QCall_TypeBuilder_AddInterfaceImpl (void *, int32_t, int32_t, void *) __asm__("TypeBuilder_AddInterfaceImpl"); + void QCall_TypeBuilder_DefineCustomAttribute (void *, int32_t, int32_t, void *, int32_t, void *) __asm__("TypeBuilder_DefineCustomAttribute"); + int32_t QCall_TypeBuilder_DefineEvent (void *, int32_t, void *, int32_t, int32_t, void *) __asm__("TypeBuilder_DefineEvent"); + int32_t QCall_TypeBuilder_DefineField (void *, int32_t, void *, void *, int32_t, int32_t, void *) __asm__("TypeBuilder_DefineField"); + int32_t QCall_TypeBuilder_DefineGenericParam (void *, void *, int32_t, int32_t, int32_t, void *, void *) __asm__("TypeBuilder_DefineGenericParam"); + int32_t QCall_TypeBuilder_DefineMethod (void *, int32_t, void *, void *, int32_t, int32_t, void *) __asm__("TypeBuilder_DefineMethod"); + void QCall_TypeBuilder_DefineMethodImpl (void *, int32_t, int32_t, int32_t, void *) __asm__("TypeBuilder_DefineMethodImpl"); + void QCall_TypeBuilder_DefineMethodSemantics (void *, int32_t, int32_t, int32_t, void *) __asm__("TypeBuilder_DefineMethodSemantics"); + int32_t QCall_TypeBuilder_DefineMethodSpec (void *, int32_t, void *, int32_t, void *) __asm__("TypeBuilder_DefineMethodSpec"); + int32_t QCall_TypeBuilder_DefineProperty (void *, int32_t, void *, int32_t, void *, int32_t, void *) __asm__("TypeBuilder_DefineProperty"); + int32_t QCall_TypeBuilder_DefineType (void *, void *, int32_t, int32_t, int32_t, void *, void *) __asm__("TypeBuilder_DefineType"); + int32_t QCall_TypeBuilder_GetTokenFromSig (void *, void *, int32_t, void *) __asm__("TypeBuilder_GetTokenFromSig"); + void QCall_TypeBuilder_SetClassLayout (void *, int32_t, int32_t, int32_t, void *) __asm__("TypeBuilder_SetClassLayout"); + void QCall_TypeBuilder_SetConstantValue (void *, int32_t, int32_t, void *, void *) __asm__("TypeBuilder_SetConstantValue"); + void QCall_TypeBuilder_SetFieldLayoutOffset (void *, int32_t, int32_t, void *) __asm__("TypeBuilder_SetFieldLayoutOffset"); + void QCall_TypeBuilder_SetMethodIL (void *, int32_t, int32_t, void *, int32_t, void *, int32_t, int32_t, void *, int32_t, void *) __asm__("TypeBuilder_SetMethodIL"); + void QCall_TypeBuilder_SetMethodImpl (void *, int32_t, int32_t, void *) __asm__("TypeBuilder_SetMethodImpl"); + void QCall_TypeBuilder_SetPInvokeData (void *, void *, void *, int32_t, int32_t, void *) __asm__("TypeBuilder_SetPInvokeData"); + int32_t QCall_TypeBuilder_SetParamInfo (void *, int32_t, int32_t, int32_t, void *, void *) __asm__("TypeBuilder_SetParamInfo"); + void QCall_TypeBuilder_SetParentType (void *, int32_t, int32_t, void *) __asm__("TypeBuilder_SetParentType"); + void QCall_TypeBuilder_TermCreateClass (void *, int32_t, void *, void *) __asm__("TypeBuilder_TermCreateClass"); + int32_t QCall_TypeHandle_CanCastTo_NoCacheLookup (void *, void *, void *) __asm__("TypeHandle_CanCastTo_NoCacheLookup"); + int32_t QCall_TypeHandle_GetCorElementType (void *) __asm__("TypeHandle_GetCorElementType"); + void * QCall_TypeMapLazyDictionary_FindPrecachedExternalTypeMapEntry (void *, void *, void *, void *) __asm__("TypeMapLazyDictionary_FindPrecachedExternalTypeMapEntry"); + void * QCall_TypeMapLazyDictionary_FindPrecachedProxyTypeMapEntry (void *, void *, void *, void *) __asm__("TypeMapLazyDictionary_FindPrecachedProxyTypeMapEntry"); + void QCall_TypeMapLazyDictionary_ProcessAttributes (void *, void *, void *, void *, void *, void *, void *, void *) __asm__("TypeMapLazyDictionary_ProcessAttributes"); + void * QCall_UnsafeAccessors_ResolveGenericParamToTypeHandle (void *, int32_t, uint32_t, void *) __asm__("UnsafeAccessors_ResolveGenericParamToTypeHandle"); + int32_t QCall_ValueType_GetHashCodeStrategy (void *, void *, void *, void *, void *, void *) __asm__("ValueType_GetHashCodeStrategy"); + int32_t QCall_VersionResilientHashCode_TypeHashCode (void *, void *) __asm__("VersionResilientHashCode_TypeHashCode"); + void* QCall_memmove(void* dest, const void* src, size_t len); + void* QCall_memset(void* dest, int value, size_t len); +} // extern "C" + +static const Entry s_QCall[] = { + { "AppContext_SetFirstChanceExceptionHandler", (void*)&QCall_AppContext_SetFirstChanceExceptionHandler }, + { "AppContext_TryGetHostPropertyValue", (void*)&QCall_AppContext_TryGetHostPropertyValue }, + { "AppDomain_CreateDynamicAssembly", (void*)&QCall_AppDomain_CreateDynamicAssembly }, + { "AppendExceptionStackFrame", (void*)&QCall_AppendExceptionStackFrame }, + { "Array_CreateInstance", (void*)&QCall_Array_CreateInstance }, + { "Array_Ctor", (void*)&QCall_Array_Ctor }, + { "Array_GetElementConstructorEntrypoint", (void*)&QCall_Array_GetElementConstructorEntrypoint }, + { "AssemblyHandle_GetManifestModuleSlow", (void*)&QCall_AssemblyHandle_GetManifestModuleSlow }, + { "AssemblyName_InitializeAssemblySpec", (void*)&QCall_AssemblyName_InitializeAssemblySpec }, + { "AssemblyNative_ApplyUpdate", (void*)&QCall_AssemblyNative_ApplyUpdate }, + { "AssemblyNative_GetCodeBase", (void*)&QCall_AssemblyNative_GetCodeBase }, + { "AssemblyNative_GetEntryAssembly", (void*)&QCall_AssemblyNative_GetEntryAssembly }, + { "AssemblyNative_GetEntryPoint", (void*)&QCall_AssemblyNative_GetEntryPoint }, + { "AssemblyNative_GetExecutingAssembly", (void*)&QCall_AssemblyNative_GetExecutingAssembly }, + { "AssemblyNative_GetExportedTypes", (void*)&QCall_AssemblyNative_GetExportedTypes }, + { "AssemblyNative_GetFlags", (void*)&QCall_AssemblyNative_GetFlags }, + { "AssemblyNative_GetForwardedType", (void*)&QCall_AssemblyNative_GetForwardedType }, + { "AssemblyNative_GetFullName", (void*)&QCall_AssemblyNative_GetFullName }, + { "AssemblyNative_GetHashAlgorithm", (void*)&QCall_AssemblyNative_GetHashAlgorithm }, + { "AssemblyNative_GetImageRuntimeVersion", (void*)&QCall_AssemblyNative_GetImageRuntimeVersion }, + { "AssemblyNative_GetLoadContextForAssembly", (void*)&QCall_AssemblyNative_GetLoadContextForAssembly }, + { "AssemblyNative_GetLoadedAssemblies", (void*)&QCall_AssemblyNative_GetLoadedAssemblies }, + { "AssemblyNative_GetLocale", (void*)&QCall_AssemblyNative_GetLocale }, + { "AssemblyNative_GetLocation", (void*)&QCall_AssemblyNative_GetLocation }, + { "AssemblyNative_GetManifestResourceInfo", (void*)&QCall_AssemblyNative_GetManifestResourceInfo }, + { "AssemblyNative_GetManifestResourceNames", (void*)&QCall_AssemblyNative_GetManifestResourceNames }, + { "AssemblyNative_GetModule", (void*)&QCall_AssemblyNative_GetModule }, + { "AssemblyNative_GetModules", (void*)&QCall_AssemblyNative_GetModules }, + { "AssemblyNative_GetPublicKey", (void*)&QCall_AssemblyNative_GetPublicKey }, + { "AssemblyNative_GetReferencedAssemblies", (void*)&QCall_AssemblyNative_GetReferencedAssemblies }, + { "AssemblyNative_GetResource", (void*)&QCall_AssemblyNative_GetResource }, + { "AssemblyNative_GetSimpleName", (void*)&QCall_AssemblyNative_GetSimpleName }, + { "AssemblyNative_GetTypeCore", (void*)&QCall_AssemblyNative_GetTypeCore }, + { "AssemblyNative_GetTypeCoreIgnoreCase", (void*)&QCall_AssemblyNative_GetTypeCoreIgnoreCase }, + { "AssemblyNative_GetVersion", (void*)&QCall_AssemblyNative_GetVersion }, + { "AssemblyNative_InitializeAssemblyLoadContext", (void*)&QCall_AssemblyNative_InitializeAssemblyLoadContext }, + { "AssemblyNative_InternalLoad", (void*)&QCall_AssemblyNative_InternalLoad }, + { "AssemblyNative_InternalTryGetRawMetadata", (void*)&QCall_AssemblyNative_InternalTryGetRawMetadata }, + { "AssemblyNative_IsApplyUpdateSupported", (void*)&QCall_AssemblyNative_IsApplyUpdateSupported }, + { "AssemblyNative_LoadFromPath", (void*)&QCall_AssemblyNative_LoadFromPath }, + { "AssemblyNative_LoadFromStream", (void*)&QCall_AssemblyNative_LoadFromStream }, + { "AssemblyNative_PrepareForAssemblyLoadContextRelease", (void*)&QCall_AssemblyNative_PrepareForAssemblyLoadContextRelease }, + { "AssemblyNative_TraceAssemblyLoadFromResolveHandlerInvoked", (void*)&QCall_AssemblyNative_TraceAssemblyLoadFromResolveHandlerInvoked }, + { "AssemblyNative_TraceAssemblyResolveHandlerInvoked", (void*)&QCall_AssemblyNative_TraceAssemblyResolveHandlerInvoked }, + { "AssemblyNative_TraceResolvingHandlerInvoked", (void*)&QCall_AssemblyNative_TraceResolvingHandlerInvoked }, + { "AsyncHelpers_AddContinuationToExInternal", (void*)&QCall_AsyncHelpers_AddContinuationToExInternal }, + { "CallFilterFunclet", (void*)&QCall_CallFilterFunclet }, + { "CustomAttribute_ParseAttributeUsageAttribute", (void*)&QCall_CustomAttribute_ParseAttributeUsageAttribute }, + { "DebugDebugger_Break", (void*)&QCall_DebugDebugger_Break }, + { "DebugDebugger_CustomNotification", (void*)&QCall_DebugDebugger_CustomNotification }, + { "DebugDebugger_GetFuncEvalArgumentType", (void*)&QCall_DebugDebugger_GetFuncEvalArgumentType }, + { "DebugDebugger_GetFuncEvalMethod", (void*)&QCall_DebugDebugger_GetFuncEvalMethod }, + { "DebugDebugger_IsLoggingHelper", (void*)&QCall_DebugDebugger_IsLoggingHelper }, + { "DebugDebugger_IsManagedDebuggerAttached", (void*)&QCall_DebugDebugger_IsManagedDebuggerAttached }, + { "DebugDebugger_Launch", (void*)&QCall_DebugDebugger_Launch }, + { "DebugDebugger_Log", (void*)&QCall_DebugDebugger_Log }, + { "DebugDebugger_PrepareFuncEvalResult", (void*)&QCall_DebugDebugger_PrepareFuncEvalResult }, + { "DebugDebugger_ReadFuncEvalPrimitiveRegister", (void*)&QCall_DebugDebugger_ReadFuncEvalPrimitiveRegister }, + { "DebugDebugger_WriteFuncEvalObjectRegister", (void*)&QCall_DebugDebugger_WriteFuncEvalObjectRegister }, + { "DebugDebugger_WriteFuncEvalRegister", (void*)&QCall_DebugDebugger_WriteFuncEvalRegister }, + { "Delegate_AdjustTarget", (void*)&QCall_Delegate_AdjustTarget }, + { "Delegate_BindToMethodInfo", (void*)&QCall_Delegate_BindToMethodInfo }, + { "Delegate_BindToMethodName", (void*)&QCall_Delegate_BindToMethodName }, + { "Delegate_Construct", (void*)&QCall_Delegate_Construct }, + { "Delegate_CreateMethodInfo", (void*)&QCall_Delegate_CreateMethodInfo }, + { "Delegate_GetMethodDesc", (void*)&QCall_Delegate_GetMethodDesc }, + { "Delegate_GetMulticastInvokeSlow", (void*)&QCall_Delegate_GetMulticastInvokeSlow }, + { "Delegate_InitializeVirtualCallStub", (void*)&QCall_Delegate_InitializeVirtualCallStub }, + { "DependentHandle_InternalAllocWithGCTransition", (void*)&QCall_DependentHandle_InternalAllocWithGCTransition }, + { "DependentHandle_InternalFreeWithGCTransition", (void*)&QCall_DependentHandle_InternalFreeWithGCTransition }, + { "EHEnumInitFromStackFrameIterator", (void*)&QCall_EHEnumInitFromStackFrameIterator }, + { "EHEnumNext", (void*)&QCall_EHEnumNext }, + { "Enum_GetValuesAndNames", (void*)&QCall_Enum_GetValuesAndNames }, + { "Environment_Exit", (void*)&QCall_Environment_Exit }, + { "Environment_FailFast", (void*)&QCall_Environment_FailFast }, + { "EventPipeInternal_CreateProvider", (void*)&QCall_EventPipeInternal_CreateProvider }, + { "EventPipeInternal_DefineEvent", (void*)&QCall_EventPipeInternal_DefineEvent }, + { "EventPipeInternal_DeleteProvider", (void*)&QCall_EventPipeInternal_DeleteProvider }, + { "EventPipeInternal_Disable", (void*)&QCall_EventPipeInternal_Disable }, + { "EventPipeInternal_Enable", (void*)&QCall_EventPipeInternal_Enable }, + { "EventPipeInternal_GetNextEvent", (void*)&QCall_EventPipeInternal_GetNextEvent }, + { "EventPipeInternal_GetProvider", (void*)&QCall_EventPipeInternal_GetProvider }, + { "EventPipeInternal_GetSessionInfo", (void*)&QCall_EventPipeInternal_GetSessionInfo }, + { "EventPipeInternal_SignalSession", (void*)&QCall_EventPipeInternal_SignalSession }, + { "EventPipeInternal_WriteEventData", (void*)&QCall_EventPipeInternal_WriteEventData }, + { "ExceptionNative_GetFrozenStackTrace", (void*)&QCall_ExceptionNative_GetFrozenStackTrace }, + { "ExceptionNative_GetMessageFromNativeResources", (void*)&QCall_ExceptionNative_GetMessageFromNativeResources }, + { "ExceptionNative_GetMethodFromStackTrace", (void*)&QCall_ExceptionNative_GetMethodFromStackTrace }, + { "ExceptionNative_ThrowAmbiguousResolutionException", (void*)&QCall_ExceptionNative_ThrowAmbiguousResolutionException }, + { "ExceptionNative_ThrowClassAccessException", (void*)&QCall_ExceptionNative_ThrowClassAccessException }, + { "ExceptionNative_ThrowEntryPointNotFoundException", (void*)&QCall_ExceptionNative_ThrowEntryPointNotFoundException }, + { "ExceptionNative_ThrowFieldAccessException", (void*)&QCall_ExceptionNative_ThrowFieldAccessException }, + { "ExceptionNative_ThrowMethodAccessException", (void*)&QCall_ExceptionNative_ThrowMethodAccessException }, + { "FileLoadException_GetMessageForHR", (void*)&QCall_FileLoadException_GetMessageForHR }, + { "FreeEnvironmentStringsW", (void*)&QCall_FreeEnvironmentStringsW }, + { "GCHandle_InternalAllocWithGCTransition", (void*)&QCall_GCHandle_InternalAllocWithGCTransition }, + { "GCHandle_InternalFreeWithGCTransition", (void*)&QCall_GCHandle_InternalFreeWithGCTransition }, + { "GCInterface_AddMemoryPressure", (void*)&QCall_GCInterface_AddMemoryPressure }, + { "GCInterface_AllocateNewArray", (void*)&QCall_GCInterface_AllocateNewArray }, + { "GCInterface_Collect", (void*)&QCall_GCInterface_Collect }, + { "GCInterface_EnableNoGCRegionCallback", (void*)&QCall_GCInterface_EnableNoGCRegionCallback }, + { "GCInterface_EndNoGCRegion", (void*)&QCall_GCInterface_EndNoGCRegion }, + { "GCInterface_EnumerateConfigurationValues", (void*)&QCall_GCInterface_EnumerateConfigurationValues }, + { "GCInterface_GetNextFinalizableObject", (void*)&QCall_GCInterface_GetNextFinalizableObject }, + { "GCInterface_GetTotalAllocatedBytesPrecise", (void*)&QCall_GCInterface_GetTotalAllocatedBytesPrecise }, + { "GCInterface_GetTotalMemory", (void*)&QCall_GCInterface_GetTotalMemory }, + { "GCInterface_ReRegisterForFinalize", (void*)&QCall_GCInterface_ReRegisterForFinalize }, + { "GCInterface_RefreshMemoryLimit", (void*)&QCall_GCInterface_RefreshMemoryLimit }, + { "GCInterface_RegisterFrozenSegment", (void*)&QCall_GCInterface_RegisterFrozenSegment }, + { "GCInterface_RemoveMemoryPressure", (void*)&QCall_GCInterface_RemoveMemoryPressure }, + { "GCInterface_StartNoGCRegion", (void*)&QCall_GCInterface_StartNoGCRegion }, + { "GCInterface_UnregisterFrozenSegment", (void*)&QCall_GCInterface_UnregisterFrozenSegment }, + { "GCInterface_WaitForFullGCApproach", (void*)&QCall_GCInterface_WaitForFullGCApproach }, + { "GCInterface_WaitForFullGCComplete", (void*)&QCall_GCInterface_WaitForFullGCComplete }, + { "GCInterface_WaitForPendingFinalizers", (void*)&QCall_GCInterface_WaitForPendingFinalizers }, + { "GenericHandleWorker", (void*)&QCall_GenericHandleWorker }, + { "GetCurrentExInfo", (void*)&QCall_GetCurrentExInfo }, + { "GetEnvironmentStringsW", (void*)&QCall_GetEnvironmentStringsW }, + { "GetEnvironmentVariableW", (void*)&QCall_GetEnvironmentVariableW }, + { "GetFileLoadExceptionMessage", (void*)&QCall_GetFileLoadExceptionMessage }, + { "GetTypeLoadExceptionMessage", (void*)&QCall_GetTypeLoadExceptionMessage }, + { "InitClassHelper", (void*)&QCall_InitClassHelper }, + { "Interlocked_MemoryBarrierProcessWide", (void*)&QCall_Interlocked_MemoryBarrierProcessWide }, + { "IsInstanceOf_NoCacheLookup", (void*)&QCall_IsInstanceOf_NoCacheLookup }, + { "LoaderAllocator_Destroy", (void*)&QCall_LoaderAllocator_Destroy }, + { "MarshalNative_GetDelegateForFunctionPointerInternal", (void*)&QCall_MarshalNative_GetDelegateForFunctionPointerInternal }, + { "MarshalNative_GetExceptionForHR", (void*)&QCall_MarshalNative_GetExceptionForHR }, + { "MarshalNative_GetFunctionPointerForDelegateInternal", (void*)&QCall_MarshalNative_GetFunctionPointerForDelegateInternal }, + { "MarshalNative_HasLayout", (void*)&QCall_MarshalNative_HasLayout }, + { "MarshalNative_OffsetOf", (void*)&QCall_MarshalNative_OffsetOf }, + { "MarshalNative_Prelink", (void*)&QCall_MarshalNative_Prelink }, + { "MarshalNative_SizeOfHelper", (void*)&QCall_MarshalNative_SizeOfHelper }, + { "MdUtf8String_EqualsCaseInsensitive", (void*)&QCall_MdUtf8String_EqualsCaseInsensitive }, + { "MetadataImport_Enum", (void*)&QCall_MetadataImport_Enum }, + { "MetadataImport_GetMarshalAs", (void*)&QCall_MetadataImport_GetMarshalAs }, + { "MethodBase_GetCurrentMethod", (void*)&QCall_MethodBase_GetCurrentMethod }, + { "MethodTable_CanCompareBitsOrUseFastGetHashCode", (void*)&QCall_MethodTable_CanCompareBitsOrUseFastGetHashCode }, + { "ModuleBuilder_GetArrayMethodToken", (void*)&QCall_ModuleBuilder_GetArrayMethodToken }, + { "ModuleBuilder_GetMemberRef", (void*)&QCall_ModuleBuilder_GetMemberRef }, + { "ModuleBuilder_GetMemberRefFromSignature", (void*)&QCall_ModuleBuilder_GetMemberRefFromSignature }, + { "ModuleBuilder_GetMemberRefOfFieldInfo", (void*)&QCall_ModuleBuilder_GetMemberRefOfFieldInfo }, + { "ModuleBuilder_GetMemberRefOfMethodInfo", (void*)&QCall_ModuleBuilder_GetMemberRefOfMethodInfo }, + { "ModuleBuilder_GetStringConstant", (void*)&QCall_ModuleBuilder_GetStringConstant }, + { "ModuleBuilder_GetTokenFromTypeSpec", (void*)&QCall_ModuleBuilder_GetTokenFromTypeSpec }, + { "ModuleBuilder_GetTypeRef", (void*)&QCall_ModuleBuilder_GetTypeRef }, + { "ModuleBuilder_SetFieldRVAContent", (void*)&QCall_ModuleBuilder_SetFieldRVAContent }, + { "ModuleHandle_GetDynamicMethod", (void*)&QCall_ModuleHandle_GetDynamicMethod }, + { "ModuleHandle_GetMDStreamVersion", (void*)&QCall_ModuleHandle_GetMDStreamVersion }, + { "ModuleHandle_GetModuleType", (void*)&QCall_ModuleHandle_GetModuleType }, + { "ModuleHandle_GetPEKind", (void*)&QCall_ModuleHandle_GetPEKind }, + { "ModuleHandle_GetToken", (void*)&QCall_ModuleHandle_GetToken }, + { "ModuleHandle_ResolveField", (void*)&QCall_ModuleHandle_ResolveField }, + { "ModuleHandle_ResolveMethod", (void*)&QCall_ModuleHandle_ResolveMethod }, + { "ModuleHandle_ResolveType", (void*)&QCall_ModuleHandle_ResolveType }, + { "NativeLibrary_LoadByName", (void*)&QCall_NativeLibrary_LoadByName }, + { "NativeRuntimeEventSource_LogContentionLockCreated", (void*)&QCall_NativeRuntimeEventSource_LogContentionLockCreated }, + { "NativeRuntimeEventSource_LogContentionStart", (void*)&QCall_NativeRuntimeEventSource_LogContentionStart }, + { "NativeRuntimeEventSource_LogContentionStop", (void*)&QCall_NativeRuntimeEventSource_LogContentionStop }, + { "NativeRuntimeEventSource_LogThreadPoolIODequeue", (void*)&QCall_NativeRuntimeEventSource_LogThreadPoolIODequeue }, + { "NativeRuntimeEventSource_LogThreadPoolIOEnqueue", (void*)&QCall_NativeRuntimeEventSource_LogThreadPoolIOEnqueue }, + { "NativeRuntimeEventSource_LogThreadPoolIOPack", (void*)&QCall_NativeRuntimeEventSource_LogThreadPoolIOPack }, + { "NativeRuntimeEventSource_LogThreadPoolMinMaxThreads", (void*)&QCall_NativeRuntimeEventSource_LogThreadPoolMinMaxThreads }, + { "NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentAdjustment", (void*)&QCall_NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentAdjustment }, + { "NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentSample", (void*)&QCall_NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentSample }, + { "NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentStats", (void*)&QCall_NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentStats }, + { "NativeRuntimeEventSource_LogThreadPoolWorkerThreadStart", (void*)&QCall_NativeRuntimeEventSource_LogThreadPoolWorkerThreadStart }, + { "NativeRuntimeEventSource_LogThreadPoolWorkerThreadStop", (void*)&QCall_NativeRuntimeEventSource_LogThreadPoolWorkerThreadStop }, + { "NativeRuntimeEventSource_LogThreadPoolWorkerThreadWait", (void*)&QCall_NativeRuntimeEventSource_LogThreadPoolWorkerThreadWait }, + { "NativeRuntimeEventSource_LogThreadPoolWorkingThreadCount", (void*)&QCall_NativeRuntimeEventSource_LogThreadPoolWorkingThreadCount }, + { "NativeRuntimeEventSource_LogWaitHandleWaitStart", (void*)&QCall_NativeRuntimeEventSource_LogWaitHandleWaitStart }, + { "NativeRuntimeEventSource_LogWaitHandleWaitStop", (void*)&QCall_NativeRuntimeEventSource_LogWaitHandleWaitStop }, + { "ObjectHeader_GetOrCreateLockObject", (void*)&QCall_ObjectHeader_GetOrCreateLockObject }, + { "ObjectNative_AllocateUninitializedClone", (void*)&QCall_ObjectNative_AllocateUninitializedClone }, + { "ObjectNative_GetHashCodeSlow", (void*)&QCall_ObjectNative_GetHashCodeSlow }, + { "QCall_FreeGCHandleForTypeHandle", (void*)&QCall_QCall_FreeGCHandleForTypeHandle }, + { "QCall_GetGCHandleForTypeHandle", (void*)&QCall_QCall_GetGCHandleForTypeHandle }, + { "ReflectionInvocation_CompileMethod", (void*)&QCall_ReflectionInvocation_CompileMethod }, + { "ReflectionInvocation_GetBoxInfo", (void*)&QCall_ReflectionInvocation_GetBoxInfo }, + { "ReflectionInvocation_GetGuid", (void*)&QCall_ReflectionInvocation_GetGuid }, + { "ReflectionInvocation_PrepareDelegate", (void*)&QCall_ReflectionInvocation_PrepareDelegate }, + { "ReflectionInvocation_PrepareMethod", (void*)&QCall_ReflectionInvocation_PrepareMethod }, + { "ReflectionInvocation_RunClassConstructor", (void*)&QCall_ReflectionInvocation_RunClassConstructor }, + { "ReflectionInvocation_RunModuleConstructor", (void*)&QCall_ReflectionInvocation_RunModuleConstructor }, + { "ReflectionInvocation_SizeOf", (void*)&QCall_ReflectionInvocation_SizeOf }, + { "ReflectionSerialization_GetCreateUninitializedObjectInfo", (void*)&QCall_ReflectionSerialization_GetCreateUninitializedObjectInfo }, + { "ResolveVirtualFunctionPointer", (void*)&QCall_ResolveVirtualFunctionPointer }, + { "RuntimeFieldHandle_GetEnCFieldAddr", (void*)&QCall_RuntimeFieldHandle_GetEnCFieldAddr }, + { "RuntimeFieldHandle_GetFieldDataReference", (void*)&QCall_RuntimeFieldHandle_GetFieldDataReference }, + { "RuntimeFieldHandle_GetRVAFieldInfo", (void*)&QCall_RuntimeFieldHandle_GetRVAFieldInfo }, + { "RuntimeFieldHandle_GetValue", (void*)&QCall_RuntimeFieldHandle_GetValue }, + { "RuntimeFieldHandle_GetValueDirect", (void*)&QCall_RuntimeFieldHandle_GetValueDirect }, + { "RuntimeFieldHandle_SetValue", (void*)&QCall_RuntimeFieldHandle_SetValue }, + { "RuntimeFieldHandle_SetValueDirect", (void*)&QCall_RuntimeFieldHandle_SetValueDirect }, + { "RuntimeMethodHandle_ConstructInstantiation", (void*)&QCall_RuntimeMethodHandle_ConstructInstantiation }, + { "RuntimeMethodHandle_Destroy", (void*)&QCall_RuntimeMethodHandle_Destroy }, + { "RuntimeMethodHandle_GetFunctionPointer", (void*)&QCall_RuntimeMethodHandle_GetFunctionPointer }, + { "RuntimeMethodHandle_GetMethodBody", (void*)&QCall_RuntimeMethodHandle_GetMethodBody }, + { "RuntimeMethodHandle_GetMethodInstantiation", (void*)&QCall_RuntimeMethodHandle_GetMethodInstantiation }, + { "RuntimeMethodHandle_GetStubIfNeededSlow", (void*)&QCall_RuntimeMethodHandle_GetStubIfNeededSlow }, + { "RuntimeMethodHandle_GetTypicalMethodDefinition", (void*)&QCall_RuntimeMethodHandle_GetTypicalMethodDefinition }, + { "RuntimeMethodHandle_GetVirtualFunctionPointer", (void*)&QCall_RuntimeMethodHandle_GetVirtualFunctionPointer }, + { "RuntimeMethodHandle_IsCAVisibleFromDecoratedType", (void*)&QCall_RuntimeMethodHandle_IsCAVisibleFromDecoratedType }, + { "RuntimeMethodHandle_StripMethodInstantiation", (void*)&QCall_RuntimeMethodHandle_StripMethodInstantiation }, + { "RuntimeModule_GetFullyQualifiedName", (void*)&QCall_RuntimeModule_GetFullyQualifiedName }, + { "RuntimeModule_GetScopeName", (void*)&QCall_RuntimeModule_GetScopeName }, + { "RuntimeModule_GetTypes", (void*)&QCall_RuntimeModule_GetTypes }, + { "RuntimeTypeHandle_AllocateTypeAssociatedMemory", (void*)&QCall_RuntimeTypeHandle_AllocateTypeAssociatedMemory }, + { "RuntimeTypeHandle_AllocateTypeAssociatedMemoryAligned", (void*)&QCall_RuntimeTypeHandle_AllocateTypeAssociatedMemoryAligned }, + { "RuntimeTypeHandle_ConstructName", (void*)&QCall_RuntimeTypeHandle_ConstructName }, + { "RuntimeTypeHandle_CreateInstanceForAnotherGenericParameter", (void*)&QCall_RuntimeTypeHandle_CreateInstanceForAnotherGenericParameter }, + { "RuntimeTypeHandle_GetActivationInfo", (void*)&QCall_RuntimeTypeHandle_GetActivationInfo }, + { "RuntimeTypeHandle_GetArgumentTypesFromFunctionPointer", (void*)&QCall_RuntimeTypeHandle_GetArgumentTypesFromFunctionPointer }, + { "RuntimeTypeHandle_GetAssemblySlow", (void*)&QCall_RuntimeTypeHandle_GetAssemblySlow }, + { "RuntimeTypeHandle_GetConstraints", (void*)&QCall_RuntimeTypeHandle_GetConstraints }, + { "RuntimeTypeHandle_GetDeclaringMethodForGenericParameter", (void*)&QCall_RuntimeTypeHandle_GetDeclaringMethodForGenericParameter }, + { "RuntimeTypeHandle_GetDeclaringTypeHandle", (void*)&QCall_RuntimeTypeHandle_GetDeclaringTypeHandle }, + { "RuntimeTypeHandle_GetDeclaringTypeHandleForGenericVariable", (void*)&QCall_RuntimeTypeHandle_GetDeclaringTypeHandleForGenericVariable }, + { "RuntimeTypeHandle_GetFields", (void*)&QCall_RuntimeTypeHandle_GetFields }, + { "RuntimeTypeHandle_GetGenericTypeDefinition", (void*)&QCall_RuntimeTypeHandle_GetGenericTypeDefinition }, + { "RuntimeTypeHandle_GetInstantiation", (void*)&QCall_RuntimeTypeHandle_GetInstantiation }, + { "RuntimeTypeHandle_GetInterfaceMethodImplementation", (void*)&QCall_RuntimeTypeHandle_GetInterfaceMethodImplementation }, + { "RuntimeTypeHandle_GetInterfaces", (void*)&QCall_RuntimeTypeHandle_GetInterfaces }, + { "RuntimeTypeHandle_GetMethodAt", (void*)&QCall_RuntimeTypeHandle_GetMethodAt }, + { "RuntimeTypeHandle_GetModuleSlow", (void*)&QCall_RuntimeTypeHandle_GetModuleSlow }, + { "RuntimeTypeHandle_GetNumVirtualsAndStaticVirtuals", (void*)&QCall_RuntimeTypeHandle_GetNumVirtualsAndStaticVirtuals }, + { "RuntimeTypeHandle_GetRuntimeTypeFromHandleSlow", (void*)&QCall_RuntimeTypeHandle_GetRuntimeTypeFromHandleSlow }, + { "RuntimeTypeHandle_Instantiate", (void*)&QCall_RuntimeTypeHandle_Instantiate }, + { "RuntimeTypeHandle_InternalAlloc", (void*)&QCall_RuntimeTypeHandle_InternalAlloc }, + { "RuntimeTypeHandle_InternalAllocNoChecks", (void*)&QCall_RuntimeTypeHandle_InternalAllocNoChecks }, + { "RuntimeTypeHandle_IsVisible", (void*)&QCall_RuntimeTypeHandle_IsVisible }, + { "RuntimeTypeHandle_MakeArray", (void*)&QCall_RuntimeTypeHandle_MakeArray }, + { "RuntimeTypeHandle_MakeByRef", (void*)&QCall_RuntimeTypeHandle_MakeByRef }, + { "RuntimeTypeHandle_MakeFunctionPointer", (void*)&QCall_RuntimeTypeHandle_MakeFunctionPointer }, + { "RuntimeTypeHandle_MakePointer", (void*)&QCall_RuntimeTypeHandle_MakePointer }, + { "RuntimeTypeHandle_MakeSZArray", (void*)&QCall_RuntimeTypeHandle_MakeSZArray }, + { "RuntimeTypeHandle_RegisterCollectibleTypeDependency", (void*)&QCall_RuntimeTypeHandle_RegisterCollectibleTypeDependency }, + { "RuntimeTypeHandle_SatisfiesConstraints", (void*)&QCall_RuntimeTypeHandle_SatisfiesConstraints }, + { "RuntimeTypeHandle_VerifyInterfaceIsImplemented", (void*)&QCall_RuntimeTypeHandle_VerifyInterfaceIsImplemented }, + { "SetEnvironmentVariableW", (void*)&QCall_SetEnvironmentVariableW }, + { "SfiInit", (void*)&QCall_SfiInit }, + { "SfiNext", (void*)&QCall_SfiNext }, + { "Signature_AreEqual", (void*)&QCall_Signature_AreEqual }, + { "Signature_GetCustomModifiersAtOffset", (void*)&QCall_Signature_GetCustomModifiersAtOffset }, + { "Signature_Init", (void*)&QCall_Signature_Init }, + { "StackTrace_GetStackFramesInternal", (void*)&QCall_StackTrace_GetStackFramesInternal }, + { "Stream_HasOverriddenSlow", (void*)&QCall_Stream_HasOverriddenSlow }, + { "String_Intern", (void*)&QCall_String_Intern }, + { "String_IsInterned", (void*)&QCall_String_IsInterned }, + { "StubHelpers_CreateCustomMarshaler", (void*)&QCall_StubHelpers_CreateCustomMarshaler }, + { "StubHelpers_CreateLayoutClassMarshalStubs", (void*)&QCall_StubHelpers_CreateLayoutClassMarshalStubs }, + { "StubHelpers_MulticastDebuggerTraceHelper", (void*)&QCall_StubHelpers_MulticastDebuggerTraceHelper }, + { "StubHelpers_ThrowInteropException", (void*)&QCall_StubHelpers_ThrowInteropException }, + { "StubHelpers_ThrowInteropParamException", (void*)&QCall_StubHelpers_ThrowInteropParamException }, + { "StubHelpers_ValidateByref", (void*)&QCall_StubHelpers_ValidateByref }, + { "StubHelpers_ValidateObject", (void*)&QCall_StubHelpers_ValidateObject }, + { "SystemJS_MarkAsyncMain", (void*)&QCall_SystemJS_MarkAsyncMain }, + { "SystemJS_RejectMainPromise", (void*)&QCall_SystemJS_RejectMainPromise }, + { "SystemJS_ResolveMainPromise", (void*)&QCall_SystemJS_ResolveMainPromise }, + { "SystemJS_ScheduleBackgroundJob", (void*)&QCall_SystemJS_ScheduleBackgroundJob }, + { "SystemJS_ScheduleTimer", (void*)&QCall_SystemJS_ScheduleTimer }, + { "TailCallHelp_AllocTailCallArgBufferInternal", (void*)&QCall_TailCallHelp_AllocTailCallArgBufferInternal }, + { "ThreadNative_Abort", (void*)&QCall_ThreadNative_Abort }, + { "ThreadNative_GetQCallSpecialException", (void*)&QCall_ThreadNative_GetQCallSpecialException }, + { "ThreadNative_GetThreadState", (void*)&QCall_ThreadNative_GetThreadState }, + { "ThreadNative_ResetAbort", (void*)&QCall_ThreadNative_ResetAbort }, + { "ThrowInvalidCastException", (void*)&QCall_ThrowInvalidCastException }, + { "TypeBuilder_AddInterfaceImpl", (void*)&QCall_TypeBuilder_AddInterfaceImpl }, + { "TypeBuilder_DefineCustomAttribute", (void*)&QCall_TypeBuilder_DefineCustomAttribute }, + { "TypeBuilder_DefineEvent", (void*)&QCall_TypeBuilder_DefineEvent }, + { "TypeBuilder_DefineField", (void*)&QCall_TypeBuilder_DefineField }, + { "TypeBuilder_DefineGenericParam", (void*)&QCall_TypeBuilder_DefineGenericParam }, + { "TypeBuilder_DefineMethod", (void*)&QCall_TypeBuilder_DefineMethod }, + { "TypeBuilder_DefineMethodImpl", (void*)&QCall_TypeBuilder_DefineMethodImpl }, + { "TypeBuilder_DefineMethodSemantics", (void*)&QCall_TypeBuilder_DefineMethodSemantics }, + { "TypeBuilder_DefineMethodSpec", (void*)&QCall_TypeBuilder_DefineMethodSpec }, + { "TypeBuilder_DefineProperty", (void*)&QCall_TypeBuilder_DefineProperty }, + { "TypeBuilder_DefineType", (void*)&QCall_TypeBuilder_DefineType }, + { "TypeBuilder_GetTokenFromSig", (void*)&QCall_TypeBuilder_GetTokenFromSig }, + { "TypeBuilder_SetClassLayout", (void*)&QCall_TypeBuilder_SetClassLayout }, + { "TypeBuilder_SetConstantValue", (void*)&QCall_TypeBuilder_SetConstantValue }, + { "TypeBuilder_SetFieldLayoutOffset", (void*)&QCall_TypeBuilder_SetFieldLayoutOffset }, + { "TypeBuilder_SetMethodIL", (void*)&QCall_TypeBuilder_SetMethodIL }, + { "TypeBuilder_SetMethodImpl", (void*)&QCall_TypeBuilder_SetMethodImpl }, + { "TypeBuilder_SetPInvokeData", (void*)&QCall_TypeBuilder_SetPInvokeData }, + { "TypeBuilder_SetParamInfo", (void*)&QCall_TypeBuilder_SetParamInfo }, + { "TypeBuilder_SetParentType", (void*)&QCall_TypeBuilder_SetParentType }, + { "TypeBuilder_TermCreateClass", (void*)&QCall_TypeBuilder_TermCreateClass }, + { "TypeHandle_CanCastTo_NoCacheLookup", (void*)&QCall_TypeHandle_CanCastTo_NoCacheLookup }, + { "TypeHandle_GetCorElementType", (void*)&QCall_TypeHandle_GetCorElementType }, + { "TypeMapLazyDictionary_FindPrecachedExternalTypeMapEntry", (void*)&QCall_TypeMapLazyDictionary_FindPrecachedExternalTypeMapEntry }, + { "TypeMapLazyDictionary_FindPrecachedProxyTypeMapEntry", (void*)&QCall_TypeMapLazyDictionary_FindPrecachedProxyTypeMapEntry }, + { "TypeMapLazyDictionary_ProcessAttributes", (void*)&QCall_TypeMapLazyDictionary_ProcessAttributes }, + { "UnsafeAccessors_ResolveGenericParamToTypeHandle", (void*)&QCall_UnsafeAccessors_ResolveGenericParamToTypeHandle }, + { "ValueType_GetHashCodeStrategy", (void*)&QCall_ValueType_GetHashCodeStrategy }, + { "VersionResilientHashCode_TypeHashCode", (void*)&QCall_VersionResilientHashCode_TypeHashCode }, + { "memmove", (void*)&QCall_memmove }, + { "memset", (void*)&QCall_memset }, +}; + +const void* QCallResolveDllImport(const char* name) +{ + return minipal_resolve_dllimport(s_QCall, sizeof(s_QCall) / sizeof(s_QCall[0]), name); +} diff --git a/src/coreclr/vm/wasm/browser/production/callhelpers-reverse.cpp b/src/coreclr/vm/wasm/browser/production/callhelpers-reverse.cpp new file mode 100644 index 00000000000000..a7b0111e5348a5 --- /dev/null +++ b/src/coreclr/vm/wasm/browser/production/callhelpers-reverse.cpp @@ -0,0 +1,1324 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// + +// +// GENERATED FILE, DON'T EDIT +// Generated by coreclr callhelpers generator +// + +#include + +// WASM-TODO: The method lookup would ideally be fully qualified assembly and then methodDef token. +// The current approach has limitations with overloaded methods. +extern "C" void LookupUnmanagedCallersOnlyMethodByName(const char* fullQualifiedTypeName, const char* methodName, MethodDesc** ppMD); +extern "C" void ExecuteInterpretedMethodFromUnmanaged(MethodDesc* pMD, int8_t* args, size_t argSize, int8_t* ret, PCODE callerIp); +extern "C" void* GetR2RNativeCodeForUnmanagedCallersOnly(MethodDesc* pMD); + +static MethodDesc* MD_System_Private_CoreLib_System_GC__RegisterNoGCRegionCallback_g__Callback_7C_66_0_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_GC__RegisterNoGCRegionCallback_g__Callback_7C_66_0_I32_RetVoid(void * arg0) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_GC__RegisterNoGCRegionCallback_g__Callback_7C_66_0_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.GC, System.Private.CoreLib", "g__Callback|66_0", &MD_System_Private_CoreLib_System_GC__RegisterNoGCRegionCallback_g__Callback_7C_66_0_I32_RetVoid); + } + + int64_t args[1] = { (int64_t)arg0 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_GC__RegisterNoGCRegionCallback_g__Callback_7C_66_0_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_GC__RegisterNoGCRegionCallback_g__Callback_7C_66_0_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Threading_ThreadPool_BackgroundJobHandler_Void_RetVoid = nullptr; +static void* R2RCode_System_Private_CoreLib_System_Threading_ThreadPool_BackgroundJobHandler_Void_RetVoid = (void*)(intptr_t)-1; +static void Call_System_Private_CoreLib_System_Threading_ThreadPool_BackgroundJobHandler_Void_RetVoid() +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Threading_ThreadPool_BackgroundJobHandler_Void_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Threading.ThreadPool, System.Private.CoreLib", "BackgroundJobHandler", &MD_System_Private_CoreLib_System_Threading_ThreadPool_BackgroundJobHandler_Void_RetVoid); + } + // Prefer the R2R native entrypoint when this callback was compiled (partial R2R). + // Resolve once and cache; a method's native-code availability is fixed after first prepare. + void* r2r = __atomic_load_n(&R2RCode_System_Private_CoreLib_System_Threading_ThreadPool_BackgroundJobHandler_Void_RetVoid, __ATOMIC_ACQUIRE); + if (r2r == (void*)(intptr_t)-1) + { + r2r = GetR2RNativeCodeForUnmanagedCallersOnly(MD_System_Private_CoreLib_System_Threading_ThreadPool_BackgroundJobHandler_Void_RetVoid); + __atomic_store_n(&R2RCode_System_Private_CoreLib_System_Threading_ThreadPool_BackgroundJobHandler_Void_RetVoid, r2r, __ATOMIC_RELEASE); + } + if (r2r != nullptr) + { + ((void(*)())r2r)(); + return; + } + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Threading_ThreadPool_BackgroundJobHandler_Void_RetVoid, nullptr, 0, nullptr, (PCODE)&Call_System_Private_CoreLib_System_Threading_ThreadPool_BackgroundJobHandler_Void_RetVoid); +} + +extern "C" void SystemJS_ExecuteBackgroundJobCallback() +{ + Call_System_Private_CoreLib_System_Threading_ThreadPool_BackgroundJobHandler_Void_RetVoid(); +} + +static MethodDesc* MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_BindAssemblyExports_I32_RetVoid = nullptr; +static void* R2RCode_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_BindAssemblyExports_I32_RetVoid = (void*)(intptr_t)-1; +static void Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_BindAssemblyExports_I32_RetVoid(void * arg0) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_BindAssemblyExports_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.InteropServices.JavaScript.JavaScriptExports, System.Runtime.InteropServices.JavaScript", "BindAssemblyExports", &MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_BindAssemblyExports_I32_RetVoid); + } + // Prefer the R2R native entrypoint when this callback was compiled (partial R2R). + // Resolve once and cache; a method's native-code availability is fixed after first prepare. + void* r2r = __atomic_load_n(&R2RCode_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_BindAssemblyExports_I32_RetVoid, __ATOMIC_ACQUIRE); + if (r2r == (void*)(intptr_t)-1) + { + r2r = GetR2RNativeCodeForUnmanagedCallersOnly(MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_BindAssemblyExports_I32_RetVoid); + __atomic_store_n(&R2RCode_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_BindAssemblyExports_I32_RetVoid, r2r, __ATOMIC_RELEASE); + } + if (r2r != nullptr) + { + ((void(*)(void *))r2r)(arg0); + return; + } + + int64_t args[1] = { (int64_t)arg0 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_BindAssemblyExports_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_BindAssemblyExports_I32_RetVoid); +} + +extern "C" void SystemInteropJS_BindAssemblyExports(void * arg0) +{ + Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_BindAssemblyExports_I32_RetVoid(arg0); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_CompilerServices_InitHelpers_CallClassConstructor_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Runtime_CompilerServices_InitHelpers_CallClassConstructor_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_CompilerServices_InitHelpers_CallClassConstructor_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.CompilerServices.InitHelpers, System.Private.CoreLib", "CallClassConstructor", &MD_System_Private_CoreLib_System_Runtime_CompilerServices_InitHelpers_CallClassConstructor_I32_I32_I32_RetVoid); + } + + int64_t args[3] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_CompilerServices_InitHelpers_CallClassConstructor_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Runtime_CompilerServices_InitHelpers_CallClassConstructor_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_CompilerServices_RuntimeHelpers_CallDefaultConstructor_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Runtime_CompilerServices_RuntimeHelpers_CallDefaultConstructor_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_CompilerServices_RuntimeHelpers_CallDefaultConstructor_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.CompilerServices.RuntimeHelpers, System.Private.CoreLib", "CallDefaultConstructor", &MD_System_Private_CoreLib_System_Runtime_CompilerServices_RuntimeHelpers_CallDefaultConstructor_I32_I32_I32_RetVoid); + } + + int64_t args[3] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_CompilerServices_RuntimeHelpers_CallDefaultConstructor_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Runtime_CompilerServices_RuntimeHelpers_CallDefaultConstructor_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallDelegate_I32_RetVoid = nullptr; +static void* R2RCode_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallDelegate_I32_RetVoid = (void*)(intptr_t)-1; +static void Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallDelegate_I32_RetVoid(void * arg0) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallDelegate_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.InteropServices.JavaScript.JavaScriptExports, System.Runtime.InteropServices.JavaScript", "CallDelegate", &MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallDelegate_I32_RetVoid); + } + // Prefer the R2R native entrypoint when this callback was compiled (partial R2R). + // Resolve once and cache; a method's native-code availability is fixed after first prepare. + void* r2r = __atomic_load_n(&R2RCode_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallDelegate_I32_RetVoid, __ATOMIC_ACQUIRE); + if (r2r == (void*)(intptr_t)-1) + { + r2r = GetR2RNativeCodeForUnmanagedCallersOnly(MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallDelegate_I32_RetVoid); + __atomic_store_n(&R2RCode_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallDelegate_I32_RetVoid, r2r, __ATOMIC_RELEASE); + } + if (r2r != nullptr) + { + ((void(*)(void *))r2r)(arg0); + return; + } + + int64_t args[1] = { (int64_t)arg0 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallDelegate_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallDelegate_I32_RetVoid); +} + +extern "C" void SystemInteropJS_CallDelegate(void * arg0) +{ + Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallDelegate_I32_RetVoid(arg0); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Environment_CallEntryPoint_I32_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Environment_CallEntryPoint_I32_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2, int32_t arg3, void * arg4) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Environment_CallEntryPoint_I32_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Environment, System.Private.CoreLib", "CallEntryPoint", &MD_System_Private_CoreLib_System_Environment_CallEntryPoint_I32_I32_I32_I32_I32_RetVoid); + } + + int64_t args[5] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3, (int64_t)arg4 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Environment_CallEntryPoint_I32_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Environment_CallEntryPoint_I32_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallJSExport_I32_I32_RetVoid = nullptr; +static void* R2RCode_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallJSExport_I32_I32_RetVoid = (void*)(intptr_t)-1; +static void Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallJSExport_I32_I32_RetVoid(int32_t arg0, void * arg1) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallJSExport_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.InteropServices.JavaScript.JavaScriptExports, System.Runtime.InteropServices.JavaScript", "CallJSExport", &MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallJSExport_I32_I32_RetVoid); + } + // Prefer the R2R native entrypoint when this callback was compiled (partial R2R). + // Resolve once and cache; a method's native-code availability is fixed after first prepare. + void* r2r = __atomic_load_n(&R2RCode_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallJSExport_I32_I32_RetVoid, __ATOMIC_ACQUIRE); + if (r2r == (void*)(intptr_t)-1) + { + r2r = GetR2RNativeCodeForUnmanagedCallersOnly(MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallJSExport_I32_I32_RetVoid); + __atomic_store_n(&R2RCode_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallJSExport_I32_I32_RetVoid, r2r, __ATOMIC_RELEASE); + } + if (r2r != nullptr) + { + ((void(*)(int32_t, void *))r2r)(arg0, arg1); + return; + } + + int64_t args[2] = { (int64_t)arg0, (int64_t)arg1 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallJSExport_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallJSExport_I32_I32_RetVoid); +} + +extern "C" void SystemInteropJS_CallJSExport(int32_t arg0, void * arg1) +{ + Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallJSExport_I32_I32_RetVoid(arg0, arg1); +} + +static MethodDesc* MD_System_Private_CoreLib_System_StartupHookProvider_CallStartupHook_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_StartupHookProvider_CallStartupHook_I32_I32_RetVoid(void * arg0, void * arg1) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_StartupHookProvider_CallStartupHook_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.StartupHookProvider, System.Private.CoreLib", "CallStartupHook", &MD_System_Private_CoreLib_System_StartupHookProvider_CallStartupHook_I32_I32_RetVoid); + } + + int64_t args[2] = { (int64_t)arg0, (int64_t)arg1 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_StartupHookProvider_CallStartupHook_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_StartupHookProvider_CallStartupHook_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_CompilerServices_RuntimeHelpers_CallToString_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Runtime_CompilerServices_RuntimeHelpers_CallToString_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_CompilerServices_RuntimeHelpers_CallToString_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.CompilerServices.RuntimeHelpers, System.Private.CoreLib", "CallToString", &MD_System_Private_CoreLib_System_Runtime_CompilerServices_RuntimeHelpers_CallToString_I32_I32_I32_RetVoid); + } + + int64_t args[3] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_CompilerServices_RuntimeHelpers_CallToString_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Runtime_CompilerServices_RuntimeHelpers_CallToString_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Diagnostics_Tracing_EventPipeEventProvider_Callback_I32_I32_I32_I64_I64_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Diagnostics_Tracing_EventPipeEventProvider_Callback_I32_I32_I32_I64_I64_I32_I32_RetVoid(void * arg0, int32_t arg1, uint32_t arg2, int64_t arg3, int64_t arg4, void * arg5, void * arg6) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Diagnostics_Tracing_EventPipeEventProvider_Callback_I32_I32_I32_I64_I64_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Diagnostics.Tracing.EventPipeEventProvider, System.Private.CoreLib", "Callback", &MD_System_Private_CoreLib_System_Diagnostics_Tracing_EventPipeEventProvider_Callback_I32_I32_I32_I64_I64_I32_I32_RetVoid); + } + + int64_t args[7] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3, (int64_t)arg4, (int64_t)arg5, (int64_t)arg6 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Diagnostics_Tracing_EventPipeEventProvider_Callback_I32_I32_I32_I64_I64_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Diagnostics_Tracing_EventPipeEventProvider_Callback_I32_I32_I32_I64_I64_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ClearManaged_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ClearManaged_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2, void * arg3) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ClearManaged_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.StubHelpers.MngdRefCustomMarshaler, System.Private.CoreLib", "ClearManaged", &MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ClearManaged_I32_I32_I32_I32_RetVoid); + } + + int64_t args[4] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ClearManaged_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ClearManaged_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ClearNative_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ClearNative_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2, void * arg3) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ClearNative_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.StubHelpers.MngdRefCustomMarshaler, System.Private.CoreLib", "ClearNative", &MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ClearNative_I32_I32_I32_I32_RetVoid); + } + + int64_t args[4] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ClearNative_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ClearNative_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CompleteTask_I32_RetVoid = nullptr; +static void* R2RCode_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CompleteTask_I32_RetVoid = (void*)(intptr_t)-1; +static void Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CompleteTask_I32_RetVoid(void * arg0) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CompleteTask_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.InteropServices.JavaScript.JavaScriptExports, System.Runtime.InteropServices.JavaScript", "CompleteTask", &MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CompleteTask_I32_RetVoid); + } + // Prefer the R2R native entrypoint when this callback was compiled (partial R2R). + // Resolve once and cache; a method's native-code availability is fixed after first prepare. + void* r2r = __atomic_load_n(&R2RCode_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CompleteTask_I32_RetVoid, __ATOMIC_ACQUIRE); + if (r2r == (void*)(intptr_t)-1) + { + r2r = GetR2RNativeCodeForUnmanagedCallersOnly(MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CompleteTask_I32_RetVoid); + __atomic_store_n(&R2RCode_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CompleteTask_I32_RetVoid, r2r, __ATOMIC_RELEASE); + } + if (r2r != nullptr) + { + ((void(*)(void *))r2r)(arg0); + return; + } + + int64_t args[1] = { (int64_t)arg0 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CompleteTask_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CompleteTask_I32_RetVoid); +} + +extern "C" void SystemInteropJS_CompleteTask(void * arg0) +{ + Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CompleteTask_I32_RetVoid(arg0); +} + +static MethodDesc* MD_System_Private_CoreLib_System_GC_ConfigCallback_I32_I32_I32_I32_I64_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_GC_ConfigCallback_I32_I32_I32_I32_I64_RetVoid(void * arg0, void * arg1, void * arg2, int32_t arg3, int64_t arg4) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_GC_ConfigCallback_I32_I32_I32_I32_I64_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.GC, System.Private.CoreLib", "ConfigCallback", &MD_System_Private_CoreLib_System_GC_ConfigCallback_I32_I32_I32_I32_I64_RetVoid); + } + + int64_t args[5] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3, (int64_t)arg4 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_GC_ConfigCallback_I32_I32_I32_I32_I64_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_GC_ConfigCallback_I32_I32_I32_I32_I64_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ConvertContentsToManaged_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ConvertContentsToManaged_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2, void * arg3) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ConvertContentsToManaged_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.StubHelpers.MngdRefCustomMarshaler, System.Private.CoreLib", "ConvertContentsToManaged", &MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ConvertContentsToManaged_I32_I32_I32_I32_RetVoid); + } + + int64_t args[4] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ConvertContentsToManaged_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ConvertContentsToManaged_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ConvertContentsToNative_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ConvertContentsToNative_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2, void * arg3) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ConvertContentsToNative_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.StubHelpers.MngdRefCustomMarshaler, System.Private.CoreLib", "ConvertContentsToNative", &MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ConvertContentsToNative_I32_I32_I32_I32_RetVoid); + } + + int64_t args[4] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ConvertContentsToNative_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ConvertContentsToNative_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_StubHelpers_BSTRMarshaler_ConvertToManaged_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_StubHelpers_BSTRMarshaler_ConvertToManaged_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_StubHelpers_BSTRMarshaler_ConvertToManaged_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.StubHelpers.BSTRMarshaler, System.Private.CoreLib", "ConvertToManaged", &MD_System_Private_CoreLib_System_StubHelpers_BSTRMarshaler_ConvertToManaged_I32_I32_I32_RetVoid); + } + + int64_t args[3] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_StubHelpers_BSTRMarshaler_ConvertToManaged_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_StubHelpers_BSTRMarshaler_ConvertToManaged_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_StubHelpers_BSTRMarshaler_ConvertToNative_I32_I32_RetI32 = nullptr; +static void * Call_System_Private_CoreLib_System_StubHelpers_BSTRMarshaler_ConvertToNative_I32_I32_RetI32(void * arg0, void * arg1) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_StubHelpers_BSTRMarshaler_ConvertToNative_I32_I32_RetI32) + { + LookupUnmanagedCallersOnlyMethodByName("System.StubHelpers.BSTRMarshaler, System.Private.CoreLib", "ConvertToNative", &MD_System_Private_CoreLib_System_StubHelpers_BSTRMarshaler_ConvertToNative_I32_I32_RetI32); + } + + int64_t args[2] = { (int64_t)arg0, (int64_t)arg1 }; + void * result; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_StubHelpers_BSTRMarshaler_ConvertToNative_I32_I32_RetI32, (int8_t*)args, sizeof(args), (int8_t*)&result, (PCODE)&Call_System_Private_CoreLib_System_StubHelpers_BSTRMarshaler_ConvertToNative_I32_I32_RetI32); + return result; +} + +static MethodDesc* MD_System_Private_CoreLib_System_Reflection_LoaderAllocator_Create_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Reflection_LoaderAllocator_Create_I32_I32_RetVoid(void * arg0, void * arg1) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Reflection_LoaderAllocator_Create_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Reflection.LoaderAllocator, System.Private.CoreLib", "Create", &MD_System_Private_CoreLib_System_Reflection_LoaderAllocator_Create_I32_I32_RetVoid); + } + + int64_t args[2] = { (int64_t)arg0, (int64_t)arg1 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Reflection_LoaderAllocator_Create_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Reflection_LoaderAllocator_Create_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_TypeLoadException_Create_I32_I32_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_TypeLoadException_Create_I32_I32_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2, int32_t arg3, void * arg4, void * arg5) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_TypeLoadException_Create_I32_I32_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.TypeLoadException, System.Private.CoreLib", "Create", &MD_System_Private_CoreLib_System_TypeLoadException_Create_I32_I32_I32_I32_I32_I32_RetVoid); + } + + int64_t args[6] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3, (int64_t)arg4, (int64_t)arg5 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_TypeLoadException_Create_I32_I32_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_TypeLoadException_Create_I32_I32_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_IO_FileLoadException_Create_I32_I32_I32_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_IO_FileLoadException_Create_I32_I32_I32_I32_I32_I32_I32_RetVoid(int32_t arg0, void * arg1, void * arg2, int32_t arg3, void * arg4, void * arg5, void * arg6) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_IO_FileLoadException_Create_I32_I32_I32_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.IO.FileLoadException, System.Private.CoreLib", "Create", &MD_System_Private_CoreLib_System_IO_FileLoadException_Create_I32_I32_I32_I32_I32_I32_I32_RetVoid); + } + + int64_t args[7] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3, (int64_t)arg4, (int64_t)arg5, (int64_t)arg6 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_IO_FileLoadException_Create_I32_I32_I32_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_IO_FileLoadException_Create_I32_I32_I32_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Exception_CreateArgumentException_I32_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Exception_CreateArgumentException_I32_I32_I32_I32_I32_RetVoid(int32_t arg0, void * arg1, void * arg2, void * arg3, void * arg4) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Exception_CreateArgumentException_I32_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Exception, System.Private.CoreLib", "CreateArgumentException", &MD_System_Private_CoreLib_System_Exception_CreateArgumentException_I32_I32_I32_I32_I32_RetVoid); + } + + int64_t args[5] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3, (int64_t)arg4 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Exception_CreateArgumentException_I32_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Exception_CreateArgumentException_I32_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Reflection_AssemblyName_CreateAssemblyName_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Reflection_AssemblyName_CreateAssemblyName_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Reflection_AssemblyName_CreateAssemblyName_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Reflection.AssemblyName, System.Private.CoreLib", "CreateAssemblyName", &MD_System_Private_CoreLib_System_Reflection_AssemblyName_CreateAssemblyName_I32_I32_I32_RetVoid); + } + + int64_t args[3] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Reflection_AssemblyName_CreateAssemblyName_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Reflection_AssemblyName_CreateAssemblyName_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Exception_CreateRuntimeWrappedException_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Exception_CreateRuntimeWrappedException_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Exception_CreateRuntimeWrappedException_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Exception, System.Private.CoreLib", "CreateRuntimeWrappedException", &MD_System_Private_CoreLib_System_Exception_CreateRuntimeWrappedException_I32_I32_I32_RetVoid); + } + + int64_t args[3] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Exception_CreateRuntimeWrappedException_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Exception_CreateRuntimeWrappedException_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Exception_CreateTargetInvocationException_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Exception_CreateTargetInvocationException_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Exception_CreateTargetInvocationException_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Exception, System.Private.CoreLib", "CreateTargetInvocationException", &MD_System_Private_CoreLib_System_Exception_CreateTargetInvocationException_I32_I32_I32_RetVoid); + } + + int64_t args[3] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Exception_CreateTargetInvocationException_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Exception_CreateTargetInvocationException_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Exception_CreateTypeInitializationException_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Exception_CreateTypeInitializationException_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2, void * arg3) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Exception_CreateTypeInitializationException_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Exception, System.Private.CoreLib", "CreateTypeInitializationException", &MD_System_Private_CoreLib_System_Exception_CreateTypeInitializationException_I32_I32_I32_I32_RetVoid); + } + + int64_t args[4] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Exception_CreateTypeInitializationException_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Exception_CreateTypeInitializationException_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Globalization_CalendarData_EnumCalendarInfoCallback_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Globalization_CalendarData_EnumCalendarInfoCallback_I32_I32_RetVoid(void * arg0, void * arg1) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Globalization_CalendarData_EnumCalendarInfoCallback_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Globalization.CalendarData, System.Private.CoreLib", "EnumCalendarInfoCallback", &MD_System_Private_CoreLib_System_Globalization_CalendarData_EnumCalendarInfoCallback_I32_I32_RetVoid); + } + + int64_t args[2] = { (int64_t)arg0, (int64_t)arg1 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Globalization_CalendarData_EnumCalendarInfoCallback_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Globalization_CalendarData_EnumCalendarInfoCallback_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Environment_ExecuteInDefaultAppDomain_I32_I32_I32_RetI32 = nullptr; +static int32_t Call_System_Private_CoreLib_System_Environment_ExecuteInDefaultAppDomain_I32_I32_I32_RetI32(void * arg0, void * arg1, void * arg2) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Environment_ExecuteInDefaultAppDomain_I32_I32_I32_RetI32) + { + LookupUnmanagedCallersOnlyMethodByName("System.Environment, System.Private.CoreLib", "ExecuteInDefaultAppDomain", &MD_System_Private_CoreLib_System_Environment_ExecuteInDefaultAppDomain_I32_I32_I32_RetI32); + } + + int64_t args[3] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2 }; + int32_t result; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Environment_ExecuteInDefaultAppDomain_I32_I32_I32_RetI32, (int8_t*)args, sizeof(args), (int8_t*)&result, (PCODE)&Call_System_Private_CoreLib_System_Environment_ExecuteInDefaultAppDomain_I32_I32_I32_RetI32); + return result; +} + +static MethodDesc* MD_System_Private_CoreLib_System_Resolver_GetCodeInfo_I32_I32_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Resolver_GetCodeInfo_I32_I32_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2, void * arg3, void * arg4, void * arg5) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Resolver_GetCodeInfo_I32_I32_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Resolver, System.Private.CoreLib", "GetCodeInfo", &MD_System_Private_CoreLib_System_Resolver_GetCodeInfo_I32_I32_I32_I32_I32_I32_RetVoid); + } + + int64_t args[6] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3, (int64_t)arg4, (int64_t)arg5 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Resolver_GetCodeInfo_I32_I32_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Resolver_GetCodeInfo_I32_I32_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_GetCustomMarshalerInstance_I32_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_GetCustomMarshalerInstance_I32_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, int32_t arg2, void * arg3, void * arg4) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_GetCustomMarshalerInstance_I32_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.StubHelpers.MngdRefCustomMarshaler, System.Private.CoreLib", "GetCustomMarshalerInstance", &MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_GetCustomMarshalerInstance_I32_I32_I32_I32_I32_RetVoid); + } + + int64_t args[5] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3, (int64_t)arg4 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_GetCustomMarshalerInstance_I32_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_GetCustomMarshalerInstance_I32_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Resolver_GetEHInfo_I32_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Resolver_GetEHInfo_I32_I32_I32_I32_I32_RetVoid(void * arg0, int32_t arg1, void * arg2, void * arg3, void * arg4) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Resolver_GetEHInfo_I32_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Resolver, System.Private.CoreLib", "GetEHInfo", &MD_System_Private_CoreLib_System_Resolver_GetEHInfo_I32_I32_I32_I32_I32_RetVoid); + } + + int64_t args[5] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3, (int64_t)arg4 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Resolver_GetEHInfo_I32_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Resolver_GetEHInfo_I32_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_Internal_Runtime_InteropServices_ComponentActivator_GetFunctionPointer_I32_I32_I32_I32_I32_I32_RetI32 = nullptr; +static int32_t Call_System_Private_CoreLib_Internal_Runtime_InteropServices_ComponentActivator_GetFunctionPointer_I32_I32_I32_I32_I32_I32_RetI32(void * arg0, void * arg1, void * arg2, void * arg3, void * arg4, void * arg5) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_Internal_Runtime_InteropServices_ComponentActivator_GetFunctionPointer_I32_I32_I32_I32_I32_I32_RetI32) + { + LookupUnmanagedCallersOnlyMethodByName("Internal.Runtime.InteropServices.ComponentActivator, System.Private.CoreLib", "GetFunctionPointer", &MD_System_Private_CoreLib_Internal_Runtime_InteropServices_ComponentActivator_GetFunctionPointer_I32_I32_I32_I32_I32_I32_RetI32); + } + + int64_t args[6] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3, (int64_t)arg4, (int64_t)arg5 }; + int32_t result; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_Internal_Runtime_InteropServices_ComponentActivator_GetFunctionPointer_I32_I32_I32_I32_I32_I32_RetI32, (int8_t*)args, sizeof(args), (int8_t*)&result, (PCODE)&Call_System_Private_CoreLib_Internal_Runtime_InteropServices_ComponentActivator_GetFunctionPointer_I32_I32_I32_I32_I32_I32_RetI32); + return result; +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_InteropServices_DynamicInterfaceCastableHelpers_GetInterfaceImplementation_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Runtime_InteropServices_DynamicInterfaceCastableHelpers_GetInterfaceImplementation_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2, void * arg3) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_InteropServices_DynamicInterfaceCastableHelpers_GetInterfaceImplementation_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.InteropServices.DynamicInterfaceCastableHelpers, System.Private.CoreLib", "GetInterfaceImplementation", &MD_System_Private_CoreLib_System_Runtime_InteropServices_DynamicInterfaceCastableHelpers_GetInterfaceImplementation_I32_I32_I32_I32_RetVoid); + } + + int64_t args[4] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_InteropServices_DynamicInterfaceCastableHelpers_GetInterfaceImplementation_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Runtime_InteropServices_DynamicInterfaceCastableHelpers_GetInterfaceImplementation_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Resolver_GetJitContext_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Resolver_GetJitContext_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2, void * arg3) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Resolver_GetJitContext_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Resolver, System.Private.CoreLib", "GetJitContext", &MD_System_Private_CoreLib_System_Resolver_GetJitContext_I32_I32_I32_I32_RetVoid); + } + + int64_t args[4] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Resolver_GetJitContext_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Resolver_GetJitContext_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Resolver_GetLocalsSignature_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Resolver_GetLocalsSignature_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Resolver_GetLocalsSignature_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Resolver, System.Private.CoreLib", "GetLocalsSignature", &MD_System_Private_CoreLib_System_Resolver_GetLocalsSignature_I32_I32_I32_RetVoid); + } + + int64_t args[3] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Resolver_GetLocalsSignature_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Resolver_GetLocalsSignature_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_GetManagedStackTrace_I32_RetVoid = nullptr; +static void* R2RCode_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_GetManagedStackTrace_I32_RetVoid = (void*)(intptr_t)-1; +static void Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_GetManagedStackTrace_I32_RetVoid(void * arg0) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_GetManagedStackTrace_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.InteropServices.JavaScript.JavaScriptExports, System.Runtime.InteropServices.JavaScript", "GetManagedStackTrace", &MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_GetManagedStackTrace_I32_RetVoid); + } + // Prefer the R2R native entrypoint when this callback was compiled (partial R2R). + // Resolve once and cache; a method's native-code availability is fixed after first prepare. + void* r2r = __atomic_load_n(&R2RCode_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_GetManagedStackTrace_I32_RetVoid, __ATOMIC_ACQUIRE); + if (r2r == (void*)(intptr_t)-1) + { + r2r = GetR2RNativeCodeForUnmanagedCallersOnly(MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_GetManagedStackTrace_I32_RetVoid); + __atomic_store_n(&R2RCode_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_GetManagedStackTrace_I32_RetVoid, r2r, __ATOMIC_RELEASE); + } + if (r2r != nullptr) + { + ((void(*)(void *))r2r)(arg0); + return; + } + + int64_t args[1] = { (int64_t)arg0 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_GetManagedStackTrace_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_GetManagedStackTrace_I32_RetVoid); +} + +extern "C" void SystemInteropJS_GetManagedStackTrace(void * arg0) +{ + Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_GetManagedStackTrace_I32_RetVoid(arg0); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Environment_GetResourceString_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Environment_GetResourceString_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Environment_GetResourceString_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Environment, System.Private.CoreLib", "GetResourceString", &MD_System_Private_CoreLib_System_Environment_GetResourceString_I32_I32_I32_RetVoid); + } + + int64_t args[3] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Environment_GetResourceString_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Environment_GetResourceString_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Resolver_GetStringLiteral_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Resolver_GetStringLiteral_I32_I32_I32_I32_RetVoid(void * arg0, int32_t arg1, void * arg2, void * arg3) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Resolver_GetStringLiteral_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Resolver, System.Private.CoreLib", "GetStringLiteral", &MD_System_Private_CoreLib_System_Resolver_GetStringLiteral_I32_I32_I32_I32_RetVoid); + } + + int64_t args[4] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Resolver_GetStringLiteral_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Resolver_GetStringLiteral_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Reflection_TypeNameResolver_GetTypeHelper_I32_I32_I32_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Reflection_TypeNameResolver_GetTypeHelper_I32_I32_I32_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, int32_t arg2, int32_t arg3, void * arg4, void * arg5, void * arg6) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Reflection_TypeNameResolver_GetTypeHelper_I32_I32_I32_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Reflection.TypeNameResolver, System.Private.CoreLib", "GetTypeHelper", &MD_System_Private_CoreLib_System_Reflection_TypeNameResolver_GetTypeHelper_I32_I32_I32_I32_I32_I32_I32_RetVoid); + } + + int64_t args[7] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3, (int64_t)arg4, (int64_t)arg5, (int64_t)arg6 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Reflection_TypeNameResolver_GetTypeHelper_I32_I32_I32_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Reflection_TypeNameResolver_GetTypeHelper_I32_I32_I32_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Environment_InitializeCommandLineArgs_I32_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Environment_InitializeCommandLineArgs_I32_I32_I32_I32_I32_RetVoid(void * arg0, int32_t arg1, void * arg2, void * arg3, void * arg4) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Environment_InitializeCommandLineArgs_I32_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Environment, System.Private.CoreLib", "InitializeCommandLineArgs", &MD_System_Private_CoreLib_System_Environment_InitializeCommandLineArgs_I32_I32_I32_I32_I32_RetVoid); + } + + int64_t args[5] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3, (int64_t)arg4 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Environment_InitializeCommandLineArgs_I32_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Environment_InitializeCommandLineArgs_I32_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_InitializeDefaultContext_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_InitializeDefaultContext_I32_RetVoid(void * arg0) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_InitializeDefaultContext_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.Loader.AssemblyLoadContext, System.Private.CoreLib", "InitializeDefaultContext", &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_InitializeDefaultContext_I32_RetVoid); + } + + int64_t args[1] = { (int64_t)arg0 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_InitializeDefaultContext_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_InitializeDefaultContext_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Diagnostics_Tracing_EventSource_InitializeDefaultEventSources_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Diagnostics_Tracing_EventSource_InitializeDefaultEventSources_I32_RetVoid(void * arg0) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Diagnostics_Tracing_EventSource_InitializeDefaultEventSources_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Diagnostics.Tracing.EventSource, System.Private.CoreLib", "InitializeDefaultEventSources", &MD_System_Private_CoreLib_System_Diagnostics_Tracing_EventSource_InitializeDefaultEventSources_I32_RetVoid); + } + + int64_t args[1] = { (int64_t)arg0 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Diagnostics_Tracing_EventSource_InitializeDefaultEventSources_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Diagnostics_Tracing_EventSource_InitializeDefaultEventSources_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Threading_Lock_InitializeForMonitor_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Threading_Lock_InitializeForMonitor_I32_I32_I32_I32_RetVoid(void * arg0, int32_t arg1, uint32_t arg2, void * arg3) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Threading_Lock_InitializeForMonitor_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Threading.Lock, System.Private.CoreLib", "InitializeForMonitor", &MD_System_Private_CoreLib_System_Threading_Lock_InitializeForMonitor_I32_I32_I32_I32_RetVoid); + } + + int64_t args[4] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Threading_Lock_InitializeForMonitor_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Threading_Lock_InitializeForMonitor_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Exception_InternalPreserveStackTrace_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Exception_InternalPreserveStackTrace_I32_I32_RetVoid(void * arg0, void * arg1) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Exception_InternalPreserveStackTrace_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Exception, System.Private.CoreLib", "InternalPreserveStackTrace", &MD_System_Private_CoreLib_System_Exception_InternalPreserveStackTrace_I32_I32_RetVoid); + } + + int64_t args[2] = { (int64_t)arg0, (int64_t)arg1 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Exception_InternalPreserveStackTrace_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Exception_InternalPreserveStackTrace_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_StubHelpers_StubHelpers_InvokeArrayContentsConverter_I32_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_StubHelpers_StubHelpers_InvokeArrayContentsConverter_I32_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, int32_t arg2, void * arg3, void * arg4) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_StubHelpers_StubHelpers_InvokeArrayContentsConverter_I32_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.StubHelpers.StubHelpers, System.Private.CoreLib", "InvokeArrayContentsConverter", &MD_System_Private_CoreLib_System_StubHelpers_StubHelpers_InvokeArrayContentsConverter_I32_I32_I32_I32_I32_RetVoid); + } + + int64_t args[5] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3, (int64_t)arg4 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_StubHelpers_StubHelpers_InvokeArrayContentsConverter_I32_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_StubHelpers_StubHelpers_InvokeArrayContentsConverter_I32_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Diagnostics_Debugger_InvokeFunction_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Diagnostics_Debugger_InvokeFunction_I32_RetVoid(void * arg0) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Diagnostics_Debugger_InvokeFunction_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Diagnostics.Debugger, System.Private.CoreLib", "InvokeFunction", &MD_System_Private_CoreLib_System_Diagnostics_Debugger_InvokeFunction_I32_RetVoid); + } + + int64_t args[1] = { (int64_t)arg0 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Diagnostics_Debugger_InvokeFunction_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Diagnostics_Debugger_InvokeFunction_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_InteropServices_DynamicInterfaceCastableHelpers_IsInterfaceImplemented_I32_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Runtime_InteropServices_DynamicInterfaceCastableHelpers_IsInterfaceImplemented_I32_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, int32_t arg2, void * arg3, void * arg4) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_InteropServices_DynamicInterfaceCastableHelpers_IsInterfaceImplemented_I32_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.InteropServices.DynamicInterfaceCastableHelpers, System.Private.CoreLib", "IsInterfaceImplemented", &MD_System_Private_CoreLib_System_Runtime_InteropServices_DynamicInterfaceCastableHelpers_IsInterfaceImplemented_I32_I32_I32_I32_I32_RetVoid); + } + + int64_t args[5] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3, (int64_t)arg4 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_InteropServices_DynamicInterfaceCastableHelpers_IsInterfaceImplemented_I32_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Runtime_InteropServices_DynamicInterfaceCastableHelpers_IsInterfaceImplemented_I32_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_StubHelpers_StubHelpers_LayoutTypeConvertToManaged_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_StubHelpers_StubHelpers_LayoutTypeConvertToManaged_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_StubHelpers_StubHelpers_LayoutTypeConvertToManaged_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.StubHelpers.StubHelpers, System.Private.CoreLib", "LayoutTypeConvertToManaged", &MD_System_Private_CoreLib_System_StubHelpers_StubHelpers_LayoutTypeConvertToManaged_I32_I32_I32_RetVoid); + } + + int64_t args[3] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_StubHelpers_StubHelpers_LayoutTypeConvertToManaged_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_StubHelpers_StubHelpers_LayoutTypeConvertToManaged_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_StubHelpers_StubHelpers_LayoutTypeConvertToUnmanaged_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_StubHelpers_StubHelpers_LayoutTypeConvertToUnmanaged_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_StubHelpers_StubHelpers_LayoutTypeConvertToUnmanaged_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.StubHelpers.StubHelpers, System.Private.CoreLib", "LayoutTypeConvertToUnmanaged", &MD_System_Private_CoreLib_System_StubHelpers_StubHelpers_LayoutTypeConvertToUnmanaged_I32_I32_I32_RetVoid); + } + + int64_t args[3] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_StubHelpers_StubHelpers_LayoutTypeConvertToUnmanaged_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_StubHelpers_StubHelpers_LayoutTypeConvertToUnmanaged_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_InteropServices_NativeLibrary_LoadLibraryCallbackStub_I32_I32_I32_I32_I32_RetI32 = nullptr; +static void * Call_System_Private_CoreLib_System_Runtime_InteropServices_NativeLibrary_LoadLibraryCallbackStub_I32_I32_I32_I32_I32_RetI32(void * arg0, void * arg1, int32_t arg2, uint32_t arg3, void * arg4) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_InteropServices_NativeLibrary_LoadLibraryCallbackStub_I32_I32_I32_I32_I32_RetI32) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.InteropServices.NativeLibrary, System.Private.CoreLib", "LoadLibraryCallbackStub", &MD_System_Private_CoreLib_System_Runtime_InteropServices_NativeLibrary_LoadLibraryCallbackStub_I32_I32_I32_I32_I32_RetI32); + } + + int64_t args[5] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3, (int64_t)arg4 }; + void * result; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_InteropServices_NativeLibrary_LoadLibraryCallbackStub_I32_I32_I32_I32_I32_RetI32, (int8_t*)args, sizeof(args), (int8_t*)&result, (PCODE)&Call_System_Private_CoreLib_System_Runtime_InteropServices_NativeLibrary_LoadLibraryCallbackStub_I32_I32_I32_I32_I32_RetI32); + return result; +} + +static MethodDesc* MD_System_Private_CoreLib_System_StartupHookProvider_ManagedStartup_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_StartupHookProvider_ManagedStartup_I32_I32_RetVoid(void * arg0, void * arg1) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_StartupHookProvider_ManagedStartup_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.StartupHookProvider, System.Private.CoreLib", "ManagedStartup", &MD_System_Private_CoreLib_System_StartupHookProvider_ManagedStartup_I32_I32_RetVoid); + } + + int64_t args[2] = { (int64_t)arg0, (int64_t)arg1 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_StartupHookProvider_ManagedStartup_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_StartupHookProvider_ManagedStartup_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewExternalTypeEntry_I32_I32_RetI32 = nullptr; +static int32_t Call_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewExternalTypeEntry_I32_I32_RetI32(void * arg0, void * arg1) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewExternalTypeEntry_I32_I32_RetI32) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.InteropServices.TypeMapLazyDictionary, System.Private.CoreLib", "NewExternalTypeEntry", &MD_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewExternalTypeEntry_I32_I32_RetI32); + } + + int64_t args[2] = { (int64_t)arg0, (int64_t)arg1 }; + int32_t result; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewExternalTypeEntry_I32_I32_RetI32, (int8_t*)args, sizeof(args), (int8_t*)&result, (PCODE)&Call_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewExternalTypeEntry_I32_I32_RetI32); + return result; +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewPrecachedExternalTypeMap_I32_RetI32 = nullptr; +static int32_t Call_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewPrecachedExternalTypeMap_I32_RetI32(void * arg0) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewPrecachedExternalTypeMap_I32_RetI32) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.InteropServices.TypeMapLazyDictionary, System.Private.CoreLib", "NewPrecachedExternalTypeMap", &MD_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewPrecachedExternalTypeMap_I32_RetI32); + } + + int64_t args[1] = { (int64_t)arg0 }; + int32_t result; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewPrecachedExternalTypeMap_I32_RetI32, (int8_t*)args, sizeof(args), (int8_t*)&result, (PCODE)&Call_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewPrecachedExternalTypeMap_I32_RetI32); + return result; +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewPrecachedProxyTypeMap_I32_RetI32 = nullptr; +static int32_t Call_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewPrecachedProxyTypeMap_I32_RetI32(void * arg0) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewPrecachedProxyTypeMap_I32_RetI32) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.InteropServices.TypeMapLazyDictionary, System.Private.CoreLib", "NewPrecachedProxyTypeMap", &MD_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewPrecachedProxyTypeMap_I32_RetI32); + } + + int64_t args[1] = { (int64_t)arg0 }; + int32_t result; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewPrecachedProxyTypeMap_I32_RetI32, (int8_t*)args, sizeof(args), (int8_t*)&result, (PCODE)&Call_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewPrecachedProxyTypeMap_I32_RetI32); + return result; +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewProxyTypeEntry_I32_I32_RetI32 = nullptr; +static int32_t Call_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewProxyTypeEntry_I32_I32_RetI32(void * arg0, void * arg1) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewProxyTypeEntry_I32_I32_RetI32) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.InteropServices.TypeMapLazyDictionary, System.Private.CoreLib", "NewProxyTypeEntry", &MD_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewProxyTypeEntry_I32_I32_RetI32); + } + + int64_t args[2] = { (int64_t)arg0, (int64_t)arg1 }; + int32_t result; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewProxyTypeEntry_I32_I32_RetI32, (int8_t*)args, sizeof(args), (int8_t*)&result, (PCODE)&Call_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewProxyTypeEntry_I32_I32_RetI32); + return result; +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnAssemblyLoad_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnAssemblyLoad_I32_I32_RetVoid(void * arg0, void * arg1) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnAssemblyLoad_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.Loader.AssemblyLoadContext, System.Private.CoreLib", "OnAssemblyLoad", &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnAssemblyLoad_I32_I32_RetVoid); + } + + int64_t args[2] = { (int64_t)arg0, (int64_t)arg1 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnAssemblyLoad_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnAssemblyLoad_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnAssemblyResolve_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnAssemblyResolve_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2, void * arg3) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnAssemblyResolve_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.Loader.AssemblyLoadContext, System.Private.CoreLib", "OnAssemblyResolve", &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnAssemblyResolve_I32_I32_I32_I32_RetVoid); + } + + int64_t args[4] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnAssemblyResolve_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnAssemblyResolve_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_AppContext_OnFirstChanceException_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_AppContext_OnFirstChanceException_I32_I32_RetVoid(void * arg0, void * arg1) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_AppContext_OnFirstChanceException_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.AppContext, System.Private.CoreLib", "OnFirstChanceException", &MD_System_Private_CoreLib_System_AppContext_OnFirstChanceException_I32_I32_RetVoid); + } + + int64_t args[2] = { (int64_t)arg0, (int64_t)arg1 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_AppContext_OnFirstChanceException_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_AppContext_OnFirstChanceException_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_AppContext_OnProcessExit_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_AppContext_OnProcessExit_I32_RetVoid(void * arg0) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_AppContext_OnProcessExit_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.AppContext, System.Private.CoreLib", "OnProcessExit", &MD_System_Private_CoreLib_System_AppContext_OnProcessExit_I32_RetVoid); + } + + int64_t args[1] = { (int64_t)arg0 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_AppContext_OnProcessExit_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_AppContext_OnProcessExit_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnResourceResolve_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnResourceResolve_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2, void * arg3) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnResourceResolve_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.Loader.AssemblyLoadContext, System.Private.CoreLib", "OnResourceResolve", &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnResourceResolve_I32_I32_I32_I32_RetVoid); + } + + int64_t args[4] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnResourceResolve_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnResourceResolve_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Threading_Thread_OnThreadExited_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Threading_Thread_OnThreadExited_I32_I32_RetVoid(void * arg0, void * arg1) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Threading_Thread_OnThreadExited_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Threading.Thread, System.Private.CoreLib", "OnThreadExited", &MD_System_Private_CoreLib_System_Threading_Thread_OnThreadExited_I32_I32_RetVoid); + } + + int64_t args[2] = { (int64_t)arg0, (int64_t)arg1 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Threading_Thread_OnThreadExited_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Threading_Thread_OnThreadExited_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnTypeResolve_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnTypeResolve_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2, void * arg3) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnTypeResolve_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.Loader.AssemblyLoadContext, System.Private.CoreLib", "OnTypeResolve", &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnTypeResolve_I32_I32_I32_I32_RetVoid); + } + + int64_t args[4] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnTypeResolve_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnTypeResolve_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_AppContext_OnUnhandledException_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_AppContext_OnUnhandledException_I32_I32_RetVoid(void * arg0, void * arg1) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_AppContext_OnUnhandledException_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.AppContext, System.Private.CoreLib", "OnUnhandledException", &MD_System_Private_CoreLib_System_AppContext_OnUnhandledException_I32_I32_RetVoid); + } + + int64_t args[2] = { (int64_t)arg0, (int64_t)arg1 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_AppContext_OnUnhandledException_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_AppContext_OnUnhandledException_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Reflection_AssemblyName_ParseAsAssemblySpec_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Reflection_AssemblyName_ParseAsAssemblySpec_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Reflection_AssemblyName_ParseAsAssemblySpec_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Reflection.AssemblyName, System.Private.CoreLib", "ParseAsAssemblySpec", &MD_System_Private_CoreLib_System_Reflection_AssemblyName_ParseAsAssemblySpec_I32_I32_I32_RetVoid); + } + + int64_t args[3] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Reflection_AssemblyName_ParseAsAssemblySpec_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Reflection_AssemblyName_ParseAsAssemblySpec_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_ReleaseJSOwnedObjectByGCHandle_I32_RetVoid = nullptr; +static void* R2RCode_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_ReleaseJSOwnedObjectByGCHandle_I32_RetVoid = (void*)(intptr_t)-1; +static void Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_ReleaseJSOwnedObjectByGCHandle_I32_RetVoid(void * arg0) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_ReleaseJSOwnedObjectByGCHandle_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.InteropServices.JavaScript.JavaScriptExports, System.Runtime.InteropServices.JavaScript", "ReleaseJSOwnedObjectByGCHandle", &MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_ReleaseJSOwnedObjectByGCHandle_I32_RetVoid); + } + // Prefer the R2R native entrypoint when this callback was compiled (partial R2R). + // Resolve once and cache; a method's native-code availability is fixed after first prepare. + void* r2r = __atomic_load_n(&R2RCode_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_ReleaseJSOwnedObjectByGCHandle_I32_RetVoid, __ATOMIC_ACQUIRE); + if (r2r == (void*)(intptr_t)-1) + { + r2r = GetR2RNativeCodeForUnmanagedCallersOnly(MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_ReleaseJSOwnedObjectByGCHandle_I32_RetVoid); + __atomic_store_n(&R2RCode_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_ReleaseJSOwnedObjectByGCHandle_I32_RetVoid, r2r, __ATOMIC_RELEASE); + } + if (r2r != nullptr) + { + ((void(*)(void *))r2r)(arg0); + return; + } + + int64_t args[1] = { (int64_t)arg0 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_ReleaseJSOwnedObjectByGCHandle_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_ReleaseJSOwnedObjectByGCHandle_I32_RetVoid); +} + +extern "C" void SystemInteropJS_ReleaseJSOwnedObjectByGCHandle(void * arg0) +{ + Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_ReleaseJSOwnedObjectByGCHandle_I32_RetVoid(arg0); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_Resolve_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_Resolve_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2, void * arg3) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_Resolve_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.Loader.AssemblyLoadContext, System.Private.CoreLib", "Resolve", &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_Resolve_I32_I32_I32_I32_RetVoid); + } + + int64_t args[4] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_Resolve_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_Resolve_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveSatelliteAssembly_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveSatelliteAssembly_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2, void * arg3) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveSatelliteAssembly_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.Loader.AssemblyLoadContext, System.Private.CoreLib", "ResolveSatelliteAssembly", &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveSatelliteAssembly_I32_I32_I32_I32_RetVoid); + } + + int64_t args[4] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveSatelliteAssembly_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveSatelliteAssembly_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Resolver_ResolveSignature_I32_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Resolver_ResolveSignature_I32_I32_I32_I32_I32_RetVoid(void * arg0, int32_t arg1, int32_t arg2, void * arg3, void * arg4) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Resolver_ResolveSignature_I32_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Resolver, System.Private.CoreLib", "ResolveSignature", &MD_System_Private_CoreLib_System_Resolver_ResolveSignature_I32_I32_I32_I32_I32_RetVoid); + } + + int64_t args[5] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3, (int64_t)arg4 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Resolver_ResolveSignature_I32_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Resolver_ResolveSignature_I32_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Resolver_ResolveToken_I32_I32_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Resolver_ResolveToken_I32_I32_I32_I32_I32_I32_RetVoid(void * arg0, int32_t arg1, void * arg2, void * arg3, void * arg4, void * arg5) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Resolver_ResolveToken_I32_I32_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Resolver, System.Private.CoreLib", "ResolveToken", &MD_System_Private_CoreLib_System_Resolver_ResolveToken_I32_I32_I32_I32_I32_I32_RetVoid); + } + + int64_t args[6] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3, (int64_t)arg4, (int64_t)arg5 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Resolver_ResolveToken_I32_I32_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Resolver_ResolveToken_I32_I32_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUnmanagedDll_I32_I32_I32_RetI32 = nullptr; +static void * Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUnmanagedDll_I32_I32_I32_RetI32(void * arg0, void * arg1, void * arg2) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUnmanagedDll_I32_I32_I32_RetI32) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.Loader.AssemblyLoadContext, System.Private.CoreLib", "ResolveUnmanagedDll", &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUnmanagedDll_I32_I32_I32_RetI32); + } + + int64_t args[3] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2 }; + void * result; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUnmanagedDll_I32_I32_I32_RetI32, (int8_t*)args, sizeof(args), (int8_t*)&result, (PCODE)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUnmanagedDll_I32_I32_I32_RetI32); + return result; +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUnmanagedDllUsingEvent_I32_I32_I32_I32_RetI32 = nullptr; +static void * Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUnmanagedDllUsingEvent_I32_I32_I32_I32_RetI32(void * arg0, void * arg1, void * arg2, void * arg3) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUnmanagedDllUsingEvent_I32_I32_I32_I32_RetI32) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.Loader.AssemblyLoadContext, System.Private.CoreLib", "ResolveUnmanagedDllUsingEvent", &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUnmanagedDllUsingEvent_I32_I32_I32_I32_RetI32); + } + + int64_t args[4] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3 }; + void * result; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUnmanagedDllUsingEvent_I32_I32_I32_I32_RetI32, (int8_t*)args, sizeof(args), (int8_t*)&result, (PCODE)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUnmanagedDllUsingEvent_I32_I32_I32_I32_RetI32); + return result; +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUsingEvent_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUsingEvent_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2, void * arg3) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUsingEvent_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.Loader.AssemblyLoadContext, System.Private.CoreLib", "ResolveUsingEvent", &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUsingEvent_I32_I32_I32_I32_RetVoid); + } + + int64_t args[4] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUsingEvent_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUsingEvent_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_EH_RhRethrow_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Runtime_EH_RhRethrow_I32_I32_RetVoid(void * arg0, void * arg1) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_EH_RhRethrow_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.EH, System.Private.CoreLib", "RhRethrow", &MD_System_Private_CoreLib_System_Runtime_EH_RhRethrow_I32_I32_RetVoid); + } + + int64_t args[2] = { (int64_t)arg0, (int64_t)arg1 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_EH_RhRethrow_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Runtime_EH_RhRethrow_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_EH_RhThrowEx_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Runtime_EH_RhThrowEx_I32_I32_RetVoid(void * arg0, void * arg1) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_EH_RhThrowEx_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.EH, System.Private.CoreLib", "RhThrowEx", &MD_System_Private_CoreLib_System_Runtime_EH_RhThrowEx_I32_I32_RetVoid); + } + + int64_t args[2] = { (int64_t)arg0, (int64_t)arg1 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_EH_RhThrowEx_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Runtime_EH_RhThrowEx_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_EH_RhThrowHwEx_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Runtime_EH_RhThrowHwEx_I32_I32_RetVoid(uint32_t arg0, void * arg1) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_EH_RhThrowHwEx_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.EH, System.Private.CoreLib", "RhThrowHwEx", &MD_System_Private_CoreLib_System_Runtime_EH_RhThrowHwEx_I32_I32_RetVoid); + } + + int64_t args[2] = { (int64_t)arg0, (int64_t)arg1 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_EH_RhThrowHwEx_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Runtime_EH_RhThrowHwEx_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_GC_RunFinalizers_Void_RetI32 = nullptr; +static uint32_t Call_System_Private_CoreLib_System_GC_RunFinalizers_Void_RetI32() +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_GC_RunFinalizers_Void_RetI32) + { + LookupUnmanagedCallersOnlyMethodByName("System.GC, System.Private.CoreLib", "RunFinalizers", &MD_System_Private_CoreLib_System_GC_RunFinalizers_Void_RetI32); + } + uint32_t result; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_GC_RunFinalizers_Void_RetI32, nullptr, 0, (int8_t*)&result, (PCODE)&Call_System_Private_CoreLib_System_GC_RunFinalizers_Void_RetI32); + return result; +} + +static MethodDesc* MD_System_Private_CoreLib_System_AppContext_Setup_I32_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_AppContext_Setup_I32_I32_I32_I32_RetVoid(void * arg0, void * arg1, int32_t arg2, void * arg3) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_AppContext_Setup_I32_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.AppContext, System.Private.CoreLib", "Setup", &MD_System_Private_CoreLib_System_AppContext_Setup_I32_I32_I32_I32_RetVoid); + } + + int64_t args[4] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2, (int64_t)arg3 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_AppContext_Setup_I32_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_AppContext_Setup_I32_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_StartAssemblyLoad_I32_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_StartAssemblyLoad_I32_I32_I32_RetVoid(void * arg0, void * arg1, void * arg2) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_StartAssemblyLoad_I32_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.Loader.AssemblyLoadContext, System.Private.CoreLib", "StartAssemblyLoad", &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_StartAssemblyLoad_I32_I32_I32_RetVoid); + } + + int64_t args[3] = { (int64_t)arg0, (int64_t)arg1, (int64_t)arg2 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_StartAssemblyLoad_I32_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_StartAssemblyLoad_I32_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_StopAssemblyLoad_I32_I32_RetVoid = nullptr; +static void Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_StopAssemblyLoad_I32_I32_RetVoid(void * arg0, void * arg1) +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_StopAssemblyLoad_I32_I32_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Runtime.Loader.AssemblyLoadContext, System.Private.CoreLib", "StopAssemblyLoad", &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_StopAssemblyLoad_I32_I32_RetVoid); + } + + int64_t args[2] = { (int64_t)arg0, (int64_t)arg1 }; + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_StopAssemblyLoad_I32_I32_RetVoid, (int8_t*)args, sizeof(args), nullptr, (PCODE)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_StopAssemblyLoad_I32_I32_RetVoid); +} + +static MethodDesc* MD_System_Private_CoreLib_System_Threading_TimerQueue_TimerHandler_Void_RetVoid = nullptr; +static void* R2RCode_System_Private_CoreLib_System_Threading_TimerQueue_TimerHandler_Void_RetVoid = (void*)(intptr_t)-1; +static void Call_System_Private_CoreLib_System_Threading_TimerQueue_TimerHandler_Void_RetVoid() +{ + // Lazy lookup of MethodDesc for the function export scenario. + if (!MD_System_Private_CoreLib_System_Threading_TimerQueue_TimerHandler_Void_RetVoid) + { + LookupUnmanagedCallersOnlyMethodByName("System.Threading.TimerQueue, System.Private.CoreLib", "TimerHandler", &MD_System_Private_CoreLib_System_Threading_TimerQueue_TimerHandler_Void_RetVoid); + } + // Prefer the R2R native entrypoint when this callback was compiled (partial R2R). + // Resolve once and cache; a method's native-code availability is fixed after first prepare. + void* r2r = __atomic_load_n(&R2RCode_System_Private_CoreLib_System_Threading_TimerQueue_TimerHandler_Void_RetVoid, __ATOMIC_ACQUIRE); + if (r2r == (void*)(intptr_t)-1) + { + r2r = GetR2RNativeCodeForUnmanagedCallersOnly(MD_System_Private_CoreLib_System_Threading_TimerQueue_TimerHandler_Void_RetVoid); + __atomic_store_n(&R2RCode_System_Private_CoreLib_System_Threading_TimerQueue_TimerHandler_Void_RetVoid, r2r, __ATOMIC_RELEASE); + } + if (r2r != nullptr) + { + ((void(*)())r2r)(); + return; + } + ExecuteInterpretedMethodFromUnmanaged(MD_System_Private_CoreLib_System_Threading_TimerQueue_TimerHandler_Void_RetVoid, nullptr, 0, nullptr, (PCODE)&Call_System_Private_CoreLib_System_Threading_TimerQueue_TimerHandler_Void_RetVoid); +} + +extern "C" void SystemJS_ExecuteTimerCallback() +{ + Call_System_Private_CoreLib_System_Threading_TimerQueue_TimerHandler_Void_RetVoid(); +} + +const ReverseThunkMapEntry g_ReverseThunks[] = +{ + { 2020995354, "g__Callback|66_0#1:System.Private.CoreLib:System:GC", { &MD_System_Private_CoreLib_System_GC__RegisterNoGCRegionCallback_g__Callback_7C_66_0_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_GC__RegisterNoGCRegionCallback_g__Callback_7C_66_0_I32_RetVoid } }, + { 1336557534, "BackgroundJobHandler#0:System.Private.CoreLib:System.Threading:ThreadPool", { &MD_System_Private_CoreLib_System_Threading_ThreadPool_BackgroundJobHandler_Void_RetVoid, (void*)&Call_System_Private_CoreLib_System_Threading_ThreadPool_BackgroundJobHandler_Void_RetVoid } }, + { 2901966433, "BindAssemblyExports#1:System.Runtime.InteropServices.JavaScript:System.Runtime.InteropServices.JavaScript:JavaScriptExports", { &MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_BindAssemblyExports_I32_RetVoid, (void*)&Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_BindAssemblyExports_I32_RetVoid } }, + { 1361004804, "CallClassConstructor#3:System.Private.CoreLib:System.Runtime.CompilerServices:InitHelpers", { &MD_System_Private_CoreLib_System_Runtime_CompilerServices_InitHelpers_CallClassConstructor_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Runtime_CompilerServices_InitHelpers_CallClassConstructor_I32_I32_I32_RetVoid } }, + { 3858976135, "CallDefaultConstructor#3:System.Private.CoreLib:System.Runtime.CompilerServices:RuntimeHelpers", { &MD_System_Private_CoreLib_System_Runtime_CompilerServices_RuntimeHelpers_CallDefaultConstructor_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Runtime_CompilerServices_RuntimeHelpers_CallDefaultConstructor_I32_I32_I32_RetVoid } }, + { 2601830388, "CallDelegate#1:System.Runtime.InteropServices.JavaScript:System.Runtime.InteropServices.JavaScript:JavaScriptExports", { &MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallDelegate_I32_RetVoid, (void*)&Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallDelegate_I32_RetVoid } }, + { 3962535319, "CallEntryPoint#5:System.Private.CoreLib:System:Environment", { &MD_System_Private_CoreLib_System_Environment_CallEntryPoint_I32_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Environment_CallEntryPoint_I32_I32_I32_I32_I32_RetVoid } }, + { 433365813, "CallJSExport#2:System.Runtime.InteropServices.JavaScript:System.Runtime.InteropServices.JavaScript:JavaScriptExports", { &MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallJSExport_I32_I32_RetVoid, (void*)&Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallJSExport_I32_I32_RetVoid } }, + { 1821934012, "CallStartupHook#2:System.Private.CoreLib:System:StartupHookProvider", { &MD_System_Private_CoreLib_System_StartupHookProvider_CallStartupHook_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_StartupHookProvider_CallStartupHook_I32_I32_RetVoid } }, + { 2915047114, "CallToString#3:System.Private.CoreLib:System.Runtime.CompilerServices:RuntimeHelpers", { &MD_System_Private_CoreLib_System_Runtime_CompilerServices_RuntimeHelpers_CallToString_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Runtime_CompilerServices_RuntimeHelpers_CallToString_I32_I32_I32_RetVoid } }, + { 4077371982, "Callback#7:System.Private.CoreLib:System.Diagnostics.Tracing:EventPipeEventProvider", { &MD_System_Private_CoreLib_System_Diagnostics_Tracing_EventPipeEventProvider_Callback_I32_I32_I32_I64_I64_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Diagnostics_Tracing_EventPipeEventProvider_Callback_I32_I32_I32_I64_I64_I32_I32_RetVoid } }, + { 3358042195, "ClearManaged#4:System.Private.CoreLib:System.StubHelpers:MngdRefCustomMarshaler", { &MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ClearManaged_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ClearManaged_I32_I32_I32_I32_RetVoid } }, + { 2311968855, "ClearNative#4:System.Private.CoreLib:System.StubHelpers:MngdRefCustomMarshaler", { &MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ClearNative_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ClearNative_I32_I32_I32_I32_RetVoid } }, + { 3113228365, "CompleteTask#1:System.Runtime.InteropServices.JavaScript:System.Runtime.InteropServices.JavaScript:JavaScriptExports", { &MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CompleteTask_I32_RetVoid, (void*)&Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CompleteTask_I32_RetVoid } }, + { 3378852959, "ConfigCallback#5:System.Private.CoreLib:System:GC", { &MD_System_Private_CoreLib_System_GC_ConfigCallback_I32_I32_I32_I32_I64_RetVoid, (void*)&Call_System_Private_CoreLib_System_GC_ConfigCallback_I32_I32_I32_I32_I64_RetVoid } }, + { 823296796, "ConvertContentsToManaged#4:System.Private.CoreLib:System.StubHelpers:MngdRefCustomMarshaler", { &MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ConvertContentsToManaged_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ConvertContentsToManaged_I32_I32_I32_I32_RetVoid } }, + { 3788988216, "ConvertContentsToNative#4:System.Private.CoreLib:System.StubHelpers:MngdRefCustomMarshaler", { &MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ConvertContentsToNative_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_ConvertContentsToNative_I32_I32_I32_I32_RetVoid } }, + { 4090197812, "ConvertToManaged#3:System.Private.CoreLib:System.StubHelpers:BSTRMarshaler", { &MD_System_Private_CoreLib_System_StubHelpers_BSTRMarshaler_ConvertToManaged_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_StubHelpers_BSTRMarshaler_ConvertToManaged_I32_I32_I32_RetVoid } }, + { 1901425681, "ConvertToNative#2:System.Private.CoreLib:System.StubHelpers:BSTRMarshaler", { &MD_System_Private_CoreLib_System_StubHelpers_BSTRMarshaler_ConvertToNative_I32_I32_RetI32, (void*)&Call_System_Private_CoreLib_System_StubHelpers_BSTRMarshaler_ConvertToNative_I32_I32_RetI32 } }, + { 1243134822, "Create#2:System.Private.CoreLib:System.Reflection:LoaderAllocator", { &MD_System_Private_CoreLib_System_Reflection_LoaderAllocator_Create_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Reflection_LoaderAllocator_Create_I32_I32_RetVoid } }, + { 1263271190, "Create#6:System.Private.CoreLib:System:TypeLoadException", { &MD_System_Private_CoreLib_System_TypeLoadException_Create_I32_I32_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_TypeLoadException_Create_I32_I32_I32_I32_I32_I32_RetVoid } }, + { 1584116929, "Create#7:System.Private.CoreLib:System.IO:FileLoadException", { &MD_System_Private_CoreLib_System_IO_FileLoadException_Create_I32_I32_I32_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_IO_FileLoadException_Create_I32_I32_I32_I32_I32_I32_I32_RetVoid } }, + { 509807279, "CreateArgumentException#5:System.Private.CoreLib:System:Exception", { &MD_System_Private_CoreLib_System_Exception_CreateArgumentException_I32_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Exception_CreateArgumentException_I32_I32_I32_I32_I32_RetVoid } }, + { 1570902419, "CreateAssemblyName#3:System.Private.CoreLib:System.Reflection:AssemblyName", { &MD_System_Private_CoreLib_System_Reflection_AssemblyName_CreateAssemblyName_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Reflection_AssemblyName_CreateAssemblyName_I32_I32_I32_RetVoid } }, + { 3054399043, "CreateRuntimeWrappedException#3:System.Private.CoreLib:System:Exception", { &MD_System_Private_CoreLib_System_Exception_CreateRuntimeWrappedException_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Exception_CreateRuntimeWrappedException_I32_I32_I32_RetVoid } }, + { 271519467, "CreateTargetInvocationException#3:System.Private.CoreLib:System:Exception", { &MD_System_Private_CoreLib_System_Exception_CreateTargetInvocationException_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Exception_CreateTargetInvocationException_I32_I32_I32_RetVoid } }, + { 3064803797, "CreateTypeInitializationException#4:System.Private.CoreLib:System:Exception", { &MD_System_Private_CoreLib_System_Exception_CreateTypeInitializationException_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Exception_CreateTypeInitializationException_I32_I32_I32_I32_RetVoid } }, + { 1196551088, "EnumCalendarInfoCallback#2:System.Private.CoreLib:System.Globalization:CalendarData", { &MD_System_Private_CoreLib_System_Globalization_CalendarData_EnumCalendarInfoCallback_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Globalization_CalendarData_EnumCalendarInfoCallback_I32_I32_RetVoid } }, + { 2401666169, "ExecuteInDefaultAppDomain#3:System.Private.CoreLib:System:Environment", { &MD_System_Private_CoreLib_System_Environment_ExecuteInDefaultAppDomain_I32_I32_I32_RetI32, (void*)&Call_System_Private_CoreLib_System_Environment_ExecuteInDefaultAppDomain_I32_I32_I32_RetI32 } }, + { 2605868264, "GetCodeInfo#6:System.Private.CoreLib:System:Resolver", { &MD_System_Private_CoreLib_System_Resolver_GetCodeInfo_I32_I32_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Resolver_GetCodeInfo_I32_I32_I32_I32_I32_I32_RetVoid } }, + { 3084636701, "GetCustomMarshalerInstance#5:System.Private.CoreLib:System.StubHelpers:MngdRefCustomMarshaler", { &MD_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_GetCustomMarshalerInstance_I32_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_StubHelpers_MngdRefCustomMarshaler_GetCustomMarshalerInstance_I32_I32_I32_I32_I32_RetVoid } }, + { 1641343147, "GetEHInfo#5:System.Private.CoreLib:System:Resolver", { &MD_System_Private_CoreLib_System_Resolver_GetEHInfo_I32_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Resolver_GetEHInfo_I32_I32_I32_I32_I32_RetVoid } }, + { 993231473, "GetFunctionPointer#6:System.Private.CoreLib:Internal.Runtime.InteropServices:ComponentActivator", { &MD_System_Private_CoreLib_Internal_Runtime_InteropServices_ComponentActivator_GetFunctionPointer_I32_I32_I32_I32_I32_I32_RetI32, (void*)&Call_System_Private_CoreLib_Internal_Runtime_InteropServices_ComponentActivator_GetFunctionPointer_I32_I32_I32_I32_I32_I32_RetI32 } }, + { 3098497371, "GetInterfaceImplementation#4:System.Private.CoreLib:System.Runtime.InteropServices:DynamicInterfaceCastableHelpers", { &MD_System_Private_CoreLib_System_Runtime_InteropServices_DynamicInterfaceCastableHelpers_GetInterfaceImplementation_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Runtime_InteropServices_DynamicInterfaceCastableHelpers_GetInterfaceImplementation_I32_I32_I32_I32_RetVoid } }, + { 4101188193, "GetJitContext#4:System.Private.CoreLib:System:Resolver", { &MD_System_Private_CoreLib_System_Resolver_GetJitContext_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Resolver_GetJitContext_I32_I32_I32_I32_RetVoid } }, + { 2512220404, "GetLocalsSignature#3:System.Private.CoreLib:System:Resolver", { &MD_System_Private_CoreLib_System_Resolver_GetLocalsSignature_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Resolver_GetLocalsSignature_I32_I32_I32_RetVoid } }, + { 1081971317, "GetManagedStackTrace#1:System.Runtime.InteropServices.JavaScript:System.Runtime.InteropServices.JavaScript:JavaScriptExports", { &MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_GetManagedStackTrace_I32_RetVoid, (void*)&Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_GetManagedStackTrace_I32_RetVoid } }, + { 1275372322, "GetResourceString#3:System.Private.CoreLib:System:Environment", { &MD_System_Private_CoreLib_System_Environment_GetResourceString_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Environment_GetResourceString_I32_I32_I32_RetVoid } }, + { 831291767, "GetStringLiteral#4:System.Private.CoreLib:System:Resolver", { &MD_System_Private_CoreLib_System_Resolver_GetStringLiteral_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Resolver_GetStringLiteral_I32_I32_I32_I32_RetVoid } }, + { 3370125186, "GetTypeHelper#7:System.Private.CoreLib:System.Reflection:TypeNameResolver", { &MD_System_Private_CoreLib_System_Reflection_TypeNameResolver_GetTypeHelper_I32_I32_I32_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Reflection_TypeNameResolver_GetTypeHelper_I32_I32_I32_I32_I32_I32_I32_RetVoid } }, + { 3481461579, "InitializeCommandLineArgs#5:System.Private.CoreLib:System:Environment", { &MD_System_Private_CoreLib_System_Environment_InitializeCommandLineArgs_I32_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Environment_InitializeCommandLineArgs_I32_I32_I32_I32_I32_RetVoid } }, + { 1351540042, "InitializeDefaultContext#1:System.Private.CoreLib:System.Runtime.Loader:AssemblyLoadContext", { &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_InitializeDefaultContext_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_InitializeDefaultContext_I32_RetVoid } }, + { 513042204, "InitializeDefaultEventSources#1:System.Private.CoreLib:System.Diagnostics.Tracing:EventSource", { &MD_System_Private_CoreLib_System_Diagnostics_Tracing_EventSource_InitializeDefaultEventSources_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Diagnostics_Tracing_EventSource_InitializeDefaultEventSources_I32_RetVoid } }, + { 266659693, "InitializeForMonitor#4:System.Private.CoreLib:System.Threading:Lock", { &MD_System_Private_CoreLib_System_Threading_Lock_InitializeForMonitor_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Threading_Lock_InitializeForMonitor_I32_I32_I32_I32_RetVoid } }, + { 288803216, "InternalPreserveStackTrace#2:System.Private.CoreLib:System:Exception", { &MD_System_Private_CoreLib_System_Exception_InternalPreserveStackTrace_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Exception_InternalPreserveStackTrace_I32_I32_RetVoid } }, + { 2611291109, "InvokeArrayContentsConverter#5:System.Private.CoreLib:System.StubHelpers:StubHelpers", { &MD_System_Private_CoreLib_System_StubHelpers_StubHelpers_InvokeArrayContentsConverter_I32_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_StubHelpers_StubHelpers_InvokeArrayContentsConverter_I32_I32_I32_I32_I32_RetVoid } }, + { 2854474997, "InvokeFunction#1:System.Private.CoreLib:System.Diagnostics:Debugger", { &MD_System_Private_CoreLib_System_Diagnostics_Debugger_InvokeFunction_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Diagnostics_Debugger_InvokeFunction_I32_RetVoid } }, + { 3290644746, "IsInterfaceImplemented#5:System.Private.CoreLib:System.Runtime.InteropServices:DynamicInterfaceCastableHelpers", { &MD_System_Private_CoreLib_System_Runtime_InteropServices_DynamicInterfaceCastableHelpers_IsInterfaceImplemented_I32_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Runtime_InteropServices_DynamicInterfaceCastableHelpers_IsInterfaceImplemented_I32_I32_I32_I32_I32_RetVoid } }, + { 1577711579, "LayoutTypeConvertToManaged#3:System.Private.CoreLib:System.StubHelpers:StubHelpers", { &MD_System_Private_CoreLib_System_StubHelpers_StubHelpers_LayoutTypeConvertToManaged_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_StubHelpers_StubHelpers_LayoutTypeConvertToManaged_I32_I32_I32_RetVoid } }, + { 2780693056, "LayoutTypeConvertToUnmanaged#3:System.Private.CoreLib:System.StubHelpers:StubHelpers", { &MD_System_Private_CoreLib_System_StubHelpers_StubHelpers_LayoutTypeConvertToUnmanaged_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_StubHelpers_StubHelpers_LayoutTypeConvertToUnmanaged_I32_I32_I32_RetVoid } }, + { 1086681967, "LoadLibraryCallbackStub#5:System.Private.CoreLib:System.Runtime.InteropServices:NativeLibrary", { &MD_System_Private_CoreLib_System_Runtime_InteropServices_NativeLibrary_LoadLibraryCallbackStub_I32_I32_I32_I32_I32_RetI32, (void*)&Call_System_Private_CoreLib_System_Runtime_InteropServices_NativeLibrary_LoadLibraryCallbackStub_I32_I32_I32_I32_I32_RetI32 } }, + { 705270488, "ManagedStartup#2:System.Private.CoreLib:System:StartupHookProvider", { &MD_System_Private_CoreLib_System_StartupHookProvider_ManagedStartup_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_StartupHookProvider_ManagedStartup_I32_I32_RetVoid } }, + { 343912841, "NewExternalTypeEntry#2:System.Private.CoreLib:System.Runtime.InteropServices:TypeMapLazyDictionary", { &MD_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewExternalTypeEntry_I32_I32_RetI32, (void*)&Call_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewExternalTypeEntry_I32_I32_RetI32 } }, + { 3515006989, "NewPrecachedExternalTypeMap#1:System.Private.CoreLib:System.Runtime.InteropServices:TypeMapLazyDictionary", { &MD_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewPrecachedExternalTypeMap_I32_RetI32, (void*)&Call_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewPrecachedExternalTypeMap_I32_RetI32 } }, + { 1731038108, "NewPrecachedProxyTypeMap#1:System.Private.CoreLib:System.Runtime.InteropServices:TypeMapLazyDictionary", { &MD_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewPrecachedProxyTypeMap_I32_RetI32, (void*)&Call_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewPrecachedProxyTypeMap_I32_RetI32 } }, + { 3327247096, "NewProxyTypeEntry#2:System.Private.CoreLib:System.Runtime.InteropServices:TypeMapLazyDictionary", { &MD_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewProxyTypeEntry_I32_I32_RetI32, (void*)&Call_System_Private_CoreLib_System_Runtime_InteropServices_TypeMapLazyDictionary_NewProxyTypeEntry_I32_I32_RetI32 } }, + { 3837429452, "OnAssemblyLoad#2:System.Private.CoreLib:System.Runtime.Loader:AssemblyLoadContext", { &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnAssemblyLoad_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnAssemblyLoad_I32_I32_RetVoid } }, + { 1632250712, "OnAssemblyResolve#4:System.Private.CoreLib:System.Runtime.Loader:AssemblyLoadContext", { &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnAssemblyResolve_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnAssemblyResolve_I32_I32_I32_I32_RetVoid } }, + { 3308959471, "OnFirstChanceException#2:System.Private.CoreLib:System:AppContext", { &MD_System_Private_CoreLib_System_AppContext_OnFirstChanceException_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_AppContext_OnFirstChanceException_I32_I32_RetVoid } }, + { 3570701864, "OnProcessExit#1:System.Private.CoreLib:System:AppContext", { &MD_System_Private_CoreLib_System_AppContext_OnProcessExit_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_AppContext_OnProcessExit_I32_RetVoid } }, + { 2158495436, "OnResourceResolve#4:System.Private.CoreLib:System.Runtime.Loader:AssemblyLoadContext", { &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnResourceResolve_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnResourceResolve_I32_I32_I32_I32_RetVoid } }, + { 2049352127, "OnThreadExited#2:System.Private.CoreLib:System.Threading:Thread", { &MD_System_Private_CoreLib_System_Threading_Thread_OnThreadExited_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Threading_Thread_OnThreadExited_I32_I32_RetVoid } }, + { 3572430398, "OnTypeResolve#4:System.Private.CoreLib:System.Runtime.Loader:AssemblyLoadContext", { &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnTypeResolve_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_OnTypeResolve_I32_I32_I32_I32_RetVoid } }, + { 4206970338, "OnUnhandledException#2:System.Private.CoreLib:System:AppContext", { &MD_System_Private_CoreLib_System_AppContext_OnUnhandledException_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_AppContext_OnUnhandledException_I32_I32_RetVoid } }, + { 1873201650, "ParseAsAssemblySpec#3:System.Private.CoreLib:System.Reflection:AssemblyName", { &MD_System_Private_CoreLib_System_Reflection_AssemblyName_ParseAsAssemblySpec_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Reflection_AssemblyName_ParseAsAssemblySpec_I32_I32_I32_RetVoid } }, + { 1403522766, "ReleaseJSOwnedObjectByGCHandle#1:System.Runtime.InteropServices.JavaScript:System.Runtime.InteropServices.JavaScript:JavaScriptExports", { &MD_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_ReleaseJSOwnedObjectByGCHandle_I32_RetVoid, (void*)&Call_System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_ReleaseJSOwnedObjectByGCHandle_I32_RetVoid } }, + { 225437511, "Resolve#4:System.Private.CoreLib:System.Runtime.Loader:AssemblyLoadContext", { &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_Resolve_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_Resolve_I32_I32_I32_I32_RetVoid } }, + { 260403842, "ResolveSatelliteAssembly#4:System.Private.CoreLib:System.Runtime.Loader:AssemblyLoadContext", { &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveSatelliteAssembly_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveSatelliteAssembly_I32_I32_I32_I32_RetVoid } }, + { 426514126, "ResolveSignature#5:System.Private.CoreLib:System:Resolver", { &MD_System_Private_CoreLib_System_Resolver_ResolveSignature_I32_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Resolver_ResolveSignature_I32_I32_I32_I32_I32_RetVoid } }, + { 2988924914, "ResolveToken#6:System.Private.CoreLib:System:Resolver", { &MD_System_Private_CoreLib_System_Resolver_ResolveToken_I32_I32_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Resolver_ResolveToken_I32_I32_I32_I32_I32_I32_RetVoid } }, + { 2195947930, "ResolveUnmanagedDll#3:System.Private.CoreLib:System.Runtime.Loader:AssemblyLoadContext", { &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUnmanagedDll_I32_I32_I32_RetI32, (void*)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUnmanagedDll_I32_I32_I32_RetI32 } }, + { 2050198231, "ResolveUnmanagedDllUsingEvent#4:System.Private.CoreLib:System.Runtime.Loader:AssemblyLoadContext", { &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUnmanagedDllUsingEvent_I32_I32_I32_I32_RetI32, (void*)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUnmanagedDllUsingEvent_I32_I32_I32_I32_RetI32 } }, + { 2533042349, "ResolveUsingEvent#4:System.Private.CoreLib:System.Runtime.Loader:AssemblyLoadContext", { &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUsingEvent_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_ResolveUsingEvent_I32_I32_I32_I32_RetVoid } }, + { 2883735131, "RhRethrow#2:System.Private.CoreLib:System.Runtime:EH", { &MD_System_Private_CoreLib_System_Runtime_EH_RhRethrow_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Runtime_EH_RhRethrow_I32_I32_RetVoid } }, + { 3929107505, "RhThrowEx#2:System.Private.CoreLib:System.Runtime:EH", { &MD_System_Private_CoreLib_System_Runtime_EH_RhThrowEx_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Runtime_EH_RhThrowEx_I32_I32_RetVoid } }, + { 504238190, "RhThrowHwEx#2:System.Private.CoreLib:System.Runtime:EH", { &MD_System_Private_CoreLib_System_Runtime_EH_RhThrowHwEx_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Runtime_EH_RhThrowHwEx_I32_I32_RetVoid } }, + { 4273572779, "RunFinalizers#0:System.Private.CoreLib:System:GC", { &MD_System_Private_CoreLib_System_GC_RunFinalizers_Void_RetI32, (void*)&Call_System_Private_CoreLib_System_GC_RunFinalizers_Void_RetI32 } }, + { 1963568864, "Setup#4:System.Private.CoreLib:System:AppContext", { &MD_System_Private_CoreLib_System_AppContext_Setup_I32_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_AppContext_Setup_I32_I32_I32_I32_RetVoid } }, + { 1343309100, "StartAssemblyLoad#3:System.Private.CoreLib:System.Runtime.Loader:AssemblyLoadContext", { &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_StartAssemblyLoad_I32_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_StartAssemblyLoad_I32_I32_I32_RetVoid } }, + { 3495913109, "StopAssemblyLoad#2:System.Private.CoreLib:System.Runtime.Loader:AssemblyLoadContext", { &MD_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_StopAssemblyLoad_I32_I32_RetVoid, (void*)&Call_System_Private_CoreLib_System_Runtime_Loader_AssemblyLoadContext_StopAssemblyLoad_I32_I32_RetVoid } }, + { 167179540, "TimerHandler#0:System.Private.CoreLib:System.Threading:TimerQueue", { &MD_System_Private_CoreLib_System_Threading_TimerQueue_TimerHandler_Void_RetVoid, (void*)&Call_System_Private_CoreLib_System_Threading_TimerQueue_TimerHandler_Void_RetVoid } } +}; + +const size_t g_ReverseThunksCount = sizeof(g_ReverseThunks) / sizeof(g_ReverseThunks[0]); diff --git a/src/coreclr/vm/wasm/generate-coreclr-helpers.md b/src/coreclr/vm/wasm/generate-coreclr-helpers.md index 5b1e42b06bf141..065b674ec113e7 100644 --- a/src/coreclr/vm/wasm/generate-coreclr-helpers.md +++ b/src/coreclr/vm/wasm/generate-coreclr-helpers.md @@ -26,6 +26,8 @@ By default the scripts generate **both** WebAssembly variations; pass `--target- | Target OS | Output directory | Default scan path (testhost) | |-----------|---------------------------------|------------------------------| | `browser` | `src/coreclr/vm/wasm/browser/` | `artifacts/bin/testhost/net12.0-browser--wasm/shared/Microsoft.NETCore.App/12.0.0/` | +| `browser-production` | `src/coreclr/vm/wasm/browser/production/` | `artifacts/obj/sfx-finish//net12.0-browser/illink-wasm-production/` | +| `browser-diagnostics` | `src/coreclr/vm/wasm/browser/diagnostics/` | `artifacts/obj/sfx-finish//net12.0-browser/illink-wasm-diagnostics/` | | `wasi` | `src/coreclr/vm/wasm/wasi/` | `artifacts/bin/testhost/net12.0-wasi--wasm/shared/Microsoft.NETCore.App/12.0.0/` | Each run emits three files into the output directory: @@ -65,16 +67,19 @@ provisions the Emscripten SDK (emsdk) automatically. From the repository root: +The browser build also produces the trimmed production and diagnostics managed closures consumed +by the two browser flavor tables. + **Windows:** ```cmd -.\build.cmd clr+libs -os browser -c Release -.\build.cmd clr+libs -os wasi -c Release +.\build.cmd clr+libs+host -os browser -c Release +.\build.cmd clr+libs+host -os wasi -c Release ``` **Linux/macOS:** ```bash -./build.sh clr+libs -os browser -c Release -./build.sh clr+libs -os wasi -c Release +./build.sh clr+libs+host -os browser -c Release +./build.sh clr+libs+host -os wasi -c Release ``` Notes: diff --git a/src/coreclr/vm/wasm/generate-coreclr-helpers.proj b/src/coreclr/vm/wasm/generate-coreclr-helpers.proj index 627b095bb5f19f..c489f80c19f062 100644 --- a/src/coreclr/vm/wasm/generate-coreclr-helpers.proj +++ b/src/coreclr/vm/wasm/generate-coreclr-helpers.proj @@ -36,12 +36,26 @@ <_WasmCallHelperTarget Include="browser" Condition="'$(CallHelperTargetOS)' == '' or '$(CallHelperTargetOS)' == 'browser'"> + browser $([MSBuild]::EnsureTrailingSlash('$(BrowserScanPath)')) $(_TesthostDir)$(NetCoreAppCurrent)-browser-$(Configuration)-wasm/shared/Microsoft.NETCore.App/$(_FrameworkVersion)/ + $(MSBuildThisFileDirectory)browser/ + + <_WasmCallHelperTarget Include="browser-production" Condition="'$(CallHelperTargetOS)' == '' or '$(CallHelperTargetOS)' == 'browser'"> + browser + $([MSBuild]::NormalizeDirectory('$(ArtifactsObjDir)', 'sfx-finish', '$(Configuration)', '$(NetCoreAppCurrent)-browser', 'illink-wasm-production')) + $(MSBuildThisFileDirectory)browser/production/ + + <_WasmCallHelperTarget Include="browser-diagnostics" Condition="'$(CallHelperTargetOS)' == '' or '$(CallHelperTargetOS)' == 'browser'"> + browser + $([MSBuild]::NormalizeDirectory('$(ArtifactsObjDir)', 'sfx-finish', '$(Configuration)', '$(NetCoreAppCurrent)-browser', 'illink-wasm-diagnostics')) + $(MSBuildThisFileDirectory)browser/diagnostics/ <_WasmCallHelperTarget Include="wasi" Condition="'$(CallHelperTargetOS)' == '' or '$(CallHelperTargetOS)' == 'wasi'"> + wasi $([MSBuild]::EnsureTrailingSlash('$(WasiScanPath)')) $(_TesthostDir)$(NetCoreAppCurrent)-wasi-$(Configuration)-wasm/shared/Microsoft.NETCore.App/$(_FrameworkVersion)/ + $(MSBuildThisFileDirectory)wasi/ @@ -93,13 +107,13 @@ - <_TargetOS>%(_WasmCallHelperTarget.Identity) + <_TargetOS>%(_WasmCallHelperTarget.TargetOS) <_ScanPath>%(_WasmCallHelperTarget.ScanPath) <_Crossgen2Path>$([MSBuild]::NormalizePath('$(ArtifactsBinDir)', 'coreclr', '$(_TargetOS).wasm.$(Configuration)', '$(BuildArchitecture)', 'crossgen2', 'crossgen2$(ExeSuffix)')) - <_OutputDir>$(MSBuildThisFileDirectory)$(_TargetOS)/ - <_ResponseFileDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsObjDir)', 'wasm-callhelpers', '$(_TargetOS)')) + <_OutputDir>%(_WasmCallHelperTarget.OutputDir) + <_ResponseFileDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsObjDir)', 'wasm-callhelpers', '%(_WasmCallHelperTarget.Identity)')) <_ResponseFile>$(_ResponseFileDir)generate-coreclr-helpers.rsp <_StagingDir>$(_ResponseFileDir)generated/ @@ -107,12 +121,12 @@ + Text="Scan path for %(_WasmCallHelperTarget.Identity) does not exist: $(_ScanPath). Build the runtime packs first: $(_BuildScript) clr+libs+host -os $(_TargetOS) -c $(Configuration)" /> - - + + diff --git a/src/coreclr/vm/wks/CMakeLists.txt b/src/coreclr/vm/wks/CMakeLists.txt index 96ec823932fb08..03152f31bbbae8 100644 --- a/src/coreclr/vm/wks/CMakeLists.txt +++ b/src/coreclr/vm/wks/CMakeLists.txt @@ -11,6 +11,12 @@ add_library_clr(cee_wks_mergeable OBJECT ${VM_SOURCES_WKS_SPECIAL}) if (CLR_CMAKE_TARGET_ARCH_WASM AND VM_SOURCES_WKS_GEN) add_library_clr(cee_wks_gen OBJECT ${VM_SOURCES_WKS_GEN}) endif() +if (CLR_CMAKE_TARGET_ARCH_WASM AND VM_SOURCES_WKS_GEN_PRODUCTION) + add_library_clr(cee_wks_gen_production OBJECT ${VM_SOURCES_WKS_GEN_PRODUCTION}) +endif() +if (CLR_CMAKE_TARGET_ARCH_WASM AND VM_SOURCES_WKS_GEN_DIAGNOSTICS) + add_library_clr(cee_wks_gen_diagnostics OBJECT ${VM_SOURCES_WKS_GEN_DIAGNOSTICS}) +endif() target_precompile_headers(cee_wks_core PRIVATE [["common.h"]]) target_precompile_headers(cee_wks PRIVATE [["common.h"]]) @@ -19,6 +25,12 @@ target_precompile_headers(cee_wks_mergeable PRIVATE [["common.h"]]) if (TARGET cee_wks_gen) target_precompile_headers(cee_wks_gen PRIVATE [["common.h"]]) endif() +if (TARGET cee_wks_gen_production) + target_precompile_headers(cee_wks_gen_production PRIVATE [["common.h"]]) +endif() +if (TARGET cee_wks_gen_diagnostics) + target_precompile_headers(cee_wks_gen_diagnostics PRIVATE [["common.h"]]) +endif() if (MSVC) # corelib.cpp does not compile with precompiled header file @@ -32,6 +44,12 @@ add_dependencies(cee_wks_mergeable eventing_headers) if (TARGET cee_wks_gen) add_dependencies(cee_wks_gen eventing_headers) endif() +if (TARGET cee_wks_gen_production) + add_dependencies(cee_wks_gen_production eventing_headers) +endif() +if (TARGET cee_wks_gen_diagnostics) + add_dependencies(cee_wks_gen_diagnostics eventing_headers) +endif() if (CLR_CMAKE_TARGET_WIN32) if(NOT CLR_CMAKE_HOST_ARCH_ARM AND NOT CLR_CMAKE_HOST_ARCH_ARM64) @@ -61,6 +79,12 @@ add_dependencies(cee_wks_mergeable precompiled_asm) if (TARGET cee_wks_gen) add_dependencies(cee_wks_gen precompiled_asm) endif() +if (TARGET cee_wks_gen_production) + add_dependencies(cee_wks_gen_production precompiled_asm) +endif() +if (TARGET cee_wks_gen_diagnostics) + add_dependencies(cee_wks_gen_diagnostics precompiled_asm) +endif() target_compile_definitions(cee_wks_mergeable PUBLIC FEATURE_STATICALLY_LINKED) target_compile_definitions(cee_wks_mergeable PUBLIC CORECLR_EMBEDDED) diff --git a/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props b/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props index 625a1ebc48ae07..2d4300984f0c4c 100644 --- a/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props +++ b/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props @@ -109,9 +109,11 @@ + + + - diff --git a/src/native/corehost/browserhost/browserhost.proj b/src/native/corehost/browserhost/browserhost.proj index 2703612b768ae6..9a9b9bc598bde8 100644 --- a/src/native/corehost/browserhost/browserhost.proj +++ b/src/native/corehost/browserhost/browserhost.proj @@ -31,6 +31,13 @@ $(BrowserHostStackSize) + + + + + - From f6a2a3436ea27554b8291f6c65a9122daa8a4971 Mon Sep 17 00:00:00 2001 From: pavelsavara Date: Fri, 13 Nov 2026 18:46:07 +0100 Subject: [PATCH 3/5] [browser][coreclr] Fix managed flavor CI behavior Preserve the complete framework implementation while applying EventSource substitutions, distinguish workload defaults from explicit settings, and defer flavor asset validation until runtime-pack selection. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../wasm/browser/diagnostics/callhelpers-pinvoke.cpp | 6 +++++- .../vm/wasm/browser/production/callhelpers-pinvoke.cpp | 10 +++++++++- src/libraries/sfx-finish.proj | 8 +++++--- ...ft.NET.Sdk.WebAssembly.Browser.UserSettings.targets | 2 +- .../WasmFeatures.props | 1 + src/native/corehost/browserhost/browserhost.proj | 2 +- 6 files changed, 22 insertions(+), 7 deletions(-) diff --git a/src/coreclr/vm/wasm/browser/diagnostics/callhelpers-pinvoke.cpp b/src/coreclr/vm/wasm/browser/diagnostics/callhelpers-pinvoke.cpp index 6d406da5e8574d..abf461cc5f7699 100644 --- a/src/coreclr/vm/wasm/browser/diagnostics/callhelpers-pinvoke.cpp +++ b/src/coreclr/vm/wasm/browser/diagnostics/callhelpers-pinvoke.cpp @@ -30,6 +30,7 @@ extern "C" { int32_t GlobalizationNative_GetCalendarInfo (void *, uint32_t, int32_t, void *, int32_t); int32_t GlobalizationNative_GetCalendars (void *, void *, int32_t); int32_t GlobalizationNative_GetDefaultLocaleName (void *, int32_t); + int32_t GlobalizationNative_GetICUVersion (); int32_t GlobalizationNative_GetJapaneseEraStartDate (int32_t, void *, void *, void *); int32_t GlobalizationNative_GetLatestJapaneseEra (); int32_t GlobalizationNative_GetLocaleInfoGroupingSizes (void *, uint32_t, void *, void *); @@ -160,6 +161,7 @@ static const Entry s_libSystem_Globalization_Native [] = { DllImportEntry(GlobalizationNative_GetCalendarInfo) // System.Private.CoreLib DllImportEntry(GlobalizationNative_GetCalendars) // System.Private.CoreLib DllImportEntry(GlobalizationNative_GetDefaultLocaleName) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_GetICUVersion) // System.Private.CoreLib DllImportEntry(GlobalizationNative_GetJapaneseEraStartDate) // System.Private.CoreLib DllImportEntry(GlobalizationNative_GetLatestJapaneseEra) // System.Private.CoreLib DllImportEntry(GlobalizationNative_GetLocaleInfoGroupingSizes) // System.Private.CoreLib @@ -307,7 +309,7 @@ typedef struct PInvokeTable { } PInvokeTable; static PInvokeTable s_PInvokeTables[] = { - {"libSystem.Globalization.Native", s_libSystem_Globalization_Native, 33}, + {"libSystem.Globalization.Native", s_libSystem_Globalization_Native, 34}, {"libSystem.IO.Compression.Native", s_libSystem_IO_Compression_Native, 9}, {"libSystem.Native", s_libSystem_Native, 87}, {"libSystem.Native.Browser", s_libSystem_Native_Browser, 1}, @@ -575,6 +577,7 @@ extern "C" { int32_t QCall_Signature_AreEqual (void *, int32_t, void *, void *, int32_t, void *, void *) __asm__("Signature_AreEqual"); void QCall_Signature_GetCustomModifiersAtOffset (void *, int32_t, int32_t, void *, void *) __asm__("Signature_GetCustomModifiersAtOffset"); void QCall_Signature_Init (void *, void *, int32_t, void *, void *, void *) __asm__("Signature_Init"); + void * QCall_StackFrame_GetMethodDescFromNativeIP (void *, void *) __asm__("StackFrame_GetMethodDescFromNativeIP"); void QCall_StackTrace_GetStackFramesInternal (void *, int32_t, void *, void *) __asm__("StackTrace_GetStackFramesInternal"); int32_t QCall_Stream_HasOverriddenSlow (void *, int32_t, void *) __asm__("Stream_HasOverriddenSlow"); void QCall_String_Intern (void *, void *) __asm__("String_Intern"); @@ -877,6 +880,7 @@ static const Entry s_QCall[] = { { "Signature_AreEqual", (void*)&QCall_Signature_AreEqual }, { "Signature_GetCustomModifiersAtOffset", (void*)&QCall_Signature_GetCustomModifiersAtOffset }, { "Signature_Init", (void*)&QCall_Signature_Init }, + { "StackFrame_GetMethodDescFromNativeIP", (void*)&QCall_StackFrame_GetMethodDescFromNativeIP }, { "StackTrace_GetStackFramesInternal", (void*)&QCall_StackTrace_GetStackFramesInternal }, { "Stream_HasOverriddenSlow", (void*)&QCall_Stream_HasOverriddenSlow }, { "String_Intern", (void*)&QCall_String_Intern }, diff --git a/src/coreclr/vm/wasm/browser/production/callhelpers-pinvoke.cpp b/src/coreclr/vm/wasm/browser/production/callhelpers-pinvoke.cpp index 172acacdb9bdc9..abf461cc5f7699 100644 --- a/src/coreclr/vm/wasm/browser/production/callhelpers-pinvoke.cpp +++ b/src/coreclr/vm/wasm/browser/production/callhelpers-pinvoke.cpp @@ -30,6 +30,7 @@ extern "C" { int32_t GlobalizationNative_GetCalendarInfo (void *, uint32_t, int32_t, void *, int32_t); int32_t GlobalizationNative_GetCalendars (void *, void *, int32_t); int32_t GlobalizationNative_GetDefaultLocaleName (void *, int32_t); + int32_t GlobalizationNative_GetICUVersion (); int32_t GlobalizationNative_GetJapaneseEraStartDate (int32_t, void *, void *, void *); int32_t GlobalizationNative_GetLatestJapaneseEra (); int32_t GlobalizationNative_GetLocaleInfoGroupingSizes (void *, uint32_t, void *, void *); @@ -160,6 +161,7 @@ static const Entry s_libSystem_Globalization_Native [] = { DllImportEntry(GlobalizationNative_GetCalendarInfo) // System.Private.CoreLib DllImportEntry(GlobalizationNative_GetCalendars) // System.Private.CoreLib DllImportEntry(GlobalizationNative_GetDefaultLocaleName) // System.Private.CoreLib + DllImportEntry(GlobalizationNative_GetICUVersion) // System.Private.CoreLib DllImportEntry(GlobalizationNative_GetJapaneseEraStartDate) // System.Private.CoreLib DllImportEntry(GlobalizationNative_GetLatestJapaneseEra) // System.Private.CoreLib DllImportEntry(GlobalizationNative_GetLocaleInfoGroupingSizes) // System.Private.CoreLib @@ -307,7 +309,7 @@ typedef struct PInvokeTable { } PInvokeTable; static PInvokeTable s_PInvokeTables[] = { - {"libSystem.Globalization.Native", s_libSystem_Globalization_Native, 33}, + {"libSystem.Globalization.Native", s_libSystem_Globalization_Native, 34}, {"libSystem.IO.Compression.Native", s_libSystem_IO_Compression_Native, 9}, {"libSystem.Native", s_libSystem_Native, 87}, {"libSystem.Native.Browser", s_libSystem_Native_Browser, 1}, @@ -409,6 +411,7 @@ extern "C" { void QCall_EventPipeInternal_DeleteProvider (void *, void *) __asm__("EventPipeInternal_DeleteProvider"); void QCall_EventPipeInternal_Disable (uint64_t, void *) __asm__("EventPipeInternal_Disable"); uint64_t QCall_EventPipeInternal_Enable (void *, int32_t, uint32_t, void *, uint32_t, void *) __asm__("EventPipeInternal_Enable"); + int32_t QCall_EventPipeInternal_EventActivityIdControl (uint32_t, void *, void *) __asm__("EventPipeInternal_EventActivityIdControl"); int32_t QCall_EventPipeInternal_GetNextEvent (uint64_t, void *, void *) __asm__("EventPipeInternal_GetNextEvent"); void * QCall_EventPipeInternal_GetProvider (void *, void *) __asm__("EventPipeInternal_GetProvider"); int32_t QCall_EventPipeInternal_GetSessionInfo (uint64_t, void *, void *) __asm__("EventPipeInternal_GetSessionInfo"); @@ -524,6 +527,7 @@ extern "C" { void QCall_RuntimeFieldHandle_SetValueDirect (void *, void *, void *, void *, void *, void *) __asm__("RuntimeFieldHandle_SetValueDirect"); void QCall_RuntimeMethodHandle_ConstructInstantiation (void *, int32_t, void *, void *) __asm__("RuntimeMethodHandle_ConstructInstantiation"); void QCall_RuntimeMethodHandle_Destroy (void *, void *) __asm__("RuntimeMethodHandle_Destroy"); + void * QCall_RuntimeMethodHandle_GetDiagnosticCodeStart (void *, void *) __asm__("RuntimeMethodHandle_GetDiagnosticCodeStart"); void * QCall_RuntimeMethodHandle_GetFunctionPointer (void *, void *) __asm__("RuntimeMethodHandle_GetFunctionPointer"); void QCall_RuntimeMethodHandle_GetMethodBody (void *, void *, void *, void *) __asm__("RuntimeMethodHandle_GetMethodBody"); void QCall_RuntimeMethodHandle_GetMethodInstantiation (void *, void *, int32_t, void *) __asm__("RuntimeMethodHandle_GetMethodInstantiation"); @@ -573,6 +577,7 @@ extern "C" { int32_t QCall_Signature_AreEqual (void *, int32_t, void *, void *, int32_t, void *, void *) __asm__("Signature_AreEqual"); void QCall_Signature_GetCustomModifiersAtOffset (void *, int32_t, int32_t, void *, void *) __asm__("Signature_GetCustomModifiersAtOffset"); void QCall_Signature_Init (void *, void *, int32_t, void *, void *, void *) __asm__("Signature_Init"); + void * QCall_StackFrame_GetMethodDescFromNativeIP (void *, void *) __asm__("StackFrame_GetMethodDescFromNativeIP"); void QCall_StackTrace_GetStackFramesInternal (void *, int32_t, void *, void *) __asm__("StackTrace_GetStackFramesInternal"); int32_t QCall_Stream_HasOverriddenSlow (void *, int32_t, void *) __asm__("Stream_HasOverriddenSlow"); void QCall_String_Intern (void *, void *) __asm__("String_Intern"); @@ -709,6 +714,7 @@ static const Entry s_QCall[] = { { "EventPipeInternal_DeleteProvider", (void*)&QCall_EventPipeInternal_DeleteProvider }, { "EventPipeInternal_Disable", (void*)&QCall_EventPipeInternal_Disable }, { "EventPipeInternal_Enable", (void*)&QCall_EventPipeInternal_Enable }, + { "EventPipeInternal_EventActivityIdControl", (void*)&QCall_EventPipeInternal_EventActivityIdControl }, { "EventPipeInternal_GetNextEvent", (void*)&QCall_EventPipeInternal_GetNextEvent }, { "EventPipeInternal_GetProvider", (void*)&QCall_EventPipeInternal_GetProvider }, { "EventPipeInternal_GetSessionInfo", (void*)&QCall_EventPipeInternal_GetSessionInfo }, @@ -824,6 +830,7 @@ static const Entry s_QCall[] = { { "RuntimeFieldHandle_SetValueDirect", (void*)&QCall_RuntimeFieldHandle_SetValueDirect }, { "RuntimeMethodHandle_ConstructInstantiation", (void*)&QCall_RuntimeMethodHandle_ConstructInstantiation }, { "RuntimeMethodHandle_Destroy", (void*)&QCall_RuntimeMethodHandle_Destroy }, + { "RuntimeMethodHandle_GetDiagnosticCodeStart", (void*)&QCall_RuntimeMethodHandle_GetDiagnosticCodeStart }, { "RuntimeMethodHandle_GetFunctionPointer", (void*)&QCall_RuntimeMethodHandle_GetFunctionPointer }, { "RuntimeMethodHandle_GetMethodBody", (void*)&QCall_RuntimeMethodHandle_GetMethodBody }, { "RuntimeMethodHandle_GetMethodInstantiation", (void*)&QCall_RuntimeMethodHandle_GetMethodInstantiation }, @@ -873,6 +880,7 @@ static const Entry s_QCall[] = { { "Signature_AreEqual", (void*)&QCall_Signature_AreEqual }, { "Signature_GetCustomModifiersAtOffset", (void*)&QCall_Signature_GetCustomModifiersAtOffset }, { "Signature_Init", (void*)&QCall_Signature_Init }, + { "StackFrame_GetMethodDescFromNativeIP", (void*)&QCall_StackFrame_GetMethodDescFromNativeIP }, { "StackTrace_GetStackFramesInternal", (void*)&QCall_StackTrace_GetStackFramesInternal }, { "Stream_HasOverriddenSlow", (void*)&QCall_Stream_HasOverriddenSlow }, { "String_Intern", (void*)&QCall_String_Intern }, diff --git a/src/libraries/sfx-finish.proj b/src/libraries/sfx-finish.proj index af249e20b478be..a7b9622fd8710c 100644 --- a/src/libraries/sfx-finish.proj +++ b/src/libraries/sfx-finish.proj @@ -106,7 +106,8 @@ <_SharedFrameworkTrimFlavorSuffix Condition="'$(SharedFrameworkTrimFlavor)' != ''">-$(SharedFrameworkTrimFlavor) $([MSBuild]::NormalizeDirectory('$(IntermediateOutputPath)', 'illink-$(TargetArchitecture)$(_SharedFrameworkTrimFlavorSuffix)')) - $(SharedFrameworkAssembliesTrimDir)linker-marker.txt + <_SharedFrameworkTrimRootModeSuffix Condition="'$(SharedFrameworkTrimRootMode)' != ''">-$(SharedFrameworkTrimRootMode) + $(SharedFrameworkAssembliesTrimDir)linker-marker$(_SharedFrameworkTrimRootModeSuffix).txt @@ -134,13 +135,14 @@ $(ILLinkArgs) $(SharedFrameworkILLinkArgs) --link-attributes "@(SharedFrameworkSuppressionsXml, '" --link-attributes "')" - IL2121 + IL2121 <_SharedFrameworkRootAssemblyName Include="@(SharedFrameworkAssembly->'%(Filename)')"> - library + library + $(SharedFrameworkTrimRootMode) diff --git a/src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.Browser.UserSettings.targets b/src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.Browser.UserSettings.targets index d9d99e81342273..7bfc5f5ab4da60 100644 --- a/src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.Browser.UserSettings.targets +++ b/src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.Browser.UserSettings.targets @@ -10,7 +10,7 @@ Copyright (c) .NET Foundation. All rights reserved. <_WasmCoreClrEnableDiagnosticsSpecified Condition="'$(EnableDiagnostics)' != ''">true - <_WasmCoreClrEventSourceSupportSpecified Condition="'$(EventSourceSupport)' != ''">true + <_WasmCoreClrEventSourceSupportSpecified Condition="'$(EventSourceSupport)' != '' and '$(_WasmEventSourceSupportDefaulted)' != 'true'">true diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Current.Manifest/WasmFeatures.props b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Current.Manifest/WasmFeatures.props index 6e1d190b53b467..e3f0cf7eebca5e 100644 --- a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Current.Manifest/WasmFeatures.props +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Current.Manifest/WasmFeatures.props @@ -2,6 +2,7 @@ false false + <_WasmEventSourceSupportDefaulted Condition="'$(EventSourceSupport)' == ''">true false false true diff --git a/src/native/corehost/browserhost/browserhost.proj b/src/native/corehost/browserhost/browserhost.proj index 9a9b9bc598bde8..55560fd4750cd7 100644 --- a/src/native/corehost/browserhost/browserhost.proj +++ b/src/native/corehost/browserhost/browserhost.proj @@ -42,7 +42,7 @@ + Properties="Configuration=$(LibrariesConfiguration);TargetOS=browser;TargetArchitecture=wasm;RuntimeFlavor=CoreCLR;BuildProjectReferences=false;RunILLinkInBuild=true;SharedFrameworkTrimFlavor=$(BrowserHostNativeFlavor);SharedFrameworkTrimInputDir=$(LibrariesSharedFrameworkBinArtifactsPath);SharedFrameworkTrimCoreLibPath=$(CoreCLRArtifactsPath)System.Private.CoreLib.dll;SharedFrameworkTrimRootMode=all;EventSourceSupport=$(EventSourceSupport);EnableDiagnostics=$(EnableDiagnostics)" /> Date: Fri, 20 Nov 2026 15:53:57 +0100 Subject: [PATCH 4/5] [browser][coreclr] Fix fresh-main flavor integration Adapt the Browser EventPipe component boundary to static provider event tables, stage diagnostics assets for EventSource-enabled library tests, and skip publish boot config work in native-only nested publishes. Regenerate the checked-in flavor helpers for the current CoreLib ABI. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- eng/liveBuilds.targets | 8 +- eng/testing/tests.browser.targets | 2 + .../diagnostics/callhelpers-pinvoke.cpp | 1612 +++++++++++------ .../diagnostics/callhelpers-reverse.cpp | 593 ++++-- .../production/callhelpers-pinvoke.cpp | 1612 +++++++++++------ .../production/callhelpers-reverse.cpp | 593 ++++-- ...rosoft.NET.Sdk.WebAssembly.Browser.targets | 5 +- 7 files changed, 3015 insertions(+), 1410 deletions(-) diff --git a/eng/liveBuilds.targets b/eng/liveBuilds.targets index eecf25270cb920..e57bffc5456e72 100644 --- a/eng/liveBuilds.targets +++ b/eng/liveBuilds.targets @@ -322,12 +322,18 @@ " IsNative="true" /> - + false true $(EventSourceSupport) + <_WasmCoreClrEventSourceSupportSpecified Condition="'$(RuntimeFlavor)' == 'CoreCLR'">true + <_WasmCoreClrEnableDiagnosticsSpecified Condition="'$(RuntimeFlavor)' == 'CoreCLR'">true true @@ -1392,6 +1394,7 @@ Copyright (c) .NET Foundation. All rights reserved. extensions, property stamp) are older than the output, the target is skipped. --> From 0059919b6ac6d9c87c8103ceb5a91613d3fe65f6 Mon Sep 17 00:00:00 2001 From: Pavel Savara Date: Wed, 25 Nov 2026 13:18:36 +0100 Subject: [PATCH 5/5] [browser][coreclr] Verify EventListener on the production prelink Enable the managed EventSource switch directly in the untrimmed test app so the diagnostics alias cannot swap in an enabled EventPipe runtime. Compare the published WASM with the production asset before checking listener delivery. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Blazor/EventPipeDiagnosticsTests.cs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/mono/wasm/Wasm.Build.Tests/Blazor/EventPipeDiagnosticsTests.cs b/src/mono/wasm/Wasm.Build.Tests/Blazor/EventPipeDiagnosticsTests.cs index 24ba33192043a8..accf5da7bcdd54 100644 --- a/src/mono/wasm/Wasm.Build.Tests/Blazor/EventPipeDiagnosticsTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/Blazor/EventPipeDiagnosticsTests.cs @@ -57,7 +57,15 @@ public async Task CoreClrPrelinkedProductionSupportsManagedEventListener() { Configuration config = Configuration.Debug; ProjectInfo info = CopyTestAsset(config, aot: false, TestAsset.BlazorBasicTestApp, "coreclr_production_listener", - extraProperties: "true"); + extraProperties: "falsefalse", + insertAtEnd: """ + + + + + + + """); UpdateFile("Program.cs", new Dictionary { ["var builder"] = """ @@ -109,7 +117,12 @@ protected override void OnEventWritten(EventWrittenEventArgs eventData) """ }); - PublishProject(info, config, new PublishOptions(AssertAppBundle: false, UseCache: false)); + (string _, string output) = PublishProject(info, config, new PublishOptions(AssertAppBundle: false, UseCache: false)); + string runtimePackDir = Assert.IsType(ProjectProviderBase.TryGetRuntimePackDirFromBuildOutput(output)); + string expectedWasm = Path.Combine(runtimePackDir, "runtimes", BuildEnvironment.DefaultRuntimeIdentifier, "native", "dotnet.native.wasm"); + string actualWasm = Assert.Single(Directory.GetFiles(GetBuildPaths(config, forPublish: true).BinFrameworkDir, "dotnet.native*.wasm")); + TestUtils.AssertSameFile(expectedWasm, actualWasm); + bool received = false; bool receivedDynamic = false; await RunForPublishWithWebServer(new BlazorRunOptions(config,