amaneureka / AtomOS

A multitasking monolithic Kernel based x86 targeting Operating System written in C# from scratch aiming for high-level implementation of drivers in managed environment.
http://www.atomixos.com
BSD 3-Clause "New" or "Revised" License
1.26k stars 86 forks source link

[Compiler] Address to a method symbol #13

Closed amaneureka closed 7 years ago

amaneureka commented 8 years ago

Right now we use a very pitty idea to get address of a method symbol. It follows by setting a Int32 field in same type with name prefix by p followed by method name.

static uint pHelloWorld;
void HelloWorld() { }

pHelloWorld will contain address of HelloWorld. It should be made more reliable.

amaneureka commented 7 years ago

This fixed the issue 4db71a3ab3779e2a7edd406512d9eb342d85f0ba