Commit graph

1380 commits

Author SHA1 Message Date
Anatol Belski
bc5811f361 further sync for vim mode lines 2017-07-04 18:12:45 +02:00
Dmitry Stogov
bbb786c85b Split zend_init_execute_data() into zend_init_func_execute_data() and zend_init_code_execute_data() 2017-06-29 10:10:57 +03:00
Nikita Popov
4465b37105 Fix zend_get_zval_ptr() 2017-06-28 10:21:32 +02:00
Michał Brzuchalski
8e10c9d373 Implement object type annotation
RFC: https://wiki.php.net/rfc/object-typehint
2017-06-25 21:49:41 +02:00
Nikita Popov
957c24d5ee Merge branch 'PHP-7.1' 2017-06-25 19:49:25 +02:00
Nikita Popov
653b96347c Merge branch 'PHP-7.0' into PHP-7.1 2017-06-25 19:49:11 +02:00
Nikita Popov
2fddc4a7f1 Fixed bug #73900 2017-06-25 19:48:17 +02:00
Dmitry Stogov
bfa154448d VM refactoring, to avoid passing "execute_data" into helper functions that can access it using global register variable. 2017-06-16 01:42:49 +03:00
Dmitry Stogov
8bb29704ea Refactored API for constant array element propagation 2017-06-15 22:50:04 +03:00
Dmitry Stogov
c8f073d0d7 Avoid useless checks 2017-05-10 13:27:37 +03:00
Nikita Popov
0c3bc43207 Remove leftover code for generator stack page handling 2017-04-15 12:11:30 +02:00
Nikita Popov
3895aa2f77 Merge branch 'PHP-7.1' 2017-04-09 15:51:38 +02:00
Anatol Belski
c698299550 Interned strings unification for TS/NTS
Hereby, interned strings are supported in thread safe PHP. The patch
implements two types of interned strings

- interning per process, strings are not freed till process end
- interning per request, strings are freed at request end

There is no runtime interning.

With Opcache, all the permanent iterned strings are copied into SHM on
startup, additional copying into SHM might happen on demand.
2017-03-04 10:39:13 +01:00
Dmitry Stogov
3d84aef55d Separate zend_fetch_static_property_address() into an inline function 2017-01-17 11:11:12 +03:00
Dmitry Stogov
501ff45283 Fixed nullable handling (phpunit failure) 2017-01-13 19:51:12 +03:00
Dmitry Stogov
1a8ad8ac27 Avoid NULL dereference 2017-01-13 12:51:23 +03:00
Dmitry Stogov
141d1ba980 Introduced "zend_type" - an abstraction for type-hinting representation. 2017-01-13 11:37:46 +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
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Dmitry Stogov
088dd88eeb Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #73792 (invalid foreach loop hangs script)
  Fixed bug #73789 (Strange behavior of class constants in switch/case block)
2016-12-20 16:54:28 +03:00
Dmitry Stogov
43cc3d7d92 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #73792 (invalid foreach loop hangs script)
2016-12-20 16:53:06 +03:00
Xinchen Hui
7695fba388 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fix the bug in ZEND_ASSIGN_DIM (as nikic suggest)
  Revert "Refix bug #73686"
2016-12-09 22:30:41 +08:00
Xinchen Hui
6812721ef2 Revert "Refix bug #73686"
This reverts commit 4589386026.
2016-12-09 22:22:59 +08:00
Xinchen Hui
95f41f21e1 Merge branch 'PHP-7.1'
* PHP-7.1:
  Refix bug #73686
2016-12-09 16:43:45 +08:00
Xinchen Hui
4589386026 Refix bug #73686 2016-12-09 16:37:22 +08:00
Dmitry Stogov
e8109e09aa Fixed memory leaks caused by exceptions thrown from destructors. 2016-12-07 00:41:07 +03:00
Dmitry Stogov
22cebaf89a Revert "Fix return value memory leaks upon exceptions in opcode operand freeing"
This reverts commit 9ad9d7ae37.
2016-12-02 11:58:41 +03:00
Dmitry Stogov
8fa691ea8a Revert "Fix a few valgrind warnings with undefing result"
This reverts commit 8f4e100f21.
2016-12-02 11:58:25 +03:00
Bob Weinand
8f4e100f21 Fix a few valgrind warnings with undefing result 2016-12-01 10:15:07 +01:00
Bob Weinand
9ad9d7ae37 Fix return value memory leaks upon exceptions in opcode operand freeing 2016-11-30 17:44:34 +01:00
Dmitry Stogov
1ab44223bf Export zend_do_fcall_overloaded() 2016-11-22 18:36:27 +03:00
Dmitry Stogov
653c9e1fa2 Merge branch 'PHP-7.1'
* PHP-7.1:
  Removed useless (double) checks for EG(exception). (Bob)
2016-11-22 11:51:42 +03:00
Dmitry Stogov
8d70b04a1c Removed useless (double) checks for EG(exception). (Bob) 2016-11-22 11:50:48 +03:00
Dmitry Stogov
68ee168c75 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed memory leak (Bob)
2016-11-22 11:23:17 +03:00
Dmitry Stogov
db5bbe94be Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed memory leak (Bob)
2016-11-22 11:22:55 +03:00
Dmitry Stogov
63ea4d194b Fixed memory leak (Bob) 2016-11-22 11:22:10 +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
Dmitry Stogov
3e0e404173 Merge branch 'PHP-7.1'
* PHP-7.1:
  zval_dtor_func_for_ptr() -> zval_dtor_func()
2016-09-29 11:00:13 +03:00
Dmitry Stogov
53c0a04185 zval_dtor_func_for_ptr() -> zval_dtor_func() 2016-09-29 10:59:54 +03:00
Dmitry Stogov
02a6c3a343 Merge branch 'PHP-7.1'
* PHP-7.1:
  Better fix for bug #72854 (avoid extra copy and creating reference to stack variable)
2016-09-29 10:57:39 +03:00
Dmitry Stogov
8863ca76e6 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Better fix for bug #72854 (avoid extra copy and creating reference to stack variable)
2016-09-29 10:57:09 +03:00
Dmitry Stogov
e7f4355d9b Better fix for bug #72854 (avoid extra copy and creating reference to stack variable) 2016-09-29 10:56:01 +03:00
Dmitry Stogov
97628da24a Expose information about calls to "fake" closures (created through ReflectionFunction::getClosure), to allow extra specialization of RETRUN opcode handler. 2016-09-26 17:44:28 +03:00
Nikita Popov
daa2b75c76 Fix some sizeof(zend_long) > sizeof(size_t) issues
Fix a couple of mistakes that are only relevant if
sizeof(zend_long) > sizeof(size_t).

* Fix cast order in string offset check: Negation should happen
  after the (zend_long) cast, otherwise sign extension does not
  occur.
* Use Z_UL in zend_inference.
* Use aligned size for HT_USED_SIZE in zend_persist: The issue is
  that on x86-32 uint64_t is considered to be 4-aligned, so the
  alignment assumption does not hold.
2016-09-05 15:33:02 +02:00
Davey Shafik
12ee17d5e0 Implement \ArgumentCountError exception 2016-08-30 19:35:56 -07:00
Xinchen Hui
557f1ccf0c Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #72943 (assign_dim on string doesn't reset hval)

Conflicts:
	Zend/zend_execute.c
2016-08-26 18:32:54 +08:00
Xinchen Hui
c67fa3c91d Fixed bug #72943 (assign_dim on string doesn't reset hval) 2016-08-26 18:30:08 +08:00
Xinchen Hui
e849e65d89 This is unecessary for 7.1 (IS_ERROR is an internal type) 2016-08-21 17:40:10 +08:00
Xinchen Hui
e572035ecf Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug  #72911 (Memleak in zend_binary_assign_op_obj_helper)
  Fixed bug #72907 (null pointer deref, segfault in gc_remove_zval_from_buffer (zend_gc.c:260))
2016-08-21 17:39:52 +08:00