From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.devel Subject: Compiled code in Emacs-26 will fail in Emacs-25 if use pcase [was: Add new bytecode op `switch' for implementing branch tables.] Date: Thu, 23 Feb 2017 13:35:54 +0900 (JST) Message-ID: References: <1b07c68a-873e-83c8-246d-423bc83a3881@gmail.com> <83y3xg4ldw.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Trace: blaine.gmane.org 1487824571 4731 195.159.176.226 (23 Feb 2017 04:36:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 23 Feb 2017 04:36:11 +0000 (UTC) User-Agent: Alpine 2.20 (DEB 67 2015-01-07) Cc: cpitclaudel@gmail.com, Emacs developers , Eli Zaretskii , monnier@iro.umontreal.ca, Tino Calancha To: Vibhav Pant Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 23 05:36:06 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 1cgl8O-0000O1-5T for ged-emacs-devel@m.gmane.org; Thu, 23 Feb 2017 05:36:04 +0100 Original-Received: from localhost ([::1]:56538 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgl8T-0006lA-Uf for ged-emacs-devel@m.gmane.org; Wed, 22 Feb 2017 23:36:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56581) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgl8N-0006ks-N9 for emacs-devel@gnu.org; Wed, 22 Feb 2017 23:36:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cgl8M-000474-PQ for emacs-devel@gnu.org; Wed, 22 Feb 2017 23:36:03 -0500 Original-Received: from mail-pf0-x243.google.com ([2607:f8b0:400e:c00::243]:36802) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cgl8J-00046L-32; Wed, 22 Feb 2017 23:35:59 -0500 Original-Received: by mail-pf0-x243.google.com with SMTP id c193so812433pfb.3; Wed, 22 Feb 2017 20:35:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=AYY62IYR3ADgNu+fnI9DYiTQqfK1GRndITPOTxyApfw=; b=iya1wnAdVQjY5pjs/M6PuTcmLO4ht5X/qQnjfoJMfeZubZ6xYO3z9wxT++nsd91lm4 5z4XGocHdsh0zPVy002UGOxeB1G2LHmtgghgEVyN6oWPUcduR/aYwftZj90GsenWD+n5 wc33ukci/Ws6dV/LwlHUqkeM5ZlVVKBs6G+Ka1lBvnIVkZUXHF53sg0N7spl+ugvwxJs NjtRDAdi4PNB2L901gBEGXIxtC0V7kC15BCFhJ2GfZwIJgHMP6SrpfE9NBBONcJrmHLG K2lXAX6HoC1pAx+hQZ28YL8USd9IRZXLaRNhnAcAwOJwqcpDH3TgyT67WueY9hW0WO9Z pjkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=AYY62IYR3ADgNu+fnI9DYiTQqfK1GRndITPOTxyApfw=; b=YFX6wddIBg3Lvqx4niZhSWJkSoq4dFSV3mRp5zSjbdgKFtiyJsx6+q69e0EfExt7c0 zlcxtWZ1NCZBJ0VM39QQWs0wrmFi3C18GNtKJCzEzkUcTW1xdkrWvKyAboGi77b5B6lr QkGsUGqzGYO/ttQhRBUsI8TbenPKALOK+1oGqoBur4d+KRWhUbcjP7gHotcPSi+/RhZu jmXgCklFg+IGTg2bDuC4SpcKn+B7umbtGV46bAgQa9iQdIR4Mi3tl+d+uEtdFL+x09PB FeQ9GDjTs7bzmBo5alPFZRzxwyR0c5zgTOS9NytzU+uU5ICF6KdahaWZlMvxozXLtnfB Jt4Q== X-Gm-Message-State: AMke39n+/2HaXs4VH6ayjCb1/YHx9ex2Jvmqy9cV9GcMRSZdZeY2pVOnz7SVCv0Xu8Un+w== X-Received: by 10.84.228.208 with SMTP id y16mr49196422pli.168.1487824558188; Wed, 22 Feb 2017 20:35:58 -0800 (PST) Original-Received: from calancha-pc (104.81.147.124.dy.bbexcite.jp. [124.147.81.104]) by smtp.gmail.com with ESMTPSA id q19sm6400175pfl.21.2017.02.22.20.35.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Feb 2017 20:35:57 -0800 (PST) X-Google-Original-From: Tino Calancha X-X-Sender: calancha@calancha-pc In-Reply-To: <83y3xg4ldw.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c00::243 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:212540 Archived-At: Sorry if this is obvious, then just ignore. I have a custom lib using `pcase' somewhere. That lib is compatible with Emacs25. Usually i compile this lib against the master branch. Then, i load that very same resulting .elc in Emacs-25 and runs same as in Emacs-26. (Maybe this is just wrong and i must keep separated .elc) After the new bytecode those parts of the lib using pcase fail. For instance, put the following in a file: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun test-case () (let ((val "foo")) (pcase val ("foo" "foo") ("bar" "bar") (_ (error "Neither 'foo' nor 'bar'"))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; I) Compile under master branch. II) Load the resultant .elc with Emacs-25 II) M-: (test-case) ;; Signal error: Invalid byte opcode: op=183, ptr=4 So, in conclusion: >From now on, we need to keep two separated .elc in such custom libs, right?