Commit Graph
174 Commits
Author SHA1 Message Date
Xinchen Hui 7a7ec01a49 year++ 2018-01-02 12:55:14 +08:00
Dmitry Stogov c24b3eff11 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Properly update string type flags
2017-09-13 01:46:12 +03:00
Dmitry Stogov d7a10f0e32 Properly update string type flags 2017-09-13 01:45:57 +03:00
Dmitry Stogov 5f1d553e7e Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Revert "Properly update string type flags"
2017-09-13 00:15:08 +03:00
Dmitry Stogov 83d8ebc991 Revert "Properly update string type flags"
This reverts commit 99b1a62d55.
2017-09-13 00:14:39 +03:00
Dmitry Stogov 7452fd0263 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Properly update string type flags
2017-09-12 23:43:42 +03:00
Dmitry Stogov 99b1a62d55 Properly update string type flags 2017-09-12 23:42:51 +03: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
Nikita Popov 896814e139 Make zval_ptr_dtor / _zval_dtor_func more robust
In particular, allow arrays with refcount>1, like we already allow
for all other types. _zval_dtor_func is now the same as
_zval_dtor_func_for_ptr with an extra refcount decrement check at
the start. At this point we might as well drop it...

Cherry-pick of ded69ee6e6 from
PHP-7.1.
2016-09-17 22:33:41 +02:00
Dmitry Stogov cca2c8ecc4 Reimplemented Bob's commit bac6fdb0c5 without insignificant renaming and white-space changes 2016-05-06 10:47:58 +03:00
Dmitry Stogov c19cb70dac Revert "Refactor zval cleanup into single function"
This reverts commit bac6fdb0c5.
2016-05-06 10:47:58 +03:00
Bob Weinand bac6fdb0c5 Refactor zval cleanup into single function
Also use zval_ptr_dtor_nogc() everywhere in Zend in favor of zval_dtor()
2016-05-05 23:31:57 +02:00
Nikita Popov 01df044fd5 Reset IMMUTABLE flag when copy_ctor'ing AST 2016-04-29 22:39:21 +02:00
Nikita Popov ded69ee6e6 Make zval_ptr_dtor / _zval_dtor_func more robust
In particular, allow arrays with refcount>1, like we already allow
for all other types. _zval_dtor_func is now the same as
_zval_dtor_func_for_ptr with an extra refcount decrement check at
the start. At this point we might as well drop it...
2016-04-22 17:48:35 +02:00
Xinchen Hui 563659822d Merge branch 'PHP-7.0' 2016-01-02 17:56:54 +08:00
Xinchen Hui 97a9470d97 bump year which is missed in rev 49493a2 2016-01-02 17:56:11 +08:00
Nikita Popov 65e456f364 Introduce BIND_LEXICAL
This opcodes inserts a local CV into the closure static variable
table. This replaces the previous mechanism of having static
variables marked as LEXICAL, which perform a symtable lookup
during copying.

This means a) functions which contain closures no longer have to
rebuild their symtable (better performance) and b) we can now track
used variables in SSA.
2015-12-29 23:14:53 +01:00
Dmitry Stogov 37f0c6b5cb Add myself into list of authors of the most refactored files. 2015-08-31 11:38:16 +03:00
Xinchen Hui 72b0627315 Fixed bug #69521 (Segfault in gc_collect_cycles()). 2015-07-02 18:43:06 +08:00
Dmitry Stogov 7aa7627172 Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes). 2015-06-30 13:59:27 +03:00
Dmitry Stogov 276080ec3a Added GC checks and improvements 2015-04-17 03:55:37 +03:00
Dmitry Stogov acfc31c0f8 Use zend_error_noreturn() for fatal errors 2015-04-01 13:32:23 +03:00
Dmitry Stogov db10b72523 Use fastcall calling convention for most critical ZE subsystems. 2015-03-13 21:10:09 +03:00
Dmitry Stogov 6b9c40280a Removed deprecated paths. Changed "switch" into series of "if". 2015-03-03 16:49:45 +03:00
Dmitry Stogov e97ae4fee8 Make zend_array_destroy() to free the corresponding zend_array 2015-02-24 18:34:37 +03:00
Dmitry Stogov e10e151e9b Merged zend_array and HashTable into the single data structure.
Now each HashTable is also zend_array, so it's refcounted and may be a subject for Copy on Write
zend_array_dup() was changed to allocate and return HashTable, instead of taking preallocated HashTable as argument.
2015-02-13 22:20:39 +03:00
Nikita Popov 6093c9370b Fix resource leak when casting to string 2015-01-24 23:18:26 +01:00
Xinchen Hui fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Stanislav Malyshev b7a7b1a624 trailing whitespace removal 2015-01-10 15:07:38 -08:00
Nikita Popov 1266515e19 Fix uses of zval_add_ref and add comment on usage
zval_add_ref should be used as a copy ctor, after the value was
already copied.

