#include "zend_cfg.h"
#include "zend_dump.h"
-#define DEBUG_BLOCKPASS 0
-
/* Checks if a constant (like "true") may be replaced by its value */
int zend_optimizer_get_persistent_constant(zend_string *name, zval *result, int copy)
{
}
}
-#if DEBUG_BLOCKPASS > 2
- {
+ if (ctx->debug_level & ZEND_DUMP_BLOCK_PASS_VARS) {
int printed = 0;
uint32_t i;
for (i = op_array->last_var; i< op_array->T; i++) {
if (zend_bitset_in(used_ext, i)) {
if (!printed) {
- fprintf(stderr, "NON-LOCAL-VARS: %s: %d", op_array->function_name ? op_array->function_name->val : "(null)", i);
+ fprintf(stderr, "NON-LOCAL-VARS: %d", i);
printed = 1;
} else {
fprintf(stderr, ", %d", i);
}
if (printed) {
fprintf(stderr, "\n");
- zend_dump_op_array(op_array, cfg, 0);
}
}
-#endif
for (n = 0; n < cfg->blocks_count; n++) {
block = cfg->blocks + n;
#define ZEND_DUMP_BEFORE_OPTIMIZER (1<<16)
#define ZEND_DUMP_AFTER_OPTIMIZER (1<<17)
+
#define ZEND_DUMP_BEFORE_BLOCK_PASS (1<<18)
#define ZEND_DUMP_AFTER_BLOCK_PASS (1<<19)
+#define ZEND_DUMP_BLOCK_PASS_VARS (1<<20)
typedef struct _zend_script {
zend_string *filename;