History log of /PHP-7.3/Zend/zend_compile.c
Revision Date Author Comments
# 249e4909 06-Dec-2019 Nikita Popov <nikita.ppv@gmail.com>

Fix constant evaluation of && and ||

The "return" in the for loop should have been a break on the switch,
otherwise the result is just ignored... but because it prevents
evaluation of the other operand, it also violates the invariant that
everything has been constant evaluated, resulting in an assertion
failure.

The for loop isn't correct in any case though, because it's not legal
to determine the result based on just the second operand, as the
first one may have a side-effect that cannot be optimized away.


# 239e2dda 04-Oct-2019 Nikita Popov <nikita.ppv@gmail.com>

Make sure T_ERROR is returned for all lexer exceptions

This originally manifested as a leak in oss-fuzz #18000. The following
is a reduced test case:

<?php
[
5 => 1,
"foo" > 1,
" " => "" == 0
];
<<<BAR
$x
BAR;

Because this particular error condition did not return T_ERROR,
EG(exception) was set while performing binary operation constant
evaluation, which checks exceptions for cast failures.

Instead of adding this indirect test case, I'm adding an assertion
that the lexer has to return T_ERROR if EG(exception) is set.


# a5d3620d 01-Oct-2019 Nikita Popov <nikita.ppv@gmail.com>

Fix segfault with __COMPILER_HALT_OFFSET__ and trailing {}

Fixes OSS-Fuzz #17895.


# f3fdf570 12-Aug-2019 Nikita Popov <nikita.ppv@gmail.com>

Intern alias old_name early

This is likely going to end up interned lateron at some point
when the new_name is referenced somewhere. However, it may be
that there are some uses that do not get interned before that.
In this case we will intern a string that already have zval
users, without updating the refcounted flag on those zvals.

In particular this can happen with something like [Foo::class],
where Foo is an imported symbol. The string it resolves to won't
get interned right away, but may be interned later.

use Foo as Bar;
$x = [Bar::class];
var_dump(Bar::X);
debug_zval_dump($x); // Will show negative refcount
class Foo {
const X = 1;
}

However, this doesn't really fix the root cause, there are probably
other situations where something similar can occur.


# c7920aba 14-Mar-2019 Xinchen Hui <laruence@gmail.com>

Fixed bug #77738 (Nullptr deref in zend_compile_expr)


# 4ac954ac 25-Feb-2019 Xinchen Hui <laruence@gmail.com>

Fixed compiler warning


# 1c22ace0 25-Feb-2019 Xinchen Hui <laruence@gmail.com>

Fixed bug #77660 (Segmentation fault on break 2147483648)


# 53881438 22-Feb-2019 Nikita Popov <nikita.ppv@gmail.com>

Fixed bug #77652


# 34898e97 29-Jan-2019 Nikita Popov <nikita.ppv@gmail.com>

Make special assert() handling independent of compiler flags


# ef68cd32 28-Jan-2019 ekinhbayar <me@ekins.space>

Fixed bug #77530: PHP crashes when parsing "(2)::class"


# 526344aa 24-Jan-2019 Nikita Popov <nikita.ppv@gmail.com>

Add flag to disable jumptable optimization

This is useful for coverage. While it is currently safe to just
skip over the SWITCH_* opcodes, this may not be true in the future
due to opcache optimizations, so it's safer to disable emission of
SWITCH_* opcodes entirely.


# 41af1e67 04-Jan-2019 Nikita Popov <nikita.ppv@gmail.com>

Fix self::class inside constant in global scope

Previously this triggered an assertion failure. The behavior is
not quite correct, in that self::class should generate an exception
if there is no self, but returns an empty string here. Fixing that
would be a bit too intrusive for the 7.2 branch.


# 73596c56 02-Jan-2019 Nikita Popov <nikita.ppv@gmail.com>

Partial fix for bug #75426

This does not print the exact line of the comma, but rather the line
of the previous element. This should generally be "good enough", as
the line number is close (off by one) to the actual issue now.
Previously it would point to the start of the array, which may be
very far away.


# 7e597f48 24-Dec-2018 Dmitry Stogov <dmitry@zend.com>

Fixed bug #77339 (__callStatic may get incorrect arguments)


# 93aabf15 10-Dec-2018 Nikita Popov <nikita.ppv@gmail.com>

Fixed bug #77275

Instead of juggling with this problem during literal compaction,
make sure that we always initialize Z_EXTRA for literals, which
seems like the more robust solution.


# b565c85b 27-Nov-2018 Nikita Popov <nikita.ppv@gmail.com>

Improve fix for #76046

Also locate the JMP at the start of the foreach.

Patch suggested by Derick.


# d6595f27 27-Nov-2018 Nikita Popov <nikita.ppv@gmail.com>

Fixed bug #76046

Place FE_FREE on start line of foreach, instead of whatever random
line number might be in CG(zend_lineno) at the time.


# 9afce019 01-Nov-2018 Zeev Suraski <zeev@php.net>

Future-proof email addresses


# 902d39a3 13-Oct-2018 Peter Kokot <peterkokot@gmail.com>

Trim trailing whitespace in source code files


# 7f6387b5 13-Oct-2018 Peter Kokot <peterkokot@gmail.com>

Trim trailing whitespace in source code files


# 8b8b625d 29-Sep-2018 Nikita Popov <nikita.ppv@gmail.com>

Fixed bug #72635

This seems to be a simple oversight, where we did not enable
exceptions. Other constexpr conditions already throw, so there is
no particular reason to stick to a fatal error here.


# b8828926 20-Aug-2018 Dmitry Stogov <dmitry@zend.com>

Avoid hash lookups in BIND_STATIC and BIND_LEXICAL opcode handlers.
Encode static variable offset into opline->extended_value.


# 3ced766d 30-Jul-2018 Dmitry Stogov <dmitry@zend.com>

Removed duplicate code. zend_fetch_dimension_address_LIST_w() was a copy of zend_fetch_dimension_address_W(), ZEND_FETCH_LIST_W_SPEC_CV_... a copy of ZEND_FETCH_DIM_W_SPEC_CV_...


# ab8094c6 25-Jul-2018 Dmitry Stogov <dmitry@zend.com>

Pack zend_constant.flags and zend_constant.module_number into reserved space inside zend_constant.value.


# f950128c 25-Jul-2018 Dmitry Stogov <dmitry@zend.com>

Encode parent class name as IS_CONST operand in DECLARE_INHERITED_CLASS and DECLARE_ANON_INHERITED_CLASS opcodes (eliminate FETCH_CLAS
S opcode).


# 8d3f8ca1 03-Jul-2018 Peter Kokot <peterkokot@gmail.com>

Remove unused Git attributes ident

The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.

In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.

This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.


# 5c4047b3 04-Jul-2018 Nikita Popov <nikita.ppv@gmail.com>

Deprecate defining a free-standing assert() function

Part of https://wiki.php.net/rfc/deprecations_php_7_3.


# 5e8977bd 12-Jul-2018 Dmitry Stogov <dmitry@zend.com>

Merge zend_class_entry.create_object and zend_class_entry.interface_gets_implemented into the same memory lacation. The first used only by classes, the second only by magic interfaces.


# 7d4e18b0 12-Jul-2018 Dmitry Stogov <dmitry@zend.com>

Improved user iterator implementation to reduce zend_class_entry memory consumption and avoid race condition during resolving/caching of user iterator functions of internal classes in ZTS build.


# 85ee47ed 11-Jul-2018 Dmitry Stogov <dmitry@zend.com>

Changed structure of zend_class_entry.trait_aliases and zend_class_entry.trait_precedences to avoid keeping "intermediate" trait references, that are used only during inheritance.


# 04e3523b 24-Jun-2018 Nikita Popov <nikita.ppv@gmail.com>

Warn if continue is used on switch

Supersedes RFC https://wiki.php.net/rfc/continue_on_switch_deprecation
by generating a warning instead of deprecating and removing this
functionality.


# 4a475a49 04-Jul-2018 Dmitry Stogov <dmitry@zend.com>

Replace legacy zval_dtor() by zval_ptr_dtor_nogc() or even more specialized destructors.
zval_dtor() doesn't make a lot of sense in PHP-7.* and it's used incorrectly in some places.
Its occurances should be replaced by zval_ptr_dtor() or zval_ptr_dtor_nogc(), or even more specialized destructors.


# c49f0fd9 04-Jul-2018 Kalle Sommer Nielsen <kalle@php.net>

Fixed bug #76501 (Funny message with fatal error)


# 28b03f96 02-Jul-2018 Dmitry Stogov <dmitry@zend.com>

Another fix for bug #63217


# 57af94c8 02-Jul-2018 Dmitry Stogov <dmitry@zend.com>

Partial revert of 30156d588c07e26d4e752ddb62344e96854d4773


# 30156d58 28-Jun-2018 Rudi Theunissen <rudolf.theunissen@gmail.com>

Fixed bug #63217

Don't automatically convert literal string keys to integers on
array access, as we may be dealing with an ArrayAccess object,
rather than a plain array.


# 43aca311 02-Jul-2018 Dmitry Stogov <dmitry@zend.com>

Avoid string comparisons for magic methods (all magic methods start with "__")


# 1b80de93 26-Jun-2018 Dmitry Stogov <dmitry@zend.com>

Cleanup conditions


# 8c22d3e7 25-Jun-2018 Dmitry Stogov <dmitry@zend.com>

Make FETCH_R/IS, FETCH_DIM_R/IS, FETCH_OBJ_R/IS, FETCH_STATIC_PROP_R/IS return TMP_VAR, instead of VAR.


# 7f67513c 25-Jun-2018 Dmitry Stogov <dmitry@zend.com>

Lazy function copying from op_cache SHM into process memory


# d04917c7 24-Sep-2017 Nikita Popov <nikita.ppv@gmail.com>

Fixed bug #75218

I've introduced a new CompileError type, from which ParseError
inherits. These errors are not parse errors in the narrow sense
of the term, even though they happen to be generated during
parsing in our implementation. Additionally reusing the ParseError
class for this purpose would change existing error messages (if
the exception is not caught) from a "Fatal error:" to a "Parse
error:" prefix, and also the error kind from E_COMPILE_ERROR to
E_PARSE.


# 9e0f131d 31-May-2018 Dmitry Stogov <dmitry@zend.com>

Fixed ISSET/ISEMPTY bit meaning to simplify run-time checks


# 5eb1f92f 28-May-2018 Dmitry Stogov <dmitry@zend.com>

Use zend_string_release_ex() instread of zend_string_release() in places, where we sure about string persistence.


# 524f5245 08-May-2018 Dmitry Stogov <dmitry@zend.com>

Avoid useless checks, using zend_string_efree(), in cases where the string is known to be a temporary allocated zend_string.


# 83f98f73 27-Apr-2018 Dmitry Stogov <dmitry@zend.com>

Don't store values of PHP_SAPI and PHP_BINARY in file cache, because it may be used by different SAPI.


# 0c80cb16 08-Apr-2018 Levi Morrison <levim@php.net>

Fix bug #76198


# eb39d8d6 14-Mar-2018 Dmitry Stogov <dmitry@zend.com>

Use cheaper functions


# 8afb91cd 13-Mar-2018 Dmitry Stogov <dmitry@zend.com>

PHP scanner optimization


# d1585a9e 13-Mar-2018 Dmitry Stogov <dmitry@zend.com>

Revert "Handle scanner error in first place (don't hide them from ext/tokenizer) and cheaper whitespace handlig."

This reverts commit 0d6da03f5c3e49b92cf6817ba8a7f8d6f60ee1aa.


# 0d6da03f 13-Mar-2018 Dmitry Stogov <dmitry@zend.com>

Handle scanner error in first place (don't hide them from ext/tokenizer) and cheaper whitespace handlig.


# 9c0dfd4f 13-Mar-2018 Dmitry Stogov <dmitry@zend.com>

Get rid of useless SET_UNUSED()


# c7045174 13-Mar-2018 Dmitry Stogov <dmitry@zend.com>

Moved compiler helper functions from zend_opcode.c to zend_compile.c


# 7ff18643 16-Feb-2018 Nikita Popov <nikita.ppv@gmail.com>

Explicitly sort live ranges by start opnum

Instead of moving live ranges around to maintain the start opnum
invariant, add an explicit sorting step in pass two.


# b0af9ac7 16-Feb-2018 Nikita Popov <nikita.ppv@gmail.com>

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.


# 2d48d734 05-Feb-2018 Gabriel Caruso <carusogabriel34@gmail.com>

Fix some misspellings


# db2475ce 05-Feb-2018 Nikita Popov <nikita.ppv@gmail.com>

Fix unused variable compiler warnings


# e0a399f1 05-Feb-2018 Dmitry Stogov <dmitry@zend.com>

One cache slot is enough


# ca035f26 05-Feb-2018 Dmitry Stogov <dmitry@zend.com>

Moved "zval.u2.cache_slot" into free room of "zend_op"


# 3a794d39 05-Feb-2018 Dmitry Stogov <dmitry@zend.com>

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).


# ba298725 31-Jan-2018 Dmitry Stogov <dmitry@zend.com>

Changed CATCH instruction format (extended_value moved into op2, op2 into result, result into extended_value)


# 9c7fb529 31-Jan-2018 Dmitry Stogov <dmitry@zend.com>

Changed FETCH_CONSTANT instruction format (extended_value moved into op1)


# f67f455e 31-Jan-2018 Dmitry Stogov <dmitry@zend.com>

Changed FETCH_CLASS instruction format (extended_value moved into op1)


# 7141631c 30-Jan-2018 Dmitry Stogov <dmitry@zend.com>

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


# bf7176c7 18-Jan-2018 Dmitry Stogov <dmitry@zend.com>

Use reference-counting instead of duplication and separation, if really necessary.


# 5c77bac9 16-Jan-2018 Dmitry Stogov <dmitry@zend.com>

A cheaper way to reset type flags.


# a484b9a5 06-Jan-2018 timurib <timok@ya.ru>

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.


# c9034c3b 11-Jan-2018 Dmitry Stogov <dmitry@zend.com>

Get rid of zend_op_array.early_binding


# 64002648 31-Dec-2017 Gabriel Caruso <carusogabriel34@gmail.com>

Trailing whitespaces

Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>


# a6519d05 01-Jan-2018 Xinchen Hui <laruence@gmail.com>

year++


# 7a7ec01a 01-Jan-2018 Xinchen Hui <laruence@gmail.com>

year++


# ccd4716e 01-Jan-2018 Xinchen Hui <laruence@gmail.com>

year++


# 5c8f8f8f 29-Dec-2017 Dmitry Stogov <dmitry@zend.com>

Use ZEND_FAST_CONCAT instead of ZEND_CONCAT for CONST operands.


# f0104233 28-Dec-2017 Dmitry Stogov <dmitry@zend.com>

Use IS_EQUAL instead of CASE when first operand is CV or CONST. Removed CASE handlers that duplicated IS_EQUAL.


# b6131364 19-Dec-2017 Nikita Popov <nikita.ppv@gmail.com>

Return false for instanceof on literal


# 6d4de4cf 06-Oct-2017 David Walker <dwalker@n.io>

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


# 6a9d2b21 07-Dec-2017 Dmitry Stogov <dmitry@zend.com>

Cleanup type conversion


# 74c84cd7 04-Dec-2017 Dmitry Stogov <dmitry@zend.com>

Use zend_string_equal*() API for zend_string equality check instead of direct memcmp() usage.


# cc12acef 04-Dec-2017 Dmitry Stogov <dmitry@zend.com>

Use cheaper functions


# 24d5adbd 01-Dec-2017 Dmitry Stogov <dmitry@zend.com>

Set trailing zero


# f98721b4 29-Nov-2017 Dmitry Stogov <dmitry@zend.com>

Intern auto global name strings in first place


# 8795893f 25-Nov-2017 Nikita Popov <nikita.ppv@gmail.com>

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.


# 33b09447 23-Nov-2017 Dmitry Stogov <dmitry@zend.com>

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))


# 9fbb0198 16-Nov-2017 Nikita Popov <nikita.ppv@gmail.com>

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...


# d9da1666 16-Nov-2017 Nikita Popov <nikita.ppv@gmail.com>

Minor fetch type adjustment cleanup

No need to call adjust_fetch_type on FETCH_THIS, just to special
case it in adjust_fetch_type...


# 7fba7209 03-Nov-2017 Dmitry Stogov <dmitry@zend.com>

Fixed memory leak (Zend/tests/list_003.phpt)


# 990d8092 01-Nov-2017 Dmitry Stogov <dmitry@zend.com>

Reverted incomplete fix and too strict asserts.


# 02a05146 01-Nov-2017 Dmitry Stogov <dmitry@zend.com>

Fixed string interning during constants substitution


# a8a17a72 01-Nov-2017 Xinchen Hui <laruence@gmail.com>

RC manipulation cleanup


# d481d495 31-Oct-2017 Dmitry Stogov <dmitry@zend.com>

Fixed few inconsistent ZVALs in AST produced by compiler (REFCOUNTED and INTERNED strings)


# 5dbdc382 31-Oct-2017 Dmitry Stogov <dmitry@zend.com>

Intern file names and class constants in first place (they may be interned later during constant substitution)


# fcc08ce1 30-Oct-2017 Dmitry Stogov <dmitry@zend.com>

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.


# 49ea143b 26-Oct-2017 Dmitry Stogov <dmitry@zend.com>

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.


# 9cf87aa1 24-Oct-2017 Dmitry Stogov <dmitry@zend.com>

Avoid HashTable allocations for empty arrays (using zend_empty_array).


# edc7c8cc 12-Oct-2017 Dmitry Stogov <dmitry@zend.com>

PHP must not create circular arrays when element is assigned by value.


# ef5ea487 10-Oct-2017 Dmitry Stogov <dmitry@zend.com>

Always use IS_CONSTANT_AST (IS_CONSTANT is removed).


# 39ded1d5 09-Oct-2017 Dmitry Stogov <dmitry@zend.com>

Changed zend_ast_ref structure to use only one allocation, removing dichotomy between heap/arena ASTs.


# e70618af 04-Oct-2017 Dmitry Stogov <dmitry@zend.com>

Changed the way VM accesses constant operands in 64-bit builds.


# 44e0b79a 19-Sep-2017 Dmitry Stogov <dmitry@zend.com>

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.


# a80e462f 13-Aug-2017 Dmitry Stogov <dmitry@zend.com>

Order live ranges according to "start" position


# 2fab6227 13-Aug-2017 Dmitry Stogov <dmitry@zend.com>

Revert "Fixed live_range removing (bug can be triggred by JIT)"

This reverts commit aecf9965100e704339ccc33da6a31eca84c2d926.


# 6445b3a6 14-Aug-2017 Xinchen Hui <laruence@gmail.com>

Revert "Fixed live_range removing (bug can be triggred by JIT)"

This reverts commit aecf9965100e704339ccc33da6a31eca84c2d926.


# aecf9965 11-Aug-2017 Xinchen Hui <laruence@gmail.com>

Fixed live_range removing (bug can be triggred by JIT)


# 1180d8c8 17-Jul-2017 Dmitry Stogov <dmitry@zend.com>

Separate ISSET_ISEMPTY_CV/UNSET_CV from ISSET_ISEMPTY_VAR/UNSET_VAR


# bc5811f3 04-Jul-2017 Anatol Belski <ab@php.net>

further sync for vim mode lines


# e5741da8 25-Jun-2017 Nikita Popov <nikita.ppv@gmail.com>

Fix format arguments

Only dropped one before, both need to go...


# 9dfcb04f 25-Jun-2017 Nikita Popov <nikita.ppv@gmail.com>

Fix typo


# 8e10c9d3 25-Jun-2017 Michał Brzuchalski <michal.brzuchalski@gmail.com>

Implement object type annotation

RFC: https://wiki.php.net/rfc/object-typehint


# a916bed8 30-May-2017 Dmitry Stogov <dmitry@zend.com>

Fixed function name resolution


# 65edf442 30-May-2017 Dmitry Stogov <dmitry@zend.com>

Check for possible run-time function name resolution


# 6043f76a 30-May-2017 Dmitry Stogov <dmitry@zend.com>

Added ZEND_FUNC_NUM_ARGS, ZEND_FUNC_GET_ARGS instructions, to implement corresponding builtin functions.
Special optimisation for "array_slice(INT, func_get_args())" pattern.


# 017d65d7 29-May-2017 Dmitry Stogov <dmitry@zend.com>

Extend ZEND_SEND_ARRAY to eliminate array_slice() call for "call_user_func_array(_, array_slice(_, LONG, _))" pattern.


# d32288b5 25-May-2017 Dmitry Stogov <dmitry@zend.com>

Fixed copy-paste mistake


# f00d1c72 25-May-2017 Dmitry Stogov <dmitry@zend.com>

Added ZEND_GET_CLASS, ZEMD_GET_CALLED_CLASS, ZEND_GET_TYPE instructions, to implement corresponding builtin functions.


# cd953269 24-May-2017 Dmitry Stogov <dmitry@zend.com>

Added ZEND_COUNT instruction, to implement corresponding builtin.


# 44ec7327 25-May-2017 Dmitry Stogov <dmitry@zend.com>

Fixed ZEND_IN_ARRAY related issues


# 7c738306 24-May-2017 Dmitry Stogov <dmitry@zend.com>

Added ZEND_IN_ARRAY instruction, implementing optimized in_array() builtin function, through hash lookup in flipped array


# 8203a175 18-May-2017 Dmitry Stogov <dmitry@zend.com>

Remove unused opcode handlers


# d5bc8624 15-May-2017 Anatol Belski <ab@php.net>

avoid strlen in common case


# ae3f975c 15-May-2017 Anatol Belski <ab@php.net>

Fixed bug #74589 __DIR__ wrong for unicode character


# b966a8b5 08-May-2017 Xinchen Hui <laruence@gmail.com>

Fixed another potential dangling pointer


# 87d56a3d 08-May-2017 Xinchen Hui <laruence@gmail.com>

Fixed bug #74546 (SIGILL in ZEND_FETCH_CLASS_CONSTANT_SPEC_CONST_CONST_HANDLER())


# 44156b31 29-Apr-2017 Andrea Faulds <ajf@ajf.me>

Drop ZEND_API from zend_assert_valid_class_name

This is a convenience function for internal use and shouldn't have been
exported.


# b6a4aad8 22-Apr-2017 Nikita Popov <nikita.ppv@gmail.com>

Remove the ZEND_ACC_CLONE flag

This one is completely unused


# e433c23b 15-Apr-2017 Nikita Popov <nikita.ppv@gmail.com>

Improve accuracy of opline lineno information

If compile_var() was used instead of compile_expr() we did not
update the current lineno.


# 2135b057 14-Apr-2017 David Matejka <matej21@matej21.cz>

Fixed bug #74444: multiple catch freezes in some cases

zend_emit_jump() may reallocate, so reload the opline.


# e92896f7 10-Apr-2017 Sammy Kaye Powers <sammyk@sammykmedia.com>

Remove spurious `CG(context).in_finally` dingleberry


# ad865281 17-Mar-2017 Nikita Popov <nikita.ppv@gmail.com>

Implement jumptable optimization


# f5951cc8 23-Mar-2017 Nikita Popov <nikita.ppv@gmail.com>

Fix lineno for AST_ZVAL nodes


# fec708f5 22-Mar-2017 Nikita Popov <nikita.ppv@gmail.com>

Simplify increment_lineno handling


# c6982995 04-Mar-2017 Anatol Belski <ab@php.net>

Interned strings unification for TS/NTS

Hereby, interned strings are supported in thread safe PHP. The patch
implements two types of interned strings

- interning per process, strings are not freed till process end
- interning per request, strings are freed at request end

There is no runtime interning.

With Opcache, all the permanent iterned strings are copied into SHM on
startup, additional copying into SHM might happen on demand.


# 868930e0 22-Feb-2017 Sara Golemon <pollita@php.net>

Fix potential crash when setting invalid declare value

Using a non-literal expression in a declare value can cause the
compiler to crash trying to turn that AST node into a usable zval.

There was an existing test for such values using 'encoding',
but that didn't crash because it's handled by the lexer
rather than being compiled.

Trying to use a non-literal with ticks reproduces the crash.


# 7a73c5f6 01-Feb-2017 Nikita Popov <nikita.ppv@gmail.com>

Deprecate (unset)

Pecularily, there wasn't a single test for the (unset) cast...


# 162aa1a5 30-Jan-2017 Nikita Popov <nikita.ppv@gmail.com>

Deprecate __autoload()


# 141d1ba9 13-Jan-2017 Dmitry Stogov <dmitry@zend.com>

Introduced "zend_type" - an abstraction for type-hinting representation.


# dac6c639 04-Jan-2017 Sammy Kaye Powers <sammyk@sammykmedia.com>

Update copyright headers to 2017


# 478f119a 04-Jan-2017 Sammy Kaye Powers <sammyk@sammykmedia.com>

Update copyright headers to 2017


# 9e29f841 02-Jan-2017 Sammy Kaye Powers <sammyk@sammykmedia.com>

Update copyright headers to 2017


# ed0602fe 21-Dec-2016 Nikita Popov <nikic@php.net>

Fix string extension in negate_num_string

Forgot to actually assign the reallocated string...


# 82988d3e 21-Dec-2016 Xinchen Hui <laruence@gmail.com>

Revert "Reorder the oplines" (Break Zend/tests/return_types/bug71092.phpt)

This reverts commit a12f43ee2c3d27a7eb9a3c873901643df5f7197e.


# a12f43ee 17-Dec-2016 Xinchen Hui <laruence@gmail.com>

Reorder the oplines

1. we should only do the return type checking when it is really about to
return
2. for 029.php, actually, the exception threw should be discard while it
jmp into finally(it could be observed by change the return to return an array)
3. after this fix, the test 029.phpt behavior consistently with 7.0
4. good for optimizer too


# 2c705813 11-Dec-2016 Nikita Popov <nikic@php.net>

Fix T_NUM_STRING negation

T_NUM_STRING follows the rules of symtable numeric string
conversion. If the offset isn't an integer under those rules, it
is treated as a string. This should apply to negated T_NUM_STRINGs
as well.


# 358bd77b 06-Dec-2016 Xinchen Hui <laruence@gmail.com>

Fixed bug #73663 ("Invalid opcode 65/16/8" occurs with a variable created with list())


# 9c1920d9 02-Dec-2016 Dmitry Stogov <dmitry@zend.com>

Revert "Fix memory leaks with FE_RESET upon empty iterator"

This reverts commit 00e516e57549f29387ef858de7847e7e4ca0c1c0.


# 00e516e5 28-Nov-2016 Bob Weinand <bobwei9@hotmail.com>

Fix memory leaks with FE_RESET upon empty iterator

Solved by manually freeing and jumping to the opcode *after* FE_FREE


# e19d263d 23-Nov-2016 Xinchen Hui <laruence@gmail.com>

Fixed bug #73585 (Logging of "Internal Zend error - Missing class information" missing class name)

Actually, I doubt how thing bug could be triggered


# 2104bea5 12-Nov-2016 Kalle Sommer Nielsen <kalle@php.net>

Remove Netware support

If this does not break the Unix system somehow, I'll be amazed. This should get most of it out, apologies for any errors this may cause on non-Windows ends which I cannot test atm.


# bdc1ba3e 01-Nov-2016 Dmitry Stogov <dmitry@zend.com>

Intriduced ZEND_ACC_INHERITED class flag.
It's going to be helpful for static optimisations, when "parent" is not known yet.


# 2a75f502 08-Oct-2016 Nikita Popov <nikic@php.net>

Fix bug #66773, #66862

This a partial backport of 8754b19. It
a) fixes the class/function/constant import table confusion in the
namespaced case, and
b) restricts conflict checks to a single file based on a filename
pointer comparison.

It does not fix the issues with filename reuse (e.g. due to eval)
and late-bound classes. This part of the change requires globals
changes.


# 8754b191 06-Oct-2016 Nikita Popov <nikic@php.net>

Fix "already in use" check inconsistencies/bugs

This fixes the following issues:
* "use function" and "use const" inside namespaced code were checking
for conflicts against class imports. Now they always check against
the correct symbol type.
* Symbol conflicts are now always checked within a single file only.
Previously class uses inside namespaced code were checked globally.
This behavior is illegal because symbols from other files are not
visible if opcache is used, resulting in behavioral discrepancies.
Additionally this made the presence/absence of symbol errors dependent
on autoloading order, which is volatile.
* The "single file" restriction is now enforced by collecting defined
symbols inside a separate hash table. Previously it was enforced
(for the non-namespaced case) by comparing the filename of the
symbol declaration. However this is inaccurate if the same filename
is used multiple times, such as may happen if eval() is used.
* Additionally the previous approach relies on symbols being registered
at compile-time, which is not the case for late-bound classes, which
makes the behavior dependent on class declaration order, as well as
opcache (which may cause delayed early-binding).
* Lastly, conflicts are now consistently checked for conditionally
defined symbols. Previously only declaration-after-use conflicts were
checked in this case. Now use-after-declaration conflicts are
detected as well.


# 1f541298 28-Sep-2016 Nikita Popov <nikic@php.net>

Handle resource keys in constexpr arrays


# 40b8105c 28-Sep-2016 Nikita Popov <nikic@php.net>

Fix the constant array case as well


# 19f1ff5a 28-Sep-2016 Nikita Popov <nikic@php.net>

Combine code for keyed/unkeyed list()


# 6f9e5684 28-Sep-2016 Nikita Popov <nikic@php.net>

Fix segfault when empty entry in keyed array assignment


# bd893061 24-Sep-2016 Nikita Popov <nikic@php.net>

