Commit Graph

502 Commits

Author SHA1 Message Date
Dmitry Stogov
c2c78dc963 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)
2015-02-25 10:37:21 +03:00
Dmitry Stogov
5f278e4d3a Use cache_slot offsets instead of indexes (simplify run-time instructions) 2015-02-25 01:52:35 +03:00
Dmitry Stogov
dcb96c2e03 Split INIT_FCALL_BY_NAME inti INIT_FCALL_BY_NAME(CONST+STRING) and INIT_DYNAMIC_CALL(CONST-STRING|TMPVAR|CV) 2015-02-24 22:29:47 +03:00
Xinchen Hui
2a724becc1 Unused vars 2015-02-21 11:02:20 +08:00
Dmitry Stogov
e142e31137 Fixed memory leak 2015-02-20 20:50:01 +03:00
Dmitry Stogov
623810eff4 Use fast SSE2 memcpy() for copying block of data from SHM to process memory 2015-02-20 16:08:57 +03:00
Dmitry Stogov
5100afb7dd Simplify reallocation during copying data from SHM to process memory 2015-02-20 15:38:06 +03:00
Dmitry Stogov
5f76eed14e don't count op_arrays stored in opcache SHM 2015-02-20 14:59:30 +03:00
Dmitry Stogov
04836f0e55 Removed dead code 2015-02-20 13:46:32 +03:00
Dmitry Stogov
d85113702c Lazy duplication of op_array->static_variables 2015-02-20 13:28:26 +03:00
Dmitry Stogov
582aa41d6f Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixed type mismatch
2015-02-20 10:33:07 +03:00
Dmitry Stogov
90421b0d5b Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed type mismatch
2015-02-20 10:32:34 +03:00
Dmitry Stogov
9fb48edf3c Fixed type mismatch 2015-02-20 10:31:24 +03:00
Xinchen Hui
7299d43536 Fixed bug #69038 (switch(SOMECONSTANT) misbehaves) for master 2015-02-17 22:05:57 +08:00
Xinchen Hui
e22759b1e5 Replace var is introduced 2015-02-17 21:16:37 +08:00
Xinchen Hui
1c0fa36c61 Merge branch 'PHP-5.5' into PHP-5.6 2015-02-17 11:36:15 +08:00
Xinchen Hui
66d3095993 Fixed bug #69038 (switch(SOMECONSTANT) misbehaves) 2015-02-17 11:34:57 +08:00
Anatol Belski
af3ca74501 made ZEND_TSRMLS_CACHE_* macros look like function calls
which also comply with the current semantics for such macros
2015-02-16 17:19:32 +01:00
Dmitry Stogov
e10e151e9b 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.
2015-02-13 22:20:39 +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
Dmitry Stogov
9d5d736869 Avoid repeatable calls to strstr() 2015-02-09 22:42:37 +03:00
Bob Weinand
fc444fbc70 Shut up, my lovely compiler; I do not like your warnings
Conflicts:
	Zend/zend_object_handlers.c
2015-02-09 11:23:35 +08:00
Xinchen Hui
e82e22e27b Opcache is enable by default 2015-02-05 17:07:30 +08:00
Xinchen Hui
a071fc4604 Added CREDITS 2015-02-05 16:58:19 +08:00
Stanislav Malyshev
dd15207dc5 Merge branch 'pull-request/945'
* pull-request/945:
  Update zend_accelerator_hash.c
  hashmap sizes
  Wasted Shared Memory aboce 2Gb fix
2015-01-31 23:10:37 -08:00
Xinchen Hui
a1d9ceac7a Fixed annoying warnings 2015-01-29 11:59:37 +08:00
Xinchen Hui
659395e3dd Merge branch 'master' of https://git.php.net/repository/php-src 2015-01-29 00:01:24 +08:00
Levi Morrison
c8576c5a46 Implement return types
RFC is documented here: https://wiki.php.net/rfc/return_types
2015-01-27 11:49:56 -07:00
Xinchen Hui
1828ec21e2 Fixed some annoying warnings 2015-01-27 23:28:31 +08:00
Anatol Belski
d0e75bdc59 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed bug #68827 Double free with disabled ZMM
  Fixed segfault while running with moodle
2015-01-22 10:00:10 +01:00
Xinchen Hui
201f660ae1 Merge branch 'PHP-5.6' 2015-01-22 16:39:22 +08:00
Xinchen Hui
d0928b7f97 Merge branch 'PHP-5.5' into PHP-5.6 2015-01-22 16:39:03 +08:00
Xinchen Hui
251745c012 Fixed segfault while running with moodle 2015-01-22 16:38:34 +08:00
Xinchen Hui
88e88426df Merge branch 'PHP-5.6' 2015-01-21 11:18:27 +08:00
Xinchen Hui
57ff5a4e6f Merge branch 'PHP-5.5' into PHP-5.6 2015-01-21 11:18:08 +08:00
Xinchen Hui
20e5911d82 Fixed test fails 2015-01-21 11:17:49 +08:00
Dmitry Stogov
22ac15e6c9 Improve optimization of CONCAT/ADD_STRING/ADD_CJAR sequences 2015-01-19 17:01:30 +03:00
Xinchen Hui
fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Xinchen Hui
0579e8278d bump year 2015-01-15 23:26:37 +08:00
Xinchen Hui
73c1be2653 Bump year 2015-01-15 23:26:03 +08:00
Dmitry Stogov
2387771daf Slight improvement in copying script from opcache SHM into process memory 2015-01-12 23:51:40 +03:00
Stanislav Malyshev
b7a7b1a624 trailing whitespace removal 2015-01-10 15:07:38 -08:00
Xinchen Hui
aa5b3b0e4a Merge branch 'PHP-5.6' 2015-01-09 11:54:01 +08:00
Xinchen Hui
0547edb5c2 Fixed bug (try block removed while combined with xdebug) 2015-01-09 11:53:47 +08:00
Xinchen Hui
777c39f404 Fixed #68677 2015-01-08 16:32:20 +08:00
Dmitry Stogov
37466b0368 Use special flag (HASH_FLAG_INITIALIZED) instead of (nTableMask == 0) to indicate that HashTable is allocated.
Make nTableMask to be 0 for packed arrays.
Remove checks fo HASH_FLAG_PACKED in zend_hash_find/zend_hash_del and family (string keys are resolved through uninitialized_bucket).
Change HashTable layout for better locality.
2014-12-27 11:07:12 +03:00
Dmitry Stogov
814df43fb9 Reimplemented used stack size recalculation (replaced 3d4babdc2b) 2014-12-26 12:42:38 +03:00
Xinchen Hui
3d4babdc2b Adjust tempoary variable used in caller's side 2014-12-25 14:57:58 +08:00
Xinchen Hui
e0ca75a454 No need to do this check for master, ZEND_COMPILE_NO_BUILTIN_STRLEN already cover it 2014-12-24 20:42:17 +08:00
Dmitry Stogov
c42ac09518 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.
2014-12-24 15:04:51 +03:00