com php-src: Code cleanup: ext/opcache/Optimizer/block_pass .c ext/opcache/Optimizer/compact_literals.c
| From: | Dmitry Stogov | Date: | Fri, 20 Jun 2014 15:40:03 +0000 |
| Subject: | com php-src: Code cleanup: ext/opcache/Optimizer/block_pass .c ext/opcache/Optimizer/compact_literals.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-79006@lists.php.net to get a copy of this message | ||
Commit: 87b667221ed145bb1992abf3b10072bc0462600f
Author: Dmitry Stogov <dmitry@zend.com> Fri, 20 Jun 2014 19:40:03 +0400
Parents: 3f041ff2cbbc74df417a36177ba77707e510a884
Branches: phpng
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=87b667221ed145bb1992abf3b10072bc0462600f
Log:
Code cleanup
Changed paths:
M ext/opcache/Optimizer/block_pass.c
M ext/opcache/Optimizer/compact_literals.c
Diff:
diff --git a/ext/opcache/Optimizer/block_pass.c b/ext/opcache/Optimizer/block_pass.c
index 7df2764..7baebd3 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 6300d0f..26af07a 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 */