Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:32518 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 90695 invoked by uid 1010); 1 Oct 2007 17:59:10 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 90679 invoked from network); 1 Oct 2007 17:59:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Oct 2007 17:59:10 -0000 Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.162 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 212.25.124.162 mail.zend.com Windows 2000 SP4, XP SP1 Received: from [212.25.124.162] ([212.25.124.162:45254] helo=mx1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F9/21-15406-96531074 for ; Mon, 01 Oct 2007 13:59:10 -0400 Received: from us-ex1.zend.com ([192.168.16.5]) by mx1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 1 Oct 2007 19:59:02 +0200 Received: from [127.0.0.1] ([192.168.16.180]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 1 Oct 2007 10:58:59 -0700 Message-ID: <47013562.1040103@zend.com> Date: Mon, 01 Oct 2007 10:58:58 -0700 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Paul Biggar CC: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 01 Oct 2007 17:58:59.0042 (UTC) FILETIME=[BDEF9C20:01C80454] Subject: Re: [PHP-DEV] Re: Compiled variables and backpatching From: stas@zend.com (Stanislav Malyshev) > Stanislav wrote me a very useful reply to my CV questions. I wonder if > anyone has time to give me a quick note on backpatching, and what that > is? I think backpatching refers to updating past opcodes (i.e. opcodes for code that was already parsed) when they need something that would be known only in the future. E.g., if you have if/else statement, then when if condition is false you need to jump to else, but else was not parsed yet - so when we parse if, we create opcode, but then update it when we parse else so that it jumps to the right place. Also backpatching is used to compose variable expressions - like $foo[$bar]->x->$y->z. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com