Use SEND_USER for CONST|TMP as well

Otherwise we're missing the "expected to be a reference, value
given" warning that appears for ordinary calls to call_user_func().

Also update an UPGRADING note with recent changes wrt
call_user_func().


# 30af8061 09-Sep-2016 Nikita Popov <nikic@php.net>

Compile intval() etc to casts


# 135f2758 06-Sep-2016 Nikita Popov <nikic@php.net>

Add ISSET_ISEMPTY_STATIC_PROP to smart branch list


# b66039db 28-Aug-2016 Dmitry Stogov <dmitry@zend.com>

Fixed bug #72944 (Null pointer deref in zval_delref_p).


# 1397f754 15-Aug-2016 Nikita Popov <nikic@php.net>

Fix handling of qualified nullable parameter types

compile_typename() can't deal with TYPE_NULLABLE flags, drop it
beforehand.


# f4d1af79 22-Jul-2016 Nikita Popov <nikic@php.net>

Fix build

Missed this occurrence...


# e3e400c9 14-Jul-2016 Nikita Popov <nikic@php.net>

Fix return from by-ref generators


# 8c5b27e0 14-Jul-2016 Xinchen Hui <laruence@gmail.com>

Fixed bug #72594 (Calling an earlier instance of an included anonymous class fatals)


# 3b8cb211 13-Jul-2016 Dmitry Stogov <dmitry@zend.com>

Fixed bug #72347 (VERIFY_RETURN type casts visible in finally)
Fixed bug #72216 (Return by reference with finally is not memory safe)
Fixed bug #72215 (Wrong return value if var modified in finally)


# d77a8b05 07-Jul-2016 Xinchen Hui <laruence@gmail.com>

This became unnecessary after #72543 is fixed


# fbca255c 06-Jul-2016 Dmitry Stogov <dmitry@zend.com>

Fixed bug #71539 (Memory error on $arr[$a] =& $arr[$b] if RHS rehashes)


# ab304579 06-Jul-2016 Nikita Popov <nikic@php.net>

Forbid use of array() in nested destructuring

Previously array() was only forbidden on the outermost level.


# 08777e96 30-Jun-2016 Pedro Magalhães <pkemo85@gmail.com>

Don't enforce LSP if prototype method is private

Fixes bug #72496.


# 9b8f1d60 28-Jun-2016 Nikita Popov <nikic@php.net>

Don't use FUNC_ARG fetches for call_user_func()

This makes no sense -- SEND_USER can't even handle INDIRECTs.


# cb7cc16c 28-Jun-2016 Nikita Popov <nikic@php.net>

Use DO_UCALL for method calls


# b8a9e981 28-Jun-2016 Xinchen Hui <laruence@gmail.com>

Fixed build


# ce7e180a 28-Jun-2016 Xinchen Hui <laruence@gmail.com>

Fixed bug #72508 (strange references after recursive function call and "switch" statement)


# ebb99a1a 21-Jun-2016 Dmitry Stogov <dmitry@zend.com>

Fixed compilation warnings


# 16160386 21-Jun-2016 Dmitry Stogov <dmitry@zend.com>

Added ZEND_ATTRIBUTE_FORMAT to some middind functions.
"%p" replaced by ZEND_LONG_FMT to avoid compilation warnings.
Fixed most incorrect use cases of format specifiers.


# fcd8a5ca 17-Jun-2016 Xinchen Hui <laruence@gmail.com>

Fixed bug #72441 (Segmentation fault: RFC list_keys)


# a9512af8 15-Jun-2016 Dmitry Stogov <dmitry@zend.com>

Implemented RFC: Fix inconsistent behavior of $this variable
Squashed commit of the following:

commit bdd3b6895c3ce3eacfcf7d4bf4feb8dfa61801fd
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Jun 16 00:19:42 2016 +0300

Fixed GOTO VM

commit 2f1d7c8b89ce821086d357cf65f629f040a85c03
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Jun 15 21:01:57 2016 +0300

Removed unused variable

commit cf749c42b0b1919f70b1e7d6dcbfff76899506af
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Jun 15 19:06:16 2016 +0300

Protection from $this reassign through mb_parse_str()

commit 59a9a6c83c66b666971e57f1173b33a422166efd
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Jun 15 18:14:50 2016 +0300

Added type inference rule for FETCH_THIS opcode

commit 73f8d14a856f14a461430b3c7534ab2ce870cbf6
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Jun 15 18:11:18 2016 +0300

Restored PHP-7 behavior of isset($this->foo).
It throws exception if not in object context.
Removed useless opcode handlers.

commit fa0881381e8ae97e022ae5d1ec0851c952f33c82
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue May 31 12:25:47 2016 +0300

Changed "Notice: Undefined variable: this" into "Exception: Using $this when not in object context".

commit e32cc528c0f2c97963d8ec83eff0269f1f45af18
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue May 24 02:02:43 2016 +0300

Throw exception on attempt to re-assign $this through extract() and parse_str().

commit 41f1531b52113ec8a4c208aa6b9ef50f1386bb3f
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon May 23 22:18:36 2016 +0300

Fixed inconsistent $this behavior


# d6e66836 14-Jun-2016 Xinchen Hui <laruence@gmail.com>

C89 compatibility


# 9c8e1c03 14-Jun-2016 Xinchen Hui <laruence@gmail.com>

Only allow single comma in tail


# 6166c26f 14-Jun-2016 Xinchen Hui <laruence@gmail.com>

Cleanup


# 792e8938 10-Jun-2016 Nikita Popov <nikic@php.net>

Fixed bug #72373


# 10f05625 07-Jun-2016 Dmitry Stogov <dmitry@zend.com>

Better fix for bug #70228 (memleak if return in finally block)


# 4da3e77b 04-Jun-2016 Aaron Piotrowski <aaron@trowski.com>

Covariance on inheriting classes with iterable


# 9ba243b6 04-Jun-2016 Nikita Popov <nikic@php.net>

Forbid ?void


# 73b2f791 04-Jun-2016 Nikita Popov <nikic@php.net>

More explicit errors for return; vs return null;

Both for "return null" in a void function and "return" in
a nullable return function.


# fe907562 04-Jun-2016 Nikita Popov <nikic@php.net>

Forbid "return;" for typed returns already at compile-time

These would otherwise generate a "none returned" error at runtime.
Catch them early.


# cb3825a8 03-Jun-2016 Nikita Popov <nikic@php.net>

Small generator-related cleanups


# bf6a6598 03-Jun-2016 Aaron Piotrowski <aaron@trowski.com>

Fix default argument check


# 72692e9a 03-Jun-2016 Aaron Piotrowski <aaron@trowski.com>

Add iterable pseudo-type


# b111da96 31-May-2016 Dmitry Stogov <dmitry@zend.com>

Split ZEND_SEND_VAR_NO_REF into ZEND_SEND_VAR_NO_REF and ZEND_SEND_VAR_NO_REF_EX (similar to ZEND_SEND_VAL) and remove ZEND_ARG_* flags.


# 2ae21abd 24-May-2016 Dmitry Stogov <dmitry@zend.com>

Fixed bug #72213 (Finally leaks on nested exceptions).

Squashed commit of the following:

commit 8461b0407fc9eab0869d43b84e6a92ba2fe06997
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed May 25 00:34:42 2016 +0300

Rmoved zend_try_catch_element.parent and walk through op_array.try_catch_array backward from the current try_cacth_offset.

commit 0c71e249649bed178bfbef30bb3e63c57f07af05
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed May 25 00:04:53 2016 +0300

Move SAVE_OPLINE() to its original place

commit 111432a4df738fcd65878a42f23194dc3c4983a2
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed May 25 00:01:10 2016 +0300

Separate the common part of ZEND_HANDLE_EXCEPTION and FAST_RET into zend_dispatch_try_catch_finally_helper.

commit 4f21c06c2ec17819a708bc037f318784554a6ecd
Author: Nikita Popov <nikic@php.net>
Date: Tue May 24 14:55:27 2016 +0200

Improve finally fix

commit da5c7274997b8308e682b5bf280124e3a1483086
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue May 24 10:36:08 2016 +0300

Fixed Zend/tests/try/bug70228_3.phpt and Zend/tests/try/bug70228_4.phpt

commit cfcedf2fb4f4fc1f7de9f7d53a3037fed7795f19
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue May 24 02:59:27 2016 +0300

Added test

commit 4c6aa93d43da941eb4fda15b48154bfb104bdc04
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue May 24 00:38:20 2016 +0300

Added tests

commit 8a8f4704b0eca2e460d42c1f253a363b0db8e510
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon May 23 23:27:34 2016 +0300

Fixed bug #72213 (Finally leaks on nested exceptions)


# 4f077aee 04-Apr-2016 Bob Weinand <bobwei9@hotmail.com>

Allow for [] = $array; (alias for list())


# be071702 13-May-2016 Dmitry Stogov <dmitry@zend.com>

Fixed bug #72188 (Nested try/finally blocks losing return value)


# ccf18da4 12-May-2016 Dmitry Stogov <dmitry@zend.com>

Eliminated checks for (func->op_array.fn_flags & ZEND_ACC_GENERATOR) in fast path of DO_FCALL* handlers.
This slightly improves calls to regular function and method calls in cost of a bit slower generator initialization.
Separate call frame for generators, allocated on heap, now created by ZEND_GENERATOR_CREATE instruction.


# 7b94b958 12-May-2016 Dmitry Stogov <dmitry@zend.com>

Intern some known (and offten used) strings.


# c19cb70d 06-May-2016 Dmitry Stogov <dmitry@zend.com>

Revert "Refactor zval cleanup into single function"

This reverts commit bac6fdb0c52c924e726c5a78de8858bf27b6586b.


# bac6fdb0 05-May-2016 Bob Weinand <bobwei9@hotmail.com>

Refactor zval cleanup into single function

Also use zval_ptr_dtor_nogc() everywhere in Zend in favor of zval_dtor()


# 9662259c 28-Apr-2016 Levi Morrison <levim@php.net>

Add nullable parameter types

This works off of Dmitry's commit for nullable return types


# 49fe737e 06-Apr-2016 Dmitry Stogov <dmitry@zend.com>

Implement nullable return types.


# 9af0c96a 04-May-2016 Nikita Popov <nikic@php.net>

Fix bug #72159


# 9bbee305 04-May-2016 Joe Watkins <krakjoe@php.net>

add compiler option to disable builtins (special case function calls)


# 0aed2cc2 01-May-2016 Pierrick Charron <pierrick@php.net>

Allow catching multiple exception types in a single catch statement

This commit add the possibility to catch multiple exception types in
a single catch statement to avoid code duplication.

try {
// Some code...
} catch (ExceptionType1 | ExceptionType2 $e) {
// Code to handle the exception
} catch (\Exception $e) {
// ...
}


# d0069ca6 01-May-2016 Nikita Popov <nikic@php.net>

Fix ('\bar')() in namespace


# 2578d080 29-Apr-2016 Dmitry Stogov <dmitry@zend.com>

Fixed compilation warnings


# 4f54c15c 07-Apr-2016 Nikita Popov <nikic@php.net>

Ct bind private/final $this method call args

The test covers two edge-cases wrt opcache support.


# 69efeb12 21-Apr-2016 Bob Weinand <bobwei9@hotmail.com>

Fix constant expr coaleasce with protected mode opcache


# a287c3f7 21-Apr-2016 Bob Weinand <bobwei9@hotmail.com>

Fix magic constants (__LINE__) with ?? for constant scalar exprs

Also fix general memory leak when root ast gets replaced in compile time evaluation


# 9f3eab44 17-Apr-2016 Márcio Almada <marcio3w@gmail.com>

allow null coalescing (??) on constant expressions


# c4f69b6d 19-Apr-2016 Adam Harvey <aharvey@php.net>

Fix ZTS builds by adding a missing TSRMLS_FETCH().


# 77bb96d7 20-Apr-2016 Nikita Popov <nikic@php.net>

Fix bug #71737

Also improve the error message for $this used in parameters.


# ffc697ac 18-Apr-2016 Dmitry Stogov <dmitry@zend.com>

Prevent usage in GC after free.


# ea1f3005 17-Apr-2016 Nikita Popov <nikic@php.net>

Fully initialize DECLARE_CLASS/FUNCTION opcodes


# b73517c1 14-Apr-2016 Dmitry Stogov <dmitry@zend.com>

Use DO_FCALL_BY_NAME instead of DO_FCALL, if possible


# 3444c1ae 07-Apr-2016 Dmitry Stogov <dmitry@zend.com>

Use return type hints for type inference and eliminate useless VERIFY_RETRUN_TYPE opcodes.


# 14e4c610 02-Apr-2016 Joe Watkins <krakjoe@php.net>

Fix #69537: __debugInfo with empty string for key gives error


# 91c10662 02-Apr-2016 Joe Watkins <krakjoe@php.net>

fix #69537: __debugInfo with empty string for key gives error


# 1e82ad80 30-Mar-2016 Andrea Faulds <ajf@ajf.me>

Warn about invalid strings in arithmetic

Squashed commit of the following:

commit e05d3b67325d4521418483ed924ac9211a188919
Author: Andrea Faulds <ajf@ajf.me>
Date: Wed Mar 30 01:43:35 2016 +0100

UPGRADING and NEWS

commit 6caf1d4585207d1b02fb06a216cd7da1a1f5e12d
Author: Andrea Faulds <ajf@ajf.me>
Date: Sun Mar 20 21:18:33 2016 +0000

Fixes

commit 6dadb1b0efe5e2ed071e95a55c806519e61377ac
Author: Andrea Faulds <ajf@ajf.me>
Date: Sun Feb 14 02:15:01 2016 +0000

Add test for numeric string errors in assignment

commit bd5f04e8dd576f92a48d25546f4f9a0f57f374de
Author: Andrea Faulds <ajf@ajf.me>
Date: Sat Feb 13 23:53:05 2016 +0000

Add test for numeric string errors

commit c72e92f16d512bcae30cc9639c89bcb08d971742
Author: Andrea Faulds <ajf@ajf.me>
Date: Tue Jan 26 23:28:33 2016 +0000

Add test for scientific notation in integer operations

commit d94c08852d405b3a7ef6c84d24bf7915c890ce78
Author: Andrea Faulds <ajf@ajf.me>
Date: Sun Feb 14 01:25:57 2016 +0000

Disable optimiser evaluation for numeric string errors

commit 30ee954ed13d933e766c68605d683c8ebae3d8ee
Author: Andrea Faulds <ajf@ajf.me>
Date: Sun Feb 14 01:46:25 2016 +0000

fixup

commit a6403b79e054c95e2b7345d787f3092b261eed27
Author: Andrea Faulds <ajf@ajf.me>
Date: Sat Feb 13 22:00:27 2016 +0000

Do not convert error-causing numeric strings ahead-of-time

commit f9dc35401471ef3035954cb6f171826769297548
Author: Andrea Faulds <ajf@ajf.me>
Date: Sat Feb 13 19:15:38 2016 +0000

Disable compile-time evaluation for numeric string errors

commit e05b0cc8496ea082c6db27efd8b8277ef1f785b5
Author: Andrea Faulds <ajf@ajf.me>
Date: Fri Feb 5 11:42:26 2016 +0000

Make _zval_get_long_func_noisy function for inlining

commit 84d66321a57e579759109650c8bb7e3d5002854a
Author: Andrea Faulds <ajf@ajf.me>
Date: Tue Jan 26 23:10:00 2016 +0000

Update tests

commit 5ac4a0cc4bff282e3a15eaa8ab44b67391881a6d
Author: Andrea Faulds <ajf@ajf.me>
Date: Tue Jan 26 22:08:19 2016 +0000

Use is_numeric_string_ex for zval_get_long etc.

commit c21f08848533723331012a62a153de3577731d6a
Author: Andrea Faulds <ajf@ajf.me>
Date: Thu Jan 7 21:13:04 2016 +0000

Update tests

commit 63e214cf8160420bfc51c6a2b4ae32f09ad8e8af
Author: Andrea Faulds <ajf@ajf.me>
Date: Wed Jan 6 00:28:01 2016 +0000

Warn on non-/bad numeric strings in arithmetic


# 4327370d 26-Mar-2016 Joe Watkins <krakjoe@php.net>

fix #71414 (Interface method override inherited method and implemented in a trait causes fatal error)


# b867bd1c 26-Mar-2016 Nikita Popov <nikic@php.net>

Fix FETCH_CLASS_SELF comparisons

Turns out those don't form a bitfield.


# 8e5b1397 12-Mar-2016 Nikita Popov <nikic@php.net>

Evaluate arguments of new for classes without ctor

ML: http://markmail.org/message/4b3mk7jid64zvz34


# 37c8bb58 25-Mar-2016 Andrea Faulds <ajf@ajf.me>

Allow specifying keys on list() elements

Squashed commit of the following:

commit 0361dbe35616722fbe51b446ab7b43a9ca01f455
Author: Andrea Faulds <ajf@ajf.me>
Date: Fri Mar 25 16:59:20 2016 +0000

UPGRADING and NEWS

commit dca9d4a36c845bfe4fbcb9db18e184469110ea5a
Author: Andrea Faulds <ajf@ajf.me>
Date: Fri Mar 25 16:45:18 2016 +0000

Add tests contributed by @jesseschalken

commit e557f77eab692ed8bb18dbdff48777d80b6f6cbd
Author: Andrea Faulds <ajf@ajf.me>
Date: Fri Mar 25 16:44:51 2016 +0000

Rebuild VM

commit 70942e4c3cbb6b4fe6305b27e1e1b2bed78e76df
Author: Andrea Faulds <ajf@ajf.me>
Date: Wed Feb 24 13:12:26 2016 +0000

Add test for evaluation order of nested list() keys

commit ed3592e80c5231d9e9a95558aa768a42b75bdebc
Author: Andrea Faulds <ajf@ajf.me>
Date: Wed Feb 24 12:42:04 2016 +0000

Add test for evaluation order

commit 589756cbcccbb4702c90b5aa9c091af446058ca1
Author: Andrea Faulds <ajf@ajf.me>
Date: Tue Jan 19 17:29:34 2016 +0000

Allow arbitrary expressions for key

commit 3f622077c32fcd82fcf27a41bd0f22e2552ec4c5
Author: Andrea Faulds <ajf@ajf.me>
Date: Tue Jan 19 17:45:10 2016 +0000

