summaryrefslogtreecommitdiff
path: root/Zend/zend_compile.c
Commit message (Collapse)AuthorAgeFilesLines
* Removed useless void* parameter and replaced with zend_bool on ↵Bob Weinand2014-04-111-1/+1
| | | | zval_update_constant* functions
* Fix bug #66015 by reverting "Removed operations on constant arrays."Bob Weinand2014-04-111-45/+10
|
* Disallow use of positional args after unpackingNikita Popov2014-02-261-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit disallows the use of trailing positional arguments after argument unpacking was used. The following calls are no longer valid: fn(...$array, $var); fn(...$array1, $var, ...$array2); However, all of the following continue to be valid: fn($var, ...$array); fn(...$array1, ...$array2); fn($var, ...$array1, ...$array2); The reason behind this change is a stack allocation issue pointed out by Dmitry: As of PHP 5.5 the stack necessary for pushing arguments is precomputed and preallocated, as such the individual SEND opcodes no longer verify that there is enough stack space. The unpacked arguments will occupy some of that preallocated space and as such following positional arguments could write past a stack page boundary. An alternative resolution for this issue is to ensure that there is enough space for the remaining arguments in the UNPACK opcode. However making this allocation precise (rather than using a conversative over-estimate) would require some effort. Given that this particular aspect of the feature wasn't very popular in the first place, it doesn't seem worth the effort.
* Store arg_num in fcall entryNikita Popov2014-02-261-19/+19
| | | | | | | | Instead of storing the argument number in the znode of the parameter list, store it in fcall->arg_num. This mainly cleans up the parameter parsing code, which previously had to duplicate all rules (this becomes more excessive as more features are added, e.g. named params would already require a minimum of 14 rules...)
* Introduce zend_function_call_entry structureNikita Popov2014-02-261-20/+24
| | | | | | Instead of directly pushing the zend_function* onto the function_call_stack, push this structure. This allows us to store additional data on this stack.
* some missing pieces for __debugInfoAnatol Belski2014-02-201-0/+4
|
* Add __debugInfo() magic methodSara Golemon2014-02-171-0/+12
| | | | | | | | | | | | | | | class Foo { private $val = 'Random, meaningless data'; public function count() { return 42; } public function __debugInfo() { return ['count' => $this->count()]; } } $f = new Foo; var_dump($f);
* Implement argument unpackingNikita Popov2014-01-111-1/+44
| | | | RFC: https://wiki.php.net/rfc/argument_unpacking
* Minor cleanup in zend_do_pass_param()Nikita Popov2014-01-111-10/+7
|
* Bump yearXinchen Hui2014-01-031-1/+1
|
* Improved empty string handling. Now ZE uses an interned string instead of ↵Dmitry Stogov2013-12-261-2/+2
| | | | allocation new empty string each time. (Some extensions might need to be fixed using str_efree() instead of efree() to support interned strings).
* Save one char compareXinchen Hui2013-12-171-2/+2
|
* Fixed memory leaks introdused by:Dmitry Stogov2013-12-101-2/+2
| | | | | | commit 611da37617749c81ab22b1e44a0cc1f294cc493a Author: Igor Wiedler <igor@wiedler.ch> Date: Sat Nov 9 13:48:23 2013 -0500
* Fixed bug #66252 (Problems in AST evaluation invalidating valid parent:: ↵Dmitry Stogov2013-12-101-1/+1
| | | | reference. Constant expessions have to be evaluated in context of defining class).
* Merge branch 'use-function' of git://github.com/igorw/php-src into ↵Ferenc Kovacs2013-12-061-20/+220
|\ | | | | | | igorw-use-function
| * use ZVAL_ZVAL to init ZVAL from ZVALIgor Wiedler2013-11-091-6/+4
| |
| * Merge remote-tracking branch 'lgnome/use-function' into use-functionIgor Wiedler2013-11-081-1/+1
| |\ | | | | | | | | | | | | * lgnome/use-function: Only check user functions for filenames.
| | * Only check user functions for filenames.Adam Harvey2013-11-081-1/+1
| | |
| * | Merge pull request #4 from LawnGnome/use-functionIgor Wiedler2013-11-081-17/+30
| |\ \ | | |/ | | | FIX ALL THE THINGS
| | * Fix constant resolution.Adam Harvey2013-11-081-9/+22
| | |
| | * Remove now unused function_filenames struct.Adam Harvey2013-11-081-3/+0
| | |
| | * Look in the function_table instead of function_filenames for actually declaredAdam Harvey2013-11-081-8/+10
| | | | | | | | | | | | functions.
| | * Stop PHP from modifying the lowercase function name in place.Adam Harvey2013-11-081-1/+2
| | |
| * | Merge remote-tracking branch 'upstream/PHP-5.6' into use-functionIgor Wiedler2013-11-081-322/+291
| |\ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * upstream/PHP-5.6: (399 commits) Fixed issue #115 (path issue when using phar). Fixed issue #149 (Phar mount points not working with OPcache enabled). Added tests for PHAR/OPCahce incompatibilities Update NEWS Fixed bug #65947 (basename is no more working after fgetcsv in certain situation) Update NEWS Fixed Bug #66043 (Segfault calling bind_param() on mysqli) NEWS entry NEWS entry Fix bug #65946 - pdo_sql_parser.c permanently converts values bound to strings bump API versions Add a couple more test cases to parse_url() tests fix missing change from 'tcp_socket' to the more common 'server' fix many parallel test issues Cleanup temp test file Revert "Fixed issue #115 (path issue when using phar)." Update LiteSpeed SAPI code to V6.4 Fixed typo in Makefile.frag updated NEWS Remove outdate codes, make it clearer, although just a bit.. Update NEWS ... Conflicts: Zend/zend_compile.h
| * | Clarify type of use in error messagesIgor Wiedler2013-10-141-2/+2
| | |
| * | fix Zend/tests/ns_040.phpt failingMichael Wallner2013-09-191-5/+2
| | | | | | | | | | | | | | | | | | It was wrongly assumed the namespace has to be looked up in a case sensitive manner too. Fixed the lookup to use a lower case represenation of the import name.
| * | Fix issue with global fallback not in global spaceAnthony Ferrara2013-08-301-7/+9
| | |
| * | Handle case sensivity of constants (nikic)Igor Wiedler2013-08-251-23/+35
| | |
| * | Comment nitpick (nikic)Igor Wiedler2013-08-251-1/+1
| | |
| * | self and parent are valid function and const names (nikic)Igor Wiedler2013-08-251-7/+0
| | |
| * | Compile error on const definition conflicting with importIgor Wiedler2013-08-251-0/+14
| | |
| * | Disallow using functions/consts defined in the same fileIgor Wiedler2013-08-251-3/+38
| | | | | | | | | | | | | | | | | | * Keep track of defined function and const filenames * Prohibit use function foo if function foo exists * Prohibit use const foo if const foo exists
| * | Compile error on function definition conflicting with importIgor Wiedler2013-08-231-1/+15
| | |
| * | Removed assumption that \\ will be presentDanack2013-08-221-6/+10
| | | | | | | | | | | | | | | The function zend_add_ns_func_name_literal is called if the parser finds a function that is not in the global or current namespace. It assumes such a function will have a \\ in it, which is no longer true with the use function patch. The code change above removes that assumption and makes the test work: PASS use and use function with the same alias [Zend/tests/use_function/conflicting_use_alias.phpt]
| * | Import namespaced constants via new 'use const' sequenceIgor Wiedler2013-08-221-9/+38
| | |
| * | Correctly distinguish between functions and constantsIgor Wiedler2013-08-221-6/+18
| | | | | | | | | | | | | | | So far 'use function' applied to both constants and functions. This patch correctly separates the two.
| * | Add new 'use function' sequence for importing namespaced functionsIgor Wiedler2013-08-221-0/+77
| | | | | | | | | | | | | | | | | | This is specified as the use_function RFC: * https://wiki.php.net/rfc/use_function
* | | Merge branch 'PHP-5.5' into PHP-5.6Nikita Popov2013-11-301-1/+1
|\ \ \
| * | | Fixed bug #66041: list() fails to unpack yielded ArrayAccess objectNikita Popov2013-11-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Yield return values now use IS_VAR rather than IS_TMP_VAR. This fixes the issue with list() and should also be faster as it avoids doing a zval copy.
* | | | Merge branch 'const_scalar_exprs' into PHP-5.6Bob Weinand2013-11-281-6/+34
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Conflicts: Zend/zend_extensions.h
| * | | | Constant expressions refactoringDmitry Stogov2013-11-061-1/+16
| | | | |
| * | | | Merge branch 'const_scalar_exprs' of github.com:bwoebi/php-src into ↵Dmitry Stogov2013-11-061-6/+19
| |\ \ \ \ | | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | const_scalar_exprs * 'const_scalar_exprs' of github.com:bwoebi/php-src: Removed operations on constant arrays. They make no sense as constants are not allowed to be arrays. And as just properties are allowed to; no problem, we still don't need operations on any constant array. Added a few more operators Whitespace fix converted several switches to ifs and made more opcache friendly Fatal error about self referencing constants fixed Fixed mem leaks, added tests and ternary operator Working commit for constant scalar expressions (with constants). Tests will follow. Conflicts: Zend/Makefile.am configure.in win32/build/config.w32
| | * | | converted several switches to ifs and made more opcache friendlyBob Weinand2013-11-011-3/+1
| | | | |
| | * | | Working commit for constant scalar expressions (with constants).Bob Weinand2013-10-311-5/+20
| | | | | | | | | | | | | | | | | | | | Tests will follow.
* | | | | Removed deprecated AI_SET_PTR()sDmitry Stogov2013-11-271-1/+3
|/ / / /
* | | | Merge branch 'pull-request/500'Anatol Belski2013-11-051-1/+1
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * pull-request/500: limit virtual_cwd_activate() duplicated call to ZTS only reverted the previous commit, both calls are needed in TS mode virtual_cwd_activate() should be called only in one place back to do_alloca() removed unnecessary call simplify the state free macros compact the code to preserve the error info after state freeing back to do_alloca(), reverted the wrong replacement enabled windows to use stack in both ts/nts mode, some more fixes moved to do_alloca() usage where appropriate fixed invalid free fixed virtual cwd header in phar updated NEWS fixed all the places where last error could be lost preserve the error code applied and fixed the original patch initial move on renaming files and fixing includes Conflicts: ext/opcache/ZendAccelerator.c
| * | | initial move on renaming files and fixing includesAnatol Belski2013-10-171-1/+1
| | | |
* | | | Use zend_error_noreturn for all E_COMPILE_ERRORsNikita Popov2013-10-191-135/+135
|/ / /
* | | Merge branch 'PHP-5.5'Nikita Popov2013-10-161-0/+1
|\ \ \ | |/ /
| * | Merge branch 'PHP-5.4' into PHP-5.5Nikita Popov2013-10-161-0/+1
| |\ \