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
Dmitry Stogov
f5543a428d
Fixed bug #38287 (static variables mess up global vars)
2006-08-07 15:15:22 +00:00
Marcus Boerger
637a40423c
- MFH as discussed
...
. zend_exception_get_default() -> zend_exception_get_default(TSRMLS_D)
. zend_get_error_exception() -> zend_get_error_exception(TSRMLS_D)
. added E_RECOVERABLE_ERROR
. added ZEND_TOSTRING_FUNC_NAME
. added __tostring function cache to zend_class_entry
. added ZEND_NAMED_ME
. modified ZEND_ME_MAPPING to support method flags
. added ZEND_MN
. method entries now use prefix "zim_" instead of "zif_"
. drop EG(ze1_compatibility_mode)
. changed cast handler, now without (int should_free):
typedef int (*zend_object_cast_t)(zval *readobj, zval *retval, int type TSRMLS_DC);
. changed get_iterator, now receives whether value is by ref:
zend_object_iterator *(*get_iterator)(zend_class_entry *ce, zval *object, int by_ref TSRMLS_DC);
. added zend_objects_store_add_ref_by_handle
. added zend_objects_store_del_ref_by_handle
. convert_to_explicit_type(pzv, type)
2006-05-09 23:53:23 +00:00
Andi Gutmans
61e93ccfe8
- Update copyright notices to 2006
2006-01-04 23:53:05 +00:00
foobar
916815b779
Bump up the year
2005-08-03 13:30:58 +00:00
Andi Gutmans
74b722f14c
- This part of the patch was right
2005-02-24 18:40:19 +00:00
Andi Gutmans
8140f095c6
- Revert following patch until we decide what is the right way to handle
...
- this:
- Fix signatures they are all meant to be able to deal with any type in any
object storage (though we are still missing several parts)
2005-02-24 02:35:59 +00:00
Marcus Boerger
3096f1edac
- Fix signatures they are all meant to be able to deal with any type in any
...
object storage (though we are still missing several parts)
2005-02-22 12:06:59 +00:00
Stanislav Malyshev
3755c03291
fix crash when dtor is fialing on shutdown
2004-09-17 10:13:52 +00:00
Marcus Boerger
f5cf052225
- Fix bug #29368 : The destructor is called when an exception is thrown from the constructor
2004-07-25 17:25:44 +00:00
Andi Gutmans
2917ff1e7d
- Nuke unused decleration
2004-05-25 14:19:19 +00:00