From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11627 invoked by alias); 4 Dec 2002 19:22:14 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 11620 invoked from network); 4 Dec 2002 19:22:12 -0000 Received: from unknown (HELO fencepost.gnu.org) (199.232.76.164) by sources.redhat.com with SMTP; 4 Dec 2002 19:22:12 -0000 Received: from monty-python.gnu.org ([199.232.76.173]) by fencepost.gnu.org with esmtp (Exim 4.10) id 18Jf64-0002mt-00 for gcc@gnu.org; Wed, 04 Dec 2002 14:22:12 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18Jf5x-0006e8-00 for gcc@gnu.org; Wed, 04 Dec 2002 14:22:09 -0500 Received: from adsl-216-102-199-253.dsl.snfc21.pacbell.net ([216.102.199.253] helo=bothner.com) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18Jf5v-0006aR-00 for gcc@gnu.org; Wed, 04 Dec 2002 14:22:04 -0500 Received: from bothner.com (bothner.com [216.102.199.253]) (authenticated) by bothner.com (8.11.6/8.11.6) with ESMTP id gB4JN4N14503; Wed, 4 Dec 2002 11:23:04 -0800 Message-ID: <3DEE5618.7060100@bothner.com> Date: Wed, 04 Dec 2002 11:22:00 -0000 From: Per Bothner User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020814 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Fergus Henderson CC: gcc@gnu.org Subject: Re: change the location_t type, DECL_SOURCE_LINE etc References: <3DEBED4D.5070106@bothner.com> <20021204133556.A32354@hg.cs.mu.oz.au> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=-8.5 required=5.0 tests=QUOTED_EMAIL_TEXT,REFERENCES,SIGNATURE_SHORT_DENSE, SPAM_PHRASE_00_01,USER_AGENT,USER_AGENT_MOZILLA_UA, X_ACCEPT_LANG version=2.41 X-Spam-Level: X-SW-Source: 2002-12/txt/msg00201.txt.bz2 Fergus Henderson wrote: > The C code generated by the Mercury compiler is going to overflow > those limits, I think. > Currently the longest C file generated by the Mercury compiler > is about 600,000 lines long (20,000,000 bytes). That means that file might need to grab ceiling(600,000/(1<<14)) = 37 number of file_indexes. There leaves still 986 available. > The longest line is about 2300 characters. Column numbers would probably not be very useful for generated C code. > There are up to about 750 header files. Perhaps file_index should be increased to 11 or 12 bits, and rline reduced to 13 or 12 bits. Or reduce the bits for rcolumn - it will often just be 0 anyway. That allows more flexibility. In any case, it appears to me that line numbers in such C code are useless except to debug the Mercury compiler itself. Line numbers relative to the C code would be useless for debugging Mercury code. I assume you emit #line directives, in which case the size of the C code is irrelevant. If we start storing column numbers, I think i makes sense to disable column numbers after a #line directive. -- --Per Bothner per@bothner.com http://www.bothner.com/per/