This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
Re: question about interpreter
- To: Jeff Sturm <jsturm at sigma6 dot com>
- Subject: Re: question about interpreter
- From: Kresten Krab Thorup <krab at daimi dot au dot dk>
- Date: 11 Jan 2000 12:01:38 +0100
- Cc: tromey at cygnus dot com, Java Discuss List <java-discuss at sourceware dot cygnus dot com>
- References: <873ds58z2c.fsf@cygnus.com> <387A7CDA.FF84DA47@sigma6.com>
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)