Skip to content

Commit

Permalink
remove unused items
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyliseismic committed Oct 13, 2023
1 parent 04af6d7 commit 442ae95
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion build/pkg.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.0
0.1.1
2 changes: 0 additions & 2 deletions src/InterfaceBaseInvoke.Fody/InterfaceBaseInvoke.Fody.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
<PackageId>$(MSBuildProjectName).Fody</PackageId>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.8" />
<PackageReference Include="FodyHelpers" Version="6.8.0" />

</ItemGroup>
</Project>
12 changes: 6 additions & 6 deletions src/InterfaceBaseInvoke.Fody/Processing/MethodWeaver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,12 @@ private void ProcessImpl()

// We build a graph for the Instructions here to validate the method body as we emit new instructions.
// The 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();
//var graph = Instructions.BuildGraph();
//var args = p.GetArgumentPushInstructions(Instructions, graph);
//var arg = args.First();

if (arg != instruction)
continue;
//if (arg != instruction)
// continue;

p = EmitBaseInvokeInstructions(instruction, interfaceTypeRef, interfaceTypeDef, p);
return p.Next;
Expand Down Expand Up @@ -224,7 +224,7 @@ private Instruction EmitBaseInvokeInstructions(Instruction anchor, TypeReference
_il.Create(OpCodes.Ldtoken, interfaceDefaultMethodRef),
_il.Create(OpCodes.Stloc, handle),
_il.Create(OpCodes.Ldloca, handle),
_il.Create(OpCodes.Call, Methods.GetFunctionPointer),
_il.Create(OpCodes.Call, Methods.FunctionPointer),
_il.Create(OpCodes.Stloc, ptr),
_il.Create(OpCodes.Ldloca, ptr),
_il.Create(OpCodes.Call, Methods.Is64BitProcess),
Expand Down
4 changes: 2 additions & 2 deletions src/InterfaceBaseInvoke.Fody/Processing/References.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ public TypeReferences(ModuleDefinition module)

public sealed class MethodReferences
{
public MethodReference GetFunctionPointer { get; }
public MethodReference FunctionPointer { get; }
public MethodReference ToInt32 { get; }
public MethodReference ToInt64 { get; }
public MethodReference Is64BitProcess { get; }

public MethodReferences(ModuleDefinition module, TypeReferences types)
{
GetFunctionPointer = MethodRefBuilder.MethodByNameAndSignature(module, types.RuntimeMethodHandle, nameof(RuntimeMethodHandle.GetFunctionPointer), 0, types.IntPtr, Array.Empty<TypeReference>()).Build();
FunctionPointer = MethodRefBuilder.MethodByNameAndSignature(module, types.RuntimeMethodHandle, nameof(RuntimeMethodHandle.GetFunctionPointer), 0, types.IntPtr, Array.Empty<TypeReference>()).Build();
ToInt32 = MethodRefBuilder.MethodByName(module, types.IntPtr, nameof(IntPtr.ToInt32)).Build();
ToInt64 = MethodRefBuilder.MethodByName(module, types.IntPtr, nameof(IntPtr.ToInt64)).Build();
Is64BitProcess = MethodRefBuilder.PropertyGet(module, types.Environment, nameof(Environment.Is64BitProcess)).Build();
Expand Down

0 comments on commit 442ae95

Please sign in to comment.