summaryrefslogtreecommitdiff
path: root/Zend/zend_compile.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix bug #60022Nikita Popov2015-04-061-1/+1
|
* Bump yearXinchen Hui2015-01-151-1/+1
|
* Merge branch 'PHP-5.4' into PHP-5.5Stanislav Malyshev2014-09-011-0/+2
|\ | | | | | | | | | | | | | | * 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)
| * Merge branch 'pull-request/770' into PHP-5.4Stanislav Malyshev2014-09-011-0/+2
| |\ | | | | | | | | | | | | | | | | | | * 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)
| | * Fix destruction order in zend_shutdown (bug #65463, #66036)Keyur Govande2014-08-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | Bump yearXinchen Hui2014-01-031-1/+1
| | |
* | | Improve fix for #66608Xinchen Hui2014-07-191-2/+2
| | |
* | | Fixed bug #66608 (Incorrect behavior with nested "finally" blocks)Xinchen Hui2014-07-181-0/+3
| | |
* | | Bump yearXinchen Hui2014-01-031-1/+1
| | |
* | | Merge branch 'PHP-5.4' into PHP-5.5Dmitry Stogov2013-03-281-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-5.4: Fixed bug #64529 (Ran out of opcode space) Conflicts: NEWS Zend/zend_execute_API.c Zend/zend_language_scanner.c Zend/zend_language_scanner_defs.h
| * | Fixed bug #64529 (Ran out of opcode space)Dmitry Stogov2013-03-281-1/+1
| |/
| * Happy New YearXinchen Hui2013-01-011-1/+1
| |
* | Fixed bug #61025 (__invoke() visibility not honored)Xinchen Hui2013-03-081-0/+1
| |
* | Class Name Resolution As Scalar Via "class" KeywordLars Strojny2013-01-191-0/+2
| |
* | Fixed bug #63980 (object members get trimmed by zero bytes)Xinchen Hui2013-01-141-1/+3
| |
* | Happy New YearXinchen Hui2013-01-011-1/+1
| |
* | Merge branch 'PHP-5.4' into PHP-5.5Dmitry Stogov2012-12-251-9/+4
|\ \ | |/ | | | | | | * PHP-5.4: Traits refactoring
| * Traits refactoringDmitry Stogov2012-12-251-9/+4
| |
* | An exception thrown in try or catch block is disacarded by return statement ↵Dmitry Stogov2012-12-131-0/+1
| | | | | | | | in finally block.
* | Optimized access to temporary and compiled VM variablesDmitry Stogov2012-12-041-2/+5
| |
* | . The VM stacks for passing function arguments and syntaticaly nested calls ↵Dmitry Stogov2012-11-301-3/+15
| | | | | | | | | | | | were merged into a single stack. The stack size needed for op_array execution is calculated at compile time and preallocated at once. As result all the stack push operatins don't require checks for stack overflow any more. . Generators implementation was improved using the new VM stack. Now it's a bit more clear and faster.
* | Improved "finally" im[plementationDmitry Stogov2012-11-221-2/+4
| |
* | Merge branch 'PHP-5.4'Dmitry Stogov2012-09-051-0/+2
|\ \ | |/ | | | | | | | | | | | | * PHP-5.4: Fixed bug #62907 (Double free when use traits) Conflicts: NEWS
| * Fixed bug #62907 (Double free when use traits)Dmitry Stogov2012-09-051-0/+2
| |
* | Merge branch 'generators'Gustavo Lopes2012-09-011-0/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generators: (70 commits) Fix typos Fix segfault when traversing a by-ref generator twice Make sure that exception is thrown on rewind() after closing too Remove implementation stubs for yield delegation Fix several issues and allow rewind only at/before first yield Run finally if generator is closed before finishing Finally with return now works in generators too Add dedicated opcode for returns from a generator Disallow serialization and unserialization Fix zts build (typo) Drop Generator::close() method Forgot to add test Support trivial finally in generators (no yield, no return) Fix implementation of Iterator interface Add T_YIELD in tokenizer_data.c Throw error also for return occuring before yield Fix throwing of exceptions within a generator Remove reference restrictions from foreach Require parenthesis around yield expressions Add some more tests ...
| * \ Merge remote-tracking branch 'php-src/master' into addGeneratorsSupportNikita Popov2012-08-261-0/+1
| |\ \ | | | | | | | | | | | | | | | | | | | | Conflicts: Zend/zend_language_parser.y Zend/zend_vm_execute.skl
| * | | Remove implementation stubs for yield delegationNikita Popov2012-08-251-1/+0
| | | | | | | | | | | | | | | | | | | | I decided to leave out yield delegation for an initial proposal, so remove the stubs for it too.
| * | | Merge remote-tracking branch 'php-src/master' into addGeneratorsSupportNikita Popov2012-08-241-1/+3
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Zend/zend_vm_def.h Zend/zend_vm_execute.h
| * \ \ \ Merge remote-tracking branch 'php-src/master' into addGeneratorsSupportNikita Popov2012-08-201-2/+5
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merging master to fix Windows build Conflicts: Zend/zend_language_scanner.c Zend/zend_language_scanner_defs.h Zend/zend_vm_def.h
| * \ \ \ \ Merge remote-tracking branch 'php-src/master' into addGeneratorsSupportNikita Popov2012-08-131-6/+4
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is just an intial merge. It does not yet make generators and finally work together. Conflicts: Zend/zend_language_scanner.c Zend/zend_language_scanner_defs.h Zend/zend_vm_def.h Zend/zend_vm_execute.h Zend/zend_vm_execute.skl Zend/zend_vm_opcodes.h
| * | | | | | Require parenthesis around yield expressionsNikita Popov2012-07-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If yield is used in an expression context parenthesis are now required. This ensures that the code is unambiguos. Yield statements can still be used without parenthesis (which should be the most common case). Also yield expressions without value can be used without parenthesis, too (this should be the most common case for coroutines). If the yield expression is used in a context where parenthesis are required anyway, no additional parenthesis have to be inserted. Examples: // Statements don't need parenthesis yield $foo; yield $foo => $bar; // Yield without value doesn't need parenthesis either $data = yield; // Parentheses don't have to be duplicated foo(yield $bar); if (yield $bar) { ... } // But we have to use parentheses here $foo = (yield $bar); This commit also fixes an issue with by-ref passing of $foo[0] like variables. They previously weren't properly fetched for write. Additionally this fixes valgrind warnings which were caused by access to uninitialized memory in zend_is_function_or_method_call().
| * | | | | | Remove asterix modifier (*) for generatorsNikita Popov2012-07-201-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generators are now automatically detected by the presence of a `yield` expression in their body. This removes the ZEND_SUSPEND_AND_RETURN_GENERATOR opcode. Instead additional checks for ZEND_ACC_GENERATOR are added to the fcall_common helper and zend_call_function. This also adds a new function zend_generator_create_zval, which handles the actual creation of the generator zval from an op array. I feel like I should deglobalize the zend_create_execute_data_from_op_array code a bit. It currently changes EG(current_execute_data) and EG(opline_ptr) which is somewhat confusing (given the name).
| * | | | | | Add sceleton for yield* expressionNikita Popov2012-06-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This does not yet actually implement any delegation.
| * | | | | | Add support for yielding keysNikita Popov2012-05-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Keys are yielded using the yield $key => $value syntax. Currently this is implemented as a statement only and not as an expression, because conflicts arise considering nesting and use in arrays: yield yield $a => $b; // could be either yield (yield $a) => $b; // or yield (yield $a => $b); Once I find some way to resolve these conflicts this should be available as an expression too. Also the key yielding code is rather copy-and-past-y for the value yielding code, so that should be factored out.
| * | | | | | Add support for $generator->send()Nikita Popov2012-05-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Yield now is an expression and the return value is the value passed to $generator->send(). By default (i.e. if ->next() is called) the value is NULL. Unlike in Python ->send() can be run without priming the generator with a ->next() call first.
| * | | | | | Add zend_do_suspend_if_generator callsNikita Popov2012-05-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The execution of generator functions will be suspended right after the arguments were RECVed. This will be done in zend_do_suspend_if_generator.
| * | | | | | Add flag for generator functionsNikita Popov2012-05-191-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generator functions have to specify the * (asterix) modifier after the function keyword. If they do so the ZEND_ACC_GENERATOR flag is added to the fn_flags.
| * | | | | | - Year++Felipe Pena2012-01-011-1/+1
| | | | | | |
| * | | | | | Fixed bug #60104 (Segmentation Fault in pdo_sqlite when using ↵Dmitry Stogov2011-11-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | sqliteCreateFunction())
| * | | | | | Fixed ZE specific compile warnings (Bug #55629)Dmitry Stogov2011-09-131-12/+12
| | | | | | |
| * | | | | | - Added zend_is_auto_global_quick functionFelipe Pena2011-07-101-0/+1
| | | | | | |
| * | | | | | - Changed zend_resolve_class_name() prototypeFelipe Pena2011-07-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # No needed to pass fetch_type as pointer here
| * | | | | | - Fix broken code in 64bitFelipe Pena2011-06-201-0/+4
| | | | | | |
| * | | | | | - Minor optimization (avoid to re-hash already computed var name hash)Felipe Pena2011-06-191-0/+1
| | | | | | |
| * | | | | | - Avoid zend_do_ticks() call for each statement in parsingFelipe Pena2011-06-121-0/+1
| | | | | | |
* | | | | | | Fixed bug #62938 (zend_do_bind_catch() used without declaration)Xinchen Hui2012-08-271-0/+1
| |_|_|_|/ / |/| | | | |
* | | | | | Support list in foreachXinchen Hui2012-08-251-0/+1
| |_|_|/ / |/| | | | | | | | | | | | | | RFC: https://wiki.php.net/rfc/foreachlist
* | | | | Fixed bug that jmp in try block jmp over finally blockXinchen Hui2012-08-221-3/+3
| | | | | | | | | | | | | | | | | | | | Refactor the implemention, make codes clear
* | | | | stashXinchen Hui2012-08-221-1/+3
| |_|/ / |/| | |
* | | | tabXinchen Hui2012-08-181-1/+1
| | | |