Commit Graph

1539 Commits

Author SHA1 Message Date
Dmitry Stogov
76db01d9ff Moved "Using $this when not in object context" exception code into single VM helper. 2017-06-15 16:23:05 +03:00
Dmitry Stogov
8fe47a47cf Avoid run-time checks performed at compile-time. 2017-06-13 13:48:58 +03:00
Dmitry Stogov
6a024146bb Removed unused variable. 2017-06-06 16:08:44 +03:00
Dmitry Stogov
02e6c9c757 ZVAL_COPY_UNREF() micro-optimization 2017-06-02 00:38:09 +03:00
Dmitry Stogov
33d42802d3 Fixed support for C compilers that don't support global register variables. 2017-05-30 13:31:58 +03:00
Dmitry Stogov
6043f76ad7 Added ZEND_FUNC_NUM_ARGS, ZEND_FUNC_GET_ARGS instructions, to implement corresponding builtin functions.
Special optimisation for "array_slice(INT, func_get_args())" pattern.
2017-05-30 13:23:17 +03:00
Dmitry Stogov
017d65d74a Extend ZEND_SEND_ARRAY to eliminate array_slice() call for "call_user_func_array(_, array_slice(_, LONG, _))" pattern. 2017-05-30 12:25:46 +03:00
Dmitry Stogov
f00d1c72b4 Added ZEND_GET_CLASS, ZEMD_GET_CALLED_CLASS, ZEND_GET_TYPE instructions, to implement corresponding builtin functions. 2017-05-25 18:41:28 +03:00
Dmitry Stogov
cd953269d3 Added ZEND_COUNT instruction, to implement corresponding builtin. 2017-05-25 12:52:34 +03:00
Dmitry Stogov
44ec732752 Fixed ZEND_IN_ARRAY related issues 2017-05-25 10:26:42 +03:00
Dmitry Stogov
7c7383067f Added ZEND_IN_ARRAY instruction, implementing optimized in_array() builtin function, through hash lookup in flipped array 2017-05-24 23:00:48 +03:00
Xinchen Hui
26a6d20ab5 Fixed segfult in JIT (emalloc may trigger memory limitation)
Zend/tests/bug68412.phpt
2017-05-21 20:48:07 +08:00
Dmitry Stogov
8203a175b1 Remove unused opcode handlers 2017-05-18 13:18:08 +03:00
Dmitry Stogov
fc927dc263 Switch to HYBRID VM 2017-05-17 15:07:33 +03:00
Dmitry Stogov
7640e0a5f9 HYBRID VM cleanup 2017-05-16 09:24:23 +03:00
Dmitry Stogov
69b4f8ed79 Fixed USER_OPCODE handling in HYBRID VM. 2017-05-15 21:17:58 +03:00
Dmitry Stogov
c8f073d0d7 Avoid useless checks 2017-05-10 13:27:37 +03:00
Dmitry Stogov
27e01cd918 Implemented HYBRID VM instruction dispatch method that takes advantages of both CALL and GOTO VMs. 2017-05-03 10:01:22 +03:00
Nikita Popov
cfa6fa1525 Initialize retval in INCLUDE_OR_EVAL
In case the eval'd code throws.
2017-04-15 12:11:30 +02:00
Nikita Popov
ad8652818a Implement jumptable optimization 2017-04-10 22:23:14 +02:00
Nikita Popov
3895aa2f77 Merge branch 'PHP-7.1' 2017-04-09 15:51:38 +02:00
Nikita Popov
515e1e0cea Merge branch 'PHP-7.0' into PHP-7.1 2017-04-09 15:35:44 +02:00
Thomas Punt
744c4a5592 Resolve bug #74188 (undefined statics raising with ?? operator) 2017-04-09 15:29:31 +02:00
Rowan Collins
1b565f1393 Change 'undefined constant' from E_NOTICE to E_WARNING and mention deprecation
Implements RFC "Deprecate and Remove Bareword (Unquoted) Strings"
[https://wiki.php.net/rfc/deprecate-bareword-strings]
2017-03-23 18:52:43 +01:00
Nikita Popov
6ad0a6fb04 Merge branch 'PHP-7.1' 2017-03-15 19:50:26 +01:00
Nikita Popov
2bba4a0d7f Fix bug #69676 2017-03-15 19:49:02 +01: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
Xinchen Hui
6a584cf318 Fixed bug #74157 (Segfault with nested generators) 2017-02-26 12:05:56 +08:00
Dmitry Stogov
3d84aef55d Separate zend_fetch_static_property_address() into an inline function 2017-01-17 11:11:12 +03:00
Bob Weinand
9e3c35b6d1 Fix small mistake in generator creation introduced in 9a159f37 2017-01-15 19:26:15 +01:00
Dmitry Stogov
141d1ba980 Introduced "zend_type" - an abstraction for type-hinting representation. 2017-01-13 11:37:46 +03:00
Dmitry Stogov
15040b47f0 Merge branch 'PHP-7.1'
* PHP-7.1:
  Improved GENERATOR_CREATE opcode handler.
2017-01-09 22:25:25 +03:00
Dmitry Stogov
9a159f37e1 Improved GENERATOR_CREATE opcode handler. 2017-01-09 22:24:21 +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
Sara Golemon
16758a3c66 Merge branch 'PHP-7.1'
* PHP-7.1:
  Remove extraneous parentheses in conditions
2016-12-25 22:18:27 -08:00
Sébastien Santoro
5d7c774bea Remove extraneous parentheses in conditions
The zend_vm_gen.php generator now checks if the condition is already
enclosed by parentheses, and them only if needed.

This fixes nine clang/llvm parentheses-equality warnings.
2016-12-25 22:17:46 -08:00
Dmitry Stogov
3c6a2fb08c Fixed bug #73792 (invalid foreach loop hangs script) 2016-12-20 16:48:57 +03:00
Dmitry Stogov
fb73c1084c Few micro-optimizations 2016-12-19 15:36:37 +03:00
Dmitry Stogov
fac95658b3 Improved VM stack unwinding on exception.
Now zend_throw_exception_hook() is going to be called only when exception is actually thrown and not going to be recalled for each unwinded finction.
2016-12-12 10:55:32 +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
09b36113b0 Fix the bug in ZEND_ASSIGN_DIM (as nikic suggest) 2016-12-09 22:30:24 +08:00
Dmitry Stogov
a3526cd9b7 Regenerated zend_vm_execute.h (fixed white spaces) 2016-12-08 13:37:57 +03:00
Kalle Sommer Nielsen
cf24a61735 Disable C4101 warnings entirely on Windows 2016-12-08 03:50:31 +01:00
Dmitry Stogov
5011a11a6d Fixed memory leaks caused by exceptions thrown from destructors (one more case). 2016-12-07 01:43:13 +03:00
Dmitry Stogov
e8109e09aa Fixed memory leaks caused by exceptions thrown from destructors. 2016-12-07 00:41:07 +03:00
Dmitry Stogov
b4ad6d6d1b COALESCE can't throw exception 2016-12-06 10:21:44 +03:00
Dmitry Stogov
a722970033 Merge branch 'PHP-7.1'
* PHP-7.1:
  Micro optimizations
2016-12-06 10:01:38 +03:00
Dmitry Stogov
547b735d34 Micro optimizations 2016-12-06 10:01:18 +03:00