From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 10396 invoked from network); 17 Aug 2020 22:56:21 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 17 Aug 2020 22:56:21 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id A65719E1B3; Tue, 18 Aug 2020 08:56:14 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 3A5FE9CAB6; Tue, 18 Aug 2020 08:55:39 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=pass (2048-bit key; unprotected) header.d=iitbombay-org.20150623.gappssmtp.com header.i=@iitbombay-org.20150623.gappssmtp.com header.b="tMjh1jSH"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id D1D009CAB3; Tue, 18 Aug 2020 08:55:36 +1000 (AEST) Received: from mail-pg1-f193.google.com (mail-pg1-f193.google.com [209.85.215.193]) by minnie.tuhs.org (Postfix) with ESMTPS id 845039C8BB for ; Tue, 18 Aug 2020 08:55:35 +1000 (AEST) Received: by mail-pg1-f193.google.com with SMTP id m34so8812457pgl.11 for ; Mon, 17 Aug 2020 15:55:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iitbombay-org.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=HHPxxLbd1h2nCkgxTzLiD8YjcvR4G7aELfDaWmR4qlM=; b=tMjh1jSHrn/2D9IDK1ckGI8m3NcSz+j5BVjqnOwebI+/4f0RVzwP4GZwyg42iCTR0t GpzP43f1+5yBRqtZdPR0SIoRUsyuz6Hn15h52Q0yC42+RoKURTDsP+stfAe0xI7Psbsk JnlcG7YpHrL/6fi7boD5nQoZ5h2m0Sr5WP0E1cs0zQC1c2esCKWiZiGIBa03RDh+Jmr1 yeEmq6xHAZAgRuhWZgKTlSemZVGf1EJUVIgtiN1xHSrTAHNApxm4ds4qa7UWcJZduDbA YNZgSpe/GxjTbCrPqetU0cQJEzwlVlwGSAvUSodaUJW7a/lb58g8cLGyWdnUI6GQ9RPF ZvgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=HHPxxLbd1h2nCkgxTzLiD8YjcvR4G7aELfDaWmR4qlM=; b=DayxR2qvk50JGHTdAXMW0gzNiIGPKnh1MysPRdAr7STJuPkYsi1F4SgvhkyZqUbdwX CeDoyyjJoFG8SlD/oMmk5ONbznHQ4dTfz8zIGlTknoedfFDVOjgZtOSByFwSUN054f+n Zo7yhH/JImVtut/+YMG/G2/sqlijUVoXWpbVoHv5f8vNXP5UDHH2AMSgaeNW2N9MTnD/ car1RD/Tq2qjixVg1v/uyLmEqPDKLHRNd4lYCgX8aE3bYTgCEYy/E6fyTJj0BU+h6mDn Lus6yaZaGZrKs68AjvnLk9852WKDAARv+YC+QCKbSgwg6IuhjR2EjGEOIA0RnR1ftVmZ otJQ== X-Gm-Message-State: AOAM532e0tEDThfSlP9h/1GGln4SqMYmSUOaehRZxWPquNkAjS0bJhM/ bAFc0Xs6mDCACdqiYpks0P8pyisaSnvv6Sim X-Google-Smtp-Source: ABdhPJxUfWhX64C4v5EkRlZSXx1c4X6AjAMRsrJp7DRPRlITC0HZV9E1ztWgM+SIgcXnK40rPDR2mw== X-Received: by 2002:a62:7546:: with SMTP id q67mr13026957pfc.210.1597704934948; Mon, 17 Aug 2020 15:55:34 -0700 (PDT) Received: from 107-215-223-226.lightspeed.sntcca.sbcglobal.net (107-215-223-226.lightspeed.sntcca.sbcglobal.net. [107.215.223.226]) by smtp.gmail.com with ESMTPSA id h1sm21926958pfr.39.2020.08.17.15.55.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Aug 2020 15:55:34 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.15\)) From: Bakul Shah In-Reply-To: <20200817223229.5401A4422E@lignose.oclsc.org> Date: Mon, 17 Aug 2020 15:55:31 -0700 Content-Transfer-Encoding: 7bit Message-Id: <7B3D5DB4-B593-4EC8-ABEE-2AC77DFE3F73@iitbombay.org> References: <20200817223229.5401A4422E@lignose.oclsc.org> To: Norman Wilson X-Mailer: Apple Mail (2.3445.104.15) Subject: Re: [TUHS] Memory management in Dennis Ritchie's C Compiler X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: tuhs@tuhs.org Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" On Aug 17, 2020, at 3:32 PM, Norman Wilson wrote: > > The hardest but most-interesting part was optimizing. > lcc does a lot of optimization work by itself, and > initially I'd hoped to dispense with a separate c2 > pass entirely, but that turns out not to be feasible > on machines like the VAX or the PDP-11: internally > lcc separates something like > c = *p++; > into two operations > c = *p; > p++; > and makes two distinct calls to the code generator. > To sew them back together from > cvtbl (p),c > incl p > to > cvtbl (p)+,c > requires external help; lcc just can't see that > what it thinks of as two distinct expressions > can be combined. Didn't lcc use iburg or some such to generate the code generator, which could do such things? > See the lcc book for details. Read the book anyway; > it's the one case I know of in which the authors > followed strict Literate Programming rules and made > a big success of it. Not only is the compiler well- > documented, but the result is a wonderful tour > through the construction and design decisions of a > large program that does real work. Agree. They used noweb. Probably with a troff backend?