Related articles |
---|
[3 earlier articles] |
Re: Making a partial C compiler blackmarlin@asean-mail.com (2003-05-24) |
Re: Making a partial C compiler idbaxter@semdesigns.com (2003-05-24) |
Re: Making a partial C compiler cyberheg@l115.langkaer.dk (John Eskie) (2003-05-29) |
Re: Making a partial C compiler vbdis@aol.com (2003-06-03) |
Re: Making a partial C compiler lars@bearnip.com (2003-06-03) |
Re: Making a partial C compiler boldyrev@cgitftp.uiggm.nsc.ru (Ivan Boldyrev) (2003-06-03) |
Re: Making a partial C compiler jyrixx@astro.temple.edu (2003-06-03) |
Re: Making a partial C compiler torbenm@diku.dk (2003-06-05) |
Re: Making a partial C compiler cyberheg@l115.langkaer.dk (John Eskie) (2003-06-08) |
Re: Making a partial C compiler cyberheg@l115.langkaer.dk (John Eskie) (2003-06-08) |
Re: Making a partial C compiler vbdis@aol.com (2003-06-20) |
From: | jyrixx@astro.temple.edu (Andrew Gwozdziewycz) |
Newsgroups: | comp.compilers |
Date: | 3 Jun 2003 00:47:13 -0400 |
Organization: | http://groups.google.com/ |
References: | 03-05-139 03-05-202 |
Keywords: | C |
Posted-Date: | 03 Jun 2003 00:47:13 EDT |
> 4. Dynamic "linking" by making exact function calls to be resolved at
> runtime by using function pointers.
>
> I'm hoping/thinking it's possible to solve some of these wishes by
> using macros (#define (x) ...) and since I am doing it on my own code
> I don't need to care about every possible situation that can arrise
> because I know my own coding style.
if you were to create a "key" file basically a header file, with macro
names, it would be easy like you said.
however, you would have to either create a symbol table (for duplicate
macro names) or create a new macro for every call, (which may even be
better).
so in code like this
...
printf("blah");
printf("blah");
...
this gets generated:
X_dkkdkai__kdkiwiw("blah");
Xkdkkdkdkdk_("blah");
and a new include file gets generated such as
#define X_dkkdkai__kdkiwiw printf
However, you almost certainly will have to gaurantee that your new
names won't collide with ANYTHING which would most likely mean, being
> 15 characters and included multiple '_'+ since usually things are
written get_name. However, this whole idea creates a problem in that
you must keep the key seperate, or it has no affect at all.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.