diff options
author | Dmitry Stogov <dmitry@zend.com> | 2015-02-13 22:20:39 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2015-02-13 22:20:39 +0300 |
commit | e10e151e9b92313a7085272c85bebf6c82017fce (patch) | |
tree | 6cac4100536c5e25143c55d1ab6b2f3b3dc81cf9 /Zend/zend_execute.c | |
parent | bc630ad6da0c6d7cf2d224dba8972499d5691c6b (diff) | |
download | php-git-e10e151e9b92313a7085272c85bebf6c82017fce.tar.gz |
Merged zend_array and HashTable into the single data structure.
Now each HashTable is also zend_array, so it's refcounted and may be a subject for Copy on Write
zend_array_dup() was changed to allocate and return HashTable, instead of taking preallocated HashTable as argument.
Diffstat (limited to 'Zend/zend_execute.c')
-rw-r--r-- | Zend/zend_execute.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 73c1d4d17c..539b1e4dd7 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -1162,7 +1162,7 @@ static zend_always_inline HashTable *zend_get_target_symbol_table(zend_execute_d if (EXPECTED(fetch_type == ZEND_FETCH_GLOBAL_LOCK) || EXPECTED(fetch_type == ZEND_FETCH_GLOBAL)) { - ht = &EG(symbol_table).ht; + ht = &EG(symbol_table); } else if (EXPECTED(fetch_type == ZEND_FETCH_STATIC)) { ZEND_ASSERT(EX(func)->op_array.static_variables != NULL); ht = EX(func)->op_array.static_variables; @@ -1171,7 +1171,7 @@ static zend_always_inline HashTable *zend_get_target_symbol_table(zend_execute_d if (!EX(symbol_table)) { zend_rebuild_symbol_table(); } - ht = &EX(symbol_table)->ht; + ht = EX(symbol_table); } return ht; } @@ -1687,12 +1687,12 @@ ZEND_API void execute_internal(zend_execute_data *execute_data, zval *return_val ZEND_API void zend_clean_and_cache_symbol_table(zend_array *symbol_table) /* {{{ */ { if (EG(symtable_cache_ptr) >= EG(symtable_cache_limit)) { - zend_array_destroy(&symbol_table->ht); + zend_array_destroy(symbol_table); efree_size(symbol_table, sizeof(zend_array)); } else { /* clean before putting into the cache, since clean could call dtors, which could use cached hash */ - zend_symtable_clean(&symbol_table->ht); + zend_symtable_clean(symbol_table); *(++EG(symtable_cache_ptr)) = symbol_table; } } |