Commit Graph

1660 Commits

Author SHA1 Message Date
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
Dmitry Stogov
9701b644fa Compress handlers table 2018-01-31 16:46:30 +03:00
Dmitry Stogov
59ede4c82b Avoid redundand mask extraction 2018-01-31 13:47:43 +03:00
Dmitry Stogov
1d7eab12e6 Avoid redundand mask extraction 2018-01-31 13:34:34 +03:00
Dmitry Stogov
17a3b48454 Make IS_UNUSED to be zero. 2018-01-31 11:18:41 +03:00
Dmitry Stogov
7141631cc8 Change FETCH/ISSET instruction modifiers:
- Get rid of ZEND_ISEMPTY and ZEND_ISSET_ISEMPTY_MASK. Use just single ZEND_ISSET bit to make distinct between isset() and empty()
- Use ZEND_FETCH_GLOBAL, ZEND_FETCH_LOCAL and ZEND_FETCH_GLOBAL_LOCK as bitmask
- Removed unused ZEND_FETCH_STANDARD
- Extended ZEND_FETCH_ARG_MASK
2018-01-30 22:06:05 +03:00
Dmitry Stogov
5e8aa036f2 Access extra data stored in zval through macros 2018-01-23 12:56:22 +03:00
Dmitry Stogov
a87a2f464b Send by reference without duplication 2018-01-17 18:50:18 +03:00
Dmitry Stogov
dd51cb1e34 More effecient array duplication 2018-01-17 17:56:04 +03:00
Dmitry Stogov
0bfc4f34ca Avoid EG(vm_interrupt) check on forward JMP 2018-01-16 13:50:36 +03:00
Dmitry Stogov
267b78550e Use fastcall calling convention 2018-01-16 10:33:41 +03:00
Dmitry Stogov
12c386f5b9 Use ZEND_CLOSURE_OBJECT() macro to resolve closure op_array to closure object through address calculation, instead of op_array->prototype reuse. (reapply 781e1573af, now it should be OK). 2018-01-11 22:15:45 +03:00
Dmitry Stogov
6ba10a03e7 Revert "Use ZEND_CLOSURE_OBJECT() macro to resolve closure op_array to closure object through address calculation, instead of op_array->prototype reuse." (this patch is incomplete or wrong)
This reverts commit 781e1573af.
2018-01-11 17:27:26 +03:00
Dmitry Stogov
781e1573af Use ZEND_CLOSURE_OBJECT() macro to resolve closure op_array to closure object through address calculation, instead of op_array->prototype reuse. 2018-01-11 16:25:28 +03:00
Dmitry Stogov
f09c012ebe Mark FETCH_OBJ_R and INIT_METHOD_CALL as HOT_OBJ for (UNUSED+CONST and CV+CONST) 2018-01-10 19:14:52 +03:00
Dmitry Stogov
94508cdc3f Fixed whitespaces 2018-01-10 02:22:07 +03:00