summaryrefslogtreecommitdiff
path: root/Zend/zend_opcode.c
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>1999-09-20 15:44:30 +0000
committerAndi Gutmans <andi@php.net>1999-09-20 15:44:30 +0000
commitbabad2694e7cfbfe079aa71cf2b68675a8d4411f (patch)
tree5a746d58b08bd6ac8c4955e31ae342e0cddf897f /Zend/zend_opcode.c
parent4247839610cb9df2fd45fb9bec961672f369144c (diff)
downloadphp-git-babad2694e7cfbfe079aa71cf2b68675a8d4411f.tar.gz
- First step in fixing locking problem. Array fetches are now always done last.
Later on we will want to delay the write fetches even longer until after their resulting expression is parsed. The way it is now, will make it very easy to delay as long as we need.
Diffstat (limited to 'Zend/zend_opcode.c')
-rw-r--r--Zend/zend_opcode.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c
index 0e0eddf698..4ab5abc055 100644
--- a/Zend/zend_opcode.c
+++ b/Zend/zend_opcode.c
@@ -190,6 +190,20 @@ ZEND_API void destroy_op_array(zend_op_array *op_array)
}
+void init_op(zend_op *op CLS_DC)
+{
+ op->lineno = CG(zend_lineno);
+ op->filename = zend_get_compiled_filename();
+ op->result.op_type = IS_UNUSED;
+ op->extended_value = 0;
+ op->op1.u.EA.var = 0;
+ op->op1.u.EA.type = 0;
+ op->op2.u.EA.var = 0;
+ op->op2.u.EA.type = 0;
+ op->result.u.EA.var = 0;
+ op->result.u.EA.type = 0;
+}
+
zend_op *get_next_op(zend_op_array *op_array CLS_DC)
{
int next_op_num = op_array->last++;
@@ -211,16 +225,8 @@ zend_op *get_next_op(zend_op_array *op_array CLS_DC)
}
next_op = &(op_array->opcodes[next_op_num]);
- 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;
- next_op->op1.u.EA.var = 0;
- next_op->op1.u.EA.type = 0;
- next_op->op2.u.EA.var = 0;
- next_op->op2.u.EA.type = 0;
- next_op->result.u.EA.var = 0;
- next_op->result.u.EA.type = 0;
+
+ init_op(next_op CLS_CC);
return next_op;
}