Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62842 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 74568 invoked from network); 6 Sep 2012 05:37:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Sep 2012 05:37:47 -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 212.199.177.89 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 212.199.177.89 il-mr1.zend.com Received: from [212.199.177.89] ([212.199.177.89:43927] helo=il-mr1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E3/F1-01139-9A638405 for ; Thu, 06 Sep 2012 01:37:46 -0400 Received: from il-gw1.zend.com (unknown [10.1.1.22]) by il-mr1.zend.com (Postfix) with ESMTP id 4788B60764; Thu, 6 Sep 2012 08:31:02 +0300 (IDT) Received: from tpl2.home (10.1.10.25) by il-ex2.zend.net (10.1.1.22) with Microsoft SMTP Server (TLS) id 14.1.255.0; Thu, 6 Sep 2012 08:36:48 +0300 Message-ID: <504836A3.20904@zend.com> Date: Thu, 6 Sep 2012 09:37:39 +0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120828 Thunderbird/15.0 MIME-Version: 1.0 To: Nikita Popov CC: PHP internals References: In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.1.10.25] Subject: Re: [PHP-DEV] Moving to an AST-based parsing/compilation process From: dmitry@zend.com (Dmitry Stogov) Hi Nikita, Personally, I don't see any reason to build AST. As you mentioned yourself, it will be slower and will require more memory. On the other hand AST itself would allow to perform only very basic optimizations. Most of them can be easily done on VM opcode level as well. Also, as it's not an easy task, the old "ugly hacks" will be replaced with new mistakes, which would require new "hacks" in the future :) The only real advantage could be an ability to expose AST to PHP scripts, but only few people may need it. Thanks. Dmitry. On 09/04/2012 11:57 PM, Nikita Popov wrote: > Hey folks! > > Some people asked me what the advantages of using an AST-based > parsing/compilation process are, so I put together a few quick notes > in an RFC: > > https://wiki.php.net/rfc/ast_based_parsing_compilation_process > > It would be nice to get a few comments from other core devs on this. > > Nikita >