Commit Graph

222 Commits

Author SHA1 Message Date
Nikita Popov
795a4c1bb3 Merge branch 'PHP-7.1' 2017-02-02 18:35:35 +01:00
Nikita Popov
e81f30ad1d Merge branch 'PHP-7.0' into PHP-7.1 2017-02-02 18:33:42 +01:00
Mitch Hagstrand
dd9cf23457 BUG #73998: Numeric properties are not accessible from get_object_vars 2017-02-02 18:33:10 +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
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Dmitry Stogov
42407692b6 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #73586 (php_user_filter::$stream is not set to the stream the filter is working on).
2016-11-28 12:57:36 +03:00
Dmitry Stogov
cabcf8971f Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #73586 (php_user_filter::$stream is not set to the stream the filter is working on).
2016-11-28 12:57:02 +03:00
Dmitry Stogov
9a9ad56af0 Fixed bug #73586 (php_user_filter::$stream is not set to the stream the filter is working on). 2016-11-28 12:54:47 +03:00
Anatol Belski
b204b3abd1 further normalizations, uint vs uint32_t
fix merge mistake

yet one more replacement run
2016-11-26 17:29:01 +01:00
Andrea Faulds
a0502b89a6 Convert numeric keys in object/array casts
RFC: https://wiki.php.net/rfc/convert_numeric_keys_in_object_array_casts

This converts key types as appropriate in object to array and array to object
casts, as well as in get_object_vars().
2016-11-14 18:20:45 +00:00
Dmitry Stogov
9ded1b4edb Introduced HT_IS_PACKED() and HT_IS_WITHOUT_HOLES() macros. (Benjamin Coutu) 2016-10-19 23:10:42 +03:00
Dmitry Stogov
ebb99a1a3a Fixed compilation warnings 2016-06-21 16:55:17 +03:00
Dmitry Stogov
cef8d93edd Fixed typo 2016-05-18 11:29:02 +03:00
Dmitry Stogov
b91197c8a3 Inlined fast path 2016-05-04 17:33:35 +03:00
Dmitry Stogov
e66ac376cf Merge branch 'PHP-7.0'
* PHP-7.0:
  Introduce zend_symtable_exists_ind() for API consistency
2016-03-02 11:54:44 +03:00
Dmitry Stogov
ab800642df Introduce zend_symtable_exists_ind() for API consistency 2016-03-02 11:53:47 +03:00
Xinchen Hui
f4f140c05d Merge branch 'PHP-7.0'
* PHP-7.0:
  Use hash_exists_ind in symbol table
2016-03-02 12:12:12 +08:00
Xinchen Hui
2d4186dde7 Use hash_exists_ind in symbol table 2016-03-02 12:11:13 +08:00
Nikita Popov
af66ad2857 Remove use of register keyword in headers
Headers must be C++ compatible -- this throws warnings.

The register keyword is not used for optimization, at least not
in optimized builds.
2016-02-04 13:34:19 +01:00
Xinchen Hui
97a9470d97 bump year which is missed in rev 49493a2 2016-01-02 17:56:11 +08:00
Dmitry Stogov
0402f05ba3 Fixed possible crash on Zend/tests/bug71154.phpt 2015-12-21 15:57:53 +03:00
Xinchen Hui
6313e16a04 Improved fix for bug (count on symbol table) 2015-11-23 06:12:03 -08:00
Dmitry Stogov
37f0c6b5cb Add myself into list of authors of the most refactored files. 2015-08-31 11:38:16 +03:00
Dmitry Stogov
25f9e25526 Fixed bug #70187 (Notice: unserialize(): Unexpected end of serialized data) 2015-08-26 03:27:05 +03:00
Xinchen Hui
adf0e49912 zend_hash_resize seems useless, use zend_hash_extend 2015-08-13 12:19:35 +08:00
Xinchen Hui
16f2ce8537 Hmm, we should also take care of uninitialized hashTable 2015-08-10 17:58:24 +08:00
Xinchen Hui
be54eb7db1 Fixed bug #70211 (php 7 ZEND_HASH_IF_FULL_DO_RESIZE use after free) 2015-08-10 17:02:16 +08:00
Xinchen Hui
7d5fb7bbf3 Fixed bug #69674 (SIGSEGV array.c:953) 2015-07-29 10:46:12 +08:00
Dmitry Stogov
4a2e40bb86 Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes). 2015-06-30 04:05:24 +03:00
Dmitry Stogov
4bd22cf1c1 Improved zend_string API (Francois Laupretre)
Squashed commit of the following:

commit d96eab8d79
Author: Francois Laupretre <francois@tekwire.net>
Date:   Fri Jun 26 01:23:31 2015 +0200

    Use the new 'ZSTR' macros in the rest of the code.

    Does not change anything to the generated code (thanks to compat macros) but cleaner.

commit b352643910
Author: Francois Laupretre <francois@tekwire.net>
Date:   Thu Jun 25 13:45:06 2015 +0200

    Improve zend_string API

    Add missing methods
2015-06-29 16:44:54 +03:00
Dmitry Stogov
869f662cdd Use better zend_hash_* functions 2015-06-05 13:54:57 +03:00
Xinchen Hui
0655abef1a Improve the fix for bug #69756 2015-06-05 18:42:21 +08:00
Dmitry Stogov
6c8d49b6b0 Improved hash table copying 2015-05-19 13:22:58 +03:00
Dmitry Stogov
ffe804a50c Use new hash iteration API. 2015-04-27 16:50:47 +03:00
Dmitry Stogov
ef36d8a91e Optimized zend_hash_rehash(), added some exoectations to generate better code 2015-04-24 13:00:56 +03:00
Dmitry Stogov
6265687768 Added HashTable flag HASH_FLAG_STATIC_KEYS that is maintaned to be set if all hash table keys are numbers or interned strings.
Take this flag into account when copy or destroy HashTable to avoud useless checks for each key.
2015-04-24 09:34:50 +03:00
Dmitry Stogov
770cb1da71 Keep realpath and PCRE caches in consistency with opcache SHM. 2015-04-22 02:29:06 +03:00
Bob Weinand
f3e124d58d Merge branch 'coroutineDelegation' of https://github.com/bwoebi/php-src 2015-04-14 17:58:58 +02:00
Dmitry Stogov
4be8d798b6 Add some assumptions. 2015-03-24 12:22:11 +03:00
Anatol Belski
743541b311 fix datatype mismatch warnings 2015-03-19 22:33:12 +01:00
Dmitry Stogov
db10b72523 Use fastcall calling convention for most critical ZE subsystems. 2015-03-13 21:10:09 +03:00
Dmitry Stogov
2b42d71908 Changed HashTable layout:
Removed HashTable->arHash (reduced memory consumption). Now hash slots may be accessed using HT_HASH() macro.
Hash slotas are allocated together with Buckets (before them) and lay in reverse order from HashTable->arData base address (see comments in Zend/zend_types.h)
Indexes in hash table and conflict resolution chains (Z_NEXT) may be stored as indeces or offsets in bytes, depending on system (32 or 64-bit).
HashTable data filelds are reordered to keep the most useful for zend_hash_find() data in the same CPU cache line.
2015-03-13 17:13:19 +03:00
Xinchen Hui
95b4aa5293 Fixed zend_hash_append result duplicated key
actually, maybe we should precalculate before calling zend_hash_appen
when we are not sure whether the hash is caclculated(prop_info->name).

but it looks a little ugly.. (also for zend_string_copy)
2015-03-08 00:21:02 +08:00
Xinchen Hui
28b408a242 Fixed bug #69198 (Compact function generate array with length but no content) 2015-03-07 16:49:07 +08:00
Bob Weinand
b4a142ab97 Added yield from operator 2015-03-07 00:28:12 +01:00
Dmitry Stogov
9f9ffdd0a0 Use fast zend_hash_append() API 2015-03-06 19:23:54 +03:00
Dmitry Stogov
6dfff52f61 Improved method inhereitance code and cleanup 2015-03-05 02:10:38 +03:00
Dmitry Stogov
c9bd24de7a Improved ineritance code 2015-03-04 23:06:07 +03:00