]> granicus.if.org Git - php/commitdiff
Fixed typos
authorPascal Borreli <pascal@borreli.com>
Mon, 11 Mar 2013 18:49:05 +0000 (18:49 +0000)
committerPascal Borreli <pascal@borreli.com>
Mon, 11 Mar 2013 18:49:05 +0000 (18:49 +0000)
12 files changed:
Optimizer/block_pass.c
Optimizer/optimize_temp_vars_5.c
Optimizer/pass1_5.c
Optimizer/pass2.c
Optimizer/zend_optimizer.h
ZendAccelerator.c
ZendAccelerator.h
zend_accelerator_hash.h
zend_accelerator_module.c
zend_accelerator_module.h
zend_accelerator_util_funcs.c
zend_persist.c

index a1fc760e73f3e986923f349d66a1d0b8542c5c58..3d4bb0c1d27320cbdbbf4b5814f4b1d9800125b5 100644 (file)
@@ -1,6 +1,6 @@
 #define DEBUG_BLOCKPASS 0
 
-/* Checks if a constant (like "true") may be relaced by its value */
+/* Checks if a constant (like "true") may be replaced by its value */
 static int zend_get_persistent_constant(char *name, uint name_len, zval *result, int copy TSRMLS_DC ELS_DC)
 {
        zend_constant *c;
@@ -167,7 +167,7 @@ static int find_code_blocks(zend_op_array *op_array, zend_cfg *cfg)
                        blocks[op_array->try_catch_array[i].try_op].protected = 1;
                }
        }
-       /* Currentrly, we don't optimize op_arrays with BRK/CONT/GOTO opcodes,
+       /* Currently, we don't optimize op_arrays with BRK/CONT/GOTO opcodes,
         * but, we have to keep brk_cont_array to avoid memory leaks during
         * exception handling */
        if (op_array->last_brk_cont) {
@@ -370,7 +370,7 @@ static inline void del_source(zend_code_block *from, zend_code_block *to)
                                /* move block to new location */
                                memmove(new_to, to->start_opline, sizeof(zend_op)*to->len);
                        }
-                       /* join blocks' lengthes */
+                       /* join blocks' lengths */
                        from_block->len += to->len;
                        /* move 'to'`s references to 'from' */
                        to->start_opline = NULL;
