From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3068 invoked by alias); 18 Mar 2014 14:57:59 -0000 Mailing-List: contact jit-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Subscribe: Sender: jit-owner@gcc.gnu.org Received: (qmail 3017 invoked by uid 89); 18 Mar 2014 14:57:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.98.1 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-Spam-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com From: Tom Tromey To: jit@gcc.gnu.org Cc: gcc-patches@gcc.gnu.org Subject: [RFA jit 0/2] minor refactorings for reuse Date: Wed, 01 Jan 2014 00:00:00 -0000 Message-Id: <1395154664-29657-1-git-send-email-tromey@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-SW-Source: 2014-q1/txt/msg00079.txt.bz2 I wanted to do something like playback::context::compile, but in my project I can't really reuse all the JIT code -- really I just wanted to be able to use toplev_main and toplev_finalize. Looking into the code, though, I saw a few spots that could be cleaned up a little, so I wouldn't have to worry as much about keeping my hacks in sync with the JIT branch. The first patch here changes the toplev code into a class and arranges for the timevars to be managed there. The second patch just introduces scoped timevars to make them less error-prone to use. I built and tested this using the JIT test suite. Let me know what you think, Tom