diff options
author | Zeev Suraski <zeev@php.net> | 1999-05-22 16:10:51 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 1999-05-22 16:10:51 +0000 |
commit | 1250c43a39cb562659076859bcf7c77260e45ffd (patch) | |
tree | 082c64d5b12b875659a5fd416c77a4cb959dd54d /Zend/zend_compile.c | |
parent | 165280264178a9b561eac1e4b5985e0649c906a2 (diff) | |
download | php-git-1250c43a39cb562659076859bcf7c77260e45ffd.tar.gz |
* Add struct name to all typedef's so that they can be debugged with MSVC
* Fix an AiCount bug - list(...) = $var was using $var multiple times, and thus
causing AiCount to be decreased multiple times even though it was increased only
once for $var. Mark all FETCH_DIM's so that they won't decrease AiCount, and only
decrease AiCount on the last FETCH_DIM.
* Fix a stupid bug - forgot to pass CLS_C to some compiler function. For some reason
MSVC doesn't report these :I
Diffstat (limited to 'Zend/zend_compile.c')
-rw-r--r-- | Zend/zend_compile.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index f13d3b07d1..5224033258 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -216,6 +216,7 @@ void fetch_array_dim(znode *result, znode *parent, znode *dim CLS_DC) opline->result.u.var = get_temporary_variable(CG(active_op_array)); opline->op1 = *parent; opline->op2 = *dim; + opline->extended_value = ZEND_FETCH_STANDARD; *result = opline->result; zend_stack_top(&CG(bp_stack), (void **) &fetch_list_ptr); @@ -1435,7 +1436,7 @@ void do_add_list_element(znode *element CLS_DC) { list_llist_element lle; - if(element) { + if (element) { lle.var = *element; zend_llist_copy(&lle.dimensions, &CG(dimension_llist)); zend_llist_add_element(&CG(list_llist), &lle); @@ -1453,7 +1454,6 @@ void do_new_list_begin(CLS_D) void do_new_list_end(CLS_D) { - zend_llist_remove_tail(&CG(dimension_llist)); (*((int *)CG(dimension_llist).tail->data))++; } @@ -1503,6 +1503,11 @@ void do_list_end(znode *result, znode *expr CLS_DC) opline->op2.u.constant.value.lval = *((int *) dimension->data); opline->op2.u.constant.refcount = 1; opline->op2.u.constant.is_ref = 0; + if (le == CG(list_llist).tail) { + opline->extended_value = ZEND_FETCH_STANDARD; + } else { + opline->extended_value = ZEND_FETCH_NO_AI_COUNT; + } last_container = opline->result; dimension = dimension->next; } @@ -1682,6 +1687,7 @@ void do_foreach_cont(znode *value, znode *key, znode *as_token CLS_DC) opline->op2.op_type = IS_CONST; opline->op2.u.constant.type = IS_LONG; opline->op2.u.constant.value.lval = 0; + opline->extended_value = ZEND_FETCH_STANDARD; /* ignored in fetch_dim_tmp_var, but what the hell. */ result_value = opline->result; if (key->op_type != IS_UNUSED) { @@ -1694,6 +1700,7 @@ void do_foreach_cont(znode *value, znode *key, znode *as_token CLS_DC) opline->op2.op_type = IS_CONST; opline->op2.u.constant.type = IS_LONG; opline->op2.u.constant.value.lval = 1; + opline->extended_value = ZEND_FETCH_STANDARD; /* ignored in fetch_dim_tmp_var, but what the hell. */ result_key = opline->result; } |