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
bf7176c70f
Use reference-counting instead of duplication and separation, if really necessary.
2018-01-19 01:03:24 +03:00
Dmitry Stogov
5c77bac9a7
A cheaper way to reset type flags.
2018-01-17 01:58:51 +03:00
timurib
a484b9a535
Fix #75765 Exception on extend of undefined class
...
As the parent class is fetched prior to binding, there are no
safety concerns in this case and we can replace the fatal error
with an Error exception.
2018-01-12 18:41:39 +01:00
Dmitry Stogov
c9034c3b33
Get rid of zend_op_array.early_binding
2018-01-11 19:15:52 +03:00
Xinchen Hui
4a4602c45c
Merge branch 'master' of git.php.net:/php-src
...
* 'master' of git.php.net:/php-src:
Happy new year (Update copyright to 2018)
Happy new year (Update copyright to 2018)
Revert "Enable ODBC tests on AppVeyor"
Enable ODBC tests on AppVeyor
Skip on Travis-CI
Extend skip section
2018
missing changelog entries + fix version and date
missing changelog entries
2018
Trailing whitespaces
2018-01-04 13:45:11 +08:00
Gabriel Caruso
6400264856
Trailing whitespaces
...
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2018-01-03 14:38:00 +01:00
Xinchen Hui
1e22c9a187
Merge branch 'instanceof-const' of https://github.com/nikic/php-src
...
* 'instanceof-const' of https://github.com/nikic/php-src :
Return false for instanceof on literal
2018-01-03 16:08:20 +08:00
Xinchen Hui
a6519d0514
year++
2018-01-02 12:57:58 +08:00
Xinchen Hui
7a7ec01a49
year++
2018-01-02 12:55:14 +08:00
Dmitry Stogov
5c8f8f8fce
Use ZEND_FAST_CONCAT instead of ZEND_CONCAT for CONST operands.
2017-12-29 13:54:18 +03:00
Dmitry Stogov
f010423335
Use IS_EQUAL instead of CASE when first operand is CV or CONST. Removed CASE handlers that duplicated IS_EQUAL.
2017-12-29 12:57:58 +03:00
Nikita Popov
b6131364f9
Return false for instanceof on literal
2017-12-19 22:16:45 +01:00
David Walker
6d4de4cf05
Implement list() reference assignments
...
Support list() reference assignments of the form:
list(&$a, list(&$b, $c)) = $d;
RFC: https://wiki.php.net/rfc/list_reference_assignment
2017-12-09 13:39:52 +01:00
Dmitry Stogov
6a9d2b2190
Cleanup type conversion
2017-12-07 19:24:55 +03:00
Dmitry Stogov
74c84cd7f0
Use zend_string_equal*() API for zend_string equality check instead of direct memcmp() usage.
2017-12-04 17:17:02 +03:00
Dmitry Stogov
cc12acefcd
Use cheaper functions
2017-12-04 13:21:35 +03:00
Dmitry Stogov
92cc7f9fab
Merge branch 'PHP-7.2'
...
* PHP-7.2:
Set trailing zero
2017-12-01 17:01:10 +03:00
Dmitry Stogov
01b85f0e17
Merge branch 'PHP-7.1' into PHP-7.2
...
* PHP-7.1:
Set trailing zero
2017-12-01 17:00:51 +03:00
Dmitry Stogov
b73151845f
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0:
Set trailing zero
2017-12-01 17:00:42 +03:00
Dmitry Stogov
24d5adbd5a
Set trailing zero
2017-12-01 17:00:11 +03:00
Dmitry Stogov
f98721b4e0
Intern auto global name strings in first place
2017-11-29 17:10:51 +03:00
Nikita Popov
8795893f4f
Make sure string property/class const values are interned
...
This was done for user-definde class constant values, however this
is also important for properties and internal classes.
2017-11-25 17:12:37 +01:00
Dmitry Stogov
33b094479b
TYPE_CHECK instruction changed. Now it keeps in extended_value a type mask.
...
This makes check for "boolean" cheaper and allows check combination e.g. (is_string($a) || is_null($a))
2017-11-23 15:58:34 +03:00
Nikita Popov
9fbb019848
Move adjust_for_fetch_type directly after emission
...
And drop the distinction between compile_X and compile_X_common.
This avoids WTF moments like compile_simple_var_no_cv completely
ignoring the BP_VAR type passed to it...
2017-11-16 22:28:29 +01:00
Nikita Popov
d9da166649
Minor fetch type adjustment cleanup
...
No need to call adjust_fetch_type on FETCH_THIS, just to special
case it in adjust_fetch_type...
2017-11-16 22:13:07 +01:00
Dmitry Stogov
7fba7209e1
Fixed memory leak (Zend/tests/list_003.phpt)
2017-11-03 21:02:27 +03:00
Dmitry Stogov
990d8092a4
Reverted incomplete fix and too strict asserts.
2017-11-01 16:18:13 +03:00
Dmitry Stogov
02a05146fd
Fixed string interning during constants substitution
2017-11-01 10:56:37 +03:00
Xinchen Hui
a8a17a72b0
RC manipulation cleanup
2017-11-01 10:25:10 +08:00
Dmitry Stogov
d481d495cc
Fixed few inconsistent ZVALs in AST produced by compiler (REFCOUNTED and INTERNED strings)
2017-11-01 01:10:21 +03:00
Dmitry Stogov
5dbdc382af
Intern file names and class constants in first place (they may be interned later during constant substitution)
2017-10-31 15:36:55 +03:00
Dmitry Stogov
fcc08ce19f
Prevent reference-counting on persistent zvals (internal constants, default properties and constants of internal classes).
...
New macro ZVAL_COPY_OR_DUP() is used perform duplication, if necessary.
This should eliminate related race-coditions in ZTS build and prevent reference-counting bugs after unclean shutdown.
2017-10-30 23:13:10 +03:00
Dmitry Stogov
49ea143bbd
Encapsulate reference-counting primitives.
...
Prohibit direct update of GC_REFCOUNT(), GC_SET_REFCOUNT(), GC_ADDREF() and GC_DELREF() shoukf be instead.
Added mactros to validate reference-counting (disabled for now).
These macros are going to be used to eliminate race-condintions during reference-counting on data shared between threads.
2017-10-27 01:28:58 +03:00
Dmitry Stogov
9cf87aa196
Avoid HashTable allocations for empty arrays (using zend_empty_array).
2017-10-24 17:27:31 +03:00
Dmitry Stogov
edc7c8ccfa
PHP must not create circular arrays when element is assigned by value.
2017-10-12 16:23:45 +03:00
Dmitry Stogov
ef5ea48741
Always use IS_CONSTANT_AST (IS_CONSTANT is removed).
2017-10-10 10:11:05 +03:00
Dmitry Stogov
39ded1d5f8
Changed zend_ast_ref structure to use only one allocation, removing dichotomy between heap/arena ASTs.
2017-10-09 16:57:51 +03:00
Dmitry Stogov
e70618aff6
Changed the way VM accesses constant operands in 64-bit builds.
2017-10-04 16:53:01 +03:00
Dmitry Stogov
44e0b79ac6
Refactored array creation API. array_init() and array_init_size() are converted into macros calling zend_new_array(). They are not functions anymore and don't return any values.
2017-09-20 02:25:56 +03:00
Dmitry Stogov
a80e462fbd
Order live ranges according to "start" position
2017-08-14 12:21:07 +03:00
Dmitry Stogov
2fab62271a
Revert "Fixed live_range removing (bug can be triggred by JIT)"
...
This reverts commit aecf996510
.
2017-08-14 12:00:02 +03:00
Xinchen Hui
aecf996510
Fixed live_range removing (bug can be triggred by JIT)
2017-08-11 21:56:30 +08:00
Dmitry Stogov
1180d8c801
Separate ISSET_ISEMPTY_CV/UNSET_CV from ISSET_ISEMPTY_VAR/UNSET_VAR
2017-07-17 14:11:50 +03:00
Anatol Belski
bc5811f361
further sync for vim mode lines
2017-07-04 18:12:45 +02:00
Nikita Popov
e5741da85c
Fix format arguments
...
Only dropped one before, both need to go...
2017-06-25 22:32:57 +02:00
Nikita Popov
9dfcb04f10
Fix typo
2017-06-25 22:28:56 +02:00
Michał Brzuchalski
8e10c9d373
Implement object type annotation
...
RFC: https://wiki.php.net/rfc/object-typehint
2017-06-25 21:49:41 +02:00
Dmitry Stogov
a916bed8f8
Fixed function name resolution
2017-05-30 21:48:16 +03:00
Dmitry Stogov
65edf44291
Check for possible run-time function name resolution
2017-05-30 17:37:54 +03:00