fix optimizer for try/catch/finally when either catch/finally is omitted
git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1398 c26eb9a1-5813-0410-bd6c-c2e55f420ca73.1
parent
b52561376a
commit
a8f973a0a8
|
@ -1,14 +1,14 @@
|
|||
3.1.0 2013-??-??
|
||||
ChangeLog
|
||||
========
|
||||
* adds support for PHP_5_5
|
||||
* added support for PHP_5_5 (cacher, optimizer, disassembler)
|
||||
* cacher:
|
||||
* closed #228: allow using var caching for cli to share data between child processes
|
||||
* compatible with pcntl_fork()
|
||||
* fixed support for __FILE__ __DIR__ to correctly handle files that got moved/hardlinked (this fix is now move out of xcache.experimental)
|
||||
* disassembler:
|
||||
* fixed crash with nested sandbox
|
||||
* improved support for PHP_4 ~ PHP_5_4, adds support for PHP_5_5
|
||||
* improved support for PHP_4 ~ PHP_5_4, also added support for PHP_5_5
|
||||
* admin
|
||||
* make mkpassword.php easier for noob
|
||||
|
||||
|
|
|
@ -493,10 +493,11 @@ static int bbs_build_from(bbs_t *bbs, zend_op_array *op_array, int count) /* {{{
|
|||
for (i = 0; i < op_array->last_try_catch; i ++) {
|
||||
zend_uint j;
|
||||
zend_try_catch_element *e = &op_array->try_catch_array[i];
|
||||
for (j = e->try_op; j < e->catch_op; j ++) {
|
||||
oplineinfos[j].catchbbid = oplineinfos[e->catch_op].bbid;
|
||||
zend_uint end = e->catch_op != 0 ? e->catch_op : e->finally_op;
|
||||
for (j = e->try_op; j < end; j ++) {
|
||||
oplineinfos[j].catchbbid = e->catch_op == 0 ? BBID_INVALID : oplineinfos[e->catch_op ].bbid;
|
||||
# ifdef ZEND_ENGINE_2_5
|
||||
oplineinfos[j].finallybbid = oplineinfos[e->finally_op].bbid;
|
||||
oplineinfos[j].finallybbid = e->finally_op == 0 ? BBID_INVALID : oplineinfos[e->finally_op].bbid;
|
||||
# endif
|
||||
}
|
||||
}
|
||||
|
@ -609,13 +610,13 @@ static void bbs_restore_opnum(bbs_t *bbs, zend_op_array *op_array) /* {{{ */
|
|||
) {
|
||||
if (bb->catch != BBID_INVALID
|
||||
# ifdef ZEND_ENGINE_2_5
|
||||
&& bb->finally != BBID_INVALID
|
||||
|| bb->finally != BBID_INVALID
|
||||
# endif
|
||||
) {
|
||||
zend_uint try_op = bbs_get(bbs, bbid)->opnum;
|
||||
zend_uint catch_op = bbs_get(bbs, bb->catch)->opnum;
|
||||
zend_uint catch_op = bb->catch == BBID_INVALID ? 0 : bbs_get(bbs, bb->catch )->opnum;
|
||||
# ifdef ZEND_ENGINE_2_5
|
||||
zend_uint finally_op = bbs_get(bbs, bb->finally)->opnum;
|
||||
zend_uint finally_op = bb->finally == BBID_INVALID ? 0 : bbs_get(bbs, bb->finally)->opnum;
|
||||
# endif
|
||||
|
||||
zend_bool already_in_try_catch = 0;
|
||||
|
|
Loading…
Reference in New Issue