Commit Graph

9651 Commits

Author SHA1 Message Date
Anatol Belski
fb848ebd00 ups, this is not needed 2014-09-18 17:14:55 +02:00
Anatol Belski
e8b497ad8e fix CG(empty_string) init in ZTS 2014-09-18 17:14:54 +02:00
Dmitry Stogov
1e0e1b4a73 Split big _zend_handle_numeric_str() into small always inlined function that makes initial check and regular big function 2014-09-18 18:50:05 +04:00
Dmitry Stogov
e439349e58 Expose zend_safe_address() and use it in zend_arena_calloc() 2014-09-18 13:31:25 +04:00
Dmitry Stogov
025bc7e80a Clang attributes support 2014-09-18 11:50:00 +04:00
Dmitry Stogov
5185baab3e Changed "inline" into "zend_always_inline" 2014-09-18 04:59:01 +04:00
Dmitry Stogov
61d37e059f Moved some definitions from zend.h into more suitable header files 2014-09-18 04:58:04 +04:00
Dmitry Stogov
e646c6d5b5 Fixed compilation warnings 2014-09-18 04:02:43 +04:00
Andrea Faulds
545c296ef4 Fixed if/else if ordering 2014-09-17 20:41:20 +01:00
Andrea Faulds
7f51d73bb2 Merge branch 'master' into integer_semantics 2014-09-17 20:15:32 +01:00
Dmitry Stogov
e3b3e68127 Optimized enterance into functions 2014-09-17 16:17:58 +04:00
Dmitry Stogov
551ee4165b Use runtime-cache to avoid hash lookups in BIND_GLOBAL instruction 2014-09-17 00:52:45 +04:00
Dmitry Stogov
c2decc6afc optimized colision list traverse 2014-09-17 00:52:03 +04:00
Anatol Belski
65c401672e redo the fix with cast to size_t 2014-09-16 21:17:22 +02:00
Nikita Popov
69e7c9d89c Initial coalesce operator implementation 2014-09-16 19:14:46 +01:00
Nikita Popov
543ae3f029 Drop BC alias HASH_NON_EXISTANT 2014-09-16 18:29:00 +02:00
Nikita Popov
311a67a2ed Remove HASH_NEXT_INSERT flag
We already pass ht->nNextFreeElement and the rest is handled by
ZEND_HASH_ADD.
2014-09-16 18:29:00 +02:00
Nikita Popov
0bf55b65d4 Remove two more always-true conditions 2014-09-16 18:28:59 +02:00
krakjoe
6967f78cc9 Merge branch 'pull-request/808' 2014-09-16 15:40:31 +01:00
Andrea Faulds
db72160e5a Merge branch 'master' into integer_semantics
Conflicts:
	Zend/zend_operators.h
2014-09-16 13:45:06 +01:00
Anatol Belski
3329d54cd9 better error messages in ZMM on Windows 2014-09-16 12:27:25 +02:00
Dmitry Stogov
13be4a5a4b emalloc() must not return NULL 2014-09-16 13:53:26 +04:00
Dmitry Stogov
ca37c02520 code optimization 2014-09-16 13:52:50 +04:00
Andrea Faulds
be88d0e5d4 Use SIZEOF_ZEND_LONG instead of SIZEOF_LONG 2014-09-16 10:24:33 +01:00
Dmitry Stogov
f5517d16d6 ws 2014-09-16 11:56:56 +04:00
Anatol Belski
71cc3991bf cast the other way round, the sign check is already done before 2014-09-16 09:33:02 +02:00
Dmitry Stogov
d17487f827 We don't have to check for undefined CV if we fetch it for isset() operation 2014-09-16 09:15:47 +04:00
Nikita Popov
079409bbc2 Switch (un)mangle property name to size_t and zend_string
Also use the _ex variants where possible.
2014-09-16 00:31:27 +02:00
Dmitry Stogov
6991780793 Optimized FE_RESET and FE_FETCH 2014-09-16 01:34:27 +04:00
Nikita Popov
a7bfd006bd Remove always-true comparisons 2014-09-15 23:07:31 +02:00
Nikita Popov
ca43b99fc6 Update types in zend_hash
* String lengths are size_t
 * Indexes are uint32_t
 * Flags are uint32_t
 * Booleans are zend_bool
2014-09-15 23:07:31 +02:00
Anatol Belski
e0ff5238c5 fix negating an unsigned 2014-09-15 19:46:30 +02:00
Anatol Belski
383a0773ff fix signed/unsigned mismatch 2014-09-15 19:46:29 +02:00
Anatol Belski
e591c78d09 revamp serialization to work with size_t for Serializable 2014-09-15 19:46:28 +02:00
Anatol Belski
0799459e76 fix signed/unsigned mismatch 2014-09-15 19:46:26 +02:00
Anatol Belski
e940fc268a fix signed/unsigned mismatch 2014-09-15 19:46:25 +02:00
Anatol Belski
ea94210e8c fix most of signed/unsigned warnings in vm def 2014-09-15 19:46:24 +02:00
Anatol Belski
836fd73cce fix signed/unsigned mismatch 2014-09-15 12:58:45 +02:00
Anatol Belski
c8ed0d81e7 fix signed/unsigned mismatch 2014-09-15 12:58:44 +02:00
Anatol Belski
4e09d782ef fix unsigned negation 2014-09-15 12:58:43 +02:00
Anatol Belski
d3622c2445 fix signed/unsigned mismatch 2014-09-15 12:58:42 +02:00
Dmitry Stogov
d10bc5c005 Merge branch 'master' of git.php.net:php-src
* 'master' of git.php.net:php-src:
  fix initializer struct
  fix signature
  fix type
  fix condition
2014-09-15 14:37:59 +04:00
Dmitry Stogov
f1bf5313a2 Replaced macro with better optimized inline function 2014-09-15 14:36:55 +04:00
Anatol Belski
f595ed4b8c fix initializer struct 2014-09-15 11:30:26 +02:00
Xinchen Hui
dfc99d93d5 Remove redundant codes 2014-09-15 16:52:33 +08:00
Xinchen Hui
ae41536c4d Add test script for the segfault in gc while run phpspec 2014-09-15 14:49:34 +08:00
Nikita Popov
eda5ba1f8f Fix use of stack variable outside its block 2014-09-14 16:18:08 +02:00
Nikita Popov
ebc6da5628 zend_get_property_info takes a zend_string* now 2014-09-14 16:18:08 +02:00
Nikita Popov
ee75848b78 Drop superfluous opline for non-cv variables 2014-09-13 22:31:27 +02:00
Nikita Popov
88e07324d9 Drop dead assignments 2014-09-13 22:31:21 +02:00
Nikita Popov
21a5253ea9 Make zend_llist_remove_tail a void function
The returned data is already dtored and freed at this point.
2014-09-13 22:07:51 +02:00
Nikita Popov
345b0f44c3 Use more accurate sizeof
This is allocating an array of zval*s, not zval**s.
2014-09-13 21:57:58 +02:00
Anatol Belski
f91a782973 reduce the struct size by 8 byte on 64 bit
this one looks like debug only, but still useful
2014-09-13 12:52:11 +02:00
Anatol Belski
993d475126 fix condition
A char array like val[1] would always be valid when checking like
!val. Probably better were to check for ->len, but actually ->val[0]
is fine as the actual zend_string should have been initalized
before.
2014-09-13 00:03:42 +02:00
Anatol Belski
8fc0f1a788 reduce size by 8 byte on 64 bit 2014-09-12 22:06:10 +02:00
Anatol Belski
c22458adc5 fix ZTS build 2014-09-12 21:38:39 +02:00
Anatol Belski
83244e5fec better align and reduce size by 8 byte on 64 bit 2014-09-12 21:35:25 +02:00
Anatol Belski
5d5a70205c reduce the struct size by 8 byte on 64 bit 2014-09-12 21:35:20 +02:00
Xinchen Hui
243ec132e6 Forget to commit this part... 2014-09-13 02:00:15 +08:00
Xinchen Hui
78ce2557f5 Finally!!! Fixed segfault in GC
this must not be the final fix, but let's stop the segfault first and
use this to indicate where the problem is.

