Dmitry Stogov
60b72e434b
Avoid data bypass delays between integer and floating point execution units on x86 CPUs.
2016-03-21 13:03:30 +03:00
Dmitry Stogov
fc7cbdce61
Squashed commit of the following:
...
commit 98471821a8
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Mar 17 21:56:04 2016 +0300
Fixed wrong constant usage
commit 8183b811e7
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Mar 17 21:10:23 2016 +0300
Added ability to serialize and serialize opcode handlers for file-cache
commit 3516b261de
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Mar 17 10:11:59 2016 +0300
Added missed file
commit f4475a2360
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Mar 17 10:00:45 2016 +0300
Transparently introduce type-specialized opcode handlers.
This affects only PHP VM, and doesn't change anything else.
2016-03-17 22:00:27 +03:00
Xinchen Hui
f3dd50d650
Merge branch 'PHP-7.0'
...
* PHP-7.0:
Fixed test script
Update NEWS
Fixed bug #71841 (EG(error_zval) is not handled well)
Fixed bug #71840 (Unserialize accepts wrongly data)
Conflicts:
Zend/zend_vm_def.h
Zend/zend_vm_execute.h
2016-03-17 15:26:40 +08:00
Xinchen Hui
fe1a3fc08b
Merge branch 'PHP-5.6' into PHP-7.0
...
* PHP-5.6:
Fixed bug #71841 (EG(error_zval) is not handled well)
Fixed bug #71840 (Unserialize accepts wrongly data)
Conflicts:
Zend/zend_vm_def.h
Zend/zend_vm_execute.h
ext/standard/var_unserializer.c
2016-03-17 15:22:44 +08:00
Xinchen Hui
5546f8be56
Fixed bug #71841 (EG(error_zval) is not handled well)
2016-03-17 15:16:47 +08:00
Xinchen Hui
73e8c08788
Sorry for that... Merged by accident....
...
Revert "Transparently introduce type-specialized opcode handlers."
This reverts commit 59d00b8bcc
.
2016-03-17 11:59:15 +08:00
Xinchen Hui
a4b2f7f3a9
Revert "Taking into account "undefined" variables"
...
This reverts commit 9020086a13
.
2016-03-17 11:58:59 +08:00
Xinchen Hui
b9aed47a7a
Fixed Bug #71824 (null ptr deref _zval_get_string_func (zend_operators.c:851))
2016-03-17 11:56:32 +08:00
Dmitry Stogov
9020086a13
Taking into account "undefined" variables
2016-03-16 04:20:43 +03:00
Dmitry Stogov
59d00b8bcc
Transparently introduce type-specialized opcode handlers.
...
This affects only PHP VM, and doesn't change anything else.
2016-03-16 03:36:58 +03:00
Dmitry Stogov
827a7a180b
Added possibility for extra specialization for SMART_BRANCH (e.g. IS_EQUAL+JMPZ superinstruction).
2016-03-11 12:17:03 +03:00
Dmitry Stogov
ff8337b783
Merge branch 'PHP-7.0'
...
* PHP-7.0:
More effecient fix for bug #71756
2016-03-10 13:34:00 +03:00
Dmitry Stogov
f8506c062f
More effecient fix for bug #71756
2016-03-10 13:33:36 +03:00
Francois Laupretre
370b7039e4
Add support for negative string offsets (syntax)
2016-03-09 14:41:37 +01:00
Nikita Popov
55c0de8f95
Merge branch 'PHP-7.0'
2016-02-24 17:44:33 +01:00
Nikita Popov
3ea877ca15
Fix "Call to member function on unknown"
...
Should be "on null".
2016-02-24 17:00:25 +01:00
Dmitry Stogov
0f39f080d1
Fixed incorrrect merge (regenrate zend_vm_execute.h)
2016-02-19 00:09:17 +03:00
Dmitry Stogov
8a6c5be106
Merge branch 'PHP-7.0'
...
* PHP-7.0:
Better fix for bug #71622 (Strings used in pass-as-reference cannot be used to invoke C::$callable())
2016-02-18 23:15:28 +03:00
Dmitry Stogov
25fbb06e2d
Better fix for bug #71622 (Strings used in pass-as-reference cannot be used to invoke C::$callable())
2016-02-18 23:14:46 +03:00
Bob Weinand
2dc9aa9bea
Merge branch 'PHP-7.0'
2016-02-18 13:54:19 +01:00
Bob Weinand
3ce6ad9d13
Fixed bug #71622 (Strings used in pass-as-reference cannot be used to invoke C::$callable())
2016-02-18 13:53:15 +01:00
Xinchen Hui
4eb4a78bf0
Combine conditions (good for other VM kinds)
2016-02-15 11:12:04 +08:00
Nikita Popov
44ed1cb5c0
Remove ZEND_CALL_CTOR_RESULT_UNUSED
...
Instead emit a FREE on the result of NEW.
2016-02-11 22:15:11 +01:00
Nikita Popov
5faedf5b3e
Remove EXT_TYPE_UNUSED in favor of IS_UNUSED
...
This means we no longer allocate an unused VAR for the retval of
instructions that support unused results.
Nearly all instructions already used the result variable only if
it was used. The only exception to this was the return value
variable for internal function call results. I've adjusted the code
to use a stack zval for the unused return case now. As we have
retval specialization now, we know that it doesn't matter.
2016-02-11 18:02:19 +01:00
Nikita Popov
68516091c1
Merge branch 'PHP-7.0'
2016-02-11 16:33:23 +01:00
Nikita Popov
9cebdc5d47
Fix yield-by-ref of constant
...
Typo in the condition...
2016-02-11 16:32:45 +01:00
Nikita Popov
7453348ca8
Merge branch 'PHP-7.0'
2016-02-11 16:25:55 +01:00
Nikita Popov
1322672c0b
Fix dangling send target when using yield from
...
Also drop some unnecessary TRY_DELREFs -- leftovers from the days
when null was refcounted.
2016-02-11 16:25:16 +01:00
Dmitry Stogov
81721a7ddd
Specialize DO_FCALL (and variations) according to used/unused return value
2016-02-05 15:46:52 +03:00
Dmitry Stogov
2f5a119281
Use extra specialization to eliminate run-time checks for conditions known at compile time in SEND_VAL_EX and SEND_VAR_EX.
2016-02-05 15:07:58 +03:00
Dmitry Stogov
ef98adce30
Specialize ASSIGN according to used/unused return value
2016-02-05 13:18:58 +03:00
Bob Weinand
00a2c30c59
Add extra VM operand specialization
...
For now RETVAL and OP_DATA= are supported
2016-02-04 16:49:50 +01:00
Dmitry Stogov
d510255879
Rename IS_ERROR into _IS_ERROR (to prevent redefinition on Windows).
2016-02-01 11:12:28 +03:00
Xinchen Hui
08e5dc461d
Merge branch 'PHP-7.0'
2016-01-29 22:05:59 -08:00
Xinchen Hui
e062759401
Fixed bug #71485 (Return typehint on interanal func causes Fatal error when it throws exception).
2016-01-29 22:05:52 -08:00
Dmitry Stogov
86f54fcdf7
Use special type IS_ERROR instread of EG(error_zval). (we still need EG(error_zval) for SPL support).
2016-01-28 18:00:06 +03:00
Dmitry Stogov
e99fe9865e
Merge branch 'PHP-7.0'
...
* PHP-7.0:
Fixed bug #71474 (Crash because of VM stack corruption on Magento2).
2016-01-28 11:54:48 +03:00
Dmitry Stogov
6039d2d914
Fixed bug #71474 (Crash because of VM stack corruption on Magento2).
2016-01-28 11:41:15 +03:00
Dmitry Stogov
6579e48417
Introduced BIND_STATIC opcode instead of FETCH_R/FETCH_W(static)+ASSIGN/ASSIGN_REF (similar to BIND_GLOBAL).
...
In the future we may refer to static variable by index instead of name, to eliminate hash lookup.
2016-01-12 12:20:35 +03:00
Xinchen Hui
563659822d
Merge branch 'PHP-7.0'
2016-01-02 17:56:54 +08:00
Xinchen Hui
97a9470d97
bump year which is missed in rev 49493a2
2016-01-02 17:56:11 +08:00
Xinchen Hui
3537e95dae
bump year which is missed in rev 49493a2
2016-01-02 17:51:24 +08:00
Nikita Popov
65e456f364
Introduce BIND_LEXICAL
...
This opcodes inserts a local CV into the closure static variable
table. This replaces the previous mechanism of having static
variables marked as LEXICAL, which perform a symtable lookup
during copying.
This means a) functions which contain closures no longer have to
rebuild their symtable (better performance) and b) we can now track
used variables in SSA.
2015-12-29 23:14:53 +01:00
Dmitry Stogov
00a3714e05
Support for optimization introduced in DFA pass (it may change type of instruction return oprand to IS_CV)
2015-12-23 19:02:14 +03:00
Xinchen Hui
70f9ba00f7
This check become useless after 98885bfa1e
2015-12-23 20:56:49 +08:00
Dmitry Stogov
98885bfa1e
Consolidate indirect string offset modification checks (Nikita, Dmitry)
...
Check it once, instead of dozens of times.
2015-12-23 13:52:15 +03:00
Dmitry Stogov
6e6280a388
Corrected error messages:
...
- we don't use NULL for overlaoded objects for ages
- fixed array/object mess
2015-12-22 20:55:11 +03:00
Nikita Popov
88eae43ff9
Remove uses of VARs in extended_value
...
The DECLARE_(ANON_)INHERITED_CLASS(_DELAYED) opcodes were
referencing the parent ce VAR through extended_value. This is
hacky and we can't track the def-use chain in SSA.
To avoid this, the layout of declaration opcodes is changed
as follows: op1 points to the lcname and rtd_key literals, in
that order. (For anon/lambda declarations only one of lcname or
rtd_key is present.) This frees up op2, which is now used to
reference the parent ce VAR in inheriting declarations. The
jmp offset for anon class declarations is moved frop op2 to
extended_value.
The changes were applied both to class and function declarations
to keep everything symmetric.
2015-12-21 14:44:42 +01:00
Dmitry Stogov
1fe8a1dec9
Merge branch 'PHP-7.0'
...
* PHP-7.0:
Fixed possible crash on Zend/tests/bug71154.phpt
2015-12-21 15:58:58 +03:00
Dmitry Stogov
0402f05ba3
Fixed possible crash on Zend/tests/bug71154.phpt
2015-12-21 15:57:53 +03:00