Skip to content

Commit a5f7821

Browse files
authored
Fix typos in opcache code comments, tests (#7794)
1 parent 98c4a42 commit a5f7821

File tree

11 files changed

+37
-37
lines changed

11 files changed

+37
-37
lines changed

ext/opcache/ZendAccelerator.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2349,7 +2349,7 @@ static zend_class_entry* zend_accel_inheritance_cache_add(zend_class_entry *ce,
23492349
zend_map_ptr_extend(ZCSG(map_ptr_last));
23502350
return entry->ce;
23512351
}
2352-
ZEND_ASSERT(0); // entry = entry->next; // This shouldn't be posible ???
2352+
ZEND_ASSERT(0); // entry = entry->next; // This shouldn't be possible ???
23532353
}
23542354
}
23552355

@@ -3515,7 +3515,7 @@ static void preload_restart(void)
35153515
}
35163516

35173517
static size_t preload_try_strip_filename(zend_string *filename) {
3518-
/*FIXME: better way to hanlde eval()'d code? see COMPILED_STRING_DESCRIPTION_FORMAT */
3518+
/*FIXME: better way to handle eval()'d code? see COMPILED_STRING_DESCRIPTION_FORMAT */
35193519
if (ZSTR_LEN(filename) > sizeof(" eval()'d code")
35203520
&& *(ZSTR_VAL(filename) + ZSTR_LEN(filename) - sizeof(" eval()'d code")) == ':') {
35213521
const char *cfilename = ZSTR_VAL(filename);

ext/opcache/jit/vtune/jitprofiling.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ typedef enum _iJIT_IsProfilingActiveFlags
316316
*/
317317
typedef struct _LineNumberInfo
318318
{
319-
unsigned int Offset; /**<\brief Offset from the begining of the code region. */
319+
unsigned int Offset; /**<\brief Offset from the beginning of the code region. */
320320
unsigned int LineNumber; /**<\brief Matching source line number offset (from beginning of source file). */
321321

322322
} *pLineNumberInfo, LineNumberInfo;
@@ -670,7 +670,7 @@ unsigned int JITAPI iJIT_GetNewMethodID(void);
670670
iJIT_IsProfilingActiveFlags JITAPI iJIT_IsProfilingActive(void);
671671

672672
/**
673-
* @brief Reports infomation about JIT-compiled code to the agent.
673+
* @brief Reports information about JIT-compiled code to the agent.
674674
*
675675
* The reported information is used to attribute samples obtained from any
676676
* Intel(R) VTune(TM) Amplifier collector. This API needs to be called

ext/opcache/jit/zend_jit.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
#define ZEND_JIT_DEBUG_TRACE_TSSA (1<<19)
7676
#define ZEND_JIT_DEBUG_TRACE_EXIT_INFO (1<<20)
7777

78-
#define ZEND_JIT_DEBUG_PERSISTENT 0x1f0 /* profile and debbuger flags can't be changed at run-time */
78+
#define ZEND_JIT_DEBUG_PERSISTENT 0x1f0 /* profile and debugger flags can't be changed at run-time */
7979

8080
#define ZEND_JIT_TRACE_MAX_LENGTH 1024 /* max length of single trace */
8181
#define ZEND_JIT_TRACE_MAX_EXITS 512 /* max number of side exits per trace */

ext/opcache/jit/zend_jit_arm64.dasc

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,7 +1106,7 @@ static bool logical_immediate_p(uint64_t value, uint32_t reg_size)
11061106
| // In x64, if the range of this LONG value can be represented via INT type, only move the low 32 bits into dst_addr.
11071107
| // Note that imm32 is signed extended to 64 bits during mov.
11081108
| // In aarch64, we choose to handle both cases in the same way. Even though 4 mov's are used for 64-bit value and 2 mov's are
1109-
| // needed for 32-bit value, an extra ext insn is needed for 32-bit vlaue.
1109+
| // needed for 32-bit value, an extra ext insn is needed for 32-bit value.
11101110
| SET_ZVAL_LVAL dst_addr, Z_LVAL_P(zv), Rx(tmp_reg1), Rx(tmp_reg2)
11111111
|| }
11121112
|| }
@@ -1794,7 +1794,7 @@ static int zend_jit_interrupt_handler_stub(dasm_State **Dst)
17941794
| ldp x29, x30, [sp], # SPAD // stack alignment
17951795
| JMP_IP TMP1
17961796
} else {
1797-
| ldp FP, RX, T2 // retore FP and IP
1797+
| ldp FP, RX, T2 // restore FP and IP
17981798
| ldp x29, x30, [sp], # NR_SPAD // stack alignment
17991799
| mov RETVALx, #1 // ZEND_VM_ENTER
18001800
| ret
@@ -1821,7 +1821,7 @@ static int zend_jit_exception_handler_stub(dasm_State **Dst)
18211821
} else {
18221822
| mov FCARG1x, FP
18231823
| EXT_CALL handler, REG0
1824-
| ldp FP, RX, T2 // retore FP and IP
1824+
| ldp FP, RX, T2 // restore FP and IP
18251825
| ldp x29, x30, [sp], # NR_SPAD // stack alignment
18261826
| tbnz RETVALw, #31, >1
18271827
| mov RETVALw, #1 // ZEND_VM_ENTER
@@ -1909,7 +1909,7 @@ static int zend_jit_leave_function_stub(dasm_State **Dst)
19091909
| ldp x29, x30, [sp], # SPAD // stack alignment
19101910
} else {
19111911
| mov FCARG2x, FP
1912-
| ldp FP, RX, T2 // retore FP and IP
1912+
| ldp FP, RX, T2 // restore FP and IP
19131913
| ldp x29, x30, [sp], # NR_SPAD // stack alignment
19141914
}
19151915
| TST_32_WITH_CONST FCARG1w, ZEND_CALL_TOP, TMP1w
@@ -1947,7 +1947,7 @@ static int zend_jit_leave_throw_stub(dasm_State **Dst)
19471947
|5:
19481948
| // opline = EG(exception_op);
19491949
| LOAD_IP_ADDR_ZTS executor_globals, exception_op, TMP2
1950-
| ldp FP, RX, T2 // retore FP and IP
1950+
| ldp FP, RX, T2 // restore FP and IP
19511951
| ldp x29, x30, [sp], # NR_SPAD // stack alignment
19521952
| mov RETVALx, #2 // ZEND_VM_LEAVE
19531953
| ret
@@ -2418,7 +2418,7 @@ static int zend_jit_trace_halt_stub(dasm_State **Dst)
24182418
| mov IP, xzr // PC must be zero
24192419
| ret
24202420
} else {
2421-
| ldp FP, RX, T2 // retore FP and IP
2421+
| ldp FP, RX, T2 // restore FP and IP
24222422
| ldp x29, x30, [sp], # NR_SPAD // stack alignment
24232423
| movn RETVALx, #0 // ZEND_VM_RETURN (-1)
24242424
| ret
@@ -2492,7 +2492,7 @@ static int zend_jit_trace_exit_stub(dasm_State **Dst)
24922492
| ldp x29, x30, [sp], # SPAD // stack alignment
24932493
| JMP_IP TMP1
24942494
} else {
2495-
| ldp FP, RX, T2 // retore FP and IP
2495+
| ldp FP, RX, T2 // restore FP and IP
24962496
| ldp x29, x30, [sp], # NR_SPAD // stack alignment
24972497
| mov RETVALx, #1 // ZEND_VM_ENTER
24982498
| ret
@@ -2536,7 +2536,7 @@ static int zend_jit_trace_exit_stub(dasm_State **Dst)
25362536
| tst RETVALw, RETVALw
25372537
| blt ->trace_halt
25382538
|
2539-
| ldp FP, RX, T2 // retore FP and IP
2539+
| ldp FP, RX, T2 // restore FP and IP
25402540
| ldp x29, x30, [sp], # NR_SPAD // stack alignment
25412541
| mov RETVALx, #1 // ZEND_VM_ENTER
25422542
| ret
@@ -2556,7 +2556,7 @@ static int zend_jit_trace_escape_stub(dasm_State **Dst)
25562556
| ldp x29, x30, [sp], # SPAD // stack alignment
25572557
| JMP_IP, TMP1
25582558
} else {
2559-
| ldp FP, RX, T2 // retore FP and IP
2559+
| ldp FP, RX, T2 // restore FP and IP
25602560
| ldp x29, x30, [sp], # NR_SPAD // stack alignment
25612561
| mov RETVALx, #1 // ZEND_VM_ENTER
25622562
| ret
@@ -3038,7 +3038,7 @@ static int zend_jit_patch(const void *code, size_t size, uint32_t jmp_table_size
30383038
if (((ins ^ (uint32_t)delta) & 0x01ffffffu) == 0) {
30393039
delta = (uint32_t*)to_addr - ins_ptr;
30403040
if (((delta + 0x02000000) >> 26) != 0) {
3041-
abort(); // brnach target out of range
3041+
abort(); // branch target out of range
30423042
}
30433043
*ins_ptr = (ins & 0xfc000000u) | ((uint32_t)delta & 0x03ffffffu);
30443044
ret++;
@@ -3056,10 +3056,10 @@ static int zend_jit_patch(const void *code, size_t size, uint32_t jmp_table_size
30563056
if (veneer) {
30573057
delta = (uint32_t*)veneer - ins_ptr;
30583058
if (((delta + 0x40000) >> 19) != 0) {
3059-
abort(); // brnach target out of range
3059+
abort(); // branch target out of range
30603060
}
30613061
} else {
3062-
abort(); // brnach target out of range
3062+
abort(); // branch target out of range
30633063
}
30643064
}
30653065
*ins_ptr = (ins & 0xff00001fu) | (((uint32_t)delta & 0x7ffffu) << 5);
@@ -3074,10 +3074,10 @@ static int zend_jit_patch(const void *code, size_t size, uint32_t jmp_table_size
30743074
if (veneer) {
30753075
delta = (uint32_t*)veneer - ins_ptr;
30763076
if (((delta + 0x2000) >> 14) != 0) {
3077-
abort(); // brnach target out of range
3077+
abort(); // branch target out of range
30783078
}
30793079
} else {
3080-
abort(); // brnach target out of range
3080+
abort(); // branch target out of range
30813081
}
30823082
}
30833083
*ins_ptr = (ins & 0xfff8001fu) | (((uint32_t)delta & 0x3fffu) << 5);
@@ -3169,7 +3169,7 @@ static int zend_jit_trace_return(dasm_State **Dst, bool original_handler, const
31693169
| ldr REG0, [IP, REG0]
31703170
| blr REG0
31713171
}
3172-
| ldp FP, RX, T2 // retore FP and IP
3172+
| ldp FP, RX, T2 // restore FP and IP
31733173
| ldp x29, x30, [sp], # NR_SPAD // stack alignment
31743174
if (!original_handler || !opline ||
31753175
(opline->opcode != ZEND_RETURN
@@ -3452,7 +3452,7 @@ static int zend_jit_tail_handler(dasm_State **Dst, const zend_op *opline)
34523452
| ldp x29, x30, [sp], # SPAD // stack alignment
34533453
} else {
34543454
| mov FCARG1x, FP
3455-
| ldp FP, RX, T2 // retore FP and IP
3455+
| ldp FP, RX, T2 // restore FP and IP
34563456
| ldp x29, x30, [sp], # NR_SPAD // stack alignment
34573457
}
34583458
| EXT_JMP handler, REG0
@@ -4972,7 +4972,7 @@ static int zend_jit_concat_helper(dasm_State **Dst,
49724972
}
49734973
| LOAD_ZVAL_ADDR FCARG2x, op2_addr
49744974
| EXT_CALL zend_jit_fast_assign_concat_helper, REG0
4975-
/* concatination with itself may reduce refcount */
4975+
/* concatenation with itself may reduce refcount */
49764976
op2_info |= MAY_BE_RC1;
49774977
} else {
49784978
if (Z_REG(res_addr) != ZREG_FCARG1 || Z_OFFSET(res_addr) != 0) {
@@ -4986,7 +4986,7 @@ static int zend_jit_concat_helper(dasm_State **Dst,
49864986
| EXT_CALL zend_jit_fast_concat_tmp_helper, REG0
49874987
}
49884988
}
4989-
/* concatination with empty string may increase refcount */
4989+
/* concatenation with empty string may increase refcount */
49904990
op2_info |= MAY_BE_RCN;
49914991
| FREE_OP op2_type, op2, op2_info, 0, opline, ZREG_TMP1, ZREG_TMP2
49924992
|5:
@@ -5011,7 +5011,7 @@ static int zend_jit_concat_helper(dasm_State **Dst,
50115011
| LOAD_ZVAL_ADDR CARG3, op2_addr
50125012
| SET_EX_OPLINE opline, REG0
50135013
| EXT_CALL concat_function, REG0
5014-
/* concatination with empty string may increase refcount */
5014+
/* concatenation with empty string may increase refcount */
50155015
op1_info |= MAY_BE_RCN;
50165016
op2_info |= MAY_BE_RCN;
50175017
| FREE_OP op1_type, op1, op1_info, 0, NULL, ZREG_TMP1, ZREG_TMP2
@@ -9528,7 +9528,7 @@ static int zend_jit_do_fcall(dasm_State **Dst, const zend_op *opline, const zend
95289528
| ldp x29, x30, [sp], # SPAD // stack alignment
95299529
| JMP_IP TMP1
95309530
} else {
9531-
| ldp FP, RX, T2 // retore FP and IP
9531+
| ldp FP, RX, T2 // restore FP and IP
95329532
| ldp x29, x30, [sp], # NR_SPAD // stack alignment
95339533
| mov RETVALx, #1 // ZEND_VM_ENTER
95349534
| ret
@@ -10865,7 +10865,7 @@ static int zend_jit_leave_func(dasm_State **Dst,
1086510865
// the value of execute_data in execute_ex()
1086610866
| NIY // TODO
1086710867
#else
10868-
| ldp FP, RX, T2 // retore FP and IP
10868+
| ldp FP, RX, T2 // restore FP and IP
1086910869
| ldp x29, x30, [sp], # NR_SPAD // stack alignment
1087010870
| mov RETVALx, #2 // ZEND_VM_LEAVE ????
1087110871
| ret
@@ -14832,7 +14832,7 @@ static bool zend_jit_fetch_indirect_var(dasm_State **Dst, const zend_op *opline,
1483214832
| IF_NOT_ZVAL_TYPE var_addr, IS_INDIRECT, &exit_addr, ZREG_TMP1
1483314833
| GET_ZVAL_PTR FCARG1x, var_addr, TMP1
1483414834
} else {
14835-
/* May be already loaded into FCARG1a or RAX by previus FETCH_OBJ_W/DIM_W */
14835+
/* May be already loaded into FCARG1a or RAX by previous FETCH_OBJ_W/DIM_W */
1483614836
if (opline->op1_type != IS_VAR ||
1483714837
(opline-1)->result_type != IS_VAR ||
1483814838
(opline-1)->result.var != opline->op1.var ||

ext/opcache/jit/zend_jit_trace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7854,7 +7854,7 @@ int ZEND_FASTCALL zend_jit_trace_exit(uint32_t exit_num, zend_jit_registers_buf
78547854
zend_jit_trace_info *t = &zend_jit_traces[trace_num];
78557855
int repeat_last_opline = 0;
78567856

7857-
/* Deoptimizatoion of VM stack state */
7857+
/* Deoptimization of VM stack state */
78587858
uint32_t i;
78597859
uint32_t stack_size = t->exit_info[exit_num].stack_size;
78607860
zend_jit_trace_stack *stack = t->stack_map + t->exit_info[exit_num].stack_offset;

ext/opcache/jit/zend_jit_x86.dasc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5425,7 +5425,7 @@ static int zend_jit_concat_helper(dasm_State **Dst,
54255425
}
54265426
| LOAD_ZVAL_ADDR FCARG2a, op2_addr
54275427
| EXT_CALL zend_jit_fast_assign_concat_helper, r0
5428-
/* concatination with itself may reduce refcount */
5428+
/* concatenation with itself may reduce refcount */
54295429
op2_info |= MAY_BE_RC1;
54305430
} else {
54315431
if (Z_REG(res_addr) != ZREG_FCARG1 || Z_OFFSET(res_addr) != 0) {
@@ -5447,7 +5447,7 @@ static int zend_jit_concat_helper(dasm_State **Dst,
54475447
| add r4, 12
54485448
|.endif
54495449
}
5450-
/* concatination with empty string may increase refcount */
5450+
/* concatenation with empty string may increase refcount */
54515451
op2_info |= MAY_BE_RCN;
54525452
| FREE_OP op2_type, op2, op2_info, 0, opline
54535453
|5:
@@ -5481,7 +5481,7 @@ static int zend_jit_concat_helper(dasm_State **Dst,
54815481
|.if not(X64)
54825482
| add r4, 12
54835483
|.endif
5484-
/* concatination with empty string may increase refcount */
5484+
/* concatenation with empty string may increase refcount */
54855485
op1_info |= MAY_BE_RCN;
54865486
op2_info |= MAY_BE_RCN;
54875487
| FREE_OP op1_type, op1, op1_info, 0, NULL
@@ -15700,7 +15700,7 @@ static bool zend_jit_fetch_indirect_var(dasm_State **Dst, const zend_op *opline,
1570015700
| IF_NOT_ZVAL_TYPE var_addr, IS_INDIRECT, &exit_addr
1570115701
| GET_ZVAL_PTR FCARG1a, var_addr
1570215702
} else {
15703-
/* May be already loaded into FCARG1a or RAX by previus FETCH_OBJ_W/DIM_W */
15703+
/* May be already loaded into FCARG1a or RAX by previous FETCH_OBJ_W/DIM_W */
1570415704
if (opline->op1_type != IS_VAR ||
1570515705
(opline-1)->result_type != IS_VAR ||
1570615706
(opline-1)->result.var != opline->op1.var ||

ext/opcache/tests/jit/and_001.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
JIT BW_AND: 001 (emty string)
2+
JIT BW_AND: 001 (empty string)
33
--INI--
44
opcache.enable=1
55
opcache.enable_cli=1

ext/opcache/tests/jit/assign_045.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
JIT ASSIGN: incorrect assumption about in-memeory zval type
2+
JIT ASSIGN: incorrect assumption about in-memory zval type
33
--INI--
44
opcache.enable=1
55
opcache.enable_cli=1

ext/opcache/tests/jit/assign_046.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
JIT ASSIGN: incorrect assumption about in-memeory zval type
2+
JIT ASSIGN: incorrect assumption about in-memory zval type
33
--INI--
44
opcache.enable=1
55
opcache.enable_cli=1

ext/opcache/tests/jit/assign_dim_op_006.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
JIT ASSIGN_DIM_OP 006: Cloberring array be user error handler
2+
JIT ASSIGN_DIM_OP 006: Clobbering array be user error handler
33
--INI--
44
opcache.enable=1
55
opcache.enable_cli=1

ext/opcache/tests/jit/fetch_r_001.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
FETCH_R: 001 result reference counter may be decremented befor use
2+
FETCH_R: 001 result reference counter may be decremented before use
33
--INI--
44
opcache.enable=1
55
opcache.enable_cli=1

0 commit comments

Comments
 (0)