From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Vibhav Pant Newsgroups: gmane.emacs.devel Subject: Re: [PATCH]: Add new bytecode op `switch' for implementing branch tables. Date: Wed, 8 Feb 2017 23:16:25 +0530 Message-ID: References: <1b07c68a-873e-83c8-246d-423bc83a3881@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=94eb2c14e95ea3cdf80548087194 X-Trace: blaine.gmane.org 1486576028 10910 195.159.176.226 (8 Feb 2017 17:47:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 8 Feb 2017 17:47:08 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 08 18:47:03 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cbWKb-0002LR-NT for ged-emacs-devel@m.gmane.org; Wed, 08 Feb 2017 18:47:01 +0100 Original-Received: from localhost ([::1]:60741 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cbWKf-0007Sb-Pv for ged-emacs-devel@m.gmane.org; Wed, 08 Feb 2017 12:47:05 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48690) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cbWK4-0007SI-UA for emacs-devel@gnu.org; Wed, 08 Feb 2017 12:46:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cbWK4-0000uy-7i for emacs-devel@gnu.org; Wed, 08 Feb 2017 12:46:28 -0500 Original-Received: from mail-yb0-x236.google.com ([2607:f8b0:4002:c09::236]:35302) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cbWK4-0000uq-4i for emacs-devel@gnu.org; Wed, 08 Feb 2017 12:46:28 -0500 Original-Received: by mail-yb0-x236.google.com with SMTP id o65so48036230ybo.2 for ; Wed, 08 Feb 2017 09:46:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:cc; bh=GNEjbwb90/SIEPEjc5HZf59MAZ0mwd/60pyWDBic5f4=; b=F/3pOuLn8rT1j+EW4rvUUztA6g9sDi6IJU/v8PtrTBxUNV09Fx7d7/sPNe3pgzZWaE WGnaiPSz3/rL4XLe0ehym9P+FjsR5eeVTFVMTHD/4PqKzgfYgO4G/Di1QiuQR705gCgL cTpfSdNMJCJaqzx2Ud4z9mB7eUBpEp6CP5k/b3iHnkPk3wR6jaMFOjZigUe4h9xWb/pM i9KW6NrJGfuJyhA++geZrFXwLDO3W0mV+vGzxew1XIBfsVP4HKDGOhSNt3z97GXM4x8w IFbuNpA8ETBUN5nfz1G/1qOL6zGhHgNDI7F7h88pY064HTUqhzO8KwBL6Bl+95hKV09F biGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:cc; bh=GNEjbwb90/SIEPEjc5HZf59MAZ0mwd/60pyWDBic5f4=; b=oDh4Wsz+WFiJdgc8ASn0mUFvG++FHig2rCY0uU8lJEh5gVkbXJfFztHkwCmKWkJbLB eLu88wC47fwsLx6fhjFIn8ePx9E9psbXsmTR56tU9+aTKXFdoW14ZqSGMt65CZZ6TdeY dsNnBuOPt9yd1T20G7dqadnWJ/eKzt0ik/CPC+IRB+FhBA/jOdvcq9ucLjjezlmcGAn4 Vg/1L85xba+0zw1+bLfhKY2yW0Dhmj8btVOI1f3rMSVUOw44RLpmc7OuS6t31VGTEHvn 0JK3r5cKtac4As2HWFisL5ruej73A4OBOU7kTenIW/4/JYUkB9DOn93FTTpnAfAURNjp bBQw== X-Gm-Message-State: AMke39nDH1Cj1FkI4yGDgX2wqAtQjDfETlcSWtLIMsbpLcQer0gq2k3C2c22pnjMTDKcFICqDeib7cvE39YwiQ== X-Received: by 10.37.40.197 with SMTP id o188mr14739457ybo.17.1486575987050; Wed, 08 Feb 2017 09:46:27 -0800 (PST) Original-Received: by 10.129.153.77 with HTTP; Wed, 8 Feb 2017 09:46:25 -0800 (PST) Original-Received: by 10.129.153.77 with HTTP; Wed, 8 Feb 2017 09:46:25 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4002:c09::236 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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:212142 Archived-At: --94eb2c14e95ea3cdf80548087194 Content-Type: text/plain; charset=UTF-8 The jump address is stored in the hash table as (tag & 255 . tag >> 8), where tag is the tag number from byte-compile-make-tah. The correct address to jump to is thus calculated in the bytecode VM by car + cdr << 8. Is it possible to make this calculation in bytecomp.el itself without the risk of a potential overflow? Vibhav Pant vibhavp@gmail.com --94eb2c14e95ea3cdf80548087194 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
The jump address is stored in the hash table as (tag &= ; 255 . tag >> 8), where tag is the tag number from byte-compile-make= -tah. The correct address to jump to is thus calculated in the bytecode VM = by car + cdr << 8. Is it possible to make this calculation in bytecom= p.el itself without the risk of a potential overflow?

Vibh= av Pant
vibhavp@gmail.com
=
--94eb2c14e95ea3cdf80548087194--