]> granicus.if.org Git - php/commitdiff
[skip ci] Fix typos in jit code comments
authorTyson Andre <tysonandre775@hotmail.com>
Sat, 18 Apr 2020 16:12:35 +0000 (12:12 -0400)
committerTyson Andre <tysonandre775@hotmail.com>
Sun, 19 Apr 2020 14:03:49 +0000 (10:03 -0400)
And in Opcache's zend_cfg.h

Closes GH-5414

ext/opcache/Optimizer/zend_cfg.h
ext/opcache/jit/zend_jit.c
ext/opcache/jit/zend_jit_x86.dasc

index 51e2e63b4bcc6233b99463b0ea4caddb7c487cdf..eb607c83c2f4c78aceb125415b055eed1272fda9 100644 (file)
@@ -19,8 +19,8 @@
 #ifndef ZEND_CFG_H
 #define ZEND_CFG_H
 
-/* zend_basic_bloc.flags */
-#define ZEND_BB_START            (1<<0)  /* fist block             */
+/* zend_basic_block.flags */
+#define ZEND_BB_START            (1<<0)  /* first block            */
 #define ZEND_BB_FOLLOW           (1<<1)  /* follows the next block */
 #define ZEND_BB_TARGET           (1<<2)  /* jump target            */
 #define ZEND_BB_EXIT             (1<<3)  /* without successors     */
