From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Leake Newsgroups: gmane.emacs.devel Subject: Re: Dynamic loading progress Date: Sat, 14 Feb 2015 18:39:30 -0600 Message-ID: <85k2zkgg8t.fsf@stephe-leake.org> References: <54D80098.3020209@cs.ucla.edu> <54D85304.1030600@cs.ucla.edu> <54D9AC29.2020603@cs.ucla.edu> <54DA8539.1020905@cs.ucla.edu> <87zj8ktq8f.fsf@lifelogs.com> <54DD6413.1000403@cs.ucla.edu> <83wq3m436s.fsf@gnu.org> <54DDEB4D.5040300@dancol> <83egpt4zz6.fsf@gnu.org> <54DE12E9.5040606@dancol.org> <85twypiiug.fsf@stephe-leake.org> <83zj8g3n16.fsf@gnu.org> <857fvkik49.fsf@stephe-leake.org> <83lhk0wkfl.fsf@gnu.org> <83k2zkwig5.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1423960822 27327 80.91.229.3 (15 Feb 2015 00:40:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 15 Feb 2015 00:40:22 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 15 01:40:12 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YMnFm-0005Ap-Gu for ged-emacs-devel@m.gmane.org; Sun, 15 Feb 2015 01:40:06 +0100 Original-Received: from localhost ([::1]:33189 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMnFl-0005gO-O8 for ged-emacs-devel@m.gmane.org; Sat, 14 Feb 2015 19:40:05 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39153) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMnFY-0005gG-DF for emacs-devel@gnu.org; Sat, 14 Feb 2015 19:39:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YMnFV-0004DA-8a for emacs-devel@gnu.org; Sat, 14 Feb 2015 19:39:52 -0500 Original-Received: from gproxy10-pub.mail.unifiedlayer.com ([69.89.20.226]:50727) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1YMnFV-0004D2-17 for emacs-devel@gnu.org; Sat, 14 Feb 2015 19:39:49 -0500 Original-Received: (qmail 29130 invoked by uid 0); 15 Feb 2015 00:39:46 -0000 Original-Received: from unknown (HELO CMOut01) (10.0.90.82) by gproxy10.mail.unifiedlayer.com with SMTP; 15 Feb 2015 00:39:46 -0000 Original-Received: from host114.hostmonster.com ([74.220.207.114]) by CMOut01 with id sQfd1p00T2UdiVW01QfgXu; Sat, 14 Feb 2015 17:39:45 -0700 X-Authority-Analysis: v=2.1 cv=J8Y5smXS c=1 sm=1 tr=0 a=CQdxDb2CKd3SRg4I0/XZPQ==:117 a=CQdxDb2CKd3SRg4I0/XZPQ==:17 a=DsvgjBjRAAAA:8 a=f5113yIGAAAA:8 a=TeMFXEv2S7AA:10 a=9i_RQKNPAAAA:8 a=hEr_IkYJT6EA:10 a=jrwKn-8xaegA:10 a=0HtSIViG9nkA:10 a=mDV3o1hIAAAA:8 a=IwazvoQfSlLtRMPZA_cA:9 Original-Received: from [70.94.38.149] (port=51316 helo=takver) by host114.hostmonster.com with esmtpsa (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.82) (envelope-from ) id 1YMnFK-0003qh-8C for emacs-devel@gnu.org; Sat, 14 Feb 2015 17:39:38 -0700 In-Reply-To: <83k2zkwig5.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 14 Feb 2015 18:45:14 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (windows-nt) X-Identified-User: {2442:host114.hostmonster.com:stephele:stephe-leake.org} {sentby:smtp auth 70.94.38.149 authed with stephen_leake@stephe-leake.org} X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 69.89.20.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:183076 Archived-At: Eli Zaretskii writes: >> Date: Sat, 14 Feb 2015 18:02:22 +0200 >> From: Eli Zaretskii >> Cc: emacs-devel@gnu.org >> >> > From: Stephen Leake >> > Date: Sat, 14 Feb 2015 09:32:54 -0600 >> > >> > Emacs ada-mode does indentation in two steps; first it parses the source >> > code, and the parser actions are lisp functions that eventually call >> > put-text-property to store information about the syntax and/or semantics >> > on many identifiers. Then the indentation code uses those text >> > properties to compute indentation. >> > >> > I have a generalized LALR parser implemented in elisp that is fast >> > enough for many user's Ada files, but some users have much bigger files, >> > and it takes them 10 seconds to parse. So I need a faster >> > implementation. So far my benchmarking says I can get close with a >> > machine compiled parser. >> > >> > So the module would contain the generalized LALR parser; the actions of >> > the parser would still be calls to the lisp functions. >> >> But this means your mode is in Lisp to begin with, and it just calls >> functions implemented in C to work faster. So you could leave the >> calls to put-text-property in Lisp, and have the functions implemented >> in the module return the information required to compute the arguments >> to put-text-property. Or am I missing something? > > And btw, what exactly do you mean by "call Lisp" in this case? Call > put-text-property, which is implemented in C in its entirety, doesn't > constitute a call to Lisp in my book. The parser actions are higher level lisp functions; they do call put-text-property, but there is significant logic in the lisp, and I'd rather not re-implement that in the module, to simplify maintenance. I'll have to maintain both the elisp and module implementations, for two reasons: - emacs 24 doesn't support modules - some (many?) ada-mode users won't bother to compile the module (and I don't plan to distribute a binary). > Of course, that means we will want to export Fput_text_property... Right, that might be needed at some point. Right now I'll settle for 'funcall'. -- -- Stephe