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
Dmitry Stogov
27d7671603
Avoid generation of rarely used specialized handler
2018-02-15 14:50:42 +03:00
Dmitry Stogov
23da83c8ca
Avoid inlining of rarely used handlers
2018-02-15 13:48:04 +03:00
Nikita Popov
db2475cec2
Fix unused variable compiler warnings
2018-02-05 20:58:15 +01:00
Nikita Popov
ef20d2990f
Remove unnecessary CE_STATIC_MEMBERS() checks
...
CE_STATIC_MEMBERS(ce) is destroyed after EG(active)=0 is set, so we
should never run into a situation where it is NULL inside the VM.
2018-02-05 18:54:17 +01:00
Dmitry Stogov
752d684971
Removed "dead" code
2018-02-05 20:43:08 +03:00
Dmitry Stogov
ca035f26aa
Moved "zval.u2.cache_slot" into free room of "zend_op"
2018-02-05 19:41:47 +03:00
Dmitry Stogov
3a794d39f0
Avoid repeatable ARG_SHOULD_BE_SENT_BY_REF() checks in FETCH_*FUNC_ARG and following SEND_VAR_EX. Perform the check once in a new CHECK_FUNC_ARG opcode and reuse in the following FETCH_*FUNC_ARG and SEND_FUNC_ARG (SEND_VAR_EX replacement).
2018-02-05 19:40:06 +03:00
Nikita Popov
e0171ed9d0
Avoid another unused opline warning
...
The unconditional opline load here used to be necessary for freeing
the return value in case of exception. However, this is no longer
the case, so using LOAD_OPLINE() should be sufficient now.
2018-02-03 17:43:41 +01:00
Nikita Popov
24e744d8a2
Avoid VM warning if building without global regs
2018-02-03 17:43:41 +01:00
Dmitry Stogov
ba298725d1
Changed CATCH instruction format (extended_value moved into op2, op2 into result, result into extended_value)
2018-01-31 22:39:30 +03:00
Dmitry Stogov
9c7fb529ce
Changed FETCH_CONSTANT instruction format (extended_value moved into op1)
2018-01-31 18:15:25 +03:00
Dmitry Stogov
f67f455ef7
Changed FETCH_CLASS instruction format (extended_value moved into op1)
2018-01-31 18:14:43 +03:00