@@ -462,7 +462,7 @@ static void zend_rebuild_access_path(zend_cfg *cfg, zend_op_array *op_array, int
        zend_code_block *start = find_start? NULL : blocks;
        zend_code_block *b;
 
-       /* Mark all blocks as unaccessable and destroy back references */
+       /* Mark all blocks as unaccessible and destroy back references */
        b = blocks;
        while (b != NULL) {
                zend_block_source *cs;
@@ -480,10 +480,10 @@ static void zend_rebuild_access_path(zend_cfg *cfg, zend_op_array *op_array, int
                b = b->next;
        }
 
-       /* Walk thorough all pathes */
+       /* Walk thorough all paths */
        zend_access_path(start);
 
-       /* Add brk/cont pathes */
+       /* Add brk/cont paths */
        if (op_array->last_brk_cont) {
                int i;
                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
                }
        }
 
-       /* Add exception pathes */
+       /* Add exception paths */
        if (op_array->last_try_catch) {
                int i;
                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,
                                        VAR_SOURCE(opline->op1) &&
                                        VAR_SOURCE(opline->op1)->opcode == ZEND_INIT_STRING) {
                        /* convert T = INIT_STRING(), T = ADD_STRING(T, X) to T = QM_ASSIGN(X) */
-                       /* CHECKME: Remove ZEND_ADD_VAR optimizsation, since some conversions -
+                       /* CHECKME: Remove ZEND_ADD_VAR optimization, since some conversions -
                           namely, BOOL(false)->string - don't allocate memory but use empty_string
                           and ADD_CHAR fails */
                        zend_op *src = VAR_SOURCE(opline->op1);
index 976a7b21acc307d52411f24d8ff63b02db1d226c..dc630733faadd5559002ba684f51427f831adef2 100644 (file)
@@ -164,7 +164,7 @@ static void optimize_temporary_variables(zend_op_array *op_array)
                        opline->extended_value = NUM_VAR(map_T[currT]);
                }
 
-               /* Allocate OP_DATA->op2 after "opernds", but before "result" */
+               /* Allocate OP_DATA->op2 after "operands", but before "result" */
                if (opline->opcode == ZEND_ASSIGN_DIM &&
                    (opline + 1)->opcode == ZEND_OP_DATA &&
                    ZEND_OP2_TYPE(opline + 1) & (IS_VAR | IS_TMP_VAR)) {
index 7a69689fa7359402d532ab195628faea1f91fe77..8938e148ce5c69d30ebfe90369f61cd45080065a 100644 (file)
@@ -308,7 +308,7 @@ if (ZEND_OPTIMIZER_PASS_1 & OPTIMIZATION_LEVEL) {
                                        next_op++;
                                }
                                if (!((ZEND_OPTIMIZER_PASS_5|ZEND_OPTIMIZER_PASS_10) & OPTIMIZATION_LEVEL)) {
-                                       /* NOP removel is disabled => insert JMP over NOPs */
+                                       /* NOP removal is disabled => insert JMP over NOPs */
                                        if (last_op-opline >= 3) { /* If we have more than 2 NOPS then JMP over them */
                                                (opline + 1)->opcode = ZEND_JMP;
                                                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 */
index da56dcfa52d59e97e44a267ac7320f9d8a0b92a2..30708a0935baa6493ad30da1a85fbfa161fa1cea 100644 (file)
@@ -81,7 +81,7 @@ if (ZEND_OPTIMIZER_PASS_2 & OPTIMIZATION_LEVEL) {
                        case ZEND_JMPZ_EX:
                        case ZEND_JMPNZ_EX:
                                /* convert Ti = JMPZ_EX(Ti, L) to JMPZ(Ti, L) */
-                               if (0 && /* FIXME: temorary disable unsafe pattern */
+                               if (0 && /* FIXME: temporary disable unsafe pattern */
                                    ZEND_OP1_TYPE(opline) == IS_TMP_VAR &&
                                    ZEND_RESULT_TYPE(opline) == IS_TMP_VAR &&
                                    ZEND_OP1(opline).var == ZEND_RESULT(opline).var) {
index 0c0691687407aba85c774605eca966de7138063a..ff848535d30af797f53ea8b71487d09a16417c51 100644 (file)
@@ -26,7 +26,7 @@
 #include "zend_compile.h"\r
 \r
 #define ZEND_OPTIMIZER_PASS_1          (1<<0)   /* CSE, STRING construction     */\r
-#define ZEND_OPTIMIZER_PASS_2          (1<<1)   /* Constant conversion and jums */\r
+#define ZEND_OPTIMIZER_PASS_2          (1<<1)   /* Constant conversion and jumps */\r
 #define ZEND_OPTIMIZER_PASS_3          (1<<2)   /* ++, +=, series of jumps      */\r
 #define ZEND_OPTIMIZER_PASS_4          (1<<3)\r
 #define ZEND_OPTIMIZER_PASS_5          (1<<4)   /* CFG based optimization       */\r
index ed942265604e7826439a7d638e67135fca6333e3..e6029cf45434d91e2ce58a7c254df4d9577232ae 100644 (file)
@@ -176,7 +176,7 @@ static inline char* accel_getcwd(int *cwd_len TSRMLS_DC)
        }
 }
 
-/* O+ traks changes of "include_path" directive. It stores all the requested
+/* O+ tracks changes of "include_path" directive. It stores all the requested
  * values in ZCG(include_paths) shared hash table, current value in
  * ZCG(include_path)/ZCG(include_path_len) and one letter "path key" in
  * ZCG(include_path_key).
@@ -1315,7 +1315,7 @@ static zend_persistent_script *compile_and_cache_file(zend_file_handle *file_han
        efree(op_array); /* we have valid persistent_script, so it's safe to free op_array */
 
     /* Fill in the ping_auto_globals_mask for the new script. If jit for auto globals is enabled we
-       will have to ping the used auto global varaibles before execution */
+       will have to ping the used auto global variables before execution */
 #if ZEND_EXTENSION_API_NO > PHP_5_3_X_API_NO
        if (PG(auto_globals_jit)) {
 #else
@@ -1391,7 +1391,7 @@ static zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int
                if (!ZCG(key_len)) {
                        return accelerator_orig_compile_file(file_handle, type TSRMLS_CC);
                }
-               /* persistent script was already found by overrifen open() or
+               /* persistent script was already found by overridden open() or
                 * resolve_path() callbacks */
                persistent_script = ZCG(cache_persistent_script);
                key = ZCG(key);
@@ -1688,7 +1688,7 @@ static int persistent_stream_open_function(const char *filename, zend_file_handl
                                handle->free_filename = 0;
                                handle->opened_path = NULL;
 
-                           /* Check if requestd file already cached (by full name) */
+                           /* Check if requested file already cached (by full name) */
                            if (IS_ABSOLUTE_PATH(filename, filename_len) &&
                                    (persistent_script = zend_accel_hash_find(&ZCSG(hash), (char*)filename, filename_len + 1)) != NULL &&
                                    !persistent_script->corrupted) {
@@ -1702,7 +1702,7 @@ static int persistent_stream_open_function(const char *filename, zend_file_handl
                                        return SUCCESS;
                            }
 
-                           /* Check if requestd file already cached (by key) */
+                           /* Check if requested file already cached (by key) */
                                key = accel_make_persistent_key_ex(handle, filename_len, &key_length TSRMLS_CC);
                                if (!ZCG(accel_directives).revalidate_path &&
                                    key &&
@@ -1719,7 +1719,7 @@ static int persistent_stream_open_function(const char *filename, zend_file_handl
                                /* find the full real path */
                                resolved_path = accel_php_resolve_path(filename, filename_len, ZCG(include_path) TSRMLS_CC);
 
-                           /* Check if requestd file already cached (by real name) */
+                           /* Check if requested file already cached (by real name) */
                                if (resolved_path &&
                                    (bucket = zend_accel_hash_find_entry(&ZCSG(hash), resolved_path, strlen(resolved_path) + 1)) != NULL) {
 
@@ -1848,7 +1848,7 @@ static char* persistent_zend_resolve_path(const char *filename, int filename_len
                        zend_accel_hash_entry *bucket;
                        zend_persistent_script *persistent_script;
 
-                   /* Check if requestd file already cached (by full name) */
+                   /* Check if requested file already cached (by full name) */
                    if ((IS_ABSOLUTE_PATH(filename, filename_len) ||
                         is_stream_path(filename)) &&
                            (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
                                }
                    }
 
-                   /* Check if requestd file already cached (by key) */
+                   /* Check if requested file already cached (by key) */
                        handle.filename = (char*)filename;
                        handle.free_filename = 0;
                        handle.opened_path = NULL;
@@ -1881,7 +1881,7 @@ static char* persistent_zend_resolve_path(const char *filename, int filename_len
                        /* find the full real path */
                        resolved_path = accelerator_orig_zend_resolve_path(filename, filename_len TSRMLS_CC);
 
-                   /* Check if requestd file already cached (by real path) */
+                   /* Check if requested file already cached (by real path) */
                        if (resolved_path &&
                            (bucket = zend_accel_hash_find_entry(&ZCSG(hash), resolved_path, strlen(resolved_path) + 1)) != NULL) {
                                persistent_script = (zend_persistent_script *)bucket->data;
@@ -2354,7 +2354,7 @@ static int accel_startup(zend_extension *extension)
                return FAILURE;
        }
 
-       /* no supported SAPI found - disable acceleration and stop initalization */
+       /* no supported SAPI found - disable acceleration and stop initialization */
        if (accel_find_sapi(TSRMLS_C) == FAILURE) {
                accel_startup_ok = 0;
                if (!ZCG(accel_directives).enable_cli &&
@@ -2557,7 +2557,7 @@ void zend_accel_schedule_restart(TSRMLS_D)
 /* ensures it is OK to read SHM
        if it's not OK (restart in progress) returns FAILURE
        if OK returns SUCCESS
-       MUST call accelerator_shm_read_unlock after done lock operationss
+       MUST call accelerator_shm_read_unlock after done lock operations
 */
 int accelerator_shm_read_lock(TSRMLS_D)
 {
index 310605b878bb0269f18a9e1cf78e53c7ba0b4e63..87736ec839c7325b08d365e2b26a79d05b04ecff 100644 (file)
@@ -33,7 +33,7 @@
 /* 4 - works with the new Optimizer, that supports the file format with licenses */
 /* 5 - API 4 didn't really work with the license-enabled file format.  v5 does. */
 /* 6 - Monitor was removed from ZendPlatform.so, to a module of its own */
-/* 7 - Optimizer was embeded into Accelerator */
+/* 7 - Optimizer was embedded into Accelerator */
 /* 8 - Standalone Open Source OptimizerPlus */
 #define ACCELERATOR_API_NO 8
 
@@ -226,20 +226,20 @@ typedef struct _zend_accel_directives {
 } zend_accel_directives;
 
 typedef struct _zend_accel_globals {
-    /* copy of CG(function_table) used for compilation scripts into cashe */
-    /* imitially it contains only internal functions */
+    /* copy of CG(function_table) used for compilation scripts into cache */
+    /* initially it contains only internal functions */
        HashTable               function_table;
        int                     internal_functions_count;
-       int                     counted;   /* the process uses shatred memory */
+       int                     counted;   /* the process uses shared memory */
        zend_bool               enabled;
        zend_bool               locked;    /* thread obtained exclusive lock */
        HashTable               bind_hash; /* prototype and zval lookup table */
        zend_accel_directives   accel_directives;
        char                   *cwd;              /* current working directory or NULL */
-       int                     cwd_len;          /* "cwd" string lenght */
+       int                     cwd_len;          /* "cwd" string length */
        char                   *include_path_key; /* one letter key of current "include_path" */
-       char                   *include_path;     /* current settion of "include_path" directive */
-       int                     include_path_len; /* "include_path" string lenght */
+       char                   *include_path;     /* current section of "include_path" directive */
+       int                     include_path_len; /* "include_path" string length */
        int                     include_path_check;
        time_t                  request_time;
        /* preallocated shared-memory block to save current script */
index 4673a5e425a62c3ffaa9acf9773efbe1c210a8d5..a1a836c03c3f5e117d6db3309807793d479be44c 100644 (file)
@@ -36,7 +36,7 @@
        however, entries are still taken from the same 'hash_entries' array.
        'key' and 'data' passed to zend_accel_hash_update() must be already
        allocated in shared memory. Few keys may be resolved to the same data.
-       using 'indirect' emtries, that point to other entries ('data' is actually
+       using 'indirect' entries, that point to other entries ('data' is actually
        a pointer to another zend_accel_hash_entry).
        zend_accel_hash_update() requires exclusive lock, however,
        zend_accel_hash_find() does not.
index b3aac5f00277cc52e1e6cf79d0b902d8ac54b5f1..701820f228e2fa50e854c73fd45d10d76de04abd 100644 (file)
@@ -75,7 +75,7 @@ static ZEND_INI_MH(OnUpdateMemoryConsumption)
 
                memsize = 8;
                zend_accel_error(ACCEL_LOG_WARNING, "zend_optimizerplus.memory_consumption is set below the required 8MB.\n");
-               zend_accel_error(ACCEL_LOG_WARNING, ACCELERATOR_PRODUCT_NAME " will use the minimal 8MB cofiguration.\n");
+               zend_accel_error(ACCEL_LOG_WARNING, ACCELERATOR_PRODUCT_NAME " will use the minimal 8MB configuration.\n");
 
                if (zend_hash_find(EG(ini_directives),
                                        "zend_optimizerplus.memory_consumption",
@@ -116,13 +116,13 @@ static ZEND_INI_MH(OnUpdateMaxAcceleratedFiles)
                        size = MIN_ACCEL_FILES;
                        new_new_value = TOKENTOSTR(MIN_ACCEL_FILES);
                        zend_accel_error(ACCEL_LOG_WARNING, "zend_optimizerplus.max_accelerated_files is set below the required minimum (%d).\n", MIN_ACCEL_FILES);
-                       zend_accel_error(ACCEL_LOG_WARNING, ACCELERATOR_PRODUCT_NAME " will use the minimal cofiguration.\n");
+                       zend_accel_error(ACCEL_LOG_WARNING, ACCELERATOR_PRODUCT_NAME " will use the minimal configuration.\n");
                }
                if (size > MAX_ACCEL_FILES) {
                        size = MAX_ACCEL_FILES;
                        new_new_value = TOKENTOSTR(MAX_ACCEL_FILES);
                        zend_accel_error(ACCEL_LOG_WARNING, "zend_optimizerplus.max_accelerated_files is set above the limit (%d).\n", MAX_ACCEL_FILES);
-                       zend_accel_error(ACCEL_LOG_WARNING, ACCELERATOR_PRODUCT_NAME " will use the maximal cofiguration.\n");
+                       zend_accel_error(ACCEL_LOG_WARNING, ACCELERATOR_PRODUCT_NAME " will use the maximal configuration.\n");
                }
                if (zend_hash_find(EG(ini_directives),
                                        "zend_optimizerplus.max_accelerated_files",
@@ -158,7 +158,7 @@ static ZEND_INI_MH(OnUpdateMaxWastedPercentage)
                zend_ini_entry *ini_entry;
 
                percentage = 5;
-               zend_accel_error(ACCEL_LOG_WARNING, "zend_optimizerplus.max_wasted_percentage must be ser netweeb 1 and 50.\n");
+               zend_accel_error(ACCEL_LOG_WARNING, "zend_optimizerplus.max_wasted_percentage must be set between 1 and 50.\n");
                zend_accel_error(ACCEL_LOG_WARNING, ACCELERATOR_PRODUCT_NAME " will use 5%.\n");
                if (zend_hash_find(EG(ini_directives),
                                        "zend_optimizerplus.max_wasted_percentage",
@@ -506,7 +506,7 @@ static ZEND_FUNCTION(accelerator_get_status)
        add_assoc_double(statistics, "accelerator_hit_rate", reqs?(((double) ZCSG(hits))/reqs)*100.0:0);
        add_assoc_zval(return_value, "accelerator_statistics", statistics);
 
-       /* acceleratred scripts */
+       /* accelerated scripts */
        scripts = accelerator_get_scripts(TSRMLS_C);
        if (scripts) {
                add_assoc_zval(return_value, "scripts", scripts);
index 112ab0fc57141f865518dfbbf0ace3c79546a01e..5ac5716ca7ce2e43a1076511ed8cc82ba0f77f02 100644 (file)
@@ -19,7 +19,7 @@
    +----------------------------------------------------------------------+
 */
 
-#ifndef ZEND_ACCELERAROR_MODULE_H
+#ifndef ZEND_ACCELERATOR_MODULE_H
 #define ZEND_ACCELERATOR_MODULE_H
 
 int start_accel_module(void);
index 7c3c9ae86cc1a70911aaabe106b55718161e8b23..06299d8a0bf607173ff54fe99b6765b3aaa5f559 100644 (file)
@@ -77,7 +77,7 @@ zend_persistent_script* create_persistent_script(void)
        memset(persistent_script, 0, sizeof(zend_persistent_script));
 
        zend_hash_init(&persistent_script->function_table, 100, NULL, (dtor_func_t) zend_accel_destroy_zend_function, 0);
-       /* class_table is usualy destroyed by free_persistent_script() that
+       /* class_table is usually destroyed by free_persistent_script() that
         * overrides destructor. ZEND_CLASS_DTOR may be used by standard
         * PHP compiler
         */
index 9efd028e99b664748508e287db73aa797b06480f..6f9678e2850f44af430084f43267b844f5a6e3b5 100644 (file)
@@ -310,7 +310,7 @@ static void zend_persist_op_array_ex(zend_op_array *op_array, zend_persistent_sc
 #else /* if ZEND_EXTENSION_API_NO >= PHP_5_3_X_API_NO */
 
                        if (ZEND_DONE_PASS_TWO(op_array)) {
-                               /* fix jmps to point to new array */
+                               /* fix jumps to point to new array */
                                switch (opline->opcode) {
                                        case ZEND_JMP:
                                        case ZEND_GOTO: