I'm implementing a Lisp-like language with a primary design goal of full interoperability with C. This means static typing, direct support of all primitives defined by the C standard, pointer arithmetic and low-level memory management. Macros are expanded by a virtual machine and the entire program is converted into C and compiled. This allows me to compile entire programs, but what if I want to be able to modify and compile specific functions interactively? Is there something I can use to integrate them back into the running executable without manual assembly hacking?
Asked
Active
Viewed 37 times
0
-
Yes, it's possible in general (you generate the appropriate assembly and stick it in an executable area of memory). Full discussion of how to implement it is far too broad a discussion for SO. – nobody May 13 '14 at 17:20
-
The question is about whether there's something I can use without manually dealing with generating assembly. Not how to manually generate said assembly. O_o – user3026691 May 13 '14 at 17:23