-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ldftn and DelegateShim #140
Conversation
BadRyuner
commented
May 27, 2024
- Adds support for Ldftn OpCode
- Adds a minimal wrapper for Delegates (.ctor & invoke) + mini test for this thing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good idea and a nice start, however, we need to be super careful here with the implementation details to avoid any inaccuracies that can potentially lead to problems later, or be detected by the emulated process.
src/Platforms/Echo.Platforms.AsmResolver/Emulation/Invocation/DelegateInvoker.cs
Outdated
Show resolved
Hide resolved
src/Platforms/Echo.Platforms.AsmResolver/Emulation/Invocation/DelegateInvoker.cs
Outdated
Show resolved
Hide resolved
src/Platforms/Echo.Platforms.AsmResolver/Emulation/Invocation/DelegateInvoker.cs
Outdated
Show resolved
Hide resolved
src/Platforms/Echo.Platforms.AsmResolver/Emulation/Invocation/DelegateInvoker.cs
Outdated
Show resolved
Hide resolved
src/Platforms/Echo.Platforms.AsmResolver/Emulation/Invocation/DelegateInvoker.cs
Outdated
Show resolved
Hide resolved
src/Platforms/Echo.Platforms.AsmResolver/Emulation/Invocation/DelegateInvoker.cs
Outdated
Show resolved
Hide resolved
src/Platforms/Echo.Platforms.AsmResolver/Emulation/Invocation/DelegateInvoker.cs
Outdated
Show resolved
Hide resolved
src/Platforms/Echo.Platforms.AsmResolver/Emulation/IFunctionMarshaller.cs
Outdated
Show resolved
Hide resolved
src/Platforms/Echo.Platforms.AsmResolver/Emulation/IFunctionMarshaller.cs
Outdated
Show resolved
Hide resolved
src/Platforms/Echo.Platforms.AsmResolver/Emulation/FunctionMarshaller.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies for the late reply, and also for not coming with the following comments earlier in the previous review, but I am noticing a few more potential edge cases that we may want to address before merging.
Really appreciate the work you put into it btw!
src/Platforms/Echo.Platforms.AsmResolver/Emulation/Invocation/DelegateInvoker.cs
Outdated
Show resolved
Hide resolved
src/Platforms/Echo.Platforms.AsmResolver/Emulation/CilThread.cs
Outdated
Show resolved
Hide resolved
src/Platforms/Echo.Platforms.AsmResolver/Emulation/Dispatch/Pointers/LdftnHandler.cs
Outdated
Show resolved
Hide resolved
src/Platforms/Echo.Platforms.AsmResolver/Emulation/Invocation/DelegateInvoker.cs
Outdated
Show resolved
Hide resolved
src/Platforms/Echo.Platforms.AsmResolver/Emulation/Invocation/DelegateInvoker.cs
Outdated
Show resolved
Hide resolved
src/Platforms/Echo.Platforms.AsmResolver/Emulation/Invocation/DelegateInvoker.cs
Outdated
Show resolved
Hide resolved
test/Platforms/Echo.Platforms.AsmResolver.Tests/Emulation/CilVirtualMachineTest.cs
Show resolved
Hide resolved
Thanks a lot! |