Skip to content

Commit

Permalink
0.5.1: Revert inline - fixed deferred
Browse files Browse the repository at this point in the history
  • Loading branch information
oleg-st committed Jun 27, 2021
1 parent 1f15271 commit 1709c7f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/InlineMethod.Fody/InlineMethodWeaver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,12 @@ private void ProcessDeferred()
{
if (_deferredInstruction != null)
{
OpCodeHelper.ReplaceInstruction(_deferredInstruction, GetLdArgInstruction());
var ldArgInstruction = GetLdArgInstruction();
OpCodeHelper.ReplaceInstruction(_deferredInstruction, ldArgInstruction);
if (_inlinedInstructions.Count > 0 && _inlinedInstructions[_inlinedInstructions.Count - 1] == ldArgInstruction)
{
_inlinedInstructions[_inlinedInstructions.Count - 1] = _deferredInstruction;
}
_deferredInstruction = null;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/InlineMethod/InlineMethod.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<PackageOutputPath>$(SolutionDir)/../nugets</PackageOutputPath>
<PackageProjectUrl>https://github.com/oleg-st/InlineMethod.Fody</PackageProjectUrl>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<Version>0.5</Version>
<Version>0.5.1</Version>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 1709c7f

Please sign in to comment.