Uh oh!
There was an error while loading. Please reload this page.
Implement remaining unimplemented APIs for Builder types - #96805
Conversation
…ctor field/method/type token logic because of global members
ghost
commented
Jan 10, 2024
Tagging subscribers to this area: @dotnet/area-system-reflection-emit Issue Details
Fixes #96436
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…t/TypeBuilderImpl.cs Co-authored-by: Aaron Robinson <arobins@microsoft.com>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| [Fact] | ||
| public void EmitCalliBlittable() | ||
| { | ||
| RemoteExecutor.Invoke(() => |
There was a problem hiding this comment.
Why was the use of remote executor changed?
There was a problem hiding this comment.
Now using collectable ALC instead of default, the discussion is here #96805 (comment)
| Module m = AssemblySaveTools.LoadAssemblyFromPath(file.Path).Modules.First(); | ||
| Type[] type1Params = m.GetTypes()[2].GetGenericArguments(); | ||
| Type[] type1Params = m.GetTypes()[0].GetGenericArguments(); |
There was a problem hiding this comment.
Why were the items reversed before?
There was a problem hiding this comment.
Before the type tokens created on TypeBuilder.CreateType() and before saving the types are ordered with the token order, the types here created in inverse order, you can see that above on row 512-514.
Now with a global type that has global methods/fields this ordering/token assignment not working anymore, now all types and its members tokens created before save (therefore in defined order no matter when TypeBuilder.CreateType() called)
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Steve Harter <steveharter@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
buyaa-n
commented
Jan 19, 2024
All failures are unrelated and known, merging |
* Implement 'DefinPInvokeMethod', save required/optional CustomModifiers, fix bugs found * Add global method, get method impl and tests * Implement DefineInitializedData(...) and UninitializedData(...), refactor field/method/type token logic because of global members * Update src/libraries/System.Reflection.Emit/src/System/Reflection/Emit/TypeBuilderImpl.cs Co-authored-by: Aaron Robinson <arobins@microsoft.com> * Load assemblies in unloadable context Co-authored-by: Steve Harter <steveharter@users.noreply.github.com> * Add test for DefineUninitializedData(...) * Set parameter count to 0 for RtFieldInfo * Throw when member token is not populated when Module.Get***MetadataToken methods called * Retrieving standalone signature not supported on mono * Create byte array with the size directly instead of null check --------- Co-authored-by: Aaron Robinson <arobins@microsoft.com> Co-authored-by: Steve Harter <steveharter@users.noreply.github.com>
DefineInitializedDataCore(...),DefineUninitializedDataCore(...),DefinePInvokeMethodCore(...)forTypeBuilerImpl.CreateGlobalFunctionsCore(),DefineGlobalMethodCore(...),DefineInitializedDataCore(...),DefineUninitializedDataCore(...),DefinePInvokeMethodCore(...),GetMethodImpl(...),GetMethods()forModuleBuilerImpl.requiredCustomModifiers,optionalCustomModifiersfor fields, method return type and parameters, which mostly involves Signature changesFixes#96436 and #97116
Contributes to #92975