Commit graph

1787 commits

Author SHA1 Message Date
Dmitry Stogov
59c2ff2543 Embed zend_leave_helper() into hybrid executor to avoid call overhead. 2018-06-05 11:33:19 +03:00
Dmitry Stogov
b6a2ae3a5b Cleanup 2018-06-05 11:26:15 +03:00
Dmitry Stogov
9e0f131d2b Fixed ISSET/ISEMPTY bit meaning to simplify run-time checks 2018-05-31 19:02:51 +03:00
Dmitry Stogov
84aab1d4e1 Marked rarely used opcodes as "cold" (e.g. ADD_CONST_CONST ususaly optimized out). 2018-05-30 01:50:44 +03:00
Dmitry Stogov
da5a44c1c0 Revert "Avoid reference-counting"
This reverts commit ea26ab3393.
2018-05-29 18:04:16 +03:00
Anatol Belski
6f4a01da21 Fix build without global registers 2018-05-28 20:44:58 +02:00
Dmitry Stogov
c27dda709c Removed dead code 2018-05-28 18:29:43 +03:00
Dmitry Stogov
c9df8ac6c5 Separate common code into helper function 2018-05-28 18:11:43 +03:00
Dmitry Stogov
ea26ab3393 Avoid reference-counting 2018-05-28 17:10:58 +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
e9e2d068b6 Fixed conditions 2018-05-14 17:23:37 +03:00
Dmitry Stogov
b8a91ac50b Use "fastcall" calling convention 2018-05-08 01:31:49 +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
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
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
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
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
a2d1f2df46 Eliminate conditional branches 2018-03-07 00:03:13 +03:00
Dmitry Stogov
6fb9e24218 Allow generation of VM map 2018-02-22 15:31:00 +03:00
Dmitry Stogov
bd908f6145 Fixed build without global register variables 2018-02-22 11:00:29 +03:00
Dmitry Stogov
927748b271 Reorganize make_real_object() related code 2018-02-21 18:43:38 +03:00
Dmitry Stogov
ecb52b8b3b Move exceprional code into helper & zend_fetch_var_address_helper() micro-optimization. 2018-02-21 17:09:42 +03:00
Dmitry Stogov
7559b1c50c Move result address calculation from specialized handlers to less specialized helpers 2018-02-21 16:06:29 +03:00
Dmitry Stogov
9c0427cada Mark exceptional helpers as "cold" 2018-02-21 12:07:29 +03:00
Dmitry Stogov
e1b1cff48d Move exceptional code into helpers 2018-02-21 10:10:04 +03:00
Dmitry Stogov
41eb70a493 Added expectation 2018-02-21 02:49:40 +03:00
Dmitry Stogov
b53f5cc92d Move exceptional code into helpers 2018-02-21 01:27:39 +03:00
Dmitry Stogov
a00286921e Move cold code, duplicated by specializer, into helper functions 2018-02-20 23:44:25 +03:00
Dmitry Stogov
b46f10b43f Fixed build without global register variables 2018-02-20 20:39:02 +03:00
Dmitry Stogov
8b7cdbaa49 Separate slow path with make_real_object() and related code into "cold" function. 2018-02-20 17:22:11 +03:00
Dmitry Stogov
cbf2d91911 Separate cold paths of ISSET_ISEMPTY_DIM_OBJ 2018-02-20 14:42:53 +03:00
Haitao Lv
764e231cc5 fix ZEND_VM_SET_OPCODE_HANDLER cannot set user opcode handler 2018-02-20 10:46:41 +03:00
Dmitry Stogov
050d62484b Fixed typo 2018-02-19 17:57:46 +03:00
Dmitry Stogov
6d3e1bd124 Added VM instrumentation ability 2018-02-19 16:42:02 +03:00
Dmitry Stogov
190a970dd6 Elimintate duplicate error message 2018-02-19 16:11:28 +03:00
Nikita Popov
b0af9ac733 Avoid live range references in opcodes
Don't store the live range of the freed variable for FREE_ON_RETURN
frees, instead look it up at runtime. As this is an extremely
unlikely codepath (in particular, it requires a loop variable with
a throwing destructor), saving the runtime lookup of the live range
is not worth the extra complexity this adds everywhere else.
2018-02-16 21:30:48 +01:00
Nikita Popov
f61c01eeb1 Fix unused variable warning 2018-02-16 15:31:54 +01:00
Dmitry Stogov
b4112ea288 Don't make expectations about non-constant zval refcauntability 2018-02-16 15:37:04 +03:00
Dmitry Stogov
6fadb72c0b Move exceptional code into "cold" helpers 2018-02-16 02:45:31 +03:00
Dmitry Stogov
02aea893fb Use Z_TYPE_INFO_REFCOUNTED() macro 2018-02-15 21:54:49 +03:00
Dmitry Stogov
285bfb96fe Optimize "backup" functions of inlined opcode handlers for size 2018-02-15 17:04:41 +03:00
Dmitry Stogov
633d037ed5 Added simple VM instrumentation ability 2018-02-15 15:55:19 +03:00