reproduced by phpspec
2014-09-13 01:55:49 +08:00
Dmitry Stogov
8527657ca6 Fixed refcounting for references 2014-09-11 19:12:12 +04:00
Dmitry Stogov
b8c36e199e Simplify ASSIGN code 2014-09-11 17:00:06 +04:00
Nikita Popov
e2d4d700cf Fix yy_limit computation after encoding switch
The three assignments above this line are still broken - they assume
that byte offsets in one encoding directly map to byte offsets in
another encoding.

I'm fixing the length here because it is the one causing out-of-bounds
reads and is easy to fix. For the others we'd have to actually compute
new offsets.
2014-09-11 14:52:59 +02:00
Nikita Popov
f017843df3 Remove self-contradictory zend multibyte assertion
Code that explicitly exists to handle an incompatible internal
encoding should not assert that the internal encoding is compatible.
2014-09-11 14:52:59 +02:00
Dmitry Stogov
82096dc151 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) 2014-09-11 12:29:54 +04:00
Dmitry Stogov
c07a0dbcb9 Don't miss warning messages 2014-09-10 13:02:01 +04:00
Tjerk Meesters
b192ff155d Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixed #67985 - Incorrect last used array index copied to new array after unset

Conflicts:
	Zend/zend_variables.c
2014-09-09 19:32:09 +08:00
Tjerk Meesters
7e9daf60c1 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed #67985 - Incorrect last used array index copied to new array after unset
2014-09-09 18:03:10 +08:00
Tjerk Meesters
aca474fa14 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed #67985 - Incorrect last used array index copied to new array after unset
2014-09-09 18:00:49 +08:00
Tjerk Meesters
99f0760bfb Fixed #67985 - Incorrect last used array index copied to new array after unset
In master zend_array_dup() is used to do this properly; this is a workaround.
2014-09-09 17:58:45 +08:00
Xinchen Hui
b625661248 Remove unnecessary branch/temp variable 2014-09-09 11:52:25 +08:00
Dmitry Stogov
7edd562787 Don't anload zend extensions if ZEND_DONT_UNLOAD_MODULES environment variable is set 2014-09-09 00:50:44 +04:00
Anatol Belski
9ee4a40f27 made Visual Studio to understand that zend_error_noreturn() will not return
- windows only, on linux gcc would cause a warning that the function returns,
  as no noreturn functions are used
- ZEND_NORETURN works on windows as well now, using __declspec(noreturn),
  which is useful for the other cases
- one more function call will be needed, which is not critical for the
  error reporting
- the way is open to enable the same for gcc as soon as it's not causing a warning
2014-09-08 20:34:26 +02:00
Nikita Popov
af84d5737c Fix parser stack destruction with dummy ENCAPSED_AND_WHITESPACE
T_ENCAPSED_AND_WHITESPACE is now specified to always hold a value,
so give it a NULL value in the dummy cases.
2014-09-08 13:57:28 +02:00
Dmitry Stogov
e85545eca5 Removed IS_STR_OFFSET type and corresponding macros. Optimized string offset handling in ASSIGN_DIM opcode. 2014-09-08 15:46:45 +04:00
Dmitry Stogov
be835b2d70 Fixed comments and removed useless code. 2014-09-08 11:08:05 +04:00
Anatol Belski
cfa2b3bf63 fixed string index handling with references 2014-09-07 13:34:18 +02:00
Anatol Belski
acad6f4700 fix 64 bit string index usage 2014-09-07 00:55:36 +02:00
Nikita Popov
f4f9b54983 Revert "Move safe_address into zend_multiply.h"
This reverts commit 43b02e169c.

I'm getting symbol resolution issues for zend_error_noreturn in the
opcache.so, so reverting this for now.
2014-09-06 22:12:37 +02:00
Nikita Popov
43b02e169c Move safe_address into zend_multiply.h
This allows reuse in zend_arena_calloc.

Also renamed the function to zend_safe_address as it's no longer
private to the allocator.
2014-09-06 14:03:59 +02:00
Tjerk Meesters
47ac4612e9 Added test case to complement commit 29397f8 2014-09-06 18:57:03 +08:00
Nikita Popov
29397f8fd2 Fix $x .= $x
Also add a nice comment pointing out that concat runs on magic.
2014-09-06 12:26:41 +02:00
Levi Morrison
b476eca826 Error on multiple default blocks in a switch
Part of RFC: https://wiki.php.net/rfc/switch.default.multiple
2014-09-05 16:07:07 -06:00
Dmitry Stogov
7d0416f401 Fixed overflow check 2014-09-05 16:13:06 +04:00
Nikita Popov
828fe35381 Fix string increment 2014-09-05 12:45:42 +02:00
Dmitry Stogov
9a420f0361 Fixed support for C++ 2014-09-05 14:18:39 +04:00
Nikita Popov
08ca9e6d11 Fix overflow check for string concatenation
Also do the overflow check for both branches, not just the realloc
one.

