Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82856 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 65007 invoked from network); 16 Feb 2015 15:47:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Feb 2015 15:47:38 -0000 Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 209.85.220.170 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 209.85.220.170 mail-vc0-f170.google.com Received: from [209.85.220.170] ([209.85.220.170:58116] helo=mail-vc0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D9/24-36518-91112E45 for ; Mon, 16 Feb 2015 10:47:37 -0500 Received: by mail-vc0-f170.google.com with SMTP id hq12so10833363vcb.1 for ; Mon, 16 Feb 2015 07:47:34 -0800 (PST) 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:content-type; bh=6lQgIxeUMerXu42Oeq8VT+Bvh93pYOyQ6wUt+mjKDXc=; b=ipR/G98RJOt97jszyedXGAgbDlrGdTbPMO/B3KPBv5YspmtitHtBJwd5Y8HSd6avTw jTnva8jW/TNXCJsJZj3Dm8JwAHVR5fNAuaiu8hwgeZOQwRAgncdJMEhabzJ4gHpnHGax laJRdbhhF8o7LYGK/k1uACqN+dLW2ubSdrFbyoZ4RVQMy0rIDQ3HHpidQyJhGPOssnEv BckQD/NZY2TTqcP4oP5k7fb6fOvbOKxWl0LRL8mHGcvvJ1OML7q7NZsdetSb6aCIoEqB a6zx2Lfsr+1s7kppV/DZ0b3uJbBrWTvognrxoq0WxgtBEsblmJBbW4CoSMoHq+CUfnxT gsnw== X-Gm-Message-State: ALoCoQlTezxjyIGUbX+W1w7H+eJWkXOt0DkvdB4kUh4KkV2OoVm5S75ZZuXxxJqkUFI6CgG02ejDT5OB5EJbao5uchoPgNfU3FKHWU+RXSXd2fx+QcAjR5ejsS/ythXqS44BzFSiRN/OEIWwRSeus3iG0fKg0iECDg== MIME-Version: 1.0 X-Received: by 10.220.185.193 with SMTP id cp1mr16158861vcb.80.1424101654815; Mon, 16 Feb 2015 07:47:34 -0800 (PST) Received: by 10.52.74.73 with HTTP; Mon, 16 Feb 2015 07:47:34 -0800 (PST) In-Reply-To: References: <54E1C24B.6010806@googlemail.com> Date: Mon, 16 Feb 2015 19:47:34 +0400 Message-ID: To: Nikita Popov Cc: Joe Watkins , Crypto Compress , PHP Developers Mailing List Content-Type: multipart/alternative; boundary=089e01538610427fd1050f3681d2 Subject: Re: [PHP-DEV] RFC: Expectations From: dmitry@zend.com (Dmitry Stogov) --089e01538610427fd1050f3681d2 Content-Type: text/plain; charset=UTF-8 Hi Nikita, it looks like a part of old implementation is not trivial with new AST compiler. previously we translated assert(condition) into assert(condition, "assert(condition)"). actually we just captured a part of input buffer and added missing string argument. Is there a simple way to do the same now? It's possible to convert AST into string using recursive pretty-printer. It's not a simple task itself, but it may be reused for other things. Joe, the rest (including zero-cost assert) is implemented at https://github.com/php/php-src/pull/1088/files 9 related tests are failed for now. Thanks. Dmitry. On Mon, Feb 16, 2015 at 1:32 PM, Joe Watkins wrote: > > is there any penalty of catch-AssertionException-blocks? Are those > eliminated in production code? > > Assertions should never be enabled in production code, the ability to catch > (and enable by configuration) the exception serves the developer of the > code during development only. > > The example code is bad, I'll clear this up. > > Cheers > Joe > > On Mon, Feb 16, 2015 at 10:11 AM, Crypto Compress < > cryptocompress@googlemail.com> wrote: > > > Hi Joe, > > > > is there any penalty of catch-AssertionException-blocks? Are those > > eliminated in production code? > > > > Thanks > > > > -- > > PHP Internals - PHP Runtime Development Mailing List > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > --089e01538610427fd1050f3681d2--