1
0
mirror of https://github.com/php/php-src.git synced 2026-04-22 23:48:14 +02:00
Commit Graph

13565 Commits

Author SHA1 Message Date
Dmitry Stogov a0e4488ec7 Optimize zend_hash_find() for the most usual case 2018-05-07 15:18:02 +03:00
Dmitry Stogov 34ed8e53fe Changed worst HashTable load factor from 1.0 to 0.5 2018-05-04 02:41:35 +03:00
Dmitry Stogov eafa92ba9d zend_fcall_info_cache.calling_scope is not used by zend_call_function() and doesn't have to be initialized.
It's used only as a result of zend_is_callable() in forward_static_call and spl_autoload.
2018-05-03 19:27:04 +03:00
Dmitry Stogov fdb347a753 zend_is_callable() improvement 2018-05-03 19:25:53 +03:00
Dmitry Stogov 1a63fa6ec9 Implemented Request #76178 (Class constants are slow: they should be inlined at runtime)
Run-time cache is used to eliminate recalculation of constant expression in RECV_INIT opcode (only non reference countable values are cached).
2018-05-03 14:40:18 +03:00
Dmitry Stogov c88be6aee1 Bit check micro-optimization 2018-04-28 14:13:12 +03:00
Dmitry Stogov 83f98f7340 Don't store values of PHP_SAPI and PHP_BINARY in file cache, because it may be used by different SAPI. 2018-04-28 01:20:49 +03:00
Nikita Popov 32692bb083 Merge branch 'PHP-7.2' 2018-04-26 16:17:23 +02:00
Nikita Popov 7c852a7961 Merge branch 'PHP-7.1' into PHP-7.2 2018-04-26 16:17:13 +02:00
shiguangqi2008@gmail.com 98ef183ed0 Fix memory leak in zend_disable_class() 2018-04-26 16:16:37 +02:00
Levi Morrison 0c80cb164f Fix bug #76198 2018-04-14 13:07:44 +02:00
Thomas Punt 4887357269 Implement flexible heredoc/nowdoc syntax
RFC: https://wiki.php.net/rfc/flexible_heredoc_nowdoc_syntaxes

* The ending label no longer has to be followed by a semicolon or
  newline. Any non-label character is fine.
* The ending label may be indented. The indentation will be stripped
  from all lines in the heredoc/nowdoc string.

