Xinchen Hui
f9297387f4
Rename zval_dtor_func and ref_dotr_func
2018-07-06 18:47:30 +08:00
Xinchen Hui
e3355ac5ec
Revert "Rename _zval_dtor_func to _ref_dtor_func"
...
This reverts commit a362ae6b12
.
2018-07-06 18:37:45 +08:00
Xinchen Hui
a362ae6b12
Rename _zval_dtor_func to _ref_dtor_func
2018-07-06 18:32:27 +08:00
Dmitry Stogov
7eb045d31a
API cleanup. Removed unused functions (kept compatibility macros).
2018-07-04 00:50:57 +03:00
Dmitry Stogov
5eb1f92f31
Use zend_string_release_ex() instread of zend_string_release() in places, where we sure about string persistence.
2018-05-28 16:27:12 +03:00
Dmitry Stogov
925f05dd1a
Added missing debug arguments
2018-05-28 13:09:33 +03:00
Dmitry Stogov
1e783db679
Put ZEND_FASTCALL into the proper place.
2018-01-16 09:44:10 +03:00
Dmitry Stogov
022e029984
Optimize zval_dtor_func()
2018-01-16 00:57:47 +03:00
Xinchen Hui
a6519d0514
year++
2018-01-02 12:57:58 +08:00
Dmitry Stogov
dd1050fa6c
Improved branch prediction and code locality
2017-12-14 02:22:07 +03:00
Dmitry Stogov
747a5928ad
Added assertion
2017-12-07 15:01:23 +03:00
Dmitry Stogov
d3fa900780
Removed workaraouns for inconsistent zvals (REFCOUNTED+INTERNED). They should be fixed now.
2017-11-03 21:02:55 +03:00
Dmitry Stogov
990d8092a4
Reverted incomplete fix and too strict asserts.
2017-11-01 16:18:13 +03:00
Dmitry Stogov
b84cbefa94
Change checks that should be always true into ZEND_ASSERT() (some edge cases may be trapped here).
2017-10-31 15:41:51 +03:00
Dmitry Stogov
97e7521e49
AST don't have to be COPYABLE anymore.
2017-10-10 15:45:03 +03:00
Dmitry Stogov
ef5ea48741
Always use IS_CONSTANT_AST (IS_CONSTANT is removed).
2017-10-10 10:11:05 +03:00
Dmitry Stogov
39ded1d5f8
Changed zend_ast_ref structure to use only one allocation, removing dichotomy between heap/arena ASTs.
2017-10-09 16:57:51 +03: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