From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.devel Subject: Re: GNU is looking for Google Summer of Code Projects Date: Thu, 19 Mar 2020 17:56:42 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="45191"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cc: Rocky Bernstein , emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Mar 19 18:57:24 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jEzQ4-000Bew-77 for ged-emacs-devel@m.gmane-mx.org; Thu, 19 Mar 2020 18:57:24 +0100 Original-Received: from localhost ([::1]:41364 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jEzQ3-0007tG-9k for ged-emacs-devel@m.gmane-mx.org; Thu, 19 Mar 2020 13:57:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40392) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jEzPX-0007Uh-42 for emacs-devel@gnu.org; Thu, 19 Mar 2020 13:56:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jEzPU-0003Xz-GB for emacs-devel@gnu.org; Thu, 19 Mar 2020 13:56:49 -0400 Original-Received: from mx.sdf.org ([205.166.94.20]:52651) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jEzPU-0003Mv-93; Thu, 19 Mar 2020 13:56:48 -0400 Original-Received: from sdf.org (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 02JHugkX000302 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Thu, 19 Mar 2020 17:56:42 GMT Original-Received: (from akrl@localhost) by sdf.org (8.15.2/8.12.8/Submit) id 02JHug2d031689; Thu, 19 Mar 2020 17:56:42 GMT In-Reply-To: (Stefan Monnier's message of "Thu, 19 Mar 2020 13:35:08 -0400") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 205.166.94.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:245584 Archived-At: Stefan Monnier writes: > It should be easy (much smaller than a summer project) to change the > C code so that a bytecode offset can be extracted from the backtrace. > > The harder and more interesting part is how to propagate source > information (line numbers and/or lexical variable names and location) to > byte-code. There are many parts to this, so it's definitely possible to > get some summer project(s) out of it. E.g. one such project is to change > the reader so it outputs "fat cons cells" (i.e. cons-cells with line-num > info), then arrange for that info to survive `macroexpand-all` and > `cconv.el`. That could already be used to give more precise line > numbers in bytecompiler warnings. > > Another is to devise a way to annotate bytecode objects with a map from > byte-offsets to information about the lexical vars in-scope at that point > and their location (i.e. position in the stack or in the closure). > And then teach Emacs's debugger to use that info. > >> But enough about me. What is most in need of help in GNU Emacs that a >> summer student might reasonably make progress on? > > I'm sure there are lots of desires. One I'd suggest is to introduce an > "object description" that can be used both by the GC and pdump code (and > maybe also by `equal` and `print--preprocess`?), so that when changing > the representation of objects or introducing new types we don't have to > make corresponding changes in so many different places. XEmacs had such > a thing, so there's previous experience on which we can build. > It could also be a step towards replacing our GC with one that's > incremental such the one in XEmacs (or even better: concurrent, unlike > that of XEmacs). > > > Stefan It's probably definitely early to discuss but can't resist. Do we really need some dedicated low level object? This should be all overhead that disappears with compilation anyway. Also wanted to ask, am I wrong or something has been attempted in this field? I'm quite curious on this because the day we get source locations crossing byte-code we could use the native compiler also as a diagnostic tool. Andrea -- akrl@sdf.org