Lines Matching refs:op_array

113 void zend_dump_var(const zend_op_array *op_array, zend_uchar var_type, int var_num)  in zend_dump_var()  argument
115 if (var_type == IS_CV && var_num < op_array->last_var) { in zend_dump_var()
116 fprintf(stderr, "CV%d($%s)", var_num, op_array->vars[var_num]->val); in zend_dump_var()
313 static void zend_dump_ssa_var(const zend_op_array *op_array, const zend_ssa *ssa, int ssa_var_num, … in zend_dump_ssa_var() argument
320 zend_dump_var(op_array, (var_num < op_array->last_var ? IS_CV : var_type), var_num); in zend_dump_ssa_var()
335 static void zend_dump_type_constraint(const zend_op_array *op_array, const zend_ssa *ssa, const zen… in zend_dump_type_constraint() argument
341 static void zend_dump_range_constraint(const zend_op_array *op_array, const zend_ssa *ssa, const ze… in zend_dump_range_constraint() argument
355 …zend_dump_ssa_var(op_array, ssa, r->min_ssa_var, (r->min_var < op_array->last_var ? IS_CV : 0), r-… in zend_dump_range_constraint()
370 …zend_dump_ssa_var(op_array, ssa, r->max_ssa_var, (r->max_var < op_array->last_var ? IS_CV : 0), r-… in zend_dump_range_constraint()
383 static void zend_dump_op(const zend_op_array *op_array, const zend_basic_block *b, const zend_op *o… in zend_dump_op() argument
396 len = fprintf(stderr, "L%u (%u):", (uint32_t)(opline - op_array->opcodes), opline->lineno); in zend_dump_op()
400 if (!ssa || !ssa->ops || ssa->ops[opline - op_array->opcodes].result_use < 0) { in zend_dump_op()
402 if (ssa && ssa->ops && ssa->ops[opline - op_array->opcodes].result_def >= 0) { in zend_dump_op()
403 int ssa_var_num = ssa->ops[opline - op_array->opcodes].result_def; in zend_dump_op()
404 …zend_dump_ssa_var(op_array, ssa, ssa_var_num, opline->result_type, EX_VAR_TO_NUM(opline->result.va… in zend_dump_op()
406 zend_dump_var(op_array, opline->result_type, EX_VAR_TO_NUM(opline->result.var)); in zend_dump_op()
545 zend_dump_const(CRT_CONSTANT_EX(op_array, opline->op1, (dump_flags & ZEND_DUMP_RT_CONSTANTS))); in zend_dump_op()
548 int ssa_var_num = ssa->ops[opline - op_array->opcodes].op1_use; in zend_dump_op()
551 …zend_dump_ssa_var(op_array, ssa, ssa_var_num, opline->op1_type, EX_VAR_TO_NUM(opline->op1.var), du… in zend_dump_op()
552 } else if (ssa->ops[opline - op_array->opcodes].op1_def < 0) { in zend_dump_op()
554 zend_dump_var(op_array, opline->op1_type, EX_VAR_TO_NUM(opline->op1.var)); in zend_dump_op()
558 zend_dump_var(op_array, opline->op1_type, EX_VAR_TO_NUM(opline->op1.var)); in zend_dump_op()
561 int ssa_var_num = ssa->ops[opline - op_array->opcodes].op1_def; in zend_dump_op()
564 …zend_dump_ssa_var(op_array, ssa, ssa_var_num, opline->op1_type, EX_VAR_TO_NUM(opline->op1.var), du… in zend_dump_op()
573 fprintf(stderr, " L%u", (uint32_t)(OP_JMP_ADDR(opline, opline->op1) - op_array->opcodes)); in zend_dump_op()
581 zval *op = CRT_CONSTANT_EX(op_array, opline->op2, (dump_flags & ZEND_DUMP_RT_CONSTANTS)); in zend_dump_op()
596 fprintf(stderr, " L%u,", (uint32_t)ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, Z_LVAL_P(zv))); in zend_dump_op()
605 int ssa_var_num = ssa->ops[opline - op_array->opcodes].op2_use; in zend_dump_op()
608 …zend_dump_ssa_var(op_array, ssa, ssa_var_num, opline->op2_type, EX_VAR_TO_NUM(opline->op2.var), du… in zend_dump_op()
609 } else if (ssa->ops[opline - op_array->opcodes].op2_def < 0) { in zend_dump_op()
611 zend_dump_var(op_array, opline->op2_type, EX_VAR_TO_NUM(opline->op2.var)); in zend_dump_op()
615 zend_dump_var(op_array, opline->op2_type, EX_VAR_TO_NUM(opline->op2.var)); in zend_dump_op()
618 int ssa_var_num = ssa->ops[opline - op_array->opcodes].op2_def; in zend_dump_op()
621 …zend_dump_ssa_var(op_array, ssa, ssa_var_num, opline->op2_type, EX_VAR_TO_NUM(opline->op2.var), du… in zend_dump_op()
630 fprintf(stderr, " L%u", (uint32_t)(OP_JMP_ADDR(opline, opline->op2) - op_array->opcodes)); in zend_dump_op()
642 …fprintf(stderr, " L%u", (uint32_t)ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_val… in zend_dump_op()
647 zend_dump_const(CRT_CONSTANT_EX(op_array, opline->result, (dump_flags & ZEND_DUMP_RT_CONSTANTS))); in zend_dump_op()
648 } else if (ssa && ssa->ops && ssa->ops[opline - op_array->opcodes].result_use >= 0) { in zend_dump_op()
651 int ssa_var_num = ssa->ops[opline - op_array->opcodes].result_use; in zend_dump_op()
654 …zend_dump_ssa_var(op_array, ssa, ssa_var_num, opline->result_type, EX_VAR_TO_NUM(opline->result.va… in zend_dump_op()
658 zend_dump_var(op_array, opline->result_type, EX_VAR_TO_NUM(opline->result.var)); in zend_dump_op()
661 int ssa_var_num = ssa->ops[opline - op_array->opcodes].result_def; in zend_dump_op()
664 …zend_dump_ssa_var(op_array, ssa, ssa_var_num, opline->result_type, EX_VAR_TO_NUM(opline->result.va… in zend_dump_op()
767 static void zend_dump_block_header(const zend_cfg *cfg, const zend_op_array *op_array, const zend_s… in zend_dump_block_header() argument
777 zend_dump_ssa_var(op_array, ssa, p->ssa_var, 0, p->var, dump_flags); in zend_dump_block_header()
784 zend_dump_ssa_var(op_array, ssa, p->sources[j], 0, p->var, dump_flags); in zend_dump_block_header()
789 zend_dump_ssa_var(op_array, ssa, p->sources[0], 0, p->var, dump_flags); in zend_dump_block_header()
792 zend_dump_range_constraint(op_array, ssa, &p->constraint.range, dump_flags); in zend_dump_block_header()
794 zend_dump_type_constraint(op_array, ssa, &p->constraint.type, dump_flags); in zend_dump_block_header()
803 static void zend_dump_op_array_name(const zend_op_array *op_array) in zend_dump_op_array_name() argument
807 func_info = ZEND_FUNC_INFO(op_array); in zend_dump_op_array_name()
808 if (op_array->function_name) { in zend_dump_op_array_name()
809 if (op_array->scope && op_array->scope->name) { in zend_dump_op_array_name()
810 fprintf(stderr, "%s::%s", op_array->scope->name->val, op_array->function_name->val); in zend_dump_op_array_name()
812 fprintf(stderr, "%s", op_array->function_name->val); in zend_dump_op_array_name()
822 void zend_dump_op_array(const zend_op_array *op_array, uint32_t dump_flags, const char *msg, const … in zend_dump_op_array() argument
840 func_info = ZEND_FUNC_INFO(op_array); in zend_dump_op_array()
846 zend_dump_op_array_name(op_array); in zend_dump_op_array()
848 op_array->last, in zend_dump_op_array()
849 op_array->num_args); in zend_dump_op_array()
853 fprintf(stderr, ", vars=%d, tmps=%d", op_array->last_var, op_array->T); in zend_dump_op_array()
902 …fprintf(stderr, " ; %s:%u-%u\n", op_array->filename->val, op_array->line_start, op_array->line_… in zend_dump_op_array()
907 for (j = 0; j < MIN(op_array->num_args, func_info->num_args ); j++) { in zend_dump_op_array()
923 for (i = 0; i < op_array->last_var; i++) { in zend_dump_op_array()
925 zend_dump_ssa_var(op_array, ssa, i, IS_CV, i, dump_flags); in zend_dump_op_array()
940 zend_dump_block_header(cfg, op_array, ssa, n, dump_flags); in zend_dump_op_array()
941 opline = op_array->opcodes + b->start; in zend_dump_op_array()
944 zend_dump_op(op_array, b, opline, dump_flags, data); in zend_dump_op_array()
949 if (op_array->last_live_range) { in zend_dump_op_array()
951 for (i = 0; i < op_array->last_live_range; i++) { in zend_dump_op_array()
954 EX_VAR_TO_NUM(op_array->live_range[i].var & ~ZEND_LIVE_MASK), in zend_dump_op_array()
955 cfg->map[op_array->live_range[i].start], in zend_dump_op_array()
956 cfg->map[op_array->live_range[i].end]); in zend_dump_op_array()
959 EX_VAR_TO_NUM(op_array->live_range[i].var & ~ZEND_LIVE_MASK), in zend_dump_op_array()
960 op_array->live_range[i].start, in zend_dump_op_array()
961 op_array->live_range[i].end); in zend_dump_op_array()
963 switch (op_array->live_range[i].var & ZEND_LIVE_MASK) { in zend_dump_op_array()
979 if (op_array->last_try_catch) { in zend_dump_op_array()
981 for (i = 0; i < op_array->last_try_catch; i++) { in zend_dump_op_array()
983 cfg->map[op_array->try_catch_array[i].try_op]); in zend_dump_op_array()
984 if (op_array->try_catch_array[i].catch_op) { in zend_dump_op_array()
986 cfg->map[op_array->try_catch_array[i].catch_op]); in zend_dump_op_array()
990 if (op_array->try_catch_array[i].finally_op) { in zend_dump_op_array()
992 cfg->map[op_array->try_catch_array[i].finally_op]); in zend_dump_op_array()
996 if (op_array->try_catch_array[i].finally_end) { in zend_dump_op_array()
998 cfg->map[op_array->try_catch_array[i].finally_end]); in zend_dump_op_array()
1005 const zend_op *opline = op_array->opcodes; in zend_dump_op_array()
1006 const zend_op *end = opline + op_array->last; in zend_dump_op_array()
1009 zend_dump_op(op_array, NULL, opline, dump_flags, data); in zend_dump_op_array()
1012 if (op_array->last_live_range) { in zend_dump_op_array()
1014 for (i = 0; i < op_array->last_live_range; i++) { in zend_dump_op_array()
1016 EX_VAR_TO_NUM(op_array->live_range[i].var & ~ZEND_LIVE_MASK), in zend_dump_op_array()
1017 op_array->live_range[i].start, in zend_dump_op_array()
1018 op_array->live_range[i].end); in zend_dump_op_array()
1019 switch (op_array->live_range[i].var & ZEND_LIVE_MASK) { in zend_dump_op_array()
1035 if (op_array->last_try_catch) { in zend_dump_op_array()
1037 for (i = 0; i < op_array->last_try_catch; i++) { in zend_dump_op_array()
1039 op_array->try_catch_array[i].try_op); in zend_dump_op_array()
1040 if (op_array->try_catch_array[i].catch_op) { in zend_dump_op_array()
1042 op_array->try_catch_array[i].catch_op); in zend_dump_op_array()
1046 if (op_array->try_catch_array[i].finally_op) { in zend_dump_op_array()
1048 op_array->try_catch_array[i].finally_op); in zend_dump_op_array()
1052 if (op_array->try_catch_array[i].finally_end) { in zend_dump_op_array()
1054 op_array->try_catch_array[i].finally_end); in zend_dump_op_array()
1063 void zend_dump_dominators(const zend_op_array *op_array, const zend_cfg *cfg) in zend_dump_dominators() argument
1068 zend_dump_op_array_name(op_array); in zend_dump_dominators()
1078 void zend_dump_variables(const zend_op_array *op_array) in zend_dump_variables() argument
1083 zend_dump_op_array_name(op_array); in zend_dump_variables()
1085 for (j = 0; j < op_array->last_var; j++) { in zend_dump_variables()
1087 zend_dump_var(op_array, IS_CV, j); in zend_dump_variables()
1092 void zend_dump_ssa_variables(const zend_op_array *op_array, const zend_ssa *ssa, uint32_t dump_flag… in zend_dump_ssa_variables() argument
1098 zend_dump_op_array_name(op_array); in zend_dump_ssa_variables()
1103 zend_dump_ssa_var(op_array, ssa, j, IS_CV, ssa->vars[j].var, dump_flags); in zend_dump_ssa_variables()
1117 static void zend_dump_var_set(const zend_op_array *op_array, const char *name, zend_bitset set) in zend_dump_var_set() argument
1123 for (i = 0; i < op_array->last_var + op_array->T; i++) { in zend_dump_var_set()
1130 zend_dump_var(op_array, IS_CV, i); in zend_dump_var_set()
1136 void zend_dump_dfg(const zend_op_array *op_array, const zend_cfg *cfg, const zend_dfg *dfg) in zend_dump_dfg() argument
1140 zend_dump_op_array_name(op_array); in zend_dump_dfg()
1145 zend_dump_var_set(op_array, "def", DFG_BITSET(dfg->def, dfg->size, j)); in zend_dump_dfg()
1146 zend_dump_var_set(op_array, "use", DFG_BITSET(dfg->use, dfg->size, j)); in zend_dump_dfg()
1147 zend_dump_var_set(op_array, "in ", DFG_BITSET(dfg->in, dfg->size, j)); in zend_dump_dfg()
1148 zend_dump_var_set(op_array, "out", DFG_BITSET(dfg->out, dfg->size, j)); in zend_dump_dfg()
1152 void zend_dump_phi_placement(const zend_op_array *op_array, const zend_ssa *ssa) in zend_dump_phi_placement() argument
1159 zend_dump_op_array_name(op_array); in zend_dump_phi_placement()
1178 zend_dump_var(op_array, IS_CV, p->var); in zend_dump_phi_placement()