Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
generate stubs for all methods if corelib is within the bubble.
  • Loading branch information
mangod9 committed Jul 8, 2021
commit 8575306e73ee6b009bc05a8153abd7afa4380dfc
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,8 @@ public sealed override bool GeneratesPInvoke(MethodDesc method)
{
// PInvokes depend on details of the core library, so for now only compile them if:
// 1) We're compiling the core library module, or
// 2) We're compiling any module, and no marshalling is needed
//
// TODO Future: consider compiling PInvokes with complex marshalling in version bubble
// mode when the core library is included in the bubble.
// 2) We're compiling any module, and no marshalling is needed, or
// 3) We're compiling any module, and core library module is in the same bubble, and marhaller supports compilation

Debug.Assert(method is EcmaMethod);

Expand All @@ -359,7 +357,7 @@ public sealed override bool GeneratesPInvoke(MethodDesc method)
if (!_versionBubbleModuleSet.Contains(((EcmaMethod)method).Module))
return false;

if (((EcmaMethod)method).Module.Equals(method.Context.SystemModule))
if (_versionBubbleModuleSet.Contains(method.Context.SystemModule))
return true;

return !Marshaller.IsMarshallingRequired(method);
Expand Down