Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyliseismic committed Oct 13, 2023
1 parent f98a49d commit 5ccf89e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/InterfaceBaseInvoke.Fody/Processing/MethodWeaver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,11 @@ private void ProcessImpl()
if (next == null)
throw NoInterfaceMethodInvocationException();

// var x = obj.Base<T>();
if (IsStloc(next))
throw NoInterfaceMethodInvocationException();

// obj.Base<T>().SomeMethod();
if (IsCallAndPop(next) && !IsInterfaceMethodCandidate(next, interfaceTypeRef, interfaceTypeDef))
{
if (IsAnchorMethodCall(next))
Expand All @@ -167,6 +169,7 @@ private void ProcessImpl()
if (!IsInterfaceMethodCandidate(p, interfaceTypeRef, interfaceTypeDef))
continue;

// graph should be built every time here because Instructions may be updated.
var graph = Instructions.BuildGraph();
var args = p.GetArgumentPushInstructions(Instructions, graph);
var arg = args.First();
Expand Down

0 comments on commit 5ccf89e

Please sign in to comment.