]> granicus.if.org Git - php/commitdiff
Drop useless zend_accel_script_persistable() function
authorGeorge Peter Banyard <girgias@php.net>
Thu, 16 Jul 2020 19:07:01 +0000 (21:07 +0200)
committerGeorge Peter Banyard <girgias@php.net>
Fri, 17 Jul 2020 15:00:42 +0000 (17:00 +0200)
ext/opcache/ZendAccelerator.c
ext/opcache/zend_persist.c
ext/opcache/zend_persist.h

index 120ba002899d801211efd03dc8e044630ab07b5b..6f3ff1ceadc5236002f5474bd77a7df9a8a79fa3 100644 (file)
@@ -1415,11 +1415,6 @@ static zend_persistent_script *cache_script_in_file_cache(zend_persistent_script
 {
        uint32_t orig_compiler_options;
 
-       /* Check if script may be stored in shared memory */
-       if (!zend_accel_script_persistable(new_persistent_script)) {
-               return new_persistent_script;
-       }
-
        orig_compiler_options = CG(compiler_options);
        CG(compiler_options) |= ZEND_COMPILE_WITH_FILE_CACHE;
        if (!zend_optimize_script(&new_persistent_script->script, ZCG(accel_directives).optimization_level, ZCG(accel_directives).opt_debug_level)) {
@@ -1438,11 +1433,6 @@ static zend_persistent_script *cache_script_in_shared_memory(zend_persistent_scr
        uint32_t memory_used;
        uint32_t orig_compiler_options;
 
-       /* Check if script may be stored in shared memory */
-       if (!zend_accel_script_persistable(new_persistent_script)) {
-               return new_persistent_script;
-       }
-
        orig_compiler_options = CG(compiler_options);
        if (ZCG(accel_directives).file_cache) {
                CG(compiler_options) |= ZEND_COMPILE_WITH_FILE_CACHE;
index f4400b07d4d3cdae2d1ed45bbb672b07a47607a4..1b2db5f69a034a2df3dad0ff529b4e5019ee1b1a 100644 (file)
@@ -1241,8 +1241,3 @@ zend_persistent_script *zend_accel_script_persist(zend_persistent_script *script
 
        return script;
 }
-
-int zend_accel_script_persistable(zend_persistent_script *script)
-{
-       return 1;
-}
index 78b6b0f6d9a099f30a7b85e4c439b3e2ee6cf195..d5eca3f19570a1a096cf7d643e8418be7ab34f0d 100644 (file)
@@ -22,7 +22,6 @@
 #ifndef ZEND_PERSIST_H
 #define ZEND_PERSIST_H
 
-int zend_accel_script_persistable(zend_persistent_script *script);
 uint32_t zend_accel_script_persist_calc(zend_persistent_script *script, const char *key, unsigned int key_length, int for_shm);
 zend_persistent_script *zend_accel_script_persist(zend_persistent_script *script, const char **key, unsigned int key_length, int for_shm);