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
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
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
Dmitry Stogov
d90c6f2443
Removed useless zval_ptr_dtor()
2018-05-29 17:58:06 +03:00
Dmitry Stogov
5eb1f92f31
Use zend_string_release_ex() instread of zend_string_release() in places, where we sure about string persistence.
2018-05-28 16:27:12 +03:00
Anatol Belski
bcb1dbf6e4
Merge branch 'PHP-7.2'
...
* PHP-7.2:
Fixed bug #76337
2018-05-20 13:33:46 +02:00
xKhorasan
5681f6523b
Fixed bug #76337
2018-05-20 13:33:03 +02:00
Dmitry Stogov
524f5245c5
Avoid useless checks, using zend_string_efree(), in cases where the string is known to be a temporary allocated zend_string.
2018-05-08 17:30:15 +03:00
Dmitry Stogov
fdb347a753
zend_is_callable() improvement
2018-05-03 19:25:53 +03:00
Nikita Popov
32692bb083
Merge branch 'PHP-7.2'
2018-04-26 16:17:23 +02:00
Nikita Popov
7c852a7961
Merge branch 'PHP-7.1' into PHP-7.2
2018-04-26 16:17:13 +02:00
shiguangqi2008@gmail.com
98ef183ed0
Fix memory leak in zend_disable_class()
2018-04-26 16:16:37 +02:00
Gabriel Caruso
d0ee2a8254
Add is_countable function
...
RFC: https://wiki.php.net/rfc/is-countable
2018-03-11 16:41:16 +01:00
Dmitry Stogov
7e329a82c7
Improved ZPP to reduce amount of generated code.
2018-02-16 11:37:20 +03:00
Gabriel Caruso
fef879a2d6
Use bool instead of boolean while throwing a type error
...
PHP requires boolean typehints to be written "bool" and disallows
"boolean" as an alias. This changes the error messages to match
the actual type name and avoids confusing messages like "must be
of type boolean, boolean given".
This a followup to ce1d69a1f6
, which
implements the same change for integer->int.
2018-02-04 23:09:40 +01:00
Gabriel Caruso
ce1d69a1f6
Use int instead of integer in type errors
...
PHP requires integer typehints to be written "int" and does not
allow "integer" as an alias. This changes type error messages to
match the actual type name and avoids confusing messages like
"must be of the type integer, integer given".
2018-02-04 19:08:23 +01:00
Dmitry Stogov
5c77bac9a7
A cheaper way to reset type flags.
2018-01-17 01:58:51 +03:00
Dmitry Stogov
c32d79b65f
cleanup
2018-01-10 12:03:04 +03:00
Gabriel Caruso
6400264856
Trailing whitespaces
...
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2018-01-03 14:38:00 +01:00
Xinchen Hui
a6519d0514
year++
2018-01-02 12:57:58 +08:00
Xinchen Hui
7a7ec01a49
year++
2018-01-02 12:55:14 +08:00
Xinchen Hui
ccd4716ec7
year++
2018-01-02 12:53:31 +08:00
Dmitry Stogov
d9f5ea691f
zend_fcall_info_cache.initialized is removed (zend_fcall_info_cache is initialized if zend_fcall_info_cache.function_handler is set).
2017-12-27 15:15:03 +03:00
Dmitry Stogov
a6fcbb7c87
Use zend_hash_find() instead of zend_hash_find_ptr() to avoid double check
2017-12-27 13:26:06 +03:00
Nikita Popov
b2b2b437af
Add _IS_NUMBER as cast_object() target type
...
convert_scalar_to_number() will now call cast_object() with an
_IS_NUMBER argument, in which case the cast handler should return
either an integer or floating point number, whichever is more
appropriate.
Previously convert_scalar_to_number() unconditionally converted
objects to integers instead.
Fixes bug #53033 .
Fixes bug #54973 .
Fixes bug #73108 .
2017-12-26 12:39:06 +01:00
Nikita Popov
76a001e32a
Merge branch 'PHP-7.2'
2017-12-13 21:25:38 +01:00
Nikita Popov
652d30acdc
Merge branch 'PHP-7.1' into PHP-7.2
2017-12-13 21:25:21 +01:00
Levi Morrison
580bae4a2c
Fix copy-and-paste bugs
2017-12-13 21:25:00 +01:00