Thanks to visit codestin.com
Credit goes to github.com

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
Move comment
  • Loading branch information
jakobbotsch committed Jun 18, 2024
commit 3024b100edb71365a399f2ac9808f8fc40f3c1f5
6 changes: 3 additions & 3 deletions src/coreclr/jit/importercalls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2072,7 +2072,9 @@ void Compiler::impPopArgsForSwiftCall(GenTreeCall* call, CORINFO_SIG_INFO* sig,
}

swiftErrorIndex = argIndex;
spillStack = true;
// Spill entire stack as we will need to reuse the error
// argument after the call.
spillStack = true;
}
else if ((strcmp(className, "SwiftSelf") == 0) &&
(strcmp(namespaceName, "System.Runtime.InteropServices.Swift") == 0))
Expand Down Expand Up @@ -2135,8 +2137,6 @@ void Compiler::impPopArgsForSwiftCall(GenTreeCall* call, CORINFO_SIG_INFO* sig,
}
}

// If using SwiftError*, spill entire stack as we will need to reuse the
// error argument after the call.
if (spillStack)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you update this comment to mention the SwiftIndirectResult case, please?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved the existing comment up to where we assign spillStack in the SwiftError* case instead (there is already a comment on the new spillStack = true I added)

{
impSpillSideEffects(true, CHECK_SPILL_ALL DEBUGARG("Spill for swift call"));
Expand Down