https://github.com/kara-4search/jit_demo_csharp
A little JIT demo to help you understander how JIT works
https://github.com/kara-4search/jit_demo_csharp
csharp demo jit
Last synced: about 1 year ago
JSON representation
A little JIT demo to help you understander how JIT works
- Host: GitHub
- URL: https://github.com/kara-4search/jit_demo_csharp
- Owner: Kara-4search
- Created: 2021-12-04T01:40:33.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-22T00:53:54.000Z (over 4 years ago)
- Last Synced: 2025-04-23T15:46:56.281Z (about 1 year ago)
- Topics: csharp, demo, jit
- Language: C#
- Homepage:
- Size: 30.3 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# JIT_DEMO_Csharp
Blog link: not gonna update
- A Demo to replace method with JIT(Or we could called "creating managed hooks")
- The DEBUG block in Project.cs line 121 is for debuging.
- Abount getting function address is kind of different betweent debuging or compiling
## Usage
- Just a Demo
1.The picture down below is the running result.
- The format of the Relative Address below is wrong,but it been fixed.

## TO-DO list
- None
## Update history
- Fixed bug: Relative Address output in wrong format - 20211222
## Reference link:
1. https://docs.microsoft.com/zh-cn/dotnet/api/system.runtime.compilerservices.runtimehelpers.preparemethod?view=net-6.0
2. https://gist.github.com/HoLLy-HaCKeR/c1fcee3df1ea35e7816c55147e6db78d
3. https://www.codenong.com/cs106378408/
4. http://www.ostack.cn/?qa=1418702/
5. https://www.buzzphp.com/posts/dynamically-append-code-to-a-method-net-core