summaryrefslogtreecommitdiff
path: root/Zend/zend_vm_opcodes.h
Commit message (Collapse)AuthorAgeFilesLines
* Happy New YearXinchen Hui2013-01-011-1/+1
|
* An exception thrown in try or catch block is disacarded by return statement ↵Dmitry Stogov2012-12-131-0/+1
| | | | in finally block.
* Restored proper generators behaviour in conjunction with "finally". (Nikita)Dmitry Stogov2012-12-121-1/+0
|
* . The VM stacks for passing function arguments and syntaticaly nested calls ↵Dmitry Stogov2012-11-301-0/+1
| | | | | | 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-1/+2
|
* Remove implementation stubs for yield delegationNikita Popov2012-08-251-2/+1
| | | | | I decided to leave out yield delegation for an initial proposal, so remove the stubs for it too.
* Add dedicated opcode for returns from a generatorNikita Popov2012-08-241-0/+1
| | | | | Generators don't have a return value, so it doesn't make sense to have a shared implementation here.
* Merge remote-tracking branch 'php-src/master' into addGeneratorsSupportNikita Popov2012-08-131-2/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Implemented 'finally' keywords for phpXinchen Hui2012-08-131-0/+1
| | | | | | | | | | | | | | RFC: https://wiki.php.net/rfc/finally FR: https://bugs.php.net/bug.php?id=32100 and I have got some improvment ideas(performance), will implemented later. thanks
* | 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 YIELD opcode implementationNikita Popov2012-05-261-0/+1
| |
* | Add ZEND_SUSPEND_AND_RETURN_GENERATOR opcodeNikita Popov2012-05-191-0/+1
|/ | | | | | | If the function is a generator this opcode will be invoked right after receiving the function arguments. The current implementation is just a dummy.
* - Year++Felipe Pena2012-01-011-1/+1
|
* Improved ternary operator performance when returning arraysArnaud Le Blanc2011-10-181-0/+2
|
* - Year++Felipe Pena2011-07-101-1/+1
|
* fix UMR when variable name is an object and __toString is usedStanislav Malyshev2011-03-161-1/+1
| | | | | # zend_call_function checks IS_REF on This
* - Year++Felipe Pena2011-01-011-1/+1
|
* Fixed bug #52614 (Memory leak when writing on uninitialized variable ↵Dmitry Stogov2010-08-251-0/+1
| | | | returned from method call)
* Implemented Traits for PHP as proposed in the RFC [TRAITS]Stefan Marr2010-04-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # 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)
* ZEND_RETURN is splitted into two new instructions ZEND_RETURN and ↵Dmitry Stogov2010-04-221-0/+1
| | | | ZEND_RETURN_BY_REF
* sed -i "s#1998-2009#1998-2010#g" **/*.c **/*.h **/*.phpSebastian Bergmann2010-01-051-1/+1
|
* MFH: Bump copyright year, 3 of 3.Sebastian Bergmann2008-12-311-1/+1
|
* Added support for lambda functions and closuresDmitry Stogov2008-07-141-0/+1
|
* MFH: Implemented "jump label" operator (limited "goto")Felipe Pena2008-03-281-0/+1
| | | | | [DOC]
* Implemented concept of "delayed early binding" that allows opcode caches to ↵Dmitry Stogov2008-03-181-132/+133
| | | | | | | | | | | | | | | | | | | | | | perform class declaration (early and/or run-time binding) in exactly the same order as vanila php. The following pseudo-code explains how it should be used in opcode cache. function cache_compile_file($filename) { if (!is_cached($filename)) { ... orig_compiler_options = CG(compiler_optins); CG(compiler_options) |= ZEND_COMPILE_IGNORE_INTERNAL_CLASSES | ZEND_COMPILE_DELAYED_BINDING; $op_array = orig_compile_file($filename); CG(compiler_options) = orig_copiler_options; ... } else { $op_array = restore_from_cache($filename); } zend_do_delayed_early_binding($op_array); }
* MFH: Bump copyright year, 2 of 2.Sebastian Bergmann2007-12-311-1/+1
|
* Speed-up of ZEND_DO_FCALL and ZEND_INIT_FCALL_BY_NAME by lowercasing and ↵Dmitry Stogov2007-11-221-0/+1
| | | | calculating hash values at compile time.
* - MFH Improved version of ternary shortcut (Marcus)Johannes Schlüter2007-11-211-0/+1
|
* NamespacesDmitry Stogov2007-09-281-0/+1
|
* MFH: Bump year.Sebastian Bergmann2007-01-011-1/+1
|
* - Update copyright notices to 2006Andi Gutmans2006-01-041-1/+1
|
* $id:$ tatgs are removed from generated files to avoid committing of ↵Dmitry Stogov2005-10-281-2/+2
| | | | Zend/zend_vm_opcodes.h without real changes.
* ZEND_UNSET_DIM_OBJ is splitted to ZEND_UNSET_DIM and ZEND_UNSET_OBJ.Dmitry Stogov2005-06-161-1/+2
|
* Fix so that extensions like xdebug, can overload opcodes in all execution ↵Dmitry Stogov2005-06-101-0/+1
| | | | modes including goto/switch
* Merge three opcodes (ZEND_NEW, ZEND_JMP_NO_CTOR, ZEND_INIT_CTOR) into one ↵Dmitry Stogov2005-06-101-2/+0
| | | | (ZEND_NEW). There was no real reason for this anymore and API should be changed before 5.1
* - Added missing header sections.foobar2005-01-101-0/+20
|
* - Oops missed this oneAndi Gutmans2004-10-271-0/+129