Re: Almost JIT (Fergus Henderson)
19 Jan 1999 00:53:22 -0500

          From comp.compilers

Related articles
Almost JIT (James R Byer) (1999-01-15)
Re: Almost JIT (Phil Budne) (1999-01-17)
Re: Almost JIT (1999-01-19)
Re: Almost JIT (1999-01-19)
| List of all articles for this month |

From: (Fergus Henderson)
Newsgroups: comp.compilers
Date: 19 Jan 1999 00:53:22 -0500
Organization: Computer Science, The University of Melbourne
References: 99-01-042
Keywords: code, 386, comment

"James R Byer" <> writes:

>Does anyone have any C coding examples for Windows95/NT or can suggest where
>I should continue searching for examples of code which dynamically generates
>machine instructions and at some point executes them?

GNU C, which is available for Windows95/NT via
<>, does a very limited amount
of dynamic code generation when compiling code that takes the address
of a nested function. (Nested functions are a GNU C extension to
standard C.) You can take an example such as the following,
compile it, and examine the generated assembly code.

void bar(void (*f)(void));
int foo(void) {
int x = 0;
void nested(void) { x++; }
return x;
void bar(void (*f)(void)) { (*f)(); }

Fergus Henderson <>
WWW: <>
PGP: finger fjh@
[The x86 code from the I have here looks like it won't work if
bar recursively calls foo. -John]

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.