Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,11 @@ private bool IsNonVersionableWithILTokensThatDoNotNeedTranslationUncached(EcmaMe

public sealed override bool GeneratesPInvoke(MethodDesc method)
{
// Marshalling behavior isn't modeled as protected by R2R rules, so prevent inlining of marshalling
// defined outside of the version bubble.
if (!VersionsWithMethodBody(method))
return false;

return !Marshaller.IsMarshallingRequired(method);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3085,11 +3085,6 @@ private bool pInvokeMarshalingRequired(CORINFO_METHOD_STRUCT_* handle, CORINFO_S
Debug.Assert(!_compilation.NodeFactory.CompilationModuleGroup.GeneratesPInvoke(method));
return true;
}

// Marshalling behavior isn't modeled as protected by R2R rules, so disable pinvoke inlining for code outside
// of the version bubble
if (!_compilation.CompilationModuleGroup.VersionsWithMethodBody(method))
return true;
}
catch (RequiresRuntimeJitException)
{
Expand Down
Loading