Nikita Popov
6276dd826b
Use ZEND_TYPE_IS_SET() when checking for property types
...
Instead of a simple if or 0 comparison. This would no longer work
if zend_type is a struct.
2019-09-23 16:53:54 +02:00
Nikita Popov
9e8ba7891e
Change representation of zend_type from type code to MAY_BE_* mask
...
This switches zend_type from storing a single IS_* type code to
storing a MAY_BE_* type mask. Right now most code still assumes
that there is only a single type in the mask (or two together
with MAY_BE_NULL). But this will make it a lot simpler to introduce
union types.
An additional advantage (and why I'm doing this separately), is
that a number of special cases no longer need to be handled
separately: We can do a single mask & (1 << type) check to handle
all simple types, booleans (true|false) and null.
2019-09-23 15:31:35 +02:00
Nikita Popov
cdd4e591a4
Don't make argument nullable based on AST null initializer
...
Closes GH-4720.
2019-09-19 11:27:00 +02:00
Nikita Popov
2cafaab885
Merge branch 'PHP-7.4'
2019-09-17 13:15:01 +02:00
Nikita Popov
d266ba4f2d
Check for exception after calling count_values()
...
To avoid a duplicate error if count_values() throws.
2019-09-17 13:13:44 +02:00
Dmitry Stogov
cf4c4ee900
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fixed bug #78531 (Crash when using undefined variable as object
2019-09-13 01:43:40 +03:00
Dmitry Stogov
51d9f32dbe
Fixed bug #78531 (Crash when using undefined variable as object
2019-09-13 01:42:02 +03:00
Dmitry Stogov
86a56f89a3
Use zval_try_get_tmp_string() instead of zval_get_tmp_string() for cheaper EG(exception) check
2019-09-13 00:20:06 +03:00
Dmitry Stogov
0a7233f2aa
Avoid reloading
2019-09-12 20:13:31 +03:00
Dmitry Stogov
8b10fcd3e7
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Load string once
2019-09-12 18:53:26 +03:00
Dmitry Stogov
5a616191f3
Load string once
2019-09-12 18:46:13 +03:00
Nikita Popov
f61f122b9a
Merge branch 'PHP-7.4'
2019-09-12 16:41:45 +02:00
Nikita Popov
4b9ebd837b
Allow throwing exception while loading parent class
...
This is a fix for symfony/symfony#32995 .
The behavior is:
* Throwing exception when loading parent/interface is allowed
(and we will also throw one if the class is simply not found).
* If this happens, the bucket key for the class is reset, so
it's possibly to try registering the same class again.
* However, if the class has already been used due to a variance
obligation, the exception is upgraded to a fatal error, as we
cannot safely unregister the class stub anymore.
2019-09-12 16:41:18 +02:00
Dmitry Stogov
02c83b809a
ceanup
2019-09-10 15:12:42 +03:00
Nikita Popov
ee4b11c668
Detect calls to abstract methods in get_method() already
...
Instead of checking for this during DO_FCALL, already detect this
case during get_method()/get_static_method(), similar to visibility
checks.
This causes a minor difference in behavior, in that arguments will
no longer be evaluated. I think this is correct though (and consistent
with visibility errors).
2019-09-06 15:05:24 +02:00
Dmitry Stogov
9513b20738
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Revert "Microoptimization (avoid code duplication)"
2019-09-05 15:35:42 +03:00
Dmitry Stogov
4ecdff2da8
Revert "Microoptimization (avoid code duplication)"
...
This reverts commit 25d97f5eee
.
2019-09-05 15:35:19 +03:00
Dmitry Stogov
1b5d41751f
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Microoptimization (avoid code duplication)
2019-09-05 13:45:25 +03:00
Dmitry Stogov
25d97f5eee
Microoptimization (avoid code duplication)
2019-09-05 13:44:46 +03:00
Dmitry Stogov
0f8bb9e37d
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Remove HOT attribute from some VM handlers. Comparisons almost always followed by JMPZ/JMPNZ; JMPZNZ is rare used.
Remove --with-zlib-dir option from mysqlnd config
2019-09-05 11:43:13 +03:00
Dmitry Stogov
7237da27fe
Remove HOT attribute from some VM handlers. Comparisons almost always followed by JMPZ/JMPNZ; JMPZNZ is rare used.
2019-09-05 11:40:15 +03:00
Nikita Popov
395e87d497
Merge branch 'PHP-7.4'
2019-09-04 15:33:16 +02:00
Nikita Popov
b6f76aca54
Improve exception handling for abstract/deprecated calls
...
Reuse existing arg freeing loop instead of duplicating it.
Additionally also handle deprecated in DO_FCALL_BY_NAME.
2019-09-04 15:19:21 +02:00
Nikita Popov
b02f425b6c
Merge branch 'PHP-7.4'
2019-09-04 12:47:21 +02:00
Nikita Popov
4bb7282742
Fix handling of abstract/deprecated exception
...
The exception mechanism assumes that exceptions from DO_FCALL are
already happening after the function call. This means that we are
currently leaking the passed arguments, and I think we can also
corrupt the VM stack due to incorrect frame linking in some cases
(there are assertion failures if the VM stack page size is reduced).
Instead handle the stack frame freeing manually for this special
case.
2019-09-04 12:46:00 +02:00
Nikita Popov
603b9c43cb
Add arg type assertions to DO_ICALL
...
Now that DO_ICALL is also used for functions with type hints, we
should include the arginfo sanity check assertions in there as
well.
2019-09-02 14:30:51 +02:00
Nikita Popov
d00036e625
Merge branch 'PHP-7.4'
2019-08-29 12:34:31 +02:00
Nikita Popov
a12fe30590
Merge branch 'PHP-7.3' into PHP-7.4
2019-08-29 12:34:07 +02:00
Nikita Popov
34edd4aa2a
Merge branch 'PHP-7.2' into PHP-7.3
2019-08-29 12:33:04 +02:00
Nikita Popov
ed749edd47
Fix use-after-free of immediately invoked closure with extra args
2019-08-29 12:32:03 +02:00
Nikita Popov
d93b094584
Throw TypeError from VM implementation of get_class()
...
The normal function already throws TypeError through the usual zpp
mechanism, but the VM implementation handles this manually and has
not been updated.
2019-08-27 09:37:48 +02:00
Dmitry Stogov
b912335315
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Inline zend_zval_ptr() in executor explicitely (only on hot paths)
2019-08-06 16:33:27 +03:00
Dmitry Stogov
d1fd4607d0
Inline zend_zval_ptr() in executor explicitely (only on hot paths)
2019-08-06 16:28:42 +03:00
Nikita Popov
e63093e547
Merge branch 'PHP-7.4'
2019-08-01 10:11:02 +02:00
Nikita Popov
afd96392a3
Revert "Use RW fetch for argument unpacking"
...
This reverts commit 6913ec3282
.
This reverts commit a9e332e027
.
Causes https://bugs.php.net/bug.php?id=78356 , which I don't have
a good solution for.
2019-08-01 10:06:53 +02:00
Nikita Popov
14f99ede42
Merge branch 'PHP-7.4'
2019-07-30 10:07:25 +02:00
Nikita Popov
6913ec3282
Use RW fetch for argument unpacking
...
Argument unpacking may need to create references inside the array
that is being unpacked. However, it currently can only do this
if a plain variable is unpacked, not for any nested accesses,
because the value is fetched for read. Resolve this by fetching
the operands for RW.
2019-07-30 10:07:08 +02:00
Dmitry Stogov
96dab0a657
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Avoid over-specialization
2019-07-24 20:00:55 +03:00
Dmitry Stogov
853b426ecf
Avoid over-specialization
2019-07-24 19:51:56 +03:00
Dmitry Stogov
30886007c1
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Reordering
2019-07-24 18:52:55 +03:00
Dmitry Stogov
d7e8abb4aa
Reordering
2019-07-24 18:49:46 +03:00
Dmitry Stogov
a106e52b10
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Delay dereference
2019-07-24 18:40:03 +03:00
Dmitry Stogov
22e7ee3bb3
Delay dereference
2019-07-24 18:36:50 +03:00
Dmitry Stogov
1f38adb501
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Avoid reloading
2019-07-24 17:38:42 +03:00
Dmitry Stogov
6191df7553
Avoid reloading
2019-07-24 17:30:38 +03:00
Dmitry Stogov
57d9b94dea
Simplify TMP/VAR operand releasing
2019-07-24 14:13:40 +03:00
Nikita Popov
dc6341eb78
Merge branch 'PHP-7.4'
2019-07-24 10:07:51 +02:00
Nikita Popov
1eb706179f
Avoid references in TMP var
...
Make sure we deref the OBJ_IS result, because we store it in a TMP
var, which is not allowed to contain references and will cause
assertion failures in the unspecialized VM.
This also partially reverts fd463a9a60
,
which merged the TMP and VAR specializations of COALESCE to work
around this bug.
An alternative would be to change the result type of OBJ_IS back
to VAR.
2019-07-24 10:07:26 +02:00
Nikita Popov
80681e8d40
Merge branch 'PHP-7.4'
2019-07-24 09:55:09 +02:00
Nikita Popov
9e4603f772
Try to fix macos build
...
By avoiding unused variable opline warnings. Also clean up the
replacement of ZEND_VM_SPEC -- we were sometimes treating it as
an always-defined constant with a value (what it actually is) and
sometimes as a conditionally defined constant (which it isn't, but
which still worked thanks to the specializer). Switch to only
treating it as a constant with a value.
2019-07-24 09:44:55 +02:00
Dmitry Stogov
43c4e4cd22
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fixed unspecialized executor
2019-07-24 01:43:20 +03:00
Dmitry Stogov
eaa9048973
Fixed unspecialized executor
2019-07-24 01:43:01 +03:00
Dmitry Stogov
97912023bb
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Use run-time cache to avoid repeatable hash lookups in ZEND_DECLARE_CLASS_DELAYED
2019-07-19 11:46:35 +03:00
Dmitry Stogov
445d51347d
Use run-time cache to avoid repeatable hash lookups in ZEND_DECLARE_CLASS_DELAYED
2019-07-19 11:46:03 +03:00
Dmitry Stogov
a837b80a48
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Use run-time cache to avoid repeatable hash lookups when creating anonymous functions and classes
2019-07-19 10:45:00 +03:00
Dmitry Stogov
d5943f5a11
Use run-time cache to avoid repeatable hash lookups when creating anonymous functions and classes
2019-07-19 10:43:49 +03:00
Dmitry Stogov
5ac3580b9b
Merge branch 'PHP-7.4'
...
* PHP-7.4:
ZEND_DECLARE_ANON_CLASS doesn't need to skip anything now. It's immediatelly followed by ZEND_NEW.
2019-07-19 10:10:50 +03:00
Dmitry Stogov
b065fbde19
ZEND_DECLARE_ANON_CLASS doesn't need to skip anything now. It's immediatelly followed by ZEND_NEW.
2019-07-19 10:09:26 +03:00
Dmitry Stogov
dea80d708d
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Merge common code
2019-07-18 16:50:56 +03:00
Dmitry Stogov
7cf651c39e
Merge common code
2019-07-18 16:46:25 +03:00
Dmitry Stogov
b1f17a2579
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Avoid extra specialization for cold opcodes
2019-07-17 14:04:26 +03:00
Dmitry Stogov
b30e4a5aa6
Avoid extra specialization for cold opcodes
2019-07-17 14:03:48 +03:00
Dmitry Stogov
a997a23f61
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Added specialization for comparison instructions and QM_ASSIGN
2019-07-17 09:12:27 +03:00
Dmitry Stogov
918f09f72a
Added specialization for comparison instructions and QM_ASSIGN
2019-07-17 09:12:01 +03:00
Dmitry Stogov
51442a428c
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Separate "cold" and common unspecialized code
2019-07-17 00:56:06 +03:00
Dmitry Stogov
ee5828205e
Separate "cold" and common unspecialized code
2019-07-17 00:52:26 +03:00
Dmitry Stogov
72c6ea9cb8
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Slit INC/DEC opcodes into hot/cold parts and remove specialized versioins for LONG_OR_DOUBLE.
2019-07-16 17:40:31 +03:00
Dmitry Stogov
349a388b90
Slit INC/DEC opcodes into hot/cold parts and remove specialized versioins for LONG_OR_DOUBLE.
2019-07-16 17:39:25 +03:00
Dmitry Stogov
2ac93e2965
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Replace deprecated conditions by ZEND_ASSERT.
2019-07-16 13:50:55 +03:00
Dmitry Stogov
c1b9088903
Replace deprecated conditions by ZEND_ASSERT.
2019-07-16 13:50:25 +03:00
Dmitry Stogov
ab2888511b
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Delay IS_UNDEF checks
2019-07-16 11:17:04 +03:00
Dmitry Stogov
1d4c38421a
Delay IS_UNDEF checks
2019-07-16 11:16:45 +03:00
Dmitry Stogov
c0b683e751
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fixed incorrect specialization (missed IS_INDIRECT handling)
2019-07-16 01:54:34 +03:00
Dmitry Stogov
2e26b063b6
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fixed incorrect specialization (missed IS_INDIRECT handling)
2019-07-16 01:54:22 +03:00
Dmitry Stogov
c570980175
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Fixed incorrect specialization (missed IS_INDIRECT handling)
2019-07-16 01:52:11 +03:00
Dmitry Stogov
9ccf3fb996
Fixed incorrect specialization (missed IS_INDIRECT handling)
2019-07-16 01:50:10 +03:00
Dmitry Stogov
319e2bc42e
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Use common code for double math
2019-07-12 11:42:11 +03:00
Dmitry Stogov
0793af0673
Use common code for double math
2019-07-12 11:40:56 +03:00
Dmitry Stogov
3c89a3d716
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Separate "cold" parts of comparison instructions
2019-07-11 20:45:12 +03:00
Dmitry Stogov
ef1a1a0698
Separate "cold" parts of comparison instructions
2019-07-11 20:44:39 +03:00
Dmitry Stogov
b4ee279bf4
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Separate "cold" parts of binary op instructions
2019-07-11 18:23:48 +03:00
Dmitry Stogov
be94c0c3c6
Separate "cold" parts of binary op instructions
2019-07-11 18:23:08 +03:00
Dmitry Stogov
10f53f9c80
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Avoid unintended inlining
2019-07-09 14:02:12 +03:00
Dmitry Stogov
8f0c87e1b6
Avoid unintended inlining
2019-07-09 14:01:48 +03:00
Dmitry Stogov
ee9f03fb4c
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Remove duplicated code for (PRE|POST)_DEC_(OBJ|STATIC_PROP) opcodes
2019-07-09 10:47:15 +03:00
Dmitry Stogov
e1f418dd18
Remove duplicated code for (PRE|POST)_DEC_(OBJ|STATIC_PROP) opcodes
2019-07-09 10:46:04 +03:00
Dmitry Stogov
1b5b8175af
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Replace ZEND_ASSIGN_ADD (and others) by ZEND_ASSIGN_OP, ZEND_ASSIGN_DIM_OP, ZEND_ASSGIN_OBJ_OP and ZEND_ASSIGN_STATIC_PROP_OP
2019-07-05 12:16:30 +03:00
Dmitry Stogov
48ca5a1e17
Replace ZEND_ASSIGN_ADD (and others) by ZEND_ASSIGN_OP, ZEND_ASSIGN_DIM_OP, ZEND_ASSGIN_OBJ_OP and ZEND_ASSIGN_STATIC_PROP_OP
2019-07-05 12:03:25 +03:00
Dmitry Stogov
806e38a3a4
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Improve zend_binary_assign_op helpers. Reorder opcode numbers to make ADD-POW and ASSIGN_ADD-ASSIGN_POW opcodes sequencional.
2019-07-04 17:37:52 +03:00
Dmitry Stogov
ef05eab432
Improve zend_binary_assign_op helpers.
...
Reorder opcode numbers to make ADD-POW and ASSIGN_ADD-ASSIGN_POW opcodes sequencional.
2019-07-04 17:25:43 +03:00
Dmitry Stogov
6188a69b8a
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Optimization of INC/DEC helpers
2019-07-03 10:50:14 +03:00
Dmitry Stogov
56b8b165f8
Optimization of INC/DEC helpers
2019-07-03 10:33:03 +03:00
Nikita Popov
05ac4acc24
Merge branch 'PHP-7.4'
2019-07-02 10:17:25 +02:00
Nikita Popov
03846afdf7
Fix clang build
2019-07-02 10:16:55 +02:00
Dmitry Stogov
ccbdd41e5c
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Use string destructor instead of general zval_ptr_dtor_nogc()
2019-07-02 01:15:39 +03:00
Dmitry Stogov
2d4bb4f44a
Use string destructor instead of general zval_ptr_dtor_nogc()
2019-07-02 01:14:33 +03:00
Dmitry Stogov
686f6b383a
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Eliminate exception checks
2019-07-02 01:13:23 +03:00
Dmitry Stogov
f58c645dcc
Eliminate exception checks
2019-07-02 01:11:41 +03:00
Dmitry Stogov
f393502e7f
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Micro-optimization
2019-07-01 16:57:55 +03:00
Dmitry Stogov
f2b6b2eee8
Micro-optimization
2019-07-01 16:57:25 +03:00
Dmitry Stogov
0b6c294e03
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fixed GOTO VM
2019-07-01 15:51:36 +03:00
Dmitry Stogov
39a0854307
Fixed GOTO VM
2019-07-01 15:50:53 +03:00
Dmitry Stogov
e4f4be1a05
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Reduce overhead of delayed early binding
2019-06-25 14:21:23 +03:00
Dmitry Stogov
e8f1f70101
Reduce overhead of delayed early binding
2019-06-25 14:20:41 +03:00
Dmitry Stogov
ca22c456ca
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Keep lowercased parent class name as second argument of DECLARE_CLASS to avoid extra work at run-time
2019-06-25 11:32:03 +03:00
Dmitry Stogov
759f4ecd8b
Keep lowercased parent class name as second argument of DECLARE_CLASS to avoid extra work at run-time
2019-06-25 11:30:58 +03:00
Dmitry Stogov
e18c60cd8d
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fixed bug 78175 (Preloading must store default values of static variables and properties)
2019-06-24 20:34:05 +03:00
Dmitry Stogov
0f29fb5cd8
Fixed bug 78175 (Preloading must store default values of static variables and properties)
2019-06-24 20:32:27 +03:00
Dmitry Stogov
53bcc2339c
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Cleanup
2019-06-21 11:46:33 +03:00
Dmitry Stogov
e1e8e670df
Cleanup
2019-06-21 11:43:17 +03:00
Nikita Popov
3645292235
Merge branch 'PHP-7.4'
2019-06-19 15:09:39 +02:00
Nikita Popov
ed2a242317
Fix signed shift UB
2019-06-19 15:09:00 +02:00
Nikita Popov
4d90848d68
Don't verify arginfo types for internal functions
...
To avoid duplicate type checks. In debug builds arginfo is still
checked and will generate an assertions if the function doesn't
subsequently throw an exception.
Some test results change due to differences in zpp and arginfo
error messages.
2019-06-17 11:46:28 +02:00
Nikita Popov
719a19d825
Merge branch 'PHP-7.4'
2019-06-13 10:59:18 +02:00
Nikita Popov
cac6b04113
Fixed bug #78154
2019-06-13 10:59:01 +02:00
Joe Watkins
f93cd21b52
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Revert "micro-optimization"
This micro optimization caused several bugs in at least Xdebug, while
i_init_func_execute_data is not exported, APIs that are exported call it
this makes their use awkward for no real gain.
2019-06-12 20:21:59 +02:00
Joe Watkins
175c7bf6fe
Revert "micro-optimization"
...
This reverts commit 374f769982
.
2019-06-12 20:04:47 +02:00
Nikita Popov
e4fae9c061
Merge branch 'PHP-7.4'
2019-06-11 13:16:38 +02:00
Nikita Popov
89b2d88659
Register class before fetching parent
...
We want the class declaration to be available while compiling the
parent class.
2019-06-11 13:09:33 +02:00
Dmitry Stogov
2b5a3afead
Merge branch 'PHP-7.4'
...
* PHP-7.4:
micro-optimization
2019-06-10 16:43:36 +03:00
Dmitry Stogov
374f769982
micro-optimization
2019-06-10 16:43:20 +03:00
Nikita Popov
00d549d73d
Merge branch 'PHP-7.4'
2019-06-06 14:56:58 +02:00
Nikita Popov
7780ba9660
Try to fix Windows build
2019-06-06 14:56:42 +02:00
Dmitry Stogov
dbd1ecd09f
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Support for exceptions thrown during "Array to string conversion" error processing
Reduce over-specialization for quite seldom instructions
2019-06-06 14:10:23 +03:00
Dmitry Stogov
a95014dc10
Reduce over-specialization for quite seldom instructions
2019-06-06 13:13:09 +03:00
Dmitry Stogov
e029cc4dd4
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Cheaper checks for exceptions thrown from __toString()
2019-06-06 02:23:17 +03:00
Dmitry Stogov
457392fa64
Cheaper checks for exceptions thrown from __toString()
2019-06-06 01:47:22 +03:00
Dmitry Stogov
5f3ee3afe7
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Prevent generation of specialized ZEND_ASSIGN_OP_..._STATIC_PROP handlers, that call unspecialized helper, anyway.
2019-06-05 17:38:36 +03:00
Dmitry Stogov
3f4dfe1877
Prevent generation of specialized ZEND_ASSIGN_OP_..._STATIC_PROP handlers, that call unspecialized helper, anyway.
2019-06-05 17:38:13 +03:00
Nikita Popov
7686b0b889
Merge branch 'PHP-7.4'
2019-06-05 14:53:50 +02:00
Nikita Popov
a31f46421d
Allow exceptions in __toString()
...
RFC: https://wiki.php.net/rfc/tostring_exceptions
And convert some object to string conversion related recoverable
fatal errors into Error exceptions.
Improve exception safety of internal code performing string
conversions.
2019-06-05 14:25:07 +02:00
Dmitry Stogov
f43e483ffb
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fixed compilation warning
2019-05-31 01:00:12 +03:00
Dmitry Stogov
2915a32f37
Fixed compilation warning
2019-05-31 00:59:52 +03:00
Dmitry Stogov
d7710ef517
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Don't specialize "cold" handlers
2019-05-31 00:32:18 +03:00
Dmitry Stogov
1814308e49
Don't specialize "cold" handlers
2019-05-31 00:31:57 +03:00
Dmitry Stogov
8491800eaf
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Removed useless specialization. Specialized handlers called not specialized helpers.
2019-05-31 00:16:20 +03:00
Dmitry Stogov
4e567ed1da
Removed useless specialization. Specialized handlers called not specialized helpers.
2019-05-31 00:15:25 +03:00
Dmitry Stogov
10cf2c07f2
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Reduce register pressure by reloading values on CPUs with few general purpose registers
2019-05-31 00:15:18 +03:00
Dmitry Stogov
cf388033d5
Reduce register pressure by reloading values on CPUs with few general purpose registers
2019-05-31 00:14:10 +03:00
Dmitry Stogov
0a6a350371
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Disable "bad" optimisations only for emulation loop
2019-05-30 20:43:17 +03:00
Dmitry Stogov
ee56552913
Disable "bad" optimisations only for emulation loop
2019-05-30 20:35:30 +03:00
Dmitry Stogov
c64fe84f8b
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Avoid double copying
2019-05-28 13:35:29 +03:00
Dmitry Stogov
b2cb6a4a27
Avoid double copying
2019-05-28 13:35:00 +03:00
Nikita Popov
45c663a9d3
Merge branch 'PHP-7.4'
2019-05-27 17:13:00 +02:00
Nikita Popov
fd23f9104a
BIND_STATIC of implicit binding may be undef
...
Even though we don't need it at runtime, add the BIND_IMPLICIT
flag to BIND_STATIC as well, so we can distinguish this case in
type inference.
This fixes a JIT miscompile in arrow_functions/002.phpt.
2019-05-27 17:12:20 +02:00
Nikita Popov
f106f57164
Merge branch 'PHP-7.4'
2019-05-13 14:43:10 +02:00
CHU Zhaowei
e829d08729
Implement spread operator in arrays
...
RFC: https://wiki.php.net/rfc/spread_operator_for_array
Closes GH-3640.
2019-05-13 14:42:43 +02:00
Nikita Popov
79f41944ba
Merge branch 'PHP-7.4'
2019-05-02 15:07:04 +02:00
Nikita Popov
f3e5bbe6f3
Implement arrow functions
...
Per RFC: https://wiki.php.net/rfc/arrow_functions_v2
Co-authored-by: Levi Morrison <levim@php.net>
Co-authored-by: Bob Weinand <bobwei9@hotmail.com>
2019-05-02 15:04:03 +02:00
Dmitry Stogov
f1767e23f4
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Don't initialize return value before calling user functions
2019-04-18 02:32:06 +03:00
Dmitry Stogov
38f9c8d93d
Don't initialize return value before calling user functions
2019-04-18 02:31:12 +03:00
Dmitry Stogov
150c5e04e9
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Removed tests that always (or almost always) true
2019-04-15 13:19:39 +03:00
Dmitry Stogov
cb3cfc9ff8
Removed tests that always (or almost always) true
2019-04-15 13:18:16 +03:00
Nikita Popov
dc42e403a2
Merge branch 'PHP-7.4'
2019-04-15 11:42:55 +02:00
Nikita Popov
7f6c22cb3d
Fix last maybe uninit warnings on 7.4
...
Most of these only occur under GCC 5. Not fond of all the workarounds
(especially the PDO one), but it gets us a clean build...
2019-04-15 11:35:13 +02:00
Dmitry Stogov
55cc280429
Backported call frame initialization improvement
2019-04-12 02:35:42 +03:00
Dmitry Stogov
39505764ad
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Replace "ZEND_CALL_CTOR" hack by additional live-range
2019-04-12 01:01:47 +03:00
Dmitry Stogov
88a2268d6b
Replace "ZEND_CALL_CTOR" hack by additional live-range
2019-04-12 00:49:45 +03:00
Dmitry Stogov
5f46d2180c
Merge branch 'master' of git.php.net:php-src
...
* 'master' of git.php.net:php-src:
Use zend_quiet_write instead of ZEND_IGNORE_VALUE
Suppress warnings using zend_quiet_write
Don't build JIT if the host architecture doesn't support it
Fix incompatible pointer warning in zend_test
Mark zend_jit_print_regset as unused
Suppress write() warnings in jit_perf_dump.c
Generate ZEND_COUNT for sizeof()
Make tsrm_env_lock() void
2019-04-11 13:26:47 +03:00
Nikita Popov
8f441c90ca
Merge branch 'PHP-7.4'
2019-04-11 10:49:38 +02:00
Nikita Popov
30df87f77d
Generate ZEND_COUNT for sizeof()
...
sizeof() is an alias of count(), so we should generate the same
code for them.
2019-04-11 10:48:52 +02:00
Dmitry Stogov
c97e3158ed
Check for ZEND_CALL_RELEASE_THIS only if ZEND_CALL_CLOSURE is not set
2019-04-11 11:19:09 +03:00
Dmitry Stogov
cc900edd77
Simplify call frame initialization
2019-04-11 02:08:32 +03:00
Nikita Popov
addd5a1693
Merge branch 'PHP-7.4'
2019-04-08 10:20:17 +02:00
Nikita Popov
e86820eb56
Fix invalid function by-ref prop assign handling
2019-04-08 10:18:26 +02:00
Dmitry Stogov
5b34c87d18
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Optimized "smart branch" instructions
2019-04-05 00:26:20 +03:00
Dmitry Stogov
d6848625d7
Optimized "smart branch" instructions
2019-04-05 00:25:45 +03:00
Dmitry Stogov
0deb6419e8
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Make is_identical() functions return zend_bool (instead of int)
2019-04-04 18:18:52 +03:00
Dmitry Stogov
9038d5c6ee
Make is_identical() functions return zend_bool (instead of int)
2019-04-04 18:18:12 +03:00
Dmitry Stogov
c4d5d26df3
Merge branch 'PHP-7.4'
...
* PHP-7.4:
unused variable
2019-04-04 17:52:42 +03:00
Dmitry Stogov
575c3576a7
unused variable
2019-04-04 17:52:17 +03:00
Dmitry Stogov
c617fb78ab
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Improved comparison opcode handlers
2019-04-02 23:47:03 +03:00
Dmitry Stogov
9cb926d8d1
Improved comparison opcode handlers
2019-04-02 23:46:21 +03:00
Dmitry Stogov
71413747c8
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fixed typo
2019-03-20 01:32:01 +03:00
Dmitry Stogov
14359eb7eb
Fixed typo
2019-03-20 01:31:35 +03:00
Dmitry Stogov
61548042f7
Merge branch 'PHP-7.4'
...
* PHP-7.4:
micro-optimization
2019-03-19 02:02:37 +03:00
Dmitry Stogov
9357953bab
micro-optimization
2019-03-19 02:02:14 +03:00
Nikita Popov
513b76794b
Make zpp failures always throw, independent of strict_types
...
Previously zend_parse_parameters (and FastZPP) would handle invalid
arguments depending on strict_types: With strict_types=1, a TypeError
is thrown, with strict_types=0 a warning is thrown and (usually) NULL
is returned. Additionally, some functions (constructors always and
other methods sometimes) opt-it to throwing regardless of strict_types.
This commit changes zpp to always generate a TypeError exception in
PHP 8.
2019-03-11 11:32:20 +01:00
Dmitry Stogov
1b281f801e
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Avoid useless code duplication, because of unused specialization
2019-02-15 17:52:59 +03:00
Dmitry Stogov
d4bef4ce7b
Avoid useless code duplication, because of unused specialization
2019-02-15 17:49:39 +03:00
Dmitry Stogov
89c94161ea
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Reduce slow code size
2019-02-15 17:03:49 +03:00
Dmitry Stogov
78a1d76962
Reduce slow code size
2019-02-15 17:03:04 +03:00
Nikita Popov
faaf510fa4
Merge branch 'PHP-7.4'
2019-02-14 14:02:32 +01:00
Nikita Popov
adf2f39745
Fix build without global regs
2019-02-14 14:01:39 +01:00
Dmitry Stogov
e17667abd5
Merge branch 'PHP-7.4'
...
* PHP-7.4:
More accurate handling of global registers (allow VM with single global register)
2019-02-12 17:39:55 +03:00
Dmitry Stogov
626bc3a2de
More accurate handling of global registers (allow VM with single global register)
2019-02-12 17:39:02 +03:00
Nikita Popov
a302d11610
Don't silence fatal errors with @
2019-02-11 16:17:55 +01:00
Dmitry Stogov
bb3a3c1570
Simplify checks
2019-02-07 22:08:51 +03:00
Dmitry Stogov
f45e0ce928
Remove ZEND_OVERLOADED_FUNCTION and corresponding call_method object handler
2019-02-07 21:05:46 +03:00
Nikita Popov
7480f4ebae
Merge branch 'PHP-7.4'
2019-02-07 10:06:37 +01:00
Nikita Popov
1a4ffcd2b4
Fix DIM_OBJ specialization in zend_vm_get_opcode_handler_func
...
DIM_OBJ also specializes over ASSIGN_STATIC_PROP nowadays.
2019-02-07 10:06:25 +01:00
Dmitry Stogov
1a304d357c
More accurate get_properties() usage.
2019-02-04 13:20:25 +03:00
Dmitry Stogov
b7f05885e8
Reuse cache_slot
2019-02-04 13:20:25 +03:00
Dmitry Stogov
91ef4124e5
Refactor zend_object_handlers API to pass zend_object* and zend_string* insted of zval(s).
2019-02-04 13:20:25 +03:00
Nikita Popov
9c5ab992ac
Merge branch 'PHP-7.4'
2019-01-31 09:40:01 +01:00
Nikita Popov
340c6d3927
Revert "Don't silence fatal errors with @"
...
This reverts commit abd36289e2
.
This wasn't ready for merging yet, there are still some test
failures.
2019-01-31 09:39:10 +01:00
Joe Watkins
839bdf12ee
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Don't silence fatal errors with @
2019-01-31 07:11:18 +01:00
Nikita Popov
abd36289e2
Don't silence fatal errors with @
2019-01-31 07:11:05 +01:00
Zeev Suraski
a81202ac49
Adios, yearly copyright ranges
2019-01-30 11:48:28 +01:00
Zeev Suraski
02557f87bc
Adios, yearly copyright ranges
2019-01-30 11:23:29 +02:00