In particular when used with hash insertions, it should be applied
to the return value of the insert function.
2015-01-05 17:02:11 +01:00
Xinchen Hui faa4171507 Add test script and use efree_size 2015-01-05 22:21:37 +08:00
Xinchen Hui 40230eef81 Revert "Revert "Fix memory leak when dereferencing reference with refcount 1""
This reverts commit 7aab9659ee.
2015-01-05 22:13:22 +08:00
Xinchen Hui 7aab9659ee Revert "Fix memory leak when dereferencing reference with refcount 1"
This reverts commit f4cb5cc09d.

breaks tests Zend/tests/bug27268.phpt and Zend/tests/bug68262.phpt
2015-01-05 00:26:10 -05:00
Bob Weinand f4cb5cc09d Fix memory leak when dereferencing reference with refcount 1 2015-01-05 00:28:53 +01:00
Anatol Belski bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Dmitry Stogov 3727e26456 Improved zend_hash_clean() and added new optimized zend_symtable_clean() 2014-11-25 14:17:21 +03:00
Dmitry Stogov fb42d9d46e Use inline version of zval_ptr_dtor() 2014-11-25 13:05:35 +03:00
Dmitry Stogov ab7b38e336 Added new optimized zend_array_destroy() function 2014-11-25 12:58:29 +03:00
Anatol Belski 1b4fd5825a fix datatype mismatch warnings 2014-10-24 20:57:38 +02:00
Dmitry Stogov 0e270661a4 Use ADDREF instead of DUP, it must be enough. 2014-10-20 13:55:55 +04:00
Dmitry Stogov 661f90d4d1 Replaced Zend Memory Manager 2014-08-26 16:21:58 +04:00
Nikita Popov 6db293d5e0 Merge remote-tracking branch 'php-src/master' into ast
Conflicts:
	Zend/zend_compile.c
	Zend/zend_compile.h
	Zend/zend_globals.h
	Zend/zend_language_parser.y
	Zend/zend_language_scanner.c
	Zend/zend_language_scanner.l
	Zend/zend_types.h
2014-08-25 21:52:18 +02:00
Anatol Belski c3e3c98ec6 master renames phase 1 2014-08-25 19:24:55 +02:00
Anatol Belski 8ee2a4a9b5 first shot on merging the core fro the int64 branch 2014-08-16 11:16:11 +02:00
Nikita Popov edd9fcab1e Fix leaks
Must find a good way to handle constant expressions...
2014-07-26 18:08:31 +02:00
Xinchen Hui 5fb31215cb Fixed segfault 2014-07-23 11:05:03 +08:00
Dmitry Stogov f81956cb3e Fixed GC bug 2014-07-22 18:39:58 +04:00
Xinchen Hui 6cc487df2c Revert "stash" (pushed by accident)
This reverts commit a18bf5fc93.
2014-07-18 16:27:31 +08:00
Xinchen Hui a18bf5fc93 stash 2014-07-16 16:35:48 +08:00