On 2013-11-04 16:09, Baz wrote:
On Saturday, 26 October 2013 at 16:36:35 UTC, TheFlyingFiddle wrote:
Is there a way to extract the source code of a method at compiletime?

Yep, at least on win32. (tested in win7 32 with DEP set to "ON" for
everything)

http://dpaste.dzfl.pl/19c77eee

It doesn't run on DPaste (linux x86_64) that's why I restrict the "yes"
to my own local test (on win32).

basically:
- set memory mode for reading code and grab it.
- transform. (in my example I patch a bool as return value).
- set memory mode for writing and patch it with your "patched-grabed-code".
- call new code.

:)

That can't work at compile time?

--
/Jacob Carlborg

Reply via email to