| | 585 | |
| | 586 | #ifdef ZEND_ENGINE_2_1 |
| | 587 | /* trigger auto_globals jit */ |
| | 588 | for (i = 0; i < p->autoglobal_cnt; i ++) { |
| | 589 | xc_autoglobal_t *aginfo = &p->autoglobals[i]; |
| | 590 | /* |
| | 591 | zend_auto_global *auto_global; |
| | 592 | if (zend_u_hash_find(CG(auto_globals), aginfo->type, aginfo->key, aginfo->key_len+1, (void **) &auto_global)==SUCCESS) { |
| | 593 | if (auto_global->armed) { |
| | 594 | auto_global->armed = auto_global->auto_global_callback(auto_global->name, auto_global->name_len TSRMLS_CC); |
| | 595 | } |
| | 596 | } |
| | 597 | */ |
| | 598 | zend_u_is_auto_global(aginfo->type, aginfo->key, aginfo->key_len TSRMLS_CC); |
| | 599 | } |
| | 600 | #endif |
| 951 | | php.constinfo_cnt = zend_hash_num_elements(EG(zend_constants)) - old_constinfo_cnt; |
| 952 | | #endif |
| 953 | | php.funcinfo_cnt = zend_hash_num_elements(CG(function_table)) - old_funcinfo_cnt; |
| 954 | | php.classinfo_cnt = zend_hash_num_elements(CG(class_table)) - old_classinfo_cnt; |
| | 970 | php.constinfo_cnt = zend_hash_num_elements(EG(zend_constants)) - old_constinfo_cnt; |
| | 971 | #endif |
| | 972 | php.funcinfo_cnt = zend_hash_num_elements(CG(function_table)) - old_funcinfo_cnt; |
| | 973 | php.classinfo_cnt = zend_hash_num_elements(CG(class_table)) - old_classinfo_cnt; |
| | 974 | #ifdef ZEND_ENGINE_2_1 |
| | 975 | /* {{{ count php.autoglobal_cnt */ { |
| | 976 | Bucket *b; |
| | 977 | |
| | 978 | php.autoglobal_cnt = 0; |
| | 979 | for (b = CG(auto_globals)->pListHead; b != NULL; b = b->pListNext) { |
| | 980 | zend_auto_global *auto_global = (zend_auto_global *) b->pData; |
| | 981 | /* check if actived */ |
| | 982 | if (auto_global->auto_global_callback && !auto_global->armed) { |
| | 983 | php.autoglobal_cnt ++; |
| | 984 | } |
| | 985 | } |
| | 986 | } |
| | 987 | /* }}} */ |
| | 988 | #endif |
| 969 | | X_ALLOC_N(constinfos, constinfo_cnt); |
| 970 | | #endif |
| 971 | | X_ALLOC_N(funcinfos, funcinfo_cnt); |
| 972 | | X_ALLOC_N(classinfos, classinfo_cnt); |
| | 1003 | X_ALLOC_N(constinfos, constinfo_cnt); |
| | 1004 | #endif |
| | 1005 | X_ALLOC_N(funcinfos, funcinfo_cnt); |
| | 1006 | X_ALLOC_N(classinfos, classinfo_cnt); |
| | 1007 | #ifdef ZEND_ENGINE_2_1 |
| | 1008 | X_ALLOC_N(autoglobals, autoglobal_cnt); |
| | 1009 | #endif |
| 1008 | | /* for ZE1, cest need to fix inside store */ |
| | 1045 | |
| | 1046 | /* for ZE1, cest need to be fixed inside store */ |
| | 1047 | |
| | 1048 | #ifdef ZEND_ENGINE_2_1 |
| | 1049 | /* scan for acatived auto globals */ |
| | 1050 | i = 0; |
| | 1051 | for (b = CG(auto_globals)->pListHead; b != NULL; b = b->pListNext) { |
| | 1052 | zend_auto_global *auto_global = (zend_auto_global *) b->pData; |
| | 1053 | /* check if actived */ |
| | 1054 | if (auto_global->auto_global_callback && !auto_global->armed) { |
| | 1055 | xc_autoglobal_t *data = &php.autoglobals[i ++]; |
| | 1056 | |
| | 1057 | assert(i < php.autoglobal_cnt); |
| | 1058 | UNISW(NOTHING, data->type = b->key.type;) |
| | 1059 | if (UNISW(1, b->key.type == IS_STRING)) { |
| | 1060 | ZSTR_S(data->key) = BUCKET_KEY_S(b); |
| | 1061 | } |
| | 1062 | else { |
| | 1063 | ZSTR_U(data->key) = BUCKET_KEY_U(b); |
| | 1064 | } |
| | 1065 | data->key_len = b->nKeyLength - 1; |
| | 1066 | } |
| | 1067 | } |
| | 1068 | #endif |