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
3b6e1ee4ee
Improved "Fast Shutdown".
2018-07-17 17:31:04 +03:00
Dmitry Stogov
0b90cf85a6
Removed "dead" code (zend_hash_update() never fails)
2018-06-01 11:58:57 +03:00
Dmitry Stogov
0d72bb8fcb
Optimize zend_new_array() for special case, when size <= HT_MIN_SIZE
2018-05-31 01:17:55 +03:00
Dmitry Stogov
37069d7d2f
Replace unused generic zend_hash_*add_or_update() functions by compact implmentations.
2018-05-29 01:38:27 +03:00
Dmitry Stogov
f4b7239cae
_zend_hash_index_add_or_update_i() optimization
2018-05-29 00:09:49 +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
Xinchen Hui
a48ade17db
Cleanup
2018-05-08 17:32:35 +08:00
Dmitry Stogov
a0e4488ec7
Optimize zend_hash_find() for the most usual case
2018-05-07 15:18:02 +03:00
Dmitry Stogov
34ed8e53fe
Changed worst HashTable load factor from 1.0 to 0.5
2018-05-04 02:41:35 +03:00
Dmitry Stogov
dc091870ea
Prefer reloading key->h
2018-04-02 23:43:37 +03:00
Dmitry Stogov
a795bd8265
Optimize zend_hash_real_init()
2018-03-23 00:13:45 +03:00
Dmitry Stogov
8598240c69
Fixed a behavior break introduced by d7f2dc4ec6
2018-03-22 16:37:34 +03:00
Dmitry Stogov
d7f2dc4ec6
Improve HashTable iterators handling:
...
- Avoid iterators check/update on each HashTable update opration
- Keep position equal (or above) nNumUsed instead of HT_INVALID_IDX
- Fixed iterators handling in array_unshift()
2018-03-22 02:41:49 +03:00
Dmitry Stogov
feb22b24cf
Micro optimization
2018-03-21 12:39:56 +03:00
Dmitry Stogov
28ab2060ee
Micro optimization
2018-03-21 11:57:54 +03:00
Dmitry Stogov
47f5f87826
Merge branch 'PHP-7.2'
...
* PHP-7.2:
Don't keep HashTable.pDestructor in SHM and always set it into ZVAL_PTR_DTOR in zval_array_dup(). Keeping pointer to a function in SHM is not safe because of ASLR.
2018-03-06 01:02:31 +03:00
Dmitry Stogov
b48d2f6d10
Merge branch 'PHP-7.1' into PHP-7.2
...
* PHP-7.1:
Don't keep HashTable.pDestructor in SHM and always set it into ZVAL_PTR_DTOR in zval_array_dup(). Keeping pointer to a function in SHM is not safe because of ASLR.
2018-03-06 01:00:14 +03:00
Dmitry Stogov
b711a96acb
Don't keep HashTable.pDestructor in SHM and always set it into ZVAL_PTR_DTOR in zval_array_dup().
...
Keeping pointer to a function in SHM is not safe because of ASLR.
2018-03-06 00:56:16 +03:00
Dmitry Stogov
baa9890112
Completely hide GC implementation details into zend_gc.c
2018-02-27 21:08:26 +03:00
Dmitry Stogov
9794272f3e
Micro optimization
2018-02-13 00:56:48 +03:00
Dmitry Stogov
6fb5568b2d
Merge HashTable.u.v.consistency into HashTable.u.v.flags
2018-01-22 15:32:34 +03:00
Dmitry Stogov
6634d5e313
Use HT_FLAGS() macro
2018-01-22 14:58:16 +03:00
Dmitry Stogov
ebf900a9eb
Introduce mcros to access HashTable iterators counter
2018-01-22 14:14:35 +03:00
Dmitry Stogov
9cbb521094
Access HashTable.u.flags through HT_FLAGS() macro.
2018-01-22 13:36:15 +03: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
Li-Wen Hsu
72ec23d823
Fix bug #75677 : Drop fastcall attribute on variadic function
...
Fastcall generally doesn't make sense on variadic functions. For
clang in particular this eliminates a "fastcall calling convention
ignored on variadic function" warning.
2017-12-15 21:56:08 +01:00
Dmitry Stogov
74c84cd7f0
Use zend_string_equal*() API for zend_string equality check instead of direct memcmp() usage.
2017-12-04 17:17:02 +03:00
Dmitry Stogov
ec2dde0c0b
Introduced zend_hash_find_ex() that may avoid unnecessary hash value check.
2017-11-24 14:01:19 +03:00
Dmitry Stogov
ed7f396721
Avoid second hash value check
2017-11-24 12:03:59 +03:00
Dmitry Stogov
6de54703f0
Improved zend_hash_str_add/update functions
2017-10-31 10:35:28 +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
9cf87aa196
Avoid HashTable allocations for empty arrays (using zend_empty_array).
2017-10-24 17:27:31 +03:00
Dmitry Stogov
f18638ca2d
Fixed incorrect recursion detection
2017-10-06 11:47:11 +03:00
Dmitry Stogov
254b74b85f
HASH_FLAG_PERSISTENT renamed into IS_ARRAY_PERSISTENT and moved into GC_FLAGS (to be consistent with IS_STR_PERSISTENT).
2017-10-06 02:54:14 +03:00
Dmitry Stogov
cb9d81ef4f
Refactored recursion pretection
2017-10-06 01:34:50 +03:00
Dmitry Stogov
44e0b79ac6
Refactored array creation API. array_init() and array_init_size() are converted into macros calling zend_new_array(). They are not functions anymore and don't return any values.
2017-09-20 02:25:56 +03:00
Thomas Punt
d938a769b2
Use ZEND_HASH_APPLY_SHIFT macro instead of hard-coded literal
2017-08-23 22:15:14 +02:00
Anatol Belski
bc5811f361
further sync for vim mode lines
2017-07-04 18:12:45 +02:00
Joe Watkins
5796fff344
Merge branch 'PHP-7.1'
...
* PHP-7.1:
Remove superfluous branch
2017-06-23 07:51:59 +01:00
Joe Watkins
b903733762
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0:
Remove superfluous branch
2017-06-23 07:51:46 +01:00
Thomas Punt
b1301a0686
Remove superfluous branch
2017-06-23 07:51:32 +01:00
Nikita Popov
fd4025069d
Enable HT RC assertions with escape-hatch
...
HT functions that modify the array now assert that rc=1. As we don't
respect this COW constraint everywhere, either for a good reason or
because fixing it would take more work, we provide an escape hatch
in the form of HT_ALLOW_COW_VIOLATION(ht). If this macro is called
assertions on this ht are disabled. The macro is a no-op in release
mode.
2017-01-23 17:19:06 +00:00
Sammy Kaye Powers
dac6c639bb
Update copyright headers to 2017
2017-01-04 11:23:42 -06:00
Sammy Kaye Powers
478f119ab9
Update copyright headers to 2017
2017-01-04 11:14:55 -06:00
Sammy Kaye Powers
1e3624290a
Resolve conflict
2017-01-03 08:01:05 -06:00
Stanislav Malyshev
13c18d4601
Merge branch 'PHP-7.1'
...
* PHP-7.1:
Fix #73832 - leave the table in a safe state if the size is too big.
Fix bug #73831 - NULL Pointer Dereference while unserialize php object
2017-01-02 21:37:10 -08:00
Stanislav Malyshev
ca72faa2c5
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0:
Fix #73832 - leave the table in a safe state if the size is too big.
Fix bug #73831 - NULL Pointer Dereference while unserialize php object
2017-01-02 21:37:06 -08:00