diff options
Diffstat (limited to 'Zend')
| -rw-r--r-- | Zend/zend-parser.y | 16 | ||||
| -rw-r--r-- | Zend/zend.h | 4 | ||||
| -rw-r--r-- | Zend/zend_API.c | 54 | ||||
| -rw-r--r-- | Zend/zend_API.h | 8 | ||||
| -rw-r--r-- | Zend/zend_compile.c | 12 | ||||
| -rw-r--r-- | Zend/zend_execute.c | 64 | ||||
| -rw-r--r-- | Zend/zend_execute_API.c | 14 | ||||
| -rw-r--r-- | Zend/zend_opcode.c | 4 | ||||
| -rw-r--r-- | Zend/zend_operators.c | 2 |
9 files changed, 89 insertions, 89 deletions
diff --git a/Zend/zend-parser.y b/Zend/zend-parser.y index 33aefc2bd6..1a0b3c32d6 100644 --- a/Zend/zend-parser.y +++ b/Zend/zend-parser.y @@ -272,11 +272,11 @@ parameter_list: non_empty_parameter_list: - T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$1, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; $$.u.constant.refcount=1; $$.u.constant.is_ref=0; do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE CLS_CC); } - | '&' T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$2, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; $$.u.constant.refcount=1; $$.u.constant.is_ref=0; do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_FORCE CLS_CC); } - | T_CONST T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$2, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; $$.u.constant.refcount=1; $$.u.constant.is_ref=0; do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE CLS_CC); } - | T_VARIABLE '=' static_scalar { znode tmp; fetch_simple_variable(&tmp, &$1, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; $$.u.constant.refcount=1; $$.u.constant.is_ref=0; do_receive_arg(ZEND_RECV_INIT, &tmp, &$$, &$3, BYREF_NONE CLS_CC); } - | T_VARIABLE '=' T_UNSET { znode tmp; fetch_simple_variable(&tmp, &$1, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; $$.u.constant.refcount=1; $$.u.constant.is_ref=0; do_receive_arg(ZEND_RECV_INIT, &tmp, &$$, NULL, BYREF_NONE CLS_CC); } + T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$1, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; $$.u.constant.refcount=1; $$.u.constant.EA=0; do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE CLS_CC); } + | '&' T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$2, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; $$.u.constant.refcount=1; $$.u.constant.EA=0; do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_FORCE CLS_CC); } + | T_CONST T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$2, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; $$.u.constant.refcount=1; $$.u.constant.EA=0; do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE CLS_CC); } + | T_VARIABLE '=' static_scalar { znode tmp; fetch_simple_variable(&tmp, &$1, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; $$.u.constant.refcount=1; $$.u.constant.EA=0; do_receive_arg(ZEND_RECV_INIT, &tmp, &$$, &$3, BYREF_NONE CLS_CC); } + | T_VARIABLE '=' T_UNSET { znode tmp; fetch_simple_variable(&tmp, &$1, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; $$.u.constant.refcount=1; $$.u.constant.EA=0; do_receive_arg(ZEND_RECV_INIT, &tmp, &$$, NULL, BYREF_NONE CLS_CC); } | non_empty_parameter_list ',' T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$3, 0 CLS_CC); $$=$1; $$.u.constant.value.lval++; do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE CLS_CC); } | non_empty_parameter_list ',' '&' T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$4, 0 CLS_CC); $$=$1; $$.u.constant.value.lval++; do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_FORCE CLS_CC); } | non_empty_parameter_list ',' T_CONST T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$4, 0 CLS_CC); $$=$1; $$.u.constant.value.lval++; do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE CLS_CC); } @@ -484,7 +484,7 @@ scalar: static_array_pair_list: - /* empty */ { $$.op_type = IS_CONST; $$.u.constant.refcount=1; $$.u.constant.is_ref=0; array_init(&$$.u.constant); } + /* empty */ { $$.op_type = IS_CONST; $$.u.constant.refcount=1; $$.u.constant.EA=0; array_init(&$$.u.constant); } | non_empty_static_array_pair_list { $$ = $1; } ; @@ -492,8 +492,8 @@ static_array_pair_list: non_empty_static_array_pair_list: non_empty_static_array_pair_list ',' static_scalar T_DOUBLE_ARROW static_scalar { do_add_static_array_element(&$$, &$3, &$5); } | non_empty_static_array_pair_list ',' static_scalar { do_add_static_array_element(&$$, NULL, &$3); } - | static_scalar T_DOUBLE_ARROW static_scalar { $$.op_type = IS_CONST; $$.u.constant.refcount=1; $$.u.constant.is_ref=0; array_init(&$$.u.constant); do_add_static_array_element(&$$, &$1, &$3); } - | static_scalar { $$.op_type = IS_CONST; $$.u.constant.refcount=1; $$.u.constant.is_ref=0; array_init(&$$.u.constant); do_add_static_array_element(&$$, NULL, &$1); } + | static_scalar T_DOUBLE_ARROW static_scalar { $$.op_type = IS_CONST; $$.u.constant.refcount=1; $$.u.constant.EA=0; array_init(&$$.u.constant); do_add_static_array_element(&$$, &$1, &$3); } + | static_scalar { $$.op_type = IS_CONST; $$.u.constant.refcount=1; $$.u.constant.EA=0; array_init(&$$.u.constant); do_add_static_array_element(&$$, NULL, &$1); } ; expr: diff --git a/Zend/zend.h b/Zend/zend.h index 9e377b859a..571802fbf0 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -91,7 +91,7 @@ struct _zval_struct { /* Variable information */ zvalue_value value; /* value */ unsigned char type; /* active type */ - unsigned char is_ref; + unsigned char EA; short refcount; }; @@ -175,7 +175,7 @@ typedef struct _zend_utility_values { #define MAKE_STD_ZVAL(zv) \ zv = (zval *) emalloc(sizeof(zval)); \ zv->refcount = 1; \ - zv->is_ref = 0; + zv->EA = 0; int zend_startup(zend_utility_functions *utility_functions, char **extensions); diff --git a/Zend/zend_API.c b/Zend/zend_API.c index fdda38c109..6e6426c83f 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -52,14 +52,14 @@ ZEND_API int getParameters(int ht, int param_count,...) while (param_count>0) { param = va_arg(ptr, zval **); param_ptr = *(p-param_count); - if (!param_ptr->is_ref && param_ptr->refcount>1) { + if (!param_ptr->EA && param_ptr->refcount>1) { zval *new_tmp; new_tmp = (zval *) emalloc(sizeof(zval)); *new_tmp = *param_ptr; zval_copy_ctor(new_tmp); new_tmp->refcount = 1; - new_tmp->is_ref = 0; + new_tmp->EA = 0; param_ptr = new_tmp; ((zval *) *(p-param_count))->refcount--; *(p-param_count) = param_ptr; @@ -90,14 +90,14 @@ ZEND_API int getParametersArray(int ht, int param_count, zval **argument_array) while (param_count>0) { param_ptr = *(p-param_count); - if (!param_ptr->is_ref && param_ptr->refcount>1) { + if (!param_ptr->EA && param_ptr->refcount>1) { zval *new_tmp; new_tmp = (zval *) emalloc(sizeof(zval)); *new_tmp = *param_ptr; zval_copy_ctor(new_tmp); new_tmp->refcount = 1; - new_tmp->is_ref = 0; + new_tmp->EA = 0; param_ptr = new_tmp; ((zval *) *(p-param_count))->refcount--; *(p-param_count) = param_ptr; @@ -175,7 +175,7 @@ ZEND_API int ParameterPassedByReference(int ht, uint n) return FAILURE; } arg = (zval *) *(p-arg_count+n-1); - return arg->is_ref; + return arg->EA; } @@ -231,7 +231,7 @@ ZEND_API inline int add_assoc_long(zval *arg, char *key, long n) tmp->type = IS_LONG; tmp->value.lval = n; tmp->refcount=1; - tmp->is_ref=0; + tmp->EA=0; return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL); } @@ -243,7 +243,7 @@ ZEND_API inline int add_assoc_double(zval *arg, char *key, double d) tmp->type = IS_DOUBLE; tmp->value.dval = d; tmp->refcount=1; - tmp->is_ref=0; + tmp->EA=0; return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL); } @@ -260,7 +260,7 @@ ZEND_API inline int add_assoc_string(zval *arg, char *key, char *str, int duplic tmp->value.str.val = str; } tmp->refcount=1; - tmp->is_ref=0; + tmp->EA=0; return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL); } @@ -277,7 +277,7 @@ ZEND_API inline int add_assoc_stringl(zval *arg, char *key, char *str, uint leng tmp->value.str.val = str; } tmp->refcount=1; - tmp->is_ref=0; + tmp->EA=0; return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL); } @@ -296,7 +296,7 @@ ZEND_API inline int add_index_long(zval *arg, uint index, long n) tmp->type = IS_LONG; tmp->value.lval = n; tmp->refcount=1; - tmp->is_ref=0; + tmp->EA=0; return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),NULL); } @@ -308,7 +308,7 @@ ZEND_API inline int add_index_double(zval *arg, uint index, double d) tmp->type = IS_DOUBLE; tmp->value.dval = d; tmp->refcount=1; - tmp->is_ref=0; + tmp->EA=0; return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),NULL); } @@ -325,7 +325,7 @@ ZEND_API inline int add_index_string(zval *arg, uint index, char *str, int dupli tmp->value.str.val = str; } tmp->refcount=1; - tmp->is_ref=0; + tmp->EA=0; return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *), NULL); } @@ -342,7 +342,7 @@ ZEND_API inline int add_index_stringl(zval *arg, uint index, char *str, uint len tmp->value.str.val = str; } tmp->refcount=1; - tmp->is_ref=0; + tmp->EA=0; return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),NULL); } @@ -354,7 +354,7 @@ ZEND_API inline int add_next_index_long(zval *arg, long n) tmp->type = IS_LONG; tmp->value.lval = n; tmp->refcount=1; - tmp->is_ref=0; + tmp->EA=0; return zend_hash_next_index_insert(arg->value.ht, &tmp, sizeof(zval *), NULL); } @@ -366,7 +366,7 @@ ZEND_API inline int add_next_index_double(zval *arg, double d) tmp->type = IS_DOUBLE; tmp->value.dval = d; tmp->refcount=1; - tmp->is_ref=0; + tmp->EA=0; return zend_hash_next_index_insert(arg->value.ht, &tmp, sizeof(zval *), NULL); } @@ -383,7 +383,7 @@ ZEND_API inline int add_next_index_string(zval *arg, char *str, int duplicate) tmp->value.str.val = str; } tmp->refcount=1; - tmp->is_ref=0; + tmp->EA=0; return zend_hash_next_index_insert(arg->value.ht, &tmp, sizeof(zval *),NULL); } @@ -400,7 +400,7 @@ ZEND_API inline int add_next_index_stringl(zval *arg, char *str, uint length, in tmp->value.str.val = str; } tmp->refcount=1; - tmp->is_ref=0; + tmp->EA=0; return zend_hash_next_index_insert(arg->value.ht, &tmp, sizeof(zval *),NULL); } @@ -417,7 +417,7 @@ ZEND_API inline int add_get_assoc_string(zval *arg, char *key, char *str, void * tmp->value.str.val = str; } tmp->refcount=1; - tmp->is_ref=0; + tmp->EA=0; return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), dest); } @@ -434,7 +434,7 @@ ZEND_API inline int add_get_assoc_stringl(zval *arg, char *key, char *str, uint tmp->value.str.val = str; } tmp->refcount=1; - tmp->is_ref=0; + tmp->EA=0; return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), dest); } @@ -446,7 +446,7 @@ ZEND_API inline int add_get_index_long(zval *arg, uint index, long l, void **des tmp->type = IS_LONG; tmp->value.lval= l; tmp->refcount=1; - tmp->is_ref=0; + tmp->EA=0; return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),dest); } @@ -458,7 +458,7 @@ ZEND_API inline int add_get_index_double(zval *arg, uint index, double d, void * tmp->type = IS_DOUBLE; tmp->value.dval= d; tmp->refcount=1; - tmp->is_ref=0; + tmp->EA=0; return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),dest); } @@ -475,7 +475,7 @@ ZEND_API inline int add_get_index_string(zval *arg, uint index, char *str, void tmp->value.str.val = str; } tmp->refcount=1; - tmp->is_ref=0; + tmp->EA=0; return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),dest); } @@ -492,7 +492,7 @@ ZEND_API inline int add_get_index_stringl(zval *arg, uint index, char *str, uint tmp->value.str.val = str; } tmp->refcount=1; - tmp->is_ref=0; + tmp->EA=0; return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),dest); } @@ -504,7 +504,7 @@ ZEND_API inline int add_property_long(zval *arg, char *key, long n) tmp->type = IS_LONG; tmp->value.lval = n; tmp->refcount=1; - tmp->is_ref=0; + tmp->EA=0; return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL); } @@ -516,7 +516,7 @@ ZEND_API inline int add_property_double(zval *arg, char *key, double d) tmp->type = IS_DOUBLE; tmp->value.dval = d; tmp->refcount=1; - tmp->is_ref=0; + tmp->EA=0; return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL); } @@ -533,7 +533,7 @@ ZEND_API inline int add_property_string(zval *arg, char *key, char *str, int dup tmp->value.str.val = str; } tmp->refcount=1; - tmp->is_ref=0; + tmp->EA=0; return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL); } @@ -550,7 +550,7 @@ ZEND_API inline int add_property_stringl(zval *arg, char *key, char *str, uint l tmp->value.str.val = str; } tmp->refcount=1; - tmp->is_ref=0; + tmp->EA=0; return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL); } diff --git a/Zend/zend_API.h b/Zend/zend_API.h index beba58f459..85eb885de3 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -186,7 +186,7 @@ ZEND_API int add_property_stringl(zval *arg, char *key, char *str, uint length, var->value.str.val = (str); \ var->value.str.len = strlen((str)); \ var->type = IS_STRING; \ - var->is_ref=0; \ + var->EA=0; \ var->refcount=1; \ zend_hash_update(&EG(symbol_table), (n), strlen((n))+1, &var, sizeof(zval *), NULL); \ } \ @@ -199,7 +199,7 @@ ZEND_API int add_property_stringl(zval *arg, char *key, char *str, uint length, var->value.str.val = (v); \ var->value.str.len = (l); \ var->type = IS_STRING; \ - var->is_ref=0; \ + var->EA=0; \ var->refcount=1; \ zend_hash_update(&EG(symbol_table), name, strlen(name)+1, &var, sizeof(zval *), NULL); \ } \ @@ -210,7 +210,7 @@ ZEND_API int add_property_stringl(zval *arg, char *key, char *str, uint length, \ var->value.lval = (v); \ var->type = IS_LONG; \ - var->is_ref=0; \ + var->EA=0; \ var->refcount=1; \ zend_hash_update(&EG(symbol_table), (n), strlen((n))+1, &var, sizeof(zval *), NULL); \ } \ @@ -221,7 +221,7 @@ ZEND_API int add_property_stringl(zval *arg, char *key, char *str, uint length, \ var->value.dval = (v); \ var->type = IS_DOUBLE; \ - var->is_ref=0; \ + var->EA=0; \ var->refcount=1; \ zend_hash_update(&EG(symbol_table)), (n), strlen((n))+1, &var, sizeof(zval *), NULL); \ } \ diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 10e4b78c16..d12b504a2d 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -840,7 +840,7 @@ void do_return(znode *expr CLS_DC) var_uninit(&opline->op1.u.constant); opline->op1.op_type = IS_CONST; opline->op1.u.constant.refcount=1; - opline->op1.u.constant.is_ref=0; + opline->op1.u.constant.EA=0; } SET_UNUSED(opline->op2); } @@ -1039,7 +1039,7 @@ void do_brk_cont(int op, znode *expr CLS_DC) opline->op2.u.constant.type = IS_LONG; opline->op2.u.constant.value.lval = 1; opline->op2.u.constant.refcount=1; - opline->op2.u.constant.is_ref=0; + opline->op2.u.constant.EA=0; opline->op2.op_type = IS_CONST; } } @@ -1190,7 +1190,7 @@ void do_default_before_statement(znode *case_list, znode *default_token CLS_DC) opline->op1.u.constant.type = IS_LONG; opline->op1.u.constant.value.lval = 1; opline->op1.u.constant.refcount=1; - opline->op1.u.constant.is_ref=0; + opline->op1.u.constant.EA=0; SET_UNUSED(opline->op2); switch_entry_ptr->default_case = next_op_number; @@ -1423,7 +1423,7 @@ void do_shell_exec(znode *result, znode *cmd CLS_DC) opline->op1.u.constant.value.str.val = estrndup("shell_exec",sizeof("shell_exec")-1); opline->op1.u.constant.value.str.len = sizeof("shell_exec")-1; opline->op1.u.constant.refcount = 1; - opline->op1.u.constant.is_ref = 0; + opline->op1.u.constant.EA = 0; opline->op1.u.constant.type = IS_STRING; opline->op1.op_type = IS_CONST; opline->extended_value = 1; @@ -1562,7 +1562,7 @@ void do_list_end(znode *result, znode *expr CLS_DC) opline->op2.u.constant.type = IS_LONG; opline->op2.u.constant.value.lval = *((int *) dimension->data); opline->op2.u.constant.refcount = 1; - opline->op2.u.constant.is_ref = 0; + opline->op2.u.constant.EA = 0; if (le == CG(list_llist).tail) { opline->extended_value = ZEND_FETCH_STANDARD; } else { @@ -1973,7 +1973,7 @@ int zendlex(znode *zendlval CLS_DC) } zendlval->u.constant.refcount = 1; - zendlval->u.constant.is_ref = 0; + zendlval->u.constant.EA = 0; zendlval->op_type = IS_CONST; return retval; } diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 1254206539..366226b8a6 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -95,7 +95,7 @@ static inline zval *_get_zval_ptr(znode *node, temp_variable *Ts, int *should_fr case IS_OVERLOADED_OBJECT: Ts[node->u.var].tmp_var = get_overloaded_property(ELS_C); Ts[node->u.var].tmp_var.refcount=1; - Ts[node->u.var].tmp_var.is_ref=1; + Ts[node->u.var].tmp_var.EA=1; return &Ts[node->u.var].tmp_var; break; case IS_STRING_OFFSET: { @@ -114,7 +114,7 @@ static inline zval *_get_zval_ptr(znode *node, temp_variable *Ts, int *should_fr } zval_ptr_dtor(&str); T->tmp_var.refcount=1; - T->tmp_var.is_ref=1; + T->tmp_var.EA=1; T->tmp_var.type = IS_STRING; return &T->tmp_var; } @@ -264,14 +264,14 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2 return; } - if (variable_ptr->is_ref) { + if (variable_ptr->EA) { if (variable_ptr!=value) { short refcount=variable_ptr->refcount; zendi_zval_dtor(*variable_ptr); *variable_ptr = *value; variable_ptr->refcount = refcount; - variable_ptr->is_ref=1; + variable_ptr->EA=1; if (type!=IS_TMP_VAR) { zendi_zval_copy_ctor(*variable_ptr); } @@ -284,7 +284,7 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2 case IS_CONST: if (variable_ptr==value) { variable_ptr->refcount++; - } else if (value->is_ref) { + } else if (value->EA) { zval tmp = *value; tmp = *value; @@ -309,7 +309,7 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2 switch (type) { case IS_VAR: case IS_CONST: - if (value->is_ref) { + if (value->EA) { variable_ptr = *variable_ptr_ptr = (zval *) emalloc(sizeof(zval)); *variable_ptr = *value; zval_copy_ctor(variable_ptr); @@ -326,7 +326,7 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2 break; } } - (*variable_ptr_ptr)->is_ref=0; + (*variable_ptr_ptr)->EA=0; } if (result) { Ts[result->u.var].var = variable_ptr_ptr; @@ -558,11 +558,11 @@ static inline void zend_fetch_dimension_address(znode *result, znode *op1, znode switch (type) { case BP_VAR_RW: case BP_VAR_W: - if (!container->is_ref) { + if (!container->EA) { container->refcount--; if (container->refcount>0) { container = *container_ptr = (zval *) emalloc(sizeof(zval)); - container->is_ref=0; + container->EA=0; } container->refcount=1; } @@ -573,13 +573,13 @@ static inline void zend_fetch_dimension_address(znode *result, znode *op1, znode switch (container->type) { case IS_ARRAY: - if ((type==BP_VAR_W || type==BP_VAR_RW) && container->refcount>1 && !container->is_ref) { + if ((type==BP_VAR_W || type==BP_VAR_RW) && container->refcount>1 && !container->EA) { container->refcount--; *container_ptr = (zval *) emalloc(sizeof(zval)); **container_ptr = *container; container = *container_ptr; container->refcount=1; - container->is_ref=0; + container->EA=0; zendi_zval_copy_ctor(*container); } if (op2->op_type == IS_UNUSED) { @@ -725,11 +725,11 @@ static inline void zend_fetch_property_address(znode *result, znode *op1, znode switch (type) { case BP_VAR_RW: case BP_VAR_W: - if (!container->is_ref) { + if (!container->EA) { container->refcount--; if (container->refcount>0) { container = *container_ptr = (zval *) emalloc(sizeof(zval)); - container->is_ref=0; + container->EA=0; } container->refcount=1; } @@ -754,13 +754,13 @@ static inline void zend_fetch_property_address(znode *result, znode *op1, znode } - if ((type==BP_VAR_W || type==BP_VAR_RW) && container->refcount>1 && !container->is_ref) { + if ((type==BP_VAR_W || type==BP_VAR_RW) && container->refcount>1 && !container->EA) { container->refcount--; *container_ptr = (zval *) emalloc(sizeof(zval)); **container_ptr = *container; container = *container_ptr; container->refcount=1; - container->is_ref=0; + container->EA=0; zendi_zval_copy_ctor(*container); } INC_AI_COUNT(result); @@ -856,7 +856,7 @@ void execute(zend_op_array *op_array ELS_DC) zval *globals = (zval *) emalloc(sizeof(zval)); globals->refcount=1; - globals->is_ref=1; + globals->EA=1; globals->type = IS_ARRAY; globals->value.ht = &EG(symbol_table); if (zend_hash_add(EG(active_symbol_table), "GLOBALS", sizeof("GLOBALS"), &globals, sizeof(zval *), NULL)==FAILURE) { @@ -974,7 +974,7 @@ binary_assign_op_addr: { opline++; continue; } - if (!(*var_ptr)->is_ref) { + if (!(*var_ptr)->EA) { if ((*var_ptr)->refcount>1) { zval *orig_var=*var_ptr; @@ -1017,7 +1017,7 @@ binary_assign_op_addr: { zendi_zval_copy_ctor(Ts[opline->result.u.var].tmp_var); break; } - if (!(*var_ptr)->is_ref) { + if (!(*var_ptr)->EA) { if ((*var_ptr)->refcount>1) { zval *orig_var = *var_ptr; @@ -1359,7 +1359,7 @@ do_fcall_common: var_uninit(dummy); dummy->refcount=1; - dummy->is_ref=0; + dummy->EA=0; zend_hash_update_ptr(function_state.function_symbol_table, "this", sizeof("this"), dummy, sizeof(zval *), (void **) &this_ptr); zend_assign_to_variable_reference(NULL, this_ptr, object_ptr, NULL ELS_CC); object_ptr = NULL; @@ -1420,7 +1420,7 @@ do_fcall_common: *valptr = Ts[opline->op1.u.var].tmp_var; valptr->refcount=1; - valptr->is_ref=0; + valptr->EA=0; zend_ptr_stack_push(&EG(argument_stack), valptr); } break; @@ -1439,13 +1439,13 @@ do_fcall_common: varptr = (zval *) emalloc(sizeof(zval)); var_uninit(varptr); varptr->refcount=0; - varptr->is_ref=0; - } else if (varptr->is_ref) { + varptr->EA=0; + } else if (varptr->EA) { zval *original_var = varptr; varptr = (zval *) emalloc(sizeof(zval)); *varptr = *original_var; - varptr->is_ref = 0; + varptr->EA = 0; varptr->refcount = 0; zval_copy_ctor(varptr); } @@ -1459,7 +1459,7 @@ send_by_ref: zval **varptr_ptr = get_zval_ptr_ptr(&opline->op1, Ts, BP_VAR_W); zval *varptr = *varptr_ptr; - if (!varptr->is_ref) { + if (!varptr->EA) { /* code to break away this variable */ if (varptr->refcount>1) { varptr->refcount--; @@ -1469,7 +1469,7 @@ send_by_ref: varptr->refcount = 1; zval_copy_ctor(varptr); } - varptr->is_ref = 1; + varptr->EA = 1; /* at the end of this code refcount is always 1 */ } varptr->refcount++; @@ -1482,7 +1482,7 @@ send_by_ref: if (zend_ptr_stack_get_arg(opline->op1.u.constant.value.lval, (void **) ¶m ELS_CC)==FAILURE) { zend_error(E_NOTICE, "Missing argument %d for %s()\n", opline->op1.u.constant.value.lval, get_active_function_name()); DEC_AI_COUNT(); - } else if ((*param)->is_ref) { + } else if ((*param)->EA) { zend_assign_to_variable_reference(NULL, get_zval_ptr_ptr(&opline->result, Ts, BP_VAR_W), param, NULL ELS_CC); } else { zend_assign_to_variable(NULL, &opline->result, NULL, *param, IS_VAR, Ts ELS_CC); @@ -1509,7 +1509,7 @@ send_by_ref: *default_value = tmp; } default_value->refcount=0; - default_value->is_ref=0; + default_value->EA=0; param = &default_value; assignment_value = default_value; } else { @@ -1520,7 +1520,7 @@ send_by_ref: assignment_value = *param; } - if (assignment_value->is_ref) { + if (assignment_value->EA) { zend_assign_to_variable_reference(NULL, get_zval_ptr_ptr(&opline->result, Ts, BP_VAR_W), param, NULL ELS_CC); } else { zend_assign_to_variable(NULL, &opline->result, NULL, assignment_value, IS_VAR, Ts ELS_CC); @@ -1622,16 +1622,16 @@ send_by_ref: *new_expr = *expr; expr = new_expr; expr->refcount=1; - expr->is_ref=0; + expr->EA=0; } else { - if (expr->is_ref) { + if (expr->EA) { zval *new_expr = (zval *) emalloc(sizeof(zval)); *new_expr = *expr; expr = new_expr; zendi_zval_copy_ctor(*expr); expr->refcount=1; - expr->is_ref=0; + expr->EA=0; } else { expr->refcount++; } @@ -1810,7 +1810,7 @@ send_by_ref: key = (zval *) emalloc(sizeof(zval)); key->refcount=1; - key->is_ref=0; + key->EA=0; switch (zend_hash_get_current_key(array->value.ht, &str_key, &int_key)) { case HASH_KEY_IS_STRING: key->value.str.val = str_key; diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 924b9f32cc..2ef18a263d 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -80,10 +80,10 @@ void init_executor(CLS_D ELS_DC) var_uninit(&EG(uninitialized_zval)); var_uninit(&EG(error_zval)); EG(uninitialized_zval).refcount = 1; - EG(uninitialized_zval).is_ref=0; + EG(uninitialized_zval).EA=0; EG(uninitialized_zval_ptr)=&EG(uninitialized_zval); EG(error_zval).refcount = 1; - EG(error_zval).is_ref=0; + EG(error_zval).EA=0; EG(error_zval_ptr)=&EG(error_zval); zend_ptr_stack_init(&EG(arg_types_stack)); zend_stack_init(&EG(overloaded_objects_stack)); @@ -265,7 +265,7 @@ ZEND_API void zval_update_constant(zval *p) *p = c; } p->refcount = 1; - p->is_ref = 0; + p->EA = 0; } } @@ -300,7 +300,7 @@ int call_user_function(HashTable *function_table, zval *object, zval *function_n param = (zval *) emalloc(sizeof(zval)); *param = *(params[i]); param->refcount=1; - param->is_ref=0; + param->EA=0; zval_copy_ctor(param); //zend_hash_next_index_insert_ptr(function_state.function_symbol_table, param, sizeof(zval *), NULL); zend_ptr_stack_push(&EG(argument_stack), param); @@ -318,7 +318,7 @@ int call_user_function(HashTable *function_table, zval *object, zval *function_n var_uninit(dummy); dummy->refcount=1; - dummy->is_ref=0; + dummy->EA=0; zend_hash_update_ptr(EG(active_symbol_table), "this", sizeof("this"), dummy, sizeof(zval *), (void **) &this_ptr); zend_assign_to_variable_reference(NULL, this_ptr, &object, NULL ELS_CC); } @@ -419,7 +419,7 @@ ZEND_API inline void zend_assign_to_variable_reference(znode *result, zval **var efree(variable_ptr); } - if (!value_ptr->is_ref) { + if (!value_ptr->EA) { /* break it away */ value_ptr->refcount--; if (value_ptr->refcount>0) { @@ -429,7 +429,7 @@ ZEND_API inline void zend_assign_to_variable_reference(znode *result, zval **var zendi_zval_copy_ctor(*value_ptr); } value_ptr->refcount=1; - value_ptr->is_ref=1; + value_ptr->EA=1; } *variable_ptr_ptr = value_ptr; diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c index ba351af1a7..188df4c913 100644 --- a/Zend/zend_opcode.c +++ b/Zend/zend_opcode.c @@ -294,10 +294,10 @@ void pass_include_eval(zend_op_array *op_array) while (opline<end) { if (opline->op1.op_type==IS_CONST) { - opline->op1.u.constant.is_ref = 1; + opline->op1.u.constant.EA = 1; } if (opline->op2.op_type==IS_CONST) { - opline->op2.u.constant.is_ref = 1; + opline->op2.u.constant.EA = 1; } opline++; } diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 181d01eddf..35ab1c0197 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -333,7 +333,7 @@ static void convert_scalar_to_array(zval *op, int type) *entry = *op; entry->refcount = 1; - entry->is_ref = 0; + entry->EA = 0; switch (type) { case IS_ARRAY: |