And clean up the code a bit - move common parts outside of the
realloc/alloc branches.
2014-09-05 11:58:32 +02:00
Nikita Popov
f915b44070 Remove old zend_string_to_double function 2014-09-05 11:20:06 +02:00
Dmitry Stogov
92164f6b7b Fixed compilation warnings 2014-09-04 14:06:22 +04:00
Nikita Popov
964e1174b4 Fix Z_UL 2014-09-03 16:52:56 +02:00
Dmitry Stogov
5c897aa7da Preallocate hash tables of required size 2014-09-03 18:21:36 +04:00
Nikita Popov
6cceb54c09 Fix a number of format issues 2014-09-03 15:57:28 +02:00
Nikita Popov
979058d4ff Disable format string checking by default
Instead of removing format attributes altogether, disable the checks
by default. This allows you to do a build with format string checks
and filter out the false positives (basically anything mentioning
%p).
2014-09-03 15:38:06 +02:00
Nikita Popov
9e75353184 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.
2014-09-03 15:18:06 +02:00
Dmitry Stogov
c52511c307 Disabled usage of built-in functions in write context (e.g. strlen($s)[] = ...) 2014-09-03 16:30:48 +04:00
Dmitry Stogov
9a958a086d Simplify BEGIN_SILENCE/END_SILENCE to not modify ini entry value back and force 2014-09-03 15:17:50 +04:00
Dmitry Stogov
b0f0211b1a Revert "Fixed memory leaks"
This reverts commit 0940e54ffc.
2014-09-03 02:38:04 +04:00
Dmitry Stogov
0940e54ffc Fixed memory leaks 2014-09-03 02:07:38 +04:00
Dmitry Stogov
f0ad7472b0 Avoid memory allocation/deallocation in BEGIN_SILENCE/END_SILENCE opcode handlers. 2014-09-02 22:13:24 +04:00
Anatol Belski
d7700588a9 use portable strtol 2014-09-02 15:56:15 +02:00
Dmitry Stogov
e321170c18 Fixed memory leaks 2014-09-02 14:11:22 +04:00
Dmitry Stogov
f789568707 Fixed destruction on error 2014-09-02 09:46:27 +04:00
Stanislav Malyshev
d5b0606a62 Reintroduce fix from pull #770 in a PHP 7 way 2014-09-01 15:41:27 -07:00
Stanislav Malyshev
a7666a6041 Fix ZTS build 2014-09-01 15:41:00 -07:00
Stanislav Malyshev
1ff1a0dde2 Revert "Merge branch 'PHP-5.6'"
This reverts commit aaf5689f4d, reversing
changes made to 481bf25b6a.
2014-09-01 14:35:04 -07:00
Stanislav Malyshev
aaf5689f4d Merge branch 'PHP-5.6'
* PHP-5.6:
  update NEWS
  Only destruct if EG(active) in zend_shutdown(). (bug #65463, #66036)
  Fix typo from commit 32314f6b6
  Fix destruction order in zend_shutdown (bug #65463, #66036)

Conflicts:
	Zend/zend_compile.h
	Zend/zend_execute_API.c
2014-09-01 12:22:41 -07:00
Stanislav Malyshev
57f82819e9 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  update NEWS
  Only destruct if EG(active) in zend_shutdown(). (bug #65463, #66036)
  Fix typo from commit 32314f6b6
  Fix destruction order in zend_shutdown (bug #65463, #66036)
2014-09-01 12:20:34 -07:00
Stanislav Malyshev
4b9fcc01d4 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  update NEWS
  Only destruct if EG(active) in zend_shutdown(). (bug #65463, #66036)
  Fix typo from commit 32314f6b6
  Fix destruction order in zend_shutdown (bug #65463, #66036)
2014-09-01 12:15:54 -07:00
Stanislav Malyshev
197095c29e Merge branch 'pull-request/770' into PHP-5.4
* pull-request/770:
  Only destruct if EG(active) in zend_shutdown(). (bug #65463, #66036)
  Fix typo from commit 32314f6b6
  Fix destruction order in zend_shutdown (bug #65463, #66036)
2014-09-01 12:11:42 -07:00
Dmitry Stogov
88d7ca44f6 Refactored INI subsystem to use zend_string* instead of char* 2014-09-01 20:57:33 +04:00
Tjerk Meesters
8064b1f4f7 Fixed 'long' -> 'zend_long' for call to 'is_numeric_string_ex()' 2014-09-01 22:49:12 +08:00
Tjerk Meesters
5d5a7b1f7f Merge branch 'PHP-5.6'
* PHP-5.6:
  Updated UPGRADING for #38409
  Updated NEWS for #38409
  Added test case
  Making ini parser typed - Added ZEND_INI_SCANNER_TYPED mode for parse_ini_string() and parse_ini_file() - Added NULL_NULL token to separate it from BOOL_FALSE and BOOL_TRUE - Added zend_ini_copy_typed_value() function for zval initialisation - Updated RETURN_TOKEN() to observe scanner_mode

Conflicts:
	Zend/zend_ini_parser.y
	Zend/zend_ini_scanner.c
2014-09-01 22:43:17 +08:00
Tjerk Meesters
5270ee1aef Making ini parser typed
- Added ZEND_INI_SCANNER_TYPED mode for parse_ini_string() and parse_ini_file()
- Added NULL_NULL token to separate it from BOOL_FALSE and BOOL_TRUE
- Added zend_ini_copy_typed_value() function for zval initialisation
- Updated RETURN_TOKEN() to observe scanner_mode
2014-09-01 22:04:06 +08:00
Anatol Belski
d4a05d1990 fix C89 compat 2014-08-31 21:58:05 +02:00
Nuno Lopes
51ce4bd87c add a few more patterns to .gitignore 2014-08-31 15:19:14 +01:00
Nikita Popov
c59292570c Merge branch 'PHP-5.6'
Conflicts:
	Zend/zend_compile.c
2014-08-30 20:45:10 +02:00
Nikita Popov
d7368c2531 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.
2014-08-30 20:43:34 +02:00
Nikita Popov
b73bea9cc8 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.
2014-08-29 21:53:09 +02:00
Nikita Popov
545fd5168e 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.
2014-08-29 21:02:10 +02:00
Nikita Popov
25d57aace3 Introduce optional_expr 2014-08-29 18:51:58 +02:00
Nikita Popov
c6a5c3c6c5 Remove parenthesis_expr
This was necessary previously to handle yields, now it only clutters
up the grammar.
2014-08-29 18:46:46 +02:00
Nikita Popov
7722d2c584 Simplify argument production 2014-08-29 18:42:05 +02:00
Anatol Belski
d3fb1859f0 restore the old behavior for the assignment to string offset 2014-08-29 17:28:53 +02:00
Anatol Belski
451856420c data type fixes 2014-08-29 12:53:37 +02:00
Xinchen Hui
0763d6b98d use zend_string_equals_ci 2014-08-29 13:19:14 +08:00
Xinchen Hui
49bd049b7e Keep folder mark style in this file 2014-08-29 13:05:58 +08:00
Johannes Schlüter
6592706340 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
2014-08-29 01:34:46 +02:00
Nikita Popov
ae7e663330 Fix bug #67922 2014-08-29 00:18:38 +02:00
Andrea Faulds
389d285973 Special-case aliases, add warning comments to implementations 2014-08-29 00:10:52 +02:00
Anatol Belski
898e1570a2 fixed trim() and strtok() to work with big strings 2014-08-28 21:59:00 +02:00
Anatol Belski
d6faac2cb2 make array/object APIs accept large strings as values of elements/props 2014-08-28 19:17:47 +02:00
Anatol Belski
d6930c9a87 replace llabs with imaxabs
both are gcc built-in but imaxabs doesn't require C99 compat (see man)
2014-08-28 18:58:24 +02:00
Anatol Belski
7f6d2b124b fix format 2014-08-28 17:03:40 +02:00
Anatol Belski
d3bfbc079f remove duplicate condition already present a line upper 2014-08-28 17:03:39 +02:00
Anatol Belski
8e4e765f7e better alignment, won 8 byte on 64 bit with default alignment 2014-08-28 12:12:24 +02:00
Anatol Belski
6890830ec0 fix number format 2014-08-28 12:07:39 +02:00
Anatol Belski
bf84517b64 fix dir separator 2014-08-28 11:56:27 +02:00
Xinchen Hui
6a7c60540b Merge branch 'master' of https://git.php.net/repository/php-src 2014-08-28 17:37:00 +08:00
Dmitry Stogov
b4f2588513 Merge branch 'master' of git.php.net:php-src
* 'master' of git.php.net:php-src:
  fix pg_last_notice()
  Changed 'unsigned size_t' to 'size_t'
  Fixed segfaults after change size_t of "s"
  Fixed zend extensions multipy-times loadable
  Revert "Fixed incompatible pointer type"
  fix hash_pbkdf2()
2014-08-28 13:13:52 +04:00
Xinchen Hui
ff0045ea67 Fixed typo 2014-08-28 17:05:21 +08:00
Xinchen Hui
671caa6255 Fixed zend extensions multipy-times loadable 2014-08-28 15:13:57 +08:00
Dmitry Stogov
319ce224d2 LOAD_REGS() is not used anymore 2014-08-28 10:55:16 +04:00
Tjerk Meesters
6954bd4ff6 Merged PR 785 - Fixed ZEND_INT_(MIN/MAX) constants in signed multiplication
ZEND_INT_MIN and ZEND_INT_MAX should be ZEND_LONG_MIN and ZEND_LONG_MAX respectively.
2014-08-28 08:33:18 +08:00
Dmitry Stogov
f2b0370193 Use 'const' qualifier for pointrs to code used at run-time (the code must not be changed) 2014-08-28 02:44:06 +04:00
Andrea Faulds
e622e28972 Fixed constants in Zend/zend_multiply.h
Conflicts:
	Zend/zend_multiply.h
2014-08-27 19:54:02 +01:00
Anatol Belski
3234480827 first show to make 's' work with size_t 2014-08-27 20:49:31 +02:00
Dmitry Stogov
ee552b628c Reorder fields for better nenory consumtion and data locality on 64-bit systems 2014-08-27 22:45:27 +04:00
Dmitry Stogov
b1f53ca415 Use efree_size() instead of efree() where posible 2014-08-27 20:49:56 +04:00
Dmitry Stogov
8ec40397cd Cleanup IS_VAR handling 2014-08-27 19:10:29 +04:00
Tjerk Meesters
a79b933384 Fixed corruption of execute_data when ZEND_STRLEN has to cast an object to string. 2014-08-27 23:00:11 +08:00
Xinchen Hui
24ab7b53f2 It should be int 2014-08-27 12:14:57 +08:00
Xinchen Hui
8b87534468 Fixed folder mark 2014-08-27 12:13:17 +08:00
Ferenc Kovacs
86b2d7b523 remove the -dev suffix from the Zend version 2014-08-27 03:52:46 +02:00
Andrea Faulds
7379abba8f Fixed Closure::apply() for int64 2014-08-27 02:05:50 +01:00
Andrea Faulds
17c5e82816 Merge branch 'master' into Closure_apply 2014-08-27 01:53:26 +01:00
Nikita Popov
1984a49b71 Fix zend_highlight functionality I broke
Magic consts are not supposed to be highlighted as keywords.
2014-08-27 01:26:57 +02:00
Nikita Popov
f3b629c982 Move =&new deprecation message into compiler 2014-08-26 23:36:53 +02:00
Nikita Popov
f8abb9a462 Handle remaining magic constants in parser as well
As far as I can see the !filename case cannot occur, so I dropped
it.
2014-08-26 23:36:52 +02:00
Dmitry Stogov
219794e1cd Split and optimize loop 2014-08-27 00:52:50 +04:00
Nikita Popov
49b4e12e54 Add backup_doc_comment production
Bison can't detect the type of a mid-rule action, even if it accesses
$<str>$, so need to create a separate rule for this.
2014-08-26 22:31:58 +02:00
Nikita Popov
b7876e734a eval() with parse error uses clean shutdown now 2014-08-26 22:31:58 +02:00
Nikita Popov
6c687e0d9b Add type annotations to parser
Conflicts:

	Zend/zend_language_parser.y
2014-08-26 22:31:58 +02:00
Nikita Popov
c71ab607ff Don't alloc empty jmp opnum list for single-branch if 2014-08-26 22:31:57 +02:00
Anatol Belski
cd8bbfa149 fixed bitset computing on win64 build 2014-08-26 20:43:33 +02:00
Dmitry Stogov
cb37fe1aae Fixed zero-size allocation in debug build 2014-08-26 21:32:20 +04:00
Anatol Belski
d285e346da temporary fix for win64 2014-08-26 16:27:14 +02:00
Dmitry Stogov
661f90d4d1 Replaced Zend Memory Manager 2014-08-26 16:21:58 +04:00
Anatol Belski
b63ab83256 several signature and data type fixes 2014-08-26 13:20:21 +02:00
Dmitry Stogov
d17790b35e Merge branch 'master' of git.php.net:php-src
* 'master' of git.php.net:php-src:
  fixed several long vs zend_long casts
2014-08-26 14:23:01 +04:00
Dmitry Stogov
055b632e7d Fixed return operand type (Use IS_TMP_VAR instead of IS_VAR in the same way as it was before AST patch) 2014-08-26 14:22:03 +04:00
Anatol Belski
202e8db1dc fixed several long vs zend_long casts 2014-08-26 11:26:53 +02:00
Dmitry Stogov
7cbbb37127 Fixed compile-time constants substitution 2014-08-26 13:06:19 +04:00
Anatol Belski
5d062b6160 renamed macro 2014-08-26 09:55:17 +02:00
Anatol Belski
baee5922c3 edit comment 2014-08-26 09:52:22 +02:00
Anatol Belski
5d030000c1 simplify zend_long defs even more 2014-08-26 09:49:54 +02:00
Anatol Belski
c429c74be9 generalize the zend_long stuff 2014-08-25 23:52:39 +02:00
Nikita Popov
59848e3fbb 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.
2014-08-25 23:46:43 +02:00
Nikita Popov
4ea19a682e make bp type uint32_t everywhere 2014-08-25 23:17:36 +02:00
Nikita Popov
d2a3bf9daf Fix compiler warnings 2014-08-25 23:08:01 +02:00
Nikita Popov
28e7beea66 Fix zend_longo_str 2014-08-25 22:47:04 +02:00
Nikita Popov
46b53e815c Add zend_string_equals and zend_string_equals_literal 2014-08-25 22:40:58 +02:00
Nikita Popov
899a1ed59a Merge branch 'ast'
Conflicts:
	Zend/zend_compile.c
2014-08-25 22:04:33 +02:00
Nikita Popov
6db293d5e0 Merge remote-tracking branch 'php-src/master' into ast
Conflicts:
	Zend/zend_compile.c
	Zend/zend_compile.h
	Zend/zend_globals.h
	Zend/zend_language_parser.y
	Zend/zend_language_scanner.c
	Zend/zend_language_scanner.l
	Zend/zend_types.h
2014-08-25 21:52:18 +02:00
Anatol Belski
af59e92b24 master renames phase 7 2014-08-25 21:51:49 +02:00
Anatol Belski
b9514bb8fd master renames phase 6 2014-08-25 21:26:42 +02:00
Anatol Belski
28b7a03318 master renamings phase 5 2014-08-25 21:20:44 +02:00
Anatol Belski
455741fce3 master renames phase 4 2014-08-25 20:57:25 +02:00
Anatol Belski
4d997f63d9 master renames phase 3 2014-08-25 20:22:49 +02:00
Nikita Popov
7813d85d3d Fix for C89 2014-08-25 19:46:21 +02:00
Anatol Belski
6f9f0bf205 master renames phase 2 2014-08-25 19:28:33 +02:00
Anatol Belski
c3e3c98ec6 master renames phase 1 2014-08-25 19:24:55 +02:00
Anatol Belski
70de6180d5 fixes to %pd format usage 2014-08-24 02:35:34 +02:00
Keyur Govande
437612f656 Only destruct if EG(active) in zend_shutdown(). (bug #65463, #66036) 2014-08-23 14:17:37 +00:00
Tjerk Meesters
d1d0f55e22 Use %d instead of object id 2014-08-23 08:09:08 +08:00
Tjerk Meesters
32e8d0f03e Fixed test case based on var_dump() changes made in c1965f58d4 2014-08-23 08:06:47 +08:00
krakjoe
3f4811c76e fix wrong type causing build error 2014-08-22 18:30:13 +01:00
Anatol Belski
21a45d9aca Merge remote-tracking branch 'php/master' 2014-08-21 15:55:56 +02:00
Dmitry Stogov
b9a5db2b55 Fixed incorrect string length 2014-08-21 17:30:34 +04:00
Anatol Belski
f7c8213741 fix zpp 2014-08-21 15:25:39 +02:00
Anatol Belski
8b2f1ac177 fix zpp 2014-08-21 15:23:05 +02:00
Anatol Belski
8e94fbfc6a Merge remote-tracking branch 'php/master' 2014-08-21 14:38:43 +02:00
Dmitry Stogov
b0a54673f4 Fixed wrong test. Value of the static property must not be changed to string. 2014-08-21 16:15:01 +04:00
Anatol Belski
7ef536e4c9 Merge remote-tracking branch 'php/master'
Conflicts:
	Zend/zend_exceptions.c
2014-08-21 13:54:15 +02:00
Dmitry Stogov
16b4d90fa9 Separate values before conversion 2014-08-21 14:30:52 +04:00
Anatol Belski
8d6ef99a39 Merge remote-tracking branch 'php/master' 2014-08-21 09:21:31 +02:00
Dmitry Stogov
92ac625b94 Fixed incorrect string length comparison 2014-08-21 11:17:24 +04:00
Dmitry Stogov
887c12da77 dtor handler must be set 2014-08-21 11:17:05 +04:00
Anatol Belski
d15360c1dd Merge remote-tracking branch 'php/master' 2014-08-21 08:39:46 +02:00
Dmitry Stogov
4c6fb62702 Fixed get_resources() prototype comments 2014-08-21 09:49:35 +04:00
Anatol Belski
cd18b5884b Merge remote-tracking branch 'php/master' 2014-08-20 23:27:26 +02:00
Anatol Belski
6d54e89916 Merge remote-tracking branch 'php/master' 2014-08-20 21:29:49 +02:00
Dmitry Stogov
8cda420ff4 Fixed ext/pdo_*/tests/pdo_005.phpt tests failure 2014-08-20 23:28:32 +04:00
Dmitry Stogov
cf09bc7825 Fixed bug #67874 (Crash in array_map()) 2014-08-20 22:06:15 +04:00
Dmitry Stogov
9507aa99fc Fixed immutable array support 2014-08-20 21:42:49 +04:00
Anatol Belski
be1b1e7b41 fix index type 2014-08-20 18:21:57 +02:00
Anatol Belski
66e7090e61 Merge remote-tracking branch 'php/master' 2014-08-20 18:19:37 +02:00
Anatol Belski
5eefbce083 fix types in virtual cwd 2014-08-20 17:49:52 +02:00
Dmitry Stogov
d37820ff5b Introduced get_resources() function.
It may be used for debugging and testing to identify resource leaks.
Changed ext/standard/tests/http/bug60570.phpt to use this function instead of unsafe attempt to catch resource leaks using get_memory_usage()
2014-08-20 18:29:44 +04:00
Dmitry Stogov
04aa96d28d Removed a hack that allowed passing of function return value by reference depending on value of reference-counter (Fixed Zend/tests/bug35393.phpt test failure) 2014-08-20 15:04:40 +04:00
Anatol Belski
07359785c3 Merge remote-tracking branch 'php/master' 2014-08-20 08:48:43 +02:00
Dmitry Stogov
8ea7e4e4e2 fixed memory leak 2014-08-20 10:43:37 +04:00
Andrea Faulds
342265badb Just return, no need for RETURN_NULL() 2014-08-20 00:11:11 +01:00
Anatol Belski
53a8d8e627 Merge remote-tracking branch 'php/master' 2014-08-20 00:34:17 +02:00
Andrea Faulds
676ed04d0d Use zend_ polyfilled nan/finite, check finite 2014-08-19 22:03:16 +01:00
Dmitry Stogov
14439b79b4 Fixed referenced value separation 2014-08-20 00:00:59 +04:00
Andrea Faulds
b3ba0f6ab0 Prevent bit shift count wrapping quirkiness on some CPUs for left shift 2014-08-19 20:21:23 +01:00
Andrea Faulds
cb770cdc03 Cast NaN and Infinity to zero 2014-08-19 20:21:23 +01:00
Andrea Faulds
38bc0a05c0 Prevent bit shift count wrapping quirkiness on some CPUs for right shift 2014-08-19 20:21:23 +01:00
Andrea Faulds
6a94568f82 Return FALSE on bit shift by negative number 2014-08-19 20:21:22 +01:00
Nikita Popov
0a230fb4db Fix add_class_name_literal (thanks laruence) 2014-08-19 12:01:54 +02:00
Nikita Popov
69f0deb399 Fix ast size computation in case of zero children 2014-08-19 11:38:09 +02:00
Anatol Belski
97c5172ac7 Merge remote-tracking branch 'php/master'
Conflicts:
	ext/date/lib/parse_date.c
2014-08-19 08:27:43 +02:00
Dmitry Stogov
f3106998b0 Improved error message 2014-08-18 21:47:30 +04:00
Dmitry Stogov
0f5bad93fd Fixed bug #67856 (Leak when using array_reduce with by-ref function) 2014-08-18 21:08:50 +04:00
Nikita Popov
ced6d3068a Merge branch 'master' into ast 2014-08-18 18:16:11 +02:00
Nikita Popov
26a9dc3e04 Fix bug #67858: Leak when $php_errormsg already set 2014-08-18 18:14:19 +02:00
Nikita Popov
458f67cd21 Fix encoding declaration handling
As the encoding declaration influences lexing it needs to be
immidiately handled in the parser.
2014-08-18 16:27:53 +02:00
Andrea Faulds
594a768fef Revert "Fixed closure::bindTo bad args test"
This reverts commit 668d0683cd.
2014-08-18 14:51:40 +01:00
Andrea Faulds
56e6a45c41 Accuracy 2014-08-18 14:50:05 +01:00
Andrea Faulds
2f40631716 Fixed issues spotted by code review 2014-08-18 14:47:57 +01:00
Anatol Belski
22dbb38d5e fix typo 2014-08-18 10:37:38 +02:00
Anatol Belski
59ec8329f4 renamed _z_param_long 2014-08-18 10:35:46 +02:00
Anatol Belski
483a800c98 Merge remote-tracking branch '64bit_ng/master'
Conflicts:
	Zend/zend_API.h
2014-08-18 10:34:29 +02:00
Anatol Belski
c586133d07 rename zval_get_long and fixes to some string functions 2014-08-18 08:39:39 +02:00
Dmitry Stogov
f3dc4421ff Fixed parameter parsing 2014-08-18 10:08:48 +04:00
Andrea Faulds
333a465751 Comment clarification 2014-08-18 00:03:56 +01:00
Andrea Faulds
429bbd7081 Old comment, whitespace 2014-08-17 23:54:23 +01:00
Andrea Faulds
59010bff01 Don't allow unbound scoped closures; make ->call used passed object as scope 2014-08-17 23:47:47 +01:00
Nikita Popov
2a26cbb70e Fix dtor in do_free as well
We should expose zval_ptr_dtor_nogc outside zend_execute
2014-08-17 21:47:23 +02:00
Andrea Faulds
3f468cd1c7 Removed unused variable 2014-08-17 20:21:12 +01:00
Andrea Faulds
6d187d53ae Fixed and cleaned up implementaton of Closure::call() for phpng 2014-08-17 20:20:23 +01:00
Anatol Belski
f2182ab845 some more pure naming replacements 2014-08-17 21:16:27 +02:00
Anatol Belski
025a7c304e fix THIS_HASHVAL 2014-08-17 21:04:52 +02:00
Nikita Popov
1bab755a35 Fix GC when opcache is in use 2014-08-17 19:15:54 +02:00
Andrea Faulds
e35c8ae13e Merge branch 'master' into Closure_apply
Conflicts:
	Zend/zend_closures.c
	Zend/zend_closures.h
	Zend/zend_execute_API.c
	Zend/zend_vm_def.h
2014-08-17 17:20:02 +01:00
Anatol Belski
90d6f60bc1 mostly fixes to spl, but also some other 2014-08-17 13:31:39 +02:00
Nikita Popov
84e757d22d Drop znode extended attribute and unused union members 2014-08-17 00:37:45 +02:00
Nikita Popov
904a83a137 Merge remote-tracking branch 'php-src/master' into ast
Conflicts:
	ext/opcache/Optimizer/optimize_func_calls.c
2014-08-16 22:31:13 +02:00
Nikita Popov
ee3d28ed33 Fix compile_args semantics 2014-08-16 22:29:15 +02:00
Nikita Popov
ef5f3390e7 Implement a[0] syntax from merge 2014-08-16 22:13:33 +02:00
Nikita Popov
38a173916c Fix merge 2014-08-16 22:08:02 +02:00
Timm Friebe
3db67313c9 Fix nesting for *non*-compile-time-resolveable functions
See a1a4ba9511 (commitcomment-7414223)
2014-08-16 22:03:56 +02:00
Timm Friebe
971d369d88 Add tests for calls to nested, *non*-compile-time-resolveable functions
See a1a4ba9511 (commitcomment-7414362)
2014-08-16 22:03:03 +02:00
Nikita Popov
71675a4bf8 Merge remote-tracking branch 'php-src/phpng' into ast
Conflicts:
	Zend/zend_ast.c
	Zend/zend_compile.c
	Zend/zend_language_parser.y

Incomplete merge!
2014-08-16 21:55:08 +02:00
Timm Friebe
a1a4ba9511 Make list of opcodes used for nesting calculation consistent
with `zend_do_convert_call_user_func()` in Zend/zend_compile.c
2014-08-16 17:47:21 +02:00
Timm Friebe
c3d214aa08 MFH 2014-08-16 17:38:20 +02:00
Anatol Belski
864172d9a4 further fixes to ext/standard and zend 2014-08-16 17:31:40 +02:00
Anatol Belski
5bb25776a0 further fixes on core 2014-08-16 15:34:04 +02:00
Anatol Belski
1169de3e61 fix some cases with fast zpp 2014-08-16 14:00:02 +02:00
Anatol Belski
b7e7a89541 several fixes -
- param parsing Z_PARAM_STR vs Z_PARAM_STRING
- some functions for new params
- etc
2014-08-16 12:55:13 +02:00
Anatol Belski
cb25136f4e fix macros in the 5 basic extensions 2014-08-16 11:37:14 +02:00
Anatol Belski
8ee2a4a9b5 first shot on merging the core fro the int64 branch 2014-08-16 11:16:11 +02:00
Nikita Popov
9cfbf333b0 Fix list() = string refcounting 2014-08-15 22:36:22 +02:00
Nikita Popov
919cb32f72 Fix memory usage test
Can't use peak memory usage because memory usage during compilation
is now larger
2014-08-15 17:44:15 +02:00
Nikita Popov
471f13b75e Fix s&r mistake 2014-08-15 17:27:57 +02:00
Nikita Popov
c4460dd162 Restore old evaluation order
${a()}[b()][c()] = d() will now evaluate in order a, b, c, d.
2014-08-15 17:10:06 +02:00
Dmitry Stogov
b01b971ec0 Parameters with duplicate names are not allowed anymore in PHP7. 2014-08-15 11:46:04 +04:00
Dmitry Stogov
0d57a7bf34 Merge branch 'master' of git.php.net:php-src
* 'master' of git.php.net:php-src:
  Update Version Number :)
  Fixed initializing
  Unused variable

Conflicts:
	main/php_version.h
2014-08-15 11:13:42 +04:00
Dmitry Stogov
d9f3eac12f Bump version to 7.0.0-dev 2014-08-15 11:10:41 +04:00
Xinchen Hui
d7f12b9b9c Fixed initializing 2014-08-15 13:52:52 +08:00
Dmitry Stogov
6463bc5b55 Fixed mode 2014-08-14 23:54:32 +04:00
Dmitry Stogov
c78a1734c2 Fixed compilation warnings 2014-08-14 23:53:27 +04:00
Dmitry Stogov
773d80c6df Fixed support for references 2014-08-14 22:44:25 +04:00
Dmitry Stogov
e7ffdb2654 Fixed support for references 2014-08-14 21:54:57 +04:00
Dmitry Stogov
05ca575bbb Fixed reference support (references to references are not allowed) 2014-08-14 17:00:01 +04:00
Dmitry Stogov
e430948581 Fixed reference handling 2014-08-14 15:07:39 +04:00
Dmitry Stogov
2ece977c80 Fixed conversion of empty packed array into hash 2014-08-14 13:44:37 +04:00
Dmitry Stogov
25bda5ae3c Fixed assignment of reference to itself 2014-08-14 12:01:28 +04:00
Xinchen Hui
c749fe2067 cleanup 2014-08-14 12:15:24 +08:00
Keyur Govande
5e338836ff Fix typo from commit 32314f6b6 2014-08-14 01:14:11 +00:00
Keyur Govande
32314f6b67 Fix destruction order in zend_shutdown (bug #65463, #66036)
If Apache or a similar SAPI receives a signal during PHP processing
it calls zend_shutdown() without calling shutdown_executor().
	#65463: If a module like Gearman or Memcached is loaded,
in the unfixed version it is unloaded by zend_destroy_modules() before the
CG(CLASS_TABLE) is destructed. When CG(CLASS_TABLE) is destructed,
any pointers to methods (specifically around destruction) in the unloaded
module's .so are now dangling and the process segfaults.
	#66036: Any subclasses of an internal class like ArrayObject need
to be destructed in order: subclass first and then the internal class. In the
unfixed version zend_shutdown() clears the CG(CLASS_TABLE) from the head
of the list onwards, so internal classes are destructed first and user-defined
classes last. Internal classes are alloc/deallocated with malloc/free while
user-defined classes with emalloc/efree. If there's shared data between them
then efree() could be called instead of free() leading to a seg-fault.
2014-08-14 00:55:14 +00:00
Dmitry Stogov
8013a27ad9 Implemented ext/com_dotnet support for phpng 2014-08-11 18:37:26 +04:00
Dmitry Stogov
0ae305e62d Fixed compilation warnings about unused labels 2014-08-11 10:17:06 +04:00
krakjoe
1d01e2334c fix incorrect cast of comparison function and signature of function 2014-08-11 06:47:09 +01:00
krakjoe
dc70139d85 update zend_make_printable_zval to take TSRM context 2014-08-11 06:09:46 +01:00
krakjoe
4513475a41 fix ZTS build 2014-08-10 09:31:02 +01:00
Dmitry Stogov
4a3e501fb3 cleanup 2014-08-08 13:47:34 +04:00
Dmitry Stogov
50a76860bd Fixed GC for inner-loops (ext/standard/tests/array/compact_variation1.phpt).
Fixed bug #63734.
2014-08-07 18:50:03 +04:00
Dmitry Stogov
414762fc12 Fixed GC (Zend/tests/bug63635.phpt) 2014-08-06 15:31:07 +04:00
Dmitry Stogov
e677e8cc87 Fixed ext/wddx/tests/bug48562.phpt 2014-08-05 23:48:27 +04:00
Dmitry Stogov
ce1af1e47b Fixed bug #67725 (now we create immutable arrays only in SHM) 2014-08-05 15:38:43 +04:00
Dmitry Stogov
7301994c28 Merge branch 'master' into phpng
* master: (46 commits)
  PHP_INT_MIN and _MAX tests
  NEWS and UPGRADING
  Added PHP_INT_MIN
  Fix wrong lenght size
  Bug #51096 - Remove unnecessary ? for first/last day of
  Moved streams related functions to xp_ssl.c
  Remove duplicate NEWS
  Update NEWS
  Update NEWS
  Update NEWS
  BFN
  BFN
  Fixed bug #67715 (php-milter does not build and crashes randomly).
  We need to turn off any strict mode here for this warning to show up
  Disable restrictions regarding arrays in constants at run-time. For the discussion around it, see the thread on the mailing list: http://www.mail-archive.com/internals@lists.php.net/msg68245.html
  Revert "Fix bug #67064 in a BC safe way"
  Updated NEWS for #67693
  Updated NEWS for #67693
  Fixed bug #67693 - incorrect push to the empty array
  add missing entry to NEWS
  ...

Conflicts:
	Zend/tests/errmsg_040.phpt
	Zend/tests/ns_059.phpt
	Zend/zend_language_parser.y
	Zend/zend_vm_def.h
	ext/openssl/openssl.c
	ext/reflection/php_reflection.c
	ext/session/session.c
	ext/spl/spl_directory.c
	ext/spl/spl_iterators.c
	ext/sqlite3/sqlite3.c
	ext/standard/array.c
2014-08-04 13:56:27 +04:00
Andrea Faulds
668d0683cd Fixed closure::bindTo bad args test 2014-08-03 14:48:14 +01:00
Andrea Faulds
a748f454a8 Merge branch 'master' into Closure_apply 2014-08-01 17:02:11 +01:00
Dmitry Stogov
c201ba8fff execute_data->return_value should be initialized when call internal constructors 2014-07-31 10:51:49 +04:00
Dmitry Stogov
f693cf8e66 EA must be initialized 2014-07-31 10:50:27 +04:00
Nikita Popov
6cf89612db Support doc comments for propreties 2014-07-30 19:12:48 +02:00
Nikita Popov
8e9a840a53 Mark some small functions as inline 2014-07-30 18:27:41 +02:00
Bob Weinand
3c0adf2dcd Merge branch 'PHP-5.6' 2014-07-30 18:07:01 +02:00
Bob Weinand
d5ddd2dbb2 Disable restrictions regarding arrays in constants at run-time.
For the discussion around it, see the thread on the mailing list:
http://www.mail-archive.com/internals@lists.php.net/msg68245.html
2014-07-30 17:57:07 +02:00
Nikita Popov
ad5677e4cd Use ZVAL_COPY until proven wrong 2014-07-30 17:46:00 +02:00
Nikita Popov
0cd9cffb51 Rename _tmp_compile_const_expr
Also remove recursive immutization of arrays there, because this
is already handled when the array is created.
2014-07-30 17:44:43 +02:00
Nikita Popov
044e48d0b1 Weaker recursion during pre-evaluation 2014-07-30 17:29:59 +02:00
Nikita Popov
3630f03f8f Immutable arrays for the recursive case as well 2014-07-30 13:43:04 +02:00
Andrea Faulds
85bf8b4ff1 Fixed unbound scoped closure edge cases and added tests for them 2014-07-30 03:21:44 +01:00
Andrea Faulds
f65bdda469 Rename ::apply to ::call for the sake of JS consistency 2014-07-30 01:26:53 +01:00
Nikita Popov
8cab06f09b Immutablize constant leaf arrays
Still haven't entirely figured out how to elegantly handle the
recursive variant.
2014-07-29 23:31:49 +02:00
Nikita Popov
6a13a22f9d Fix segfault when class name evaluates to IS_CONST 2014-07-29 23:17:54 +02:00
Nikita Popov
763eb13d6e Formatting 2014-07-29 21:00:19 +02:00
Andrea Faulds
d67ec70a4c Added test for unbound_scoped 2014-07-29 19:08:21 +01:00
Nikita Popov
438b1e3d42 build_runtime_definition_key returns zend_string* 2014-07-29 20:01:11 +02:00
Andrea Faulds
ded5b3fda4 Added optional bool param $unbound_scoped to Closure::bind and ::bindTo 2014-07-29 18:59:36 +01:00
Dmitry Stogov
70fb0e7519 Fixed incinsitency in passing arguments by reference to call_user_func() 2014-07-29 20:27:48 +04:00
Dmitry Stogov
507e3b9193 fixed support for references 2014-07-29 15:29:22 +04:00
Dmitry Stogov
cad6408a3f Fixed Zend/tests/bug54265.phpt 2014-07-29 14:34:43 +04:00
Dmitry Stogov
046db57049 Fixed incorrect destruction (it might lead to crash) 2014-07-29 12:13:47 +04:00
Dmitry Stogov
21dec5f511 ext/interbase support (incomplete) 2014-07-29 10:15:01 +04:00
Andrea Faulds
167128d854 Implemented Closure::apply 2014-07-29 02:36:17 +01:00
Nikita Popov
18f0680779 Change current_namespace to a zend_string* 2014-07-28 22:38:26 +02:00
Nikita Popov
047a994830 For filenames a pointer comparison is sufficient 2014-07-28 22:30:24 +02:00
Nikita Popov
e9fb72c8ea Rename to zend_str_equals_literal and turn into a macro
So we can make of sizeof rather than strlen
2014-07-28 22:20:43 +02:00
Nikita Popov
c8d3b5909e zend_str_equals_str(_ci) 2014-07-28 22:16:24 +02:00
Nikita Popov
8c724c205d Use zend_str_equals more often 2014-07-28 22:07:11 +02:00
Nikita Popov
7889050685 Add zend_ prefix for emit_op(_tmp) 2014-07-28 22:03:16 +02:00
Nikita Popov
cf7f0c412d zend_ast_create determined child count automatically 2014-07-28 18:18:47 +02:00
Nikita Popov
39d480e471 Remove zend_ast_create_unary etc 2014-07-28 17:59:12 +02:00
Nikita Popov
e403b27a40 Remove old macro/function 2014-07-28 15:55:30 +02:00
Nikita Popov
4c05bec536 Remove some unused compiler globals 2014-07-28 15:52:18 +02:00
Nikita Popov
31a886c346 More dead code 2014-07-28 15:43:39 +02:00
Nikita Popov
55f53e29a0 zend_get_class_fetch_type works on zend_string 2014-07-28 15:39:43 +02:00
Nikita Popov
50aefcf075 Remove duplicate code 2014-07-28 15:29:56 +02:00
Nikita Popov
2306655214 We don't pay per newline... 2014-07-28 15:26:30 +02:00
Nikita Popov
38c4125c2e Cleanup dead/duplicate code 2014-07-28 15:23:00 +02:00
Nikita Popov
a2925df653 Use zend_ast_get_str where possible 2014-07-28 15:16:35 +02:00
Nikita Popov
1d79fb308b Add zend_ast_list* variant to parser stack element 2014-07-28 15:10:58 +02:00
Nikita Popov
f29b84ab46 Minor cleanups in AST code 2014-07-28 14:51:08 +02:00
Nikita Popov
187ff135f2 zend_do_op_data -> zend_emit_op_data 2014-07-28 12:55:37 +02:00
Nikita Popov
d3cb239305 Use separate node type for lists
This saves storing the children count for normal ast nodes.
2014-07-28 12:06:57 +02:00
Nikita Popov
21eb6807c9 Store lineno for zval ast nodes more efficiently 2014-07-27 13:25:32 +02:00
Nikita Popov
d0943edf49 Remove last EA usages
Still retaining the EA field in znode as it is used by opcache
2014-07-27 12:49:26 +02:00
Nikita Popov
bea85f58bb Use more specific parser stack nodes 2014-07-27 12:46:54 +02:00
Nikita Popov
a74515e240 Separate class type and start lineno 2014-07-27 12:37:28 +02:00
Nikita Popov
0b86b1c8e5 Store doc comments in separate stack entry from start lineno 2014-07-27 12:31:17 +02:00
Nikita Popov
1ea9a2d934 Cleanup member modifier code 2014-07-27 12:19:01 +02:00
Nikita Popov
df42793cd2 Create namespace_name via AST 2014-07-26 21:53:50 +02:00
Nikita Popov
c07907121e zend_do_return -> zend_emit_final_return 2014-07-26 21:32:48 +02:00
Nikita Popov
4ca4b423be Make lexer return AST nodes 2014-07-26 21:22:54 +02:00
Nikita Popov
8c8839c2a1 Remove DUMMY_STRINGL
What is that for?
2014-07-26 19:03:36 +02:00
Nikita Popov
a51e00a8cd Add functions for create str/long ast directly 2014-07-26 19:01:14 +02:00
Nikita Popov
9344a95ac9 Remove dead code 2014-07-26 18:51:28 +02:00
Nikita Popov
17234d7895 Replicate old linenos for class binding 2014-07-26 18:36:57 +02:00
Nikita Popov
1bdc433259 Fix bugs 2014-07-26 18:23:46 +02:00
Nikita Popov
edd9fcab1e Fix leaks
Must find a good way to handle constant expressions...
2014-07-26 18:08:31 +02:00
Nikita Popov
d46f67a3a7 Use arena allocator (currently leaky!) 2014-07-26 17:45:45 +02:00
Nikita Popov
1644bf01da Resolve futher interning issues
Not sure if this is the right way to do it ...
2014-07-24 21:35:57 +02:00
Nikita Popov
c777427c08 Fix interning bug 2014-07-24 21:07:37 +02:00
Nikita Popov
689891c2b2 Expose ast via CG(ast) 2014-07-24 20:51:01 +02:00
Nikita Popov
24ca6bb928 Add call_user_func optimization 2014-07-24 20:35:18 +02:00
Nikita Popov
cec747234d Implement call_user_func_array optimization 2014-07-24 19:22:46 +02:00
Dmitry Stogov
466816d4ef Fixed string destruction (class_name might be reused and stored somewhere in __autoload()). 2014-07-24 14:11:21 +04:00
Dmitry Stogov
7c6477ce37 Merge branch 'master' into phpng
* master:
  Removed second zval_copy_ctor()
  Fixed crash on self-referencing constant expression (part of a constant AST)
  Fixed support for constant arrays in context of "const" statement (Zend/tests/constant_expressions_arrays.phpt failed when opcache.protect_memort was set)

Conflicts:
	Zend/zend_ast.c
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
	ext/reflection/php_reflection.c
2014-07-24 01:54:21 +04:00
Dmitry Stogov
8fb7c4dc08 Merge branch 'PHP-5.6'
* PHP-5.6:
  Removed second zval_copy_ctor()
2014-07-24 01:16:28 +04:00
Dmitry Stogov
ea1d5dcacb Removed second zval_copy_ctor() 2014-07-24 01:16:00 +04:00
Dmitry Stogov
39740a33e5 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixed crash on self-referencing constant expression (part of a constant AST)
2014-07-24 00:59:42 +04:00
Dmitry Stogov
d909b6330e Fixed crash on self-referencing constant expression (part of a constant AST) 2014-07-24 00:37:15 +04:00
Dmitry Stogov
4c37e69957 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixed support for constant arrays in context of "const" statement (Zend/tests/constant_expressions_arrays.phpt failed when opcache.protect_memort was set)
2014-07-23 22:49:46 +04:00
Dmitry Stogov
c49a06168e Fixed support for constant arrays in context of "const" statement (Zend/tests/constant_expressions_arrays.phpt failed when opcache.protect_memort was set) 2014-07-23 22:47:58 +04:00
Nikita Popov
0356e07a05 Implement ZEND_DEFINED optimization 2014-07-22 23:30:57 +02:00
Nikita Popov
7892b89465 Implement ZEND_TYPE_CHECK optimization 2014-07-22 23:15:47 +02:00
Nikita Popov
2ee490ba3a Implement ZEND_STRLEN optimization 2014-07-22 22:57:38 +02:00
Nikita Popov
f21d8bc23b CT bind args before unpack 2014-07-22 20:41:45 +02:00
Nikita Popov
1859674061 Port ZEND_BIND_GLOBAL optimization 2014-07-22 20:24:47 +02:00
Nikita Popov
d4d4b69e72 Merge branch 'phpng' into ast
Conflicts:
	Zend/zend_compile.c
	Zend/zend_compile.h
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h

Some of dmitry's optimizations are not merged in yet!
2014-07-22 18:24:58 +02:00
Dmitry Stogov
f163f625e8 fixed "isset($array[true]);" 2014-07-22 18:40:29 +04:00
Dmitry Stogov
f81956cb3e Fixed GC bug 2014-07-22 18:39:58 +04:00
Nikita Popov
43b2973ee7 Remove declare_stack 2014-07-22 16:18:13 +02:00
Nikita Popov
a7fc995fa2 Dead code 2014-07-22 16:11:54 +02:00
Nikita Popov
b9be66ebf2 Implement declare() 2014-07-22 16:11:19 +02:00
Nikita Popov
2653b8b5dc Handle __halt_compiler() 2014-07-22 15:50:23 +02:00
Nikita Popov
3becdb3376 __halt_compiler() without haling compiler 2014-07-22 14:25:19 +02:00
Nikita Popov
de2f132f33 Add NS error checks
Those can probably be implemented in a better way now...
2014-07-22 14:08:52 +02:00
Nikita Popov
776800b0a0 Discard NS doc comments 2014-07-22 13:54:54 +02:00
Dmitry Stogov
f2a2fccece Merge branch 'master' into phpng
* master:
  fix nmake snap when ext name is different in target dll
  force atoll macro usage on windows
  Enable $ replacement in exif, ldap, pdo_pgsql and tidy
  See bug #67635
  NEWS
  NEWS
  improve previous, add message during configure
  Fixed bug #67635 php links to systemd libraries without using pkg-config
  Improve fix for #66608
  Fixed segfault with empty break
  New added opcodes don't need to be resloved
  Update NEWS
  Update NEWS
  Update NEWS
  Fixed bug #66827 Session raises E_NOTICE when session name variable is array
  implemented copy libs of core exts in phpize mode
  fix copy the ext dll into the prefix path in phpize mode
  fix default prefix in phpize mode
  fix file with zero size usage in phpize mode

Conflicts:
	Zend/zend_opcode.c
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
	ext/session/session.c
2014-07-22 15:42:17 +04:00
Nikita Popov
130b6340d2 Code cleanup 2014-07-22 13:30:26 +02:00
Nikita Popov
cc0bef6636 Fix namespace\, maybe 2014-07-22 13:25:47 +02:00
Nikita Popov
9c69c41a64 Port top level stmt
Problem: namespace\foo no longer works :/
2014-07-22 13:02:51 +02:00
Nikita Popov
8a2ff6b53d Partial NS port (semicolon, no errors) 2014-07-22 12:45:44 +02:00
Nikita Popov
b6c9eb21d4 Port constant declaration 2014-07-22 11:55:07 +02:00
Dmitry Stogov
821b8bbb39 Fixed support for executor override 2014-07-22 11:24:16 +04:00
Dmitry Stogov
ea17b018d8 Fixed dtrace support 2014-07-22 11:12:49 +04:00