Remove compile-time HANDLE_NUMERIC (see bug #63217)

commit bab758119aec63289a2c5bef6a5f90a7bc6441a2
Author: Andrea Faulds <ajf@ajf.me>
Date: Sun Jan 17 01:20:26 2016 +0000

Handle numeric strings

commit 14bfe93ddc34d1175bccb42a158be8842c472a9c
Author: Andrea Faulds <ajf@ajf.me>
Date: Sun Jan 17 01:09:36 2016 +0000

Allow trailing comma

commit f4c8b2cb30fc074b15b5f7aabef5444382403b5d
Author: Andrea Faulds <ajf@ajf.me>
Date: Sat Jan 16 23:47:11 2016 +0000

Add tests

commit 0085884a6176c3a981b53131fbb4fa0c44db2670
Author: Andrea Faulds <ajf@ajf.me>
Date: Sat Jan 16 22:24:23 2016 +0000

Handle non-integer/string opcodes

commit e572d2d0ada6a64b36a2c6f5e8cb57439f51b55e
Author: Andrea Faulds <ajf@ajf.me>
Date: Sat Jan 16 21:10:33 2016 +0000

Disallow mixing keyed and unkeyed list() elements

commit cede13ccfe0c486591fa84764271ac1b8cb90d0b
Author: Andrea Faulds <ajf@ajf.me>
Date: Sun Jan 10 20:46:44 2016 +0000

list() with keys (no foreach or tests)


# bc49f8b4 22-Mar-2016 Dmitry Stogov <dmitry@zend.com>

Fixed possible memory leak.


# dc842bbf 21-Mar-2016 Nikita Popov <nikic@php.net>

Fixed bug #71871


# 24f63b1c 20-Mar-2016 Nikita Popov <nikic@php.net>

Fix broken merge


# 93499bfd 17-Mar-2016 Xinchen Hui <laruence@gmail.com>

Fixed test & ZEND_BOOL should result TMP_VAR


# 910e6dc6 17-Mar-2016 Xinchen Hui <laruence@gmail.com>

Fixed for master


# 64dae1ea 13-Mar-2016 Nikita Popov <nikic@php.net>

Statically bind static method call arguments

If we know what method will be called, use ct-bound send opcodes.

The intl test is changed because a runtime error changed to a
compile-time error.


# dc33c79a 19-Feb-2016 Dmitry Stogov <dmitry@zend.com>

Evaluate ord(<string>), chr(<int>) and defined(<persistent-constant>) at compile time


# d10911af 13-Feb-2016 Nikita Popov <nikic@php.net>

Simplify previous fix

I didn't notice that there already is a var with the same value.


# 502dd99a 13-Feb-2016 Nikita Popov <nikic@php.net>

Fix ZEND_NEW live ranges

While the def starts at DO_FCALL, the variable should still be the
result of NEW, not DO_FCALL.

I had to fix the test for #68652, because the code started to
(correctly) free the "new self()" object, which triggered an
infinite destructor loop.


# ccc06e25 12-Feb-2016 Nikita Popov <nikic@php.net>

Forbid yield from in by-reference generators

The current yield from implementation doesn't support by-ref
yields. It's likely not worthwhile to actually implement this,
but we should at least keep the door open for the future by
issuing a compile error.

Refs bug #71252.


# 44ed1cb5 11-Feb-2016 Nikita Popov <nikic@php.net>

Remove ZEND_CALL_CTOR_RESULT_UNUSED

Instead emit a FREE on the result of NEW.


# 8c2d5596 11-Feb-2016 Dmitry Stogov <dmitry@zend.com>

Combine conditions


# 5faedf5b 05-Feb-2016 Nikita Popov <nikic@php.net>

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.


# 9f82f21d 06-Feb-2016 Nikita Popov <nikic@php.net>

Fix bug #71529


# 35662c9b 12-Jan-2016 Nikita Popov <nikic@php.net>

Forbid double use() and use() of param

Also commit a test I forgot to add for forbidden use() of
auto-globals.


# 6579e484 11-Jan-2016 Dmitry Stogov <dmitry@zend.com>

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.


# 16a2b473 07-Jan-2016 Xinchen Hui <laruence@gmail.com>

Fixed bug #71300 (Segfault in zend_fetch_string_offset)


# 97a9470d 02-Jan-2016 Xinchen Hui <laruence@gmail.com>

bump year which is missed in rev 49493a2


# 3537e95d 02-Jan-2016 Xinchen Hui <laruence@gmail.com>

bump year which is missed in rev 49493a2


# 5362f0ad 31-Dec-2015 Derick Rethans <github@derickrethans.nl>

MFH: Fix lineno for finally FAST_CALL and JMP


# b3afeeab 30-Dec-2015 Nikita Popov <nikic@php.net>

Fix lineno for finally FAST_CALL and JMP


# 65e456f3 29-Dec-2015 Nikita Popov <nikic@php.net>

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.


# 44404368 29-Dec-2015 Nikita Popov <nikic@php.net>

Forbid use() of auto-globals

We don't correctly support it, it doesn't make sense and it's also
forbidden for parameters.


# 2a7eeff3 20-Oct-2015 Levi Morrison <levim@php.net>

Remove mentions of "type hint" and "typehint"


# aa4a83fe 22-Dec-2015 Dmitry Stogov <dmitry@zend.com>

Fixed bug #71196 (Memory leak with out-of-order live ranges)


# 88eae43f 20-Dec-2015 Nikita Popov <nikic@php.net>

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.


# 42c8f5e9 19-Dec-2015 Andrea Faulds <ajf@ajf.me>

Fix bug #70804

This follows on from a4648ded430985e019b446939c4ff5bef36c0b91 and
4e01269082d20f5598c481f122b3eea10a586e2b.
Both -(+0.0) and +(-0.0) behaved incorrectly for the same reason.


# a4648ded 17-Dec-2015 Andrea Faulds <ajf@ajf.me>

Fix bug #52355


# 56f11061 14-Dec-2015 Nikita Popov <nikic@php.net>

Use FETCH_CLASS_EXCEPTION for instanceof

This does not collide with NO_AUTOLOAD -- missing classes will be
silenced, but invalid use of self etc will result in an exception
instead of a fatal error.


# 09191789 13-Dec-2015 Nikita Popov <nikic@php.net>

Add result op for ASSERT_CHECK to fix SSA

Otherwise one source of the phi node at the join point will be
borked.

I'm marking the ASSERT_CHECK result as unused in pass2, which is
a bit ugly.


# 778e5f3d 11-Dec-2015 Xinchen Hui <laruence@gmail.com>

Fixed bug #71092 (Segmentation fault with return type hinting)


# 591fe26d 11-Dec-2015 Nikita Popov <nikic@php.net>

Remove BP_VAR_REF

The distinction between BP_VAR_REF and BP_VAR_W is no longer
revelant, since we dropped support for =& new.


# 04e3d82b 10-Dec-2015 Nikita Popov <nikic@php.net>

Make duplicate class constant error for internal class

And drop two duplicate constant declarations from intl. These
were leaking previously.


# 8e5e3301 10-Dec-2015 Nikita Popov <nikic@php.net>

Make ZEND_CLONE return a TMP_VAR

As the return value can't be reference and it's unlikely to be
unused.

Also remove some unnecessary checks for ce==NULL. A ce is required
nowadays.


# f1278ede 10-Dec-2015 Nikita Popov <nikic@php.net>

Drop two compiler TODOs

Call-time pass by reference is now a parse error.
There is no benefit in dropping implementing_class currently.


# c8a64e28 10-Dec-2015 Nikita Popov <nikic@php.net>

Reintroduce use of FETCH_GLOBAL_LOCK

Just found this old AST todo...

It no longer makes sense as an optimization due to the introduction
of BIND_GLOBAL, however it ensures that the global variable name is
not evaluated twice, which is presumably something we wish to
guarantee.


# 3fa86105 10-Dec-2015 Nikita Popov <nikic@php.net>

Remove FETCH_STATIC_MEMBER flag


# 37f34252 10-Dec-2015 Nikita Popov <nikic@php.net>

Fix Foo::${42} and similar

Fixes segfault on direct use, segfault on opcache evaluated use,
leak on temporary use.

Fixes analogeous segfault for ${42} on opcache eval as well.


# 5ee7b7d0 09-Dec-2015 Dmitry Stogov <dmitry@zend.com>

Don't create live-range across NOPs and some other instructions


# c1803bf6 08-Dec-2015 Dmitry Stogov <dmitry@zend.com>

Avoid construction of empty live-ranges because of OP_DATA instruction


# a75c1950 07-Dec-2015 Dmitry Stogov <dmitry@zend.com>

Implemented the RFC `Support Class Constant Visibility`.

Squashed commit of the following:

commit f11ca0e7a57793fa0e3e7f6d451720e6c42bb0b9
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Dec 8 12:38:42 2015 +0300

Fixed test expectation

commit 211f873f542504d0a0f72b6b5cb23908a1c99a2d
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Dec 8 12:28:38 2015 +0300

Embed zend_class_constant.flags into zend_class_constants.value.u2.access_flags

commit 51deab84b2cdbf9cdb1a838cf33b2ee45c61748b
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon Dec 7 11:18:55 2015 +0300

Fixed issues found by Nikita

commit 544dbd5b47e40d38a8ccb96bc5583e9cb7fdd723
Author: Dmitry Stogov <dmitry@zend.com>
Date: Sat Dec 5 02:41:05 2015 +0300

Refactored immplementation of https://wiki.php.net/rfc/class_const_visibility
@reeze created an RFC here and I emailed internals here and didn't get any responses positive/negative.


# 1f65006f 29-Nov-2015 Xinchen Hui <laruence@gmail.com>

Fixed bug #70931 (Two errors messages are in conflict)


# 99dd7ee8 26-Nov-2015 Nikita Popov <nikic@php.net>

Forbid namespace\int type hint as well


# 3cdbe347 25-Nov-2015 Xinchen Hui <laruence@gmail.com>

Always lower name


# 05738eb7 25-Nov-2015 Xinchen Hui <laruence@gmail.com>

Revert "Improved fix for Fully qualified (leading backslash) type names must fail"

This reverts commit 00865ae22f2c5fdee9e500ce79d442467e0a0899.


# 00865ae2 25-Nov-2015 Xinchen Hui <laruence@gmail.com>

Improved fix for Fully qualified (leading backslash) type names must fail

it now all fails with COMPILE_ERROR instead of syntax error for T_ARRAY
but COMPILE_ERROR for int


# 569763cb 24-Nov-2015 Bob Weinand <bobwei9@hotmail.com>

Fix scalar type names with leading backslash


# 51ccc88b 23-Nov-2015 Xinchen Hui <laruence@gmail.com>

Port fix to 7.0


# a2b85dde 23-Nov-2015 Xinchen Hui <laruence@gmail.com>

Fixed bug #70958 (Invalid opcode while using ::class as trait method paramater default value)


# ab17840d 22-Nov-2015 Xinchen Hui <laruence@gmail.com>

Fixed bug #70957 (self::class can not be resolved with reflection for abstract class)


# 84610b1f 18-Nov-2015 Dmitry Stogov <dmitry@zend.com>

Don't keep wrong jump target in last CATCH.


# 366ba413 14-Oct-2015 Andrea Faulds <ajf@ajf.me>

Add void return type


# 25de928d 13-Nov-2015 Xinchen Hui <laruence@gmail.com>

Fixed bug #70912 (Null ptr dereference instantiating class with invalid array property)


# 3a5fa926 13-Nov-2015 Dmitry Stogov <dmitry@zend.com>

Squashed commit of the following:

commit afe963e6cc289696e60c6c679796ba2197c52b3b
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Nov 13 15:32:29 2015 +0300

Added news entry

commit a126b891c97848dd7ef8f1abf716328c46e0f19c
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Nov 13 15:29:21 2015 +0300

VERIFY_RETURN_TYPE doesn't have to cleanup operand on exception, bacause now, live temporary variables are released by exception unwinder.

commit 0db475e98786e6bcaa8401ee3e0b33743b9a2f2b
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Nov 12 22:55:39 2015 +0300

Fixed copy/paste

commit 0ac73fe7174bec9de9a610319a98b259bea67f7f
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Nov 11 16:11:50 2015 +0300

Fixed bug #62210 (Exceptions can leak temporary variables)


# 998204ef 12-Nov-2015 Dmitry Stogov <dmitry@zend.com>

Separate common part of compile_file() and compile_string() into zend_compile()


# 948b7f54 11-Nov-2015 Dmitry Stogov <dmitry@zend.com>

Changed ZEND_FREE.op2.num and ZEND_FE_FREE.op2.num back to use live_range_offset (try_catch_offset does't work)


# baf97b1f 10-Nov-2015 Dmitry Stogov <dmitry@zend.com>

We don't nees zend_op_array->brk_cont_array at run-time anymore.
Move zend_op_array->brk_cont_array into CG(context).brk_cont_array.
Use more compact zend_op_array->live_range instead of zend_op_array->brk_cont_array.
Semantic is kept unchanged.


# 71092b7c 10-Nov-2015 Dmitry Stogov <dmitry@zend.com>

Make FE_FETCH and following assignments to be a part of a loop.


# 86a96f2c 10-Nov-2015 Dmitry Stogov <dmitry@zend.com>

Changed meaning of "op2" for ZEND_FREE, ZEND_FE_FREE, ZEND_FAST_CALL, ZEND_FAST_RET.
Previously it was an instruction number.
Now it's an index in op_array->try_cacth_array[].


# dae37661 09-Nov-2015 Andrea Faulds <ajf@ajf.me>

Use ZEND_STRL macro for builtin_types


# 37ed0daf 02-Nov-2015 Xinchen Hui <laruence@gmail.com>

Fixed bug #70828 (php-fpm 5.6 with opcache crashes when referencing a non-existent constant)


# b009f84e 28-Oct-2015 Dmitry Stogov <dmitry@zend.com>

Removed incorrect "return" statement


# eb7be537 27-Oct-2015 Dmitry Stogov <dmitry@zend.com>

Speed up fetching of class entries for self:: parent:: and static::

This is generalized solution for Bob's idea of speed up self::method() calls without ZEND_FETCH_CLASS.

At first, it adds few new opcodes to separate class related behaviour:
FETCH_STATIC_PROP_R
FETCH_STATIC_PROP_W
FETCH_STATIC_PROP_RW
FETCH_STATIC_PROP_FUNC_ARG
FETCH_STATIC_PROP_UNSET
FETCH_STATIC_PROP_IS
UNSET_STATIC_PROP
ISSET_ISEMPTY_STATIC_PROP
FETCH_CLASS_CONSTANT

At seconds, it enables IS_UNUSED operand to fetch (self, parent or static without separate FETCH_CLASS) for new opcodes and the following ones:
INIT_STATIC_METHOD_CALL
NEW
END_INSTANCEOF

Finaly, opcache optimizer had to be fixed to support new opcodes.


# b9cc3176 24-Oct-2015 Nikita Popov <nikic@php.net>

Fix bug #70782


# 43a43368 19-Oct-2015 Levi Morrison <levim@php.net>

Refactor zend_mark_function_as_generator


# ddb6d780 06-Oct-2015 Márcio Almada <marcio3w@gmail.com>

Fix bug #70650


# e0b3b3c7 06-Oct-2015 Dmitry Stogov <dmitry@zend.com>

Revert "Fixed bug #70630 (Closure::call/bind() crash with ReflectionFunction->getClosure())"

This reverts commit 517b5536259ecf7697f353f4bfbafde857fc1f81.


# 3c034805 06-Oct-2015 Dmitry Stogov <dmitry@zend.com>

Revert "Speed up self::method() calls (no ZEND_FETCH_CLASS)"

This reverts commit 8c33bdb976e957ea67ebffd424e0a133a79c6ebe.


# 5a49ac77 06-Oct-2015 Dmitry Stogov <dmitry@zend.com>

Revert "Speed up self::$property access by 20%"

This reverts commit 0fbd3e5fe7c2df5f8eb8cf2f217902f80a9fd894.


# 0fbd3e5f 05-Oct-2015 Bob Weinand <bobwei9@hotmail.com>

Speed up self::$property access by 20%


# 8c33bdb9 05-Oct-2015 Bob Weinand <bobwei9@hotmail.com>

Speed up self::method() calls (no ZEND_FETCH_CLASS)


# 2fb8bb11 04-Oct-2015 Xinchen Hui <laruence@gmail.com>

Fixed bug #70632 (Third one of segfault in gc_remove_from_buffer)


# 517b5536 03-Oct-2015 Bob Weinand <bobwei9@hotmail.com>

Fixed bug #70630 (Closure::call/bind() crash with ReflectionFunction->getClosure())
This additionally removes support for binding to an unknown (not in parent hierarchy) scope.
Removing support for cross-scope is necessary for certain compile-time assumptions (like class constants) to prevent unexpected results


# 6c61286d 02-Oct-2015 Bob Weinand <bobwei9@hotmail.com>

Do not include zend_verify_return_type in executable ops (phpdbg)


# 45cb42f4 30-Sep-2015 Xinchen Hui <laruence@gmail.com>

Simply use 0/1 instead as dmitry suggested


# df2ff751 29-Sep-2015 Xinchen Hui <laruence@gmail.com>

Make ZEND_ECHO and removed ZEND_PRINT distinguishable


# 88e14744 29-Sep-2015 Xinchen Hui <laruence@gmail.com>

Make ZEND_ECHO and removed ZEND_PRINT distinguishable


# 29bf529d 23-Sep-2015 Anatol Belski <ab@php.net>

fix warning


# 1a5d6acf 20-Sep-2015 Joe Watkins <krakjoe@php.net>

ZEND_COMPILE_GUARDS compiler option


# 4ddeeb49 11-Sep-2015 Xinchen Hui <laruence@gmail.com>

Remove free_string_zval


# 34834c58 18-Aug-2015 Bob Weinand <bobwei9@hotmail.com>

Fixed bug #70293 (Crash with specific assertions and zend.assertions=-1)


# 12140986 12-Aug-2015 Xinchen Hui <laruence@php.net>

use efree_size here


# dbd8edbb 11-Aug-2015 Bob Weinand <bobwei9@hotmail.com>

Fixed bug #70241 (Skipped assertions affect Generator returns)


# 7ecb7618 06-Aug-2015 Steven Hilder <stevehilder@yahoo.co.uk>

Allow property names from anonymous classes to be unmangled


# 58596897 04-Aug-2015 Dmitry Stogov <dmitry@zend.com>

Get rid of ZEND_FAST_CALL_UNBOUND


# a16aa4c4 04-Aug-2015 Dmitry Stogov <dmitry@zend.com>

Move most "finally" related code-generation from pass_two() to compiler.


# 74380105 10-Jul-2015 Nikita Popov <nikic@php.net>

Try to fix finally issue


# 2a1a8f9e 02-Aug-2015 Hugh Davenport <hugh@allthethings.co.nz>

Fixed bug #70183 null pointer deref (segfault) in zend_eval_const_expr


# ac87657d 31-Jul-2015 Bob Weinand <bobwei9@hotmail.com>

Implicit return should be always on the last line of a function


# d45d5271 29-Jul-2015 Bob Weinand <bobwei9@hotmail.com>

Fix bug #70164 (__COMPILER_HALT_OFFSET__ under namespace is not defined)


# a28115cc 28-Jul-2015 Julien Pauli <jpauli@php.net>

Fix for #70159 - Better magic constants substitution


# 33a91f57 27-Jul-2015 Bob Weinand <bobwei9@hotmail.com>

Set CG(zend_lineno) to beginning for final class errors/ops


# 7ca85d88 24-Jul-2015 Bob Weinand <bobwei9@hotmail.com>

Fully fix typed generator returns


# cff6cbc0 22-Jul-2015 Nikita Popov <nikic@php.net>

Emit EXT_STMT for each statement

I'm excluding unticked statements for this (in 5.x they were included)
as this would just result in two consecutive EXT_STMTs.

Also add all class statements to unticked statements, these would
generate superfluous EXT_STMT/TICKS in the parent op_array.


# 2141ab9b 21-Jul-2015 Bob Weinand <bobwei9@hotmail.com>

Fix bug #70106 (Inheritance by anonymous class)


# 81a2c43d 21-Jul-2015 Bob Weinand <bobwei9@hotmail.com>

Add an option to not generate INIT_FCALL ops for user functions too


# c568ffe5 16-Jul-2015 Nikita Popov <nikic@php.net>

Ignore getcwd return in zend_compile

To do this move the php_ignore_value macro to ZEND_IGNORE_VALUE.


# 4064ee30 11-Aug-2015 Xinchen Hui <laruence@php.net>

Fixed bug #70240 (Segfault when doing unset($var());)


# 87a5f2c4 10-Aug-2015 Xinchen Hui <laruence@php.net>

Fixed no return statement in function returning non-void


# 1003d01f 14-Jul-2015 Bob Weinand <bobwei9@hotmail.com>

Fix __METHOD__ in functions nested into methods


# e63c756c 11-Jul-2015 Xinchen Hui <laruence@gmail.com>

Better implementation


# 0584df0a 10-Jul-2015 Bob Weinand <bobwei9@hotmail.com>

hmm, we do not need the nop after compilation, so does not matter for opcache...


# 56800e47 10-Jul-2015 Bob Weinand <bobwei9@hotmail.com>

a: try { ... } ≠ try { a: ... }


# ef1b588f 10-Jul-2015 Dmitry Stogov <dmitry@zend.com>

Resolve GOTO at compile time and replace it with sequnce of FREE/FE_FREE and JMP.


# 44f7348c 10-Jul-2015 Dmitry Stogov <dmitry@zend.com>

Exception thrown by "return" statement (from TMP destructors) shouldn't be caught in the same function


# 549e8c49 10-Jul-2015 Dmitry Stogov <dmitry@zend.com>

Squashed commit of the following:

commit 03cf871f1576f08b2348c141b209894a7bf17a86
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 10 02:45:31 2015 +0300

Revert "Fixed bug #62210 (Exceptions can leak temporary variables. As a part of the fix serious refactoring was done. op_array->brk_cont_array was removed, and replaced with more general and speed efficient op_array->T_liveliness. ZEND_GOTO opcode is always replaced by ZEND_JMP at compile time). (Bob, Dmitry, Laruence)"

This reverts commit 5ee841325901a4b040cfea56292a24702fe224d9.

commit 285a68227ce3d380e821a24fa389aa5239bd3fe1
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 10 02:45:26 2015 +0300

Revert "Tuned off dubugging of live ranges"

This reverts commit 404dc93d35f7061fc4b1b41ad6cb0721b9b52bcc.

commit 93d9d11157301ee2ec99afb6f5744b126d17f637
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 10 02:45:17 2015 +0300

Revert "Remove loop_var_stack"

This reverts commit b3a4c05071c3786e27e1326fa1b4d5acad62fccd.

commit ede68ebbc284aec79e3f719f2c8dbf9da6907752
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 10 02:45:12 2015 +0300

Revert "ZEND_SEPARATE reuses temporaries"

This reverts commit 1852f538b9f8d5e7d67fe5a4f6080396d8b10034.

commit 96d8995dc1f517fb01b481736273767509f76c47
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 10 02:45:10 2015 +0300

Revert "Add assertion in liveliness computation"

This reverts commit ed14019e8c0c852480eebc6fc552d8c3d939dce1.

commit 0649d7bfef152e6cc8e67b922534e9946c634d9c
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 10 02:45:07 2015 +0300

Revert "Fixed invalid live-range detection"

This reverts commit 54f367ee2a2e4cb7c952b17915c226fdc56038ab.

commit dfe8f3851f6b04595eb089323e3492115a59363e
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 10 02:45:04 2015 +0300

Revert "Add test guaranteeing that loop vars are only freed after potential return type exceptions"

This reverts commit f5db5a558d550bf441373febebbb02f3884209d1.

commit 52a94aad6f48a199358cc07f7e4f56bb73050504
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 10 02:45:01 2015 +0300

Revert "Fixed exception habdling on "return" statement."

This reverts commit 17c5315bdf8f8087979aeb55f6d3a512ba197cf5.

commit 6e90ad7331901711e89c2ceb2bcab5023e5cee60
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 10 02:44:58 2015 +0300

Revert "Fix too early terminated temporary range with break/cont/goto"

This reverts commit cc876c04b420589cb1f62b650d0c0e24975dd4af.

commit 7b766e44b1970e4031f75109c302c07ead2c05cb
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 10 02:44:55 2015 +0300

Revert "Fixed exception catching on break/continue"

This reverts commit 8c3f701eebfa92d761bb368cfa8c2d1ccf821b9d.


# a49ce7bb 09-Jul-2015 Nikita Popov <nikic@php.net>

Don't return T_ERROR from token_get_all()

This turned out to be rather inconvenient after all. Instead just
return the same output we did on PHP 5. If people want to have an
error, use TOKEN_PARSE.


# 8c3f701e 09-Jul-2015 Dmitry Stogov <dmitry@zend.com>

Fixed exception catching on break/continue
Fixed "finaly" handling on exception in "return" statement


# cc876c04 09-Jul-2015 Bob Weinand <bobwei9@hotmail.com>

Fix too early terminated temporary range with break/cont/goto
I have no crashing or leaking reproduce script, only valgrind invalid reads for that one; hence no phpt here


# 54f367ee 09-Jul-2015 Dmitry Stogov <dmitry@zend.com>

Fixed invalid live-range detection


# 301ee265 08-Jul-2015 Dmitry Stogov <dmitry@zend.com>

Fixed situation, when CHECH_EXCEPTION() might change value of "opline" variable and the following "opline" useages would access elements of different opcode. That might lead to unpredictable behavior. (Only PHP-7 with GCC global register variables was affected).
CHECK_EXCEPTION() macro is removed. ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTIO() should be used instead. It's equivalent to old CHECK_EXCEPTION() + ZEND_VM_NEXT_OPCODE().
As a side effect, this also slightly improved performnce of builds with GCC >= 4.8.


# b3a4c050 07-Jul-2015 Nikita Popov <nikic@php.net>

Remove loop_var_stack

Instead add a loop_var member to brk_cont_element. Now that
brk_cont is compile-time the distinction is no longer necessary.

Also drops brk_cont.start, check the loop_var op_type instead.


# c0142de4 07-Jul-2015 Anatol Belski <ab@php.net>

fix C89 compat


# fe842a85 07-Jul-2015 Kalle Sommer Nielsen <kalle@php.net>

fix C89 compat


# c22da81b 06-Jul-2015 Julien Pauli <jpauli@php.net>

Fixed double ZEND_TICKS opcode generation for declare()


# 5ee84132 07-Jul-2015 Dmitry Stogov <dmitry@zend.com>

Fixed bug #62210 (Exceptions can leak temporary variables. As a part of the fix serious refactoring was done. op_array->brk_cont_array was removed, and replaced with more general and speed efficient op_array->T_liveliness. ZEND_GOTO opcode is always replaced by ZEND_JMP at compile time). (Bob, Dmitry, Laruence)

Squashed commit of the following:

commit 38e22106d4bdcc829dd2b64be1d3c6cdc089f3ed
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 15:12:19 2015 +0300

Added NEWS entry

commit 0a355935bfb10b5a4c893f4db9496ea8abbcf71b
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 15:06:32 2015 +0300

Inline function, to eliminate repeatable checks

commit d937584f3aef0baae6001377b61fd700b6f36e14
Merge: 0341626 32677f5
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 14:35:49 2015 +0300

Merge branch 'master' into temporary_cleaning

* master:
Fixed bug #70006 (cli - function with default arg = STDOUT crash output).
Fix x86 build
Fixed use after free on closure_call_leak_with_exception.phpt
Fixed test

commit 0341626ea94a5e474c660732d33884460847d5e7
Merge: 74869fa dec35de
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 12:00:53 2015 +0300

Merge branch 'temporary_cleaning' of https://github.com/laruence/php-src into temporary_cleaning

* 'temporary_cleaning' of https://github.com/laruence/php-src:
Fixed checkpoint get
Fixed crash of invalid pointer derefer
cleanup

commit 74869fa67375b8daf772ac30b6b936fd2a2132c6
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 11:45:34 2015 +0300

Fixed wrong GOTO resolution

commit dec35ded3294e3022e88a623188c3d1d71381675
Author: Xinchen Hui <laruence@gmail.com>
Date: Tue Jul 7 15:58:49 2015 +0800

Fixed checkpoint get

commit b0f419540ad24c44810c9b05da046965618ffc65
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 10:47:11 2015 +0300

Fixed crash of invalid pointer derefer (laruence)

commit 7a428d98ca2899c5933914caa0cd17b4126e952c
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 10:35:47 2015 +0300

Fixed identation

commit 9c3a4dce9ce02034d19d28182aa9c1298d528daf
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 10:33:52 2015 +0300

Fixed invalid size

commit 653abc670b2a1f453b0fc3fc4a9eca919ee870cc
Author: Xinchen Hui <laruence@gmail.com>
Date: Tue Jul 7 11:29:14 2015 +0800

Fixed crash of invalid pointer derefer

commit e04500ceda606ac4f364d03bcd562327bdc74eee
Author: Xinchen Hui <laruence@gmail.com>
Date: Tue Jul 7 11:28:26 2015 +0800

cleanup

commit 34183e1687681038e77b650078927b35ee84e933
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 04:49:46 2015 +0300

op_array->T_liveliness compression

commit 2f6ad845795a08c3d7ac219e9c42950565b20394
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 04:44:44 2015 +0300

White spaces

commit be83f115a3f82a548c8d377c66574de5e5187410
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 04:42:26 2015 +0300

Identation

commit 1f5084b99038c374ac012b017c4d1652bb5d4222
Merge: 91b620d 1adf3df
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 04:41:54 2015 +0300

Merge branch 'master' into temporary_cleaning

* master:
Throw TypeError for invalid callback
Fix crash when exception occurs during nested rope
Fix crash when exception is thrown during ROPE_END
Small cleanup in ternary compilation
move the define to the right place
fix ext/ldap build
Rectify information about invalid shift warning being now ArithmeticError

commit 91b620d684c5a2296774432d5d0ff8f5d14397d6
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 04:32:04 2015 +0300

Replace GOTO by FREE/FE_FREE and JMP at compile time

commit 7052e5697918fab83d2975977c3392f7188fbc87
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 02:25:08 2015 +0300

Use zend_regenerate_var_liveliness_info() to regenerate information after pass two.

commit ae72b0dc6797815a846b8f95abccb36367422d27
Merge: a81c4bb a919fe8
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon Jul 6 21:02:34 2015 +0300

Merge branch 'master' into temporary_cleaning

* master:
Do not display EXT_TYPE_UNUSED in phpdbg opcodes
Run debug build with opcache on travis

commit a81c4bb8c6f1ba8124a5a7636694480ff0f1328c
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon Jul 6 20:59:34 2015 +0300

Improved algorithm. It's actually the same algorithm with second loop removed and simpler temporary data structures. The only difference may be in "re-defined" vatriable handling. Now live-range in that case started from the seconnd definition (this must be more safe).

commit 9a16810f7a7c10373603c5250d985616acf45e97
Merge: bbfbe47 001ecd3
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon Jul 6 17:57:45 2015 +0300

Merge branch 'master' into temporary_cleaning

* master:
Simplify TMP var number decoding (without HashTable)

commit bbfbe470c865cb8b3cae8bf6518e6d06af525522
Merge: 0bda4ab 436b01e
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon Jul 6 17:02:01 2015 +0300

Merge branch 'master' into temporary_cleaning

* master:
Avoid dangerous optimization
Fixed JMPZNZ instruction printing
Attempt at falling back on ldap_find_control for Mac OS

commit 0bda4abea7ba0a51c2ec125edb547645d0329792
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon Jul 6 16:05:33 2015 +0300

Fixed live-range construction for OP_DATA opcode
Added comments about algorithm assumtions

commit 521ad9df98fdf1dd8b7c212799ddeb1a84483e6f
Merge: 4398dab a09dcb0
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Mon Jul 6 14:54:15 2015 +0200

Merge branch 'master' of https://github.com/php/php-src into temporary_cleaning

commit 4398dab82f9a5ce64df55b24988ce7d31e24074f
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Mon Jul 6 13:51:27 2015 +0200

Add a few phpt tests related to temporary cleaning

commit 739656f83ff5b570bb311d2c7cb2d72380a3c759
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon Jul 6 14:28:49 2015 +0300

Fixed Zend/tests/foreach_004.phpt failure (FE_FETCH shouldn't be included into TMP vatriablr live range)

commit 3df462a2bcf5fa8f9244ea299178152a5d436277
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon Jul 6 13:41:02 2015 +0300

Improve data layout (reduce the op_array structure size on 64-bit systems)

commit 883b73c56e6dab6489ae4cda2c1331b53a995586
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon Jul 6 13:28:45 2015 +0300

Removed op_array->brk_cont_array

commit ae5e58b59843513505e84e396c1446ac35cb1b94
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Mon Jul 6 04:22:58 2015 +0200

Fix bug with brk_cont variable free / free loop vars via temporary liveliness info

commit b4223ca62771e1003c9ab778a09a177ad71e6d57
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Mon Jul 6 04:07:07 2015 +0200

Fix bugs / cleanup fixes

commit ea33189d220c7fc0884848571635abe3cddd2f4d
Author: Xinchen Hui <laruence@gmail.com>
Date: Sun Jul 5 20:58:38 2015 +0800

Removed useless TsTop

commit 1dbb007e4addba9ac3bfc227db27a651cbcf5ede
Merge: 550bbf8 3a8af24
Author: Xinchen Hui <laruence@gmail.com>
Date: Sat Jul 4 15:06:44 2015 +0800

Merge branch 'temporary_cleaning' of https://github.com/dstogov/php-src into temporary_cleaning

commit 3a8af245290ceb507108340831254672f24022fa
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 3 16:15:36 2015 +0300

More exceptions from regular liveliness analyses (with explanation in comments).
Mark old "unexplained" exceptions with ???.

commit ba721efa2cbd2136668fec956ef3b034ac1a29d6
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 3 14:16:09 2015 +0300

Print list of live temp variables (at least for internal debugging)

commit 8d1f88fe91e62b4333703c58b871d85b66fb7b70
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 3 13:31:56 2015 +0300

Use op_array->T_liveliness to free incomplete ropes and restore error_reporting level on exception

commit 80c1d0d779e6e9609a211907838f3727aa7b301a
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 3 11:05:39 2015 +0300

Don't keep empty T_liveliness

commit 501ae8aaac0a92368b50e9f342b04d7334d263f6
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Jul 2 22:31:48 2015 +0300

Reverted changes to Zend/zend_arena.h.
Reuse CG(arena) instead of creating a new one.

commit a4fce36907147df5ac1af78b44135e3f07c1844c
Merge: 6ff7246 fd0fcce
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Jul 2 22:01:42 2015 +0300

Merge branch 'temporary_cleaning' of github.com:bwoebi/php-src into temporary_cleaning

* 'temporary_cleaning' of github.com:bwoebi/php-src:
Fix remaining issues with compacted temporaries
Fix regression from last commit (+1 ?!)
Fix off-by-one (opcache may remove last ZEND_RETURN)
Speed algorithm up, more fail safety when reusing temporaries
Dumb bug in opcode.c (forgot to update Ts[i])
Fix opcache support
Exempt ROPE temporaries from freeing
Hmm, we need temporary info for all the opcodes
Add opcache support for cleaning in optimization step (Opcache seems to have a few unrelated issues which blow up together with that patch)
Add proper temporary cleaning upon frame abortion
Fix arena on small sizes (size < sizeof(zend_arena))

commit fd0fcce81177717f3a05ac87192b5ed05eead0a1
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Thu Jul 2 20:00:33 2015 +0200

Fix remaining issues with compacted temporaries

commit 427dc58bbb93022d1c2077f874afcdb9dd82d5c5
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Wed Jul 1 22:49:12 2015 +0200

Fix regression from last commit (+1 ?!)

commit 1adcf56a6e9f09e7ad06331d4d6280035b17a7d1
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Wed Jul 1 22:17:07 2015 +0200

Fix off-by-one (opcache may remove last ZEND_RETURN)

commit 25b231b7841fa4078c65976cabdd843845a6cbe6
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Wed Jul 1 20:59:24 2015 +0200

Speed algorithm up, more fail safety when reusing temporaries

commit 22d9d05350e35d180018d0bccbad6f173cb4797d
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Wed Jul 1 16:48:46 2015 +0200

Dumb bug in opcode.c (forgot to update Ts[i])

commit 6538269bfa5bcbad34fc2f051b0fd5e4ebf2ff00
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Wed Jul 1 13:05:52 2015 +0200

Fix opcache support

commit 333a7c4a8813a45dc79ce55b8e9c0a0b98671e13
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Sat Jun 27 22:40:21 2015 +0200

Exempt ROPE temporaries from freeing

commit 02585f77085427baea48448c134a96c542af3337
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Fri Jun 26 16:20:55 2015 +0200

Hmm, we need temporary info for all the opcodes

commit cbcaedbd78199897e5cacffd700b706f21590abf
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Fri Jun 26 01:04:09 2015 +0200

Add opcache support for cleaning in optimization step
(Opcache seems to have a few unrelated issues which blow up together with that patch)

commit fef649f4067823a1f96f85340cf715e5877310bc
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Fri Jun 26 01:02:27 2015 +0200

Add proper temporary cleaning upon frame abortion

commit 1cec2e7271b789b84601f8acf385950af1bb0c7c
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Thu Jun 25 23:33:21 2015 +0200

Fix arena on small sizes (size < sizeof(zend_arena))


# f3498783 06-Jul-2015 Nikita Popov <nikic@php.net>

Small cleanup in ternary compilation


# a97f7644 05-Jul-2015 Anatol Belski <ab@php.net>

bring back the division by zero warning


# 56b6e0dd 05-Jul-2015 Bob Weinand <bobwei9@hotmail.com>

Fix use after free with opcache (interned strings)


# ce2cd892 04-Jul-2015 Kalle Sommer Nielsen <kalle@php.net>

Replace references to PHP_WIN32 and TSRM_WIN32 with ZEND_WIN32 in Zend/, this also fixes 1 instance of where fflush(stderr) was misplaced (zend_extensions.c)


# 68baa539 02-Jul-2015 Aaron Piotrowski <aaron@trowski.com>

Allow integer default for float type


# 06fcf94c 02-Jul-2015 Bob Weinand <bobwei9@hotmail.com>

CT eval ZEND_DIV in all cases (warning was removed)


# 7aa76271 30-Jun-2015 Dmitry Stogov <dmitry@zend.com>

Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes).


# 4bd22cf1 29-Jun-2015 Dmitry Stogov <dmitry@zend.com>

Improved zend_string API (Francois Laupretre)

Squashed commit of the following:

commit d96eab8d79b75ac83d49d49ae4665f948d15a804
Author: Francois Laupretre <francois@tekwire.net>
Date: Fri Jun 26 01:23:31 2015 +0200

Use the new 'ZSTR' macros in the rest of the code.

Does not change anything to the generated code (thanks to compat macros) but cleaner.

commit b3526439104ac7a89a8e0c79dbebf33b22bd01b8
Author: Francois Laupretre <francois@tekwire.net>
Date: Thu Jun 25 13:45:06 2015 +0200

Improve zend_string API

Add missing methods


# 642c3790 28-Jun-2015 Dmitry Stogov <dmitry@zend.com>

Prevent attempts of compile-time evaluation of invalid operators (e.g. division/modulo by zero and shift by negative number)


# 1bba4452 28-Jun-2015 Dmitry Stogov <dmitry@zend.com>

Reverted wrong fb08798c9f0ea820d567668d0cea4833dc61dd8e


# 5ba28d76 29-Jun-2015 Xinchen Hui <laruence@php.net>

Fixed segfault in wordpress (introduced in rev 4a4529adb03a5e0d8c46809074a9bae37686e201)


# fb08798c 28-Jun-2015 Bob Weinand <bobwei9@hotmail.com>

Fix bug #69957 (Different ways of handling div/mod by zero)


# 4a4529ad 28-Jun-2015 Bob Weinand <bobwei9@hotmail.com>

Fix rope memory leaks upon exception


# 2894bc5b 26-Jun-2015 Bob Weinand <bobwei9@hotmail.com>

Use ZEND_INIT_STATIC_METHOD_CALL for literals of form "classname::method"


# 307c734b 19-Jun-2015 Xinchen Hui <laruence@php.net>

Better way to fix (Fix bug #69871 (short-circuiting failure with smart_branch))


# 509d7552 18-Jun-2015 Xinchen Hui <laruence@php.net>

Fixed Conditional jump or move depends on uninitialised value(s)

reproduced by Bug #69868's test script


# c58c5e77 18-Jun-2015 Xinchen Hui <laruence@php.net>

Fixed bug #69868 (Invalid read of size 1 in zend_compile_short_circuiting)


# a524a375 16-Jun-2015 Dmitry Stogov <dmitry@zend.com>

Improved class type hints checks, by caching resolved class entries in run-time cache.


# 4448843b 16-Jun-2015 Nikita Popov <nikic@php.net>

Move check for CT div by zero into common function


# 52e9a772 16-Jun-2015 Bob Weinand <bobwei9@hotmail.com>

Fully fixing all the affected const expr cases (see bug #69832)


# 9db81340 15-Jun-2015 Bob Weinand <bobwei9@hotmail.com>

Fix bug #69832 (Assertion failure)


# 37c91b8d 14-Jun-2015 Bob Weinand <bobwei9@hotmail.com>

Fix off by one in short_circuiting optimization


# f1ae57f1 14-Jun-2015 Xinchen Hui <laruence@php.net>

Simplify the condition


# 7221bd68 14-Jun-2015 Bob Weinand <bobwei9@hotmail.com>

Revert "Revert "Expand optimizations regarding short-circuting a bit""

This reverts commit 3770a5ac666cdd4ff4803743232125948140450b.
Fixes the bug which probably made make install fail on travis
(It never happened to me that all tests passed, but make install failed...)


# 3770a5ac 14-Jun-2015 Xinchen Hui <laruence@php.net>

Revert "Expand optimizations regarding short-circuting a bit"

This break the CI (build error)

This reverts commit 3cfa58367b1b85d346d9be6cf9ae116c63571247.


# 3cfa5836 14-Jun-2015 Bob Weinand <bobwei9@hotmail.com>

Expand optimizations regarding short-circuting a bit


# f263932f 14-Jun-2015 Bob Weinand <bobwei9@hotmail.com>

Fix short-circuting (bug #69825)


# 20d85e4f 13-Jun-2015 Xinchen Hui <laruence@php.net>

typo


# d96dda8d 13-Jun-2015 Xinchen Hui <laruence@php.net>

Fixed Bug #69761 (Serialization of anonymous classes should be prevented)

And also cleanup anonymous class compiling, it make no sense prefix a
namespace to anonymous class name. and it is always lowcased and
interned string.


# 7c2a0157 12-Jun-2015 Bob Weinand <bobwei9@hotmail.com>

Cache the class_name typehint key in arg_info
This leads to up to 2% improvement on one tested real world application by not having to always recalculate the lowercased string and its hash


# 49a8f801 12-Jun-2015 Xinchen Hui <laruence@php.net>

Fixed bug #69805 (null ptr deref and seg fault in zend_resolve_class_name)


# be988aba 10-Jun-2015 Dmitry Stogov <dmitry@zend.com>

Compile-time constant folding


# cea801cc 08-Jun-2015 Xinchen Hui <laruence@php.net>

Fixed bug #69767 (Default parameter value with wrong type segfaults)


# adb5f93f 04-Jun-2015 Dmitry Stogov <dmitry@zend.com>

Fixed bug #69755 (segfault in ZEND_CONCAT_SPEC_TMPVAR_CONST_HANDLER)


# 1d3f77d1 03-Jun-2015 Bob Weinand <bobwei9@hotmail.com>

Fix Bug #69754 (Compile failure with ::class in array)


# 402f6970 24-May-2015 Nikita Popov <nikic@php.net>

Remove zend_init_list

No longer used - zend_add_to_list already covers this.

Also marked zend_add_to_list as static and dropped it from the header.


# 21a29b4b 24-May-2015 Nikita Popov <nikic@php.net>

Drop unnecessary checks for op_array->filename

We always require a filename.


# 770a4629 26-May-2015 Xinchen Hui <laruence@php.net>

implicit declaration of function ‘zend_multibyte_yyinput_again’


# 69b54ba9 25-May-2015 Bob Weinand <bobwei9@hotmail.com>

Also unreserve T_CLASS


# 03f41f9b 25-May-2015 Dmitry Stogov <dmitry@zend.com>

Prevent op_array->this_var setting when method uses auto globals


# e13803d1 21-May-2015 Levi Morrison <levim@php.net>

Inline zend_find_builtin_type

This function was used only inside of zend_find_builtin_type_by_name,
which is also used only one time.


# e22ceb6e 21-May-2015 Levi Morrison <levim@php.net>

Remove duplication


# 339283c5 21-May-2015 Levi Morrison <levim@php.net>

Rename some variables and functions

The way these are used have little to do with them being scalars;
they are just tuples with names, lengths and IS_* constants. We
will probably reuse these in the future with other types.


# 7a88d16c 22-May-2015 Nikita Popov <nikic@php.net>

Use ZEND_JMP instead of ZEND_BRK/ZEND_CONT

Emit necessary FREEs during compilation, convert to JMP during
pass_two (we may not know target opline beforehand).


# 9325ada7 22-May-2015 Nikita Popov <nikic@php.net>

Embed break/continue depth into opline

Previously a separate lval literal was used - this is probably a
leftover from the time where the break level could still be
specified dynamically.


# 3cbe3903 22-May-2015 Nikita Popov <nikic@php.net>

Move loop var stack management into begin/end loop

Also set start to -1 in begin_loop already, so the info that a
loop variable is not used is already available at compile-time.


# d0e26539 22-May-2015 Nikita Popov <nikic@php.net>

Drop FREE_ON_RETURN flag, check brk_cont->start instead

Start >= 0 already tells us whether or not the loop has a loop
variable, no need to add extra flags to opcodes.

Also added a test for a case where FREE_ON_RETURN is relevant,
we didn't seem to have any coverage for this.


# 3dba00bc 21-May-2015 Nikita Popov <nikic@php.net>

Fix scope_is_known() for class constants

Here the active_op_array is still the surrounding file, but we
do know the scope.


# d72a9446 12-May-2015 Dmitry Stogov <dmitry@zend.com>

Merged FE_FETCH_R[W] with the following ASSIGN[_REF] when assigne to CV.


# 6ef8ae65 07-May-2015 Nikita Popov <nikic@php.net>

Allow self etc in eval / file scope

This fixes a regression from 16a9bc1ec20533c76ba992bfc64dd69e7b7d9001.
Together with the recent closure related changes this should allow
all usages of self etc, while previously (in PHP 5) some things like
self::class did not work.


# ab97606b 05-May-2015 Nikita Popov <nikic@php.net>

Fix compiler assumptions about self/etc wrt closures

* Don't throw an error if self/parent/static are used in a closure
(outside a class).
* Don't propagate self:: constants into closures
* Use runtime fetch for self::class in closures

Fixes bug #66811.


# dd1fdfb1 05-May-2015 Nikita Popov <nikic@php.net>

Use ZEND_FETCH_CLASS_NAME for dynamic self::class etc

Extend the opcode to support getting the parent and static name and
then use it for dynamic ::class resolution.


# 9708378d 03-May-2015 John Boehr <jbboehr@gmail.com>

Fix uninitialized value with extension traits


# 56fdae90 03-May-2015 John Boehr <jbboehr@gmail.com>

Fix uninitialized value with extension traits


# 11075938 05-Apr-2015 Márcio Almada <marcio3w@gmail.com>

ext tokenizer port + cleanup unused lexer states

we basically added a mechanism to store the token stream during parsing
and exposed the entire parser stack on the tokenizer extension through
an opt in flag: token_get_all($src, TOKEN_PARSE).

this change allows easy future language enhancements regarding context
aware parsing & scanning without further maintance on the tokenizer
extension while solves known inconsistencies "parseless" tokenizer
extension has when it handles `__halt_compiler()` presence.


# 16a9bc1e 27-Apr-2015 Nikita Popov <nikic@php.net>

Disallow self etc outside classes at compile-time

Also fix a bug with return types where "self" was rejected inside
a class, but not on a method.

Fallout: A couple of tests changed to more generic error messages.


# 33e32cbe 28-Apr-2015 Xinchen Hui <laruence@php.net>

Make it inline


# 422de8a7 27-Apr-2015 Nikita Popov <nikic@php.net>

Drop compile_class_decl return value

Was introduced for anon classes, but no longer needed.


# 8acd7f49 27-Apr-2015 Dmitry Stogov <dmitry@zend.com>

Pass class_entry through IS_VAR to avoid hash lookup in ZEND_NEW.


# 2a1b0b11 27-Apr-2015 Dmitry Stogov <dmitry@zend.com>

Use "safe" anonymous class names. Don't show the mangled names through var_dump().


# 94245bc1 26-Apr-2015 Dmitry Stogov <dmitry@zend.com>

Refactored using specialized opcodes


# 83618934 26-Apr-2015 Nikita Popov <nikic@php.net>

Fix implementing_class handling


# f2f890a2 26-Apr-2015 Nikita Popov <nikic@php.net>

More cleanup (mainly retab)


# 03d7042d 26-Apr-2015 Nikita Popov <nikic@php.net>

Don't issue FETCH_CLASS for anon classes


# 929fdc1c 26-Apr-2015 Nikita Popov <nikic@php.net>

More retab


# 4a7061b0 26-Apr-2015 Nikita Popov <nikic@php.net>

Simply anon class name generation

Drop dead "parent" code


# f16eca58 26-Apr-2015 Nikita Popov <nikic@php.net>

Retab


# 9a1797d4 26-Apr-2015 Nikita Popov <nikic@php.net>

Revert unrelated changes / rebase fixup


# 49608e06 26-Apr-2015 krakjoe <joe.watkins@live.co.uk>

Rebase Joe's anon classes implementation


# 75b4fa07 25-Apr-2015 Nikita Popov <nikic@php.net>

Fix bug #69532

Partial revert of ea2fc7f935d2767c127756647f47be8d420346ce.


# 000d5d7e 23-Apr-2015 Dmitry Stogov <dmitry@zend.com>

Dont't use DO_ICALL for internal functions returned by reference


# ea2fc7f9 23-Apr-2015 Xinchen Hui <laruence@php.net>

Slight improvement


# f2435bd2 22-Apr-2015 Kalle Sommer Nielsen <kalle@php.net>

Fixed compiler warning


# 15a5f61c 22-Apr-2015 Dmitry Stogov <dmitry@zend.com>

Use fast method to check if first arguments should be passed by reference (not tested onbig endian).


# d2607a01 20-Apr-2015 Nikita Popov <nikic@php.net>

Move more stuff to file_context

Introduce helper macro FC(x) for CG(file_context).x.

end_compilation() now handled by file_context_end().

While at it, dropped zval wrapper for ticcks.


# a5086938 21-Apr-2015 Xinchen Hui <laruence@php.net>

Remove tail blank which is committed by accident


# c667c26f 21-Apr-2015 Xinchen Hui <laruence@php.net>

Fixed Bug #69467 (Wrong checked for the interface by using Trait)


# 0381c1b7 20-Apr-2015 Nikita Popov <nikic@php.net>

Fixed bug #69388

Renamed compiler_context to oparray_context. Introduced per-file
file_context. Moved import tables into the file_context.

context_stack no longer exists, instead keeping backups of contexts
on C stack. Same for file contexts.

TODO: Move more things out of CG into file_context. There should be
a number of other things that we should not try to reuse in nested
compilations.


# 429f411e 10-Apr-2015 Xinchen Hui <laruence@php.net>

Fixed bug #69420 (Invalid read in zend_std_get_method)


# cc70a465 06-Apr-2015 Nikita Popov <nikic@php.net>

Fix bug #60022


# cae0147e 06-Apr-2015 Dmitry Stogov <dmitry@zend.com>

Fixed weird operators behavior. Division by zero now emits warning and returns +/-INF, modulo by zero and intdid() throws an exception, shifts by negative offset throw exceptions. Compile-time evaluation of division by zero is disabled.


# ec760d8f 01-Apr-2015 Dmitry Stogov <dmitry@zend.com>

Convert fatal errors into EngineExceptions


# 8c031a3f 01-Apr-2015 Dmitry Stogov <dmitry@zend.com>

Handle incorrect break/continue statements at compile-time


# acfc31c0 01-Apr-2015 Dmitry Stogov <dmitry@zend.com>

Use zend_error_noreturn() for fatal errors


# 8d003858 15-Mar-2015 Nikita Popov <nikic@php.net>

Reclassify E_STRICT notices

Per RFC https://wiki.php.net/rfc/reclassify_e_strict

While reviewing this, found that there are still three E_STRICTs
left in libraries - need to discuss those.


# 6ef92162 31-Mar-2015 Nikita Popov <nikic@php.net>

Finish PHP 4 constructor deprecation


# db76b708 31-Mar-2015 Andrea Faulds <ajf@ajf.me>

Deprecate PHP 4 constructors


# 53a40386 30-Mar-2015 Nikita Popov <nikic@php.net>

Implement additional type reservations

* The class names false, true and null are now reserved.
* The code dealing with reserved class names is now decoupled
from scalar type hint handling. It also includes self, parent,
and static, which are class names which were already reserved
previously.
* Reuse existing messages for reserved class names.

Fallout: class_alias() can no longer alias self, parent and static.
However this never really worked in the first place, as the test
which was testing this shows.


# c64f5e33 27-Mar-2015 Nikita Popov <nikic@php.net>

Disallow direct incdec of function return value

Matching PHP 5 behavior.

We may want to support this for by-reference returns, but that
requires implementing further checks.


# 84d94267 27-Mar-2015 Xinchen Hui <laruence@gmail.com>

Fixed bug #69315


# 67b907f0 26-Mar-2015 Kalle Sommer Nielsen <kalle@php.net>

Change the error message for colliding class/interface/trait names to be a little more clearer.

C:\> php -r "interface stdClass { }"
Error: Cannot declare interface stdClass, because the name is already in use in Command Line Code on line 1


# 927d53fd 25-Mar-2015 Kalle Sommer Nielsen <kalle@php.net>

Change "Cannot redeclare class X" into "Cannot redeclare class/interface/trait X", meaning that the following:

C:\> php -r "trait A { } trait A { }"

Will now properly print "Cannot redeclare trait A" instead of "Cannot redeclare class A" to make error messages a tiny bit clearer. Admittedly, a better solution can most likely be made by actually telling what the colliding object is a type of.

Internally this adds a new function:
zend_get_object_type()


# 23c33b14 24-Mar-2015 Dmitry Stogov <dmitry@zend.com>

Optimized strings concatenation.
ZEND_ADD_STRING/VAR/CHAR are replaced with ZEND_ROPE_INTI, ZEND_ROPE_ADD, ZEND_ROPE_END.
Instead of reallocation and copying string on each ZEND_ADD_STRING/VAR/CAHR, collect all the strings and then allocate and construct the resulting string once.


# 1cfa4db3 20-Mar-2015 Dmitry Stogov <dmitry@zend.com>

Fixed return type hint handling for constants


# 44669e8f 20-Mar-2015 Dmitry Stogov <dmitry@zend.com>

Fixed white spaces


# d146d150 19-Mar-2015 Dmitry Stogov <dmitry@zend.com>

Optimize zend_string_realloc() add more specialized versions zend_string_extend() and zend_string_truncate()


# aaf0c8b5 19-Mar-2015 Anthony Ferrara <ircmaxell@gmail.com>

Disallow relative namespace type declarations


# 7044f9c6 19-Mar-2015 Anthony Ferrara <ircmaxell@gmail.com>

Refactor as to not use call info, but add the flag to the op_array.


# 427ecdc5 18-Mar-2015 Anthony Ferrara <ircmaxell@gmail.com>

Fix return type separation with references. It now includes a check in the opcode handler and properly separates the value in both cases


# 724f7118 18-Mar-2015 Anthony Ferrara <ircmaxell@gmail.com>

Refactor error messages to only append defined in the event of rendering as a fatal error. Fix relative typehints to not work


# 1df033c5 18-Mar-2015 Anthony Ferrara <ircmaxell@gmail.com>

Revert gd and mysqli to former calls for arg count errors. Fix first identified issues with zend_compile.c from nikic. Add tests for generator returns prior to first yield


# 4e110954 18-Mar-2015 Dmitry Stogov <dmitry@zend.com>

Reimplemented special constant handling. Now __HALT_COMPILER_OFFSET__ is resolved at compile-time. __CLASS__ retrived using separate ZEND_FETCH_CLASS_NAME opcode.


# a53d82da 10-Mar-2015 Dmitry Stogov <dmitry@zend.com>

Prevent possible double inheritance (ext/opcache/tests/bug67215.phpt)


# 1638db71 08-Mar-2015 Xinchen Hui <laruence@php.net>

Declares in top


# 22d6cc7c 07-Mar-2015 Márcio Almada <marcio3w@gmail.com>

fix compilation warnings, rename batch_use to group_use


# fbde890e 29-Jan-2015 Márcio Almada <marcio3w@gmail.com>

allow non mixed use declarations, CC @nikic #1005

```
use function N\S { foo, bar, etc };
use const N\S { FOO, BAR, ETC };
```

Related tests:

```
make test -j4 TESTS="-m Zend/tests/ns_0{88..92}*.phpt"
```

All namespace tests:

```
make test -j4 TESTS="Zend/tests/ns_*.phpt"
```


# 275e7276 19-Jan-2015 Márcio Almada <marcio3w@gmail.com>

first implementation of batch use compilation


# 39b0e2c9 18-Jan-2015 Márcio Almada <marcio3w@gmail.com>

fix typo


# 869f8bd2 05-Mar-2015 Xinchen Hui <laruence@php.net>

Error also maybe happened here


# f0392255 05-Mar-2015 Xinchen Hui <laruence@php.net>

Fixed bug #69174 (leaks when unused inner class use traits precedence)


# 8ec8648c 04-Mar-2015 Dmitry Stogov <dmitry@zend.com>

Improved code for class property inheritance


# 2fa4d1d8 04-Mar-2015 Xinchen Hui <laruence@php.net>

Fixed wrong type used


# badc19d8 03-Mar-2015 Reeze Xia <reeze@php.net>

Optimize class constant declare compilation


# 9a20323e 01-Mar-2015 Dmitry Stogov <dmitry@zend.com>

Improved assert() according to expectations RFC.

See https://wiki.php.net/rfc/expectations

Squashed commit of the following:

commit 3f3651a7870738e35ec541e53b53069152135b24
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon Mar 2 11:56:33 2015 +0300

opcode 137 is used for ZEND_OP_DATA and con't be reused for ZEND_ASSERT_CHECK

commit ca8ecabf2a5f97f9116839c33396c9a7037e4368
Merge: 24328ac 9dac923
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon Mar 2 10:49:23 2015 +0300

Merge branch 'master' into assert

* master:
Update NEWS
Fixed bug #69139 (Crash in gc_zval_possible_root on unserialize)
windows only test
Align entries format
Align entries format for 5.6.7
Align entries format for 5.5.23
Bump header year
Fixed bug #69144 (strtr not replacing with partly matching replace pairs)
Fixed test?
Revert mktime()/gmmktime()'s arginfo
Update NEWS
Fixed bug #69141 Missing arguments in reflection info for some builtin functions
Add NEWS entry
Remove useless date warning
Fix ARG_INFO for levenshtein
Fix ARG_INFO for levenshtein
fix dir separator in tests
Update NEWS
Fixed bug #69085 (SoapClient's __call() type confusion through unserialize()).

commit 24328ac03f79a0f3b19be7411bf9e173f392abda
Merge: 021fd94 1cdee9a
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Feb 27 15:57:13 2015 +0300

Merge branch 'master' into assert

* master:
Fixed C++ support
Fixed bug #69115 crash in mail
Reorder
Update NEWs
Fixed bug #69121 (Segfault in get_current_user when script owner is not in passwd with ZTS build)
Update News
Fixed bug #69125 (Array numeric string as key)
fix bug#68942's patch
Fixed ability to build unspecialized executor
Fixed bug #69124 (method name could not be used when by ref)
Fixed a bug that header value is not terminated by '\0' when accessed through getenv().
Fixed a bug that header value is not terminated by '\0' when accessed through getenv().

commit 021fd94ed1d692d212e6e30c6c1a9767c3f16f7f
Merge: 49963eb ace1f82
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Feb 26 11:26:03 2015 +0300

Merge branch 'master' into assert

* master: (59 commits)
Improved ASSIGN_DIM handler
Don't inline slow path
Revert a part committted by mistake
Fixed compilation warnings
Fixed a bug that header value is not terminated by '\0' when accessed through getenv().
better name
Improve fix for #69038
Update NEWs
Fixed bug #69108 ("Segmentation fault" when (de)serializing SplObjectStorage)
Added specialized versions of DO_FCALL handler: DO_ICALL - for internal functions DO_UCALL - for user functions DO_FCALL_BY_NAME - plain, most probably user, funcstions (not methods)
Use cache_slot offsets instead of indexes (simplify run-time instructions)
Split INIT_FCALL_BY_NAME inti INIT_FCALL_BY_NAME(CONST+STRING) and INIT_DYNAMIC_CALL(CONST-STRING|TMPVAR|CV)
Support list($a, $b) = $a
Avoid unnecassary check
Make zend_array_destroy() to free the corresponding zend_array
Eliminate check on the fast path
Make current() and key() receive argument by value.
Use Firebird default home folder, replace Interbase with Firebird
Updated NEWS
updated NEWS
...

Conflicts:
Zend/zend_vm_execute.h
Zend/zend_vm_opcodes.c
Zend/zend_vm_opcodes.h

commit 49963ebf9d2bcd6d2670203dd72884f6ba6c8a4b
Merge: 07b1f92 6b77959
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Feb 19 11:13:08 2015 +0300

Merge branch 'master' into assert

* master:
Implemented AST pretty-printer
update NEWS to match the actual stuff in 5.6.6
update NEWS to match the actual stuff in 5.5.22
update NEWS(add missing entry for the enchant fix, and reorder the entries a bit)
fix typo in bug#
update NEWS
fix email format
update NEWS
update 5.6.6 release date in NEWS
Fix bug #69033 (Request may get env. variables from previous requests if PHP works as FastCGI)
BFN
fix test
fix test
fix test
Fixed bug #65593 (Segfault when calling ob_start from output buffering callback)
Updated NEWS
add CVE
5.4.39 next
Fix associativity to match Perl
Blast off to space.

Conflicts:
Zend/zend_ast.c

commit 07b1f92ed662f6fa9309e679b83aff328362c98b
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Feb 18 23:06:32 2015 +0300

fixed pretty-printer (support for "elseif")

commit 5a976c8d85078502b48379996ab066e57533a0c3
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Feb 18 19:50:08 2015 +0300

Fixed vaeious ptetty-printer issues

commit 69491e8e8e692030b0585aab485146906c0fedaf
Merge: 8473157 3ddc246
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Feb 18 10:18:32 2015 +0300

Merge branch 'master' into assert

* master:
Set PHP_JSON_VERSION to 1.4.0
Remove unnecessary resource checks in openssl ext
JSON is now maintained

commit 8473157fbb12d03fff8d5b602865a4b667522a4d
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Feb 18 10:17:26 2015 +0300

Fixed typo and white spaces

commit 96de5ffc8d604df9797d0141ae5ad9c15e1d6c32
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Feb 18 00:28:39 2015 +0300

Fixed assert() in namesapaces

commit 5eba069c28e7b6590618707e0b21cdb2dd62a192
Merge: 4a2d9c0 d428bf2
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Feb 17 22:45:55 2015 +0300

Merge branch 'master' into assert

* master: (25 commits)
improve debugability in TS debug builds
More UPGRADING, in particular on foreach
Fixed bug #69038 (switch(SOMECONSTANT) misbehaves) for master
Replace var is introduced
abstain from using xmlCleanupParser
fix TS build
Fix bug #68942 (Use after free vulnerability in unserialize() with DateTimeZone)
update news
Fix bug #68942 (Use after free vulnerability in unserialize() with DateTimeZone)
Port for for bug #68552
Fix bug #68942 (Use after free vulnerability in unserialize() with DateTimeZone)
Update NEWS
Fixed bug #69038 (switch(SOMECONSTANT) misbehaves)
- BFN
Don't read the local php.ini when Generating Phar When building phar shared, you can end up loading a previous phar.so that isn't compatible with the php cli being used to generate Phar here.
- Fixed bug #67827 (broken detection of system crypt sha256/sha512 support)
Delete json outdated package.xml
made ZEND_TSRMLS_CACHE_* macros look like function calls
- Fix merge
- Fixed bug #67427 (SoapServer cannot handle large messages) patch by: brandt at docoloc dot de
...

commit 4a2d9c0953dccd9e78ebee9291e1213419eb9136
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Feb 17 22:45:10 2015 +0300

Implemented AST pretty-printer to capture expression passed to assert()

commit 7a059b66d51a65159801bd826346721325b89fec
Merge: 9973df7 3892eba
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon Feb 16 18:42:28 2015 +0300

Merge branch 'expect' of github.com:krakjoe/php-src into assert

* 'expect' of github.com:krakjoe/php-src:
import expect

Conflicts:
Zend/zend_compile.c
Zend/zend_execute_API.c
Zend/zend_globals.h
Zend/zend_vm_def.h
Zend/zend_vm_execute.h
Zend/zend_vm_opcodes.c
Zend/zend_vm_opcodes.h
ext/opcache/Optimizer/block_pass.c
ext/opcache/Optimizer/pass1_5.c
ext/standard/assert.c
ext/standard/tests/assert/assert_error3.phpt

commit 3892eba2bf56a7699453855c995404106322718d
Author: krakjoe <joe.watkins@live.co.uk>
Date: Sun Feb 2 12:49:35 2014 +0000

import expect


# fcdb6e08 19-Feb-2015 Nikita Popov <nikic@php.net>

WIP


# c2c78dc9 25-Feb-2015 Dmitry Stogov <dmitry@zend.com>

Added specialized versions of DO_FCALL handler:
DO_ICALL - for internal functions
DO_UCALL - for user functions
DO_FCALL_BY_NAME - plain, most probably user, funcstions (not methods)


# 5f278e4d 24-Feb-2015 Dmitry Stogov <dmitry@zend.com>

Use cache_slot offsets instead of indexes (simplify run-time instructions)


# dcb96c2e 24-Feb-2015 Dmitry Stogov <dmitry@zend.com>

Split INIT_FCALL_BY_NAME inti INIT_FCALL_BY_NAME(CONST+STRING) and INIT_DYNAMIC_CALL(CONST-STRING|TMPVAR|CV)


# bdf1430e 24-Feb-2015 Nikita Popov <nikic@php.net>

Support list($a, $b) = $a

By compiling the RHS $a as a non-CV fetch.

This worked as expected in PHP 5, but broke in PHP 7 due to the
different assign order. However the new implementation is more
general, in that it allows $a on the LHS in any place, not just
the first element.


# 7c8d1e0b 20-Feb-2015 Anthony Ferrara <ircmaxell@gmail.com>

Refactor declare placement detection, allow encoding declares before type declares


# 09ac3e93 20-Feb-2015 Xinchen Hui <laruence@php.net>

uint32_t


# b3be3c5b 20-Feb-2015 Anthony Ferrara <ircmaxell@gmail.com>

Clean up tri-state logic to use break instead


# e3b020b9 20-Feb-2015 Anthony Ferrara <ircmaxell@gmail.com>

Fix declare error behavior so that improper usages will actually error


# 5f76eed1 20-Feb-2015 Dmitry Stogov <dmitry@zend.com>

don't count op_arrays stored in opcache SHM


# d8511370 20-Feb-2015 Dmitry Stogov <dmitry@zend.com>

Lazy duplication of op_array->static_variables


# c8590799 18-Feb-2015 Anthony Ferrara <ircmaxell@gmail.com>

Remove the aliases of scalar types


# c6996a29 18-Feb-2015 Anthony Ferrara <ircmaxell@gmail.com>

Fix default values for booleans, thanks to virtual types


# d5aaebc3 18-Feb-2015 Anthony Ferrara <ircmaxell@gmail.com>

Disallow block mode for declare(strict_types=1) declarations


# ac2ece88 18-Feb-2015 Anthony Ferrara <ircmaxell@gmail.com>

Improve detection of strict_types declaration being first in the file


# e2053fa9 18-Feb-2015 Anthony Ferrara <ircmaxell@gmail.com>

Fix bug where return type checking was overzealous and interfered with generators


# 00b3e77e 18-Feb-2015 Anthony Ferrara <ircmaxell@gmail.com>

Move declare() to the top of the file only, and allow int->float generalization


# e10e151e 13-Feb-2015 Dmitry Stogov <dmitry@zend.com>

Merged zend_array and HashTable into the single data structure.
Now each HashTable is also zend_array, so it's refcounted and may be a subject for Copy on Write
zend_array_dup() was changed to allocate and return HashTable, instead of taking preallocated HashTable as argument.


# 03ded8c7 13-Feb-2015 Nikita Popov <nikic@php.net>

Remove unused variable


# 4498d34a 06-Dec-2014 Guilherme Blanco <guilhermeblanco@hotmail.com>

Check interface/trait extension for internal classes

Removed possibility to have extensions to declare classes extending
interfaces or traits. It was checked in user classes, not extensions
or internal.


# 8c81d80e 12-Feb-2015 Guilherme Blanco <guilhermeblanco@hotmail.com>

Made ZEND_ACC_TRAIT a saner value

CC_TRAIT valued as 0x120 is too magical to be comprehensible by others.


# 97fe15db 12-Feb-2015 Dmitry Stogov <dmitry@zend.com>

Fix "forech" statemt behaviour according to https://wiki.php.net/rfc/php7_foreach

Squashed commit of the following:

commit 1e41295097576dbce6c197ddb7507c07ccae3cbe
Author: Dmitry Stogov <dmitry@zend.com>
Date: Sat Jan 31 07:28:58 2015 +0300

Generalize HashTableIterator API to allows its usage without involvement of HashTable.nInternalPonter

commit 5406f21b11e563069d64045e599693b51c444b63
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jan 30 18:08:43 2015 +0300

Reduced alghorithms complexity

commit b37f1d58d2a141b6e1d980a461ccb588d4317d2e
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jan 30 18:08:30 2015 +0300

Fixed test name

commit fb2d079645829b12ed4e55a461034df6400bc430
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jan 30 18:08:05 2015 +0300

API cleanup

commit 08302c0d6d1cab279b9f2129df03a057baddf2ff
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jan 30 14:20:46 2015 +0300

Make array_splice() to preserve foreach hash position

commit cc4b7be41e2e2b9b0d7a3c8e98466b8886692e6e
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jan 30 12:24:31 2015 +0300

Make internal function, operation on array passed by reference, to preserve foreach hash position

commit 5aa9712b0a30303aadfe3bdd8ae1f072ca3e6ba1
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jan 30 09:49:35 2015 +0300

Implement consistent behavior for foreach by value over plain object

commit 4c5b385ff53ae9f0b52572e98c4db801f56603b0
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jan 30 07:56:37 2015 +0300

More careful iterators update.

commit 721fc9e80d2ee8f2cd79c8c3cdceffae2c72de92
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Jan 29 21:43:28 2015 +0300

Added new test

commit 15a23b1218b3e38630d677751a975907daa2cd54
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Jan 29 21:05:02 2015 +0300

Reimplement iteration magic with HashTableIterators (see https://wiki.php.net/rfc/php7_foreach#implementation_details)

commit 10a3260b1f16b6075fd8140f673dfef4d5efea91
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Jan 29 21:04:44 2015 +0300

New test

commit eef80c583762d1e98d177cdbb27e3a8a6b0c4539
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Jan 28 16:52:21 2015 +0300

Fixed foreach by reference iteration over constant array

commit 61e739187391661e2d541947bec25d7dcc4479f3
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Jan 28 14:59:54 2015 +0300

Fixed temporary variable re-allocation pass

commit 92e90c09f085c22707ff4a59201f016f56e0ef8b
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Jan 28 12:44:57 2015 +0300

Fixed operand destruction in case of exceptions in iterator

commit dd2a36a2074bbb0cb31de00b66dcf2812d6d753f
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Jan 28 10:02:34 2015 +0300

Use GET_OP1_ZVAL_PTR_DEREF() (IS_TMP_VAR and IS_CONST can't be IS_REFERENCE)

commit 4638f7b91407c48710007af82a68da0007c820f2
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Jan 28 07:43:28 2015 +0300

Change "foreach" statement behavior (this is just a PoC yet)

- "foreach by value" don't relay on internal array/object pointer and doesnt perform array duplication. It just locks it incrementing reference counter. If the original array is modified by some code, the copy on write is performed and "foreach" still work with the old copy.

- it makes no difference if array given to "foreach by value" is reference itself

- "foreach by reference" still use internal array/object pointer and should work similar to PHP-5. (This id not completely implemented)


# 4f1fc31e 11-Feb-2015 Xinchen Hui <laruence@php.net>

Expose zend_string_equals_str_ci


# 2b3bebfa 10-Feb-2015 Bob Weinand <bobwei9@hotmail.com>

Revert removal of two ReflectionParameter functions
Rather fix them for now by exempting function parameter defaults from *any* (non-ct) constant substitution (also from persistent constant substitution, which was already broken before)


# 5a7ac0fa 01-Feb-2015 Andrea Faulds <ajf@ajf.me>

Implement per-file strictness for scalar return types


# 6b6b2b4b 01-Feb-2015 Andrea Faulds <ajf@ajf.me>

Implement scalar return types (strict only for now)


# c7719ab4 01-Feb-2015 Andrea Faulds <ajf@ajf.me>

Refactor typehint lookup


# e1a23867 25-Jan-2015 Andrea Faulds <ajf@ajf.me>

Shorten syntax to strict_types=1


# 02ec3572 12-Jan-2015 Andrea Faulds <ajf@ajf.me>

Per-file


# cc01e37e 10-Jan-2015 Andrea Faulds <ajf@ajf.me>

It Begins


# 1a28ad03 06-Jan-2015 Andrea Faulds <ajf@ajf.me>

Forbid scalar type hint names for use, class_alias


# a03af7ff 04-Jan-2015 Andrea Faulds <ajf@ajf.me>

Fix class name prohibition to work for namespaced classes, too


# 75a225d0 27-Dec-2014 Andrea Faulds <ajf@ajf.me>

Do not make scalar type hints reserved words, merely reserve class name


# 830d3d79 10-Feb-2015 Bob Weinand <bobwei9@hotmail.com>

Revert "Revert "Improve and generalize class constant substitution""

This reverts commit 400e65e955f08ad6ae57c1a15be04d5852107252.

Removing ReflectionParameter::getDefaultValueConstantName() and isDefaultValueConstant()
They become useless with such optimizations and already anyway are (e.g. CONSTANT?:CONSTANT ... yields the constant back without telling isDefaultValueConstant() about it etc.)


# 400e65e9 09-Feb-2015 Bob Weinand <bobwei9@hotmail.com>

Revert "Improve and generalize class constant substitution"

This reverts commit 9ff3800b79e9fe69ae821d18e23b2f0a156a100c.


# 9ff3800b 07-Feb-2015 Bob Weinand <bobwei9@hotmail.com>

Improve and generalize class constant substitution


# 9e70d767 04-Feb-2015 Dmitry Stogov <dmitry@zend.com>

Move zend_object->guards into additional slot of zend_object->properties_table[]. As result size of objects without __get/__set/__unset/__isset magic methods is reduced.


# 67207166 03-Feb-2015 Dmitry Stogov <dmitry@zend.com>

Optimize class lookup


# e375ba87 02-Feb-2015 Dmitry Stogov <dmitry@zend.com>

Fixed "delayed" compilation


# c8576c5a 08-Jan-2015 Levi Morrison <levim@php.net>

Implement return types

RFC is documented here: https://wiki.php.net/rfc/return_types


# 4d3e4d3b 10-Sep-2014 Nikita Popov <nikic@php.net>

Remove assignment of new by reference


# c637ba11 24-Jan-2015 Bob Weinand <bobwei9@hotmail.com>

Fix segfault when no class ctx is defined


# 8dc12877 24-Jan-2015 Nikita Popov <nikic@php.net>

Fix build


# f3675d95 24-Jan-2015 Bob Weinand <bobwei9@hotmail.com>

Inline self-constants if possible at compile time


# bd629428 21-Jan-2015 Bob Weinand <bobwei9@hotmail.com>

Removed efree() on arena_alloc()ed memory


# 8d60d370 20-Jan-2015 Xinchen Hui <laruence@php.net>

Unused var


# 230bfb10 19-Jan-2015 Dmitry Stogov <dmitry@zend.com>

Generate better code for comparisons with boolean constants


# 2efa5364 19-Jan-2015 Dmitry Stogov <dmitry@zend.com>

Optimize code generated for "while" and "for" loops.
Eliminate one JMP opcode for each loop iteration.


# fc33f52d 15-Jan-2015 Xinchen Hui <laruence@php.net>

bump year


# 0579e827 15-Jan-2015 Xinchen Hui <laruence@php.net>

bump year


# 73c1be26 15-Jan-2015 Xinchen Hui <laruence@php.net>

Bump year


# b7a7b1a6 03-Jan-2015 Stanislav Malyshev <stas@php.net>

trailing whitespace removal


# e9068cef 09-Jan-2015 Nikita Popov <nikic@php.net>

Make empty list() check stricter

Now also includes list()s with just commas in it.


# d51fb69c 05-Dec-2014 Guilherme Blanco <guilhermeblanco@hotmail.com>

Removed parsing support traits to have extends and implements.


# f48c2327 01-Dec-2014 Guilherme Blanco <guilhermeblanco@hotmail.com>

Decoupled class declaration statement into more granular pieces.


# 2269b180 04-Jan-2015 Nikita Popov <nikic@php.net>

Add missing string cast for non-cv var fetches


# 69a4b135 04-Jan-2015 Nikita Popov <nikic@php.net>

Fix use after free for variables with integer names


# 3bd96e07 29-Dec-2014 Xinchen Hui <laruence@php.net>

Use internd string as key


# c42ac095 24-Dec-2014 Dmitry Stogov <dmitry@zend.com>

Added new API function 'zend_string* zend_string_tolower(zend_string*)'.
It simplifies code and avoids unnecessary allocation and copying if string is already in lower case.


# 2646f7bc 22-Dec-2014 Dmitry Stogov <dmitry@zend.com>

Don't count variadic argument in zend_func.common.num_args. This allows faster CALL/RETURN code.


# 0f815642 05-Dec-2014 Nikita Popov <nikic@php.net>

Drop ZEND_PRINT opcode in favor of ZEND_ECHO

The return value long(1) is an IS_CONST operand now.


# 3a185977 16-Dec-2014 Dmitry Stogov <dmitry@zend.com>

Optimize argument passing handlers:

- predcalculate offsets of passed argument and store it in opline->result.var for ZEND_SEND_*;
- don't update "number of passed arguments" op each ZEND_SEND_* opcode, store it on call frame creation
- Change ZEND_HANDLE_EXCEPTION to determine "number of passed arguments" in incomplete calls fefore freeing


# 0a40e6a3 14-Dec-2014 Anatol Belski <ab@php.net>

removed the TS part, as suggested by Dmitry.

Tests seem to be ok so far


# e112f6a0 14-Dec-2014 Anatol Belski <ab@php.net>

second shot on removing TSRMLS_*


# bdeb220f 13-Dec-2014 Anatol Belski <ab@php.net>

first shot remove TSRMLS_* things


# 3893c1fc 12-Dec-2014 Dmitry Stogov <dmitry@zend.com>

Fixed compilation warnings


# ee226b96 08-Dec-2014 Kévin Dunglas <dunglas@gmail.com>

Fixed Bug #65576 (Constructor from trait conflicts with inherited constructor)


# 14e29f51 12-Dec-2014 Dmitry Stogov <dmitry@zend.com>

Reduced size of zend_op on 64-bit systems.

the main idea - the smaller the zend_op structure, the lees memory traffic is required to load VM instructions during execution. The patch reduces the size of each opcode from 48 to 32 bytes (saves 16 bytes for each opcode, and applications use thousands of opoceds). This reduced the number of CPU cache misses by 12% and improved performance of real-life apps by 1-2%.

The patch affects how constants and jump targets are represented in VM during execution. Previously they were implemented as absolute 64-bit pointers. Now they are relative 32-bit offsets.

In run-time constant now should be accessed as:
RT_CONSTANT(op_array, opine->op1) instead of opline->op1.zv
EX_CONSTANT(opline->op1) instead of opline->op1.zv

Jump targets:
OP_JMP_ADDR(opline, opline->op2) instead of opline->op2.jmp_addr

The patch doesn't change zend_op representation for 32-bit systems. They still use absolute addresses. The compile-time representation is also kept the same.


# 9ea35a37 12-Dec-2014 Dmitry Stogov <dmitry@zend.com>

Make ZEND_INIT_FCALL keep predcalculted size of necessary stack space in opline->op1.num to avoid its recalculation on each execution.


# 5dd427ea 03-Dec-2014 Dmitry Stogov <dmitry@zend.com>

Use zend_string* for op_array->arg_info[]->name and op_array->arg_info[]->class_name. For internal functions we still use char*.


# 5f80df0d 02-Dec-2014 Xinchen Hui <laruence@php.net>

Missed closed folder mark


# 7c77ca38 29-Oct-2014 Julien Pauli <jpauli@php.net>

Fix #65419 - Inside trait, self::class != __CLASS__


# dcfe5877 28-Nov-2014 Dmitry Stogov <dmitry@zend.com>

Rename EX_VAR_2() into ZEND_CALL_VAR() and EX_VAR_NUM_2() into ZEND_CALL_VAR_NUM().


# 109baa03 26-Nov-2014 Dmitry Stogov <dmitry@zend.com>

Fixed compilation warnings


# 216ef321 27-Nov-2014 Dmitry Stogov <dmitry@zend.com>

Changed "finally" handling. Removed EX(fast_ret) and EX(delayed_exception). Allocate and use additional IS_TMP_VAR slot on VM stack instead.


# 303d73ec 26-Nov-2014 Dmitry Stogov <dmitry@zend.com>

Reimplemented silence operator (@) handling on exceptions. Now each silence region is stored in op_array->brk_cont_array. On exception ZEND_HANDLE_EXCEPTION handler traverse this array and restore original EG(error_reporting) if exception occured inside a "silence" region.


# e116595e 25-Nov-2014 Dmitry Stogov <dmitry@zend.com>

Better fix for bug #68446


# 83ce1d9a 25-Nov-2014 Dmitry Stogov <dmitry@zend.com>

Revert "Merge remote-tracking branch 'origin/PHP-5.6'"

This reverts commit 38229d13d14bb0bda736d52a9a4f25c121445692, reversing
changes made to 77f172725a37c8ddee750bf6970529a1570fbc86.


# aba95c23 24-Nov-2014 Bob Weinand <bobwei9@hotmail.com>

Revert "Fix bug #68446 (bug with constant defaults and type hints)"

This reverts commit 5ef138b0c7c4e9532e205f45c18a72aa1d279c24.


# 5ef138b0 23-Nov-2014 Bob Weinand <bobwei9@hotmail.com>

Fix bug #68446 (bug with constant defaults and type hints)


# cd3b46f2 29-Oct-2014 Julien Pauli <jpauli@php.net>

Fix #68185 - Inconsistent insteadof definition


# e20a7274 18-Nov-2014 Dmitry Stogov <dmitry@zend.com>

SEND_VAR_NO_REF optimization


# 09aa419d 10-Nov-2014 Anatol Belski <ab@php.net>

initialiize opline for the case it lands in default case


# 44bc735a 10-Nov-2014 Xinchen Hui <laruence@php.net>

convert_to_string also does the check


# 84cd04fc 10-Nov-2014 Xinchen Hui <laruence@php.net>

A better fix(do the convertion in compile time)


# 073c5e09 31-Oct-2014 Anatol Belski <ab@php.net>

fix warning not all control paths return a value


# 283947af 24-Oct-2014 Anatol Belski <ab@php.net>

fix datatype mismatches

and convert APIs to size_t where zend_string internally used


# 6e396961 23-Oct-2014 Dmitry Stogov <dmitry@zend.com>

Fixed "instanceof" with undefined classes


# 4fd435ab 23-Oct-2014 Dmitry Stogov <dmitry@zend.com>

Embed FETCH_CLASS <string> into the following NEW


# 8dedd863 22-Oct-2014 Dmitry Stogov <dmitry@zend.com>

Get rid of ZEND_FETCH_MAKE_REF


# 534d854f 22-Oct-2014 Dmitry Stogov <dmitry@zend.com>

Embed FETCH_CLASS <string> into the following INSTANCEOF


# 779ca61e 22-Oct-2014 Dmitry Stogov <dmitry@zend.com>

Don't use opline->extended_value for FETCH_CLASS flags where it's unnecessary


# fe8577ef 21-Oct-2014 Dmitry Stogov <dmitry@zend.com>

Optimized ASSIGN_DIM and related opcodes


# c00424e4 15-Oct-2014 Anatol Belski <ab@php.net>

bring back all the TSRMLS_FETCH() stuff

for better comparability with the mainstream


# 0b09ba84 12-Oct-2014 Nikita Popov <nikic@php.net>

Ensure __LINE__ is always accurate


# 292421d3 05-Oct-2014 Nikita Popov <nikic@php.net>

Fix unused variable warning


# 7c7b9184 05-Oct-2014 Dmitry Stogov <dmitry@zend.com>

Fixed list() behavior inconsistency (string handling is disabled for all cases, ArrayAccess objects handling is enabled for all cases, ZEND_FETCH_DIM_TMP_VAR opcode is renamed into ZEND_FETCH_LIST, ZEND_FETCH_ADD_LOCK flag is removed).


# ccb24caa 02-Oct-2014 Dmitry Stogov <dmitry@zend.com>

Fixed incorrect compilation


# 290d71de 29-Sep-2014 Nikita Popov <nikic@php.net>

Drop unused RAISE_ABSTRACT_ERROR opcode

Abstract methods are being prevented from being called in DO_FCALL
etc.


# ab288b01 28-Sep-2014 Nikita Popov <nikic@php.net>

CT substitute unqualified true/false/null in namespaces

Substituation now always happens on the resolved name and
unqualified usages of true/false/null in namespaced code are
substituted as well.


# 877eb02f 27-Sep-2014 Nikita Popov <nikic@php.net>

Update operand types for coalesce operator


# 06d0230a 26-Sep-2014 Anatol Belski <ab@php.net>

cleanup TSRMLS_FETCH


# d11734b4 25-Sep-2014 Anatol Belski <ab@php.net>

reworked the patch, less new stuff but worky

TLS is already used in TSRM, the way exporting the tsrm cache through
a thread local variable is not portable. Additionally, the current
patch suffers from bugs which are hard to find, but prevent it to
be worky with apache. What is done here is mainly uses the idea
from the RFC patch, but

- __thread variable is removed
- offset math and declarations are removed
- extra macros and definitions are removed

What is done merely is

- use an inline function to access the tsrm cache. The function uses
the portable tsrm_tls_get macro which is cheap
- all the TSRM_* macros are set to placebo. Thus this opens the way
remove them later

Except that, the logic is old. TSRMLS_FETCH will have to be done once
per thread, then tsrm_get_ls_cache() can be used. Things seeming to be
worky are cli, cli server and apache. I also tried to enable bz2
shared and it has worked out of the box. The change is yet minimal
diffing to the current master bus is a worky start, IMHO. Though will
have to recheck the other previously done SAPIs - embed and cgi.

The offsets can be added to the tsrm_resource_type struct, then
it'll not be needed to declare them in the userspace. Even the
"done" member type can be changed to int16 or smaller, then adding
the offset as int16 will not change the struct size. As well on the
todo might be removing the hashed storage, thread_id != thread_id and
linked list logic in favour of the explicit TLS operations.


# 3e042e1f 23-Sep-2014 Nikita Popov <nikic@php.net>

Move list() condition into assign_znode

The condition in compile_foreach was using ->attr instead of ->kind
and as such never passed. It only worked because assign_znode already
supported this case by indirecting via zend_compile_assign. Now it
implements it with a direct call.


# 58a41cf7 23-Sep-2014 Dmitry Stogov <dmitry@zend.com>

Make QM_ASSIGN, JMP_SET and CAST return IS_TMP_VAR.


# 4a221bd8 23-Sep-2014 Nikita Popov <nikic@php.net>

Drop unused result argument


# 67a5ca66 23-Sep-2014 Nikita Popov <nikic@php.net>

Fix ct binding for cuf/cufa functions

It was checking against the wrong AST kind, so the binding was
never actually done.


# 9070eb38 23-Sep-2014 Nikita Popov <nikic@php.net>

Fix detection of write to built-in function for references


# 231dcc94 23-Sep-2014 Nikita Popov <nikic@php.net>

Test use of string names with \ prefix

And drop piece of dead code


# 182ddfea 23-Sep-2014 Nikita Popov <nikic@php.net>

Add zend_add_literal_string

And simplify additional of special literals based on it.


# 4571271d 23-Sep-2014 Nikita Popov <nikic@php.net>

Drop dead code


# 06103d65 23-Sep-2014 Dmitry Stogov <dmitry@zend.com>

Use zval_ptr_dtor_nogc() to free IS_TMP_VAR operands.
Removed ZEND_SWITCH_FREE opcode (ZEND_FREE used instead).


# 75533c9b 22-Sep-2014 Nikita Popov <nikic@php.net>

Test a few more error conditions in the compiler


# 51119054 22-Sep-2014 Nikita Popov <nikic@php.net>

Test error conditions for ct class const refs

And fix a bug found while doing so...


# f30f28ec 22-Sep-2014 Nikita Popov <nikic@php.net>

Fix list() destructuring to special variables


# 7d4c81d8 21-Sep-2014 Nikita Popov <nikic@php.net>

Fix two memory errors by interning earlier


# 5e977e69 20-Sep-2014 Nikita Popov <nikic@php.net>

Fixed bug #67633


# b3aebda9 20-Sep-2014 krakjoe <joe.watkins@live.co.uk>

native tls initial patch


# 98891ee1 19-Sep-2014 Nikita Popov <nikic@php.net>

Simplify foreach flags

* FE_RESET_VARIABLE and FE_RESET_REFERENCE were always set
together.
* In some places the code checked FE_FETCH_BYREF instead of
FE_RESET_REFERENCE and relied on them having the same value.
* Now the FE_RESET_* flags are dropped and everything uses
FE_FETCH_BYREF


# 95836a35 20-Sep-2014 Xinchen Hui <laruence@php.net>

Avoid strlen usage


# c7446bbd 19-Sep-2014 Nikita Popov <nikic@php.net>

Remove superfluous Z_REFCOUNTED_P check

The string is never interned and IS_CONSTANT_EX is always refcounted.


# c343ca4e 18-Sep-2014 Nikita Popov <nikic@php.net>

Split inheritance into separate file

This moves handling of inheritance and interface implementation
from zend_compile.c into a separate zend_inheritance.c file, as
this is not really related to compilation.


# bccc6531 19-Sep-2014 Dmitry Stogov <dmitry@zend.com>

Avoid double IS_INTERNED() check


# 35f84676 19-Sep-2014 Dmitry Stogov <dmitry@zend.com>

Reverted incorrect chunk


# 3bc8a958 19-Sep-2014 Dmitry Stogov <dmitry@zend.com>

Fixed useless or duplicated IS_INTERNED() checks


# 551ee416 16-Sep-2014 Dmitry Stogov <dmitry@zend.com>

Use runtime-cache to avoid hash lookups in BIND_GLOBAL instruction


# 69e7c9d8 16-Sep-2014 Nikita Popov <nikic@php.net>

Initial coalesce operator implementation


# 079409bb 15-Sep-2014 Nikita Popov <nikic@php.net>

Switch (un)mangle property name to size_t and zend_string

Also use the _ex variants where possible.


# ee75848b 13-Sep-2014 Nikita Popov <nikic@php.net>

Drop superfluous opline for non-cv variables


# 88e07324 13-Sep-2014 Nikita Popov <nikic@php.net>

Drop dead assignments


# 82096dc1 10-Sep-2014 Dmitry Stogov <dmitry@zend.com>

Removed ZEND_QM_ASSIGN_VAR and ZEND_JMP_SET_VAR opcodes (in PHPNG they did exacly the same as ZEND_QM_ASSIGN and ZEND_JMP_SET)


# b476eca8 05-Sep-2014 Levi Morrison <levim@php.net>

Error on multiple default blocks in a switch

Part of RFC: https://wiki.php.net/rfc/switch.default.multiple


# 9e753531 03-Sep-2014 Nikita Popov <nikic@php.net>

Use zval_ptr_dtor_nogc to destroy literals

Also move the definition of zval_ptr_dtor_nogc to zend_variables.h
(from zend_execute.h/.c) as it's used in a few places.


# c52511c3 03-Sep-2014 Dmitry Stogov <dmitry@zend.com>

Disabled usage of built-in functions in write context (e.g. strlen($s)[] = ...)


# 9a958a08 03-Sep-2014 Dmitry Stogov <dmitry@zend.com>

Simplify BEGIN_SILENCE/END_SILENCE to not modify ini entry value back and force


# d7368c25 30-Aug-2014 Nikita Popov <nikic@php.net>

Fix bug #67938: Segfault when extending interface method with variadic

We only want to check extra optional args if the proto function is
variadic, not when we're adding extra variadic args.


# b73bea9c 29-Aug-2014 Nikita Popov <nikic@php.net>

Combine foreach copy / switch cond stacks

Now one common stack to handle both, which stores znodes instead of
full oplines (foreach copy stack) or switch entries (switch cond
stack).

Also removed EG(start_op) while at it.


# 545fd516 29-Aug-2014 Nikita Popov <nikic@php.net>

Don't distinguish between ast/list in parser

This removes the need to use $<ast>{n} or $<list>$ casts in the
reduction actions.

Keeping the distinction in the parser doesn't really give us any
benefit and only makes changing the grammar harder.


# 0763d6b9 29-Aug-2014 Xinchen Hui <laruence@php.net>

use zend_string_equals_ci


# 49bd049b 29-Aug-2014 Xinchen Hui <laruence@php.net>

Keep folder mark style in this file


# 65927063 28-Aug-2014 Johannes Schlüter <johannes@php.net>

Fix comparison in case of constant NULL as default value

Fixes "Fatal error: Default value for parameters with a class type hint
can only be NULL in ext/phar/phar.php on line 1120" whie creating phar.phar


# ae7e6633 28-Aug-2014 Nikita Popov <nikic@php.net>

Fix bug #67922


# 389d2859 28-Aug-2014 Andrea Faulds <ajf@ajf.me>

Special-case aliases, add warning comments to implementations


# d3bfbc07 28-Aug-2014 Anatol Belski <ab@php.net>

remove duplicate condition already present a line upper


# f2b03701 27-Aug-2014 Dmitry Stogov <dmitry@zend.com>

Use 'const' qualifier for pointrs to code used at run-time (the code must not be changed)


# ee552b62 27-Aug-2014 Dmitry Stogov <dmitry@zend.com>

Reorder fields for better nenory consumtion and data locality on 64-bit systems


# b1f53ca4 27-Aug-2014 Dmitry Stogov <dmitry@zend.com>

Use efree_size() instead of efree() where posible


# f3b629c9 26-Aug-2014 Nikita Popov <nikic@php.net>

Move =&new deprecation message into compiler


# f8abb9a4 26-Aug-2014 Nikita Popov <nikic@php.net>

Handle remaining magic constants in parser as well

As far as I can see the !filename case cannot occur, so I dropped
it.


# c71ab607 26-Aug-2014 Nikita Popov <nikic@php.net>

Don't alloc empty jmp opnum list for single-branch if


# 055b632e 26-Aug-2014 Dmitry Stogov <dmitry@zend.com>

Fixed return operand type (Use IS_TMP_VAR instead of IS_VAR in the same way as it was before AST patch)


# 202e8db1 26-Aug-2014 Anatol Belski <ab@php.net>

fixed several long vs zend_long casts


# 7cbbb371 26-Aug-2014 Dmitry Stogov <dmitry@zend.com>

Fixed compile-time constants substitution


# 59848e3f 25-Aug-2014 Nikita Popov <nikic@php.net>

Remove ZEND_ACC_INTERACTIVE and CG(interactive)

As far as I can discern these are leftovers of the interactive
shell implementation that was used before PHP 5.4. Now the readline
ext makes use of normal eval calls for this.

So, dropping these until there is evidence to the contrary, as they
currently wouldn't work anyway.


# 4ea19a68 25-Aug-2014 Nikita Popov <nikic@php.net>

make bp type uint32_t everywhere


# 46b53e81 25-Aug-2014 Nikita Popov <nikic@php.net>

Add zend_string_equals and zend_string_equals_literal


# af59e92b 25-Aug-2014 Anatol Belski <ab@php.net>

master renames phase 7


# 7813d85d 25-Aug-2014 Nikita Popov <nikic@php.net>

Fix for C89


# 6f9f0bf2 25-Aug-2014 Anatol Belski <ab@php.net>

master renames phase 2


# c3e3c98e 25-Aug-2014 Anatol Belski <ab@php.net>

master renames phase 1


# 0a230fb4 18-Aug-2014 Nikita Popov <nikic@php.net>

Fix add_class_name_literal (thanks laruence)


# f3106998 18-Aug-2014 Dmitry Stogov <dmitry@zend.com>

Improved error message


# 458f67cd 18-Aug-2014 Nikita Popov <nikic@php.net>

Fix encoding declaration handling

As the encoding declaration influences lexing it needs to be
immidiately handled in the parser.


# 2a26cbb7 17-Aug-2014 Nikita Popov <nikic@php.net>

Fix dtor in do_free as well

We should expose zval_ptr_dtor_nogc outside zend_execute


# ee3d28ed 16-Aug-2014 Nikita Popov <nikic@php.net>

Fix compile_args semantics


# 38a17391 16-Aug-2014 Nikita Popov <nikic@php.net>

Fix merge


# 5bb25776 16-Aug-2014 Anatol Belski <ab@php.net>

further fixes on core


# 8ee2a4a9 16-Aug-2014 Anatol Belski <ab@php.net>

first shot on merging the core fro the int64 branch


# 9cfbf333 15-Aug-2014 Nikita Popov <nikic@php.net>

Fix list() = string refcounting


# 471f13b7 15-Aug-2014 Nikita Popov <nikic@php.net>

Fix s&r mistake


# c4460dd1 15-Aug-2014 Nikita Popov <nikic@php.net>

Restore old evaluation order

${a()}[b()][c()] = d() will now evaluate in order a, b, c, d.


# ce1af1e4 05-Aug-2014 Dmitry Stogov <dmitry@zend.com>

Fixed bug #67725 (now we create immutable arrays only in SHM)


# f693cf8e 31-Jul-2014 Dmitry Stogov <dmitry@zend.com>

EA must be initialized


# 6cf89612 30-Jul-2014 Nikita Popov <nikic@php.net>

Support doc comments for propreties


# 8e9a840a 30-Jul-2014 Nikita Popov <nikic@php.net>

Mark some small functions as inline


# 0cd9cffb 30-Jul-2014 Nikita Popov <nikic@php.net>

Rename _tmp_compile_const_expr

Also remove recursive immutization of arrays there, because this
is already handled when the array is created.


# 044e48d0 30-Jul-2014 Nikita Popov <nikic@php.net>

Weaker recursion during pre-evaluation


# 3630f03f 30-Jul-2014 Nikita Popov <nikic@php.net>

Immutable arrays for the recursive case as well


# 8cab06f0 29-Jul-2014 Nikita Popov <nikic@php.net>

Immutablize constant leaf arrays

Still haven't entirely figured out how to elegantly handle the
recursive variant.


# 6a13a22f 29-Jul-2014 Nikita Popov <nikic@php.net>

Fix segfault when class name evaluates to IS_CONST


# 763eb13d 29-Jul-2014 Nikita Popov <nikic@php.net>

Formatting


# 438b1e3d 29-Jul-2014 Nikita Popov <nikic@php.net>

build_runtime_definition_key returns zend_string*


# 18f06807 28-Jul-2014 Nikita Popov <nikic@php.net>

Change current_namespace to a zend_string*


# 047a9948 28-Jul-2014 Nikita Popov <nikic@php.net>

For filenames a pointer comparison is sufficient


# e9fb72c8 28-Jul-2014 Nikita Popov <nikic@php.net>

Rename to zend_str_equals_literal and turn into a macro

So we can make of sizeof rather than strlen


# c8d3b590 28-Jul-2014 Nikita Popov <nikic@php.net>

zend_str_equals_str(_ci)


# 8c724c20 28-Jul-2014 Nikita Popov <nikic@php.net>

Use zend_str_equals more often


# 78890506 28-Jul-2014 Nikita Popov <nikic@php.net>

Add zend_ prefix for emit_op(_tmp)


# cf7f0c41 28-Jul-2014 Nikita Popov <nikic@php.net>

zend_ast_create determined child count automatically


# 39d480e4 28-Jul-2014 Nikita Popov <nikic@php.net>

Remove zend_ast_create_unary etc


# 4c05bec5 28-Jul-2014 Nikita Popov <nikic@php.net>

Remove some unused compiler globals


# 31a886c3 28-Jul-2014 Nikita Popov <nikic@php.net>

More dead code


# 55f53e29 28-Jul-2014 Nikita Popov <nikic@php.net>

zend_get_class_fetch_type works on zend_string


# 50aefcf0 28-Jul-2014 Nikita Popov <nikic@php.net>

Remove duplicate code


# 23066552 28-Jul-2014 Nikita Popov <nikic@php.net>

We don't pay per newline...


# 38c4125c 28-Jul-2014 Nikita Popov <nikic@php.net>

Cleanup dead/duplicate code


# a2925df6 28-Jul-2014 Nikita Popov <nikic@php.net>

Use zend_ast_get_str where possible


# 1d79fb30 28-Jul-2014 Nikita Popov <nikic@php.net>

Add zend_ast_list* variant to parser stack element


# 187ff135 27-Jul-2014 Nikita Popov <nikic@php.net>

zend_do_op_data -> zend_emit_op_data


# d3cb2393 27-Jul-2014 Nikita Popov <nikic@php.net>

Use separate node type for lists

This saves storing the children count for normal ast nodes.


# 21eb6807 27-Jul-2014 Nikita Popov <nikic@php.net>

Store lineno for zval ast nodes more efficiently


# d0943edf 26-Jul-2014 Nikita Popov <nikic@php.net>

Remove last EA usages

Still retaining the EA field in znode as it is used by opcache


# bea85f58 26-Jul-2014 Nikita Popov <nikic@php.net>

Use more specific parser stack nodes


# 1ea9a2d9 26-Jul-2014 Nikita Popov <nikic@php.net>

Cleanup member modifier code


# df42793c 26-Jul-2014 Nikita Popov <nikic@php.net>

Create namespace_name via AST


# c0790712 26-Jul-2014 Nikita Popov <nikic@php.net>

zend_do_return -> zend_emit_final_return


# 4ca4b423 26-Jul-2014 Nikita Popov <nikic@php.net>

Make lexer return AST nodes


# 9344a95a 26-Jul-2014 Nikita Popov <nikic@php.net>

Remove dead code


# 17234d78 26-Jul-2014 Nikita Popov <nikic@php.net>

Replicate old linenos for class binding


# 1bdc4332 26-Jul-2014 Nikita Popov <nikic@php.net>

Fix bugs


# edd9fcab 26-Jul-2014 Nikita Popov <nikic@php.net>

Fix leaks

Must find a good way to handle constant expressions...


# d46f67a3 25-Jul-2014 Nikita Popov <nikic@php.net>

Use arena allocator (currently leaky!)


# 1644bf01 24-Jul-2014 Nikita Popov <nikic@php.net>

Resolve futher interning issues

Not sure if this is the right way to do it ...


# c777427c 24-Jul-2014 Nikita Popov <nikic@php.net>

Fix interning bug


# 24ca6bb9 24-Jul-2014 Nikita Popov <nikic@php.net>

Add call_user_func optimization


# cec74723 24-Jul-2014 Nikita Popov <nikic@php.net>

Implement call_user_func_array optimization


# 0356e07a 22-Jul-2014 Nikita Popov <nikic@php.net>

Implement ZEND_DEFINED optimization


# 7892b894 22-Jul-2014 Nikita Popov <nikic@php.net>

Implement ZEND_TYPE_CHECK optimization


# 2ee490ba 22-Jul-2014 Nikita Popov <nikic@php.net>

Implement ZEND_STRLEN optimization


# f21d8bc2 22-Jul-2014 Nikita Popov <nikic@php.net>

CT bind args before unpack


# 18596740 22-Jul-2014 Nikita Popov <nikic@php.net>

Port ZEND_BIND_GLOBAL optimization


# 43b2973e 22-Jul-2014 Nikita Popov <nikic@php.net>

Remove declare_stack


# a7fc995f 22-Jul-2014 Nikita Popov <nikic@php.net>

Dead code


# b9be66eb 22-Jul-2014 Nikita Popov <nikic@php.net>

Implement declare()


# 2653b8b5 22-Jul-2014 Nikita Popov <nikic@php.net>

Handle __halt_compiler()


# 3becdb33 22-Jul-2014 Nikita Popov <nikic@php.net>

__halt_compiler() without haling compiler


# de2f132f 22-Jul-2014 Nikita Popov <nikic@php.net>

Add NS error checks

Those can probably be implemented in a better way now...


# 776800b0 22-Jul-2014 Nikita Popov <nikic@php.net>

Discard NS doc comments


# 130b6340 22-Jul-2014 Nikita Popov <nikic@php.net>

Code cleanup


# cc0bef66 22-Jul-2014 Nikita Popov <nikic@php.net>

Fix namespace\, maybe


# 9c69c41a 22-Jul-2014 Nikita Popov <nikic@php.net>

Port top level stmt

Problem: namespace\foo no longer works :/


# 8a2ff6b5 21-Jul-2014 Nikita Popov <nikic@php.net>

Partial NS port (semicolon, no errors)


# b6c9eb21 22-Jul-2014 Nikita Popov <nikic@php.net>

Port constant declaration


# 64151ec3 21-Jul-2014 Nikita Popov <nikic@php.net>

Port function/const use


# 573d25b5 21-Jul-2014 Nikita Popov <nikic@php.net>

Drop dead code


# 37ac1b96 21-Jul-2014 Nikita Popov <nikic@php.net>

Port use statement


# 94d5d7d0 21-Jul-2014 Nikita Popov <nikic@php.net>

Remove one usage of implementing_class


# 6c6dd84c 21-Jul-2014 Nikita Popov <nikic@php.net>

Dead code


# f8ce5e6e 21-Jul-2014 Nikita Popov <nikic@php.net>

Handle const expr __CLASS__ in trait


# 61a6083e 21-Jul-2014 Nikita Popov <nikic@php.net>

Fix some remaining class declaration issues


# df970e9f 21-Jul-2014 Nikita Popov <nikic@php.net>

Pre-evaluate magic constants


# 18fd2a18 21-Jul-2014 Nikita Popov <nikic@php.net>

Port __TRAIT__ and __CLASS__ to AST


# 00531551 21-Jul-2014 Nikita Popov <nikic@php.net>

Mostly finish class declarations (~50 failing tests)


# b24bda6b 21-Jul-2014 Nikita Popov <nikic@php.net>

Partial port of class declarations


# 461bce52 21-Jul-2014 Nikita Popov <nikic@php.net>

Prepare zend_ast_decl for reuse with classes


# 09564eba 21-Jul-2014 Nikita Popov <nikic@php.net>

zend_begin_func_decl


# 028c7d20 19-Jul-2014 Nikita Popov <nikic@php.net>

Throw \self etc error

Could only enable this now that everything uses the new format


# c8d99a13 19-Jul-2014 Nikita Popov <nikic@php.net>

No need to handle leading \ in class_name_literal


# e6e88675 19-Jul-2014 Nikita Popov <nikic@php.net>

Fix class name resolution in traits


# 86f1004c 19-Jul-2014 Nikita Popov <nikic@php.net>

Improve class name handling


# e572a326 19-Jul-2014 Nikita Popov <nikic@php.net>

Dead code


# 291bcfe4 19-Jul-2014 Nikita Popov <nikic@php.net>

Port trait uses


# fd7387a7 19-Jul-2014 Nikita Popov <nikic@php.net>

Handle class const doc comment

Property doc comments not yet handled


# 222430d9 19-Jul-2014 Nikita Popov <nikic@php.net>

Port class const decl


# 43d6e599 19-Jul-2014 Nikita Popov <nikic@php.net>

Port property declarations


# 1aaaedc1 19-Jul-2014 Nikita Popov <nikic@php.net>

Dead code


# 6513e959 19-Jul-2014 Nikita Popov <nikic@php.net>

Fix for with empty expression lists


# ef26f956 19-Jul-2014 Nikita Popov <nikic@php.net>

Load lineno when compiling exprs


# 446cf29a 19-Jul-2014 Nikita Popov <nikic@php.net>

Fix compound assign to static property


# 09309a54 19-Jul-2014 Nikita Popov <nikic@php.net>

Remove dead code


# 74dba7e4 18-Jul-2014 Nikita Popov <nikic@php.net>

__autoload error


# 547331d2 18-Jul-2014 Nikita Popov <nikic@php.net>

Port methods

The duplicated magic method checks are ugly


# b9f62be2 18-Jul-2014 Nikita Popov <nikic@php.net>

Cleanup


# d0b66f3a 18-Jul-2014 Nikita Popov <nikic@php.net>

zend_emit_jump and zend_emit_cond_jump


# ca7a4907 18-Jul-2014 Nikita Popov <nikic@php.net>

zend_update_jump_target


# 0eab81f3 18-Jul-2014 Nikita Popov <nikic@php.net>

Remove bits of dead code


# adbddf4e 18-Jul-2014 Nikita Popov <nikic@php.net>

Support static closures


# 405b97e8 18-Jul-2014 Nikita Popov <nikic@php.net>

Handle function doc comments


# cdcf78f7 18-Jul-2014 Nikita Popov <nikic@php.net>

Fix lexer/compiler interdependency


# 359f99fe 18-Jul-2014 Nikita Popov <nikic@php.net>

Use dedicated func_decl ast node

Functions need a bunch of extra info, that becomes inconvenient
to handle using the normal ast structure.


# 3ad55e00 18-Jul-2014 Nikita Popov <nikic@php.net>

Small cleanup

Current problem: build_runtime_defined_function_key is lexer
coupled


# ae5ba9ab 17-Jul-2014 Nikita Popov <nikic@php.net>

Port closures


# abfc8bd8 17-Jul-2014 Nikita Popov <nikic@php.net>

Port closure use


# 20d2a044 16-Jul-2014 Nikita Popov <nikic@php.net>

Lineno corrections


# 64a71321 16-Jul-2014 Nikita Popov <nikic@php.net>

Port __METHOD__


# a75921dc 16-Jul-2014 Nikita Popov <nikic@php.net>

Port __FUNCTION__ to AST


# f589713c 15-Jul-2014 Nikita Popov <nikic@php.net>

Preliminary function decl support

Problem: __FUNCTION__ etc don't work anymore, due to lexer/parser
interdependency.


# 1ee3277a 14-Jul-2014 Nikita Popov <nikic@php.net>

Port parameter defs

Has one bug re \self


# bcc67778 14-Jul-2014 Dmitry Stogov <dmitry@zend.com>

Fixed ZTS build


# af7cb169 14-Jul-2014 Dmitry Stogov <dmitry@zend.com>

Implemented builtin instruction for strlen()


# 42c4bcae 14-Jul-2014 Dmitry Stogov <dmitry@zend.com>

Fixed ZTS build


# 7dfb4f6b 14-Jul-2014 Dmitry Stogov <dmitry@zend.com>

Implemented builtin instruction for type check functions - is_*()


# 47f0717a 13-Jul-2014 Nikita Popov <nikic@php.net>

Rename params -> args


# 484ad869 12-Jul-2014 Nikita Popov <nikic@php.net>

Moar removal


# f9ed8346 12-Jul-2014 Nikita Popov <nikic@php.net>

Remove more dead code


# b934dfe0 12-Jul-2014 Nikita Popov <nikic@php.net>

Remove dead code


# 856e2a05 12-Jul-2014 Nikita Popov <nikic@php.net>

Fix + improve try/catch


# 069da161 12-Jul-2014 Nikita Popov <nikic@php.net>

approx correct linenos in errors


# c58079b4 12-Jul-2014 Nikita Popov <nikic@php.net>

Port static vars

Need to figure out the constant expr stuff


# 86a1cd0d 12-Jul-2014 Nikita Popov <nikic@php.net>

Verious fixes


# 8577f58e 12-Jul-2014 Nikita Popov <nikic@php.net>

Store (bad) estimate of lineno with ast

Currently not used yet


# e367e681 12-Jul-2014 Nikita Popov <nikic@php.net>

Port try/catch

Down to 50 failing Zend tests


# 6c8db864 11-Jul-2014 Dmitry Stogov <dmitry@zend.com>

Implemented builtin instruction for strlen()


# 32ca08f2 11-Jul-2014 Nikita Popov <nikic@php.net>

Fix leak


# dde9faee 11-Jul-2014 Nikita Popov <nikic@php.net>

Port switch


# f12c1482 10-Jul-2014 Nikita Popov <nikic@php.net>

Port foreach


# de306e70 10-Jul-2014 Dmitry Stogov <dmitry@zend.com>

Implement call_user_func() and call_user_func_array() using special opcodes.
In some rare cases it leads to insignificant changes in error messages.


# 42159699 10-Jul-2014 Nikita Popov <nikic@php.net>

Port if (partial)


# 3be63fca 10-Jul-2014 Nikita Popov <nikic@php.net>

Port for


# 1738ee7e 10-Jul-2014 Nikita Popov <nikic@php.net>

Port do/while


# c7656c06 10-Jul-2014 Nikita Popov <nikic@php.net>

Port while

Note: From here on everything is broken


# 68777b72 09-Jul-2014 Nikita Popov <nikic@php.net>

Expr stmts go through ast


# 1de1bc96 09-Jul-2014 Nikita Popov <nikic@php.net>

Make statement asty


# 117714d1 09-Jul-2014 Nikita Popov <nikic@php.net>

Port goto label


# d14b763b 09-Jul-2014 Nikita Popov <nikic@php.net>

Make unticked_statement an ast node (usually NULL)


# fc541418 09-Jul-2014 Nikita Popov <nikic@php.net>

Port goto


# cc8a6fa9 09-Jul-2014 Nikita Popov <nikic@php.net>

Port break/continue


# 5bf0c28f 09-Jul-2014 Nikita Popov <nikic@php.net>

Port throw


# b36aaea6 07-Jul-2014 Dmitry Stogov <dmitry@zend.com>

ZEND_SEND_VAR and ZEND_SEND_VAL specialization


# 28926540 07-Jul-2014 Nikita Popov <nikic@php.net>

Port echo


# 36c3cf31 07-Jul-2014 Nikita Popov <nikic@php.net>

Port return statement


# 2d4c962c 05-Jul-2014 Nikita Popov <nikic@php.net>

Fix ZTS build


# 77fddc0c 04-Jul-2014 Nikita Popov <nikic@php.net>

Use zend_string* in some places


# 17c2d16d 04-Jul-2014 Nikita Popov <nikic@php.net>

Refactor class name resolution as well


# b3336270 04-Jul-2014 Nikita Popov <nikic@php.net>

Hack around global leak for now


# 1d1226af 01-Jul-2014 Xinchen Hui <laruence@php.net>

Suppress warning "cast from pointer to integer of different size"


# b7715c7e 30-Jun-2014 Dmitry Stogov <dmitry@zend.com>

Refactored parameter passing mechanism.

In PHP-5.6 and below each argument passed to user function was copies on VM stack twice.
Now we always have ZEND_INIT_FCALL (or simular) opcode that pushes "call frame" on top of VM stack.
"Call frame" is actually the same zend_execute_data structure.
All the following ZEND_SEND instructions push arguments on top of the stack in a way that they directly comes into corresponding CV variables of the called frame. Extra arguments are copied at the end of stack frame (after all CV and TMP variables) on function enterance.

There are two minor incompatibilities:
1) It's not allowed to decalre functions redefining arguments e.g. "function foo($a,$a) {}".
2) func_get_arg() and func_get args() return the current value of argument and not the original value that was sent.


# 45082daa 30-Jun-2014 Dmitry Stogov <dmitry@zend.com>

Prohibited parameter redefinition


# 3f0ee308 30-Jun-2014 Dmitry Stogov <dmitry@zend.com>

Fixed support for extra arguments in conjunction with variadiv argument.
Use compile time flags to check if we call constructor and result of ZEND_NEW is used or not.


# fb98dd31 28-Jun-2014 Nikita Popov <nikic@php.net>

Some refactoring of fn/const resolution


# e1981325 28-Jun-2014 Nikita Popov <nikic@php.net>

Drop addition of weird \ prefix for FQ consts

Also fixes a resolution bug


# 111ad71d 28-Jun-2014 Nikita Popov <nikic@php.net>

Rename ZEND_CONST to ZEND_AST_ZVAL


# 64dab4b9 26-Jun-2014 Nikita Popov <nikic@php.net>

Drop dead code


# 0e44f4c5 26-Jun-2014 Nikita Popov <nikic@php.net>

Remove obseleted grammar productions


# dd60c8e0 26-Jun-2014 Nikita Popov <nikic@php.net>

Reuse expr for static_scalar


# c6978139 26-Jun-2014 Dmitry Stogov <dmitry@zend.com>

Refactoring: merge call_frame and end_execute_data into single data structure. Keep only single copy of each argument on VM stack (previously ZE kept two copies of each arguments for user functions)


# dd60b9bb 26-Jun-2014 Nikita Popov <nikic@php.net>

Handle ::class in const expr via ast as well


# 080e8bff 26-Jun-2014 Nikita Popov <nikic@php.net>

Compile const refs to CONST


# b83c7041 26-Jun-2014 Nikita Popov <nikic@php.net>

Compile class const refs to CONST zval


# 08c4e01a 26-Jun-2014 Nikita Popov <nikic@php.net>

Add compilation state for static scalars


# 1b84b87e 25-Jun-2014 Nikita Popov <nikic@php.net>

Const eval unary pm (as previously)


# 43477bc7 23-Jun-2014 Dmitry Stogov <dmitry@zend.com>

Refactoring: use call_frames instead of call_slots


# e26c6d66 23-Jun-2014 Nikita Popov <nikic@php.net>

Implement constant expression folding as a separate pass


# 0644fbcc 22-Jun-2014 Nikita Popov <nikic@php.net>

Implement CT eval of binary expressions

I totally hate this approach. It's ugly and I don't think I can
share code with the static scalar evaluation. Maybe I should use
the approach that static scalars use instead?


# 90d36554 21-Jun-2014 Nikita Popov <nikic@php.net>

Support string interpolation


# b6789b1d 21-Jun-2014 Nikita Popov <nikic@php.net>

zend_ast_dynamic_ast returns new node


# 86db3942 21-Jun-2014 Nikita Popov <nikic@php.net>

Remove dead code


# 657762ee 19-Jun-2014 Nikita Popov <nikic@php.net>

AST stage 2.4


# 0c81b3ea 14-Jun-2014 Nikita Popov <nikic@php.net>

Remove dead code


# 0ec49bba 14-Jun-2014 Nikita Popov <nikic@php.net>

AST stage 1.9

Expressions (mostly) use the AST


# e1b18e59 17-Jun-2014 Dmitry Stogov <dmitry@zend.com>

Use arena allocator for zend_class_entry, zend_op_array and zend_property_info that live till the end of request


# a8e63d2b 16-Jun-2014 Dmitry Stogov <dmitry@zend.com>

Fixed support for constants inherited from interfaces


# 909acec2 16-Jun-2014 Dmitry Stogov <dmitry@zend.com>

Avoid useles constants update


# bd10db27 16-Jun-2014 Dmitry Stogov <dmitry@zend.com>

Use new zend_hash iteration API


# 0a3979e0 16-Jun-2014 Bob Weinand <bobwei9@hotmail.com>

Fix patch for bug #67436


# ca29063d 15-Jun-2014 Bob Weinand <bobwei9@hotmail.com>

Fix bug #67436


# 258a733e 07-Jun-2014 Nikita Popov <nikic@php.net>

AST-based compiler: Stage 1


# 592c8a04 10-Jun-2014 Dmitry Stogov <dmitry@zend.com>

Improved conditions order


# 98918fe6 06-Jun-2014 Nikita Popov <nikic@php.net>

Remove (&ast->u.child)[i] weirdness


# e499c3d2 06-Jun-2014 Dmitry Stogov <dmitry@zend.com>

Introduced new BIND_GLOBAL instraction instead of FETCH_W+ASSIGN_REF pair that caused a lot of useles checks


# c1965f58 05-Jun-2014 Dmitry Stogov <dmitry@zend.com>

Use reference counting instead of zval duplication


# 3f6f0d5a 03-Jun-2014 Dmitry Stogov <dmitry@zend.com>

Simplified and optimized ZEND_HANDLE_NUMERIC()


# 5c2120b6 31-May-2014 Nikita Popov <nikic@php.net>

Forbid writing to temporary expressions


# c53a7ea4 31-May-2014 Nikita Popov <nikic@php.net>

Property handle calls on [] and '' consts/tmps


# 8a65c3b2 31-May-2014 Nikita Popov <nikic@php.net>

Remove now unnecessary code in begin_method_call


# fcf42d81 31-May-2014 Nikita Popov <nikic@php.net>

Remove object_stack (mostly)


# 87f8e758 30-May-2014 Nikita Popov <nikic@php.net>

Cleanup old grammar rules


# a8c15950 30-May-2014 Nikita Popov <nikic@php.net>

LTR static member access


# 95a3a126 30-May-2014 Nikita Popov <nikic@php.net>

Change precedence of $ operator

$$foo['bar'] is now interpreted as ${$foo}['bar'] rather than
${$foo['bar']}.


# 9f70b2f6 30-May-2014 Xinchen Hui <laruence@php.net>

typo


# b3b616cf 29-May-2014 Dmitry Stogov <dmitry@zend.com>

Introduced immutable arrays. They don't need to be copyed and may be used directly from SHM.


# 05d0df47 26-May-2014 Dmitry Stogov <dmitry@zend.com>

Use new zend_hash API


# 922285ec 26-May-2014 Xinchen Hui <laruence@php.net>

Don't use cast (compiler friendly)


# bc357eaf 25-May-2014 Xinchen Hui <laruence@php.net>

Fixed apply_func_args_t


# 0175d994 25-May-2014 Xinchen Hui <laruence@php.net>

Fixed apply_func_arg_t, and it's better not using cast (compiler friendly)


# 9eb89ddd 23-May-2014 Dmitry Stogov <dmitry@zend.com>

Use optimized zend_array_dup() function. convert zend_hash_num_elements() and zend_hash_next_free_element() into macros.


# 0c6a6f0f 07-May-2014 Dmitry Stogov <dmitry@zend.com>

Re-applyed Bob's patch with minor fixes


# 4ecc5279 06-May-2014 Dmitry Stogov <dmitry@zend.com>

Reverted Bob's patch (it breaks many tests when run with opcache and needs to be fixed first).


# f3c1881f 06-May-2014 Bob Weinand <bobwei9@hotmail.com>

Re-added fix for bug #66015 and adapted for phpng branch


# 0ebf0c02 06-May-2014 Hannes Magnusson <bjori@mongodb.com>

Fix argument, cur_method_ref->class_name is a zend_string


# e0247de1 30-Apr-2014 Nikita Popov <nikic@php.net>

zend_stack_top() now returns pointer directly


# 5a03efe2 30-Apr-2014 Nikita Popov <nikic@php.net>

Don't allocate zend_stack elements individually

Instead allocate a vector of elements. Size must now be specified
on initialization rather than on push.


# 17d027ed 30-Apr-2014 Dmitry Stogov <dmitry@zend.com>

Split IS_BOOL into IS_FALSE and IS_TRUE


# 7e424f5a 22-Apr-2014 Dmitry Stogov <dmitry@zend.com>

Use symbolic names instead of magic constants + optimization


# 9c70603f 22-Apr-2014 Nikita Popov <nikic@php.net>

Initialize hash as unpacked if it contains string keys


# 3d3a55cb 22-Apr-2014 Nikita Popov <nikic@php.net>

Pass expected array size hint in INIT_ARRAY

To avoid unnecessary rehashes


# 7584ae32 22-Apr-2014 Dmitry Stogov <dmitry@zend.com>

Fixed compilaation warnings


# 0d43a277 21-Apr-2014 Nikita Popov <nikic@php.net>

Use zval_get_string in a few more places


# 72c287bd 21-Apr-2014 Dmitry Stogov <dmitry@zend.com>

Combine HashTable.flags and HashTable.nApplyCount into single 32-bit word


# 7652a977 18-Apr-2014 Dmitry Stogov <dmitry@zend.com>

Use ZEND_FETCH_FOREACH_* macros to iterate over HashTables instead of zend_hash_move_forward() and family.


# e96073b1 17-Apr-2014 Dmitry Stogov <dmitry@zend.com>

Moved zend_literal->cache_slot right into zval.
It should be accessed using Z_CACHE_SLOT() macro.
zend_literal structure is removed.
API functions that accepted pointer to zend_literal now accept pointer to zval or cache_slot directly.
Calls of such functiond that now accept cache_slot need to be changed to pass -1 instead of NULL.


# f98937fa 16-Apr-2014 Nikita Popov <nikic@php.net>

Don't copy in ZEND_CAST if type is already correct


# 050d7e38 15-Apr-2014 Dmitry Stogov <dmitry@zend.com>

Cleanup (1-st round)


# cc50ebc4 14-Apr-2014 Dmitry Stogov <dmitry@zend.com>

Fixed memory leak


# 5dc52e48 14-Apr-2014 Dmitry Stogov <dmitry@zend.com>

Fixed interface constants inheritance.
Now we use IS_REFERENCE for inhereted class constants.
I might miss some edje cases.


# 35b895fd 11-Apr-2014 Bob Weinand <bobwei9@hotmail.com>

Removed useless void* parameter and replaced with zend_bool on zval_update_constant* functions


# 13f0c8b1 11-Apr-2014 Dmitry Stogov <dmitry@zend.com>

Fixed double free


# f614fc68 11-Apr-2014 Bob Weinand <bobwei9@hotmail.com>

Fix bug #66015 by reverting "Removed operations on constant arrays."


# 91ed685e 10-Apr-2014 Dmitry Stogov <dmitry@zend.com>

Close all files and resources before before destroying object storage, because resources may point to objects. (THIS CHANGE MAY BE DANGEROUS)


# f449b047 10-Apr-2014 Nikita Popov <nikic@php.net>

Fix some ZTS issues and leaks


# 3ce96eab 09-Apr-2014 Nikita Popov <nikic@php.net>

Fix function copying in ZTS

Still doesn't entirely work :/


# 20f2e598 09-Apr-2014 Nikita Popov <nikic@php.net>

Fix ZTS build

This only makes it compile, it doesn't actually work, presumably
because interned strings are assumed in some places.


# eaeb3c39 04-Apr-2014 Dmitry Stogov <dmitry@zend.com>

Optimized RECV_* opcodes


# 3bc8810b 03-Apr-2014 Dmitry Stogov <dmitry@zend.com>

Constant duplication optimization
Argument receiving optimization


# 76cc99fe 03-Apr-2014 Dmitry Stogov <dmitry@zend.com>

Refactored ZVAL flags usage to simplify various checks (e.g. Z_REFCOUNTED(), candidate for GC, etc)


# d8099d04 02-Apr-2014 Dmitry Stogov <dmitry@zend.com>

Changed data layout to allow more efficient operations


# 042c937f 01-Apr-2014 Dmitry Stogov <dmitry@zend.com>

Use STR_COPY() instead of STR_DUP() where possible


# 015e5dc4 01-Apr-2014 Dmitry Stogov <dmitry@zend.com>

In case the string can't be interned it must not be released


# 9b196ca6 01-Apr-2014 Dmitry Stogov <dmitry@zend.com>

Added check for interned strings


# 47fdb9ea 31-Mar-2014 Dmitry Stogov <dmitry@zend.com>

fixed craches at request shutdown and memory leaks


# 9a8fbdf2 27-Mar-2014 Dmitry Stogov <dmitry@zend.com>

Use CV variable offset instead of CV variable number


# 25d55d16 13-Mar-2014 Dmitry Stogov <dmitry@zend.com>

Fixed foreach (now we store HashPointer in additional IS_TMP_VAR slot(s))


# 37337373 05-Mar-2014 Dmitry Stogov <dmitry@zend.com>

Handle interned strings as non-refcounted scalars


# 04d04d01 28-Feb-2014 Dmitry Stogov <dmitry@zend.com>

Fixed memory leak


# 54095e8c 28-Feb-2014 Dmitry Stogov <dmitry@zend.com>

Converting from reference to regular value


# cb181c51 27-Feb-2014 Dmitry Stogov <dmitry@zend.com>

I don't know how to fix it


# 3810b4ab 27-Feb-2014 Dmitry Stogov <dmitry@zend.com>

Fixed constant expressions in array indeces handling


# d3b484df 26-Feb-2014 Nikita Popov <nikic@php.net>

Disallow use of positional args after unpacking

This commit disallows the use of trailing positional arguments
after argument unpacking was used. The following calls are no
longer valid:

fn(...$array, $var);
fn(...$array1, $var, ...$array2);

However, all of the following continue to be valid:

fn($var, ...$array);
fn(...$array1, ...$array2);
fn($var, ...$array1, ...$array2);

The reason behind this change is a stack allocation issue pointed
out by Dmitry: As of PHP 5.5 the stack necessary for pushing
arguments is precomputed and preallocated, as such the individual
SEND opcodes no longer verify that there is enough stack space.
The unpacked arguments will occupy some of that preallocated
space and as such following positional arguments could write past
a stack page boundary.

An alternative resolution for this issue is to ensure that there
is enough space for the remaining arguments in the UNPACK opcode.
However making this allocation precise (rather than using a
conversative over-estimate) would require some effort. Given that
this particular aspect of the feature wasn't very popular in the
first place, it doesn't seem worth the effort.


# 2eae1879 25-Feb-2014 Nikita Popov <nikic@php.net>

Store arg_num in fcall entry

Instead of storing the argument number in the znode of the parameter
list, store it in fcall->arg_num. This mainly cleans up the parameter
parsing code, which previously had to duplicate all rules (this
becomes more excessive as more features are added, e.g. named params
would already require a minimum of 14 rules...)


# cefa7f8d 25-Feb-2014 Nikita Popov <nikic@php.net>

Introduce zend_function_call_entry structure

Instead of directly pushing the zend_function* onto the
function_call_stack, push this structure. This allows us to store
additional data on this stack.


# 60eadc80 26-Feb-2014 Dmitry Stogov <dmitry@zend.com>

Fixed return anf yield by reference


# e4b58488 25-Feb-2014 Dmitry Stogov <dmitry@zend.com>

Fixed handling of "static" variables


# ff162410 24-Feb-2014 Dmitry Stogov <dmitry@zend.com>

Fixed traits support


# 595fc4d9 24-Feb-2014 Dmitry Stogov <dmitry@zend.com>

More constant related fixes


# f4c2810a 24-Feb-2014 Dmitry Stogov <dmitry@zend.com>

fixed support for constant expressions


# 62e7ac77 24-Feb-2014 Dmitry Stogov <dmitry@zend.com>

Fixed arg_info[].class_name destruction


# d149228b 21-Feb-2014 Dmitry Stogov <dmitry@zend.com>

Use better data structures (incomplete)


# 52bd62ec 21-Feb-2014 Dmitry Stogov <dmitry@zend.com>

Fixed assertions


# 47fb1985 21-Feb-2014 Xinchen Hui <laruence@gmail.com>

Revert "Use zend_string for arg_info to fixed segfault in Zend/tests/argument_restriction_003.phpt"

This reverts commit b96318105b8a908ec3cb294b8133e36d1b8cba7a.


# 686ea7f2 21-Feb-2014 Dmitry Stogov <dmitry@zend.com>

Fixed compound name resolution


# b9631810 21-Feb-2014 Xinchen Hui <laruence@gmail.com>

Use zend_string for arg_info to fixed segfault in Zend/tests/argument_restriction_003.phpt


# 25490102 21-Feb-2014 Dmitry Stogov <dmitry@zend.com>

Fixed error messages


# b2e7b890 21-Feb-2014 Dmitry Stogov <dmitry@zend.com>

Fix non-zero terminated strings


# 0907a1b3 21-Feb-2014 Dmitry Stogov <dmitry@zend.com>

Fixed error messages


# 0fc85fbd 21-Feb-2014 Dmitry Stogov <dmitry@zend.com>

Fixed error messages


# 47204c63 20-Feb-2014 Anatol Belski <ab@php.net>

some missing pieces for __debugInfo


# 8bae1daa 19-Feb-2014 Dmitry Stogov <dmitry@zend.com>

Use better data structures (incomplete)


# 9067dbcd 18-Feb-2014 Dmitry Stogov <dmitry@zend.com>

Use better data structures (incomplete)


# 557994d5 18-Feb-2014 Dmitry Stogov <dmitry@zend.com>

Use better data structures (incomplete)


# 5de71156 18-Feb-2014 Dmitry Stogov <dmitry@zend.com>

Use better data structures (incomplete; able to run bench.php)


# 1e752ce9 18-Feb-2014 Sara Golemon <pollita@php.net>

Add __debugInfo() magic method

class Foo {
private $val = 'Random, meaningless data';

public function count() { return 42; }

public function __debugInfo() {
return ['count' => $this->count()];
}
}

$f = new Foo;
var_dump($f);


# a0fe8e5a 17-Feb-2014 Dmitry Stogov <dmitry@zend.com>

Use better data structures (incomplete)


# 2b9b9afa 17-Feb-2014 Dmitry Stogov <dmitry@zend.com>

Use better data structures (incomplete)


# 0e425121 17-Feb-2014 Dmitry Stogov <dmitry@zend.com>

Use better data structures (incomplete)


# f4cfaf36 10-Feb-2014 Dmitry Stogov <dmitry@zend.com>

Use better data structures (incomplete)


# c5668d1f 03-Feb-2014 Anatol Belski <ab@php.net>

more cleanup for num args


# 6fb34345 03-Feb-2014 Anatol Belski <ab@php.net>

fix type for op num


# 2c47dfba 29-Aug-2013 Nikita Popov <nikic@php.net>

Implement argument unpacking

RFC: https://wiki.php.net/rfc/argument_unpacking


# c7bb2833 28-Aug-2013 Nikita Popov <nikic@php.net>

Minor cleanup in zend_do_pass_param()


# c081ce62 03-Jan-2014 Xinchen Hui <laruence@php.net>

Bump year


# 47c90277 03-Jan-2014 Xinchen Hui <laruence@php.net>

Bump year


# c0d060f5 03-Jan-2014 Xinchen Hui <laruence@php.net>

Bump year


# 03a37de9 26-Dec-2013 Dmitry Stogov <dmitry@zend.com>

Improved empty string handling. Now ZE uses an interned string instead of allocation new empty string each time. (Some extensions might need to be fixed using str_efree() instead of efree() to support interned strings).


# e11fbd97 22-Dec-2013 Anatol Belski <ab@php.net>

next wave of revamp in Zend


# f2fc9355 20-Dec-2013 Anatol Belski <ab@php.net>

next wave on semantical replacements long vs. int


# 61252782 19-Dec-2013 Anatol Belski <ab@php.net>

more semantical replacements LONG vs. INT


# f58d0b35 19-Dec-2013 Anatol Belski <ab@php.net>

massive update semantical LONG vs INT replacements


# b1abe4ca 18-Dec-2013 Anatol Belski <ab@php.net>

mass replacement for zend_size_t/php_size_t


# 170c4d1f 17-Dec-2013 Anatol Belski <ab@php.net>

Z_STRLEN vs Z_STRSIZE


# eeb37c40 17-Dec-2013 Xinchen Hui <laruence@php.net>

Save one char compare


# 49d7e980 10-Dec-2013 Dmitry Stogov <dmitry@zend.com>

Fixed memory leaks introdused by:
commit 611da37617749c81ab22b1e44a0cc1f294cc493a
Author: Igor Wiedler <igor@wiedler.ch>
Date: Sat Nov 9 13:48:23 2013 -0500


# 5a87b7ff 10-Dec-2013 Dmitry Stogov <dmitry@zend.com>

Fixed bug #66252 (Problems in AST evaluation invalidating valid parent:: reference. Constant expessions have to be evaluated in context of defining class).


# 757c93dd 09-Dec-2013 Anatol Belski <ab@php.net>

Z_STRLEN vs Z_STRSIZE after automerge


# 9589cae8 30-Nov-2013 Nikita Popov <nikic@php.net>

Fixed bug #66041: list() fails to unpack yielded ArrayAccess object

Yield return values now use IS_VAR rather than IS_TMP_VAR. This
fixes the issue with list() and should also be faster as it avoids
doing a zval copy.


# 43e3933f 27-Nov-2013 Dmitry Stogov <dmitry@zend.com>

Removed deprecated AI_SET_PTR()s


# 611da376 09-Nov-2013 Igor Wiedler <igor@wiedler.ch>

use ZVAL_ZVAL to init ZVAL from ZVAL


# cc049e64 09-Nov-2013 Adam Harvey <aharvey@php.net>

Only check user functions for filenames.


# da553a81 09-Nov-2013 Adam Harvey <aharvey@php.net>

Fix constant resolution.


# 95675dfb 09-Nov-2013 Adam Harvey <aharvey@php.net>

Remove now unused function_filenames struct.


# 1ea01f55 09-Nov-2013 Adam Harvey <aharvey@php.net>

Look in the function_table instead of function_filenames for actually declared
functions.


# 9711c58b 09-Nov-2013 Adam Harvey <aharvey@php.net>

Stop PHP from modifying the lowercase function name in place.


# 11d4bcd7 07-Nov-2013 Anatol Belski <ab@php.net>

remaining replacements ulong vs zend_uint_t


# 9647c61d 06-Nov-2013 Dmitry Stogov <dmitry@zend.com>

Constant expressions refactoring


# b45043a1 01-Nov-2013 Bob Weinand <bobwei9@hotmail.com>

converted several switches to ifs and made more opcache friendly


# 23617458 31-Oct-2013 Bob Weinand <bobwei9@hotmail.com>

Working commit for constant scalar expressions (with constants).
Tests will follow.


# 23390de0 26-Oct-2013 Anatol Belski <ab@php.net>

fix strlen macros


# 64caedd9 19-Oct-2013 Nikita Popov <nikic@php.net>

Use zend_error_noreturn for all E_COMPILE_ERRORs


# e30b2aae 17-Oct-2013 Anatol Belski <ab@php.net>

initial move on renaming files and fixing includes


# 4c0bb6d7 16-Oct-2013 bwoebi <bobwei9@hotmail.com>

Fixed bug #65911 ($this not usable as static property)

In context of static accesses like classname::$this, the string
"$this" should not be handled like a $this variable, but as an
identifier for a static variable.


# 4e537ca4 16-Oct-2013 Anatol Belski <ab@php.net>

fix broken merge from master


# e6f90ecc 02-Jul-2013 Anthony Ferrara <ircmaxell@gmail.com>

It compiles. Sort-of. In a way. Yeah. But nothing works. Sigh


# c224e239 01-Jul-2013 Anthony Ferrara <ircmaxell@gmail.com>

Re-do a lot of it using a conditional define, and legacy type information for APIs


# 602fef0e 14-Oct-2013 Igor Wiedler <igor@wiedler.ch>

Clarify type of use in error messages


# 536260f2 04-Oct-2013 Nikita Popov <nikic@php.net>

Fix bug #65821: By-ref foreach on property access of string offset segfaults

This removes the now unnecessary ZEND_FETCH_ADD_LOCK on the
container of a property fetch of a by-reference foreach.


# 0ceea8a2 26-Sep-2013 Nikita Popov <nikic@php.net>

Don't track parameter number in separate znode

We already track it in the op array already.


# 0d7a6388 26-Sep-2013 Nikita Popov <nikic@php.net>

Implement variadic function syntax

As per RFC: https://wiki.php.net/rfc/variadics


# 98e4ecb6 19-Sep-2013 Michael Wallner <mike@php.net>

fix Zend/tests/ns_040.phpt failing

It was wrongly assumed the namespace has to be looked up in a case
sensitive manner too. Fixed the lookup to use a lower case
represenation of the import name.


# 91a9569d 13-Sep-2013 Nikita Popov <nikic@php.net>

Fix two warnings


# 96b1c214 13-Sep-2013 Nikita Popov <nikic@php.net>

Provide more macros for handling of interned strings

* str_erealloc behaves like erealloc for normal strings, but will
use emalloc+memcpy for interned strings.
* str_estrndup behaves like estrndup for normal strings, but will
not copy interned strings.
* str_strndup behaves like zend_strndup for normal strings, but
will not copy interned strings.
* str_efree_rel behaves like efree_rel for normal strings, but
will not free interned strings.
* str_hash will return INTERNED_HASH for interned strings and
compute it using zend_hash_func for normal strings.


# 00799319 13-Sep-2013 Nikita Popov <nikic@php.net>

Make consistent use of Z_*VAL macros in compiler


# ef9e003b 12-Sep-2013 Nikita Popov <nikic@php.net>

Small cleanup in class name resolution of compiler

* The fetch_type and check_ns_name parameters of
zend_resolve_class_name were unused and are now removed.
* ZEND_FETCH_CLASS_GLOBAL is no longer used (no code actually
checking for it).
* The checks for usage of "namespace" as class name were
unnecessary as that situation can't occur anyways.


# 612e77e5 30-Aug-2013 Anthony Ferrara <ircmaxell@gmail.com>

Fix issue with global fallback not in global space


# 6263f221 25-Aug-2013 Igor Wiedler <igor@wiedler.ch>

Handle case sensivity of constants (nikic)


# 28fa0896 25-Aug-2013 Igor Wiedler <igor@wiedler.ch>

Comment nitpick (nikic)


# 84c8aa36 25-Aug-2013 Igor Wiedler <igor@wiedler.ch>

self and parent are valid function and const names (nikic)


# 115c5ec7 24-Aug-2013 Igor Wiedler <igor@wiedler.ch>

Compile error on const definition conflicting with import


# 85d4cfb0 24-Aug-2013 Igor Wiedler <igor@wiedler.ch>

Disallow using functions/consts defined in the same file

* Keep track of defined function and const filenames
* Prohibit use function foo if function foo exists
* Prohibit use const foo if const foo exists


# 30f16c35 23-Aug-2013 Igor Wiedler <igor@wiedler.ch>

Compile error on function definition conflicting with import


# 6b385ebc 22-Aug-2013 Danack <Danack@basereality.com>

Removed assumption that \\ will be present

The function zend_add_ns_func_name_literal is called if the parser finds a function that is not in the global or current namespace. It assumes such a function will have a \\ in it, which is no longer true with the use function patch. The code change above removes that assumption and makes the test work:
PASS use and use function with the same alias [Zend/tests/use_function/conflicting_use_alias.phpt]


# 4adf49ee 23-Jul-2013 Igor Wiedler <igor@wiedler.ch>

Import namespaced constants via new 'use const' sequence


# e1125a6a 23-Jul-2013 Igor Wiedler <igor@wiedler.ch>

Correctly distinguish between functions and constants

So far 'use function' applied to both constants and functions. This
patch correctly separates the two.


# 5dd41627 16-Jul-2013 Igor Wiedler <igor@wiedler.ch>

Add new 'use function' sequence for importing namespaced functions

This is specified as the use_function RFC:

* https://wiki.php.net/rfc/use_function


# 8d86597d 23-Jul-2013 Veres Lajos <vlajos@gmail.com>

non living code related typo fixes


# e9a95d78 13-Jul-2013 Veres Lajos <vlajos@gmail.com>

typo fixes


# 1b06e0be 13-Jul-2013 Veres Lajos <vlajos@gmail.com>

typo fixes


# 72085b0e 13-Jul-2013 Veres Lajos <vlajos@gmail.com>

typo fixes


# 6e008d40 02-Jul-2013 Anthony Ferrara <ircmaxell@gmail.com>

It compiles. Sort-of. In a way. Yeah. But nothing works. Sigh


# ea58b542 01-Jul-2013 Anthony Ferrara <ircmaxell@gmail.com>

Re-do a lot of it using a conditional define, and legacy type information for APIs


# 02e4d7a2 10-Jun-2013 Stanislav Malyshev <stas@php.net>

Merge branch 'pull-request/341'

* pull-request/341: (23 commits)
typofixes


# ac40c0b5 10-Jun-2013 Stanislav Malyshev <stas@php.net>

Merge branch 'pull-request/341'

* pull-request/341: (23 commits)
typofixes


# d8792d87 10-Jun-2013 Xinchen Hui <laruence@php.net>

Fixed bug #64988 (Class loading order affects E_STRICT warning)


# 13e5c97f 29-May-2013 Dmitry Stogov <dmitry@zend.com>

Fixed incorrect argument number


# 9155d17f 04-May-2013 Xinchen Hui <laruence@php.net>

Fix #64749 (warning: cast from pointer to integer of different size)


# 6ed16753 20-Apr-2013 Xinchen Hui <laruence@php.net>

Fixed bug #64677 (execution operator `` stealing surrounding arguments)


# 85e5e607 27-Mar-2013 Dmitry Stogov <dmitry@zend.com>

Fixed bug #64529 (Ran out of opcode space)


# e62bb032 18-Mar-2013 Dmitry Stogov <dmitry@zend.com>

Fixed bug #64417 (ArrayAccess::&offsetGet() in a trait causes fatal error)


# 01049ca7 08-Mar-2013 Xinchen Hui <laruence@php.net>

Fixed bug #61025 (__invoke() visibility not honored)


# 9a44a980 21-Feb-2013 Xinchen Hui <laruence@php.net>

Fixed bug #64235 (Insteadof not work for class method in 5.4.11)

As we discussed with stefan, we think previous of allowing use with
classes is a bug, should be forbided, anyway, the error message should
be improved.


# 42437dd8 18-Feb-2013 Dmitry Stogov <dmitry@zend.com>

Fixed bug #64070 (Inheritance with Traits failed with error)


# 184db665 28-Jan-2013 Stanislav Malyshev <stas@php.net>

fix bug #60833 - self, parent, static behave inconsistently case-sensitive


# e23fca89 19-Jan-2013 Felipe Pena <felipensp@gmail.com>

- Fixed ZTS build


# 8991ed01 19-Jan-2013 Lars Strojny <lstrojny@php.net>

Class Name Resolution As Scalar Via "class" Keyword


# be07f815 14-Jan-2013 Xinchen Hui <laruence@php.net>

Use zend_unmangle_property_name_ex to save strlen


# 62059c16 14-Jan-2013 Xinchen Hui <laruence@php.net>

Fixed bug #63980 (object members get trimmed by zero bytes)


# d4650c5d 09-Jan-2013 Dmitry Stogov <dmitry@zend.com>

Fixed compilator bug that might cause jump depended on unitialized value


# c3e6de22 04-Jan-2013 Xinchen Hui <laruence@php.net>

Fixed bug #63899 (Use after scope error in zend_compile)


# a666285b 01-Jan-2013 Xinchen Hui <laruence@php.net>

Happy New Year


# 0a7395e0 01-Jan-2013 Xinchen Hui <laruence@php.net>

Happy New Year


# 831fbcf3 01-Jan-2013 Xinchen Hui <laruence@php.net>

Happy New Year


# 7e262963 25-Dec-2012 Dmitry Stogov <dmitry@zend.com>

spelling


# f0b459b7 25-Dec-2012 Dmitry Stogov <dmitry@zend.com>

Fixed ZTS build


# bc0425c0 25-Dec-2012 Dmitry Stogov <dmitry@zend.com>

Removed deprecated fields


# 3f8c729e 25-Dec-2012 Dmitry Stogov <dmitry@zend.com>

Traits refactoring


# d53f1bf8 18-Dec-2012 Nikita Popov <nikic@php.net>

Fix leak when generator ignores sent value

When the return value of yield wasn't used it was leaked.

This is fixed by using a TMP_VAR return value instead of VAR. TMP_VARs are
automatically freed when they aren't used.


# 6b0b4bf8 12-Dec-2012 Dmitry Stogov <dmitry@zend.com>

An exception thrown in try or catch block is disacarded by return statement in finally block.


# 3d86e6d8 10-Dec-2012 Xinchen Hui <laruence@php.net>

Fixed bug #63726 (Memleak with static properties and internal/user classes)

No test scripts provided (will try to find one)


# 7651d645 04-Dec-2012 Dmitry Stogov <dmitry@zend.com>

Optimized access to temporary and compiled VM variables


# 70f83f35 30-Nov-2012 Dmitry Stogov <dmitry@zend.com>

. The VM stacks for passing function arguments and syntaticaly nested calls were merged into a single stack. The stack size needed for op_array execution is calculated at compile time and preallocated at once. As result all the stack push operatins don't require checks for stack overflow any more.
. Generators implementation was improved using the new VM stack. Now it's a bit more clear and faster.


# eb4825b5 22-Nov-2012 Dmitry Stogov <dmitry@zend.com>

Improved "finally" im[plementation


# 65585b3a 14-Nov-2012 Dmitry Stogov <dmitry@zend.com>

Fixed compiler reenterability


# 74228c51 23-Oct-2012 Xinchen Hui <laruence@php.net>

Fixed bug #63305 (zend_mm_heap corrupted with traits)


# 67611c67 08-Oct-2012 Xinchen Hui <laruence@php.net>

Fixed bug #63219 (Segfault when aliasing trait method when autoloader throws excpetion)


# 6c0508f8 05-Sep-2012 Dmitry Stogov <dmitry@zend.com>

Fixed bug #62907 (Double free when use traits)


# 6b1073a3 28-Aug-2012 Lars Strojny <lstrojny@php.net>

Bug #62956: fixing private method signature validation

In inheritance, if both methods are private, don not enforce the same
signature.


# f82dd2c7 28-Aug-2012 Lars Strojny <lstrojny@php.net>

Bug #62956: fixing private method signature validation

In inheritance, if both methods are private, don not enforce the same
signature.


# 5ebbdecf 26-Aug-2012 Xinchen Hui <laruence@php.net>

Fixed bug #62930, and more tests


# c6a5d192 25-Aug-2012 Xinchen Hui <laruence@php.net>

tabs


# 7c60aeef 26-Aug-2012 Xinchen Hui <laruence@php.net>

Fixed bug #62931 & #62932


# bd70d155 25-Aug-2012 Nikita Popov <nikic@php.net>

Remove implementation stubs for yield delegation

I decided to leave out yield delegation for an initial proposal, so remove
the stubs for it too.


# 35951d4b 25-Aug-2012 Xinchen Hui <laruence@php.net>

Support list in foreach

RFC: https://wiki.php.net/rfc/foreachlist


# 87785c7d 23-Aug-2012 Xinchen Hui <laruence@php.net>

tabs


# d39aa984 23-Aug-2012 Xinchen Hui <laruence@php.net>

Refix #62358, previous has side-affect


# 6d1bebfc 23-Aug-2012 Xinchen Hui <laruence@php.net>

Fixed bug #62358 (Segfault when using traits a lot)


# 60a29791 22-Aug-2012 Xinchen Hui <laruence@php.net>

Fixed bug that jmp in try block jmp over finally block

Refactor the implemention, make codes clear


# 703a4e39 22-Aug-2012 Xinchen Hui <laruence@php.net>

stash


# f2a8912e 17-Aug-2012 Xinchen Hui <laruence@php.net>

Refactor examing of jumping out of finally block


# 24493652 17-Aug-2012 Xinchen Hui <laruence@php.net>

Fixed context info in error message


# acd402d4 16-Aug-2012 Xinchen Hui <laruence@php.net>

typo


# 0312d0a2 16-Aug-2012 Xinchen Hui <laruence@php.net>

Prevents `goto` out of a finally block


# c64f4e73 14-Aug-2012 Xinchen Hui <laruence@php.net>

Add functions declarations, use tabs


# 80d5ae3c 13-Aug-2012 Xinchen Hui <laruence@php.net>

Implemented 'finally' keywords for php

RFC: https://wiki.php.net/rfc/finally
FR: https://bugs.php.net/bug.php?id=32100
and I have got some improvment ideas(performance), will implemented
later. thanks


# 13408937 22-Jul-2012 Nikita Popov <nikic@php.net>

Throw error also for return occuring before yield

Previously only an error was thrown when return occured after yield. Also
returns before the first yield would fail for by-ref generators.

Now the error message is handled in pass_two, so all returns are checked.


# de80e3ce 22-Jul-2012 Nikita Popov <nikic@php.net>

Remove reference restrictions from foreach

foreach only allowed variables to be traversed by reference. This never
really made sense because

a) Expressions like array(&$a, &$b) can be meaningfully iterated by-ref
b) Function calls can return by-ref (so they can also be meaningfully
iterated)
c) Iterators could at least in theory also be iterated by-ref (not
sure if any iterator makes use of this)

With by-ref generators the restriction makes even less sense, so I removed
it altogether.


# 80748631 21-Jul-2012 Nikita Popov <nikic@php.net>

Require parenthesis around yield expressions

If yield is used in an expression context parenthesis are now required.
This ensures that the code is unambiguos.

Yield statements can still be used without parenthesis (which should be
the most common case).

Also yield expressions without value can be used without parenthesis,
too (this should be the most common case for coroutines).

If the yield expression is used in a context where parenthesis are required
anyway, no additional parenthesis have to be inserted.

Examples:

// Statements don't need parenthesis
yield $foo;
yield $foo => $bar;

// Yield without value doesn't need parenthesis either
$data = yield;

// Parentheses don't have to be duplicated
foo(yield $bar);
if (yield $bar) { ... }

// But we have to use parentheses here
$foo = (yield $bar);

This commit also fixes an issue with by-ref passing of $foo[0] like
variables. They previously weren't properly fetched for write.

Additionally this fixes valgrind warnings which were caused by access to
uninitialized memory in zend_is_function_or_method_call().


# c9709bfb 19-Jul-2012 Nikita Popov <nikic@php.net>

Remove asterix modifier (*) for generators

Generators are now automatically detected by the presence of a `yield`
expression in their body.

This removes the ZEND_SUSPEND_AND_RETURN_GENERATOR opcode. Instead
additional checks for ZEND_ACC_GENERATOR are added to the fcall_common
helper and zend_call_function.

This also adds a new function zend_generator_create_zval, which handles
the actual creation of the generator zval from an op array.

I feel like I should deglobalize the zend_create_execute_data_from_op_array
code a bit. It currently changes EG(current_execute_data) and
EG(opline_ptr) which is somewhat confusing (given the name).


# 85f077ce 17-Jul-2012 Nikita Popov <nikic@php.net>

Add support by yielding by-reference


# 896ac689 11-Jun-2012 Marc Easen <marc@easen.co.uk>

Fixed the common misspelling of the word occurred (occured -> occurred)


# d939d2de 11-Jun-2012 Nikita Popov <nikic@php.net>

Add sceleton for yield* expression

This does not yet actually implement any delegation.


# d1debecd 08-Jun-2012 Stanislav Malyshev <stas@php.net>

typo


# ba8333cd 08-Jun-2012 Stanislav Malyshev <stas@php.net>

typo


# 17c0ff11 08-Jun-2012 Stanislav Malyshev <stas@php.net>

typo


# bc08c2cf 30-May-2012 Nikita Popov <nikic@php.net>

Add support for yielding keys

Keys are yielded using the

yield $key => $value

syntax. Currently this is implemented as a statement only and not as an
expression, because conflicts arise considering nesting and use in arrays:

yield yield $a => $b;
// could be either
yield (yield $a) => $b;
// or
yield (yield $a => $b);

Once I find some way to resolve these conflicts this should be available
as an expression too.

Also the key yielding code is rather copy-and-past-y for the value yielding
code, so that should be factored out.


# ad525c28 29-May-2012 Nikita Popov <nikic@php.net>

Allow to use yield without value

If the generator is used as a coroutine it often doesn't make sense to yield
anything. In this case one can simply receive values using

$value = yield;

The yield here will simply yield NULL.


# 3600914c 29-May-2012 Nikita Popov <nikic@php.net>

Add support for $generator->send()

Yield now is an expression and the return value is the value passed to
$generator->send(). By default (i.e. if ->next() is called) the value is
NULL.

Unlike in Python ->send() can be run without priming the generator with a
->next() call first.


# 5bb3a995 26-May-2012 Nikita Popov <nikic@php.net>

Implement return for generators

For generators ZEND_RETURN directly calls ZEND_VM_RETURN(), thus passing
execution back to the caller (zend_generator_resume).

This commit also adds a check that only return; is used in generators and
not return $value;.


# fafce586 26-May-2012 Nikita Popov <nikic@php.net>

Add YIELD opcode implementation


# bbcea230 21-May-2012 Xinchen Hui <laruence@php.net>

Use emalloc instead of malloc


# 2ae8d2fb 21-May-2012 Dmitry Stogov <dmitry@zend.com>

Fixed bug #61998 (Using traits with method aliases appears to result in crash during execution)


# 1cec3f12 19-May-2012 Nikita Popov <nikic@php.net>

Add ZEND_SUSPEND_AND_RETURN_GENERATOR opcode

If the function is a generator this opcode will be invoked right after
receiving the function arguments.

The current implementation is just a dummy.


# e14cfafc 19-May-2012 Nikita Popov <nikic@php.net>

Add zend_do_suspend_if_generator calls

The execution of generator functions will be suspended right after the
arguments were RECVed. This will be done in zend_do_suspend_if_generator.


# fd2a109f 19-May-2012 Nikita Popov <nikic@php.net>

Add error if yield is used outside a generator

The yield statement can only be used in generator functions, which are
marked with an asterix.


# 9b51a3b9 19-May-2012 Nikita Popov <nikic@php.net>

Minor code cleanup

The block for the foreach separator was nested unnecessary. This commit
simply removes that nesting.


# 252f6234 19-May-2012 Nikita Popov <nikic@php.net>

Add flag for generator functions

Generator functions have to specify the * (asterix) modifier after the
function keyword. If they do so the ZEND_ACC_GENERATOR flag is added to
the fn_flags.


# 9b101ac8 15-May-2012 Nikita Popov <nikic@php.net>

Add T_YIELD "yield" keyword


# ec061a93 12-Apr-2012 Nikita Popov <nikic@php.net>

Allow arbitrary expressions for empty()

This change is as per RFC https://wiki.php.net/rfc/empty_isset_exprs.

The change allows passing the result of function calls and other
expressions to the empty() language construct. This is accomplished by
simply rewriting empty(expr) to !expr.

The change does not affect the suppression of errors when using empty()
on variables. empty($undefinedVar) will continue not to throw errors.
When an expression is used inside empty() on the other hand, errors will
not be suppressed. Thus empty($undefinedVar + $somethingElse) *will*
throw a notice.

The change also does not make empty() into a real function, so using
'empty' as a callback is still not possible.

In addition to the empty() changes the commit adds nicer error messages
when isset() is used on function call results or other expressions.


# da6465a2 18-Apr-2012 Xinchen Hui <laruence@php.net>

Fixed bug #61761 ('Overriding' a private static method with a different signature causes crash)


# 4cf90e06 30-Mar-2012 Nikita Popov <nikic@php.net>

Fix lexing of nested heredoc strings in token_get_all()

This fixes bug #60097.

Before two global variables CG(heredoc) and CG(heredoc_len) were used to
track the current heredoc label. In order to support nested heredoc
strings the *previous* heredoc label was assigned as the token value of
T_START_HEREDOC and the language_parser.y assigned that to CG(heredoc).

This created a dependency of the lexer on the parser. Thus the
token_get_all() function, which accesses the lexer directly without
also running the parser, was not able to tokenize nested heredoc strings
(and leaked memory). Same applies for the source-code highlighting
functions.

The new approach is to maintain a heredoc_label_stack in the lexer, which
contains all active heredoc labels.

As it is no longer required, T_START_HEREDOC and T_END_HEREDOC now don't
carry a token value anymore.

In order to make the work with zend_ptr_stack in this context more
convenient I added a new function zend_ptr_stack_top(), which retrieves the
top element of the stack (similar to zend_stack_top()).


# 520d07d8 04-Mar-2012 Stefan Marr <gron@php.net>

Fixed Bug #61052 (Missing error check in trait 'insteadof' clause)


# ffded002 04-Mar-2012 Stefan Marr <gron@php.net>

Fixed Bug #61052 (Missing error check in trait 'insteadof' clause)


# 34fe6261 04-Mar-2012 Stefan Marr <gron@php.net>

Fixed Bug #60911 (Confusing error message when extending traits)


# 0ed3b004 04-Mar-2012 Stefan Marr <gron@php.net>

Fixed Bug #60911 (Confusing error message when extending traits)


# 60dfd64b 04-Mar-2012 Stefan Marr <gron@php.net>

Fixed Bug #60717 (Order of traits in use statement can cause a fatal error)
# Compatibility is now correctly checked in both directions.
# Introduced helper method for the test.


# 0bb85e4b 04-Mar-2012 Stefan Marr <gron@php.net>

Fixed Bug #60717 (Order of traits in use statement can cause a fatal error)
# Compatibility is now correctly checked in both directions.
# Introduced helper method for the test.


# 046e3e38 02-Mar-2012 Xinchen Hui <laruence@php.net>

MFH: Fixed bug #60573 (type hinting with "self" keyword causes weird errors)


# 3299a267 20-Jan-2012 Dmitry Stogov <dmitry@php.net>

Fixed Bug #60809 (TRAITS - PHPDoc Comment Style Bug)
Fixed some other traits related bugs (uninitialized variable, return => continue)
Removed some trait related redundant code and variables


# f9e6af5e 20-Jan-2012 Dmitry Stogov <dmitry@php.net>

Fixed Bug #60809 (TRAITS - PHPDoc Comment Style Bug)
Fixed some other traits related bugs (uninitialized variable, return => continue)
Removed some trait related redundant code and variables


# b515bfbd 17-Jan-2012 Dmitry Stogov <dmitry@php.net>

Improved traits implementation. Now to support __CLASS__ constant in traits php doesn't have to copy the complete compiled method, but can reuse the same code. The resolution of __CLASS__ constants in methods defined in traits are delayed till run-time. This approach also made possible to use __CLASS__ constant as default value for traits properties and method arguments.


# 032d140f 17-Jan-2012 Dmitry Stogov <dmitry@php.net>

Improved traits implementation. Now to support __CLASS__ constant in traits php doesn't have to copy the complete compiled method, but can reuse the same code. The resolution of __CLASS__ constants in methods defined in traits are delayed till run-time. This approach also made possible to use __CLASS__ constant as default value for traits properties and method arguments.


# d74a258f 16-Jan-2012 Xinchen Hui <laruence@php.net>

Fixed Bug #60573 (type hinting with "self" keyword causes weird errors)


# e4ca0ed0 01-Jan-2012 Felipe Pena <felipe@php.net>

- Year++


# 8775a375 01-Jan-2012 Felipe Pena <felipe@php.net>

- Year++


# 4e198252 01-Jan-2012 Felipe Pena <felipe@php.net>

- Year++


# a68e858d 28-Dec-2011 Dmitry Stogov <dmitry@php.net>

Fixed bug #60613 (Segmentation fault with $cls->{expr}() syntax)


# c0583851 28-Dec-2011 Dmitry Stogov <dmitry@php.net>

Fixed bug #60613 (Segmentation fault with $cls->{expr}() syntax)


# 84ce7904 28-Dec-2011 Xinchen Hui <laruence@php.net>

Fix #60613 (Segmentation fault with $cls->{expr}() syntax)
#now the behavior is like 5.3, a COMPILER_ERROR will be triggered


# 113c0a8c 28-Dec-2011 Xinchen Hui <laruence@php.net>

Fix #60613 (Segmentation fault with $cls->{expr}() syntax)
#now the behavior is like 5.3, a COMPILER_ERROR will be triggered


# 20e2db2c 27-Dec-2011 Xinchen Hui <laruence@php.net>

Fix bug #60611 (Segmentation fault with Cls::{expr}() syntax)


# 2f4875bf 27-Dec-2011 Xinchen Hui <laruence@php.net>

Fix bug #60611 (Segmentation fault with Cls::{expr}() syntax)


# c1d5a5d7 19-Dec-2011 Xinchen Hui <laruence@php.net>

Fixed bug #60558 (Invalid read and writes)
Re-Fixed bug #60536 (Traits Segfault)
#Thanks to tony2001, I found the previous fix -r321089 is actually not a correct one.
#The key problem there is because the traits didn't correct set the property_info.offset
#for private properties. so here come the new fix.


# 2f62602c 19-Dec-2011 Xinchen Hui <laruence@php.net>

Fixed bug #60558 (Invalid read and writes)
Re-Fixed bug #60536 (Traits Segfault)
#Thanks to tony2001, I found the previous fix -r321089 is actually not a correct one.
#The key problem there is because the traits didn't correct set the property_info.offset
#for private properties. so here come the new fix.


# f3900513 19-Dec-2011 Xinchen Hui <laruence@php.net>

Codes standard & Remove useless empty lines


# 1a4a527c 19-Dec-2011 Xinchen Hui <laruence@php.net>

Codes standard & Remove useless empty lines


# 525dd55e 17-Dec-2011 Stefan Marr <gron@php.net>

Fixed inconsistent and broken handling of private properties in traits.
# The handling of private properties in classes is now consistent with private properties in traits.
# Perviously, privates could cause strict warnings, are were not properly merged into the class when
# the parent class had a private property of the same name. Now, we introduce it without notice,
# since it is a new and independent property, just like in normal classes.
# This problem was diagnosed while working on Bug #60536.


# 3dc9f0ab 17-Dec-2011 Stefan Marr <gron@php.net>

Fixed inconsistent and broken handling of private properties in traits.
# The handling of private properties in classes is now consistent with private properties in traits.
# Perviously, privates could cause strict warnings, are were not properly merged into the class when
# the parent class had a private property of the same name. Now, we introduce it without notice,
# since it is a new and independent property, just like in normal classes.
# This problem was diagnosed while working on Bug #60536.


# 489b86ff 06-Dec-2011 Pierrick Charron <pierrick@php.net>

Coding standard


# 3f2bcb77 06-Dec-2011 Pierrick Charron <pierrick@php.net>

Coding standard


# d18a61ae 05-Dec-2011 Xinchen Hui <laruence@php.net>

Fix typo


# 59276173 05-Dec-2011 Xinchen Hui <laruence@php.net>

Fix typo


# 1d6c98a1 05-Dec-2011 Dmitry Stogov <dmitry@php.net>

Fixed bug #60444 (Segmentation fault with include & class extending)


# 30328dcb 05-Dec-2011 Dmitry Stogov <dmitry@php.net>

Fixed bug #60444 (Segmentation fault with include & class extending)


# db0888df 23-Nov-2011 Stefan Marr <gron@php.net>

Fixed Bug #60369 Crash with static property in trait


# 35d38e47 23-Nov-2011 Stefan Marr <gron@php.net>

Fixed Bug #60369 Crash with static property in trait


# 31ef5597 19-Nov-2011 Felipe Pena <felipe@php.net>

- Fixed bug #43200 (Interface implementation / inheritence not possible in abstract classes)


# 14b5e775 19-Nov-2011 Felipe Pena <felipe@php.net>

- Fixed bug #43200 (Interface implementation / inheritence not possible in abstract classes)


# bc810a44 19-Nov-2011 Felipe Pena <felipe@php.net>

- Fixed bug #43200 (Interface implementation / inheritence not possible in abstract classes)


# 420fbb82 18-Nov-2011 Felipe Pena <felipe@php.net>

- CS


# cc8573e7 18-Nov-2011 Felipe Pena <felipe@php.net>

- CS


# e150100f 18-Nov-2011 Stefan Marr <gron@php.net>

Fixes Bug #54441 (Handling of changing modifiers on a trait alias)
# this now results also in a compilation error, since it would open the door for inconsistencies, and violates the DRY principle.


# 76772dc2 18-Nov-2011 Stefan Marr <gron@php.net>

Fixes Bug #54441 (Handling of changing modifiers on a trait alias)
# this now results also in a compilation error, since it would open the door for inconsistencies, and violates the DRY principle.


# 2ba9ff7f 17-Nov-2011 Felipe Pena <felipe@php.net>

- Fix build


# c5ec9dd6 17-Nov-2011 Felipe Pena <felipe@php.net>

- Fix build


# 5ef2c328 17-Nov-2011 Stefan Marr <gron@php.net>

Fixed Bug #60165 (Aliasing unexisting trait should throw/trigger the exception/error)

- aliases that are not actually matching anything are treated as errors now. This
will make sure that all methods that are expected to be in a class are actually
there, or in case a trait changed for instance, that the code breaks already
on composition
- Precedence declarations are also checked to ensure that the method
which is supposed to take precedence actually exists, however,
the other traits mentioned in the declaration are not regarded.
We are more lenient here, since this avoids unnecessary fragility.
- fixed another seamingly unrelated test which broke in the progress
but wasn't clear before either.


# c5ba2296 17-Nov-2011 Stefan Marr <gron@php.net>

Fixed Bug #60165 (Aliasing unexisting trait should throw/trigger the exception/error)

- aliases that are not actually matching anything are treated as errors now. This
will make sure that all methods that are expected to be in a class are actually
there, or in case a trait changed for instance, that the code breaks already
on composition
- Precedence declarations are also checked to ensure that the method
which is supposed to take precedence actually exists, however,
the other traits mentioned in the declaration are not regarded.
We are more lenient here, since this avoids unnecessary fragility.
- fixed another seamingly unrelated test which broke in the progress
but wasn't clear before either.


# 7735ef1c 16-Nov-2011 Felipe Pena <felipe@php.net>

- Fixed bug #60099 (__halt_compiler() works in braced namespaces)


# caa863dc 16-Nov-2011 Felipe Pena <felipe@php.net>

- Fixed bug #60099 (__halt_compiler() works in braced namespaces)


# 3c7a573a 16-Nov-2011 Felipe Pena <felipe@php.net>

- Fixed bug #60099 (__halt_compiler() works in braced namespaces)


# 5745f953 05-Nov-2011 Stefan Marr <gron@php.net>

Fixed inconsistent whitespace.
# Belongs to svn rev. 318793.


# b632cd19 05-Nov-2011 Stefan Marr <gron@php.net>

Fixed inconsistent whitespace.
# Belongs to svn rev. 318793.


# 7334dfd7 05-Nov-2011 Stefan Marr <gron@php.net>

Fixed Bug #60217 (Requiring the same method from different traits)
- also added test to check for inconsistent abstract method definitions, they need to be compatible


# 12cf1b79 05-Nov-2011 Stefan Marr <gron@php.net>

Fixed Bug #60217 (Requiring the same method from different traits)
- also added test to check for inconsistent abstract method definitions, they need to be compatible


# fadba4d1 03-Nov-2011 Antony Dovgal <tony2001@php.net>

use jmp_addr only when it's initialized


# 36103d12 03-Nov-2011 Antony Dovgal <tony2001@php.net>

use jmp_addr only when it's initialized


# ed276758 02-Nov-2011 Antony Dovgal <tony2001@php.net>

fix folding, ws and cs


# 6acbe515 02-Nov-2011 Antony Dovgal <tony2001@php.net>

fix folding, ws and cs


# 8d520d62 02-Nov-2011 Antony Dovgal <tony2001@php.net>

initialize variable and fix segfaulting tests


# bff7cbc8 02-Nov-2011 Antony Dovgal <tony2001@php.net>

initialize variable and fix segfaulting tests


# 7cd55955 01-Nov-2011 Stefan Marr <gron@php.net>

Fixed Bug #60153 (Interface method prototypes not enforced when implementd via traits.)
# Moved the freeing of overriden functions to a point after the check.
# The new check comes after the normal inheritance check to give the first check
# the opportunity to abort with a more detailed error.
# Also fixed a small type in an unrelated test.


# 4591498d 01-Nov-2011 Stefan Marr <gron@php.net>

Fixed Bug #60153 (Interface method prototypes not enforced when implementd via traits.)
# Moved the freeing of overriden functions to a point after the check.
# The new check comes after the normal inheritance check to give the first check
# the opportunity to abort with a more detailed error.
# Also fixed a small type in an unrelated test.


# ce0ddd5a 01-Nov-2011 Stefan Marr <gron@php.net>

Added missing consistency check for abstract methods required by one trait and implemented by another.


# 9b0d73af 01-Nov-2011 Stefan Marr <gron@php.net>

Added missing consistency check for abstract methods required by one trait and implemented by another.


# 3b74bba7 01-Nov-2011 Stefan Marr <gron@php.net>

Fixed Bug #60145 (Usage of trait's use statement inside interfaces not properly checked.)


# b5f15ef5 01-Nov-2011 Stefan Marr <gron@php.net>

Fixed Bug #60145 (Usage of trait's use statement inside interfaces not properly checked.)


# 725af4c2 31-Oct-2011 Xinchen Hui <laruence@php.net>

Fixed bug #60174 (Notice when array in method prototype error)
this should also exists in ext/reflection. since the new warning of "array to string convert" is introduced in zend_make_printable_zval which is used in ext/reflection too


# 5921e73a 31-Oct-2011 Xinchen Hui <laruence@php.net>

Fixed bug #60174 (Notice when array in method prototype error)
this should also exists in ext/reflection. since the new warning of "array to string convert" is introduced in zend_make_printable_zval which is used in ext/reflection too


# ea5a61e3 18-Oct-2011 Arnaud Le Blanc <lbarnaud@php.net>

Improved ternary operator performance when returning arrays


# 07b7ba8b 18-Oct-2011 Arnaud Le Blanc <lbarnaud@php.net>

Improved ternary operator performance when returning arrays


# 05c5c895 16-Oct-2011 Stanislav Malyshev <stas@php.net>

Bug #55754 - Only variables should be passed by reference for ZEND_SEND_PREFER_REF params


# 70a6a67c 16-Oct-2011 Stanislav Malyshev <stas@php.net>

Bug #55754 - Only variables should be passed by reference for ZEND_SEND_PREFER_REF params


# 7e4b9800 09-Oct-2011 Stefan Marr <gron@php.net>

Fixed Bug #55554 (Legacy constructors not handled properly) [TRAITS] [DOC]
# The handling of legacy constructors defined by traits was corrected.
# They are now properly registered and used on instantiation.
# The situation for conflicting legacy and __construct constructors is
# mostly identical. If they are defined in the class, they override conflicts
# and do not collide. However, in case different styles are mixed, between
# class and trait definition, we assume a programmer's mistake and report
# a collision.
#
# BTW: +1 for all the fixed tests! `make test` is fun again.


# e14354af 09-Oct-2011 Stefan Marr <gron@php.net>

Fixed Bug #55554 (Legacy constructors not handled properly) [TRAITS] [DOC]
# The handling of legacy constructors defined by traits was corrected.
# They are now properly registered and used on instantiation.
# The situation for conflicting legacy and __construct constructors is
# mostly identical. If they are defined in the class, they override conflicts
# and do not collide. However, in case different styles are mixed, between
# class and trait definition, we assume a programmer's mistake and report
# a collision.
#
# BTW: +1 for all the fixed tests! `make test` is fun again.


# 9d30c489 08-Oct-2011 Stefan Marr <gron@php.net>

Use ZEND_ constants instead of plain strings for names of magic methods.
# No functional changes.


# 469fc0a3 08-Oct-2011 Stefan Marr <gron@php.net>

Use ZEND_ constants instead of plain strings for names of magic methods.
# No functional changes.


# 4ffc1661 07-Oct-2011 Xinchen Hui <laruence@php.net>

Remove unecessary codes


# 50bf7a11 07-Oct-2011 Xinchen Hui <laruence@php.net>

Remove unecessary codes


# 2e925f6f 03-Oct-2011 Xinchen Hui <laruence@php.net>

Fixed bug #55825, and add test script


# 37e1ed68 03-Oct-2011 Xinchen Hui <laruence@php.net>

Fixed bug #55825, and add test script


# c58f2543 23-Sep-2011 Xinchen Hui <laruence@php.net>

Improve the warning message of incompatible arguments. (#55719)
And fix tests related.


# 8cefbca5 23-Sep-2011 Xinchen Hui <laruence@php.net>

Improve the warning message of incompatible arguments. (#55719)
And fix tests related.


# 1777d6fa 13-Sep-2011 Derick Rethans <derick@php.net>

- Fixed compiler warnings (patch by Kalle Sommer Nielsen)


# a70889f8 13-Sep-2011 Derick Rethans <derick@php.net>

- Fixed compiler warnings (patch by Kalle Sommer Nielsen)


# 4a25a774 13-Sep-2011 Dmitry Stogov <dmitry@php.net>

Fixed ZE specific compile warnings (Bug #55629)


# e43ff135 13-Sep-2011 Dmitry Stogov <dmitry@php.net>

Fixed ZE specific compile warnings (Bug #55629)


# 58a96d55 06-Sep-2011 Pierre Joye <pajoye@php.net>

- WS


# 1f4dfded 29-Aug-2011 Stefan Marr <gron@php.net>

Fixed bug #55524 Traits should not be able to extend a class
# also used the Z_STRVAL where it seemed appropriate


# 117e0729 29-Aug-2011 Stefan Marr <gron@php.net>

Fixed bug #55524 Traits should not be able to extend a class
# also used the Z_STRVAL where it seemed appropriate


# c27da034 23-Aug-2011 Pierrick Charron <pierrick@php.net>

Reapply the commit of revision 315259 on 5.3.9


# 18aac27b 22-Aug-2011 Pierrick Charron <pierrick@php.net>

Revert commit 315259 as requested
# Will apply the patch on this branch after 5.3.8


# ef48624c 22-Aug-2011 Pierrick Charron <pierrick@php.net>

- Fixed bug #55156 (ReflectionClass::getDocComment() returns comment even though the class has none)
# Patch was not committed on the PHP5.3 branch


# b55d116e 16-Aug-2011 Hannes Magnusson <bjori@php.net>

Improve errormessage on wrong use statements


# 133596b6 16-Aug-2011 Hannes Magnusson <bjori@php.net>

Improve errormessage on wrong use statements


# 306c4202 16-Aug-2011 Hannes Magnusson <bjori@php.net>

Callable typehint following the rules of is_callable($arg, false);


# 550980cf 16-Aug-2011 Hannes Magnusson <bjori@php.net>

Callable typehint following the rules of is_callable($arg, false);


# 466d5414 15-Aug-2011 Stefan Marr <gron@php.net>

Bug #55424 Fatal error when calling a method from a trait that is defined in parent class and required by using an abstract method in the trait.
# The method got unconditionally deleted from the class, since it was assumed that we override it, but we did not in case of abstract methods coming from a trait. Thus, dont delete when we try to merge in an abstract method.


# 4a51ea4b 15-Aug-2011 Stefan Marr <gron@php.net>

Bug #55424 Fatal error when calling a method from a trait that is defined in parent class and required by using an abstract method in the trait.
# The method got unconditionally deleted from the class, since it was assumed that we override it, but we did not in case of abstract methods coming from a trait. Thus, dont delete when we try to merge in an abstract method.


# f4d3d6c4 15-Aug-2011 Stefan Marr <gron@php.net>

Fixed Bug #55355: Inheritance chain was not regarded when checking whether the abstract method of a trait is satisfied.


# 0500cffb 15-Aug-2011 Stefan Marr <gron@php.net>

Fixed Bug #55355: Inheritance chain was not regarded when checking whether the abstract method of a trait is satisfied.


# b14b440c 15-Aug-2011 Stefan Marr <gron@php.net>

Fixed Bug #55372 Incorrect handling of literals led to memory corruption.
# Dmitry you might want to review this patch, since I split up zend_add_literal
# and added a version for post-pass_two() usage.


# f2ed1242 15-Aug-2011 Stefan Marr <gron@php.net>

Fixed Bug #55372 Incorrect handling of literals led to memory corruption.
# Dmitry you might want to review this patch, since I split up zend_add_literal
# and added a version for post-pass_two() usage.


# adfdd013 15-Aug-2011 Stefan Marr <gron@php.net>

Addendum for patch to bug #55214: Class name was freed before method literal referring to it.
# Thanks to Felipe for catching this.
# The fix duplicates the name into the literal to avoid the dependency


# c312e602 15-Aug-2011 Stefan Marr <gron@php.net>

Addendum for patch to bug #55214: Class name was freed before method literal referring to it.
# Thanks to Felipe for catching this.
# The fix duplicates the name into the literal to avoid the dependency


# 65cbcb3b 31-Jul-2011 Stefan Marr <gron@php.net>

Fixed Bug #55214 use of __CLASS__ within trait returns trait name not class name [TRAITS] [DOC]


# 88f497f2 31-Jul-2011 Stefan Marr <gron@php.net>

Fixed Bug #55214 use of __CLASS__ within trait returns trait name not class name [TRAITS] [DOC]


# f5219781 31-Jul-2011 Felipe Pena <felipe@php.net>

- Fixed bug #55326 (Trait method copying misindentifies serialization callbacks)
patch by: Gustavo Lopes (cataphract@php)


# b07c3c3e 31-Jul-2011 Felipe Pena <felipe@php.net>

- Fixed bug #55326 (Trait method copying misindentifies serialization callbacks)
patch by: Gustavo Lopes (cataphract@php)


# 9a483afa 23-Jul-2011 Stefan Marr <gron@php.net>

Fixed incorrect initialization when copied op_array.vars was NULL (TRAITS)


# c9fdd777 23-Jul-2011 Stefan Marr <gron@php.net>

Fixed incorrect initialization when copied op_array.vars was NULL (TRAITS)


# 9f660856 23-Jul-2011 Stefan Marr <gron@php.net>

Fixed bug in the handling of conflicting property initializers for traits.
# Bug was uncovered by discussion in http://news.php.net/php.internals/54129
# Forgot to check the actual value of the initializer comparison, only checked
# whether comparison was successful which is not enough.


# f295302a 23-Jul-2011 Stefan Marr <gron@php.net>

Fixed bug in the handling of conflicting property initializers for traits.
# Bug was uncovered by discussion in http://news.php.net/php.internals/54129
# Forgot to check the actual value of the initializer comparison, only checked
# whether comparison was successful which is not enough.


# f214fd4f 11-Jul-2011 Dmitry Stogov <dmitry@php.net>

Fixed bug #55150 (php -a segfaults)


# fb6440b4 11-Jul-2011 Dmitry Stogov <dmitry@php.net>

Fixed bug #55150 (php -a segfaults)


# c5901b64 10-Jul-2011 Felipe Pena <felipe@php.net>

- Added zend_is_auto_global_quick function


# 62e4cfc2 10-Jul-2011 Felipe Pena <felipe@php.net>

- Added zend_is_auto_global_quick function


# 17a7fd06 10-Jul-2011 Felipe Pena <felipe@php.net>

- Minor optimization taking the computed hash of interned strings


# 9aa25d09 10-Jul-2011 Felipe Pena <felipe@php.net>

- Minor optimization taking the computed hash of interned strings


# 0fe6fd9e 09-Jul-2011 Felipe Pena <felipe@php.net>

- Changed zend_resolve_class_name() prototype
# No needed to pass fetch_type as pointer here


# 70cacfd3 09-Jul-2011 Felipe Pena <felipe@php.net>

- Changed zend_resolve_class_name() prototype
# No needed to pass fetch_type as pointer here


# 644b5fde 09-Jul-2011 Felipe Pena <felipe@php.net>

- WS


# 5cb1602a 09-Jul-2011 Felipe Pena <felipe@php.net>

- Minor optimization and clean up


# 32a4d680 09-Jul-2011 Felipe Pena <felipe@php.net>

- Minor optimization and clean up


# 31c043e7 08-Jul-2011 Felipe Pena <felipe@php.net>

- CS and WS


# 32f47f5c 08-Jul-2011 Felipe Pena <felipe@php.net>

- CS and WS


# 7b68c1e6 08-Jul-2011 Felipe Pena <felipe@php.net>

- Missing to commit this change here... (thanks nikic)


# 86624020 07-Jul-2011 Felipe Pena <felipe@php.net>

- Fixed bug #55156 (ReflectionClass::getDocComment() returns comment even though the class has none)


# 09842e83 07-Jul-2011 Felipe Pena <felipe@php.net>

- Fixed bug #55156 (ReflectionClass::getDocComment() returns comment even though the class has none)


# 8cf3c27f 06-Jul-2011 Felipe Pena <felipe@php.net>

- Fixed bug #55137 (Changing trait static method visibility)


# 89539163 06-Jul-2011 Felipe Pena <felipe@php.net>

- Fixed bug #55137 (Changing trait static method visibility)


# 0124c286 02-Jul-2011 Felipe Pena <felipe@php.net>

- Fixed bug #55086 (Namespace alias does not work inside trait's use block)
patch by: Pierrick


# d8e8e68f 02-Jul-2011 Felipe Pena <felipe@php.net>

- Fixed bug #55086 (Namespace alias does not work inside trait's use block)
patch by: Pierrick


# b3a06364 20-Jun-2011 Felipe Pena <felipe@php.net>

- Optimize property finding by zend_hash_quick_find


# 58d41e57 20-Jun-2011 Felipe Pena <felipe@php.net>

- Optimize property finding by zend_hash_quick_find


# 8a956399 20-Jun-2011 Felipe Pena <felipe@php.net>

- Simplify function code


# d188a365 20-Jun-2011 Felipe Pena <felipe@php.net>

- Simplify function code


# 864caa2d 20-Jun-2011 Felipe Pena <felipe@php.net>

- Avoid re-hash here too


# b26f6cb0 20-Jun-2011 Felipe Pena <felipe@php.net>

- Avoid re-hash here too


# d6f5f378 19-Jun-2011 Felipe Pena <felipe@php.net>

- Minor optimization (avoid to re-hash already computed var name hash)


# 142ce5c9 19-Jun-2011 Felipe Pena <felipe@php.net>

- Minor optimization (avoid to re-hash already computed var name hash)


# 335cf2fc 19-Jun-2011 Felipe Pena <felipe@php.net>

- Removed unnecessary TSRMLS_FETCH


# c34b86c4 19-Jun-2011 Felipe Pena <felipe@php.net>

- Removed unnecessary TSRMLS_FETCH


# a9642687 13-Jun-2011 Felipe Pena <felipe@php.net>

- Fix build on Windows


# 50ade271 13-Jun-2011 Felipe Pena <felipe@php.net>

- Fix build on Windows


# e854b05a 13-Jun-2011 Felipe Pena <felipe@php.net>

- Fix build on Windows


# 5670174b 12-Jun-2011 Felipe Pena <felipe@php.net>

- Fixed bug #54624 (class_alias and type hint)


# 209bfe82 12-Jun-2011 Felipe Pena <felipe@php.net>

- Fixed bug #54624 (class_alias and type hint)


# a43b0671 12-Jun-2011 Felipe Pena <felipe@php.net>

- Fixed bug #54624 (class_alias and type hint)


# 80d432ca 12-Jun-2011 Felipe Pena <felipe@php.net>

- Avoid zend_do_ticks() call for each statement in parsing


# e613aae6 12-Jun-2011 Felipe Pena <felipe@php.net>

- Avoid zend_do_ticks() call for each statement in parsing


# 86ed2eeb 12-Jun-2011 Felipe Pena <felipe@php.net>

- Avoid zend_do_ticks() call for each statement in parsing


# e1861890