mirror of
https://github.com/php/php-src.git
synced 2026-04-28 18:53:33 +02:00
Code cleanup
This commit is contained in:
@@ -397,7 +397,6 @@ static inline void del_source(zend_code_block *from, zend_code_block *to)
|
||||
/* move 'to'`s references to 'from' */
|
||||
to->start_opline = NULL;
|
||||
to->access = 0;
|
||||
//???A efree(to->sources);
|
||||
to->sources = NULL;
|
||||
from_block->follow_to = to->follow_to;
|
||||
if (to->op1_to) {
|
||||
@@ -487,17 +486,10 @@ static void zend_rebuild_access_path(zend_cfg *cfg, zend_op_array *op_array, int
|
||||
/* Mark all blocks as unaccessible and destroy back references */
|
||||
b = blocks;
|
||||
while (b != NULL) {
|
||||
zend_block_source *cs;
|
||||
if (!start && b->access) {
|
||||
start = b;
|
||||
}
|
||||
b->access = 0;
|
||||
//???A cs = b->sources;
|
||||
//???A while (cs) {
|
||||
//???A zend_block_source *n = cs->next;
|
||||
//???A efree(cs);
|
||||
//???A cs = n;
|
||||
//???A }
|
||||
b->sources = NULL;
|
||||
b = b->next;
|
||||
}
|
||||
@@ -2109,15 +2101,5 @@ static void zend_block_optimization(zend_op_array *op_array, zend_optimizer_ctx
|
||||
assemble_code_blocks(&cfg, op_array);
|
||||
|
||||
/* Destroy CFG */
|
||||
/* ???A
|
||||
for (cur_block = cfg.blocks; cur_block; cur_block = cur_block->next) {
|
||||
zend_block_source *cs = cur_block->sources;
|
||||
while (cs) {
|
||||
zend_block_source *n = cs->next;
|
||||
efree(cs);
|
||||
cs = n;
|
||||
}
|
||||
}
|
||||
*/
|
||||
zend_arena_release(&ctx->arena, checkpoint);
|
||||
}
|
||||
|
||||
@@ -284,8 +284,7 @@ static void optimizer_compact_literals(zend_op_array *op_array, zend_optimizer_c
|
||||
j = 0; cache_slots = 0;
|
||||
zend_hash_init(&hash, 16, NULL, NULL, 0);
|
||||
map = (int*)zend_arena_alloc(&ctx->arena, op_array->last_literal * sizeof(int));
|
||||
//???A
|
||||
memset(map, 0, op_array->last_literal * sizeof(int));
|
||||
memset(map, 0, op_array->last_literal * sizeof(int));
|
||||
for (i = 0; i < op_array->last_literal; i++) {
|
||||
if (!info[i].flags) {
|
||||
/* unsed literal */
|
||||
|
||||
Reference in New Issue
Block a user