Skip to content

Commit 4c55176

Browse files
committed
Fixed typos
1 parent d2f9804 commit 4c55176

12 files changed

+39
-39
lines changed

Optimizer/block_pass.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#define DEBUG_BLOCKPASS 0
22

3-
/* Checks if a constant (like "true") may be relaced by its value */
3+
/* Checks if a constant (like "true") may be replaced by its value */
44
static int zend_get_persistent_constant(char *name, uint name_len, zval *result, int copy TSRMLS_DC ELS_DC)
55
{
66
zend_constant *c;
@@ -167,7 +167,7 @@ static int find_code_blocks(zend_op_array *op_array, zend_cfg *cfg)
167167
blocks[op_array->try_catch_array[i].try_op].protected = 1;
168168
}
169169
}
170-
/* Currentrly, we don't optimize op_arrays with BRK/CONT/GOTO opcodes,
170+
/* Currently, we don't optimize op_arrays with BRK/CONT/GOTO opcodes,
171171
* but, we have to keep brk_cont_array to avoid memory leaks during
172172
* exception handling */
173173
if (op_array->last_brk_cont) {
@@ -370,7 +370,7 @@ static inline void del_source(zend_code_block *from, zend_code_block *to)
370370
/* move block to new location */
371371
memmove(new_to, to->start_opline, sizeof(zend_op)*to->len);
372372
}
373-
/* join blocks' lengthes */
373+
/* join blocks' lengths */
374374
from_block->len += to->len;
375375
/* move 'to'`s references to 'from' */
376376
to->start_opline = NULL;
@@ -462,7 +462,7 @@ static void zend_rebuild_access_path(zend_cfg *cfg, zend_op_array *op_array, int
462462
zend_code_block *start = find_start? NULL : blocks;
463463
zend_code_block *b;
464464

465-
/* Mark all blocks as unaccessable and destroy back references */
465+
/* Mark all blocks as unaccessible and destroy back references */
466466
b = blocks;
467467
while (b != NULL) {
468468
zend_block_source *cs;
@@ -480,10 +480,10 @@ static void zend_rebuild_access_path(zend_cfg *cfg, zend_op_array *op_array, int
480480
b = b->next;
481481
}
482482

483-
/* Walk thorough all pathes */
483+
/* Walk thorough all paths */
484484
zend_access_path(start);
485485

486-
/* Add brk/cont pathes */
486+
/* Add brk/cont paths */
487487
if (op_array->last_brk_cont) {
488488
int i;
489489
for (i=0; i< op_array->last_brk_cont; i++) {
@@ -493,7 +493,7 @@ static void zend_rebuild_access_path(zend_cfg *cfg, zend_op_array *op_array, int
493493
}
494494
}
495495

496-
/* Add exception pathes */
496+
/* Add exception paths */
497497
if (op_array->last_try_catch) {
498498
int i;
499499
for (i=0; i< op_array->last_try_catch; i++) {
@@ -998,7 +998,7 @@ static void zend_optimize_block(zend_code_block *block, zend_op_array *op_array,
998998
VAR_SOURCE(opline->op1) &&
999999
VAR_SOURCE(opline->op1)->opcode == ZEND_INIT_STRING) {
10001000
/* convert T = INIT_STRING(), T = ADD_STRING(T, X) to T = QM_ASSIGN(X) */
1001-
/* CHECKME: Remove ZEND_ADD_VAR optimizsation, since some conversions -
1001+
/* CHECKME: Remove ZEND_ADD_VAR optimization, since some conversions -
10021002
namely, BOOL(false)->string - don't allocate memory but use empty_string
10031003
and ADD_CHAR fails */
10041004
zend_op *src = VAR_SOURCE(opline->op1);

Optimizer/optimize_temp_vars_5.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ static void optimize_temporary_variables(zend_op_array *op_array)
164164
opline->extended_value = NUM_VAR(map_T[currT]);
165165
}
166166

167-
/* Allocate OP_DATA->op2 after "opernds", but before "result" */
167+
/* Allocate OP_DATA->op2 after "operands", but before "result" */
168168
if (opline->opcode == ZEND_ASSIGN_DIM &&
169169
(opline + 1)->opcode == ZEND_OP_DATA &&
170170
ZEND_OP2_TYPE(opline + 1) & (IS_VAR | IS_TMP_VAR)) {

Optimizer/pass1_5.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ if (ZEND_OPTIMIZER_PASS_1 & OPTIMIZATION_LEVEL) {
308308
next_op++;
309309
}
310310
if (!((ZEND_OPTIMIZER_PASS_5|ZEND_OPTIMIZER_PASS_10) & OPTIMIZATION_LEVEL)) {
311-
/* NOP removel is disabled => insert JMP over NOPs */
311+
/* NOP removal is disabled => insert JMP over NOPs */
312312
if (last_op-opline >= 3) { /* If we have more than 2 NOPS then JMP over them */
313313
(opline + 1)->opcode = ZEND_JMP;
314314
ZEND_OP1(opline + 1).opline_num = last_op - op_array->opcodes; /* that's OK even for ZE2, since opline_num's are resolved in pass 2 later */

Optimizer/pass2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ if (ZEND_OPTIMIZER_PASS_2 & OPTIMIZATION_LEVEL) {
8181
case ZEND_JMPZ_EX:
8282
case ZEND_JMPNZ_EX:
8383
/* convert Ti = JMPZ_EX(Ti, L) to JMPZ(Ti, L) */
84-
if (0 && /* FIXME: temorary disable unsafe pattern */
84+
if (0 && /* FIXME: temporary disable unsafe pattern */
8585
ZEND_OP1_TYPE(opline) == IS_TMP_VAR &&
8686
ZEND_RESULT_TYPE(opline) == IS_TMP_VAR &&
8787
ZEND_OP1(opline).var == ZEND_RESULT(opline).var) {

Optimizer/zend_optimizer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include "zend_compile.h"
2727

2828
#define ZEND_OPTIMIZER_PASS_1 (1<<0) /* CSE, STRING construction */
29-
#define ZEND_OPTIMIZER_PASS_2 (1<<1) /* Constant conversion and jums */
29+
#define ZEND_OPTIMIZER_PASS_2 (1<<1) /* Constant conversion and jumps */
3030
#define ZEND_OPTIMIZER_PASS_3 (1<<2) /* ++, +=, series of jumps */
3131
#define ZEND_OPTIMIZER_PASS_4 (1<<3)
3232
#define ZEND_OPTIMIZER_PASS_5 (1<<4) /* CFG based optimization */

ZendAccelerator.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ static inline char* accel_getcwd(int *cwd_len TSRMLS_DC)
176176
}
177177
}
178178

179-
/* O+ traks changes of "include_path" directive. It stores all the requested
179+
/* O+ tracks changes of "include_path" directive. It stores all the requested
180180
* values in ZCG(include_paths) shared hash table, current value in
181181
* ZCG(include_path)/ZCG(include_path_len) and one letter "path key" in
182182
* ZCG(include_path_key).
@@ -1315,7 +1315,7 @@ static zend_persistent_script *compile_and_cache_file(zend_file_handle *file_han
13151315
efree(op_array); /* we have valid persistent_script, so it's safe to free op_array */
13161316

13171317
/* Fill in the ping_auto_globals_mask for the new script. If jit for auto globals is enabled we
1318-
will have to ping the used auto global varaibles before execution */
1318+
will have to ping the used auto global variables before execution */
13191319
#if ZEND_EXTENSION_API_NO > PHP_5_3_X_API_NO
13201320
if (PG(auto_globals_jit)) {
13211321
#else
@@ -1391,7 +1391,7 @@ static zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int
13911391
if (!ZCG(key_len)) {
13921392
return accelerator_orig_compile_file(file_handle, type TSRMLS_CC);
13931393
}
1394-
/* persistent script was already found by overrifen open() or
1394+
/* persistent script was already found by overridden open() or
13951395
* resolve_path() callbacks */
13961396
persistent_script = ZCG(cache_persistent_script);
13971397
key = ZCG(key);
@@ -1688,7 +1688,7 @@ static int persistent_stream_open_function(const char *filename, zend_file_handl
16881688
handle->free_filename = 0;
16891689
handle->opened_path = NULL;
16901690

1691-
/* Check if requestd file already cached (by full name) */
1691+
/* Check if requested file already cached (by full name) */
16921692
if (IS_ABSOLUTE_PATH(filename, filename_len) &&
16931693
(persistent_script = zend_accel_hash_find(&ZCSG(hash), (char*)filename, filename_len + 1)) != NULL &&
16941694
!persistent_script->corrupted) {
@@ -1702,7 +1702,7 @@ static int persistent_stream_open_function(const char *filename, zend_file_handl
17021702
return SUCCESS;
17031703
}
17041704

1705-
/* Check if requestd file already cached (by key) */
1705+
/* Check if requested file already cached (by key) */
17061706
key = accel_make_persistent_key_ex(handle, filename_len, &key_length TSRMLS_CC);
17071707
if (!ZCG(accel_directives).revalidate_path &&
17081708
key &&
@@ -1719,7 +1719,7 @@ static int persistent_stream_open_function(const char *filename, zend_file_handl
17191719
/* find the full real path */
17201720
resolved_path = accel_php_resolve_path(filename, filename_len, ZCG(include_path) TSRMLS_CC);
17211721

1722-
/* Check if requestd file already cached (by real name) */
1722+
/* Check if requested file already cached (by real name) */
17231723
if (resolved_path &&
17241724
(bucket = zend_accel_hash_find_entry(&ZCSG(hash), resolved_path, strlen(resolved_path) + 1)) != NULL) {
17251725

@@ -1848,7 +1848,7 @@ static char* persistent_zend_resolve_path(const char *filename, int filename_len
18481848
zend_accel_hash_entry *bucket;
18491849
zend_persistent_script *persistent_script;
18501850

1851-
/* Check if requestd file already cached (by full name) */
1851+
/* Check if requested file already cached (by full name) */
18521852
if ((IS_ABSOLUTE_PATH(filename, filename_len) ||
18531853
is_stream_path(filename)) &&
18541854
(bucket = zend_accel_hash_find_entry(&ZCSG(hash), (char*)filename, filename_len + 1)) != NULL) {
@@ -1862,7 +1862,7 @@ static char* persistent_zend_resolve_path(const char *filename, int filename_len
18621862
}
18631863
}
18641864

1865-
/* Check if requestd file already cached (by key) */
1865+
/* Check if requested file already cached (by key) */
18661866
handle.filename = (char*)filename;
18671867
handle.free_filename = 0;
18681868
handle.opened_path = NULL;
@@ -1881,7 +1881,7 @@ static char* persistent_zend_resolve_path(const char *filename, int filename_len
18811881
/* find the full real path */
18821882
resolved_path = accelerator_orig_zend_resolve_path(filename, filename_len TSRMLS_CC);
18831883

1884-
/* Check if requestd file already cached (by real path) */
1884+
/* Check if requested file already cached (by real path) */
18851885
if (resolved_path &&
18861886
(bucket = zend_accel_hash_find_entry(&ZCSG(hash), resolved_path, strlen(resolved_path) + 1)) != NULL) {
18871887
persistent_script = (zend_persistent_script *)bucket->data;
@@ -2354,7 +2354,7 @@ static int accel_startup(zend_extension *extension)
23542354
return FAILURE;
23552355
}
23562356

2357-
/* no supported SAPI found - disable acceleration and stop initalization */
2357+
/* no supported SAPI found - disable acceleration and stop initialization */
23582358
if (accel_find_sapi(TSRMLS_C) == FAILURE) {
23592359
accel_startup_ok = 0;
23602360
if (!ZCG(accel_directives).enable_cli &&
@@ -2557,7 +2557,7 @@ void zend_accel_schedule_restart(TSRMLS_D)
25572557
/* ensures it is OK to read SHM
25582558
if it's not OK (restart in progress) returns FAILURE
25592559
if OK returns SUCCESS
2560-
MUST call accelerator_shm_read_unlock after done lock operationss
2560+
MUST call accelerator_shm_read_unlock after done lock operations
25612561
*/
25622562
int accelerator_shm_read_lock(TSRMLS_D)
25632563
{

ZendAccelerator.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
/* 4 - works with the new Optimizer, that supports the file format with licenses */
3434
/* 5 - API 4 didn't really work with the license-enabled file format. v5 does. */
3535
/* 6 - Monitor was removed from ZendPlatform.so, to a module of its own */
36-
/* 7 - Optimizer was embeded into Accelerator */
36+
/* 7 - Optimizer was embedded into Accelerator */
3737
/* 8 - Standalone Open Source OptimizerPlus */
3838
#define ACCELERATOR_API_NO 8
3939

@@ -226,20 +226,20 @@ typedef struct _zend_accel_directives {
226226
} zend_accel_directives;
227227

228228
typedef struct _zend_accel_globals {
229-
/* copy of CG(function_table) used for compilation scripts into cashe */
230-
/* imitially it contains only internal functions */
229+
/* copy of CG(function_table) used for compilation scripts into cache */
230+
/* initially it contains only internal functions */
231231
HashTable function_table;
232232
int internal_functions_count;
233-
int counted; /* the process uses shatred memory */
233+
int counted; /* the process uses shared memory */
234234
zend_bool enabled;
235235
zend_bool locked; /* thread obtained exclusive lock */
236236
HashTable bind_hash; /* prototype and zval lookup table */
237237
zend_accel_directives accel_directives;
238238
char *cwd; /* current working directory or NULL */
239-
int cwd_len; /* "cwd" string lenght */
239+
int cwd_len; /* "cwd" string length */
240240
char *include_path_key; /* one letter key of current "include_path" */
241-
char *include_path; /* current settion of "include_path" directive */
242-
int include_path_len; /* "include_path" string lenght */
241+
char *include_path; /* current section of "include_path" directive */
242+
int include_path_len; /* "include_path" string length */
243243
int include_path_check;
244244
time_t request_time;
245245
/* preallocated shared-memory block to save current script */

zend_accelerator_hash.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
however, entries are still taken from the same 'hash_entries' array.
3737
'key' and 'data' passed to zend_accel_hash_update() must be already
3838
allocated in shared memory. Few keys may be resolved to the same data.
39-
using 'indirect' emtries, that point to other entries ('data' is actually
39+
using 'indirect' entries, that point to other entries ('data' is actually
4040
a pointer to another zend_accel_hash_entry).
4141
zend_accel_hash_update() requires exclusive lock, however,
4242
zend_accel_hash_find() does not.

zend_accelerator_module.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ static ZEND_INI_MH(OnUpdateMemoryConsumption)
7575

7676
memsize = 8;
7777
zend_accel_error(ACCEL_LOG_WARNING, "zend_optimizerplus.memory_consumption is set below the required 8MB.\n");
78-
zend_accel_error(ACCEL_LOG_WARNING, ACCELERATOR_PRODUCT_NAME " will use the minimal 8MB cofiguration.\n");
78+
zend_accel_error(ACCEL_LOG_WARNING, ACCELERATOR_PRODUCT_NAME " will use the minimal 8MB configuration.\n");
7979

8080
if (zend_hash_find(EG(ini_directives),
8181
"zend_optimizerplus.memory_consumption",
@@ -116,13 +116,13 @@ static ZEND_INI_MH(OnUpdateMaxAcceleratedFiles)
116116
size = MIN_ACCEL_FILES;
117117
new_new_value = TOKENTOSTR(MIN_ACCEL_FILES);
118118
zend_accel_error(ACCEL_LOG_WARNING, "zend_optimizerplus.max_accelerated_files is set below the required minimum (%d).\n", MIN_ACCEL_FILES);
119-
zend_accel_error(ACCEL_LOG_WARNING, ACCELERATOR_PRODUCT_NAME " will use the minimal cofiguration.\n");
119+
zend_accel_error(ACCEL_LOG_WARNING, ACCELERATOR_PRODUCT_NAME " will use the minimal configuration.\n");
120120
}
121121
if (size > MAX_ACCEL_FILES) {
122122
size = MAX_ACCEL_FILES;
123123
new_new_value = TOKENTOSTR(MAX_ACCEL_FILES);
124124
zend_accel_error(ACCEL_LOG_WARNING, "zend_optimizerplus.max_accelerated_files is set above the limit (%d).\n", MAX_ACCEL_FILES);
125-
zend_accel_error(ACCEL_LOG_WARNING, ACCELERATOR_PRODUCT_NAME " will use the maximal cofiguration.\n");
125+
zend_accel_error(ACCEL_LOG_WARNING, ACCELERATOR_PRODUCT_NAME " will use the maximal configuration.\n");
126126
}
127127
if (zend_hash_find(EG(ini_directives),
128128
"zend_optimizerplus.max_accelerated_files",
@@ -158,7 +158,7 @@ static ZEND_INI_MH(OnUpdateMaxWastedPercentage)
158158
zend_ini_entry *ini_entry;
159159

160160
percentage = 5;
161-
zend_accel_error(ACCEL_LOG_WARNING, "zend_optimizerplus.max_wasted_percentage must be ser netweeb 1 and 50.\n");
161+
zend_accel_error(ACCEL_LOG_WARNING, "zend_optimizerplus.max_wasted_percentage must be set between 1 and 50.\n");
162162
zend_accel_error(ACCEL_LOG_WARNING, ACCELERATOR_PRODUCT_NAME " will use 5%.\n");
163163
if (zend_hash_find(EG(ini_directives),
164164
"zend_optimizerplus.max_wasted_percentage",
@@ -506,7 +506,7 @@ static ZEND_FUNCTION(accelerator_get_status)
506506
add_assoc_double(statistics, "accelerator_hit_rate", reqs?(((double) ZCSG(hits))/reqs)*100.0:0);
507507
add_assoc_zval(return_value, "accelerator_statistics", statistics);
508508

509-
/* acceleratred scripts */
509+
/* accelerated scripts */
510510
scripts = accelerator_get_scripts(TSRMLS_C);
511511
if (scripts) {
512512
add_assoc_zval(return_value, "scripts", scripts);

zend_accelerator_module.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
+----------------------------------------------------------------------+
2020
*/
2121

22-
#ifndef ZEND_ACCELERAROR_MODULE_H
22+
#ifndef ZEND_ACCELERATOR_MODULE_H
2323
#define ZEND_ACCELERATOR_MODULE_H
2424

2525
int start_accel_module(void);

zend_accelerator_util_funcs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ zend_persistent_script* create_persistent_script(void)
7777
memset(persistent_script, 0, sizeof(zend_persistent_script));
7878

7979
zend_hash_init(&persistent_script->function_table, 100, NULL, (dtor_func_t) zend_accel_destroy_zend_function, 0);
80-
/* class_table is usualy destroyed by free_persistent_script() that
80+
/* class_table is usually destroyed by free_persistent_script() that
8181
* overrides destructor. ZEND_CLASS_DTOR may be used by standard
8282
* PHP compiler
8383
*/

zend_persist.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ static void zend_persist_op_array_ex(zend_op_array *op_array, zend_persistent_sc
310310
#else /* if ZEND_EXTENSION_API_NO >= PHP_5_3_X_API_NO */
311311

312312
if (ZEND_DONE_PASS_TWO(op_array)) {
313-
/* fix jmps to point to new array */
313+
/* fix jumps to point to new array */
314314
switch (opline->opcode) {
315315
case ZEND_JMP:
316316
case ZEND_GOTO:

0 commit comments

Comments
 (0)