summaryrefslogtreecommitdiff
path: root/Zend/zend_execute.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2012-12-04 10:14:39 +0400
committerDmitry Stogov <dmitry@zend.com>2012-12-04 10:14:39 +0400
commit7651d64556ebe223261c73325620c9d4b8d68aff (patch)
tree00867978194bb74a7bcb92f6d77550d3e3a52feb /Zend/zend_execute.c
parent784850211ed9e0bd50c2dac6e26746c0e9a347b7 (diff)
downloadphp-git-7651d64556ebe223261c73325620c9d4b8d68aff.tar.gz
Optimized access to temporary and compiled VM variables
Diffstat (limited to 'Zend/zend_execute.c')
-rw-r--r--Zend/zend_execute.c129
1 files changed, 64 insertions, 65 deletions
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index 5f04ba7465..e5198ebfcb 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -50,10 +50,10 @@
typedef int (*incdec_t)(zval *);
-#define get_zval_ptr(op_type, node, Ts, should_free, type) _get_zval_ptr(op_type, node, Ts, should_free, type TSRMLS_CC)
-#define get_zval_ptr_ptr(op_type, node, Ts, should_free, type) _get_zval_ptr_ptr(op_type, node, Ts, should_free, type TSRMLS_CC)
-#define get_obj_zval_ptr(op_type, node, Ts, should_free, type) _get_obj_zval_ptr(op_type, node, Ts, should_free, type TSRMLS_CC)
-#define get_obj_zval_ptr_ptr(op_type, node, Ts, should_free, type) _get_obj_zval_ptr_ptr(op_type, node, Ts, should_free, type TSRMLS_CC)
+#define get_zval_ptr(op_type, node, ex, should_free, type) _get_zval_ptr(op_type, node, ex, should_free, type TSRMLS_CC)
+#define get_zval_ptr_ptr(op_type, node, ex, should_free, type) _get_zval_ptr_ptr(op_type, node, ex, should_free, type TSRMLS_CC)
+#define get_obj_zval_ptr(op_type, node, ex, should_free, type) _get_obj_zval_ptr(op_type, node, ex, should_free, type TSRMLS_CC)
+#define get_obj_zval_ptr_ptr(op_type, node, ex, should_free, type) _get_obj_zval_ptr_ptr(op_type, node, ex, should_free, type TSRMLS_CC)
/* Prototypes */
static void zend_extension_statement_handler(const zend_extension *extension, zend_op_array *op_array TSRMLS_DC);
@@ -62,8 +62,8 @@ static void zend_extension_fcall_end_handler(const zend_extension *extension, ze
#define RETURN_VALUE_USED(opline) (!((opline)->result_type & EXT_TYPE_UNUSED))
-#define T(offset) (*(temp_variable *)((char *) Ts + offset))
-#define CV(var) CVs[var]
+#define EX_T(offset) (*EX_TMP_VAR(execute_data, offset))
+#define EX_CV(var) (*EX_CV_NUM(execute_data, var))
#define TEMP_VAR_STACK_LIMIT 2000
@@ -154,7 +154,6 @@ static zend_always_inline void zend_pzval_unlock_free_func(zval *z TSRMLS_DC)
/* End of zend_execute_locks.h */
-#define CV_OF(i) (EG(current_execute_data)->CVs[i])
#define CV_DEF_OF(i) (EG(active_op_array)->vars[i])
#define CTOR_CALL_BIT 0x1
@@ -168,19 +167,19 @@ static zend_always_inline void zend_pzval_unlock_free_func(zval *z TSRMLS_DC)
#define DECODE_CTOR(ce) \
((zend_class_entry*)(((zend_uintptr_t)(ce)) & ~(CTOR_CALL_BIT|CTOR_USED_BIT)))
-ZEND_API zval** zend_get_compiled_variable_value(const zend_execute_data *execute_data_ptr, zend_uint var)
+ZEND_API zval** zend_get_compiled_variable_value(const zend_execute_data *execute_data, zend_uint var)
{
- return execute_data_ptr->CVs[var];
+ return EX_CV(var);
}
-static zend_always_inline zval *_get_zval_ptr_tmp(zend_uint var, const temp_variable *Ts, zend_free_op *should_free TSRMLS_DC)
+static zend_always_inline zval *_get_zval_ptr_tmp(zend_uint var, const zend_execute_data *execute_data, zend_free_op *should_free TSRMLS_DC)
{
- return should_free->var = &T(var).tmp_var;
+ return should_free->var = &EX_T(var).tmp_var;
}
-static zend_always_inline zval *_get_zval_ptr_var(zend_uint var, const temp_variable *Ts, zend_free_op *should_free TSRMLS_DC)
+static zend_always_inline zval *_get_zval_ptr_var(zend_uint var, const zend_execute_data *execute_data, zend_free_op *should_free TSRMLS_DC)
{
- zval *ptr = T(var).var.ptr;
+ zval *ptr = EX_T(var).var.ptr;
PZVAL_UNLOCK(ptr, should_free);
return ptr;
@@ -206,7 +205,7 @@ static zend_never_inline zval **_get_zval_cv_lookup(zval ***ptr, zend_uint var,
case BP_VAR_W:
Z_ADDREF(EG(uninitialized_zval));
if (!EG(active_symbol_table)) {
- *ptr = (zval**)EG(current_execute_data)->CVs + (EG(active_op_array)->last_var + var);
+ *ptr = (zval**)EX_CV_NUM(EG(current_execute_data), EG(active_op_array)->last_var + var);
**ptr = &EG(uninitialized_zval);
} else {
zend_hash_quick_update(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, &EG(uninitialized_zval_ptr), sizeof(zval *), (void **)ptr);
@@ -258,7 +257,7 @@ static zend_never_inline zval **_get_zval_cv_lookup_BP_VAR_RW(zval ***ptr, zend_
if (!EG(active_symbol_table)) {
Z_ADDREF(EG(uninitialized_zval));
- *ptr = (zval**)EG(current_execute_data)->CVs + (EG(active_op_array)->last_var + var);
+ *ptr = (zval**)EX_CV_NUM(EG(current_execute_data), EG(active_op_array)->last_var + var);
**ptr = &EG(uninitialized_zval);
zend_error(E_NOTICE, "Undefined variable: %s", cv->name);
} else if (zend_hash_quick_find(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, (void **)ptr)==FAILURE) {
@@ -275,7 +274,7 @@ static zend_never_inline zval **_get_zval_cv_lookup_BP_VAR_W(zval ***ptr, zend_u
if (!EG(active_symbol_table)) {
Z_ADDREF(EG(uninitialized_zval));
- *ptr = (zval**)EG(current_execute_data)->CVs + (EG(active_op_array)->last_var + var);
+ *ptr = (zval**)EX_CV_NUM(EG(current_execute_data), EG(active_op_array)->last_var + var);
**ptr = &EG(uninitialized_zval);
} else if (zend_hash_quick_find(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, (void **)ptr)==FAILURE) {
Z_ADDREF(EG(uninitialized_zval));
@@ -286,7 +285,7 @@ static zend_never_inline zval **_get_zval_cv_lookup_BP_VAR_W(zval ***ptr, zend_u
static zend_always_inline zval *_get_zval_ptr_cv(zend_uint var, int type TSRMLS_DC)
{
- zval ***ptr = &CV_OF(var);
+ zval ***ptr = EX_CV_NUM(EG(current_execute_data), var);
if (UNEXPECTED(*ptr == NULL)) {
return *_get_zval_cv_lookup(ptr, var, type TSRMLS_CC);
@@ -294,9 +293,9 @@ static zend_always_inline zval *_get_zval_ptr_cv(zend_uint var, int type TSRMLS_
return **ptr;
}
-static zend_always_inline zval *_get_zval_ptr_cv_BP_VAR_R(zval ***CVs, zend_uint var TSRMLS_DC)
+static zend_always_inline zval *_get_zval_ptr_cv_BP_VAR_R(const zend_execute_data *execute_data, zend_uint var TSRMLS_DC)
{
- zval ***ptr = &CV(var);
+ zval ***ptr = EX_CV_NUM(execute_data, var);
if (UNEXPECTED(*ptr == NULL)) {
return *_get_zval_cv_lookup_BP_VAR_R(ptr, var TSRMLS_CC);
@@ -304,9 +303,9 @@ static zend_always_inline zval *_get_zval_ptr_cv_BP_VAR_R(zval ***CVs, zend_uint
return **ptr;
}
-static zend_always_inline zval *_get_zval_ptr_cv_BP_VAR_UNSET(zval ***CVs, zend_uint var TSRMLS_DC)
+static zend_always_inline zval *_get_zval_ptr_cv_BP_VAR_UNSET(const zend_execute_data *execute_data, zend_uint var TSRMLS_DC)
{
- zval ***ptr = &CV(var);
+ zval ***ptr = EX_CV_NUM(execute_data, var);
if (UNEXPECTED(*ptr == NULL)) {
return *_get_zval_cv_lookup_BP_VAR_UNSET(ptr, var TSRMLS_CC);
@@ -314,9 +313,9 @@ static zend_always_inline zval *_get_zval_ptr_cv_BP_VAR_UNSET(zval ***CVs, zend_
return **ptr;
}
-static zend_always_inline zval *_get_zval_ptr_cv_BP_VAR_IS(zval ***CVs, zend_uint var TSRMLS_DC)
+static zend_always_inline zval *_get_zval_ptr_cv_BP_VAR_IS(const zend_execute_data *execute_data, zend_uint var TSRMLS_DC)
{
- zval ***ptr = &CV(var);
+ zval ***ptr = EX_CV_NUM(execute_data, var);
if (UNEXPECTED(*ptr == NULL)) {
return *_get_zval_cv_lookup_BP_VAR_IS(ptr, var TSRMLS_CC);
@@ -324,9 +323,9 @@ static zend_always_inline zval *_get_zval_ptr_cv_BP_VAR_IS(zval ***CVs, zend_uin
return **ptr;
}
-static zend_always_inline zval *_get_zval_ptr_cv_BP_VAR_RW(zval ***CVs, zend_uint var TSRMLS_DC)
+static zend_always_inline zval *_get_zval_ptr_cv_BP_VAR_RW(const zend_execute_data *execute_data, zend_uint var TSRMLS_DC)
{
- zval ***ptr = &CV(var);
+ zval ***ptr = EX_CV_NUM(execute_data, var);
if (UNEXPECTED(*ptr == NULL)) {
return *_get_zval_cv_lookup_BP_VAR_RW(ptr, var TSRMLS_CC);
@@ -334,9 +333,9 @@ static zend_always_inline zval *_get_zval_ptr_cv_BP_VAR_RW(zval ***CVs, zend_uin
return **ptr;
}
-static zend_always_inline zval *_get_zval_ptr_cv_BP_VAR_W(zval ***CVs, zend_uint var TSRMLS_DC)
+static zend_always_inline zval *_get_zval_ptr_cv_BP_VAR_W(const zend_execute_data *execute_data, zend_uint var TSRMLS_DC)
{
- zval ***ptr = &CV(var);
+ zval ***ptr = EX_CV_NUM(execute_data, var);
if (UNEXPECTED(*ptr == NULL)) {
return *_get_zval_cv_lookup_BP_VAR_W(ptr, var TSRMLS_CC);
@@ -344,7 +343,7 @@ static zend_always_inline zval *_get_zval_ptr_cv_BP_VAR_W(zval ***CVs, zend_uint
return **ptr;
}
-static inline zval *_get_zval_ptr(int op_type, const znode_op *node, const temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC)
+static inline zval *_get_zval_ptr(int op_type, const znode_op *node, const zend_execute_data *execute_data, zend_free_op *should_free, int type TSRMLS_DC)
{
/* should_free->is_var = 0; */
switch (op_type) {
@@ -353,11 +352,11 @@ static inline zval *_get_zval_ptr(int op_type, const znode_op *node, const temp_
return node->zv;
break;
case IS_TMP_VAR:
- should_free->var = TMP_FREE(&T(node->var).tmp_var);
- return &T(node->var).tmp_var;
+ should_free->var = TMP_FREE(&EX_T(node->var).tmp_var);
+ return &EX_T(node->var).tmp_var;
break;
case IS_VAR:
- return _get_zval_ptr_var(node->var, Ts, should_free TSRMLS_CC);
+ return _get_zval_ptr_var(node->var, execute_data, should_free TSRMLS_CC);
break;
case IS_UNUSED:
should_free->var = 0;
@@ -372,22 +371,22 @@ static inline zval *_get_zval_ptr(int op_type, const znode_op *node, const temp_
return NULL;
}
-static zend_always_inline zval **_get_zval_ptr_ptr_var(zend_uint var, const temp_variable *Ts, zend_free_op *should_free TSRMLS_DC)
+static zend_always_inline zval **_get_zval_ptr_ptr_var(zend_uint var, const zend_execute_data *execute_data, zend_free_op *should_free TSRMLS_DC)
{
- zval** ptr_ptr = T(var).var.ptr_ptr;
+ zval** ptr_ptr = EX_T(var).var.ptr_ptr;
if (EXPECTED(ptr_ptr != NULL)) {
PZVAL_UNLOCK(*ptr_ptr, should_free);
} else {
/* string offset */
- PZVAL_UNLOCK(T(var).str_offset.str, should_free);
+ PZVAL_UNLOCK(EX_T(var).str_offset.str, should_free);
}
return ptr_ptr;
}
static zend_always_inline zval **_get_zval_ptr_ptr_cv(zend_uint var, int type TSRMLS_DC)
{
- zval ***ptr = &CV_OF(var);
+ zval ***ptr = EX_CV_NUM(EG(current_execute_data), var);
if (UNEXPECTED(*ptr == NULL)) {
return _get_zval_cv_lookup(ptr, var, type TSRMLS_CC);
@@ -395,9 +394,9 @@ static zend_always_inline zval **_get_zval_ptr_ptr_cv(zend_uint var, int type TS
return *ptr;
}
-static zend_always_inline zval **_get_zval_ptr_ptr_cv_BP_VAR_R(zval ***CVs, zend_uint var TSRMLS_DC)
+static zend_always_inline zval **_get_zval_ptr_ptr_cv_BP_VAR_R(const zend_execute_data *execute_data, zend_uint var TSRMLS_DC)
{
- zval ***ptr = &CV(var);
+ zval ***ptr = EX_CV_NUM(execute_data, var);
if (UNEXPECTED(*ptr == NULL)) {
return _get_zval_cv_lookup_BP_VAR_R(ptr, var TSRMLS_CC);
@@ -405,9 +404,9 @@ static zend_always_inline zval **_get_zval_ptr_ptr_cv_BP_VAR_R(zval ***CVs, zend
return *ptr;
}
-static zend_always_inline zval **_get_zval_ptr_ptr_cv_BP_VAR_UNSET(zval ***CVs, zend_uint var TSRMLS_DC)
+static zend_always_inline zval **_get_zval_ptr_ptr_cv_BP_VAR_UNSET(const zend_execute_data *execute_data, zend_uint var TSRMLS_DC)
{
- zval ***ptr = &CV(var);
+ zval ***ptr = EX_CV_NUM(execute_data, var);
if (UNEXPECTED(*ptr == NULL)) {
return _get_zval_cv_lookup_BP_VAR_UNSET(ptr, var TSRMLS_CC);
@@ -415,9 +414,9 @@ static zend_always_inline zval **_get_zval_ptr_ptr_cv_BP_VAR_UNSET(zval ***CVs,
return *ptr;
}
-static zend_always_inline zval **_get_zval_ptr_ptr_cv_BP_VAR_IS(zval ***CVs, zend_uint var TSRMLS_DC)
+static zend_always_inline zval **_get_zval_ptr_ptr_cv_BP_VAR_IS(const zend_execute_data *execute_data, zend_uint var TSRMLS_DC)
{
- zval ***ptr = &CV(var);
+ zval ***ptr = EX_CV_NUM(execute_data, var);
if (UNEXPECTED(*ptr == NULL)) {
return _get_zval_cv_lookup_BP_VAR_IS(ptr, var TSRMLS_CC);
@@ -425,9 +424,9 @@ static zend_always_inline zval **_get_zval_ptr_ptr_cv_BP_VAR_IS(zval ***CVs, zen
return *ptr;
}
-static zend_always_inline zval **_get_zval_ptr_ptr_cv_BP_VAR_RW(zval ***CVs, zend_uint var TSRMLS_DC)
+static zend_always_inline zval **_get_zval_ptr_ptr_cv_BP_VAR_RW(const zend_execute_data *execute_data, zend_uint var TSRMLS_DC)
{
- zval ***ptr = &CV(var);
+ zval ***ptr = EX_CV_NUM(execute_data, var);
if (UNEXPECTED(*ptr == NULL)) {
return _get_zval_cv_lookup_BP_VAR_RW(ptr, var TSRMLS_CC);
@@ -435,9 +434,9 @@ static zend_always_inline zval **_get_zval_ptr_ptr_cv_BP_VAR_RW(zval ***CVs, zen
return *ptr;
}
-static zend_always_inline zval **_get_zval_ptr_ptr_cv_BP_VAR_W(zval ***CVs, zend_uint var TSRMLS_DC)
+static zend_always_inline zval **_get_zval_ptr_ptr_cv_BP_VAR_W(const zend_execute_data *execute_data, zend_uint var TSRMLS_DC)
{
- zval ***ptr = &CV(var);
+ zval ***ptr = EX_CV_NUM(execute_data, var);
if (UNEXPECTED(*ptr == NULL)) {
return _get_zval_cv_lookup_BP_VAR_W(ptr, var TSRMLS_CC);
@@ -445,13 +444,13 @@ static zend_always_inline zval **_get_zval_ptr_ptr_cv_BP_VAR_W(zval ***CVs, zend
return *ptr;
}
-static inline zval **_get_zval_ptr_ptr(int op_type, const znode_op *node, const temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC)
+static inline zval **_get_zval_ptr_ptr(int op_type, const znode_op *node, const zend_execute_data *execute_data, zend_free_op *should_free, int type TSRMLS_DC)
{
if (op_type == IS_CV) {
should_free->var = 0;
return _get_zval_ptr_ptr_cv(node->var, type TSRMLS_CC);
} else if (op_type == IS_VAR) {
- return _get_zval_ptr_ptr_var(node->var, Ts, should_free TSRMLS_CC);
+ return _get_zval_ptr_ptr_var(node->var, execute_data, should_free TSRMLS_CC);
} else {
should_free->var = 0;
return NULL;
@@ -468,7 +467,7 @@ static zend_always_inline zval *_get_obj_zval_ptr_unused(TSRMLS_D)
}
}
-static inline zval **_get_obj_zval_ptr_ptr(int op_type, const znode_op *op, const temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC)
+static inline zval **_get_obj_zval_ptr_ptr(int op_type, const znode_op *op, const zend_execute_data *execute_data, zend_free_op *should_free, int type TSRMLS_DC)
{
if (op_type == IS_UNUSED) {
if (EXPECTED(EG(This) != NULL)) {
@@ -480,7 +479,7 @@ static inline zval **_get_obj_zval_ptr_ptr(int op_type, const znode_op *op, cons
zend_error_noreturn(E_ERROR, "Using $this when not in object context");
}
}
- return get_zval_ptr_ptr(op_type, op, Ts, should_free, type);
+ return get_zval_ptr_ptr(op_type, op, execute_data, should_free, type);
}
static zend_always_inline zval **_get_obj_zval_ptr_ptr_unused(TSRMLS_D)
@@ -493,7 +492,7 @@ static zend_always_inline zval **_get_obj_zval_ptr_ptr_unused(TSRMLS_D)
}
}
-static inline zval *_get_obj_zval_ptr(int op_type, znode_op *op, const temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC)
+static inline zval *_get_obj_zval_ptr(int op_type, znode_op *op, const zend_execute_data *execute_data, zend_free_op *should_free, int type TSRMLS_DC)
{
if (op_type == IS_UNUSED) {
if (EXPECTED(EG(This) != NULL)) {
@@ -503,7 +502,7 @@ static inline zval *_get_obj_zval_ptr(int op_type, znode_op *op, const temp_vari
zend_error_noreturn(E_ERROR, "Using $this when not in object context");
}
}
- return get_zval_ptr(op_type, op, Ts, should_free, type);
+ return get_zval_ptr(op_type, op, execute_data, should_free, type);
}
static void zend_assign_to_variable_reference(zval **variable_ptr_ptr, zval **value_ptr_ptr TSRMLS_DC)
@@ -654,11 +653,11 @@ static inline int zend_verify_arg_type(zend_function *zf, zend_uint arg_num, zva
return 1;
}
-static inline void zend_assign_to_object(zval **retval, zval **object_ptr, zval *property_name, int value_type, znode_op *value_op, const temp_variable *Ts, int opcode, const zend_literal *key TSRMLS_DC)
+static inline void zend_assign_to_object(zval **retval, zval **object_ptr, zval *property_name, int value_type, znode_op *value_op, const zend_execute_data *execute_data, int opcode, const zend_literal *key TSRMLS_DC)
{
zval *object = *object_ptr;
zend_free_op free_value;
- zval *value = get_zval_ptr(value_type, value_op, Ts, &free_value, BP_VAR_R);
+ zval *value = get_zval_ptr(value_type, value_op, execute_data, &free_value, BP_VAR_R);
if (Z_TYPE_P(object) != IS_OBJECT) {
if (object == &EG(error_zval)) {
@@ -1410,7 +1409,7 @@ static void zend_fetch_property_address(temp_variable *result, zval **container_
}
}
-static inline zend_brk_cont_element* zend_brk_cont(int nest_levels, int array_offset, const zend_op_array *op_array, const temp_variable *Ts TSRMLS_DC)
+static inline zend_brk_cont_element* zend_brk_cont(int nest_levels, int array_offset, const zend_op_array *op_array, const zend_execute_data *execute_data TSRMLS_DC)
{
int original_nest_levels = nest_levels;
zend_brk_cont_element *jmp_to;
@@ -1426,12 +1425,12 @@ static inline zend_brk_cont_element* zend_brk_cont(int nest_levels, int array_of
switch (brk_opline->opcode) {
case ZEND_SWITCH_FREE:
if (!(brk_opline->extended_value & EXT_TYPE_FREE_ON_RETURN)) {
- zval_ptr_dtor(&T(brk_opline->op1.var).var.ptr);
+ zval_ptr_dtor(&EX_T(brk_opline->op1.var).var.ptr);
}
break;
case ZEND_FREE:
if (!(brk_opline->extended_value & EXT_TYPE_FREE_ON_RETURN)) {
- zendi_zval_dtor(T(brk_opline->op1.var).tmp_var);
+ zendi_zval_dtor(EX_T(brk_opline->op1.var).tmp_var);
}
break;
}
@@ -1482,7 +1481,7 @@ ZEND_API void execute_internal(zend_execute_data *execute_data_ptr, zend_fcall_i
*fci->retval_ptr_ptr, fci->retval_ptr_ptr, fci->object_ptr, 1 TSRMLS_CC);
} else {
- zval **return_value_ptr = &(*(temp_variable *)((char *) execute_data_ptr->Ts + execute_data_ptr->opline->result.var)).var.ptr;
+ zval **return_value_ptr = &EX_TMP_VAR(execute_data_ptr, execute_data_ptr->opline->result.var)->var.ptr;
((zend_internal_function *) execute_data_ptr->function_state.function)->handler(execute_data_ptr->opline->extended_value, *return_value_ptr,
(execute_data_ptr->function_state.function->common.fn_flags & ZEND_ACC_RETURN_REFERENCE)?return_value_ptr:NULL,
execute_data_ptr->object, return_value_used TSRMLS_CC);
@@ -1537,12 +1536,12 @@ ZEND_API user_opcode_handler_t zend_get_user_opcode_handler(zend_uchar opcode)
return zend_user_opcode_handlers[opcode];
}
-ZEND_API zval *zend_get_zval_ptr(int op_type, const znode_op *node, const temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC) {
- return get_zval_ptr(op_type, node, Ts, should_free, type);
+ZEND_API zval *zend_get_zval_ptr(int op_type, const znode_op *node, const zend_execute_data *execute_data, zend_free_op *should_free, int type TSRMLS_DC) {
+ return get_zval_ptr(op_type, node, execute_data, should_free, type);
}
-ZEND_API zval **zend_get_zval_ptr_ptr(int op_type, const znode_op *node, const temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC) {
- return get_zval_ptr_ptr(op_type, node, Ts, should_free, type);
+ZEND_API zval **zend_get_zval_ptr_ptr(int op_type, const znode_op *node, const zend_execute_data *execute_data, zend_free_op *should_free, int type TSRMLS_DC) {
+ return get_zval_ptr_ptr(op_type, node, execute_data, should_free, type);
}
void zend_clean_and_cache_symbol_table(HashTable *symbol_table TSRMLS_DC) /* {{{ */
@@ -1559,12 +1558,12 @@ void zend_clean_and_cache_symbol_table(HashTable *symbol_table TSRMLS_DC) /* {{{
}
/* }}} */
-void zend_free_compiled_variables(zval ***CVs, int num) /* {{{ */
+void zend_free_compiled_variables(zend_execute_data *execute_data) /* {{{ */
{
int i;
- for (i = 0; i < num; ++i) {
- if (CVs[i]) {
- zval_ptr_dtor(CVs[i]);
+ for (i = 0; i < EX(op_array)->last_var; ++i) {
+ if (EX_CV(i)) {
+ zval_ptr_dtor(EX_CV(i));
}
}
}