Lexing of heredoc strings performs a scan-ahead to determine the
indentation of the ending label, so that the correct amount of
indentation can be removed when calculting the semantic values for
use by the parser. This makes the implementation quite a bit more
complicated than we would like :/
2018-04-13 21:35:37 +02:00
Dmitry Stogov 4df89a31b0 Eliminate useless checks 2018-04-04 02:12:26 +03:00
Dmitry Stogov cb464a53c8 Use "fastcall" calling convention 2018-04-04 01:12:59 +03:00
Dmitry Stogov dc091870ea Prefer reloading key->h 2018-04-02 23:43:37 +03:00
Dmitry Stogov db307eae03 Dereference child1 only after NULL check 2018-04-02 22:16:58 +03:00
Dmitry Stogov d4aba32d8c Cache negative defined() results 2018-03-30 16:41:02 +03:00
Dmitry Stogov 4aa9505b6e Merge identical handlers 2018-03-29 11:13:17 +03:00
David Carlier 112578fc35 Don't use optimize pragmas with clang 2018-03-23 19:05:51 +01:00
Nikita Popov ad87e2bd6a Merge branch 'PHP-7.2' 2018-03-23 18:57:58 +01:00
atvoicu 17ed2f21cf Add missing skip prefix for some SKIPIF messages 2018-03-23 18:56:36 +01:00
Dmitry Stogov 91ba1f2085 Remove "hot" mark from JMP(Z|NZ|ZNZ) with IS_CONST operand 2018-03-23 16:11:27 +03:00
Dmitry Stogov 295b233bfd Mark few more opcode handlers as "hot". 2018-03-23 13:59:47 +03:00
Dmitry Stogov a795bd8265 Optimize zend_hash_real_init() 2018-03-23 00:13:45 +03:00
Dmitry Stogov 8598240c69 Fixed a behavior break introduced by d7f2dc4ec6 2018-03-22 16:37:34 +03:00
Dmitry Stogov e791e93b55 Make ZEND_ISSET_ISEMPTY_CV specialised across ISSET/ISEMPTY and HOT (the handler is really small, so inlining affects executor size insignificantly) 2018-03-22 13:03:45 +03:00
Dmitry Stogov e6c179834b Allow extra specialisation for ISSET/ISEMPTY handlers 2018-03-22 13:02:49 +03:00
Dmitry Stogov 1735e29b7f Reduce overhead of extra-specialization for opcode handler selection. 2018-03-22 11:33:17 +03:00
Dmitry Stogov d7f2dc4ec6 Improve HashTable iterators handling:
- Avoid iterators check/update on each HashTable update opration
- Keep position equal (or above) nNumUsed instead of HT_INVALID_IDX
- Fixed iterators handling in array_unshift()
2018-03-22 02:41:49 +03:00
Dmitry Stogov feb22b24cf Micro optimization 2018-03-21 12:39:56 +03:00
Dmitry Stogov 28ab2060ee Micro optimization 2018-03-21 11:57:54 +03:00
Anatol Belski 18750a2238 Eliminate cast 2018-03-19 11:44:27 +01:00
Anatol Belski 397d40cdd7 Mark non exported symbol as static 2018-03-17 21:17:47 +01:00
Anatol Belski fa9ea3c9eb Use const pointers where appropriate 2018-03-16 20:37:51 +01:00
Anatol Belski e659fcd89e Workaround VA macro expansion difference with VC++ 2018-03-15 21:17:40 +01:00
Dmitry Stogov 4bbf200b4e Optmized AST creation 2018-03-15 15:40:04 +03:00
Dmitry Stogov eb39d8d686 Use cheaper functions 2018-03-15 12:46:19 +03:00
Dmitry Stogov bcacb7545c PHP scanner optimization 2018-03-15 01:33:17 +03:00
Dmitry Stogov 64f64cf0b7 zend_ast_destroy() optimization 2018-03-15 00:05:00 +03:00
Dmitry Stogov 73f7c84685 Mark zend_ast_export() as "cold". 2018-03-14 23:13:20 +03:00
Dmitry Stogov 53b474504d PHP scanner optimization 2018-03-14 21:27:57 +03:00
Dmitry Stogov 1af60a2a71 Keep initialized object_handlers structures in read-only memory. 2018-03-14 14:01:45 +03:00
Dmitry Stogov 9dc6661976 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fixed user-opcode support
2018-03-14 09:41:55 +03:00
Dmitry Stogov 975d144027 Fixed user-opcode support 2018-03-14 09:41:25 +03:00
Dmitry Stogov 8afb91cdad PHP scanner optimization 2018-03-14 01:48:17 +03:00
Dmitry Stogov d1585a9e3f Revert "Handle scanner error in first place (don't hide them from ext/tokenizer) and cheaper whitespace handlig."
This reverts commit 0d6da03f5c.
2018-03-14 01:08:03 +03:00
Dmitry Stogov 0d6da03f5c Handle scanner error in first place (don't hide them from ext/tokenizer) and cheaper whitespace handlig. 2018-03-13 18:42:09 +03:00
Dmitry Stogov 9c0dfd4f10 Get rid of useless SET_UNUSED() 2018-03-13 14:34:48 +03:00
Dmitry Stogov c7045174f1 Moved compiler helper functions from zend_opcode.c to zend_compile.c 2018-03-13 13:49:58 +03:00
Dmitry Stogov b3f91d16dd Fixed bug #75683 (Memory leak in zend_register_functions() in ZTS mode) 2018-03-12 11:04:54 +03:00