Commit Graph

156 Commits

Author SHA1 Message Date
Dmitry Stogov
1d66808dc4 Reverted 07fcdc40a0 2014-03-20 11:48:49 +04:00
Dmitry Stogov
07fcdc40a0 Fixed circular array copying 2014-03-20 11:37:42 +04:00
Dmitry Stogov
b7938ab1bd Refactored GC (incomplete) 2014-03-19 17:00:28 +04:00
Dmitry Stogov
aa5f55306b Refactored EG(active_symbol_table) to be zend_array* instead of HashTable* 2014-03-17 23:15:22 +04:00
Xinchen Hui
53e312c663 Review ended
Revert "An demo(for review) to show how to fix the problem(symbol table resize)"

This reverts commit 60c354510b.
2014-03-11 14:23:14 +08:00
Xinchen Hui
60c354510b An demo(for review) to show how to fix the problem(symbol table resize) 2014-03-10 16:25:05 +08:00
Dmitry Stogov
2eb980f614 IS_REFERENCE with refcount==1 should be handled as ordinal value 2014-03-06 12:37:46 +04:00
Dmitry Stogov
3733737328 Handle interned strings as non-refcounted scalars 2014-03-05 13:55:56 +04:00
Dmitry Stogov
54095e8c56 Converting from reference to regular value 2014-02-28 11:03:05 +04:00
Dmitry Stogov
ff61b46941 Use better data structures (incomplete) 2014-02-19 16:50:09 +04:00
Dmitry Stogov
557994d50d Use better data structures (incomplete) 2014-02-19 01:12:05 +04:00
Dmitry Stogov
5de7115679 Use better data structures (incomplete; able to run bench.php) 2014-02-18 16:27:38 +04:00
Dmitry Stogov
2b9b9afa7a Use better data structures (incomplete) 2014-02-17 17:59:18 +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
9647c61dc1 Constant expressions refactoring 2013-11-06 22:21:07 +04:00
Bob Weinand
2361745806 Working commit for constant scalar expressions (with constants).
Tests will follow.
2013-10-31 08:57:12 +01:00
Nikita Popov
96b1c2145c Provide more macros for handling of interned strings
* str_erealloc behaves like erealloc for normal strings, but will
   use emalloc+memcpy for interned strings.
 * str_estrndup behaves like estrndup for normal strings, but will
   not copy interned strings.
 * str_strndup behaves like zend_strndup for normal strings, but
   will not copy interned strings.
 * str_efree_rel behaves like efree_rel for normal strings, but
   will not free interned strings.
 * str_hash will return INTERNED_HASH for interned strings and
   compute it using zend_hash_func for normal strings.
