From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: Compilation to native Date: Tue, 13 Apr 2004 16:51:56 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <20040413205156.GA15097@fencepost> References: <87eks0654s.fsf@sno.mundell.ukfsn.org> <87n06bp4ng.fsf@sno.mundell.ukfsn.org> <877jxccutf.fsf@sno.mundell.ukfsn.org> <87k712gesk.fsf@sno.mundell.ukfsn.org> <87k70lhrsq.fsf@sno.mundell.ukfsn.org> <87wu4jrf3j.fsf@sno.mundell.ukfsn.org> <87d66bg55g.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1081889994 2766 80.91.224.253 (13 Apr 2004 20:59:54 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 13 Apr 2004 20:59:54 +0000 (UTC) Cc: Matthew Mundell , rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Apr 13 22:59:46 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BDV0U-0006Nv-00 for ; Tue, 13 Apr 2004 22:59:46 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BDV0T-00060x-00 for ; Tue, 13 Apr 2004 22:59:46 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BDUz1-0006XZ-QS for emacs-devel@quimby.gnus.org; Tue, 13 Apr 2004 16:58:15 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BDUyk-0006Sf-Ak for emacs-devel@gnu.org; Tue, 13 Apr 2004 16:57:58 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BDUtL-0004C9-1F for emacs-devel@gnu.org; Tue, 13 Apr 2004 16:52:54 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BDUtG-00046p-Bn for emacs-devel@gnu.org; Tue, 13 Apr 2004 16:52:18 -0400 Original-Received: from miles by fencepost.gnu.org with local (Exim 4.24) id 1BDUsu-0004VM-Ro; Tue, 13 Apr 2004 16:51:56 -0400 Original-To: Stefan Monnier Content-Disposition: inline In-Reply-To: <87d66bg55g.fsf-monnier+emacs@gnu.org> User-Agent: Mutt/1.3.28i Blat: Foop X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:21594 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:21594 On Tue, Apr 13, 2004 at 01:32:37PM -0400, Stefan Monnier wrote: > You mean you added two byteops: one to read the Nth word on the stack > (counting from the top) and the other to set that word? I expect you > called them something like `sset' and `sref'? > Sounds generally useful (something similar is used in the `lexical' branch > of Miles, you might want to check that out). Yes; here are the new byte codes in the lexical-binding branch: #define Bstack_ref 0 #define Bstack_set 0262 #define Bstack_set2 0263 #define Bvec_ref 0264 #define Bvec_set 0265 #define BdiscardN 0266 stack_ref is a `1 byte with embedded constant' opcode; stack_set2 uses a following 2-byte constant, the rest use a following 1-byte constant (as they have lisp-level equivalents, unusually large offsets can be handled by calling an out-of-line function). discardN uses a hack that allows the TOS to optionally be preserved. -Miles -- Love is a snowmobile racing across the tundra. Suddenly it flips over, pinning you underneath. At night the ice weasels come. --Nietzsche