Dmitry Stogov
4474cf43e6
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fixed bug #77613 (method visibility change) (reverted ZEND_ACC_CTOR and ZEND_ACC_DTOR flags removal)
2019-02-14 13:18:45 +03:00
Dmitry Stogov
43a7d95016
Fixed bug #77613 (method visibility change) (reverted ZEND_ACC_CTOR and ZEND_ACC_DTOR flags removal)
2019-02-14 13:12:50 +03:00
Dmitry Stogov
f45e0ce928
Remove ZEND_OVERLOADED_FUNCTION and corresponding call_method object handler
2019-02-07 21:05:46 +03:00
Dmitry Stogov
91ef4124e5
Refactor zend_object_handlers API to pass zend_object* and zend_string* insted of zval(s).
2019-02-04 13:20:25 +03:00
Peter Kokot
623911f993
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Remove local variables
2019-02-03 21:23:18 +01:00
Peter Kokot
92ac598aab
Remove local variables
...
This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.
A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.
This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.
With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.
Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files. All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.
2019-02-03 21:03:00 +01:00
Nikita Popov
e93bbf4d5d
Remove more leftovers from invalid static calls
...
Callbacks are now always valid or not valid, there is no in-between.
2019-01-30 13:13:47 +01:00
Zeev Suraski
a81202ac49
Adios, yearly copyright ranges
2019-01-30 11:48:28 +01:00
Zeev Suraski
02557f87bc
Adios, yearly copyright ranges
2019-01-30 11:23:29 +02:00
Nikita Popov
6c73b50cf6
Remove static calls to non-static methods
2019-01-30 09:19:02 +01:00
Nikita Popov
682b54f687
Remove support for legacy constructors
...
This has been deprecated in PHP 7.0 by
https://wiki.php.net/rfc/remove_php4_constructors .
2019-01-29 13:04:20 +01:00
Dmitry Stogov
fd41b99d58
Merge branch 'PHP-7.3'
...
* PHP-7.3:
Fixed bug #77494 (Disabling class causes segfault on member access)
2019-01-24 13:08:00 +03:00
Dmitry Stogov
aa9a8dbda3
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Fixed bug #77494 (Disabling class causes segfault on member access)
2019-01-24 13:07:31 +03:00
Dmitry Stogov
73f222d722
Fixed bug #77494 (Disabling class causes segfault on member access)
2019-01-24 13:06:36 +03:00
Dmitry Stogov
e6182bd4ea
Improved ZEND_TRY_ASSIGN... API to avoid unnecessary double copying and reduce code bloat.
2019-01-18 00:53:48 +03:00
Nikita Popov
e219ec144e
Implement typed properties
...
RFC: https://wiki.php.net/rfc/typed_properties_v2
This is a squash of PR #3734 , which is a squash of PR #3313 .
Co-authored-by: Bob Weinand <bobwei9@hotmail.com>
Co-authored-by: Joe Watkins <krakjoe@php.net>
Co-authored-by: Dmitry Stogov <dmitry@zend.com>
2019-01-11 15:49:06 +01:00
Dmitry Stogov
493f830355
Reuse add_property_zval_ex() instead of code duplication
2018-12-19 17:24:56 +03:00
Dmitry Stogov
d356f6d72b
Removed add_get_assoc_*() and add_get_index_*() API functions
2018-12-19 16:47:48 +03:00
Dmitry Stogov
85e1df6fdc
Replace add_index_zval() and add_next_index_zval() functions by macros
2018-12-19 16:43:38 +03:00
Dmitry Stogov
cec091176c
Replace zend_hash_apply... with ZEND_HASH_FOREACH...
2018-12-19 02:49:56 +03:00
Zeev Suraski
9afce019e0
Future-proof email addresses
2018-11-01 18:35:32 +02:00
Zeev Suraski
54dc07f3dc
Update email addresses. We're still @Zend, but future proofing it...
2018-11-01 17:20:07 +02:00
Dmitry Stogov
6f91090f6a
Inlining in the most frequently used code paths
2018-10-23 12:46:44 +03:00
Dmitry Stogov
d57cd36e47
Immutable clases and op_arrays.
...
Squashed commit of the following:
commit cd0c36c3f9
Merge: 4740dabb84
ad6738e886
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Oct 17 14:43:38 2018 +0300
Merge branch 'master' into immutable
* master:
Remove the "auto" encoding
Fixed bug #77025
Add vtbls for EUC-TW encoding
commit 4740dabb84
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Oct 17 14:12:28 2018 +0300
Reverted back ce->iterator_funcs_ptr. Initialize ce->iterator_funcs_ptr fields in immutable classes.
commit ad7a78b253
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Oct 17 11:46:30 2018 +0300
Added comment
commit 0276ea5187
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Oct 17 11:42:43 2018 +0300
Added type cast
commit c63fc5d5f1
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Oct 17 11:36:51 2018 +0300
Moved static class members initialization into the proper place.
commit b945548e93
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Oct 17 11:21:03 2018 +0300
Removed redundand assertion
commit d5a4108840
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Oct 17 11:19:13 2018 +0300
Removed duplicate code
commit 8dadca8864
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Oct 17 11:05:43 2018 +0300
Hide offset encoding magic in ZEND_MAP_PTR_IS_OFFSET(), ZEND_MAP_PTR_OFFSET2PTR() and ZEND_MAP_PTR_PTR2OFFSET() macros.
commit 9ef07c88bd
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Oct 17 10:48:29 2018 +0300
typo
commit a06f0f3d3a
Merge: 94099586ec
3412345ffe
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Oct 17 10:47:07 2018 +0300
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
commit 94099586ec
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon Oct 15 23:34:01 2018 +0300
Immutable clases and op_arrays
2018-10-17 15:52:50 +03:00
Nikita Popov
1cfbb21790
Classify object handlers are required/optional
2018-10-16 20:53:59 +02:00
Peter Kokot
902d39a3a7
Trim trailing whitespace in source code files
2018-10-13 14:14:50 +02:00
Dmitry Stogov
a2e8334613
Allocate only necessary space for static properties of internal classes in ZTS mode.
2018-10-01 19:05:31 +03:00
Dmitry Stogov
b634ded197
Class constants and default property values can't be IS_REFERENCE anymore.
2018-09-18 18:46:10 +03:00
Dmitry Stogov
689c6fb188
Replace ZEND_ACC_ANON_BOUND, ZEND_ACC_UNRESOLVED_PARENT and ZEND_ACC_UNRESOLVED_INTERFACES with single ZEND_ACC_LINKED.
2018-09-18 11:41:40 +03:00
Peter Kokot
b189c2432a
Remove HAVE_STDARG_H
...
The C89 standard and later defines the `<stdarg.h>` header as part of
the standard headers [1]. On current systems it is always present and
can be included unconditionally.
Checking for presence and functionality of the `<stdarg.h>` header and
variadic function is not relevant anymore on current systems since this
is always available.
Also Autoconf suggests relying on at least C89 or above [2] and [3].
The following files were regenerated with re2c 1.0.3:
- Zend/zend_language_scanner.c
- Zend/zend_language_scanner_defs.h
Refs:
[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
[2] http://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
[3] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/autoconf.html
2018-09-18 05:44:56 +02:00
Nikita Popov
dfa166e7ed
Remove unused ZEND_FILE_LINE in i_zval_ptr_dtor
2018-09-16 17:16:26 +02:00
Dmitry Stogov
72bf2def6b
Make visibilty check in is_callable() to be consistent with zend_std_get_method()
2018-09-13 12:24:59 +03:00
Dmitry Stogov
8939c4d96b
Get rid of ZEND_ACC_CTOR, ZEND_ACC_DTOR and ZEND_ACC_IMPLEMENTED_ABSTRACT
2018-09-05 13:16:10 +03:00
Massimiliano Braglia
2527a0fcfd
Fixed bug #75797
...
Fix zend_register_class_alias_ex() to use non-persistent strings
for (non-persistent) userland classes.
2018-08-22 13:39:08 +02:00
Xinchen Hui
78d823d9c3
Fixed zend_read_static_property
2018-08-14 13:01:50 +08:00
Anatol Belski
b1d2a89ac1
Fix length to copy
2018-07-31 17:31:57 +02:00
Peter Kokot
8d3f8ca12a
Remove unused Git attributes ident
...
The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.
In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.
This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.
2018-07-25 00:53:25 +02:00
Dmitry Stogov
ebd1f5af3e
API cleanup.
...
Removed useless filename and lineno arguments, used in DEBUG build.
The patch doesn't break source compatibility of public API (only binary compatibility).
2018-07-23 15:24:07 +03:00
Dmitry Stogov
41db5f73ce
Fixed reference-counting in zend_parse_arg_str_weak()
2018-07-06 03:11:20 +03:00
Dmitry Stogov
8361c0a9a7
Avoid useless checks in object_init()
2018-07-06 01:24:15 +03:00
Dmitry Stogov
4a475a4976
Replace legacy zval_dtor() by zval_ptr_dtor_nogc() or even more specialized destructors.
...
zval_dtor() doesn't make a lot of sense in PHP-7.* and it's used incorrectly in some places.
Its occurances should be replaced by zval_ptr_dtor() or zval_ptr_dtor_nogc(), or even more specialized destructors.
2018-07-04 19:22:24 +03:00
Dmitry Stogov
43aca3118a
Avoid string comparisons for magic methods (all magic methods start with "__")
2018-07-02 17:03:02 +03:00
Nikita Popov
7ac06d66d4
Add zend_update_static_property_ex API
...
And cleanup the implementation to perform a normal by-value
assignment.
2018-06-29 22:56:59 +02:00
Nikita Popov
813b6fc950
Add zend_read_static_property_ex API
...
For symmetry with zend_read_property_ex.
2018-06-29 22:49:15 +02:00
Dmitry Stogov
6e77a60a75
Removed INIT_OVERLOADED_CLASS... macros
2018-06-29 14:41:35 +03:00
Dmitry Stogov
6dc0cd868d
Fixed ZTS race condition (zend_class_entry->ce_flags of internal classes must not be modified, because internal class enties are shared between threads)
2018-06-27 12:33:20 +03:00
Dmitry Stogov
7f67513ca3
Lazy function copying from op_cache SHM into process memory
2018-06-25 19:53:58 +03:00
Dmitry Stogov
c8f355b12c
Micro-optimization
2018-06-25 17:32:13 +03:00
Nikita Popov
2543e61aed
Fixed bug #76509
...
In PHP static properties are shared between inheriting classes,
unless they are explicitly overwritten. However, because this
functionality was implemented using reference, it was possible
to break the implementation by reassigning the static property
reference.
This is fixed by switching the implementation from using references
to using INDIRECTs, which cannot be affected by userland code.
2018-06-25 15:04:09 +02:00
Dmitry Stogov
0b90cf85a6
Removed "dead" code (zend_hash_update() never fails)
2018-06-01 11:58:57 +03:00