From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: The dynamic stack Date: Thu, 08 Mar 2012 00:09:01 +0100 Message-ID: <87aa3sc8ky.fsf@gnu.org> References: <87r4x9d52h.fsf@pobox.com> <87k42xabo2.fsf@gnu.org> <87vcmh1nd2.fsf@pobox.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1331161752 26567 80.91.229.3 (7 Mar 2012 23:09:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 7 Mar 2012 23:09:12 +0000 (UTC) Cc: guile-devel@gnu.org To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Mar 08 00:09:12 2012 Return-path: Envelope-to: guile-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 1S5Pyp-0007by-7e for guile-devel@m.gmane.org; Thu, 08 Mar 2012 00:09:11 +0100 Original-Received: from localhost ([::1]:53731 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S5Pyo-0001Q1-Hg for guile-devel@m.gmane.org; Wed, 07 Mar 2012 18:09:10 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:48071) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S5Pyl-0001Pw-AS for guile-devel@gnu.org; Wed, 07 Mar 2012 18:09:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S5Pyj-0007s0-8w for guile-devel@gnu.org; Wed, 07 Mar 2012 18:09:06 -0500 Original-Received: from xanadu.aquilenet.fr ([88.191.123.111]:43119) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S5Pyj-0007rw-2h for guile-devel@gnu.org; Wed, 07 Mar 2012 18:09:05 -0500 Original-Received: from localhost (xanadu.aquilenet.fr [127.0.0.1]) by xanadu.aquilenet.fr (Postfix) with ESMTP id 9D69072F5; Thu, 8 Mar 2012 00:09:03 +0100 (CET) Original-Received: from xanadu.aquilenet.fr ([127.0.0.1]) by localhost (xanadu.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eRwfmCI9pa-w; Thu, 8 Mar 2012 00:09:03 +0100 (CET) Original-Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by xanadu.aquilenet.fr (Postfix) with ESMTPSA id BC62972F1; Thu, 8 Mar 2012 00:09:02 +0100 (CET) X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 18 =?iso-8859-1?Q?Vent=F4se?= an 220 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu In-Reply-To: <87vcmh1nd2.fsf@pobox.com> (Andy Wingo's message of "Tue, 06 Mar 2012 21:32:57 +0100") User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.93 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 88.191.123.111 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:14050 Archived-At: Hi! Andy Wingo skribis: > On Tue 06 Mar 2012 18:20, ludo@gnu.org (Ludovic Court=C3=A8s) writes: > >> Andy Wingo skribis: >> >>> I have pushed a patch to master that changes the implementation of the >>> dynamic stack >> >> The =E2=80=9Cdynwind stack=E2=80=9D actually (I misread it the first tim= e.) > > Yes, it did have this name before. (More often, "the wind list".) But > since "dynwind" is overloaded so much (dynamic-wind operator, , > scm_dynwind_*), and the dynamic stack can have other things on it like > prompts, I thought it best to give it a new name. Indeed, very good point. That said, when I first saw the topic, I was expecting something about the VM stack, which could now be grown dynamically upon stack overflow. :-) Now, what would be a better name? As you say, in an ideal world, there=E2=80=99d be only one stack so... >> Could you please add comments in dynstack.c (above each function), and >> make sure to follow GCS-style (no hanging brace, for example)? > > What do you mean by "no hanging brace"? Anything reported by: grep -nH -e '[[:graph:]]\+[[:blank:]]*{$' *.[ch] such as: typedef enum { SCM_DYNSTACK_TYPE_NONE =3D 0, SCM_DYNSTACK_TYPE_FRAME, SCM_DYNSTACK_TYPE_UNWINDER, SCM_DYNSTACK_TYPE_REWINDER, SCM_DYNSTACK_TYPE_WITH_FLUIDS, SCM_DYNSTACK_TYPE_PROMPT, SCM_DYNSTACK_TYPE_DYNWIND, } scm_t_dynstack_item_type; Also, =E2=80=9CDon't declare both a structure tag and variables or typedefs= in the same declaration=E2=80=9D (info "(standards) Syntactic Conventions"). > What sorts of comments would you like to see? I have been working with > this code a lot, so perhaps some things which are obvious to me from > names, types, assertions, etc that might not actually be obvious. I > don't see what I can write that isn't wholly redundant. Perhaps you > will let me know :-) Comments above functions would be nice. For instance, I can=E2=80=99t tell= what this does: scm_t_dynstack * scm_dynstack_capture (scm_t_dynstack *dynstack, scm_t_bits *item) A two-line comment above mentioning DYNSTACK and ITEM would be great (info "(standards) Comments"). (And we could use the neat M-x semantic-ia-show-doc, which gives a Geiser feel to this dull C world. ;-)) And I think it wouldn=E2=80=99t be redundant for many/most of the functions= in that file. Thanks, Ludo=E2=80=99.