diff options
author | Andi Gutmans <andi@php.net> | 1999-08-03 18:54:49 +0000 |
---|---|---|
committer | Andi Gutmans <andi@php.net> | 1999-08-03 18:54:49 +0000 |
commit | bbe27ffae968d8dddff8225efd94263e0e9ba290 (patch) | |
tree | 998276a30d07fc966240d0a21b60e1b1fc9edc3d /Zend | |
parent | ecc1aa80e736709a6f19b1984adbc64f16d173d5 (diff) | |
download | php-git-bbe27ffae968d8dddff8225efd94263e0e9ba290.tar.gz |
- Initialize extended value's and put the fetch_type in it's own variable
name.
Diffstat (limited to 'Zend')
-rw-r--r-- | Zend/zend_compile.c | 4 | ||||
-rw-r--r-- | Zend/zend_compile.h | 1 | ||||
-rw-r--r-- | Zend/zend_execute.c | 6 | ||||
-rw-r--r-- | Zend/zend_opcode.c | 1 |
4 files changed, 7 insertions, 5 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 4e335e597a..5e3acc222e 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -186,7 +186,7 @@ void fetch_simple_variable(znode *result, znode *varname, int bp CLS_DC) opline->op1 = *varname; *result = opline->result; SET_UNUSED(opline->op2); - opline->op2.u.constant.value.lval = ZEND_FETCH_LOCAL; + opline->op2.u.fetch_type = ZEND_FETCH_LOCAL; if (bp) { zend_stack_top(&CG(bp_stack), (void **) &fetch_list_ptr); @@ -1681,7 +1681,7 @@ void do_fetch_global_or_static_variable(znode *varname, znode *static_assignment opline->result.u.var = get_temporary_variable(CG(active_op_array)); opline->op1 = *varname; SET_UNUSED(opline->op2); - opline->op2.u.constant.value.lval = fetch_type; + opline->op2.u.fetch_type = fetch_type; if (varname->op_type == IS_CONST) { zval_copy_ctor(&varname->u.constant); diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index a6ce700e26..570ef109e0 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -62,6 +62,7 @@ typedef struct _znode { int var; int opline_num; + int fetch_type; zend_op_array *op_array; struct { int var; /* dummy */ diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 362b3a8c85..ed6ee9e742 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -422,7 +422,7 @@ static inline void zend_fetch_var_address(znode *result, znode *op1, znode *op2, zval tmp_varname; HashTable *target_symbol_table; - switch (op2->u.constant.value.lval) { + switch (op2->u.fetch_type) { case ZEND_FETCH_LOCAL: default: /* just to shut gcc up */ target_symbol_table = EG(active_symbol_table); @@ -468,9 +468,9 @@ static inline void zend_fetch_var_address(znode *result, znode *op1, znode *op2, break; } } - if (op2->u.constant.value.lval == ZEND_FETCH_LOCAL) { + if (op2->u.fetch_type == ZEND_FETCH_LOCAL) { FREE_OP(op1, free_op1); - } else if (op2->u.constant.value.lval == ZEND_FETCH_STATIC) { + } else if (op2->u.fetch_type == ZEND_FETCH_STATIC) { zval_update_constant(*retval); } diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c index 46199b934b..cc7b896127 100644 --- a/Zend/zend_opcode.c +++ b/Zend/zend_opcode.c @@ -214,6 +214,7 @@ zend_op *get_next_op(zend_op_array *op_array CLS_DC) next_op->lineno = CG(zend_lineno); next_op->filename = zend_get_compiled_filename(); next_op->result.op_type = IS_UNUSED; + next_op->extended_value = 0; return next_op; } |