From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24507 invoked by alias); 2 Aug 2006 22:56:08 -0000 Received: (qmail 24494 invoked by uid 22791); 2 Aug 2006 22:56:06 -0000 X-Spam-Check-By: sourceware.org Received: from 105-193-189-207.dyn.peakpeak.com (HELO localhost.localdomain) (207.189.193.105) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 02 Aug 2006 22:56:02 +0000 Received: from localhost.localdomain (opsy [127.0.0.1]) by localhost.localdomain (8.13.7/8.13.7) with ESMTP id k72MpbwL018054; Wed, 2 Aug 2006 16:51:37 -0600 Received: (from tromey@localhost) by localhost.localdomain (8.13.7/8.13.7/Submit) id k72MpbwJ018051; Wed, 2 Aug 2006 16:51:37 -0600 To: Kyle Galloway Cc: java-patches@gcc.gnu.org Subject: Re: RFA: Changes to interpreter to avoid non-debugging slowdown References: <44CA8B0D.5030108@redhat.com> <17614.19859.287888.443036@localhost.localdomain> <44CF58ED.2080302@redhat.com> <17615.27921.726060.852247@localhost.localdomain> <44CF5072.5060009@redhat.com> <17615.31626.566719.418274@localhost.localdomain> <44CF88CF.9050905@redhat.com> <17615.56005.334446.204433@localhost.localdomain> <44D0BF01.2070709@redhat.com> From: Tom Tromey Reply-To: tromey@redhat.com X-Attribution: Tom Date: Wed, 02 Aug 2006 22:56:00 -0000 In-Reply-To: <44D0BF01.2070709@redhat.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Mailing-List: contact java-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-patches-owner@gcc.gnu.org X-SW-Source: 2006-q3/txt/msg00262.txt.bz2 >>>>> "Kyle" == Kyle Galloway writes: Kyle> I noticed a small error in my last patch. I accidentally whacked out an Kyle> include in stacktrace.cc which will cause some problems. The new patch Kyle> is included in this file. We're very close :-) Kyle> +#define STOREA(I) \ Kyle> +DEBUG_LOCALS_INSN(I, 'o') \ Kyle> +locals[I].o = (--sp)->o It is more normal C style to make these kinds of macros "statement like", so that users can use them without recalling exactly how they expand. So you'd write something like: #define STOREA(I) \ do { \ DEBUG_LOCALS_INSN(I, 'o'); \ locals[I].o = (--sp)->o; \ } while (0) This approach lets STOREA be used in an 'if' without remembering whether it needs braces. Kyle> +#define DEBUG Kyle> +#undef DEBUG_LOCALS_INSN Kyle> +#define DEBUG_LOCALS_INSN(s, t) {} Likewise here, DEBUG_LOCALS_INSN could be 'do {} while (0)'. I notice neither definition of DEBUG_LOCALS_INSN does anything... I presume that will follow? Tom