From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id aCoxN8O+RmLVfwEAgWs5BA (envelope-from ) for ; Fri, 01 Apr 2022 10:58:43 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id MIzTM8O+RmLl3AAAauVa8A (envelope-from ) for ; Fri, 01 Apr 2022 10:58:43 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 68D5028EB0 for ; Fri, 1 Apr 2022 10:58:43 +0200 (CEST) Received: from localhost ([::1]:37506 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1naD7C-0003Bt-32 for larch@yhetil.org; Fri, 01 Apr 2022 04:58:42 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52512) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naCwR-0007yM-T8 for guix-devel@gnu.org; Fri, 01 Apr 2022 04:47:39 -0400 Received: from [2001:470:142:3::e] (port=49658 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naCwM-0002Li-KJ; Fri, 01 Apr 2022 04:47:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=6c4EPt0hctnNbtzlLie7kMDxh+0wYkRSRMOpBSRU6xs=; b=bpO//mQFUwEct5SkpnmK n9x2u9fHdhjAvD9Bt/ZvsrFDv1PtsU6WDrmyEAV0PlkIAQQKYp9c2JS4igePCx64q/cCp6XAa8VDQ QxWVDl+7erAJHfercixN3U6IJJSfiqKhJttEvjm4IY/OETfBQmX3vE3h5h0LSi5iwAEvRzfsj+1Ee 0cdMFm/oyS36xUbzaMVLbpu5ljVARMjyJKnu0+7CfAuddXLlUYbMXCHFovtFcA2m0MeMHcSpQzEkm kQFjmmPaJsjeBcxlKkQ1o2Qvv93bgmX/4QQZOB3r6trjG3jWvWwMOXnIqb6PSaygKczVptRqnMebA Fz16hvvyM/ZJGw==; Received: from [193.50.110.173] (port=38542 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naCwK-0005IV-MT; Fri, 01 Apr 2022 04:47:30 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Andy Wingo Subject: Re: better error messages through assertions References: <87ilthoxvu.fsf@elephly.net> <87k0dv6ahq.fsf@elephly.net> <87mtibdu5l.fsf@gnu.org> <2205364.8dmU9V6fpu@bastet> <87cziy2hq0.fsf@gnu.org> <87lewrwzll.fsf@gnu.org> <87bkxny3h8.fsf@igalia.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 12 Germinal an 230 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Fri, 01 Apr 2022 10:47:26 +0200 In-Reply-To: <87bkxny3h8.fsf@igalia.com> (Andy Wingo's message of "Wed, 30 Mar 2022 15:28:03 +0200") Message-ID: <87czi1p4v5.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ricardo Wurmus , guix-devel@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1648803523; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=6c4EPt0hctnNbtzlLie7kMDxh+0wYkRSRMOpBSRU6xs=; b=tiI9xD7JlDenHT8LcqZwWG2NI6Ptg5GnspYXK/KrCeJ0quZGliOMcB3XSZskV7u/pU/yLH DP/Z0cYWO3ilD69qZ0DYcKd1B9BFOCcdkmVRXNtJVgA54nB/gOaAZqm7J5fj9bs0fwwqsK o1NYa1f6FsCt4ccgVq/8oGjjAGi2dABC2k2ufkYssBt+yf1iK1vie+zmzwLs+0I0ZI+G4w m2gYrsaPfcj4HraIEn0p5+d+nYYaUg1S2WhlGcIcgecgyQ/eWnLfnAm3v5rWsmUlPnMyvX CJNMI78bpvOGE98mOUaIbZccDOUyHXNlfmkF7HP/KRjG5MO4k99rpE+DpKe+2Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1648803523; a=rsa-sha256; cv=none; b=Zf2SX5X16sFXw8WIq80qyKV00x7/U4NM0bXX+qmUeoVFgm4dcPHGY9wLwR4tZo8Bez0WBi 6fXv02A04uG/6sMYb6HmeY4gCRsE8FADdi9mMu/zumZDtfXlGscKGLx12gZLUCMFv4RYj6 tFQWrVL85iQLa0Abn1FR0cacFz1X75KAGLclYiZ99ZOpbkUNJ7zzCd0iG+NHWX7FgaL7J/ 1u1bF9PsHkDAWea9+z+ZEg+kFpVFjWbI1hTVhrsRO61/ifKcKLnS4Cs47kHYQ1JqPDeG19 zuIzDMgqR0pqWmClwqRapJnEozNq32Ziun9snWros4FuVpcnYwhm+T47LcUzOA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b="bpO//mQF"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -5.27 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b="bpO//mQF"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 68D5028EB0 X-Spam-Score: -5.27 X-Migadu-Scanner: scn0.migadu.com X-TUID: C4N/kAQeANVj Hi, Andy Wingo skribis: > Here we see the first procedure which is the thunk that wraps the > expression. Then in the beginning of the procedure at L7 you can see > there is a check for struct?, which has to be dominated by a true > heap-object? check. Duplicate checks are elided. So if SRFI-9 added a > `struct?` check it wouldn't be more code; rather it would be less, > actually, because instead of branching to L38, you'd branch to L37. Oh very nice, thanks for the explanation! That =E2=80=98,optimize-cps=E2= =80=99 command proves useful. So we can have better error reports with no performance penalty, Philip. Way to go! Ludo=E2=80=99.