1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 15:08:16 +02:00
Commit Graph

73 Commits

Author SHA1 Message Date
Nikita Popov a79e5f705c Remove ZEND_OBJECTS_STORE_HANDLERS macro
Object store handlers are no longer a thing since PHP 7.
2018-09-17 20:59:16 +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
Xinchen Hui ffaee27478 Fixed bug #76427 (Segfault in zend_objects_store_put) 2018-06-11 21:00:38 +08:00
Dmitry Stogov f2b4ec4bdc Export standard object handlers, to avoid indirect access 2018-05-31 11:57:22 +03:00
Dmitry Stogov 1af60a2a71 Keep initialized object_handlers structures in read-only memory. 2018-03-14 14:01:45 +03:00
Dmitry Stogov 6f483dc94c Use macros to update specific parts of GC_TYPE_INFO() (direct assignments to GC_TYPE(), GC_FLAGS() and GC_INFO() are prohibited) 2018-02-28 00:52:12 +03:00
Dmitry Stogov b3e22da745 Use OBJ_FLAGS() macro to access object flags (even if they are currently stored together with GC_FLAGS) 2018-01-22 15:57:00 +03:00
Xinchen Hui a6519d0514 year++ 2018-01-02 12:57:58 +08:00
Dmitry Stogov 175e461369 Use fastcall calling convention for objects and resources API 2017-12-14 13:50:39 +03:00
Nikita Popov 721f2cc513 Subtract one zval from memset 2017-11-25 18:02:01 +01:00
Nikita Popov b72b1a4e4d Add zend_object_alloc() API
Using ecalloc() to create objects is expensive, because the
dynamic-size memset() is unreasonably slow. Make sure we only
zero the main object structure with known size, as the properties
are intialized separately anyway.

Technically we do not need to zero the embedded zend_object
structure either, but as long as the memset argument is constant,
a couple more bytes don't really matter.
2017-11-25 17:12:37 +01: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
Anatol Belski bc5811f361 further sync for vim mode lines 2017-07-04 18:12:45 +02:00
Dmitry Stogov 908ce66f73 Cleanup. Removed unused functions and unimplemented prototype. Avoid useless "dtor_obj" calls. 2017-06-27 12:03:06 +03:00
Dmitry Stogov f25ecdacf8 shutdown_executor() refactoring (reuse opcache fast request shutdown code) 2017-06-22 01:45:28 +03:00
Sammy Kaye Powers 9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Dmitry Stogov 51f59739b6 Turn function into inline 2016-11-21 13:13:28 +03:00
Dmitry Stogov d6c332eb51 Turn IS_TYPE_COLLECTABLE zval flag into GC_COLLECTABLE zend_refcounted flag.
This simplifies checks and allows reset this flag for "acyclic" arrays and objects.
2016-10-21 17:47:30 +03:00
Xinchen Hui 97a9470d97 bump year which is missed in rev 49493a2 2016-01-02 17:56:11 +08:00
Dmitry Stogov 715d5d2855 Get rid of implicit type casting in GC_*() macros in Zend/zend_types.h.
This prevented compilation warnings and disclosed few incorrect usages in Zend/zend_vm_def.h and ext/dom/xpath.c.
Now explicit type casting may be required on call site.
This may break some C extension code, but it shoulfn't be a problem to add explicit casting.
2015-08-13 13:56:29 +03:00
Dmitry Stogov 9e70d7672d Move zend_object->guards into additional slot of zend_object->properties_table[]. As result size of objects without __get/__set/__unset/__isset magic methods is reduced. 2015-02-04 15:24:13 +03:00
Xinchen Hui fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Anatol Belski bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Nikita Popov 51c90e999f Fix ZTS build 2014-10-02 21:58:29 +02:00
Dmitry Stogov 8857af8494 Use inline finction for OBJ_RELEASE() macro 2014-10-01 16:35:56 +04:00
Anatol Belski 6f9f0bf205 master renames phase 2 2014-08-25 19:28:33 +02:00
Dmitry Stogov 7402af380b Fixed destruction of objects and iterators on unclean request shutdown and GC (few cases are still unfixed).
Now we destroy objects it two steps. At first - object properties of all objects and only then the objects their selves.
2014-04-09 01:50:15 +04:00
Dmitry Stogov d8099d0468 Changed data layout to allow more efficient operations 2014-04-02 14:34:44 +04:00
Dmitry Stogov ea85451b65 Refactored data structures to keep zend_object* instead of a whole zval in some places 2014-03-28 02:11:22 +04:00
Dmitry Stogov e4e7502548 fixed compilation warning 2014-03-20 11:36:59 +04:00
Dmitry Stogov 373855ef49 Fixed GC 2014-03-20 01:41:55 +04:00
Dmitry Stogov b7938ab1bd Refactored GC (incomplete) 2014-03-19 17:00:28 +04:00
Dmitry Stogov 6454684212 Use better data structures (incomplete) 2014-02-21 22:59:51 +04:00
Dmitry Stogov 17bf59f895 Use better data structures (incomplete) 2014-02-14 17:48:45 +04:00
Dmitry Stogov be82a07776 Use better data structures (incomplete) 2014-02-12 18:08:11 +04:00
Dmitry Stogov f4cfaf36e2 Use better data structures (incomplete) 2014-02-10 10:04:30 +04:00
Xinchen Hui c081ce628f Bump year 2014-01-03 11:08:10 +08:00
Dmitry Stogov f9e8678dd3 Fixed bug #63882 (zend_std_compare_objects crash on recursion) 2013-01-09 11:30:50 +04:00
Xinchen Hui 0a7395e009 Happy New Year 2013-01-01 16:28:54 +08:00
Felipe Pena 4e19825281 - Year++ 2012-01-01 13:15:04 +00:00
Felipe Pena 0203cc3d44 - Year++ 2011-01-01 02:17:06 +00:00
Dmitry Stogov 453b49ed20 Added a number of small performance tweaks and optimizations
. ZEND_RECV now always has IS_CV as its result
  . ZEND_CATCH now has to be used only with constant class names
  . ZEND_FETCH_DIM_? may fetch array and dimension operans in a different order
2010-04-20 11:16:39 +00:00
Sebastian Bergmann d2281d1dff sed -i "s#1998-2009#1998-2010#g" **/*.c **/*.h **/*.php 2010-01-05 20:46:53 +00:00
Sebastian Bergmann 08659c2dcd MFH: Bump copyright year, 3 of 3. 2008-12-31 11:15:49 +00:00
Marcus Boerger ce2f9bb0cf - MFH Fix issue with destruction of overloaded objects 2008-08-24 16:49:19 +00:00
Felipe Pena cf7384aa40 - MFH: Constness (Added const qualifier to several function parameters) 2008-08-12 17:20:25 +00:00
Dmitry Stogov 71592cec06 Added garbage collector 2008-01-22 09:27:48 +00:00
Sebastian Bergmann d1dded8751 MFH: Bump copyright year, 2 of 2. 2007-12-31 07:17:19 +00:00
Jani Taskinen 226c56fe76 MFH: Fixed compiler warnings 2007-07-21 00:35:15 +00:00
Sebastian Bergmann 4223aa4d5e MFH: Bump year. 2007-01-01 09:36:18 +00:00