From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Helmut Eller Newsgroups: gmane.emacs.devel Subject: Re: indirect threading for bytecode interpreter Date: Thu, 17 Sep 2009 21:20:31 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1253215288 495 80.91.229.12 (17 Sep 2009 19:21:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 17 Sep 2009 19:21:28 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 17 21:21:21 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MoMXg-0003uq-H5 for ged-emacs-devel@m.gmane.org; Thu, 17 Sep 2009 21:21:20 +0200 Original-Received: from localhost ([127.0.0.1]:54702 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MoMXf-0005wG-B7 for ged-emacs-devel@m.gmane.org; Thu, 17 Sep 2009 15:21:19 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MoMXZ-0005wA-Ga for emacs-devel@gnu.org; Thu, 17 Sep 2009 15:21:13 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MoMXV-0005vm-TI for emacs-devel@gnu.org; Thu, 17 Sep 2009 15:21:13 -0400 Original-Received: from [199.232.76.173] (port=48322 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MoMXV-0005vj-QH for emacs-devel@gnu.org; Thu, 17 Sep 2009 15:21:09 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:51086) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MoMXV-0006Ib-Ht for emacs-devel@gnu.org; Thu, 17 Sep 2009 15:21:09 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.50) id 1MoMXH-0003mE-4m for emacs-devel@gnu.org; Thu, 17 Sep 2009 21:20:55 +0200 Original-Received: from 212.46.176.32 ([212.46.176.32]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 17 Sep 2009 21:20:55 +0200 Original-Received: from eller.helmut by 212.46.176.32 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 17 Sep 2009 21:20:55 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 22 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 212.46.176.32 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) Cancel-Lock: sha1:1v7HrMdvS04711VliHUkNtQC3yQ= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:115426 Archived-At: * Tom Tromey [2009-09-17 18:46+0200] writes: > This patch implements indirect threading for the Emacs bytecode > interpreter. It uses a GNU C extension, and falls back to the current > switch-based code if Emacs is compiled with some other compiler. According to the usual Forth terminology http://en.wikipedia.org/wiki/Threaded_code your patch implements token threading not indirect threading. [Indirect threading uses pointers (to Forth-style "word headers") which contain the address of the machine code. There are no such pointers in your patch. At the machine code level, token threaded code uses a "token" as index in a table. That's what your code is doing. Unlike token threaded code, indirect threaded code is typically not position independent.] Despite that, a few years ago somebody has already proposed that http://lists.gnu.org/archive/html/emacs-devel/2004-05/msg00095.html and it wasn't deemed worthwhile back then. Helmut