Commit Graph

289 Commits

Author SHA1 Message Date
Nikita Popov
8f8fcbbd39 Support full variance if autoloading is used
Keep track of delayed variance obligations and check them after
linking a class is otherwise finished. Obligations may either be
unresolved method compatibility (because the necessecary classes
aren't available yet) or open parent/interface dependencies. The
latter occur because we allow the use of not fully linked classes
as parents/interfaces now.

An important aspect of the implementation is we do not require
classes involved in variance checks to be fully linked in order for
the class to be fully linked. Because the involved types do have to
exist in the class table (as partially linked classes) and we do
check these for correct variance, we have the guarantee that either
those classes will successfully link lateron or generate an error,
but there is no way to actually use them until that point and as
such no possibility of violating the variance contract. This is
important because it ensures that a class declaration always either
errors or will produce an immediately usable class afterwards --
there are no cases where the finalization of the class declaration
has to be delayed until a later time, as earlier variants of this
patch did.

Because variance checks deal with classes in various stages of
linking, we need to use a special instanceof implementation that
supports this, and also introduce finer-grained flags that tell us
which parts have been linked already and which haven't.

Class autoloading for variance checks is delayed into a separate
stage after the class is otherwise linked and before delayed
variance obligations are processed. This separation is needed to
handle cases like A extends B extends C, where B is the autoload
root, but C is required to check variance. This could end up
loading C while the class structure of B is in an inconsistent
state.
2019-06-11 13:09:33 +02:00
Nikita Popov
7f72d771e8 Revert "Switch to bison location tracking"
This reverts commit e528762c1c.

Dmitry reports that this has a non-trivial impact on parsing
overhead, especially on 32-bit systems. As we don't have a strong
need for this change right now, I'm reverting it.

See also comments on
e528762c1c.
2019-03-28 09:29:08 +01:00
Nikita Popov
e528762c1c Switch to bison location tracking
Locations for AST nodes are now tracked with the help of bison
location tracking. This is more accurate than what we currently do
and easier to extend with more information.

A zend_ast_loc structure is introduced, which is used for the location
stack. Currently it only holds the start lineno, but can be extended
to also hold end lineno and offset/column information in the future.

All AST constructors now accept a zend_ast_loc* as first argument, and
will use it to determine their lineno. Previously this used either the
CG(zend_lineno), or the smallest AST lineno of child nodes.

On the parser side, the location structure for a whole rule can be
obtained using the &@$ character salad.
2019-03-21 16:27:48 +01:00
Nikita Popov
51ed4a8d8f Merge branch 'PHP-7.3' into PHP-7.4 2019-03-18 10:04:59 +01:00
Nikita Popov
61eebb559e Merge branch 'PHP-7.2' into PHP-7.3 2019-03-18 10:04:29 +01:00
twosee
bd6eabd659 Don't disable object slot reuse while running shutdown functions
We only need to do this once we're running destructors. The current
approach interferes with some event loop code that runs everything
inside a shutdown function.
2019-03-18 10:02:31 +01:00
Dmitry Stogov
9499484ed2 Implemented a faster way to access predefined TSRM resources - CG(), EG(), etc. 2019-03-14 03:01:01 +03:00
Joe Watkins
6529d7acd9
zend_weakrefs 2019-03-12 00:35:35 +01:00
Peter Kokot
92ac598aab Remove local variables
This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.

A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.

This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.

With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.

Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files.  All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.
2019-02-03 21:03:00 +01:00
Zeev Suraski
a81202ac49 Adios, yearly copyright ranges 2019-01-30 11:48:28 +01:00
Nikita Popov
a50198d0fe Implement ??= operator
RFC: https://wiki.php.net/rfc/null_coalesce_equal_operator

$a ??= $b is $a ?? ($a = $b), with the difference that $a is only
evaluated once, to the degree that this is possible. In particular
in $a[foo()] ?? $b function foo() is only ever called once.
However, the variable access themselves will be reevaluated.
2019-01-22 11:12:04 +01:00
Zeev Suraski
9afce019e0 Future-proof email addresses 2018-11-01 18:35:32 +02:00
Zeev Suraski
54dc07f3dc Update email addresses. We're still @Zend, but future proofing it... 2018-11-01 17:20:07 +02:00
Dmitry Stogov
d57cd36e47 Immutable clases and op_arrays.
Squashed commit of the following:

commit cd0c36c3f9
Merge: 4740dabb84 ad6738e886
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Oct 17 14:43:38 2018 +0300

    Merge branch 'master' into immutable

    * master:
      Remove the "auto" encoding
      Fixed bug #77025
      Add vtbls for EUC-TW encoding

commit 4740dabb84
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Oct 17 14:12:28 2018 +0300

    Reverted back ce->iterator_funcs_ptr. Initialize ce->iterator_funcs_ptr fields in immutable classes.

commit ad7a78b253
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Oct 17 11:46:30 2018 +0300

    Added comment

commit 0276ea5187
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Oct 17 11:42:43 2018 +0300

    Added type cast

commit c63fc5d5f1
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Oct 17 11:36:51 2018 +0300

    Moved static class members initialization into the proper place.

commit b945548e93
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Oct 17 11:21:03 2018 +0300

    Removed redundand assertion

commit d5a4108840
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Oct 17 11:19:13 2018 +0300

    Removed duplicate code

commit 8dadca8864
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Oct 17 11:05:43 2018 +0300

    Hide offset encoding magic in ZEND_MAP_PTR_IS_OFFSET(), ZEND_MAP_PTR_OFFSET2PTR() and ZEND_MAP_PTR_PTR2OFFSET() macros.

commit 9ef07c88bd
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Oct 17 10:48:29 2018 +0300

    typo

commit a06f0f3d3a
Merge: 94099586ec 3412345ffe
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Oct 17 10:47:07 2018 +0300

    Merge branch 'master' into immutable

    * master:
      Remove unused variable makefile_am_files
      Classify object handlers are required/optional
      Add support for getting SKIP_TAGSTART and SKIP_WHITE options
      Remove some obsolete config_vars.mk occurrences
      Remove bsd_converted from .gitignore
      Remove configuration parser and scanners ignores
      Remove obsolete buildconf.stamp from .gitignore
      [ci skip] Add magicdata.patch exception to .gitignore
      Remove outdated ext/spl/examples items from .gitignore
      Remove unused test.inc in ext/iconv/tests

commit 94099586ec
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Mon Oct 15 23:34:01 2018 +0300

    Immutable clases and op_arrays
2018-10-17 15:52:50 +03:00
Dmitry Stogov
a2e8334613 Allocate only necessary space for static properties of internal classes in ZTS mode. 2018-10-01 19:05:31 +03:00
Nikita Popov
02664aee5c Remove ZEND_EARLY_BINDING_* constants
It seems like these were never actually used.
2018-09-17 20:59:16 +02:00
Peter Kokot
8d3f8ca12a 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.
2018-07-25 00:53:25 +02:00
Dmitry Stogov
d77aa8fa6d Fixed typo 2018-07-19 09:41:15 +03:00
Dmitry Stogov
3b6e1ee4ee Improved "Fast Shutdown". 2018-07-17 17:31:04 +03:00
Thomas Punt
4887357269 Implement flexible heredoc/nowdoc syntax
RFC: https://wiki.php.net/rfc/flexible_heredoc_nowdoc_syntaxes

* The ending label no longer has to be followed by a semicolon or
  newline. Any non-label character is fine.
* The ending label may be indented. The indentation will be stripped
  from all lines in the heredoc/nowdoc string.

Lexing of heredoc strings performs a scan-ahead to determine the
indentation of the ending label, so that the correct amount of
indentation can be removed when calculting the semantic values for
use by the parser. This makes the implementation quite a bit more
complicated than we would like :/
2018-04-13 21:35:37 +02:00
Xinchen Hui
a6519d0514 year++ 2018-01-02 12:57:58 +08:00
Xinchen Hui
7a7ec01a49 year++ 2018-01-02 12:55:14 +08:00
Dmitry Stogov
6780c74619 Allowed modification of VM stack page size. Exported few functions. Green light for Fibers/Coroutines. 2017-11-22 15:36:09 +03:00
Anatol Belski
bc5811f361 further sync for vim mode lines 2017-07-04 18:12:45 +02:00
Dmitry Stogov
caaeb4849a Removed EG(valid_symbol_table). Used EG(active) instead. 2017-06-26 13:35:07 +03:00
Anatol Belski
c698299550 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.
2017-03-04 10:39:13 +01:00
Jim Zubov
1b1399c95d Added EG(flags) - executor global flags
EG_FLAGS_IN_SHUTDOWN - is set when PHP is in shutdown state
2017-02-09 12:40:33 -05:00
Nikita Popov
06a0340162 Deprecate each() 2017-02-03 21:02:52 +01:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Dmitry Stogov
fff9f2b21a Merge branch 'PHP-7.1'
* PHP-7.1:
  Revert "Introduced zend.enable_dtrace INI directive to enable/disable PHP call tracing"
2016-11-18 12:53:49 +03:00
Dmitry Stogov
a911df5d22 Revert "Introduced zend.enable_dtrace INI directive to enable/disable PHP call tracing"
This reverts commit 01239b0eff.
2016-11-18 12:52:46 +03:00
Dmitry Stogov
6515966b01 Merge branch 'PHP-7.1'
* PHP-7.1:
  Introduced zend.enable_dtrace INI directive to enable/disable PHP call tracing
2016-11-18 12:24:47 +03:00
Dmitry Stogov
01239b0eff Introduced zend.enable_dtrace INI directive to enable/disable PHP call tracing 2016-11-18 12:23:10 +03:00
Nikita Popov
8754b191f7 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.
2016-10-07 00:12:55 +02:00
Nikita Popov
07af6ba898 Make sure TOKEN_PARSE mode is thread safe
Introduce an on_event_context passed to the on_event hook. Use this
context to pass along the token array. Previously this was stored
in a non-tls global :/
2016-07-23 00:00:13 +02:00
Dmitry Stogov
d0460d8f6b Turn safe timeout handling into general interrupt handling ability. 2016-06-23 15:01:23 +03:00
Dmitry Stogov
ccf18da450 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.
2016-05-13 01:40:15 +03:00
Dmitry Stogov
7b94b958cc Intern some known (and offten used) strings. 2016-05-12 13:47:22 +03:00
Dmitry Stogov
6499162ff0 - get rid of EG(scope). zend_get_executed_scope() should be used instead.
- ichanged zval_update_constant_ex(). Use IS_TYPE_IMMUTABLE flag on shared constants and AST, instead of "inline_change" parameter.
2016-04-28 04:13:34 +03:00
Dmitry Stogov
650c1c0a7d Safe execution timeout handling. 2016-04-20 13:52:21 +03:00
Xinchen Hui
97a9470d97 bump year which is missed in rev 49493a2 2016-01-02 17:56:11 +08:00
Dmitry Stogov
549e8c4959 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 5ee8413259.

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

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

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

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

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

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

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

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

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 8c3f701eeb.
2015-07-10 03:31:52 +03:00
Nikita Popov
b3a4c05071 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.
2015-07-07 20:55:12 +02:00
Márcio Almada
110759386e 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.
2015-04-30 03:03:29 -03:00
Nikita Popov
d2607a0110 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.
2015-04-21 17:39:07 +02:00
Nikita Popov
0381c1b79e 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.
2015-04-20 18:18:52 +02:00
Dmitry Stogov
5e8133f453 Squashed commit of the following:
commit 2399fc84c5
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Apr 10 12:38:08 2015 +0300

    Removed useless assignment

commit 796b633817
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Apr 10 12:35:31 2015 +0300

    Fixed execution with overriden zend_execute_ex()

commit 4a9fb125aa
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Apr 10 02:02:58 2015 +0300

    Fixed executor without global registers

commit d456c30e00
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Apr 10 01:30:35 2015 +0300

    Restored original behavior for tests/classes/__call_004.phpt

commit 479646d37f
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Apr 10 00:32:17 2015 +0300

    Fixed test. We don't keep stack frame for fake function anymore.

commit 9ae61e33e2
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Apr 10 00:30:09 2015 +0300

    Use ZEND_ACC_CALL_VIA_TRAMPOLINE instead of ZEND_ACC_CALL_VIA_HANDLER. Keep ZEND_ACC_CALL_VIA_HANDLER for compatibility.

commit 0a8403a2a0
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Apr 10 00:05:43 2015 +0300

    Rename PROXY_CALL into CALL_TRAMPLINE.
    Generalize API to allow reuse EG(trampline) for other purposes.

commit 4ea0525c10
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Apr 9 23:22:25 2015 +0300

    Reuse EG(proxy_call_op) for all proxy. Move proxy related functions from zend_objects_API to zend_object_handlers.

commit 529bf737ca
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Apr 9 21:42:23 2015 +0300

    Accurate use of proxy_call

commit 5d62837d5b
Merge: 83e749f 690843f
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Apr 9 19:40:00 2015 +0300

    Merge branch 'master' into opcodefy-call

    * master:
      Fixed GOTO executor
      Fixed typo
      Changed ArrayIterator implementation using zend_hash_iterator_... API. Allowed modification of itterated ArrayObject using the same behavior as proposed in `Fix "foreach" behavior`. Removed "Array was modified outside object and internal position is no longer valid" hack.

commit 83e749ff3b
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Apr 9 19:39:10 2015 +0300

    Improved ZEND_PROXY_CALL

commit 0c829afc53
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Apr 9 15:14:49 2015 +0300

    Reverted white-space changes

commit df65144488
Merge: 5fd2f97 97756d9
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Apr 9 14:37:07 2015 +0300

    Merge branch 'opcodefy-call' of github.com:laruence/php-src into opcodefy-call

    * 'opcodefy-call' of github.com:laruence/php-src:
      Ready for PR
      Fixed static call
      Improve performance by using prealloated op_arrray
      Respect called_scope
      Support internal magical __call/__callStatic
      opcode-fy magical __callStatic
      Opcode-fy magical __call

commit 97756d9190
Author: Xinchen Hui <laruence@gmail.com>
Date:   Thu Apr 9 19:07:59 2015 +0800

    Ready for PR

commit 74f9930846
Author: Xinchen Hui <laruence@gmail.com>
Date:   Thu Apr 9 19:03:00 2015 +0800

    Fixed static call

commit ec1d9eb592
Author: Xinchen Hui <laruence@gmail.com>
Date:   Thu Apr 9 18:23:17 2015 +0800

    Improve performance by using prealloated op_arrray

commit df7fbbf949
Author: Xinchen Hui <laruence@gmail.com>
Date:   Thu Apr 9 15:10:02 2015 +0800

    Respect called_scope

commit 769d1d59fb
Author: Xinchen Hui <laruence@gmail.com>
Date:   Thu Apr 9 12:19:23 2015 +0800

    Support internal magical __call/__callStatic

commit a980fedd5b
Author: Xinchen Hui <laruence@gmail.com>
Date:   Wed Apr 8 18:35:41 2015 +0800

    opcode-fy magical __callStatic

commit 73855f7d53
Author: Xinchen Hui <laruence@gmail.com>
Date:   Wed Apr 8 14:21:55 2015 +0800

    Opcode-fy magical __call
2015-04-10 23:01:00 +03:00
Dmitry Stogov
9a20323e19 Improved assert() according to expectations RFC.
See https://wiki.php.net/rfc/expectations

Squashed commit of the following:

commit 3f3651a787
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 ca8ecabf2a
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 24328ac03f
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 021fd94ed1
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 49963ebf9d
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 07b1f92ed6
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Feb 18 23:06:32 2015 +0300

    fixed pretty-printer (support for "elseif")

commit 5a976c8d85
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Feb 18 19:50:08 2015 +0300

    Fixed vaeious ptetty-printer issues

commit 69491e8e8e
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 8473157fbb
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Feb 18 10:17:26 2015 +0300

    Fixed typo and white spaces

commit 96de5ffc8d
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Feb 18 00:28:39 2015 +0300

    Fixed assert() in namesapaces

commit 5eba069c28
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 4a2d9c0953
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 7a059b66d5
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 3892eba2bf
Author: krakjoe <joe.watkins@live.co.uk>
Date:   Sun Feb 2 12:49:35 2014 +0000

    import expect
2015-03-02 12:25:40 +03:00
Dmitry Stogov
97fe15db43 Fix "forech" statemt behaviour according to https://wiki.php.net/rfc/php7_foreach
Squashed commit of the following:

commit 1e41295097
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 5406f21b11
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jan 30 18:08:43 2015 +0300

    Reduced alghorithms complexity

commit b37f1d58d2
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jan 30 18:08:30 2015 +0300

    Fixed test name

commit fb2d079645
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jan 30 18:08:05 2015 +0300

    API cleanup

commit 08302c0d6d
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jan 30 14:20:46 2015 +0300

    Make array_splice() to preserve foreach hash position

commit cc4b7be41e
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 5aa9712b0a
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 4c5b385ff5
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jan 30 07:56:37 2015 +0300

    More careful iterators update.

commit 721fc9e80d
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Jan 29 21:43:28 2015 +0300

    Added new test

commit 15a23b1218
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 10a3260b1f
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Jan 29 21:04:44 2015 +0300

    New test

commit eef80c5837
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jan 28 16:52:21 2015 +0300

    Fixed foreach by reference iteration over constant array

commit 61e7391873
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jan 28 14:59:54 2015 +0300

    Fixed temporary variable re-allocation pass

commit 92e90c09f0
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 dd2a36a207
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 4638f7b914
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)
2015-02-12 13:57:12 +03:00
Xinchen Hui
fc33f52d8c bump year 2015-01-15 23:27:30 +08:00