Commit Graph

9949 Commits

Author SHA1 Message Date
Xinchen Hui
09ac3e931c uint32_t 2015-02-21 01:19:07 +08:00
Anthony Ferrara
b3be3c5b17 Clean up tri-state logic to use break instead 2015-02-20 11:54:33 -05:00
Anthony Ferrara
e3b020b945 Fix declare error behavior so that improper usages will actually error 2015-02-20 11:43:18 -05:00
Dmitry Stogov
5f76eed14e don't count op_arrays stored in opcache SHM 2015-02-20 14:59:30 +03:00
Dmitry Stogov
d85113702c Lazy duplication of op_array->static_variables 2015-02-20 13:28:26 +03:00
Dmitry Stogov
6b779596d7 Implemented AST pretty-printer 2015-02-19 11:11:17 +03:00
Stanislav Malyshev
3551083c2c Merge branch 'pull-request/1007'
* pull-request/1007:
  Fix associativity to match Perl
  Blast off to space.
2015-02-18 08:48:17 +01: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
Nikita Popov
03ded8c7ea Remove unused variable 2015-02-13 15:33:50 +01:00
Guilherme Blanco
4498d34aea 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.
2015-02-13 15:31:48 +01:00
Xinchen Hui
e5d8a14239 Revert "Cleanup globals initialization"
This reverts commit 309e90638d.
2015-02-13 18:25:44 +08:00
Xinchen Hui
da7d94cd73 Merge branch 'PHP-5.6'
Conflicts:
	ext/soap/soap.c
	ext/standard/basic_functions.c
	ext/zlib/zlib.c
2015-02-13 13:28:24 +08:00
Xinchen Hui
309e90638d Cleanup globals initialization 2015-02-13 10:58:35 +08:00
Xinchen Hui
2766dbaf6d Unused vars 2015-02-13 10:53:40 +08:00
Dmitry Stogov
12abac8bb7 Limit HashTable size to avoid integer overflow checks 2015-02-13 02:12:42 +03:00
Nikita Popov
2fb85f1058 Cleanup checks in zend_builtin_functions.c
The EXPLICIT_ABSTRACT_CLASS comparisons are no longer necessary.
2015-02-12 23:31:01 +01:00
Guilherme Blanco
8c81d80e10 Made ZEND_ACC_TRAIT a saner value
CC_TRAIT valued as 0x120 is too magical to be comprehensible by others.
2015-02-12 23:20:19 +01:00
Anatol Belski
07fdc1c78b fix data types 2015-02-12 18:39:40 +01:00
Dmitry Stogov
4d2a575db2 Stop using internal array/object pointer in foreach by reference according to https://wiki.php.net/rfc/php7_foreach 2015-02-12 14:36:04 +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
b83352ccf3 Merge branch 'PHP-5.6' 2015-02-12 11:28:42 +08:00
Xinchen Hui
3ae88e023c Merge branch 'PHP-5.5' into PHP-5.6 2015-02-12 11:28:30 +08:00
Xinchen Hui
c2062ca470 Added test for #69017 2015-02-12 11:28:16 +08:00
Xinchen Hui
7062465be0 Merge branch 'PHP-5.5' into PHP-5.6 2015-02-12 10:59:59 +08:00
Xinchen Hui
f2940b7120 Fixed bug #69017 (Fail to push to the empty array with the constant value defined in class scope) 2015-02-12 10:59:28 +08:00
Dmitry Stogov
a75d1d99b4 Merge branch 'master' of git.php.net:php-src
* 'master' of git.php.net:php-src:
  add missing test for class member access with deference relates to https://wiki.php.net/rfc/uniform_variable_syntax
  fix dir separator in test
2015-02-11 17:41:52 +03:00
Dmitry Stogov
35aea97e42 Fixed bug #69025 (Invalid read of size 4 when calling __callStatic) 2015-02-11 17:41:21 +03:00
Márcio Almada
1849546ada add missing test for class member access with deference
relates to https://wiki.php.net/rfc/uniform_variable_syntax
2015-02-11 15:23:20 +01:00
Xinchen Hui
63c923e3e1 Forget this change 2015-02-11 16:06:47 +08:00
Xinchen Hui
4f1fc31e16 Expose zend_string_equals_str_ci 2015-02-11 16:05:20 +08:00
Bob Weinand
2b3bebfa4c 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)
2015-02-10 22:20:53 +01:00
Bob Weinand
830d3d79b3 Revert "Revert "Improve and generalize class constant substitution""
This reverts commit 400e65e955.

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.)
2015-02-10 15:47:17 +01:00
Bob Weinand
400e65e955 Revert "Improve and generalize class constant substitution"
This reverts commit 9ff3800b79.
2015-02-09 22:44:25 +01:00
Bob Weinand
9ff3800b79 Improve and generalize class constant substitution 2015-02-09 17:11:23 +01:00
Xinchen Hui
2a4ed626ca Merge branch 'PHP-5.6' 2015-02-09 11:32:53 +08:00
Xinchen Hui
3d1ec33f96 Merge branch 'PHP-5.5' into PHP-5.6 2015-02-09 11:32:32 +08:00
Márcio Almada
e9f99e3d71 Márcio Almada remove dead tokens: T_CHARACTER, T_BAD_CHARACTER. 2015-02-08 21:44:44 -03:00
Reeze Xia
4d034b1a1e Improve tests for bug 67436
I always use a.php or b.php for local testing,
this diff makes the test more stable
2015-02-07 14:11:09 +08:00
Xinchen Hui
594c220dea Fixed issue #1041 (Fix build in OSX with --enable-dtrace) 2015-02-07 11:27:42 +08:00
Xinchen Hui
3b3308a70a Further fix for bug #68987 2015-02-06 21:13:16 +08:00
Dmitry Stogov
57496c3836 This should fix compilation on OSX (bug #68987 Failed to compile zend.c with gcc-4.9.2) 2015-02-06 13:42:22 +03:00
Xinchen Hui
a3379d6691 Padding 2015-02-05 16:11:44 +08:00
Dmitry Stogov
f5a9cfc33a Merge branch 'internal-function-return-types' of github.com:reeze/php-src into test
* 'internal-function-return-types' of github.com:reeze/php-src:
  Add load time return type checking to match user land logic
  Add test function arguments
  Implemented internal function return types
2015-02-05 11:01:07 +03:00
Reeze Xia
601fcc31af Add load time return type checking to match user land logic 2015-02-05 11:22:11 +08:00
Reeze Xia
2c84006f5a Add test function arguments 2015-02-05 01:21:42 +08:00
Reeze Xia
bff4c47fa7 Implemented internal function return types 2015-02-05 01:04:54 +08:00
Dmitry Stogov
a787719d4f Removed TSRMLS_D 2015-02-04 18:47:30 +03:00
Dmitry Stogov
8b46d45a9d Simplify code and add comments 2015-02-04 17:56:14 +03:00
Dmitry Stogov
9e70d7672d 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. 2015-02-04 15:24:13 +03:00