index d360514f3f4f59a42cce81556f492460f233378a..838795856f7bdfb2c731b4136b51657f654b4d51 100644 (file)
@@ -1241,7 +1241,7 @@ static int zend_jit_compute_liveness(const zend_op_array *op_array, zend_ssa *ss
                                                                if (ssa->vars[src].definition_phi
                                                                 && ssa->vars[src].definition_phi->pi >= 0
                                                                 && phi->block == ssa->vars[src].definition_phi->block) {
-                                                                       /* Skip zero-lenght interval for Pi variable */
+                                                                       /* Skip zero-length interval for Pi variable */
                                                                        src = ssa->vars[src].definition_phi->sources[0];
                                                                }
                                                                if (intervals[src]) {
@@ -1387,7 +1387,7 @@ static int zend_jit_try_allocate_free_reg(const zend_op_array *op_array, zend_ss
        }
 
        /* TODO: Allow usage of preserved registers ???
-        * Their values have to be stored in prologuee and restored in epilogue
+        * Their values have to be stored in prologue and restored in epilogue
         */
        available = ZEND_REGSET_DIFFERENCE(available, ZEND_REGSET_PRESERVED);
 
@@ -1482,7 +1482,7 @@ static int zend_jit_try_allocate_free_reg(const zend_op_array *op_array, zend_ss
        } while (range);
 
 #if 0
-       /* Coalesing */
+       /* Coalescing */
        if (ssa->vars[current->ssa_var].definition == current->start) {
                zend_op *opline = op_array->opcodes + current->start;
                int hint = -1;
@@ -1565,7 +1565,7 @@ static int zend_jit_try_allocate_free_reg(const zend_op_array *op_array, zend_ss
                }
                return 1;
 #if 0
-       // TODO: allow low prioirity register usage
+       // TODO: allow low priority register usage
        } else if (reg2 != ZREG_NONE && zend_interval_end(current) < pos2) {
                /* register available for the whole interval */
                current->reg = reg2;
@@ -1840,7 +1840,7 @@ static zend_lifetime_interval** zend_jit_allocate_registers(const zend_op_array
                                                                        if (ssa->vars[src].definition_phi
                                                                         && ssa->vars[src].definition_phi->pi >= 0
                                                                         && phi->block == ssa->vars[src].definition_phi->block) {
-                                                                               /* Skip zero-lenght interval for Pi variable */
+                                                                               /* Skip zero-length interval for Pi variable */
                                                                                src = ssa->vars[src].definition_phi->sources[0];
                                                                        }
                                                                        if (intervals[i]) {
@@ -1864,7 +1864,7 @@ static zend_lifetime_interval** zend_jit_allocate_registers(const zend_op_array
                                                                                if (ssa->vars[src].definition_phi
                                                                                 && ssa->vars[src].definition_phi->pi >= 0
                                                                                 && phi->block == ssa->vars[src].definition_phi->block) {
-                                                                                       /* Skip zero-lenght interval for Pi variable */
+                                                                                       /* Skip zero-length interval for Pi variable */
                                                                                        src = ssa->vars[src].definition_phi->sources[0];
                                                                                }
                                                                                if (intervals[src]) {
index d6e1c27bbd3b988673386580735560905e5b1321..3fd7d4e83fdedafcff0793a56783042570e7d6dc 100644 (file)
@@ -27,7 +27,7 @@
  |.define FP,      r14
  |.define IP,      r15
  |.define IPl,     r15d
- |.define RX,      r15       // the same as VM IP reused as a general purpos reg
+ |.define RX,      r15       // the same as VM IP reused as a general purpose reg
  |.define CARG1,   rcx       // x64/POSIX C call arguments.
  |.define CARG2,   rdx
  |.define CARG3,   r8
@@ -51,7 +51,7 @@
  |.define FP,      r14
  |.define IP,      r15
  |.define IPl,     r15d
- |.define RX,      r15       // the same as VM IP reused as a general purpos reg
+ |.define RX,      r15       // the same as VM IP reused as a general purpose reg
  |.define CARG1,   rdi       // x64/POSIX C call arguments.
  |.define CARG2,   rsi
  |.define CARG3,   rdx
@@ -77,7 +77,7 @@
  |.define FP,      esi
  |.define IP,      edi
  |.define IPl,     edi
- |.define RX,      edi       // the same as VM IP reused as a general purpos reg
+ |.define RX,      edi       // the same as VM IP reused as a general purpose reg
  |.define FCARG1a, ecx       // x86 fastcall arguments.
  |.define FCARG2a, edx
  |.define FCARG1d, ecx
@@ -286,7 +286,7 @@ static void* dasm_labels[zend_lb_MAX];
 
 /* In 64-bit build we compare only low 32-bits.
  * x86_64 cmp instruction doesn't support immediate 64-bit operand, and full
- * comparison would require additinal load of 64-bit address into register.
+ * comparison would require an additional load of 64-bit address into register.
  * This is not a problem at all, while JIT buffer size is less than 4GB.
  */
 |.macro CMP_IP, addr
@@ -2382,7 +2382,7 @@ static int zend_jit_trace_exit_stub(dasm_State **Dst)
        |.else
        |       add r4, 8*4+8*8 /* CPU regs + SSE regs */
        |.endif
-       |       // execute_data = EG(current_excute_data)
+       |       // execute_data = EG(current_execute_data)
        |       MEM_OP2_2_ZTS mov, FP, aword, executor_globals, current_execute_data, r0
        |       test eax, eax
        |       jl ->trace_halt
@@ -7969,7 +7969,7 @@ static int zend_jit_do_fcall(dasm_State **Dst, const zend_op *opline, const zend
                }
        }
        if (!func) {
-               /* resolve function ar run time */
+               /* resolve function at run time */
        } else if (func->type == ZEND_USER_FUNCTION) {
                ZEND_ASSERT(opline->opcode != ZEND_DO_ICALL);
                call_num_args = call_info->num_args;
@@ -7978,7 +7978,7 @@ static int zend_jit_do_fcall(dasm_State **Dst, const zend_op *opline, const zend
                call_num_args = call_info->num_args;
 #if ZEND_DEBUG
                if (func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) {
-                       // TODO: Mow most internal functions have type hints ???
+                       // TODO: Now most internal functions have type hints ???
                        if (!trace) {
                                goto fallback;
                        }
@@ -8391,7 +8391,7 @@ static int zend_jit_do_fcall(dasm_State **Dst, const zend_op *opline, const zend
                }
 
                if (trace) {
-                       // TODO: This is a qucik dirty fix ??????
+                       // TODO: This is a quick dirty fix ??????
                        //
                        // Internal function may call another trace that,
                        // replaces EG(trace_id) and the following side exit
@@ -10298,7 +10298,7 @@ static uint32_t zend_get_known_property_offset(zend_class_entry *ce, zend_string
        }
 
        if (ce->info.user.filename != filename) {
-               /* class declaration might be changed infdependently */
+               /* class declaration might be changed independently */
                return ZEND_WRONG_PROPERTY_OFFSET;
        }
 
@@ -10309,7 +10309,7 @@ static uint32_t zend_get_known_property_offset(zend_class_entry *ce, zend_string
                        if (parent->type == ZEND_INTERNAL_CLASS) {
                                break;
                        } else if (parent->info.user.filename != filename) {
-                               /* some of parents class declarations might be changed infdependently */
+                               /* some of parents class declarations might be changed independently */
                                /* TODO: this check may be not enough, because even
                                 * in the same it's possible to conditionally define
                                 * few classes with the same name, and "parent" may
@@ -10345,7 +10345,7 @@ static zend_bool zend_may_be_dynamic_property(zend_class_entry *ce, zend_string
        }
 
        if (ce->info.user.filename != filename) {
-               /* class declaration might be changed infdependently */
+               /* class declaration might be changed independently */
                return 1;
        }
 
@@ -11052,7 +11052,7 @@ static zend_bool zend_jit_var_supports_reg(zend_ssa *ssa, int var)
 
        if (zend_jit_reg_alloc < ZEND_JIT_REG_ALLOC_GLOBAL) {
                /* Disable global register allocation,
-                * register allocation forSAA variables connected through Phi functions
+                * register allocation for SSA variables connected through Phi functions
                 */
                if (ssa->vars[var].definition_phi) {
                        return 0;