Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:43082 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 39747 invoked from network); 17 Feb 2009 21:12:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Feb 2009 21:12:49 -0000 Authentication-Results: pb1.pair.com smtp.mail=johannes@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=johannes@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 83.243.58.134 as permitted sender) X-PHP-List-Original-Sender: johannes@php.net X-Host-Fingerprint: 83.243.58.134 mailout2.netbeat.de Linux 2.6 Received: from [83.243.58.134] ([83.243.58.134:59919] helo=mailout2.netbeat.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 77/1A-36931-0582B994 for ; Tue, 17 Feb 2009 16:12:49 -0500 Received: (qmail 25317 invoked by uid 89); 17 Feb 2009 21:33:27 -0000 Received: from unknown (HELO ?192.168.1.103?) (johannes%schlueters.de@93.104.35.87) by mailout2.netbeat.de with ESMTPA; 17 Feb 2009 21:33:27 -0000 To: Stefan Esser Cc: Dmitry Stogov , PHP Internals In-Reply-To: <499B26AC.8050905@sektioneins.de> References: <1234904343.17605.35.camel@goldfinger> <499B26AC.8050905@sektioneins.de> Content-Type: text/plain Date: Tue, 17 Feb 2009 22:12:44 +0100 Message-ID: <1234905164.17605.47.camel@goldfinger> Mime-Version: 1.0 X-Mailer: Evolution 2.24.3 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] ZEND_USER_OPCODE_CONTINUE From: johannes@php.net (Johannes =?ISO-8859-1?Q?Schl=FCter?=) Stefan, On Tue, 2009-02-17 at 22:05 +0100, Stefan Esser wrote: > > while implementing a small toy extension (see [1]) I found out that > > ZEND_USER_OPCODE_CONTINUE seems to misbehave as it doesn't go to the > > next opcode so I ended up in an endless loop executing the same opcode > > again and again. > > I guess that is exactly the required behaviour. How else do you want to > implement an user opcode that transfers control to another opline, like > a special kind of jump opcode. ZEND_USER_OPCODE_DISPATCH_TO sounds like the way to do that. But we have no clean API to set the next opcode and CONTINUE is documented as #define ZEND_USER_OPCODE_CONTINUE 0 /* execute next opcode */ talking about the "next" one - so /some/ cleanup is needed. johannes