diff options
author | Dmitry Stogov <dmitry@zend.com> | 2016-04-01 16:17:49 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2016-04-01 16:17:49 +0300 |
commit | 7abfaac901684da8bdcbccf43682a5557085c917 (patch) | |
tree | 88c9d1a568c3638a070ea21247e8d0213f26d878 /Zend/zend_compile.h | |
parent | c72282a13b12b7e572469eba7a7ce593d900a8a2 (diff) | |
download | php-git-7abfaac901684da8bdcbccf43682a5557085c917.tar.gz |
Merge zend_execute_data->called_scope into zend_execute_data->This.
"called_scope" made sense only for static method calls, for dynamic calls it was always equal to the class of $this.
Now EG(This) may store IS_OBJECT + $this or IS_UNUSED + "called_scope" (of course, "called_scope" may be NULL).
Some code might need to be adopted to support this change.
Checks (Z_OBJ(EX(This))) might need to be converted into (Z_TYPE(EX(This)) == IS_OBJECT).
Diffstat (limited to 'Zend/zend_compile.h')
-rw-r--r-- | Zend/zend_compile.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index 90c5c8b613..833aeab297 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -451,7 +451,6 @@ struct _zend_execute_data { zval *return_value; zend_function *func; /* executed funcrion */ zval This; /* this + call_info + num_args */ - zend_class_entry *called_scope; zend_execute_data *prev_execute_data; zend_array *symbol_table; #if ZEND_EX_USE_RUN_TIME_CACHE @@ -482,8 +481,8 @@ struct _zend_execute_data { #define ZEND_CALL_KIND(call) \ ZEND_CALL_KIND_EX(ZEND_CALL_INFO(call)) -#define ZEND_SET_CALL_INFO(call, info) do { \ - Z_TYPE_INFO((call)->This) = IS_OBJECT_EX | ((info) << 24); \ +#define ZEND_SET_CALL_INFO(call, object, info) do { \ + Z_TYPE_INFO((call)->This) = ((object) ? IS_OBJECT_EX : IS_UNDEF) | ((info) << 24); \ } while (0) #define ZEND_ADD_CALL_FLAG_EX(call_info, flag) do { \ |