2013-09-13 19:42:10 +02:00
Xinchen Hui
a666285bc2 Happy New Year 2013-01-01 16:37:09 +08:00
Xinchen Hui
1f8fd609b0 Merge branch 'PHP-5.3' into PHP-5.4 2012-10-18 20:11:32 +08:00
Xinchen Hui
e88cdaa014 better fix for #63055 2012-10-18 20:10:35 +08:00
Felipe Pena
e4ca0ed09f - Year++ 2012-01-01 13:15:04 +00:00
Felipe Pena
4e19825281 - Year++ 2012-01-01 13:15:04 +00:00
Stanislav Malyshev
e18618905c scalar types cleanup 2011-06-03 01:09:32 +00:00
Dmitry Stogov
efcb9a71cd - Fixed bug #54358 (Closure, use and reference)
- Fixed bug #54039 (use() of static variables in lambda functions can break staticness)
2011-04-08 10:02:07 +00:00
Dmitry Stogov
64351b7add Fixed Bug #53958 (Closures can't 'use' shared variables by value and by reference) 2011-02-14 10:52:16 +00:00
Felipe Pena
927bf09c29 - Year++ 2011-01-01 02:19:59 +00:00
Felipe Pena
0203cc3d44 - Year++ 2011-01-01 02:17:06 +00:00
Sascha Schumann
50a0ea7b8c separate properties of internal classes in ZTS mode fully,
otherwise multiple threads will modify the zvals' contents
without any synchronisation.
2010-08-12 07:58:14 +00:00
Stefan Marr
e6bd5368ad Fixed issue with statics in traits.
#Please review this change, I moved the routine which copies statics from the closure code to zend_variables.c
#Please also have a look to check whether the TSRMLS_DC is correct, and whether it fits with the rest in zend_variables, because there you are using some macro magic and I am not exactly sure what the reason is for that.
2010-06-08 15:56:36 +00:00
Ilia Alshanetsky
31f62dbc72 Fixed a memory leak 2010-05-20 20:17:49 +00:00
Dmitry Stogov
dd5c478be6 Added concept of interned strings. All strings constants known at compile time are allocated in a single copy and never changed. 2010-04-20 11:05:54 +00:00
Dmitry Stogov
d2f681cecd Fixed bug #50519 (segfault in garbage collection when using set_error_handler and DomDocument) 2010-01-11 10:07:10 +00:00
Sebastian Bergmann
d2281d1dff sed -i "s#1998-2009#1998-2010#g" **/*.c **/*.h **/*.php 2010-01-05 20:46:53 +00:00
Dmitry Stogov
db8e4a089c Fixed bug #50519 (segfault in garbage collection when using set_error_handler and DomDocument) 2009-12-25 13:11:18 +00:00
Sebastian Bergmann
08659c2dcd MFH: Bump copyright year, 3 of 3. 2008-12-31 11:15:49 +00:00
Sebastian Bergmann
d1dded8751 MFH: Bump copyright year, 2 of 2. 2007-12-31 07:17:19 +00:00
Yiduo (David) Wang
4b4d634cb9 MFH: Added macros for managing zval refcounts and is_ref statuses 2007-10-07 05:22:07 +00:00
Dmitry Stogov
f32ffe9b43 Namespaces 2007-09-28 19:52:53 +00:00
Sebastian Bergmann
4223aa4d5e MFH: Bump year. 2007-01-01 09:36:18 +00:00
Dmitry Stogov
c1ad451c3e Speedup array/HashTable copying. (Matt W) 2006-10-03 11:10:33 +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
4a03738225 - Use zval_ctor_func() for wrapper and update the prototype to void 2004-09-27 07:04:36 +00:00
Andi Gutmans
67fc0f2bfe - Make zval_copy_ctor() return void like dtor(). No one ever checks the
- return value which is SUCCESS always.
2004-09-27 02:29:01 +00:00
Andi Gutmans
f17aa81edc - Apply Thies and Sterling's patch which doesn't call ctor/dtor functions
- for types which don't require it (BOOL/NULL/LONG/DOUBLE)
- Breaks serialization!!!
2004-09-26 20:03:54 +00:00
Andi Gutmans
56f8195fe5 - Nuke empty_string. It is a reminanent from the time where RETURN_FALSE()
used to return "" and not bool(false). It's not worth keeping it because
  STR_FREE() and zval_dtor() always have to check for it and it slows down
  the general case. In addition, it seems that empty_string has been abused
  quite a lot, and was used not only for setting zval's but generally in
  PHP code instead of "", which wasn't the intention. Last but not least,
  nuking empty_string should improve stability as I doubt every place
  correctly checked if they are not mistakenly erealloc()'ing it or
  calling efree() on it.
  NOTE: Some code is probably broken. Each extension maintainer should
  check and see that my changes are OK. Also, I haven't had time to touch
  PECL yet. Will try and do it tomorrow.
2004-07-19 07:19:50 +00:00
Andi Gutmans
e5cfb1d05c - Better stability during premature shutdown of request startup 2004-07-10 07:46:17 +00:00
Dmitry Stogov
ec53815b0f Object cloning in ze1 compatibility mode (zend.ze1_compatibility_mode) was reimplemented (Dmitry, Andi) 2004-03-24 10:55:04 +00:00
Zeev Suraski
eb6fd52e21 - Rename compatiblity mode to zend.ze2_compatibility_mode (it doesn't only affect auto-clone).
- Perform implementation checks even with simple inheritance (off when
  compatibility mode is enabled).
- Restore default arguments in interfaces and handle it correctly.
- Move registration of internal classes later in the startup sequence
  in order to have INI options available.
2004-02-25 10:57:10 +00:00
foobar
ccfc46b0aa - Happy new year and PHP 5 for rest of the files too..
# Should the LICENSE and Zend/LICENSE dates be updated too?
2004-01-08 17:33:29 +00:00
Marcus Boerger
19ec7a09fc - Provide appropriate way to destroy internal zval's.
- Allow internal zval's of type string and disallow complex types.
- Define the default string for extensions at class level instead of ctor.
2003-08-24 17:32:47 +00:00
James Cox
f68c7ff249 updating license information in the headers. 2003-06-10 20:04:29 +00:00
foobar
333406bdc2 - Added some missing CVS $Id$ tags, headers and footers. 2003-02-01 01:49:15 +00:00
Zeev Suraski
424e98f4e2 Implemented compatibility mode
To enable - zend2.implicit_clone = on in php.ini or using ini_set()
2003-01-12 12:39:06 +00:00
Sebastian Bergmann
2c5d4b8c23 Bump year. 2002-12-31 15:59:15 +00:00
Andi Gutmans
671fff2fde h WHitespace 2002-11-30 11:20:25 +00:00
Stanislav Malyshev
7fca47f1cf MFZE1 2002-09-10 08:18:53 +00:00
Andi Gutmans
b53569c9e8 - Nuke persist_alloc(). 2002-06-22 13:52:07 +00:00
Andi Gutmans
c84a4ead95 - Pass TSRMLS to callbacks. 2002-03-15 16:26:17 +00:00
Stanislav Malyshev
6608f07322 Mega-commit: Enter the new object model
Note: only standard Zend objects are working now. This is definitely going to
break custom objects like COM, Java, etc. - this will be fixed later.
Also, this may break other things that access objects' internals directly.
2002-02-07 14:08:43 +00:00
Sebastian Bergmann
62dc854bb0 Happy New Year. 2002-01-06 15:21:36 +00:00
Sebastian Bergmann
d863d52a5d Update headers. 2001-12-11 15:16:21 +00:00
Andi Gutmans
290fc10af7 - Sync with ZE1 2001-08-16 14:12:03 +00:00
Andi Gutmans
ea48c0c46a - Fix a bug in method calls.
- Try to get the old copying behavior of objects to work (doesn't work yet).
2001-08-16 14:04:04 +00:00
Zeev Suraski
f72d907105 MFZE1 2001-08-14 15:24:20 +00:00
Andi Gutmans
5af7770a81 - Sync Engine2 CVS with latest Engine CVS 2001-08-07 03:17:33 +00:00
Zeev Suraski
8ce8324e59 More TSRMLS_FETCH annihilation 2001-07-30 04:54:16 +00:00
Zeev Suraski
2c254ba762 Get rid of ELS_*(), and use TSRMLS_*() instead.
This patch is *bound* to break some files, as I must have had typos somewhere.
If you use any uncommon extension, please try to build it...
2001-07-27 10:10:39 +00:00
Zeev Suraski
43ebb86806 Fix bug #10287 - avoid crashing under a bogus usage of list() 2001-07-16 15:48:31 +00:00
Zeev Suraski
c4f2e0197b Time to bid this old timer goodbye - get rid of var_uninit() 2001-07-15 19:02:20 +00:00
Zeev Suraski
ed542331b7 Get rid of some inlines 2001-07-11 09:33:41 +00:00
Thies C. Arntzen
bcddfd474a cleaned up the RETVAL_ RETURN_ and ZVAL_ macros
added check for \0 at end-of-string at some places. all strings in PHP
have to be terminated with \0 because 3th party libraries might not be
binary-safe.
2001-07-10 08:20:20 +00:00
Andi Gutmans
eadaf3eb7a - Remove check for ht == NULL in copy_ctor.
If ht is NULL at this point then we are better off crashing and fixing
  the bug that caused it.
2001-05-12 13:55:49 +00:00
Andi Gutmans
d3625c0a90 - Nuke zval_del_ref() 2001-02-27 20:26:16 +00:00
Andi Gutmans
d2c9e8074c - Update copyright year 2001-02-26 05:43:27 +00:00
Zeev Suraski
13b67621cf Fix a bug in static initializers/default values/class member variables that contained
array values
2000-05-31 19:07:09 +00:00
Zeev Suraski
fa7c418b79 Fix - forgot to split away if refcount>1 2000-04-26 22:10:06 +00:00
Thies C. Arntzen
80486c95be export zval_add-ref and zvale_del_ref 2000-04-21 14:45:10 +00:00
Zeev Suraski
5dba477467 - Some header dependencies cleanup
- Generalize zval_print() and zval_print_r()
2000-03-25 19:10:07 +00:00
Zeev Suraski
5e55e47f7f It's official now... 2000-03-06 05:26:39 +00:00
Zeev Suraski
33a564c971 Use the fast cache here too 2000-02-25 17:55:33 +00:00
Zeev Suraski
0ac9536d99 (c) patch 2000-02-19 22:46:42 +00:00
Zeev Suraski
9f51f154aa - Stop passing list/plist to internal functions
- Add a typedef for the pCopyConstructor function pointer
- Minor hacks
2000-02-05 15:11:24 +00:00
Zeev Suraski
19d978d1c7 Get rid of the IsPointer functionality in the hash. 2000-01-17 18:45:46 +00:00
Zeev Suraski
62114c1806 Destructors no longer return ints, the low level problem it was intended to solve is long gone now... 2000-01-17 17:33:37 +00:00
Andi Gutmans
bdefd5da15 - Change IS_UNSET -> IS_NULL 2000-01-04 13:22:58 +00:00
Zeev Suraski
f2d703e916 - Nuke undefined_variable_string
- Introduce IS_UNSET
1999-12-31 13:56:59 +00:00
Zeev Suraski
80e20b5fea - Change var_reset() to set bool(0) instead of string("")
Authors should go over their code and change it to use var_reset() instead of manually
setting it to string(""), in case they're interested in the false value.
1999-12-29 17:29:26 +00:00
Zeev Suraski
b7a5b3c309 - Generalize the fast cache mechanism
- Add the HashTable struct to the fast cache mechanism
1999-12-27 19:07:33 +00:00
Andi Gutmans
62b2087a84 - Create two new macro's. ALLOC_ZVAL() and FREE_ZVAL(z) and make Zend use
them.
1999-12-24 15:22:11 +00:00
Andrei Zmievski
80bab9d939 We're using ZVAL's now. 1999-12-21 17:14:31 +00:00
Thies C. Arntzen
f352444541 added zval_del_ref() function 1999-10-07 12:20:40 +00:00
Zeev Suraski
69fa5199bc Let $GLOBALS actually work... 1999-09-03 01:34:52 +00:00
Zeev Suraski
81e0131bc9 *** empty log message *** 1999-08-28 21:43:24 +00:00
Zeev Suraski
cda27ae9ac Beef up debug macros 1999-08-28 10:18:54 +00:00
Zeev Suraski
aa8b27ba1d Better debug macros 1999-08-27 19:17:19 +00:00
Zeev Suraski
8d1de13aef 0.91 update 1999-07-19 20:02:12 +00:00