com php-src: ZEND_COMPILE_GUARDS compiler option: Z end/zend_compile.c Zend/zend_compile.h

From: Date: Wed, 23 Sep 2015 13:33:57 +0000
Subject: com php-src: ZEND_COMPILE_GUARDS compiler option: Z end/zend_compile.c Zend/zend_compile.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-89134@lists.php.net to get a copy of this message
Commit: 1a5d6acff63c75b1fb933d4a7b32d073722cb6c5 Author: Joe Watkins <krakjoe@php.net> Sun, 20 Sep 2015 06:23:36 +0100 Committer: Bob Weinand <bobwei9@hotmail.com> Wed, 23 Sep 2015 15:33:57 +0200 Parents: 77b73c807107fa55433c43602d6514965fb8097d Branches: PHP-7.0 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1a5d6acff63c75b1fb933d4a7b32d073722cb6c5 Log: ZEND_COMPILE_GUARDS compiler option Changed paths: M Zend/zend_compile.c M Zend/zend_compile.h Diff: diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 1323dbc..2e98f10 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -1608,6 +1608,10 @@ ZEND_API void zend_initialize_class_data(zend_class_entry *ce, zend_bool nullify ce->refcount = 1; ce->ce_flags = ZEND_ACC_CONSTANTS_UPDATED; + if (CG(compiler_options) & ZEND_COMPILE_GUARDS) { + ce->ce_flags |= ZEND_ACC_USE_GUARDS; + } + ce->default_properties_table = NULL; ce->default_static_members_table = NULL; zend_hash_init_ex(&ce->properties_info, 8, NULL, (persistent_hashes ? zend_destroy_property_info_internal : NULL), persistent_hashes, 0); diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index dae8d17..06c7d02 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -1005,6 +1005,9 @@ END_EXTERN_C() /* generate ZEND_INIT_FCALL_BY_NAME for userland functions instead of ZEND_INIT_FCALL */ #define ZEND_COMPILE_IGNORE_USER_FUNCTIONS (1<<8) +/* force IS_OBJ_USE_GUARDS for all classes */ +#define ZEND_COMPILE_GUARDS (1<<9) + /* The default value for CG(compiler_options) */ #define ZEND_COMPILE_DEFAULT ZEND_COMPILE_HANDLE_OP_ARRAY

« previous php.cvs (#89134) next »