Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:91652 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86339 invoked from network); 14 Mar 2016 11:29:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Mar 2016 11:29:17 -0000 Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.161.176 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.161.176 mail-yw0-f176.google.com Received: from [209.85.161.176] ([209.85.161.176:34192] helo=mail-yw0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5E/11-10845-D80A6E65 for ; Mon, 14 Mar 2016 06:29:17 -0500 Received: by mail-yw0-f176.google.com with SMTP id h129so162923786ywb.1 for ; Mon, 14 Mar 2016 04:29:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=C+JYuYCTZTtvG+FqHVs44RwSjex2+ABYZgtP5J3Ovvs=; b=ux97GWXTGOyOqMvKYNU+ZXTL+R0yRBgmu8xcOfRCIy2HGIYuj9mrXScBoqDW6n7Vpz 9oXc7fUnjOYbbKpVbF4VqbBJMGWZBFfe+WM5foTlhB0L2Miz3eoVTMdXK1afTo4jR/5W sWJFFlGBJJqr/fn33+zHBviEstiWsvn5L0GE1v5XvJfbvT2g3S8H4KYOvi9xLMxgutsD osOE1iPrXWHx/YTSAz/I08Zx1IYKZLpMXMy1mUnpnKoMVqXVBJA6FR0PKLzPSZd/Eytn n74lNC/zFyO0zxQiQAkvs3ocwvgIn78W8N5NRF1+KqCDkxWzp05730FhXhYo95QPw900 Ssqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=C+JYuYCTZTtvG+FqHVs44RwSjex2+ABYZgtP5J3Ovvs=; b=W5kMdH6lHULLZu+pNwQ91QFmwQc1Yn99yTb02MC+Nchi5XlR0XXJlsG73MoxjNn2dE 3N6+8EWwZhZjAa0hCbIEO0BzW6ikS+wwN32TxfUOHzih+wuKgh6LOPs6aaUs8J+OQg+G Y+4UMIwHU+mQ03JgKKs6ubscgopWo63Q6U6zFldteSLvCv6pj8UQ9BjriB1LRzUKiSPO 6lycqqi037SKvnZXdVEro25fGJUzamkc8MSXP/B4conUPKPnjGZ4YwfBSS9N/0RN7XyS fu3jFx4RYD3NG8GBdlh3TExcL/U6WJq8n9F5Gd1x67GnU7vwZOO87GMWusJh0kBovWcc 8QfQ== X-Gm-Message-State: AD7BkJJtHI9lvssEhbqHkHzpttQE671r2lQFnKwC2frm5XJ2eDO+FBD071CupSatRympwKrd8IbH33qlnN/0PA== MIME-Version: 1.0 X-Received: by 10.129.148.2 with SMTP id l2mr11517600ywg.298.1457954954406; Mon, 14 Mar 2016 04:29:14 -0700 (PDT) Received: by 10.129.148.70 with HTTP; Mon, 14 Mar 2016 04:29:14 -0700 (PDT) In-Reply-To: References: Date: Mon, 14 Mar 2016 12:29:14 +0100 Message-ID: To: Dmitry Stogov Cc: Xinchen Hui , Bob Weinand , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=94eb2c07b51627f4d2052e00972e Subject: Re: Remove useless opcode handlers From: nikita.ppv@gmail.com (Nikita Popov) --94eb2c07b51627f4d2052e00972e Content-Type: text/plain; charset=UTF-8 On Mon, Mar 14, 2016 at 11:56 AM, Dmitry Stogov wrote: > Please take a quick look and let me know if you see any problems. > > > https://gist.github.com/dstogov/23cc318dd3e411904e10 > > > I'm going to commit this tomorrow. > > > Thanks. Dmitry. > ZEND_ADD is not commutative for array operands. ZEND_MUL may not be commutative if operator overloading is involved (e.g. matrix multiplication is not abelian). The NO_CONST_CONST cases are problematic: Opcache currently, in my eyes incorrectly, evaluates constant expressions even if they throw notices (currently I think mostly by suppressing them). If we do not evaluate these, we may end up with CONST_CONST operations. (This is not a huge problem just now because constant folding in opcache is limited -- however with full constant propagation this leads to many test failures.) The opcodes affected by the last point (limited to those included in your patch) are SUB, MUL, POW, CONCAT (array operands) and BW_NOT (various). However with Andrea's invalid numeric string RFC more will fall in this category (evaluable but throwing). Nikita --94eb2c07b51627f4d2052e00972e--