From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by sourceware.org (Postfix) with ESMTPS id B10B93858D35 for ; Fri, 19 Jun 2020 16:18:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B10B93858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=andrew.burgess@embecosm.com Received: by mail-wr1-x443.google.com with SMTP id o11so2533737wrv.9 for ; Fri, 19 Jun 2020 09:18:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=C5TlO+Lu6/mEzR+Plny3dklTIkiiODJygh2skOLvV7Y=; b=U7bJWaNeiS7Q0+6ExbSHmp0pofsHikZC2hdEDDeE7+KblP8bSPNleY2MRw8kcUzZyy dACT2qCAShjgmPlA5LIqWeRUfRvQXsHN3jID03xNPmmWO+YB9iT4O1tS1uoKYWWysZyS 9LQS5rvnsx5Rlevgfd4LWQuzl5TgCht01GsGhA1WwUvQelPFCvG9IKeZ5vXGNjCF/XY1 1XVv6vQb/MYsX1vtK+jgg5Icv4E1KdTK9CJ4HOxRegrgNsz8Roh0lZmJe0H2zcZVHodt TbjMXBHOtfu61OC8YhMv+BqiXtVa3apGSuXoVcJ5HSUHy2BbNgWnYn0PxDXTX3Z3LeIo 2qww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=C5TlO+Lu6/mEzR+Plny3dklTIkiiODJygh2skOLvV7Y=; b=pmRzkFruWndiieV/HUSavqwzMfjhTpHsLa+yIxJyHaQsuToRLQMuth2RbdrZxQ0bsF XKX/+OrhY9vXXi3x/5R8KQW4XDa9TtwO8uMUfJfFD0JfbalkrXqcKCQxlhEYz9AAGS8j w7aqVJzkQeIhpdeSgwCVqyn2T/2cJrHFTomG/t478lQqRHLipCYDOiG4BFlmqLexDdrZ gGKxjwED0jd/DFjEhCE0ckzNVDnIbUyn4ndaL5ZzRuldc36BFQwiE8u8dptbSjuiIpPD 242F7Vu5wNcxKL+zRZaNP8Pn0zCrJauOMWQGUYTEkmYzAyJKyRPBPd/9gSSa3gTUFrVM Aj3w== X-Gm-Message-State: AOAM532pTzTsuRS5vaKvUPfxvZAmsmHZjMPwuaXatNcE/9990SUpqMDp uAjwSINvHO/TrnhjAw0LoqUTXQh8ypU= X-Google-Smtp-Source: ABdhPJy04viI+PBqTNRqceBJkT0cO+SlfYBuXJPulrS4eSln/t9Sgz8wovtw6Biji2vn8I9LiYmEZg== X-Received: by 2002:adf:c382:: with SMTP id p2mr4819361wrf.283.1592583503788; Fri, 19 Jun 2020 09:18:23 -0700 (PDT) Received: from localhost (host86-128-12-16.range86-128.btcentralplus.com. [86.128.12.16]) by smtp.gmail.com with ESMTPSA id v6sm8299467wrf.61.2020.06.19.09.18.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jun 2020 09:18:23 -0700 (PDT) Date: Fri, 19 Jun 2020 17:18:22 +0100 From: Andrew Burgess To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 0/7] Language Class Hierarchy Conversion (Prt 3) Message-ID: <20200619161822.GI2737@embecosm.com> References: <87r1ubxhcb.fsf@tromey.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87r1ubxhcb.fsf@tromey.com> X-Operating-System: Linux/5.6.15-200.fc31.x86_64 (x86_64) X-Uptime: 17:15:24 up 11 days, 6:22, X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, URIBL_CSS, URIBL_CSS_A autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2020 16:18:26 -0000 * Tom Tromey [2020-06-19 08:25:56 -0600]: > >>>>> "Andrew" == Andrew Burgess writes: > > Andrew> In this third patch set I convert the last remaining function pointers > Andrew> in the language_base structure into member function in language_defn. > > Andrew> There wasn't anything particularaly tricky in this batch. > > I skimmed these and it all seems fine to me. > > Andrew> After this set my plans are (in no particular order): > > Andrew> - Convert at least some of the data members in language_base into > Andrew> member function in language_defn. > > Andrew> - Move some of the language classes into header files so that member > Andrew> functions can be defined in different .c files. This will allow > Andrew> me to remove most of the member functions that currently just > Andrew> redirect to a function in another file. > > Andrew> - Possibly restructure the language class hierarchy to increase the > Andrew> amount of sharing that exists between similar languages. > > Andrew> - Make more of the per-language helper functions private functions > Andrew> within the language classes. > > Andrew> Thoughts, feedback, or ideas always welcome. > > I wouldn't mind getting rid of the LA_* macros. Especially after this > series, I don't think they add much. In many cases they hide an access of current_language. In my mind, ideally, I like to use current_language less. So, when you parse an expression at the prompt at some point this would trigger some kind of current_language->entry_point_function (....), but after that we should remain within the language class as much as possible to parse the expression, and not be using current_language at all. But yes, I'd also like to see those macros gone :) Thanks, Andrew