This is the mail archive of the java-discuss@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: question about interpreter


Jeff Sturm <jsturm@sigma6.com> writes:

> Tom Tromey wrote:
> >     #define LOADL(I)  ({ jint __idx = (I); \
> >         (sp++)->ia[0] = locals[__idx].ia[0]; \
> >         (sp++)->ia[0] = locals[__idx+1].ia[0]; \
> >      })
> 
> Why not use inline functions instead?  C++ was supposed to eliminate the
> preprocessor for most uses.  These macros aren't used in any C code,
> after all...

I did this originally (used inline functions) but this resulted in a
huge stack frame for the interpreter main-loop function.  If this as
improved since June 99, then clearly it would be great to use inline
functions.

-- Kresten

 Kresten Krab Thorup           "I like my eggs ploded"
 Department of Computer Science, University of Aarhus
 Aabogade 34, DK-8200 Aarhus N, Denmark
 +45 8942 5665 (office), +45 2343 4626 (mobile)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]