summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2014-06-20 19:40:03 +0400
committerDmitry Stogov <dmitry@zend.com>2014-06-20 19:40:03 +0400
commit87b667221ed145bb1992abf3b10072bc0462600f (patch)
tree702dced5bd34025bb07c83181d0755606871ae1c
parent3f041ff2cbbc74df417a36177ba77707e510a884 (diff)
downloadphp-git-87b667221ed145bb1992abf3b10072bc0462600f.tar.gz
Code cleanup
-rw-r--r--ext/opcache/Optimizer/block_pass.c18
-rw-r--r--ext/opcache/Optimizer/compact_literals.c3
2 files changed, 1 insertions, 20 deletions
diff --git a/ext/opcache/Optimizer/block_pass.c b/ext/opcache/Optimizer/block_pass.c
index 7df2764d93..7baebd36d8 100644
--- a/ext/opcache/Optimizer/block_pass.c
+++ b/ext/opcache/Optimizer/block_pass.c
@@ -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);
}
diff --git a/ext/opcache/Optimizer/compact_literals.c b/ext/opcache/Optimizer/compact_literals.c
index 6300d0fcfd..26af07a189 100644
--- a/ext/opcache/Optimizer/compact_literals.c
+++ b/ext/opcache/Optimizer/compact_literals.c
@@ -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 */