Dmitry Stogov
67397970b2
Replace zend_class_entry->traits by persistent zend_class_entry->trait_names.
...
Move trait binding code into ZEND_DECLARE_*CLASS opcodes.
Remove ZEND_ADD_TRIAIT and ZEND_BIND_TRAITS opcodes.
2018-08-23 02:02:26 +03:00
Christoph M. Becker
1f698e0f94
Merge branch 'PHP-7.3'
...
* PHP-7.3:
Fix #76773 - Methods with a concrete scope need to be added again
2018-08-22 14:08:46 +02:00
Chris Wright
9ace33b9c5
Fix #76773 - Methods with a concrete scope need to be added again
2018-08-22 14:08:15 +02:00
Gabriel Caruso
84b195d9fc
Fix some misspellings
2018-08-12 16:15:45 +02:00
Pedro Magalhães
887235773d
Fix #76700 - Methods with altered visibility need to be added again
2018-08-07 14:22:37 +08:00
Pedro Magalhães
97b2558b76
Fix #76700 - Methods with altered visibility need to be added again
2018-08-03 17:30:03 +01:00
Dmitry Stogov
7d4e18b05d
Improved user iterator implementation to reduce zend_class_entry memory consumption and avoid race condition during resolving/caching of user iterator functions of internal classes in ZTS build.
2018-07-12 14:04:14 +03:00
Dmitry Stogov
85ee47eda0
Changed structure of zend_class_entry.trait_aliases and zend_class_entry.trait_precedences to avoid keeping "intermediate" trait references, that are used only during inheritance.
2018-07-11 18:56:10 +03:00
Dmitry Stogov
e4be6ce0fa
Combined few checks into one
2018-07-09 17:29:34 +03:00
Dmitry Stogov
797e87060c
Avoid reloading
2018-07-09 16:28:13 +03:00
Dmitry Stogov
a34fedb723
Eliminated check
2018-07-09 15:18:09 +03:00
Dmitry Stogov
43aca3118a
Avoid string comparisons for magic methods (all magic methods start with "__")
2018-07-02 17:03:02 +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
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
73b675a988
Avoid duplication of "shadow" property_info
2018-06-22 02:46:59 +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
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
Nikita Popov
b4dff68379
Remove no longer necessary type-name special cases
...
zend_get_type_by_name() now produces the correct value by itself,
so we no longer need these workarounds.
2018-02-04 23:20:44 +01: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
efcbea4345
Cheaper reference construction
2017-12-26 13:30:25 +03:00
Nikita Popov
3fde27d87d
Merge branch 'PHP-7.2'
2017-12-16 17:10:09 +01:00
Pedro Magalhães
83964e0468
Fix #75607 - Check if existing static trait property is a ref before comparing
2017-12-16 17:07:12 +01:00
Dmitry Stogov
ec2dde0c0b
Introduced zend_hash_find_ex() that may avoid unnecessary hash value check.
2017-11-24 14:01:19 +03:00
Pedro Magalhães
179ed6e43d
63911: Compare opcodes of the op_array to determine different functions
2017-11-22 05:35:24 +00:00
Anatol Belski
80d6eb6806
Fix unsigned comparisons and remove dead code
...
Fix unsigned comparison
Cleanup never executed block
Fix unsigned comparison
Fix unsigned comparison, diff can't be < 0
Fix unsigned comparison
Fix unsigned comparison
Remove dead code
2017-11-17 22:38:44 +01:00
Dmitry Stogov
ccc12b82da
Avoid unnecessary reference-counting on strings.
2017-11-16 17:09:32 +03:00
Pedro Magalhães
897bdb42f0
Fix #74922 - Try to resolve constants when importing trait properties
2017-11-02 21:06:27 +01:00
Xinchen Hui
a8a17a72b0
RC manipulation cleanup
2017-11-01 10:25:10 +08:00
Dmitry Stogov
8482a6f511
Fixed use-after free introduced in fcc08ce19f
2017-10-31 01:20:38 +03:00
Dmitry Stogov
fcc08ce19f
Prevent reference-counting on persistent zvals (internal constants, default properties and constants of internal classes).
...
New macro ZVAL_COPY_OR_DUP() is used perform duplication, if necessary.
This should eliminate related race-coditions in ZTS build and prevent reference-counting bugs after unclean shutdown.
2017-10-30 23:13:10 +03:00
Dmitry Stogov
49ea143bbd
Encapsulate reference-counting primitives.
...
Prohibit direct update of GC_REFCOUNT(), GC_SET_REFCOUNT(), GC_ADDREF() and GC_DELREF() shoukf be instead.
Added mactros to validate reference-counting (disabled for now).
These macros are going to be used to eliminate race-condintions during reference-counting on data shared between threads.
2017-10-27 01:28:58 +03:00
Dmitry Stogov
ef5ea48741
Always use IS_CONSTANT_AST (IS_CONSTANT is removed).
2017-10-10 10:11:05 +03:00
Dmitry Stogov
e70618aff6
Changed the way VM accesses constant operands in 64-bit builds.
2017-10-04 16:53:01 +03:00
Anatol Belski
bc5811f361
further sync for vim mode lines
2017-07-04 18:12:45 +02:00
Pedro Magalhães
c6c1e75e6b
Fix bug #74607 : Don't check for bi-directional compatibility in traits
2017-06-03 00:24:43 +02:00
Pedro Magalhães
a5eb57c96e
Allow overriding abstract methods
...
RFC: https://wiki.php.net/rfc/allow-abstract-function-override
2017-05-24 17:42:01 +02:00
Dmitry Stogov
dfffe6cb32
Type hint inheritance check optimization
2017-05-10 22:25:32 +03:00
Nikita Popov
d8aa99ed94
Drop unused variable
2017-05-01 14:16:26 +02:00
Pedro Magalhães
5324fb1f34
Fixed bug #61970 : Allow a child class to restrict access to ctor
2017-05-01 14:15:57 +02:00
Pedro Magalhães
92124f9cdc
Fixed bug #74269 : Strict comparison of initial trait property values
2017-05-01 12:59:27 +02:00
Nikita Popov
b6a4aad820
Remove the ZEND_ACC_CLONE flag
...
This one is completely unused
2017-04-22 15:47:53 +02:00
Niklas Keller
2edc3cf8d2
Implement Parameter Type Widening RFC
2017-02-04 23:33:24 +01:00
Joe Watkins
46de334452
Revert "Inheritance checks should not ignore parents if these implement an interface"
...
This reverts commit b67eb3440b
.
2017-02-01 18:34:14 +00:00
Joe Watkins
c827124632
Merge branch 'PHP-7.1'
...
* PHP-7.1:
Added tests demonstrating the same effect with abstracts
Inheritance checks should not ignore parents if these implement an interface
2017-01-28 06:28:24 +00:00
Pedro Magalhães
b67eb3440b
Inheritance checks should not ignore parents if these implement an interface
2017-01-28 06:28:10 +00:00
Dmitry Stogov
141d1ba980
Introduced "zend_type" - an abstraction for type-hinting representation.
2017-01-13 11:37:46 +03:00
Sammy Kaye Powers
dac6c639bb
Update copyright headers to 2017
2017-01-04 11:23:42 -06:00