Commit Graph

399 Commits

Author SHA1 Message Date
Stanislav Malyshev
184dea7033 fix version - not -dev anymore since 5.5.0 release 2013-07-12 17:23:22 -07:00
Nikita Popov
fcc6611de9 Add support for non-scalar Iterator keys in foreach
RFC: https://wiki.php.net/rfc/foreach-non-scalar-keys
2013-03-12 17:27:31 +01:00
Xinchen Hui
4573405c5d Merge branch 'PHP-5.4' into PHP-5.5 2013-03-11 15:16:47 +08:00
Xinchen Hui
0444708c5c Disable zend_always_inline in debug build
it will be much more easier for debuging
2013-03-11 15:15:22 +08:00
Xinchen Hui
a666285bc2 Happy New Year 2013-01-01 16:37:09 +08:00
Xinchen Hui
0a7395e009 Happy New Year 2013-01-01 16:28:54 +08:00
Dmitry Stogov
bc0425c025 Removed deprecated fields 2012-12-25 10:47:43 +04:00
Dmitry Stogov
b8c719c068 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Traits refactoring
2012-12-25 10:33:01 +04:00
Dmitry Stogov
3f8c729e69 Traits refactoring 2012-12-25 10:23:08 +04:00
Dmitry Stogov
ff1e1d7a8e Removed redundand checks from release build 2012-12-13 14:46:44 +04:00
Lars Strojny
8788cddfb3 Prefix RESULT_CODE enum with ZEND_ 2012-08-26 20:06:47 +02:00
Stuart Langley
e3ef84c59b Strong types for the result codes SUCCESS & FAILURE. These are common
symbol names and using #defines can cause conflicts.
2012-08-26 17:15:27 +02:00
Sebastian Bergmann
0fa40bb999 Bump version. 2012-08-21 13:37:18 +02:00
Nuno Lopes
58d2203317 add support for the alloc_size __attribute__ (through ZEND_ATTRIBUTE_ALLOC_SIZE and ZEND_ATTRIBUTE_ALLOC_SIZE2
requires GCC >= 4.3 or clang >= 3.2 to perform anything useful
2012-05-23 22:18:01 -04:00
Stanislav Malyshev
dab17da38a make ZEND_SIGNALS configurable, off by default
also make ZEND_SIGNALS enabled and disabled binary-compatible
2012-02-16 01:51:45 +00:00
Stanislav Malyshev
fa9540e1f1 make ZEND_SIGNALS configurable, off by default
also make ZEND_SIGNALS enabled and disabled binary-compatible
2012-02-16 01:51:45 +00:00
Xinchen Hui
b31c12435c Fixed bug #60627 (httpd.worker segfault on startup with php_value) 2012-01-04 08:25:06 +00:00
Xinchen Hui
1c4f227553 Fixed bug #60627 (httpd.worker segfault on startup with php_value) 2012-01-04 08:25:06 +00:00
Felipe Pena
8775a37559 - Year++ 2012-01-01 13:15:04 +00:00
Felipe Pena
4e19825281 - Year++ 2012-01-01 13:15:04 +00:00
Antony Dovgal
a093491652 export zend_on_timeout handler from ZE 2011-11-22 03:39:12 +00:00
Antony Dovgal
e14819439c export zend_on_timeout handler from ZE 2011-11-22 03:39:12 +00:00
Dmitry Stogov
4a25a7740d Fixed ZE specific compile warnings (Bug #55629) 2011-09-13 13:29:35 +00:00
Dmitry Stogov
e43ff1359e Fixed ZE specific compile warnings (Bug #55629) 2011-09-13 13:29:35 +00:00
Hannes Magnusson
306c42023e Callable typehint following the rules of is_callable($arg, false); 2011-08-16 10:44:47 +00:00
Hannes Magnusson
550980cfe5 Callable typehint following the rules of is_callable($arg, false); 2011-08-16 10:44:47 +00:00
Ilia Alshanetsky
34d93f0c06 Zend Signal Handling 2011-06-22 14:23:21 +00:00
Stanislav Malyshev
e18618905c scalar types cleanup 2011-06-03 01:09:32 +00:00
Stanislav Malyshev
d7c9c5af92 scalar types cleanup 2011-06-03 01:09:32 +00:00
Ilia Alshanetsky
939875133a Zend Signal Handling (see RFC: https://wiki.php.net/rfc/zendsignals)
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
2011-06-02 21:16:50 +00:00
Stanislav Malyshev
b4dba12d34 Add options to debug_backtrace functions 2011-01-16 20:39:22 +00:00
Felipe Pena
0203cc3d44 - Year++ 2011-01-01 02:17:06 +00:00
Hartmut Holzgraefe
aaa2f1c30b marked char pointer arguments as const in lots of
places where strings pointed to are not modified 
to prevent compiler warnings about discarded qualifiers ...
2010-10-14 21:33:10 +00:00
Dmitry Stogov
f2df6a4a3e - Improved memory usage
. 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.
2010-09-15 07:38:52 +00:00
Ilia Alshanetsky
33fae4caa0 Added support for numeric & scalar type hint as defined within
http://wiki.php.net/rfc/typecheckingstrictandweak RFC
2010-05-24 18:32:59 +00:00
Dmitry Stogov
c5237d82bf Added caches to eliminate repeatable run-time bindings of functions, classes, constants, methods and properties 2010-05-24 14:11:39 +00:00
Derick Rethans
1bc9247651 - Added scalar typehinting. 2010-05-20 19:18:35 +00:00
Stefan Marr
cd6415f1a9 Implemented Traits for PHP as proposed in the RFC [TRAITS]
# 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)
2010-04-22 22:05:56 +00:00
Dmitry Stogov
e87d72002b Optimized access to global constants using values with pre-calculated hash_values from litersls table 2010-04-22 15:03:17 +00:00
Dmitry Stogov
7f18561bdc Updated version numbers 2010-04-20 11:17:25 +00:00
Dmitry Stogov
453b49ed20 Added a number of small performance tweaks and optimizations
. 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
2010-04-20 11:16:39 +00:00
Dmitry Stogov
dd5c478be6 Added concept of interned strings. All strings constants known at compile time are allocated in a single copy and never changed. 2010-04-20 11:05:54 +00:00
Johannes Schlüter
e0f91992c0 Add some const declarations, makes C++ extension writers happy 2010-03-30 23:14:19 +00:00
Rasmus Lerdorf
15e31de034 Fix gcc version check - bug #50771 2010-01-15 18:26:53 +00:00
Sebastian Bergmann
d2281d1dff sed -i "s#1998-2009#1998-2010#g" **/*.c **/*.h **/*.php 2010-01-05 20:46:53 +00:00
Felipe Pena
a94558c855 - Added MAKE_COPY_ZVAL(ppzv, pzv) macro 2009-12-08 01:57:37 +00:00
Pierre Joye
d198853416 - revert last commit, breaks the build and needs test case(s) 2009-09-06 15:56:58 +00:00
Moriyoshi Koizumi
e3c94d503a - Fix leaks. 2009-09-06 14:43:09 +00:00
Scott MacVicar
c54f6df978 Fix bug #48575 - Use dlopen() just like all the other *nixes instead of OSX specific code. 2009-08-06 01:33:54 +00:00
Rasmus Lerdorf
a7cc9e7274 Need the gcc version check here too 2009-06-17 08:55:23 +00:00