Skip to content

Commit 4e1219a

Browse files
committed
[skip ci] Fix typos in jit code comments
And in Opcache's zend_cfg.h Closes GH-5414
1 parent 3b9d33d commit 4e1219a

File tree

3 files changed

+20
-20
lines changed

3 files changed

+20
-20
lines changed

ext/opcache/Optimizer/zend_cfg.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
#ifndef ZEND_CFG_H
2020
#define ZEND_CFG_H
2121

22-
/* zend_basic_bloc.flags */
23-
#define ZEND_BB_START (1<<0) /* fist block */
22+
/* zend_basic_block.flags */
23+
#define ZEND_BB_START (1<<0) /* first block */
2424
#define ZEND_BB_FOLLOW (1<<1) /* follows the next block */
2525
#define ZEND_BB_TARGET (1<<2) /* jump target */
2626
#define ZEND_BB_EXIT (1<<3) /* without successors */

ext/opcache/jit/zend_jit.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1241,7 +1241,7 @@ static int zend_jit_compute_liveness(const zend_op_array *op_array, zend_ssa *ss
12411241
if (ssa->vars[src].definition_phi
12421242
&& ssa->vars[src].definition_phi->pi >= 0
12431243
&& phi->block == ssa->vars[src].definition_phi->block) {
1244-
/* Skip zero-lenght interval for Pi variable */
1244+
/* Skip zero-length interval for Pi variable */
12451245
src = ssa->vars[src].definition_phi->sources[0];
12461246
}
12471247
if (intervals[src]) {
@@ -1387,7 +1387,7 @@ static int zend_jit_try_allocate_free_reg(const zend_op_array *op_array, zend_ss
13871387
}
13881388

13891389
/* TODO: Allow usage of preserved registers ???
1390-
* Their values have to be stored in prologuee and restored in epilogue
1390+
* Their values have to be stored in prologue and restored in epilogue
13911391
*/
13921392
available = ZEND_REGSET_DIFFERENCE(available, ZEND_REGSET_PRESERVED);
13931393

@@ -1482,7 +1482,7 @@ static int zend_jit_try_allocate_free_reg(const zend_op_array *op_array, zend_ss
14821482
} while (range);
14831483

14841484
#if 0
1485-
/* Coalesing */
1485+
/* Coalescing */
14861486
if (ssa->vars[current->ssa_var].definition == current->start) {
14871487
zend_op *opline = op_array->opcodes + current->start;
14881488
int hint = -1;
@@ -1565,7 +1565,7 @@ static int zend_jit_try_allocate_free_reg(const zend_op_array *op_array, zend_ss
15651565
}
15661566
return 1;
15671567
#if 0
1568-
// TODO: allow low prioirity register usage
1568+
// TODO: allow low priority register usage
15691569
} else if (reg2 != ZREG_NONE && zend_interval_end(current) < pos2) {
15701570
/* register available for the whole interval */
15711571
current->reg = reg2;
@@ -1840,7 +1840,7 @@ static zend_lifetime_interval** zend_jit_allocate_registers(const zend_op_array
18401840
if (ssa->vars[src].definition_phi
18411841
&& ssa->vars[src].definition_phi->pi >= 0
18421842
&& phi->block == ssa->vars[src].definition_phi->block) {
1843-
/* Skip zero-lenght interval for Pi variable */
1843+
/* Skip zero-length interval for Pi variable */
18441844
src = ssa->vars[src].definition_phi->sources[0];
18451845
}
18461846
if (intervals[i]) {
@@ -1864,7 +1864,7 @@ static zend_lifetime_interval** zend_jit_allocate_registers(const zend_op_array
18641864
if (ssa->vars[src].definition_phi
18651865
&& ssa->vars[src].definition_phi->pi >= 0
18661866
&& phi->block == ssa->vars[src].definition_phi->block) {
1867-
/* Skip zero-lenght interval for Pi variable */
1867+
/* Skip zero-length interval for Pi variable */
18681868
src = ssa->vars[src].definition_phi->sources[0];
18691869
}
18701870
if (intervals[src]) {

ext/opcache/jit/zend_jit_x86.dasc

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
|.define FP, r14
2828
|.define IP, r15
2929
|.define IPl, r15d
30-
|.define RX, r15 // the same as VM IP reused as a general purpos reg
30+
|.define RX, r15 // the same as VM IP reused as a general purpose reg
3131
|.define CARG1, rcx // x64/POSIX C call arguments.
3232
|.define CARG2, rdx
3333
|.define CARG3, r8
@@ -51,7 +51,7 @@
5151
|.define FP, r14
5252
|.define IP, r15
5353
|.define IPl, r15d
54-
|.define RX, r15 // the same as VM IP reused as a general purpos reg
54+
|.define RX, r15 // the same as VM IP reused as a general purpose reg
5555
|.define CARG1, rdi // x64/POSIX C call arguments.
5656
|.define CARG2, rsi
5757
|.define CARG3, rdx
@@ -77,7 +77,7 @@
7777
|.define FP, esi
7878
|.define IP, edi
7979
|.define IPl, edi
80-
|.define RX, edi // the same as VM IP reused as a general purpos reg
80+
|.define RX, edi // the same as VM IP reused as a general purpose reg
8181
|.define FCARG1a, ecx // x86 fastcall arguments.
8282
|.define FCARG2a, edx
8383
|.define FCARG1d, ecx
@@ -286,7 +286,7 @@ static void* dasm_labels[zend_lb_MAX];
286286

287287
/* In 64-bit build we compare only low 32-bits.
288288
* x86_64 cmp instruction doesn't support immediate 64-bit operand, and full
289-
* comparison would require additinal load of 64-bit address into register.
289+
* comparison would require an additional load of 64-bit address into register.
290290
* This is not a problem at all, while JIT buffer size is less than 4GB.
291291
*/
292292
|.macro CMP_IP, addr
@@ -2382,7 +2382,7 @@ static int zend_jit_trace_exit_stub(dasm_State **Dst)
23822382
|.else
23832383
| add r4, 8*4+8*8 /* CPU regs + SSE regs */
23842384
|.endif
2385-
| // execute_data = EG(current_excute_data)
2385+
| // execute_data = EG(current_execute_data)
23862386
| MEM_OP2_2_ZTS mov, FP, aword, executor_globals, current_execute_data, r0
23872387
| test eax, eax
23882388
| jl ->trace_halt
@@ -7969,7 +7969,7 @@ static int zend_jit_do_fcall(dasm_State **Dst, const zend_op *opline, const zend
79697969
}
79707970
}
79717971
if (!func) {
7972-
/* resolve function ar run time */
7972+
/* resolve function at run time */
79737973
} else if (func->type == ZEND_USER_FUNCTION) {
79747974
ZEND_ASSERT(opline->opcode != ZEND_DO_ICALL);
79757975
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
79787978
call_num_args = call_info->num_args;
79797979
#if ZEND_DEBUG
79807980
if (func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) {
7981-
// TODO: Mow most internal functions have type hints ???
7981+
// TODO: Now most internal functions have type hints ???
79827982
if (!trace) {
79837983
goto fallback;
79847984
}
@@ -8391,7 +8391,7 @@ static int zend_jit_do_fcall(dasm_State **Dst, const zend_op *opline, const zend
83918391
}
83928392

83938393
if (trace) {
8394-
// TODO: This is a qucik dirty fix ??????
8394+
// TODO: This is a quick dirty fix ??????
83958395
//
83968396
// Internal function may call another trace that,
83978397
// 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
1029810298
}
1029910299

1030010300
if (ce->info.user.filename != filename) {
10301-
/* class declaration might be changed infdependently */
10301+
/* class declaration might be changed independently */
1030210302
return ZEND_WRONG_PROPERTY_OFFSET;
1030310303
}
1030410304

@@ -10309,7 +10309,7 @@ static uint32_t zend_get_known_property_offset(zend_class_entry *ce, zend_string
1030910309
if (parent->type == ZEND_INTERNAL_CLASS) {
1031010310
break;
1031110311
} else if (parent->info.user.filename != filename) {
10312-
/* some of parents class declarations might be changed infdependently */
10312+
/* some of parents class declarations might be changed independently */
1031310313
/* TODO: this check may be not enough, because even
1031410314
* in the same it's possible to conditionally define
1031510315
* 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
1034510345
}
1034610346

1034710347
if (ce->info.user.filename != filename) {
10348-
/* class declaration might be changed infdependently */
10348+
/* class declaration might be changed independently */
1034910349
return 1;
1035010350
}
1035110351

@@ -11052,7 +11052,7 @@ static zend_bool zend_jit_var_supports_reg(zend_ssa *ssa, int var)
1105211052

1105311053
if (zend_jit_reg_alloc < ZEND_JIT_REG_ALLOC_GLOBAL) {
1105411054
/* Disable global register allocation,
11055-
* register allocation forSAA variables connected through Phi functions
11055+
* register allocation for SSA variables connected through Phi functions
1105611056
*/
1105711057
if (ssa->vars[var].definition_phi) {
1105811058
return 0;

0 commit comments

Comments
 (0)