summaryrefslogtreecommitdiff
path: root/Zend/zend_execute_API.c
Commit message (Collapse)AuthorAgeFilesLines
* 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 #61273 (call_user_func_array with more than 16333 arguments leaks ↵Xinchen Hui2012-03-111-1/+1
| | | | | | | | / crashes)
| * MFH: Fixed bug #60978 (exit code incorrect)Xinchen Hui2012-03-021-1/+7
| |
| * Revert -r319102 and -r322922 in 5.4 branch since they introduce #60978Xinchen Hui2012-02-081-6/+2
| | | | | | | | | | | | Fixed #60978 in trunk without reverting previous fix #see http://news.php.net/php.internals/57789
| * - Reinstated correct return values after David's fix for #60218.Derick Rethans2012-01-291-2/+4
| |
| * Improved traits implementation. Now to support __CLASS__ constant in traits ↵Dmitry Stogov2012-01-171-4/+4
| | | | | | | | php doesn't have to copy the complete compiled method, but can reuse the same code. The resolution of __CLASS__ constants in methods defined in traits are delayed till run-time. This approach also made possible to use __CLASS__ constant as default value for traits properties and method arguments.
| * - Year++Felipe Pena2012-01-011-1/+1
| |
| * Fix #60218 (instantiating unknown class leads to memory leak in cli)David Soria Parra2011-11-121-1/+3
| |
| * Improved ternary operator performance when returning arraysArnaud Le Blanc2011-10-181-0/+1
| |
| * Fixed ZE specific compile warnings (Bug #55629)Dmitry Stogov2011-09-131-11/+12
| |
| * - fix build when no zend signal supportPierre Joye2011-09-081-0/+2
| |
| * Make timeouts work again for shutdown functions.Rasmus Lerdorf2011-09-071-0/+7
| | | | | | | | | | Fixes the faling lang/045 test
| * Since we have fci_cache = &fci_cache_local inside that blockRasmus Lerdorf2011-08-071-1/+1
| | | | | | | | | | | | and fci_cache is then later used outside the block, fci_cache_local can't be block-scoped here
| * Zend Signal HandlingIlia Alshanetsky2011-06-221-13/+15
| |
* | Happy New YearXinchen Hui2013-01-011-1/+1
| |
* | Removed unnecessary checksDmitry Stogov2012-12-131-2/+2
| |
* | Removed redundand checks from release buildDmitry Stogov2012-12-131-21/+1
| |
* | Optimized access to temporary and compiled VM variablesDmitry Stogov2012-12-041-9/+9
| |
* | . The VM stacks for passing function arguments and syntaticaly nested calls ↵Dmitry Stogov2012-11-301-8/+6
| | | | | | | | | | | | 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.
* | Use zend_execute_internal always to call internal functionsStanislav Malyshev2012-10-051-6/+3
| |
* | use zend_execute_internalStanislav Malyshev2012-10-041-10/+18
| |
* | Replace code with zend_clean_and_cache_symbol_table() callNikita Popov2012-09-161-9/+1
| | | | | | | | | | I replaced other instances of this code with the function call, but missed this one.
* | Remove asterix modifier (*) for generatorsNikita Popov2012-07-201-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
* | Fixed bug #61273 (call_user_func_array with more than 16333 arguments leaks ↵Xinchen Hui2012-03-111-1/+1
| | | | | | | | / crashes)
* | Revert -r319102 and -r322922 in 5.4 branch since they introduce #60978Xinchen Hui2012-02-081-2/+4
| | | | | | | | | | | | Fixed #60978 in trunk without reverting previous fix #see http://news.php.net/php.internals/57789
* | - Reinstated correct return values after David's fix for #60218.Derick Rethans2012-01-291-1/+3
| |
* | Improved traits implementation. Now to support __CLASS__ constant in traits ↵Dmitry Stogov2012-01-171-4/+4
| | | | | | | | php doesn't have to copy the complete compiled method, but can reuse the same code. The resolution of __CLASS__ constants in methods defined in traits are delayed till run-time. This approach also made possible to use __CLASS__ constant as default value for traits properties and method arguments.
* | - Year++Felipe Pena2012-01-011-1/+1
| |
* | Fix #60218 (instantiating unknown class leads to memory leak in cli)David Soria Parra2011-11-121-1/+3
| |
* | Improved ternary operator performance when returning arraysArnaud Le Blanc2011-10-181-0/+1
| |
* | Fixed ZE specific compile warnings (Bug #55629)Dmitry Stogov2011-09-131-11/+12
| |
* | - fix build when no zend signal supportPierre Joye2011-09-081-0/+2
| |
* | Make timeouts work again for shutdown functions.Rasmus Lerdorf2011-09-071-0/+7
| | | | | | | | | | Fixes the faling lang/045 test
* | Since we have fci_cache = &fci_cache_local inside that blockRasmus Lerdorf2011-08-071-1/+1
| | | | | | | | | | | | and fci_cache is then later used outside the block, fci_cache_local can't be block-scoped here
* | Zend Signal Handling (see RFC: https://wiki.php.net/rfc/zendsignals)Ilia Alshanetsky2011-06-021-13/+15
|/ | | | | | | | This needs to go into 5.4 as well, but will wait for Pierre to review win32 situation # Patch by Lucas Nealan, Arnaud Le Blanc, Brian Shire & Ilia Alshanetsky
* Fixed bug #54268 (Double free when destroy_zend_class fails)Dmitry Stogov2011-04-151-0/+2
|
* - Year++Felipe Pena2011-01-011-1/+1
|
* Fixed bug #52939 (zend_call_function does not respect ZEND_SEND_PREFER_REF)Dmitry Stogov2010-10-131-1/+2
|
* Fixed bug #52940 (call_user_func_array still allows call-time ↵Dmitry Stogov2010-10-011-11/+9
| | | | pass-by-reference). (cataphract@php.net)
* - Improved memory usageDmitry Stogov2010-09-151-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | . zend_function.pass_rest_by_reference is replaced by ZEND_ACC_PASS_REST_BY_REFERENCE in zend_function.fn_flags . zend_function.return_reference is replaced by ZEND_ACC_RETURN_REFERENCE in zend_function.fn_flags . zend_arg_info.required_num_args removed. it was needed only for internal functions. Now the first arg_info for internal function (which has special meaning) is represented by zend_internal_function_info structure. . zend_op_array.size, size_var, size_literal, current_brk_cont, backpatch_count moved into CG(context), because they are used only during compilation. . zend_op_array.start_op is moved into EG(start_op), because it's used only for 'interactive' execution of single top-level op-array. . zend_op_array.done_pass_two is replaced by ZEND_ACC_DONE_PASS_TWO in zend_op_array.fn_flags. . op_array.vars array is trimmed (reallocated) during pass_two. . zend_class_entry.constants_updated is replaced by ZEND_ACC_CONSTANTS_UPDATED in zend_class_entry.ce_flags . the size of zend_class_entry is reduced by sharing the same memory space by different information for internal and user classes. See zend_class_inttry.info union.
* - use interned strings for auto globalsDmitry Stogov2010-07-081-10/+0
| | | | | - $GLOBALS became a JIT autoglobal, so it's initialized only if used (this may affect opcode caches)
* eliminated unnecessary iterations during request startup/shutdownDmitry Stogov2010-07-061-1/+3
|
* - Fixed bug #51905 (ReflectionParameter fails if default value is an array ↵Felipe Pena2010-05-261-1/+13
| | | | with an access to self::)
* Fixed crash in Zend/tests/unset_cv09.phptDmitry Stogov2010-04-261-2/+2
|
* fix WSAntony Dovgal2010-04-231-1/+1
|
* Use fast class fetch functionDmitry Stogov2010-04-231-0/+2
|
* Implemented Traits for PHP as proposed in the RFC [TRAITS]Stefan Marr2010-04-221-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # RFC http://wiki.php.net/rfc/horizontalreuse#traits_-_reuse_of_behavior # Ok, here we go, I guess that will result in more discussion, which is fine # by me. But now, the patch is here, and properly archived. # # See below a list of notes to the patch, it also includes a list of # points which should be fixed # # Internals of the Traits Patch # ----------------------------- # # Open TODOs # """""""""" # # - Reflection API # - support for traits for internal classes # - currently destroy_zend_class does not handle that case # # Introduced Structures # """"""""""""""""""""" # # Data structures to encode the composition information specified in the # source: # - zend_trait_method_reference # - zend_trait_precedence # - zend_trait_alias # # Changes # """"""" # # zend_class_entry # - uses NULL terminated lists of pointers for # - trait_aliases # - trait_precedences # - do you prefer an explicit counter? # - the information is only necessary during class composition # but might be interesting for reflection # - did not want to blow up class further with not really necessary length counters # # added keywords # - trait # - insteadof # # Added opcodes # ZEND_ADD_TRAIT # - similar to ZEND_ADD_INTERFACE # - adds the trait to the list of traits of a class, no actual composition done # ZEND_BIND_TRAITS # - emitted in zend_do_end_class_declaration # - concludes the class definition and will initiate the trait composition # when the class definition is encountered during runtime # # Added Flags # ZEND_ACC_TRAIT = 0x120 # ZEND_ACC_IMPLEMENT_TRAITS = 0x400000 # ZEND_FETCH_CLASS_TRAIT = 14 # # zend_vm_execute.h # - not sure whether the handler initialization (ZEND_ADD_TRAIT_SPEC_HANDLER, # ZEND_BIND_TRAITS_SPEC_HANDLER) is correct, maybe it should be more selective # # zend_compile.c # - refactored do_inherit_method_check # split into do_inherit_method_check and do_inheritance_check_on_method # - added helper functions use a '_' as prefix and are not mentioned in the # headers # - _copy_functions # prepare hash-maps of functions which should be merged into a class # here the aliases are handled # - _merge_functions # builds a hash-table of the methods which need to be added to a class # does the conflict detection # - reused php_runkit_function_copy_ctor # - it is not identical with the original code anymore, needed to update it # think I fixed some bugs, not sure whether all have been reported back to runkit # - has to be renamed, left the name for the moment, to make its origin obvious # - here might be optimization potential # - not sure whether everything needs to be copied # - copying the literals might be broken # - added it since the literals array is freed by efree and gave problems # with doubled frees # - all immutable parts of the zend_op array should not be copied # - am not sure which parts are immutable # - and not sure how to avoid doubled frees on the same arrays on shutdown # - _merge_functions_to_class # does the final merging with the target class to handle inherited # and overridden methods # - small helper for NULL terminated lists # zend_init_list, zend_add_to_list # # zend_language_parser.y # - reused class definition for traits # - there should be something with regard to properties # - if they get explicitly defined, it might be worthwhile to # check that there are no collisions with other traits in a composition # (however, I would not introduce elaborate language features to control that # but a notice for such conflicts might be nice to the developers)
* Added a number of small performance tweaks and optimizationsDmitry Stogov2010-04-201-4/+32
| | | | | | | . ZEND_RECV now always has IS_CV as its result . ZEND_CATCH now has to be used only with constant class names . ZEND_FETCH_DIM_? may fetch array and dimension operans in a different order