1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 18:53:33 +02:00

Fixed final dump "after optimizer"

This commit is contained in:
Dmitry Stogov
2017-07-05 21:48:01 +03:00
parent 73d5097a9f
commit 7bb4ae59c3
+18
View File
@@ -980,6 +980,10 @@ static void zend_optimize(zend_op_array *op_array,
} }
} }
if (ZEND_OPTIMIZER_PASS_7 & ctx->optimization_level) {
return;
}
if (ctx->debug_level & ZEND_DUMP_AFTER_OPTIMIZER) { if (ctx->debug_level & ZEND_DUMP_AFTER_OPTIMIZER) {
zend_dump_op_array(op_array, 0, "after optimizer", NULL); zend_dump_op_array(op_array, 0, "after optimizer", NULL);
} }
@@ -1228,6 +1232,20 @@ int zend_optimize_script(zend_script *script, zend_long optimization_level, zend
} ZEND_HASH_FOREACH_END(); } ZEND_HASH_FOREACH_END();
} }
if (debug_level & ZEND_DUMP_AFTER_OPTIMIZER) {
ZEND_HASH_FOREACH_PTR(&script->function_table, op_array) {
zend_dump_op_array(op_array, ZEND_DUMP_RT_CONSTANTS, "after optimizer", NULL);
} ZEND_HASH_FOREACH_END();
ZEND_HASH_FOREACH_PTR(&script->class_table, ce) {
ZEND_HASH_FOREACH_STR_KEY_PTR(&ce->function_table, name, op_array) {
if (op_array->scope == ce) {
zend_dump_op_array(op_array, ZEND_DUMP_RT_CONSTANTS, "after optimizer", NULL);
}
} ZEND_HASH_FOREACH_END();
} ZEND_HASH_FOREACH_END();
}
if (ctx.constants) { if (ctx.constants) {
zend_hash_destroy(ctx.constants); zend_hash_destroy(ctx.constants);
} }