From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Prickliness of the "invalid byte code" stuff Date: Tue, 18 Jun 2019 14:11:01 -0400 Message-ID: References: <87tvcq9b0w.fsf@igel.home> <83v9x2svmf.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="22017"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: eggert@cs.ucla.edu, rms@gnu.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 18 20:12:04 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hdIaQ-0005aG-Sg for ged-emacs-devel@m.gmane.org; Tue, 18 Jun 2019 20:12:03 +0200 Original-Received: from localhost ([::1]:60890 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdIaP-0003DX-TM for ged-emacs-devel@m.gmane.org; Tue, 18 Jun 2019 14:12:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53164) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdIZh-0003Bb-7B for emacs-devel@gnu.org; Tue, 18 Jun 2019 14:11:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hdIZf-0001SK-6l for emacs-devel@gnu.org; Tue, 18 Jun 2019 14:11:17 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:46133) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hdIZZ-0001KY-3U; Tue, 18 Jun 2019 14:11:10 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 970D7443B0D; Tue, 18 Jun 2019 14:11:04 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 74FAB443B0B; Tue, 18 Jun 2019 14:11:02 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1560881462; bh=yck0ESN+/51/whMSt/0jhsxLziQear1y5gwNtXhnOkg=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=NdtROn+fHaQPlJptaybPdvrQKaYKuCen7FuuHTH6T4Gvxp5Skugk6mcgNV/gef+8x MQpBGYd3qmHAQim2FM+7VOWlLRqB9C+9HsBlrqXAgiULZkhVG/gkYQhfh+CDjmSQ3x eHKIwiwHZta9XcPuZAhuHOSeb79wxLhWqtBc3vuhWp9XvfACmFr4uBpiav/RyhnpjD 21Eq+Xiln5TJwr+DhDfRJYmFDpzJgYVESdQV17CFCQLbs8D2oMNR07wHQpgCqMgDr2 LBPTJNXILqMn/nanpZhmR04isQCRIRWIE5DoVIHbCYMdoodXtnuZHEQUedMZlebmTU f/6OmR7eP+Tjg== Original-Received: from alfajor (unknown [157.52.10.58]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 365FD120156; Tue, 18 Jun 2019 14:11:02 -0400 (EDT) In-Reply-To: <83v9x2svmf.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 18 Jun 2019 19:31:36 +0300") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.50 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:237860 Archived-At: > I know nothing about this variable. If my opinion is required, I will > need to read up on that, or maybe someone could just tell more details > about it. OK, here's my take on it: byte-compile-dynamic is a compilation option which makes the .elc file have the actual bytes of the bytecoded functions lazy-loaded (in the same way as the docstrings are lazy-loaded: the byte-code-function-p objects contain in their bytecode field a "pointer" to the file-and-position so the bytecodes are fecthed on-demand when the function is called, via `fetch-bytecode`). This was introduced at the same time as the lazy loading of docstrings. The files using this option are expected to be faster to load (because we load a bit less into heap). I'm claiming that this benefit is not worthwhile. The downsides are: - it doesn't work when the .elc files are compressed. - it doesn't work when the .elc files are loaded via Tramp. - If the .elc files is re-generated after the .elc file was loaded, calling functions from that file typically signal an error (such as "invalid byte code"). A `grep byte-compile-dynamic: **/*.el` seems to indicate it's currently used in 12 files bundled with Emacs. Stefan