Re: ZEND_USER_OPCODE_CONTINUE
| From: | Johannes Schlüter | Date: | Tue, 17 Feb 2009 21:12:44 +0000 |
| Subject: | Re: ZEND_USER_OPCODE_CONTINUE | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-43082@lists.php.net to get a copy of this message | ||
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