]> granicus.if.org Git - php/commitdiff
typo and cleanup
authorDmitry Stogov <dmitry@zend.com>
Wed, 9 Oct 2019 14:58:35 +0000 (17:58 +0300)
committerDmitry Stogov <dmitry@zend.com>
Wed, 9 Oct 2019 14:58:35 +0000 (17:58 +0300)
Zend/zend_compile.c
ext/opcache/Optimizer/zend_dump.c
ext/opcache/Optimizer/zend_optimizer.c

index edc0888c2d72333254e392fcbd6fb5601ca1a8a7..64b9bc70325cd869487e46bb917fcc7cc2055209 100644 (file)
@@ -2000,7 +2000,7 @@ ZEND_API int zend_is_smart_branch(const zend_op *opline) /* {{{ */
 static inline uint32_t zend_emit_cond_jump(zend_uchar opcode, znode *cond, uint32_t opnum_target) /* {{{ */
 {
        uint32_t opnum = get_next_op_number();
-       zend_op *opline = CG(active_op_array)->opcodes + opnum - 1;
+       zend_op *opline;
 
        if (cond->op_type == IS_TMP_VAR && opnum > 0) {
                opline = CG(active_op_array)->opcodes + opnum - 1;
index cc4602192a54a1cd8d028aa90bc3bf5486c41d3c..7ec76438bf2e373d536dab99ffc78c9c53d8beea 100644 (file)
@@ -139,7 +139,7 @@ void zend_dump_var(const zend_op_array *op_array, zend_uchar var_type, int var_n
                fprintf(stderr, "CV%d($%s)", var_num, op_array->vars[var_num]->val);
        } else if (var_type == IS_VAR) {
                fprintf(stderr, "V%d", var_num);
-       } else if (var_type == IS_TMP_VAR || !(var_type & (IS_VAR|IS_CV))) {
+       } else if ((var_type & (IS_VAR|IS_TMP_VAR)) == IS_TMP_VAR) {
                fprintf(stderr, "T%d", var_num);
        } else {
                fprintf(stderr, "X%d", var_num);
index d7f24e47cea2f9f912db5bf83b08ed643ab8d6c2..d1084f7648d878681d74c87bd3a637b654d66878 100644 (file)
@@ -1153,7 +1153,7 @@ static void zend_redo_pass_two(zend_op_array *op_array)
                                case ZEND_IN_ARRAY:
                                case ZEND_ARRAY_KEY_EXISTS:
                                        if (opline->result_type & IS_TMP_VAR) {
-                                               /* reinitialize result_type od smart branch instructions */
+                                               /* reinitialize result_type of smart branch instructions */
                                                if (opline + 1 < end) {
                                                        if ((opline+1)->opcode == ZEND_JMPZ
                                                         && (opline+1)->op1_type == IS_TMP_VAR
@@ -1271,7 +1271,7 @@ static void zend_redo_pass_two_ex(zend_op_array *op_array, zend_ssa *ssa)
                                case ZEND_IN_ARRAY:
                                case ZEND_ARRAY_KEY_EXISTS:
                                        if (opline->result_type & IS_TMP_VAR) {
-                                               /* reinitialize result_type od smart branch instructions */
+                                               /* reinitialize result_type of smart branch instructions */
                                                if (opline + 1 < end) {
                                                        if ((opline+1)->opcode == ZEND_JMPZ
                                                         && (opline+1)->op1_type == IS_TMP_VAR