Repository navigation
Enable building a stubbed NativeAOT WASM CoreLib #134210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jtschuster
wants to merge
22
commits into
dotnet:main
Choose a base branch
from
jtschuster:nativeaot-wasm-runtime-pack
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
e4e1cc3
Add stubbed browser WASM NativeAOT CoreLib
jtschuster 9cfab06
remove extra stuff
jtschuster f87741c
Tighten browser WASM CoreLib stubs
jtschuster b71f149
Simplify browser WASM CoreLib configuration
jtschuster 9d47d3b
Enable clr.nativeaotlibs subset for browser-wasm
jtschuster da4f8bb
Fix RhpThrow* helpers and remove unnecessary comment
jtschuster 0159f79
Match clr.featuredefines.props and coalesce setting the same property…
jtschuster e33dd4d
Remove Browser filter on shared wasm msbuild confitions, remove NoInl…
jtschuster 0926af3
Add TARGET_WASI, rename *.Browser.cs to *.Wasm.cs
jtschuster 7c1dc98
Update comments to remove 'Browser-' prefix for WASM
jtschuster b1069b0
Merge branch 'main' of https://github.com/dotnet/runtime into nativea…
jtschuster 8d2cb42
Merge branch 'nativeaot-wasm-runtime-pack' of https://github.com/jtsc…
jtschuster b833d39
Address PR feedback
jtschuster 94f8ffe
Address feedback
jtschuster eda7efc
Condition ComAwareWeakReference on FeatureComInterop || FeatureComWra…
jtschuster f72ffd3
Make RuntimeImports use (!)TARGET_WINDOWS instead of TARGET_UNIX
jtschuster 1f54ed1
Use !TARGET_WINDOWS in Thread.NativeAot.cs
jtschuster eb9b2e7
Remove FeatureComInterop condition for ComAwareWeakReference
jtschuster 830484f
Merge branch 'main' of https://github.com/dotnet/runtime into nativea…
jtschuster 7c95ee1
Let ifdef's exclude ComWrappers source, not msbuild conditions
jtschuster e3cc912
Remove arg from CreateThunksHeap
jtschuster 54e29f3
Merge branch 'main' of https://github.com/dotnet/runtime into nativea…
jtschuster File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/ExceptionHandling.wasm.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
|
|
||
| using System.Diagnostics; | ||
|
|
||
| using Internal.Runtime; | ||
|
|
||
| namespace System.Runtime | ||
| { | ||
| // These exports preserve the WASM compiler/runtime ABI while exception dispatch | ||
| // remains unimplemented. | ||
| internal static unsafe partial class EH | ||
| { | ||
| internal struct ExInfo | ||
| { | ||
| } | ||
|
|
||
| [RuntimeExport("RhpThrowEx")] | ||
| private static void RhpThrowEx(object exception) | ||
| { | ||
| FallbackFailFast(RhFailFastReason.InternalError, exception); | ||
| } | ||
|
|
||
| [RuntimeExport("RhpThrowExact")] | ||
| private static void RhpThrowExact(object exception) | ||
| { | ||
| FallbackFailFast(RhFailFastReason.InternalError, exception); | ||
| } | ||
|
|
||
| [RuntimeExport("RhpRethrow")] | ||
| private static void RhpRethrow() | ||
| { | ||
| FallbackFailFast(RhFailFastReason.InternalError, null); | ||
| } | ||
|
|
||
| [RuntimeExport("RhpHandleExceptionWasmCatch")] | ||
| private static object RhpHandleExceptionWasmCatch(nuint catchUnwindIndex) | ||
| { | ||
| _ = catchUnwindIndex; | ||
| FallbackFailFast(RhFailFastReason.InternalError, null); | ||
| return null!; | ||
| } | ||
|
|
||
| [RuntimeExport("RhpPopUnwoundSparseVirtualFrames")] | ||
| private static void RhpPopUnwoundSparseVirtualFrames() | ||
| { | ||
| } | ||
|
|
||
| [RuntimeExport("RhpHandleUnhandledException")] | ||
| private static void RhpHandleUnhandledException(object exception) | ||
| { | ||
| FallbackFailFast(RhFailFastReason.UnhandledException, exception); | ||
| } | ||
|
|
||
| [RuntimeExport("RhGetCurrentThreadStackTrace")] | ||
| private static int RhGetCurrentThreadStackTrace(IntPtr[] outputBuffer) | ||
| { | ||
| _ = outputBuffer; | ||
| return 0; | ||
| } | ||
|
|
||
| [StackTraceHidden] | ||
| [DebuggerHidden] | ||
| [RuntimeExport("RhExceptionHandling_FailedAllocation")] | ||
| public static void FailedAllocation(MethodTable* pEEType, bool fIsOverflow) | ||
| { | ||
| _ = pEEType; | ||
| _ = fIsOverflow; | ||
| FallbackFailFast(RhFailFastReason.InternalError, null); | ||
| } | ||
|
|
||
| internal static void FallbackFailFast(RhFailFastReason reason, object? unhandledException) | ||
| { | ||
| _ = reason; | ||
| _ = unhandledException; | ||
| InternalCalls.RhpFallbackFailFast(); | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Valid feedback
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can create additional PR upstream so overwriting doesn’t revert it, without dropping the changes here. It’s not exactly prohibited.