Re: [PHP-DEV] constant folding optimization

2007-12-07 Thread Nuno Lopes
Abstaract Syntax Tree, that should be evaluated at run-time > by > zval_update_constant(). > Thanks. Dmitry. >> -Original Message- >> From: Nuno Lopes [mailto:[EMAIL PROTECTED] >> Sent: Saturday, September 08, 2007 10:50 PM >> To: Stanislav Malyshev >> Cc: i

Re: [PHP-DEV] constant folding optimization

2007-12-06 Thread Alexey Zakhlestin
tant(). > > > Thanks. Dmitry. > > >> -Original Message- > >> From: Nuno Lopes [mailto:[EMAIL PROTECTED] > >> Sent: Saturday, September 08, 2007 10:50 PM > >> To: Stanislav Malyshev > >> Cc: internals@lists.php.net;

Re: [PHP-DEV] constant folding optimization

2007-09-10 Thread Marcus Boerger
mitry. >> -Original Message- >> From: Nuno Lopes [mailto:[EMAIL PROTECTED] >> Sent: Saturday, September 08, 2007 10:50 PM >> To: Stanislav Malyshev >> Cc: internals@lists.php.net; [EMAIL PROTECTED]; [EMAIL PROTECTED] >> Subject: Re: Re: [PHP-DEV] constant fo

RE: [PHP-DEV] constant folding optimization

2007-09-10 Thread Dmitry Stogov
v [mailto:[EMAIL PROTECTED] > Sent: Monday, September 10, 2007 12:17 PM > To: Dmitry Stogov > Cc: 'Nuno Lopes'; internals@lists.php.net; [EMAIL PROTECTED] > Subject: Re: [PHP-DEV] constant folding optimization > > > > In case we support constant expressions, we should s

Re: [PHP-DEV] constant folding optimization

2007-09-10 Thread Stanislav Malyshev
In case we support constant expressions, we should support constants in such expressions, but the values of these constants may be unknown in compile time. I don't see why we should support constants in such expressions. -- Stanislav Malyshev, Zend Software Architect [EMAIL PROTECTED] http://

RE: Re: [PHP-DEV] constant folding optimization

2007-09-10 Thread Dmitry Stogov
EMAIL PROTECTED] > Subject: Re: Re: [PHP-DEV] constant folding optimization > > > >> I made a patch to implement constant folding optimization in the > >> Zend engine. > >> The patch is available at: > >> http://web.ist.utl.pt/nuno.lopes/zend_constan

Re: Re: [PHP-DEV] constant folding optimization

2007-09-09 Thread Nuno Lopes
Well we don't support that syntax at this moment. If you are saying that we could add support for such syntax.. it does seem a good idea, but in that case we would need to modify a few rules of the grammar (like adding a const_expr production, and allow static_scalar derive it, etc..). Ri

Re: [PHP-DEV] constant folding optimization

2007-09-08 Thread Stanislav Malyshev
Well we don't support that syntax at this moment. If you are saying that we could add support for such syntax.. it does seem a good idea, but in that case we would need to modify a few rules of the grammar (like adding a const_expr production, and allow static_scalar derive it, etc..). Right,

Re: Re: [PHP-DEV] constant folding optimization

2007-09-08 Thread Nuno Lopes
I made a patch to implement constant folding optimization in the Zend engine. The patch is available at: http://web.ist.utl.pt/nuno.lopes/zend_constant_folding.txt I like the idea a lot, however I think this patch has one significant downside - as far as I understand, it doesn't enable co

Re: [PHP-DEV] constant folding optimization

2007-09-08 Thread Stanislav Malyshev
I made a patch to implement constant folding optimization in the Zend engine. The patch is available at: http://web.ist.utl.pt/nuno.lopes/zend_constant_folding.txt I like the idea a lot, however I think this patch has one significant downside - as far as I understand, it doesn't enable constan

[PHP-DEV] constant folding optimization

2007-09-08 Thread Nuno Lopes
Hi, I made a patch to implement constant folding optimization in the Zend engine. The patch is available at: http://web.ist.utl.pt/nuno.lopes/zend_constant_folding.txt Please review & commit. Regards, Nuno P.S.: 'make test' shows 2 regressions with this patch (tests/run-test/test005.phpt