GithubHelp home page GithubHelp logo

inlinemethod.fody's People

Contributors

oleg-st avatar ten4dinosaur avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

inlinemethod.fody's Issues

callvirt instance support

Calling method from object.
When i call method from struct with interface, like a.GetValue(), i get

IL_002c: callvirt instance !0 class NlpGpuTools.Data.Types.IBaseMathPrimitive`1<float32>::GetValue()

Even if interface and target method has InlineMethod attribute.

Can you add InlineMethod.Fody support for this case?

InstructionWeavingException on compile, regression since 0.7.0

Updating the nuget package has caused one of my projects to fail to compile, reverting to 0.6.2 works just the same as before.

I'm unable to product a minimal reproducible example right now, but code that I assume is supposed to be unreachable was reached, which led to the following compiler error:

  Fody: An unhandled exception occurred:
Exception:
Unexpected stack-clearing instruction encountered
Type:
InlineMethod.Fody.Helper.InstructionWeavingException
StackTrace:
   at InlineMethod.Fody.Extensions.CecilExtensions.GetPopCount(Instruction instruction) in C:\Work\c#\InlineMethod\src\InlineMethod.Fody\Extensions\CecilExtensions.cs:line 130
   at InlineMethod.Fody.InlineMethodWeaver.AnalyzeArgs() in C:\Work\c#\InlineMethod\src\InlineMethod.Fody\InlineMethodWeaver.cs:line 642
   at InlineMethod.Fody.InlineMethodWeaver.Process() in C:\Work\c#\InlineMethod\src\InlineMethod.Fody\InlineMethodWeaver.cs:line 710
   at InlineMethod.Fody.ModuleWeaver.ProcessCallInstruction(Instruction instruction, MethodDefinition method) in C:\Work\c#\InlineMethod\src\InlineMethod.Fody\ModuleWeaver.cs:line 25
   at InlineMethod.Fody.ModuleWeaver.ProcessMethod(MethodDefinition method) in C:\Work\c#\InlineMethod\src\InlineMethod.Fody\ModuleWeaver.cs:line 45
   at InlineMethod.Fody.ModuleWeaver.Execute() in C:\Work\c#\InlineMethod\src\InlineMethod.Fody\ModuleWeaver.cs:line 67
   at InnerWeaver.ExecuteWeavers() in C:\projects\fody\FodyIsolated\InnerWeaver.cs:line 204
   at InnerWeaver.Execute() in C:\projects\fody\FodyIsolated\InnerWeaver.cs:line 112
Source:
InlineMethod.Fody
TargetSite:
Int32 GetPopCount(Mono.Cecil.Cil.Instruction)

The only function that I can think of to trigger this is perhaps this one, which must inline the stackalloc since otherwise the memory address would be invalid by the time the function returns.

I'm sorry for not providing much information, I hope this is enough to sort the issue out.

Inlining and Stackalloc?

Hi,

I'm attempting to integrate your Zstandard lib into Sharpcompress for Zstandard file support. What I'm coming across is that this Inlining seems to be affecting a lot of stackalloc usage and I have to remove it to make things behave correctly.

This can be seen behaviorly by looking at this commit and I had to remove two stackalloc arrays to make tests specific to this code area pass: adamhathcock/sharpcompress@aedda0a

I could be wrong but I think it's this specific weaver. Do you have any idea why this would be the case?

Thanks for this and the zstd lib!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.