summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Zend/zend_builtin_functions.c6
-rw-r--r--Zend/zend_compile.h16
-rw-r--r--Zend/zend_execute.c17
-rw-r--r--Zend/zend_execute.h6
-rw-r--r--Zend/zend_execute_API.c5
-rw-r--r--Zend/zend_vm_def.h57
-rw-r--r--Zend/zend_vm_execute.h219
-rw-r--r--Zend/zend_vm_execute.skl6
8 files changed, 173 insertions, 159 deletions
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
index 728d90acdf..9d567b47b7 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -402,7 +402,7 @@ ZEND_FUNCTION(func_num_args)
{
zend_execute_data *ex = EX(prev_execute_data);
- if (ex->frame_kind == VM_FRAME_NESTED_FUNCTION || ex->frame_kind == VM_FRAME_TOP_FUNCTION) {
+ if (VM_FRAME_KIND(ex->frame_info) == VM_FRAME_NESTED_FUNCTION || VM_FRAME_KIND(ex->frame_info) == VM_FRAME_TOP_FUNCTION) {
RETURN_LONG(ex->num_args);
} else {
zend_error(E_WARNING, "func_num_args(): Called from the global scope - no function context");
@@ -430,7 +430,7 @@ ZEND_FUNCTION(func_get_arg)
}
ex = EX(prev_execute_data);
- if (ex->frame_kind != VM_FRAME_NESTED_FUNCTION && ex->frame_kind != VM_FRAME_TOP_FUNCTION) {
+ if (VM_FRAME_KIND(ex->frame_info) != VM_FRAME_NESTED_FUNCTION && VM_FRAME_KIND(ex->frame_info) != VM_FRAME_TOP_FUNCTION) {
zend_error(E_WARNING, "func_get_arg(): Called from the global scope - no function context");
RETURN_FALSE;
}
@@ -464,7 +464,7 @@ ZEND_FUNCTION(func_get_args)
uint32_t i;
zend_execute_data *ex = EX(prev_execute_data);
- if (ex->frame_kind != VM_FRAME_NESTED_FUNCTION && ex->frame_kind != VM_FRAME_TOP_FUNCTION) {
+ if (VM_FRAME_KIND(ex->frame_info) != VM_FRAME_NESTED_FUNCTION && VM_FRAME_KIND(ex->frame_info) != VM_FRAME_TOP_FUNCTION) {
zend_error(E_WARNING, "func_get_args(): Called from the global scope - no function context");
RETURN_FALSE;
}
diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h
index c13184c7d8..5490263f0e 100644
--- a/Zend/zend_compile.h
+++ b/Zend/zend_compile.h
@@ -360,9 +360,8 @@ struct _zend_execute_data {
zend_execute_data *call; /* current call */
void **run_time_cache;
zend_function *func; /* executed op_array */
- uint32_t num_args;
- zend_uchar flags;
- zend_uchar frame_kind;
+ uint32_t num_args;
+ uint32_t frame_info;
zend_class_entry *called_scope;
zval This;
zend_execute_data *prev_execute_data;
@@ -374,8 +373,15 @@ struct _zend_execute_data {
zval old_error_reporting;
};
-#define ZEND_CALL_CTOR (1 << 0)
-#define ZEND_CALL_CTOR_RESULT_UNUSED (1 << 1)
+#define VM_FRAME_KIND_MASK 0x000000ff
+#define VM_FRAME_FLAGS_MASK 0xffffff00
+
+#define ZEND_CALL_CTOR (1 << 8)
+#define ZEND_CALL_CTOR_RESULT_UNUSED (1 << 9)
+
+#define VM_FRAME_INFO(kind, flags) ((kind) | (flags))
+#define VM_FRAME_KIND(info) ((info) & VM_FRAME_KIND_MASK)
+#define VM_FRAME_FLAGS(info) ((info) & VM_FRAME_FLAGS_MASK)
#define ZEND_CALL_FRAME_SLOT \
((ZEND_MM_ALIGNED_SIZE(sizeof(zend_execute_data)) + ZEND_MM_ALIGNED_SIZE(sizeof(zval)) - 1) / ZEND_MM_ALIGNED_SIZE(sizeof(zval)))
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index e6e0176058..2cf15480af 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -1423,14 +1423,13 @@ void zend_free_compiled_variables(zend_execute_data *execute_data TSRMLS_DC) /*
* +----------------------------------------+
*/
-static zend_always_inline void i_init_func_execute_data(zend_execute_data *execute_data, zend_op_array *op_array, zval *return_value, vm_frame_kind frame_kind TSRMLS_DC) /* {{{ */
+static zend_always_inline void i_init_func_execute_data(zend_execute_data *execute_data, zend_op_array *op_array, zval *return_value TSRMLS_DC) /* {{{ */
{
uint32_t first_extra_arg, num_args;
ZEND_ASSERT(EX(func) == (zend_function*)op_array);
EX(opline) = op_array->opcodes;
EX(call) = NULL;
- EX(frame_kind) = frame_kind;
EX(return_value) = return_value;
EX(scope) = EG(scope);
EX(delayed_exception) = NULL;
@@ -1492,13 +1491,12 @@ static zend_always_inline void i_init_func_execute_data(zend_execute_data *execu
}
/* }}} */
-static zend_always_inline void i_init_code_execute_data(zend_execute_data *execute_data, zend_op_array *op_array, zval *return_value, vm_frame_kind frame_kind TSRMLS_DC) /* {{{ */
+static zend_always_inline void i_init_code_execute_data(zend_execute_data *execute_data, zend_op_array *op_array, zval *return_value TSRMLS_DC) /* {{{ */
{
ZEND_ASSERT(EX(func) == (zend_function*)op_array);
EX(opline) = op_array->opcodes;
EX(call) = NULL;
- EX(frame_kind) = frame_kind;
EX(return_value) = return_value;
EX(scope) = EG(scope);
EX(delayed_exception) = NULL;
@@ -1520,13 +1518,12 @@ static zend_always_inline void i_init_code_execute_data(zend_execute_data *execu
}
/* }}} */
-static zend_always_inline void i_init_execute_data(zend_execute_data *execute_data, zend_op_array *op_array, zval *return_value, vm_frame_kind frame_kind TSRMLS_DC) /* {{{ */
+static zend_always_inline void i_init_execute_data(zend_execute_data *execute_data, zend_op_array *op_array, zval *return_value TSRMLS_DC) /* {{{ */
{
ZEND_ASSERT(EX(func) == (zend_function*)op_array);
EX(opline) = op_array->opcodes;
EX(call) = NULL;
- EX(frame_kind) = frame_kind;
EX(return_value) = return_value;
EX(scope) = EG(scope);
EX(delayed_exception) = NULL;
@@ -1620,9 +1617,9 @@ ZEND_API zend_execute_data *zend_create_generator_execute_data(zend_execute_data
NULL);
execute_data = zend_vm_stack_push_call_frame(
+ VM_FRAME_TOP_FUNCTION,
(zend_function*)op_array,
num_args,
- call->flags,
call->called_scope,
Z_OBJ(call->This),
NULL TSRMLS_CC);
@@ -1641,16 +1638,16 @@ ZEND_API zend_execute_data *zend_create_generator_execute_data(zend_execute_data
EX(symbol_table) = NULL;
- i_init_func_execute_data(execute_data, op_array, return_value, VM_FRAME_TOP_FUNCTION TSRMLS_CC);
+ i_init_func_execute_data(execute_data, op_array, return_value TSRMLS_CC);
return execute_data;
}
/* }}} */
-ZEND_API void zend_init_execute_data(zend_execute_data *execute_data, zend_op_array *op_array, zval *return_value, vm_frame_kind frame_kind TSRMLS_DC) /* {{{ */
+ZEND_API void zend_init_execute_data(zend_execute_data *execute_data, zend_op_array *op_array, zval *return_value TSRMLS_DC) /* {{{ */
{
EX(prev_execute_data) = EG(current_execute_data);
- i_init_execute_data(execute_data, op_array, return_value, frame_kind TSRMLS_CC);
+ i_init_execute_data(execute_data, op_array, return_value TSRMLS_CC);
}
/* }}} */
diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h
index 3770f4cbe9..a17af14da0 100644
--- a/Zend/zend_execute.h
+++ b/Zend/zend_execute.h
@@ -35,7 +35,7 @@ ZEND_API extern void (*zend_execute_internal)(zend_execute_data *execute_data, z
void init_executor(TSRMLS_D);
void shutdown_executor(TSRMLS_D);
void shutdown_destructors(TSRMLS_D);
-ZEND_API void zend_init_execute_data(zend_execute_data *execute_data, zend_op_array *op_array, zval *return_value, vm_frame_kind frame_kind TSRMLS_DC);
+ZEND_API void zend_init_execute_data(zend_execute_data *execute_data, zend_op_array *op_array, zval *return_value TSRMLS_DC);
ZEND_API zend_execute_data *zend_create_generator_execute_data(zend_execute_data *call, zend_op_array *op_array, zval *return_value TSRMLS_DC);
ZEND_API void zend_execute(zend_op_array *op_array, zval *return_value TSRMLS_DC);
ZEND_API void execute_ex(zend_execute_data *execute_data TSRMLS_DC);
@@ -205,7 +205,7 @@ static zend_always_inline zval* zend_vm_stack_alloc(size_t size TSRMLS_DC)
return (zval*)top;
}
-static zend_always_inline zend_execute_data *zend_vm_stack_push_call_frame(zend_function *func, uint32_t num_args, zend_uchar flags, zend_class_entry *called_scope, zend_object *object, zend_execute_data *prev TSRMLS_DC)
+static zend_always_inline zend_execute_data *zend_vm_stack_push_call_frame(uint32_t frame_info, zend_function *func, uint32_t num_args, zend_class_entry *called_scope, zend_object *object, zend_execute_data *prev TSRMLS_DC)
{
uint32_t used_stack = ZEND_CALL_FRAME_SLOT + num_args;
zend_execute_data *call;
@@ -216,7 +216,7 @@ static zend_always_inline zend_execute_data *zend_vm_stack_push_call_frame(zend_
call = (zend_execute_data*)zend_vm_stack_alloc(used_stack * sizeof(zval) TSRMLS_CC);
call->func = func;
call->num_args = 0;
- call->flags = flags;
+ call->frame_info = frame_info;
call->called_scope = called_scope;
ZVAL_OBJ(&call->This, object);
call->prev_execute_data = prev;
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index 1da64bb978..f6bd9d1ca7 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -736,7 +736,8 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
}
func = fci_cache->function_handler;
- call = zend_vm_stack_push_call_frame(func, fci->param_count, 0, fci_cache->called_scope, fci_cache->object, NULL TSRMLS_CC);
+ call = zend_vm_stack_push_call_frame(VM_FRAME_TOP_FUNCTION,
+ func, fci->param_count, fci_cache->called_scope, fci_cache->object, NULL TSRMLS_CC);
calling_scope = fci_cache->calling_scope;
fci->object = fci_cache->object;
if (fci->object &&
@@ -844,7 +845,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
EG(scope) = func->common.scope;
call->symbol_table = fci->symbol_table;
if (EXPECTED((func->op_array.fn_flags & ZEND_ACC_GENERATOR) == 0)) {
- zend_init_execute_data(call, &func->op_array, fci->retval, VM_FRAME_TOP_FUNCTION TSRMLS_CC);
+ zend_init_execute_data(call, &func->op_array, fci->retval TSRMLS_CC);
zend_execute_ex(call TSRMLS_CC);
} else {
zend_generator_create_zval(call, &func->op_array, fci->retval TSRMLS_CC);
diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h
index 4f9f520e5a..d641442f7e 100644
--- a/Zend/zend_vm_def.h
+++ b/Zend/zend_vm_def.h
@@ -1717,7 +1717,7 @@ ZEND_VM_HANDLER(39, ZEND_ASSIGN_REF, VAR|CV, VAR|CV)
ZEND_VM_HELPER(zend_leave_helper, ANY, ANY)
{
- vm_frame_kind frame_kind = EX(frame_kind);
+ vm_frame_kind frame_kind = VM_FRAME_KIND(EX(frame_info));
if (frame_kind == VM_FRAME_NESTED_FUNCTION) {
zend_object *object;
@@ -2213,8 +2213,8 @@ ZEND_VM_HANDLER(112, ZEND_INIT_METHOD_CALL, TMP|VAR|UNUSED|CV, CONST|TMP|VAR|CV)
GC_REFCOUNT(obj)++; /* For $this pointer */
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, called_scope, obj, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, called_scope, obj, EX(call) TSRMLS_CC);
FREE_OP2();
FREE_OP1_IF_VAR();
@@ -2337,8 +2337,8 @@ ZEND_VM_HANDLER(113, ZEND_INIT_STATIC_METHOD_CALL, CONST|VAR, CONST|TMP|VAR|UNUS
}
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, ce, object, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, ce, object, EX(call) TSRMLS_CC);
if (OP2_TYPE == IS_UNUSED) {
EX(call)->return_value = NULL;
@@ -2366,8 +2366,8 @@ ZEND_VM_HANDLER(59, ZEND_INIT_FCALL_BY_NAME, ANY, CONST|TMP|VAR|CV)
CACHE_PTR(Z_CACHE_SLOT_P(opline->op2.zv), fbc);
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, NULL, NULL, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, NULL, NULL, EX(call) TSRMLS_CC);
/*CHECK_EXCEPTION();*/
ZEND_VM_NEXT_OPCODE();
@@ -2486,8 +2486,8 @@ ZEND_VM_HANDLER(59, ZEND_INIT_FCALL_BY_NAME, ANY, CONST|TMP|VAR|CV)
zend_error_noreturn(E_ERROR, "Function name must be a string");
ZEND_VM_CONTINUE(); /* Never reached */
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, called_scope, object, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, called_scope, object, EX(call) TSRMLS_CC);
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -2540,8 +2540,8 @@ ZEND_VM_HANDLER(118, ZEND_INIT_USER_CALL, CONST, CONST|TMP|VAR|CV)
object = NULL;
}
- EX(call) = zend_vm_stack_push_call_frame(
- func, opline->extended_value, 0, called_scope, object, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ func, opline->extended_value, called_scope, object, EX(call) TSRMLS_CC);
FREE_OP2();
CHECK_EXCEPTION();
@@ -2572,8 +2572,8 @@ ZEND_VM_HANDLER(69, ZEND_INIT_NS_FCALL_BY_NAME, ANY, CONST)
CACHE_PTR(Z_CACHE_SLOT_P(opline->op2.zv), fbc);
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, NULL, NULL, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, NULL, NULL, EX(call) TSRMLS_CC);
ZEND_VM_NEXT_OPCODE();
}
@@ -2596,8 +2596,8 @@ ZEND_VM_HANDLER(61, ZEND_INIT_FCALL, ANY, CONST)
CACHE_PTR(Z_CACHE_SLOT_P(fname), fbc);
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, NULL, NULL, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, NULL, NULL, EX(call) TSRMLS_CC);
FREE_OP2();
@@ -2719,12 +2719,14 @@ ZEND_VM_HANDLER(60, ZEND_DO_FCALL, ANY, ANY)
zend_vm_stack_free_call_frame(call TSRMLS_CC);
} else {
call->prev_execute_data = execute_data;
- i_init_func_execute_data(call, &fbc->op_array, return_value, VM_FRAME_NESTED_FUNCTION TSRMLS_CC);
+ i_init_func_execute_data(call, &fbc->op_array, return_value TSRMLS_CC);
if (EXPECTED(zend_execute_ex == execute_ex)) {
ZEND_VM_ENTER();
} else {
- call->frame_kind = VM_FRAME_TOP_FUNCTION;
+ call->frame_info = VM_FRAME_INFO(
+ VM_FRAME_TOP_FUNCTION,
+ VM_FRAME_FLAGS(call->frame_info));
zend_execute_ex(call TSRMLS_CC);
}
}
@@ -3685,9 +3687,12 @@ ZEND_VM_HANDLER(68, ZEND_NEW, ANY, ANY)
} else {
/* We are not handling overloaded classes right now */
EX(call) = zend_vm_stack_push_call_frame(
- constructor, opline->extended_value,
- RETURN_VALUE_USED(opline) ?
- ZEND_CALL_CTOR : (ZEND_CALL_CTOR | ZEND_CALL_CTOR_RESULT_UNUSED),
+ VM_FRAME_INFO(
+ VM_FRAME_NESTED_FUNCTION,
+ RETURN_VALUE_USED(opline) ?
+ ZEND_CALL_CTOR : (ZEND_CALL_CTOR | ZEND_CALL_CTOR_RESULT_UNUSED)),
+ constructor,
+ opline->extended_value,
Z_CE_P(EX_VAR(opline->op1.var)),
Z_OBJ(object_zval),
EX(call) TSRMLS_CC);
@@ -4179,8 +4184,8 @@ ZEND_VM_HANDLER(73, ZEND_INCLUDE_OR_EVAL, CONST|TMP|VAR|CV, ANY)
return_value = EX_VAR(opline->result.var);
}
- call = zend_vm_stack_push_call_frame(
- (zend_function*)new_op_array, 0, 0, EX(called_scope), Z_OBJ(EX(This)), NULL TSRMLS_CC);
+ call = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_CODE,
+ (zend_function*)new_op_array, 0, EX(called_scope), Z_OBJ(EX(This)), NULL TSRMLS_CC);
if (EX(symbol_table)) {
call->symbol_table = EX(symbol_table);
@@ -4189,11 +4194,11 @@ ZEND_VM_HANDLER(73, ZEND_INCLUDE_OR_EVAL, CONST|TMP|VAR|CV, ANY)
}
call->prev_execute_data = execute_data;
- i_init_code_execute_data(call, new_op_array, return_value, VM_FRAME_NESTED_CODE TSRMLS_CC);
+ i_init_code_execute_data(call, new_op_array, return_value TSRMLS_CC);
if (EXPECTED(zend_execute_ex == execute_ex)) {
ZEND_VM_ENTER();
} else {
- call->frame_kind = VM_FRAME_TOP_CODE;
+ call->frame_info = VM_FRAME_TOP_CODE;
zend_execute_ex(call TSRMLS_CC);
}
@@ -5453,8 +5458,8 @@ ZEND_VM_HANDLER(149, ZEND_HANDLE_EXCEPTION, ANY, ANY)
zend_vm_stack_free_args(EX(call) TSRMLS_CC);
if (Z_OBJ(call->This)) {
- if (call->flags & ZEND_CALL_CTOR) {
- if (!(call->flags & ZEND_CALL_CTOR_RESULT_UNUSED)) {
+ if (call->frame_info & ZEND_CALL_CTOR) {
+ if (!(call->frame_info & ZEND_CALL_CTOR_RESULT_UNUSED)) {
GC_REFCOUNT(Z_OBJ(call->This))--;
}
if (GC_REFCOUNT(Z_OBJ(call->This)) == 1) {
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h
index 7d16db6011..81f75a7ca8 100644
--- a/Zend/zend_vm_execute.h
+++ b/Zend/zend_vm_execute.h
@@ -369,21 +369,21 @@ ZEND_API void zend_execute(zend_op_array *op_array, zval *return_value TSRMLS_DC
return;
}
- execute_data = zend_vm_stack_push_call_frame(
- (zend_function*)op_array, 0, 0, EG(current_execute_data) ? EG(current_execute_data)->called_scope : NULL, EG(current_execute_data) ? Z_OBJ(EG(current_execute_data)->This) : NULL, NULL TSRMLS_CC);
+ execute_data = zend_vm_stack_push_call_frame(VM_FRAME_TOP_CODE,
+ (zend_function*)op_array, 0, EG(current_execute_data) ? EG(current_execute_data)->called_scope : NULL, EG(current_execute_data) ? Z_OBJ(EG(current_execute_data)->This) : NULL, NULL TSRMLS_CC);
if (EG(current_execute_data)) {
execute_data->symbol_table = zend_rebuild_symbol_table(TSRMLS_C);
} else {
execute_data->symbol_table = &EG(symbol_table);
}
EX(prev_execute_data) = EG(current_execute_data);
- i_init_execute_data(execute_data, op_array, return_value, VM_FRAME_TOP_CODE TSRMLS_CC);
+ i_init_execute_data(execute_data, op_array, return_value TSRMLS_CC);
zend_execute_ex(execute_data TSRMLS_CC);
}
static int ZEND_FASTCALL zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS)
{
- vm_frame_kind frame_kind = EX(frame_kind);
+ vm_frame_kind frame_kind = VM_FRAME_KIND(EX(frame_info));
if (frame_kind == VM_FRAME_NESTED_FUNCTION) {
zend_object *object;
@@ -601,12 +601,14 @@ static int ZEND_FASTCALL ZEND_DO_FCALL_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
zend_vm_stack_free_call_frame(call TSRMLS_CC);
} else {
call->prev_execute_data = execute_data;
- i_init_func_execute_data(call, &fbc->op_array, return_value, VM_FRAME_NESTED_FUNCTION TSRMLS_CC);
+ i_init_func_execute_data(call, &fbc->op_array, return_value TSRMLS_CC);
if (EXPECTED(zend_execute_ex == execute_ex)) {
ZEND_VM_ENTER();
} else {
- call->frame_kind = VM_FRAME_TOP_FUNCTION;
+ call->frame_info = VM_FRAME_INFO(
+ VM_FRAME_TOP_FUNCTION,
+ VM_FRAME_FLAGS(call->frame_info));
zend_execute_ex(call TSRMLS_CC);
}
}
@@ -1050,9 +1052,12 @@ static int ZEND_FASTCALL ZEND_NEW_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
} else {
/* We are not handling overloaded classes right now */
EX(call) = zend_vm_stack_push_call_frame(
- constructor, opline->extended_value,
- RETURN_VALUE_USED(opline) ?
- ZEND_CALL_CTOR : (ZEND_CALL_CTOR | ZEND_CALL_CTOR_RESULT_UNUSED),
+ VM_FRAME_INFO(
+ VM_FRAME_NESTED_FUNCTION,
+ RETURN_VALUE_USED(opline) ?
+ ZEND_CALL_CTOR : (ZEND_CALL_CTOR | ZEND_CALL_CTOR_RESULT_UNUSED)),
+ constructor,
+ opline->extended_value,
Z_CE_P(EX_VAR(opline->op1.var)),
Z_OBJ(object_zval),
EX(call) TSRMLS_CC);
@@ -1279,8 +1284,8 @@ static int ZEND_FASTCALL ZEND_HANDLE_EXCEPTION_SPEC_HANDLER(ZEND_OPCODE_HANDLER
zend_vm_stack_free_args(EX(call) TSRMLS_CC);
if (Z_OBJ(call->This)) {
- if (call->flags & ZEND_CALL_CTOR) {
- if (!(call->flags & ZEND_CALL_CTOR_RESULT_UNUSED)) {
+ if (call->frame_info & ZEND_CALL_CTOR) {
+ if (!(call->frame_info & ZEND_CALL_CTOR_RESULT_UNUSED)) {
GC_REFCOUNT(Z_OBJ(call->This))--;
}
if (GC_REFCOUNT(Z_OBJ(call->This)) == 1) {
@@ -1506,8 +1511,8 @@ static int ZEND_FASTCALL ZEND_INIT_FCALL_BY_NAME_SPEC_CONST_HANDLER(ZEND_OPCODE
CACHE_PTR(Z_CACHE_SLOT_P(opline->op2.zv), fbc);
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, NULL, NULL, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, NULL, NULL, EX(call) TSRMLS_CC);
/*CHECK_EXCEPTION();*/
ZEND_VM_NEXT_OPCODE();
@@ -1625,8 +1630,8 @@ static int ZEND_FASTCALL ZEND_INIT_FCALL_BY_NAME_SPEC_CONST_HANDLER(ZEND_OPCODE
zend_error_noreturn(E_ERROR, "Function name must be a string");
ZEND_VM_CONTINUE(); /* Never reached */
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, called_scope, object, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, called_scope, object, EX(call) TSRMLS_CC);
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -1657,8 +1662,8 @@ static int ZEND_FASTCALL ZEND_INIT_NS_FCALL_BY_NAME_SPEC_CONST_HANDLER(ZEND_OPC
CACHE_PTR(Z_CACHE_SLOT_P(opline->op2.zv), fbc);
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, NULL, NULL, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, NULL, NULL, EX(call) TSRMLS_CC);
ZEND_VM_NEXT_OPCODE();
}
@@ -1681,8 +1686,8 @@ static int ZEND_FASTCALL ZEND_INIT_FCALL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER
CACHE_PTR(Z_CACHE_SLOT_P(fname), fbc);
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, NULL, NULL, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, NULL, NULL, EX(call) TSRMLS_CC);
ZEND_VM_NEXT_OPCODE();
}
@@ -1842,8 +1847,8 @@ static int ZEND_FASTCALL ZEND_INIT_FCALL_BY_NAME_SPEC_TMP_HANDLER(ZEND_OPCODE_H
CACHE_PTR(Z_CACHE_SLOT_P(opline->op2.zv), fbc);
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, NULL, NULL, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, NULL, NULL, EX(call) TSRMLS_CC);
/*CHECK_EXCEPTION();*/
ZEND_VM_NEXT_OPCODE();
@@ -1962,8 +1967,8 @@ static int ZEND_FASTCALL ZEND_INIT_FCALL_BY_NAME_SPEC_TMP_HANDLER(ZEND_OPCODE_H
zend_error_noreturn(E_ERROR, "Function name must be a string");
ZEND_VM_CONTINUE(); /* Never reached */
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, called_scope, object, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, called_scope, object, EX(call) TSRMLS_CC);
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -2028,8 +2033,8 @@ static int ZEND_FASTCALL ZEND_INIT_FCALL_BY_NAME_SPEC_VAR_HANDLER(ZEND_OPCODE_H
CACHE_PTR(Z_CACHE_SLOT_P(opline->op2.zv), fbc);
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, NULL, NULL, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, NULL, NULL, EX(call) TSRMLS_CC);
/*CHECK_EXCEPTION();*/
ZEND_VM_NEXT_OPCODE();
@@ -2148,8 +2153,8 @@ static int ZEND_FASTCALL ZEND_INIT_FCALL_BY_NAME_SPEC_VAR_HANDLER(ZEND_OPCODE_H
zend_error_noreturn(E_ERROR, "Function name must be a string");
ZEND_VM_CONTINUE(); /* Never reached */
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, called_scope, object, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, called_scope, object, EX(call) TSRMLS_CC);
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -2252,8 +2257,8 @@ static int ZEND_FASTCALL ZEND_INIT_FCALL_BY_NAME_SPEC_CV_HANDLER(ZEND_OPCODE_HA
CACHE_PTR(Z_CACHE_SLOT_P(opline->op2.zv), fbc);
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, NULL, NULL, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, NULL, NULL, EX(call) TSRMLS_CC);
/*CHECK_EXCEPTION();*/
ZEND_VM_NEXT_OPCODE();
@@ -2371,8 +2376,8 @@ static int ZEND_FASTCALL ZEND_INIT_FCALL_BY_NAME_SPEC_CV_HANDLER(ZEND_OPCODE_HA
zend_error_noreturn(E_ERROR, "Function name must be a string");
ZEND_VM_CONTINUE(); /* Never reached */
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, called_scope, object, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, called_scope, object, EX(call) TSRMLS_CC);
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -3019,8 +3024,8 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HA
return_value = EX_VAR(opline->result.var);
}
- call = zend_vm_stack_push_call_frame(
- (zend_function*)new_op_array, 0, 0, EX(called_scope), Z_OBJ(EX(This)), NULL TSRMLS_CC);
+ call = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_CODE,
+ (zend_function*)new_op_array, 0, EX(called_scope), Z_OBJ(EX(This)), NULL TSRMLS_CC);
if (EX(symbol_table)) {
call->symbol_table = EX(symbol_table);
@@ -3029,11 +3034,11 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HA
}
call->prev_execute_data = execute_data;
- i_init_code_execute_data(call, new_op_array, return_value, VM_FRAME_NESTED_CODE TSRMLS_CC);
+ i_init_code_execute_data(call, new_op_array, return_value TSRMLS_CC);
if (EXPECTED(zend_execute_ex == execute_ex)) {
ZEND_VM_ENTER();
} else {
- call->frame_kind = VM_FRAME_TOP_CODE;
+ call->frame_info = VM_FRAME_TOP_CODE;
zend_execute_ex(call TSRMLS_CC);
}
@@ -4200,8 +4205,8 @@ static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_CONST_HANDLER(
}
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, ce, object, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, ce, object, EX(call) TSRMLS_CC);
if (IS_CONST == IS_UNUSED) {
EX(call)->return_value = NULL;
@@ -4257,8 +4262,8 @@ static int ZEND_FASTCALL ZEND_INIT_USER_CALL_SPEC_CONST_CONST_HANDLER(ZEND_OPCO
object = NULL;
}
- EX(call) = zend_vm_stack_push_call_frame(
- func, opline->extended_value, 0, called_scope, object, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ func, opline->extended_value, called_scope, object, EX(call) TSRMLS_CC);
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -5523,8 +5528,8 @@ static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_TMP_HANDLER(ZE
}
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, ce, object, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, ce, object, EX(call) TSRMLS_CC);
if (IS_TMP_VAR == IS_UNUSED) {
EX(call)->return_value = NULL;
@@ -5580,8 +5585,8 @@ static int ZEND_FASTCALL ZEND_INIT_USER_CALL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE
object = NULL;
}
- EX(call) = zend_vm_stack_push_call_frame(
- func, opline->extended_value, 0, called_scope, object, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ func, opline->extended_value, called_scope, object, EX(call) TSRMLS_CC);
zval_ptr_dtor_nogc(free_op2.var);
CHECK_EXCEPTION();
@@ -6718,8 +6723,8 @@ static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_VAR_HANDLER(ZE
}
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, ce, object, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, ce, object, EX(call) TSRMLS_CC);
if (IS_VAR == IS_UNUSED) {
EX(call)->return_value = NULL;
@@ -6775,8 +6780,8 @@ static int ZEND_FASTCALL ZEND_INIT_USER_CALL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE
object = NULL;
}
- EX(call) = zend_vm_stack_push_call_frame(
- func, opline->extended_value, 0, called_scope, object, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ func, opline->extended_value, called_scope, object, EX(call) TSRMLS_CC);
zval_ptr_dtor_nogc(free_op2.var);
CHECK_EXCEPTION();
@@ -7664,8 +7669,8 @@ static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_UNUSED_HANDLER
}
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, ce, object, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, ce, object, EX(call) TSRMLS_CC);
if (IS_UNUSED == IS_UNUSED) {
EX(call)->return_value = NULL;
@@ -8653,8 +8658,8 @@ static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_CV_HANDLER(ZEN
}
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, ce, object, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, ce, object, EX(call) TSRMLS_CC);
if (IS_CV == IS_UNUSED) {
EX(call)->return_value = NULL;
@@ -8710,8 +8715,8 @@ static int ZEND_FASTCALL ZEND_INIT_USER_CALL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_
object = NULL;
}
- EX(call) = zend_vm_stack_push_call_frame(
- func, opline->extended_value, 0, called_scope, object, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ func, opline->extended_value, called_scope, object, EX(call) TSRMLS_CC);
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -9847,8 +9852,8 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_TMP_HANDLER(ZEND_OPCODE_HAND
return_value = EX_VAR(opline->result.var);
}
- call = zend_vm_stack_push_call_frame(
- (zend_function*)new_op_array, 0, 0, EX(called_scope), Z_OBJ(EX(This)), NULL TSRMLS_CC);
+ call = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_CODE,
+ (zend_function*)new_op_array, 0, EX(called_scope), Z_OBJ(EX(This)), NULL TSRMLS_CC);
if (EX(symbol_table)) {
call->symbol_table = EX(symbol_table);
@@ -9857,11 +9862,11 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_TMP_HANDLER(ZEND_OPCODE_HAND
}
call->prev_execute_data = execute_data;
- i_init_code_execute_data(call, new_op_array, return_value, VM_FRAME_NESTED_CODE TSRMLS_CC);
+ i_init_code_execute_data(call, new_op_array, return_value TSRMLS_CC);
if (EXPECTED(zend_execute_ex == execute_ex)) {
ZEND_VM_ENTER();
} else {
- call->frame_kind = VM_FRAME_TOP_CODE;
+ call->frame_info = VM_FRAME_TOP_CODE;
zend_execute_ex(call TSRMLS_CC);
}
@@ -11070,8 +11075,8 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMP_CONST_HANDLER(ZEND_OPCO
GC_REFCOUNT(obj)++; /* For $this pointer */
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, called_scope, obj, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, called_scope, obj, EX(call) TSRMLS_CC);
CHECK_EXCEPTION();
@@ -12236,8 +12241,8 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE
GC_REFCOUNT(obj)++; /* For $this pointer */
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, called_scope, obj, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, called_scope, obj, EX(call) TSRMLS_CC);
zval_ptr_dtor_nogc(free_op2.var);
@@ -13403,8 +13408,8 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE
GC_REFCOUNT(obj)++; /* For $this pointer */
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, called_scope, obj, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, called_scope, obj, EX(call) TSRMLS_CC);
zval_ptr_dtor_nogc(free_op2.var);
@@ -15159,8 +15164,8 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_
GC_REFCOUNT(obj)++; /* For $this pointer */
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, called_scope, obj, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, called_scope, obj, EX(call) TSRMLS_CC);
CHECK_EXCEPTION();
@@ -16576,8 +16581,8 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_VAR_HANDLER(ZEND_OPCODE_HAND
return_value = EX_VAR(opline->result.var);
}
- call = zend_vm_stack_push_call_frame(
- (zend_function*)new_op_array, 0, 0, EX(called_scope), Z_OBJ(EX(This)), NULL TSRMLS_CC);
+ call = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_CODE,
+ (zend_function*)new_op_array, 0, EX(called_scope), Z_OBJ(EX(This)), NULL TSRMLS_CC);
if (EX(symbol_table)) {
call->symbol_table = EX(symbol_table);
@@ -16586,11 +16591,11 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_VAR_HANDLER(ZEND_OPCODE_HAND
}
call->prev_execute_data = execute_data;
- i_init_code_execute_data(call, new_op_array, return_value, VM_FRAME_NESTED_CODE TSRMLS_CC);
+ i_init_code_execute_data(call, new_op_array, return_value TSRMLS_CC);
if (EXPECTED(zend_execute_ex == execute_ex)) {
ZEND_VM_ENTER();
} else {
- call->frame_kind = VM_FRAME_TOP_CODE;
+ call->frame_info = VM_FRAME_TOP_CODE;
zend_execute_ex(call TSRMLS_CC);
}
@@ -18774,8 +18779,8 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_VAR_CONST_HANDLER(ZEND_OPCO
GC_REFCOUNT(obj)++; /* For $this pointer */
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, called_scope, obj, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, called_scope, obj, EX(call) TSRMLS_CC);
zval_ptr_dtor_nogc(free_op1.var);
@@ -18897,8 +18902,8 @@ static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_CONST_HANDLER(ZE
}
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, ce, object, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, ce, object, EX(call) TSRMLS_CC);
if (IS_CONST == IS_UNUSED) {
EX(call)->return_value = NULL;
@@ -21031,8 +21036,8 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE
GC_REFCOUNT(obj)++; /* For $this pointer */
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, called_scope, obj, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, called_scope, obj, EX(call) TSRMLS_CC);
zval_ptr_dtor_nogc(free_op2.var);
zval_ptr_dtor_nogc(free_op1.var);
@@ -21155,8 +21160,8 @@ static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_TMP_HANDLER(ZEND
}
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, ce, object, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, ce, object, EX(call) TSRMLS_CC);
if (IS_TMP_VAR == IS_UNUSED) {
EX(call)->return_value = NULL;
@@ -23257,8 +23262,8 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE
GC_REFCOUNT(obj)++; /* For $this pointer */
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, called_scope, obj, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, called_scope, obj, EX(call) TSRMLS_CC);
zval_ptr_dtor_nogc(free_op2.var);
zval_ptr_dtor_nogc(free_op1.var);
@@ -23381,8 +23386,8 @@ static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_VAR_HANDLER(ZEND
}
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, ce, object, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, ce, object, EX(call) TSRMLS_CC);
if (IS_VAR == IS_UNUSED) {
EX(call)->return_value = NULL;
@@ -24855,8 +24860,8 @@ static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_UNUSED_HANDLER(Z
}
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, ce, object, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, ce, object, EX(call) TSRMLS_CC);
if (IS_UNUSED == IS_UNUSED) {
EX(call)->return_value = NULL;
@@ -26675,8 +26680,8 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_
GC_REFCOUNT(obj)++; /* For $this pointer */
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, called_scope, obj, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, called_scope, obj, EX(call) TSRMLS_CC);
zval_ptr_dtor_nogc(free_op1.var);
@@ -26798,8 +26803,8 @@ static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_CV_HANDLER(ZEND_
}
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, ce, object, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, ce, object, EX(call) TSRMLS_CC);
if (IS_CV == IS_UNUSED) {
EX(call)->return_value = NULL;
@@ -28292,8 +28297,8 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_CONST_HANDLER(ZEND_O
GC_REFCOUNT(obj)++; /* For $this pointer */
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, called_scope, obj, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, called_scope, obj, EX(call) TSRMLS_CC);
CHECK_EXCEPTION();
@@ -29691,8 +29696,8 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_TMP_HANDLER(ZEND_OPC
GC_REFCOUNT(obj)++; /* For $this pointer */
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, called_scope, obj, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, called_scope, obj, EX(call) TSRMLS_CC);
zval_ptr_dtor_nogc(free_op2.var);
@@ -30997,8 +31002,8 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_VAR_HANDLER(ZEND_OPC
GC_REFCOUNT(obj)++; /* For $this pointer */
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, called_scope, obj, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, called_scope, obj, EX(call) TSRMLS_CC);
zval_ptr_dtor_nogc(free_op2.var);
@@ -32813,8 +32818,8 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_CV_HANDLER(ZEND_OPCO
GC_REFCOUNT(obj)++; /* For $this pointer */
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, called_scope, obj, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, called_scope, obj, EX(call) TSRMLS_CC);
CHECK_EXCEPTION();
@@ -34213,8 +34218,8 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER(ZEND_OPCODE_HANDL
return_value = EX_VAR(opline->result.var);
}
- call = zend_vm_stack_push_call_frame(
- (zend_function*)new_op_array, 0, 0, EX(called_scope), Z_OBJ(EX(This)), NULL TSRMLS_CC);
+ call = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_CODE,
+ (zend_function*)new_op_array, 0, EX(called_scope), Z_OBJ(EX(This)), NULL TSRMLS_CC);
if (EX(symbol_table)) {
call->symbol_table = EX(symbol_table);
@@ -34223,11 +34228,11 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER(ZEND_OPCODE_HANDL
}
call->prev_execute_data = execute_data;
- i_init_code_execute_data(call, new_op_array, return_value, VM_FRAME_NESTED_CODE TSRMLS_CC);
+ i_init_code_execute_data(call, new_op_array, return_value TSRMLS_CC);
if (EXPECTED(zend_execute_ex == execute_ex)) {
ZEND_VM_ENTER();
} else {
- call->frame_kind = VM_FRAME_TOP_CODE;
+ call->frame_info = VM_FRAME_TOP_CODE;
zend_execute_ex(call TSRMLS_CC);
}
@@ -36165,8 +36170,8 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_CONST_HANDLER(ZEND_OPCOD
GC_REFCOUNT(obj)++; /* For $this pointer */
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, called_scope, obj, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, called_scope, obj, EX(call) TSRMLS_CC);
CHECK_EXCEPTION();
@@ -38254,8 +38259,8 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_
GC_REFCOUNT(obj)++; /* For $this pointer */
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, called_scope, obj, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, called_scope, obj, EX(call) TSRMLS_CC);
zval_ptr_dtor_nogc(free_op2.var);
@@ -40350,8 +40355,8 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_
GC_REFCOUNT(obj)++; /* For $this pointer */
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, called_scope, obj, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, called_scope, obj, EX(call) TSRMLS_CC);
zval_ptr_dtor_nogc(free_op2.var);
@@ -43493,8 +43498,8 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_CV_HANDLER(ZEND_OPCODE_H
GC_REFCOUNT(obj)++; /* For $this pointer */
}
- EX(call) = zend_vm_stack_push_call_frame(
- fbc, opline->extended_value, 0, called_scope, obj, EX(call) TSRMLS_CC);
+ EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
+ fbc, opline->extended_value, called_scope, obj, EX(call) TSRMLS_CC);
CHECK_EXCEPTION();
diff --git a/Zend/zend_vm_execute.skl b/Zend/zend_vm_execute.skl
index 4db87e5a85..03ed7ca65e 100644
--- a/Zend/zend_vm_execute.skl
+++ b/Zend/zend_vm_execute.skl
@@ -34,15 +34,15 @@ ZEND_API void zend_{%EXECUTOR_NAME%}(zend_op_array *op_array, zval *return_value
return;
}
- execute_data = zend_vm_stack_push_call_frame(
- (zend_function*)op_array, 0, 0, EG(current_execute_data) ? EG(current_execute_data)->called_scope : NULL, EG(current_execute_data) ? Z_OBJ(EG(current_execute_data)->This) : NULL, NULL TSRMLS_CC);
+ execute_data = zend_vm_stack_push_call_frame(VM_FRAME_TOP_CODE,
+ (zend_function*)op_array, 0, EG(current_execute_data) ? EG(current_execute_data)->called_scope : NULL, EG(current_execute_data) ? Z_OBJ(EG(current_execute_data)->This) : NULL, NULL TSRMLS_CC);
if (EG(current_execute_data)) {
execute_data->symbol_table = zend_rebuild_symbol_table(TSRMLS_C);
} else {
execute_data->symbol_table = &EG(symbol_table);
}
EX(prev_execute_data) = EG(current_execute_data);
- i_init_execute_data(execute_data, op_array, return_value, VM_FRAME_TOP_CODE TSRMLS_CC);
+ i_init_execute_data(execute_data, op_array, return_value TSRMLS_CC);
zend_{%EXECUTOR_NAME%}_ex(execute_data TSRMLS_CC);
}