8000 Immutable clases and op_arrays by dstogov · Pull Request #3608 · php/php-src · GitHub
[go: up one dir, main page]

Skip to content

Immutable clases and op_arrays #3608

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 11 commits into from
Prev Previous commit
Next Next commit
Merge branch 'master' into immutable
* master:
  Remove unused variable makefile_am_files
  Classify object handlers are required/optional
  Add support for getting SKIP_TAGSTART and SKIP_WHITE options
  Remove some obsolete config_vars.mk occurrences
  Remove bsd_converted from .gitignore
  Remove configuration parser and scanners ignores
  Remove obsolete buildconf.stamp from .gitignore
  [ci skip] Add magicdata.patch exception to .gitignore
  Remove outdated ext/spl/examples items from .gitignore
  Remove unused test.inc in ext/iconv/tests
  • Loading branch information
dstogov committed Oct 17, 2018
commit a06f0f3d3aba53e766046221ee44fb9720389ecc
27 changes: 25 additions & 2 deletions UPGRADING.INTERNALS
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ PHP 7.4 INTERNALS UPGRADE NOTES
d. Removed zend_check_private()
e. php_win32_error_to_msg() memory management
f. get_properties_for() handler / Z_OBJDEBUG_P
g. Immutable classes and op_arrays
g. Required object handlers
h. Immutable classes and op_arrays

2. Build system changes
a. Abstract
Expand Down Expand Up @@ -99,7 +100,29 @@ PHP 7.4 INTERNALS UPGRADE NOTES
// ...
zend_release_properties(ht);

g. Opcache may make classes and op_arrays immutable. Such classes are marked
g. The following object handlers are now required (must be non-NULL):

* free_obj
* dtor_obj
* read_property
* write_property
* read_dimension
* write_dimension
* get_property_ptr_ptr
* has_property
* unset_property
* has_dimension
* unset_dimension
* get_properties
* get_method
* get_constructor
* get_class_name
* get_gc

It is recommended to initialize object handler structures by copying the
std object handlers and only overwriting those you want to change.

h. Opcache may make classes and op_arrays immutable. Such classes are marked
by ZEND_ACC_IMMUTABLE flag, they are not going to be copied from opcache
shard memory to process memory and must not be modified at all.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: s/shard/shared

Few related data structures were changed to allow addressing mutable data
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.
0