summaryrefslogtreecommitdiff
path: root/Zend/zend_opcode.c
Commit message (Collapse)AuthorAgeFilesLines
...
* eliminated unnecessary iterations during request startup/shutdownDmitry Stogov2010-07-061-21/+50
|
* Fixed bug #51822i (Segfault with strange __destruct() for static class ↵Dmitry Stogov2010-06-101-2/+14
| | | | variables)
* Fixed ZTS buildDmitry Stogov2010-05-241-1/+1
|
* Added caches to eliminate repeatable run-time bindings of functions, ↵Dmitry Stogov2010-05-241-8/+51
| | | | classes, constants, methods and properties
* Refactored part of the Traits implementation.Stefan Marr2010-05-021-40/+51
| | | | | | | | # - renamed php_runkit_function_copy_ctor to _duplicate_function # REM: runkit does not compile with trunk at the moment, fixing it would introduce even more version #ifs, don't know what the best way is to fix it # - extracted traits related stuff from destroy_zend_class into _destroy_zend_class_traits_info # - need to investigate implementation/handling of internal classes further before enabling internal traits
* Implemented Traits for PHP as proposed in the RFC [TRAITS]Stefan Marr2010-04-221-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # 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 concept of interned strings. All strings constants known at compile ↵Dmitry Stogov2010-04-201-3/+3
| | | | time are allocated in a single copy and never changed.
* Changed the structure of op_array.opcodes. The constant values are moved ↵Dmitry Stogov2010-04-201-26/+25
| | | | from opcode operands into a separate literal table
* sed -i "s#1998-2009#1998-2010#g" **/*.c **/*.h **/*.phpSebastian Bergmann2010-01-051-1/+1
|
* MFH: Make pass_two visible to extensions with ZEND_API (required for optimizer).Brian Shire2009-06-051-1/+1
|
* MFH: Bump copyright year, 3 of 3.Sebastian Bergmann2008-12-311-1/+1
|
* MFH: - Updated unary_op_type typedef with TSRMLS_DCMatt Wilmas2008-08-291-19/+22
| | | | | | - Added binary_op_type typedef - Added missing ZEND_BOOL_XOR to get_binary_op()
* Use IS_CV for dirrent access to $this variableDmitry Stogov2008-05-071-1/+1
|
* MFH: Implemented "jump label" operator (limited "goto")Felipe Pena2008-03-281-0/+5
| | | | | [DOC]
* Implemented concept of "delayed early binding" that allows opcode caches to ↵Dmitry Stogov2008-03-181-2/+4
| | | | | | | | | | | | | | | | | | | | | | 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
|
* - MFH Improved version of ternary shortcut (Marcus)Johannes Schlüter2007-11-211-0/+1
|
* - MFH: Initialize the reserved resource bits so that they can be reliably used.Derick Rethans2007-11-181-0/+2
|
* MFH: Added macros for managing zval refcounts and is_ref statusesYiduo (David) Wang2007-10-071-4/+4
|
* Improved memory usage by movig constants to read only memory. (Dmitry, Pierre)Dmitry Stogov2007-09-271-2/+2
|
* WIN64 supportDmitry Stogov2007-04-161-1/+1
|
* Fixed bug #40236 (php -a function allocation eats memory)Dmitry Stogov2007-02-151-2/+4
|
* MFH: Bump year.Sebastian Bergmann2007-01-011-1/+1
|
* Fixed possible crash in interactive modeDmitry Stogov2006-04-101-2/+4
|
* zend_hash_apply() doesn't use ZEND_HASH_APPLY_... macrosDmitry Stogov2006-03-141-1/+1
|
* Optimized cleanup loops on request shutdownDmitry Stogov2006-03-131-3/+13
|
* - Update copyright notices to 2006Andi Gutmans2006-01-041-1/+1
|
* Fixed bug #34729 (Crash in ZTS mode under Apache)Dmitry Stogov2005-12-011-7/+9
|
* Support for class constants and static members for internal classesDmitry Stogov2005-09-011-5/+9
|
* Bump up the yearfoobar2005-08-031-1/+1
|
* - Commit the variable fetch optimization.Andi Gutmans2004-10-041-0/+13
| | | | | | | - Extensions which delete global variables need to use new special function - delete_global_variable() (I'm about to rename it) to remove them. - Will post to internals@ or via commit messages if there's anything else.
* - Commit new VM architecture. This one allows people (aka Derick) toAndi Gutmans2004-09-231-1/+3
| | | | | | - ask the engine to use function handler mode. Will update the README - about that.
* - Roll back VM commitAndi Gutmans2004-09-091-3/+1
|
* - Some architectural changes:Andi Gutmans2004-09-081-1/+3
| | | | | | | | | | | | | a) We specialize opcodes according to op_type fields. Each opcode has to be marked with which op_type's it uses. b) We support different execution methods. Function handlers, switch() and goto dispatching. goto seems to be the fastest but it really depends on the compiler and how well it optimizes. I suggest playing around with optimization flags. - Warning: Things might break so keep us posted on how things are going. (Dmitry, Andi)
* Revert goto opcodeSara Golemon2004-07-291-6/+0
|
* Add goto operator by popular request.Sara Golemon2004-07-291-0/+7
|
* Fixed Zend Function Destructor to use correct TSRM handle.Stefan Esser2004-06-061-0/+7
|
* - Abstract methods cannot have defaults for argumentsZeev Suraski2004-02-251-0/+1
| | | | | | - Make function foo($a, $b=null) satisfy both foo($a) and foo($a, $b) prototypes
* ws fixfoobar2004-02-201-23/+5
|
* OptimizeZeev Suraski2004-02-041-4/+1
|
* Rewrote exception support. Fixes a few limitations and bugs in the oldZeev Suraski2004-02-031-0/+5
| | | | | | | | | | | implementation, and allows exceptions to 'fire' much earlier than before. Instructions on how to use the new mechanism will follow on internals@ shortly... Note - this (most probably) breaks the current implementation of set_exception_handler()
* - Happy new year and PHP 5 for rest of the files too..foobar2004-01-081-1/+1
| | | | | # Should the LICENSE and Zend/LICENSE dates be updated too?
* This check shouldn't be necessaryZeev Suraski2003-08-041-3/+1
|
* Fix crashMarcus Boerger2003-08-031-2/+6
|
* ntroduce infrastructure for supplying information about arguments,Zeev Suraski2003-08-031-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | including: - Whether or not to pass by ref (replaces the old arg_types, with arg_info) - Argument name (for future use, maybe introspection) - Class/Interface name (for type hints) - If a class/interface name is available, whether to allow a null instance Both user and builtin functions share the same data structures. To declare a builtin function that expects its first arg to be an instance of class 'Person', its second argument as a regular arg, and its third by reference, use: ZEND_BEGIN_ARG_INFO(my_func_arg_info, 0) ZEND_ARG_OBJ_INFO(0, someone, Person, 1) ZEND_ARG_PASS_INFO(0) ZEND_ARG_PASS_INFO(1) ZEND_END_ARG_INFO(); and use my_func_arg_info as the arg_info parameter to the ZEND_FE() family of macros. The first arg to each ZEND_ARG_*() macro is whether or not to pass by ref. The boolean arg to ZEND_BEGIN_ARG_INFO() tells the engine whether to treat the arguments for which there's no explicit information as pass by reference or not. The boolean argument to ZEND_ARG_OBJ_INFO() (4th arg) is whether or not to allownull values.
* Remove namespace leftoversStanislav Malyshev2003-07-231-3/+0
|
* - ZE coding style requires if ( instead of if(Andi Gutmans2003-06-301-2/+2
|
* updating license information in the headers.James Cox2003-06-101-1/+1
|
* MEGA-patch: namespaces are R.I.P.Stanislav Malyshev2003-06-021-34/+0
|
* Bugfix #23670: implements and extends cause Apache 2 crashMarcus Boerger2003-06-011-1/+1
|