Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79295 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91656 invoked from network); 28 Nov 2014 21:01:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Nov 2014 21:01:15 -0000 Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.54 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.218.54 mail-oi0-f54.google.com Received: from [209.85.218.54] ([209.85.218.54:52910] helo=mail-oi0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 25/E4-59154-A92E8745 for ; Fri, 28 Nov 2014 16:01:14 -0500 Received: by mail-oi0-f54.google.com with SMTP id u20so5098839oif.13 for ; Fri, 28 Nov 2014 13:01:12 -0800 (PST) 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:content-type; bh=uesGPG6xSFN2K6+6lmtPI6yT9cnq+tp/0G+M0uqjKqg=; b=tmg7Ya4Re3NtTLzwg577CVkUZsls3IQwsr7SVY7L/PbFTqC307vFOFTf9zg3DzjdgS SskIjpsrG+NpZas6d2pRWJZnKKwKk1p/nOXOYkYB6vxQhicROaewmLuMQJlfXsoOew0k HycV15eA+IMQJKyngshJPgXUwBY/pLk6NGF2hZzv13n6Kf+yT/Hj+JIKbgJaRgAuYEOU vo+92Ri6ATMBotHQmuTG4LWRzCaAnumH+f+RHonH/KeTlhJkJLa4hpyLbpfmnrQm0jsZ skmEpEhTMIXMH6flYscjsAq/iUTF4WH3BSnFMTV21pusqlAMLgfFeHpEXY6qVrk5CKxA 8B+A== MIME-Version: 1.0 X-Received: by 10.60.47.103 with SMTP id c7mr25413011oen.31.1417208471905; Fri, 28 Nov 2014 13:01:11 -0800 (PST) Received: by 10.60.37.103 with HTTP; Fri, 28 Nov 2014 13:01:11 -0800 (PST) Received: by 10.60.37.103 with HTTP; Fri, 28 Nov 2014 13:01:11 -0800 (PST) In-Reply-To: References: Date: Fri, 28 Nov 2014 22:01:11 +0100 Message-ID: To: Dmitry Stogov Cc: PHP Internals , Matteo Beccati , Nikita Popov , Xinchen Hui Content-Type: multipart/alternative; boundary=001a11c1e9188a6ddd0508f18fb6 Subject: Re: [PHP-DEV] Re: EX(scope) removing From: tyra3l@gmail.com (Ferenc Kovacs) --001a11c1e9188a6ddd0508f18fb6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 2014.11.28. 9:24 ezt =C3=ADrta ("Dmitry Stogov" ): > > On Fri, Nov 28, 2014 at 7:33 AM, Xinchen Hui wrote: > > > Hey: > > > > On Fri, Nov 28, 2014 at 1:27 AM, Dmitry Stogov wrote: > > > Hi, > > > > > > I'm working on call/return sequence optimization. As part of this wor= k > > I'm > > > minimizing the size of call frame (zend_execute_data) and number of > > > read/write operations on call/return. > > > > > > Could you please take a look into the patch that removes EX(scope) > > > https://gist.github.com/dstogov/5ad50d582346385d587e > > > > committed. > > > All phpt tests are passed, but I'm not completely sure about one line - > > > > > https://gist.github.com/dstogov/5ad50d582346385d587e#file-ex_scope-05-diff-= L193 > > > > > > On the other hand I can't imagine what it may break. > > neither do I. > > > > > > > > Matteo, can you please run your test suites with this patch. > > > > > > PS: I'm also going to: > > > - pack EX(num_args) into reserved space of EX(This) > > > > done. > > > > > - try to get rid of EX(frame_info) > > > > done. > > > > > - try to merge EX(called_scope) and EX(This). Only one of them matters. > > > - try to replace zval EX(This) with a pointer to zend_object EX(object) > > > > Hmm, EX(This) is not like EX(object), it will be accessed by vm > > handler: get_obj_zval_ptr_unused > > > > it suppores to return a zval * there. if EX(This) became a zend_object > > *, then we may face different handlers for IS_UNUSED and other types > > :< > > > > Yes, I know. After the latest changes it doesn't make a lot of sense to > replace ZVAL with ZEND_OBJECT*, because other data is already packed into > the same ZVAL and it won't save any memory. > > Also zend_execute_data structure is aligned on zval boundary (16 bytes), so > it makes sense to save another 16 bytes, but saving 8 bytes won't affect VM > stack memory consumption. > > Thanks. Dmitry. > Fyi this change broke phpdbg in master. --001a11c1e9188a6ddd0508f18fb6--