-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Open
Labels
arch-wasmWebAssembly architectureWebAssembly architecturearea-Hostos-browserBrowser variant of arch-wasmBrowser variant of arch-wasm
Milestone
Description
Cleanup the code from #120976 that does lookup of the original async Main
Remove code:
runtime/src/coreclr/vm/assembly.cpp
Lines 1132 to 1153 in ac7db14
| #if defined(TARGET_BROWSER) | |
| // WASM-TODO: this validation is too trivial, but that's OK for now because we plan to remove browser specific hack later. | |
| // https://github.com/dotnet/runtime/issues/121064 | |
| if (nReturnType == ELEMENT_TYPE_GENERICINST) | |
| { | |
| if (nParamCount > 1) | |
| ThrowMainMethodException(pFD, IDS_EE_TO_MANY_ARGUMENTS_IN_MAIN); | |
| // this is Task<int> Main(String[] args) | |
| *pType = EntryManagedMainAsync; | |
| return; | |
| } | |
| if (nReturnType == ELEMENT_TYPE_CLASS) | |
| { | |
| if (nParamCount > 1) | |
| ThrowMainMethodException(pFD, IDS_EE_TO_MANY_ARGUMENTS_IN_MAIN); | |
| // this is Task Main(String[] args) | |
| *pType = EntryManagedMainAsyncVoid; | |
| return; | |
| } | |
| #endif // TARGET_BROWSER |
runtime/src/coreclr/vm/assembly.cpp
Lines 1226 to 1253 in ac7db14
| // WASM-TODO: remove this | |
| // https://github.com/dotnet/runtime/issues/121064 | |
| #if defined(TARGET_BROWSER) | |
| else if (pParam->EntryType == EntryManagedMainAsync) | |
| { | |
| *pParam->piRetVal = 0; | |
| MethodDescCallSite mainWrapper(METHOD__ASYNC_HELPERS__HANDLE_ASYNC_ENTRYPOINT); | |
| OBJECTREF exitCodeTask = threadStart.Call_RetOBJECTREF(&stackVar); | |
| ARG_SLOT stackVarWrapper[] = | |
| { | |
| ObjToArgSlot(exitCodeTask) | |
| }; | |
| mainWrapper.Call(stackVarWrapper); | |
| } | |
| else if (pParam->EntryType == EntryManagedMainAsyncVoid) | |
| { | |
| *pParam->piRetVal = 0; | |
| MethodDescCallSite mainWrapper(METHOD__ASYNC_HELPERS__HANDLE_ASYNC_ENTRYPOINT_VOID); | |
| OBJECTREF exitCodeTask = threadStart.Call_RetOBJECTREF(&stackVar); | |
| ARG_SLOT stackVarWrapper[] = | |
| { | |
| ObjToArgSlot(exitCodeTask) | |
| }; | |
| mainWrapper.Call(stackVarWrapper); | |
| } | |
| #endif // TARGET_BROWSER |
Depends on #121046
Depends on dotnet/roslyn#80873
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
arch-wasmWebAssembly architectureWebAssembly architecturearea-Hostos-browserBrowser variant of arch-wasmBrowser variant of arch-wasm
Type
Projects
Status
No status