Commit Graph

6325 Commits

Author SHA1 Message Date
Dmitry Stogov
bf05cc7490 Fixed test 2010-11-24 10:54:35 +00:00
Dmitry Stogov
ac71f49344 Added multibyte suppport by default. Previosly php had to be compiled with --enable-zend-multibyte. Now it can be enabled or disabled throug zend.multibyte directive in php.ini (regenerated scanner) 2010-11-24 05:42:52 +00:00
Dmitry Stogov
ab93d8c621 Added multibyte suppport by default. Previosly php had to be compiled with --enable-zend-multibyte. Now it can be enabled or disabled throug zend.multibyte directive in php.ini 2010-11-24 05:41:23 +00:00
Felipe Pena
7c541356f3 - Fixed compile warnings 2010-11-23 21:49:18 +00:00
Felipe Pena
201ab8bb8c - Fixed test 2010-11-23 21:45:22 +00:00
Dmitry Stogov
d72ac0771d Fixed bug #35547 (Segfault accessing static method) 2010-11-23 10:22:34 +00:00
Stefan Marr
4cc45507da Fixed problem reported by Patrick ALLAERT. Trait method was not applied properly when fully qualified. 2010-11-18 17:59:04 +00:00
Stefan Marr
6ad5c889a1 Added tests to for static support of traits.
# This was not tested and documented yet.
# Updated documentation in the RFC http://wiki.php.net/rfc/horizontalreuse
2010-11-17 23:05:20 +00:00
Felipe Pena
45189fa803 - Fixed bug #53306 (php crashes with segfault when DTrace "exception-thrown" probe fires)
patch by: mike at harschsystems dot com
2010-11-17 21:41:30 +00:00
Pierre Joye
d6723d57c0 - test for NULL deref fix 2010-11-17 17:26:33 +00:00
Pierre Joye
1d04f413cf - NULL deref fix, patch by Gustavo 2010-11-17 16:46:19 +00:00
Felipe Pena
565c484222 - Moved leak_variable() to zend_builtin_functions.c (Gustavo) 2010-11-15 17:06:27 +00:00
Felipe Pena
5f31c44509 - Add missing check 2010-11-14 01:38:52 +00:00
Felipe Pena
c95e919e3e - Fix the constant detection 2010-11-13 19:50:55 +00:00
Felipe Pena
b5b0599398 - Fixed bug #53305 (E_NOTICE when defining a constant starts with __COMPILER_HALT_OFFSET__)
- Fixed a part of bug #53260 (the __COMPILER_HALT_OFFSET__ name is not shown in the E_NOTICE)
2010-11-13 18:46:11 +00:00
Etienne Kneuss
105db96e78 Fixed covariance of return-by-ref constraints 2010-11-03 15:40:24 +00:00
Felipe Pena
e3ced0b540 - Reverted fix for bug #51176 2010-11-03 01:35:26 +00:00
Dmitry Stogov
68e154b1bf reduced size of temp_variariable 2010-10-22 14:51:07 +00:00
Dmitry Stogov
968bdc576c Simplified foreach() handling, we don't have to inctrement/decrement refcount twice 2010-10-22 13:59:23 +00:00
Dmitry Stogov
d12098eeec Fixed crash on attempt to insert reference to string offset into an array 2010-10-22 11:05:22 +00:00
Dmitry Stogov
635f3aff75 Removed redundant check 2010-10-22 09:56:39 +00:00
Derick Rethans
0e24a7c400 - Strip out the typehint *checks* only. They are still parsed, and they are
still accessible through the reflection API.
2010-10-19 10:42:38 +00:00
Dmitry Stogov
3690ce39d9 zend_collect_module_handlers() has to be called after zend_extensions startup, because they can register additional 'hidden' extensions 2010-10-15 07:30:24 +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
f4173a8ece Fixed bug #52939 (zend_call_function does not respect ZEND_SEND_PREFER_REF) 2010-10-13 08:51:39 +00:00
Dmitry Stogov
bfe51842ab Added test 2010-10-12 07:38:36 +00:00
Felipe Pena
dbb6e0e9b0 - Added bison 2.4.3 version to the bison version list 2010-10-07 21:44:41 +00:00
Dmitry Stogov
fa3f0bb63f Fixed bug #51008 (Zend/tests/bug45877.phpt fails) 2010-10-05 11:28:56 +00:00
Dmitry Stogov
656f1fb271 Bug #51155 (Unreasonable non-emalloc allocations of memory) 2010-10-04 15:50:47 +00:00
Dmitry Stogov
e8c87c6d21 - Fixed bug #52773 (Proxy objects have an inadequate destroy_object store callback)
- Fixed bug #52774 (Proxy object's store free callback calls zval_ptor_dtor on already freed data)
2010-10-04 07:15:30 +00:00
Dmitry Stogov
d3b6fbe39b Fixed bug #52940 (call_user_func_array still allows call-time pass-by-reference). (cataphract@php.net) 2010-10-01 11:53:04 +00:00
Dmitry Stogov
f64e4bac49 Fixed bug #52879 (Objects unreferenced in __get, __set, __isset or __unset can be freed too early). (mail_ben_schmidt at yahoo dot com dot au, Dmitry) 2010-10-01 09:49:20 +00:00
Dmitry Stogov
53d3320951 Prevented crash in GC because of incorrect reference counting 2010-09-30 14:11:51 +00:00
Felipe Pena
ee4f5ac1c0 - Fixed EG(saved_fpu_cw) initialization 2010-09-22 00:11:34 +00:00
Dmitry Stogov
c2a92f3d27 Fixed bug #52888 (Zend MM shutdown crash) 2010-09-20 12:12:42 +00:00
Pierre Joye
aa0ed267a2 - use TSRMLS_*C instead of TSRMLS_FETCH in zend_list_insert 2010-09-16 09:13:19 +00:00
Pierre Joye
4420a91bbd - macros--; ZEND_FAST_* are now gone 2010-09-15 17:27:43 +00:00
Pierre Joye
ef53214b1c - not used anymore 2010-09-15 16:58:11 +00:00
Dmitry Stogov
e3bb93480a Regenerated 2010-09-15 07:39:57 +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
Johannes Schlüter
1e1e70dc55 - Don't be silent on bailout 2010-09-14 14:26:37 +00:00
Dmitry Stogov
411f9fbe4d We don't need to preallocate a memory segment in case we don't use zend memory manager 2010-09-08 07:52:49 +00:00
Dmitry Stogov
88bf6d2e16 Fixed GC bug 2010-09-03 09:27:47 +00:00
Dmitry Stogov
caffc1c972 Preallocate zend_hash instead of allocation/deallocation it on each request 2010-08-27 06:09:18 +00:00
Dmitry Stogov
2188f26c45 Fixed bug #52614 (Memory leak when writing on uninitialized variable returned from method call) 2010-08-25 09:14:36 +00:00
Scott MacVicar
1e48c71b96 Fix a bug where two doubles are equal but the maths operation makes it appear false.
Best example with INF where equals and identical produce different results.

<?php
var_dump(INF==INF);
var_dump(INF===INF);
2010-08-22 08:01:34 +00:00
Felipe Pena
37c39519bc - Reverted unintended modification 2010-08-18 22:08:36 +00:00
Dmitry Stogov
8a6d73b084 improved performance of @ (silence) operator 2010-08-18 13:58:13 +00:00
Dmitry Stogov
42289228ff Revert unintended modification 2010-08-18 09:45:52 +00:00
Felipe Pena
f3028b9226 - Improved fix for bug #52573 2010-08-18 01:59:37 +00:00
Sascha Schumann
0cbc4a08a1 align declaration with definition
(patch by kalle)
2010-08-17 12:14:52 +00:00
Dmitry Stogov
d93cf2a2d0 Bug #52361 (Throwing an exception in a destructor causes invalid catching) 2010-08-16 09:20:46 +00:00
Dmitry Stogov
e461c22ea9 Fixed memory leaks (related to bug #52361) 2010-08-16 08:11:08 +00:00
Felipe Pena
fdb6077fda - Missing traits data initialization for internal classes (causing Reflection to crash) 2010-08-14 01:12:43 +00:00
Dmitry Stogov
f48999ca3b Optimization of ASSIGN instruction 2010-08-11 15:34:06 +00:00
Dmitry Stogov
931c2d104d In ZTS mode default properties and constants of internal classes can't be modified in place and have to be separated 2010-08-11 09:38:41 +00:00
Dmitry Stogov
7566ff38a1 Fixed support for static properties of internal classes 2010-08-11 08:34:54 +00:00
Dmitry Stogov
e0b728597b Optimization (IS_TMP_VARs don't need reference counting) 2010-08-10 15:24:19 +00:00
Dmitry Stogov
523b965cd4 Prevent generation of long strings 2010-08-10 14:44:50 +00:00
Dmitry Stogov
808fd3f1f7 Optimization 2010-08-10 14:43:17 +00:00
Felipe Pena
30470999fe - Back the free() call for __iterator_wrapper to free the ce->name, as it is a fake class 2010-08-08 22:43:14 +00:00
Felipe Pena
c6c97db78f - Fix warning because the comparsion with literal (e.g. INIT_CLASS_ENTRY(..., "Foo", ...)) 2010-08-08 20:07:23 +00:00
Felipe Pena
e10d33fe5a - Fixed bug #52539 (Calling function from rebound Closure causes crash) 2010-08-08 15:06:14 +00:00
Felipe Pena
4f07d70d4e - Fixed ZTS build (Kalle) 2010-08-05 17:09:08 +00:00
Dmitry Stogov
3cf5ab9e56 Use interned strings for class names 2010-08-05 13:10:15 +00:00
Felipe Pena
05e25f0099 - Fixed bug #52508 (newline problem with parse_ini_file+INI_SCANNER_RAW) 2010-08-01 15:26:54 +00:00
Felipe Pena
e914d90643 - Fixed bug #52484 (__set() ignores setting properties with empty names) 2010-08-01 13:27:02 +00:00
Dmitry Stogov
6443445f25 ZEND_UNSET_* don't have results 2010-07-29 09:46:59 +00:00
Dmitry Stogov
39b4a5eea7 Additional specialization 2010-07-27 09:50:35 +00:00
Dmitry Stogov
d30073a2dc Removed deprecated check 2010-07-26 12:40:32 +00:00
Dmitry Stogov
5a2ee8ecea Use proper fetch types 2010-07-19 15:04:51 +00:00
Dmitry Stogov
c1336009c2 Removed invalid checks 2010-07-19 14:34:34 +00:00
Dmitry Stogov
ca4de03eed ZEND_FETCH_*_R operations simplified and can't be used with EXT_TYPE_UNUSED flag any more. Thit is very rare and useless case. ZEND_FREE might be required after them instead. 2010-07-16 13:38:09 +00:00
Dmitry Stogov
8aad91d14a Simplified string offset reading 2010-07-16 11:44:30 +00:00
Pierre Joye
f35e10e17f - fix vc6 build 2010-07-15 00:13:20 +00:00
Dmitry Stogov
7c24be8672 Fixed incorrect reinitialization 2010-07-14 10:27:08 +00:00
Felipe Pena
25710a406d - Added EG(saved_fpu_cw_ptr) initialization 2010-07-10 13:56:33 +00:00
Dmitry Stogov
5438a9d23c Eliminated useless allocation of FPU control word on each request startup 2010-07-09 09:02:14 +00:00
Dmitry Stogov
bc1f1d25fa zend_ptr_stack allocation is delayed before the actual usage 2010-07-09 07:31:18 +00:00
Felipe Pena
b458b1a4c1 - Fix ZTS build 2010-07-08 15:22:11 +00:00
Dmitry Stogov
f0c8366a9e - use interned strings for auto globals
- $GLOBALS became a JIT autoglobal, so it's initialized only if used (this may affect opcode caches)
2010-07-08 14:05:11 +00:00
Dmitry Stogov
25d6aee4fb Removed redundant check 2010-07-07 11:44:27 +00:00
Dmitry Stogov
3ea5bc7914 Reused single segment between requests. Saved one malloc/free for each request. 2010-07-07 10:34:50 +00:00
Dmitry Stogov
d3efe97a2e Reduced initial VM stack size to fit into zend_mm segment and eliminate extra segment allocation 2010-07-07 10:30:17 +00:00
Dmitry Stogov
8054458fb8 zend_stack initialization is delayed before the actual usage 2010-07-06 16:09:43 +00:00
Felipe Pena
3ea3bbaca3 - Fix ZTS build 2010-07-06 15:52:39 +00:00
Dmitry Stogov
1a1178a685 eliminated unnecessary iterations during request startup/shutdown 2010-07-06 11:40:17 +00:00
Dmitry Stogov
ab67865d21 Fixed bug #52237 (Crash when passing the reference of the property of a non-object) 2010-07-05 09:08:35 +00:00
Dmitry Stogov
a09b7138a9 Used more sutable type. Reduced memory usage. 2010-07-01 08:58:14 +00:00
Felipe Pena
f6f0f65b9c - Fixed bug #48930 (__COMPILER_HALT_OFFSET__ incorrect in PHP >= 5.3) 2010-06-30 02:45:10 +00:00
Felipe Pena
f2419953d9 - MF5.3: Reverted fix for bug #48930 (due binary compatibility breakage)
# To commit a new common fix
2010-06-30 02:30:14 +00:00
Felipe Pena
3396a6d185 - Fixed bug #48930 (__COMPILER_HALT_OFFSET__ incorrect in PHP >= 5.3) 2010-06-27 21:46:16 +00:00
Felipe Pena
cb6bf19bfa - Fixed bug #51421 (Abstract __construct constructor argument list not enforced) 2010-06-26 22:05:13 +00:00
Felipe Pena
d98de7d248 - Fixed bug #52160 (Invalid E_STRICT redefined constructor error) 2010-06-26 19:19:16 +00:00
Felipe Pena
72bc2a9ae8 - Fixed tests 2010-06-26 17:17:47 +00:00
Felipe Pena
87c87daaf3 - Fixed bug #52193 (converting closure to array yields empty array) 2010-06-26 17:14:33 +00:00
Felipe Pena
b355aa00b0 - Fixed bug #52138 (Constants are parsed into the ini file for section names) 2010-06-24 22:32:42 +00:00
Dmitry Stogov
09943e56cd Removed redundant code 2010-06-22 14:15:08 +00:00
Dmitry Stogov
d868733cc3 Fixed bug #52041 (Memory leak when writing on uninitialized variable returned from function) 2010-06-15 08:22:51 +00:00
Felipe Pena
eb0ba9068d - Allow write context on array dereferencing from method return
- New tests
2010-06-12 16:11:10 +00:00
Felipe Pena
2c2fcc2217 - Fixed bug #52051 (handling of case sensitivity of old-style constructors changed in 5.3+) 2010-06-12 15:30:21 +00:00
Felipe Pena
ba0486f96c - Fixed bug #52060 (Memory leak when passing a closure to method_exists()) 2010-06-11 23:20:13 +00:00
Dmitry Stogov
743a2e29c1 Fixed bug #51822i (Segfault with strange __destruct() for static class variables) 2010-06-10 11:45:51 +00:00
Dmitry Stogov
63c7b02424 Fixed bug #52001 (Memory allocation problems after using variable variables) 2010-06-10 09:13:22 +00:00
Felipe Pena
dc3940bd1c - Fix ZTS build 2010-06-08 18:02:10 +00:00
Stefan Marr
e6bd5368ad Fixed issue with statics in traits.
#Please review this change, I moved the routine which copies statics from the closure code to zend_variables.c
#Please also have a look to check whether the TSRMLS_DC is correct, and whether it fits with the rest in zend_variables, because there you are using some macro magic and I am not exactly sure what the reason is for that.
2010-06-08 15:56:36 +00:00
Felipe Pena
99c31b31ec - Added array dereferencing support [DOC]
# http://wiki.php.net/rfc/functionarraydereferencing
2010-06-08 00:05:29 +00:00
Felipe Pena
d97ae93616 - Let's generate this #ifdef only on zend_vm_execute.h 2010-06-07 23:04:30 +00:00
Felipe Pena
efcb21b0dd - Update 2010-06-07 14:51:12 +00:00
Felipe Pena
80ab4dee7b - Fix script 2010-06-07 14:37:35 +00:00
Pierre Joye
2c8dcfa22a - show the free_op1 warning only once, until a fix is applied 2010-06-07 01:37:59 +00:00
Pierre Joye
90b9853a3c - show the free_op1 warning only once, until a fix is applied 2010-06-06 20:32:51 +00:00
Pierre Joye
fd583ffa1d - label only used when mmap is available 2010-06-06 12:32:25 +00:00
Johannes Schlüter
0262fdf3e9 - A method called like a trait is no constructor 2010-05-29 20:01:08 +00:00
Dmitry Stogov
578d3159c6 Conditional compilation is replaced by macro 2010-05-26 15:42:59 +00:00
Felipe Pena
de531056f7 - Fixed bug #51899 (Parse error in parse_ini_file() function when empy value followed by no newline) 2010-05-26 02:18:17 +00:00
Felipe Pena
79d2aaf0f1 - Fixed bug #51905 (ReflectionParameter fails if default value is an array with an access to self::) 2010-05-26 00:00:58 +00:00
Antony Dovgal
435aa876fc fix zend_std_get_static_property() in ZTS mode 2010-05-25 20:16:14 +00:00
Dmitry Stogov
f7ce69585c - Interned string related callbacks moved turned from compiler_globals into real globals
- Updated API version number
2010-05-25 09:00:20 +00:00
Ilia Alshanetsky
45a2014ce1 Improved test 2010-05-24 20:04:12 +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
f23e857676 Fixed ZTS build 2010-05-24 17:07:52 +00:00
Dmitry Stogov
04dd48ceca Fixed exception handling in GOTO VM 2010-05-24 14:46:31 +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
Ilia Alshanetsky
ab9de550e2 Allow arbitrary number of space characters between type-hint and method/function parameter 2010-05-23 18:09:32 +00:00
Ilia Alshanetsky
31f62dbc72 Fixed a memory leak 2010-05-20 20:17:49 +00:00
Derick Rethans
1bc9247651 - Added scalar typehinting. 2010-05-20 19:18:35 +00:00
Felipe Pena
f5f4a35927 - Fixed bug #51827 (Bad warning when register_shutdown_function called with wrong num of parameters) 2010-05-14 23:48:03 +00:00
Felipe Pena
bcd9a87e2a - Fixed bug #51791 (constant() aborts execution when fail to check undefined constant) 2010-05-13 02:13:30 +00:00
Dmitry Stogov
4ae16d351c Fixed a possible information leak because of interruption of XOR operator 2010-05-12 11:10:06 +00:00
Dmitry Stogov
d352196bd6 Fixed bug #49893 (Crash while creating an instance of Zend_Mail_Storage_Pop3) 2010-05-11 16:09:43 +00:00
Dmitry Stogov
f4b927a42b Fixed a possible memory corruption because of unexpected call-time pass by refernce and following memory clobbering through callbacks. 2010-05-11 10:41:19 +00:00
Felipe Pena
a7c129af16 - Fix typo (take 3! thanks Chris and Tony) 2010-05-07 17:57:09 +00:00
Felipe Pena
91c46fd26e - Fix error message wording (Kalle) 2010-05-07 17:18:49 +00:00
Felipe Pena
c95b4ace40 - Fixed ZEND_VERIFY_ABSTRACT_CLASS order when using traits
# It's the last one now, thus the traits can be used to implement interfaces
2010-05-07 16:29:15 +00:00
Felipe Pena
74fe9dd89e - Fixed magic method and constructor copy for traits 2010-05-07 13:55:27 +00:00
Felipe Pena
5d701938a3 - Added check for constant creation on Traits
- Simplified trait flag check
- Test++ :)
2010-05-07 11:09:35 +00:00
Felipe Pena
7b7463bb8a - New tests 2010-05-06 19:21:11 +00:00
Felipe Pena
ca3656dfe0 - Added check for 'static' on trait visibility modifier 2010-05-06 19:20:12 +00:00
Felipe Pena
363d6e45be - Fix typos 2010-05-06 18:28:45 +00:00
Felipe Pena
241ceed37e - Fix error messages & WS 2010-05-06 18:20:38 +00:00
Felipe Pena
ba5edd5035 - New tests 2010-05-06 15:49:58 +00:00
Felipe Pena
00eec0939f - Added get_declared_traits() 2010-05-06 15:18:20 +00:00
Dmitry Stogov
277f271a83 Added compiler hints 2010-05-06 12:52:27 +00:00
Dmitry Stogov
d5800f881c Optimized access to static properties using executor specialization. A constant class name may be used as a direct operand of ZEND_FETCH_* instruction without previous ZEND_FETCH_CLASS. 2010-05-06 10:27:35 +00:00
Felipe Pena
6e8db0b35a - New tests 2010-05-04 19:06:13 +00:00
Felipe Pena
a888d2cd16 - Added check for trait when trying to extend it 2010-05-04 18:45:01 +00:00
Felipe Pena
e431cec023 - Fix trait flag identification 2010-05-04 18:31:40 +00:00
Felipe Pena
45a536fc7c - Added check for abstract class
abstract class foo { }
  class T { use foo; } // T cannot use foo - it is not a trait

- Added check for trait on NEW 

  trait a { }
  new a; // Cannot instantiate trait a

# Tests for errors comming soon :)
2010-05-04 18:21:00 +00:00
Stefan Marr
331b052994 Changed naming of traits-related helper functions (suggested by Derick), added missing static qualifiers. 2010-05-03 22:08:09 +00:00
Felipe Pena
e232da026b - Replaced 'zend_hash_find' to 'zend_hash_quick_find' on zend_hash_compare() function 2010-05-03 16:36:04 +00:00
Pierre Joye
b3b6cfea2a - update bison version (mike) 2010-05-03 09:05:54 +00:00
Felipe Pena
155bdc8a72 - WS 2010-05-02 18:47:27 +00:00
Felipe Pena
9568c8e398 - Changed zend_hash func calls to use the quick ones 2010-05-02 17:39:24 +00:00
Stefan Marr
fe4988241d Refactored part of the Traits implementation.
# - 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
2010-05-02 16:32:25 +00:00
Felipe Pena
84c1643644 - Fixed bug #51719 (typo in function prototype) 2010-05-01 18:54:49 +00:00
Antony Dovgal
c23d902e0b fix tests 2010-04-29 12:48:06 +00:00
Antony Dovgal
eacfa022b1 fix skipif section 2010-04-29 12:43:18 +00:00
Pierre Joye
de555d3970 - fix build (void is evil) 2010-04-28 20:47:13 +00:00
Johannes Schlüter
eb7e848f34 spread some more const 2010-04-28 10:11:50 +00:00
Dmitry Stogov
4ff3000850 ws 2010-04-27 12:23:29 +00:00
Dmitry Stogov
d8a7f892ee - ws
- removed unused variables
2010-04-27 12:17:32 +00:00
Dmitry Stogov
c58b131e29 - Reimplemented ZEND_INIT_FCALL_BY_NAME and ZEND_INIT_NS_FCALL_BY_NAME to use literals instead of additional operands
- Optimized access to global constants
2010-04-27 12:09:13 +00:00
Dmitry Stogov
3c179430ec Fixed crash in Zend/tests/unset_cv09.phpt 2010-04-26 13:51:46 +00:00
Felipe Pena
7ab8fd9c0a - Fix test 2010-04-26 13:41:00 +00:00
Felipe Pena
c4630c0da2 - Remove empty tests 2010-04-26 00:21:18 +00:00
Felipe Pena
0a6bcd44a7 - Removed allow_call_time_pass_reference (Pierrick) 2010-04-26 00:13:34 +00:00
Antony Dovgal
7211284ac7 fix ~450 tests and 25 segfaults
make test, anyone?
2010-04-25 19:17:16 +00:00
David Soria Parra
ebd12eba95 Remove unused variable 2010-04-25 18:34:36 +00:00
David Soria Parra
08b9fdc8a3 Add DTrace probes 2010-04-24 13:32:30 +00:00
Antony Dovgal
a9a55f77c0 fix WS 2010-04-23 09:11:44 +00:00
Dmitry Stogov
f06d839e59 Use fast class fetch function 2010-04-23 08:56:03 +00:00
Felipe Pena
246a15e95f - Fix memory issue 2010-04-23 02:57:49 +00:00
Felipe Pena
c7bf006c4d - Fix Windows build (Kalle) 2010-04-23 01:56:03 +00:00
Felipe Pena
5a8632a144 - Fix function signature 2010-04-23 01:43:27 +00:00
Felipe Pena
28263bf8a4 - Fix ZTS code and CS 2010-04-23 00:54:51 +00:00
Felipe Pena
cdf71efc5c - Fix zend_hash_apply_with_arguments() calls on ZTS 2010-04-22 23:25:05 +00:00
Felipe Pena
c05e38e401 - Fixed ZTS build & comment-style 2010-04-22 23:16:15 +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
Stefan Marr
05a9649043 Changed the exclusion keyword from 'instead' to 'insteadof'. [TRAITS]
#That was suggested several times already, but am still not sure whether that really reads better.
#Especially since only the trait is mentioned, since the method name would be duplicated anyway.
2010-04-22 21:56:55 +00:00
Dmitry Stogov
0d1398457f Removed unused function 2010-04-22 15:51:03 +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
Felipe Pena
ac181e07ef - Removed unused variables 2010-04-22 13:28:53 +00:00
Dmitry Stogov
fb9d95e5a4 ZEND_RETURN is splitted into two new instructions ZEND_RETURN and ZEND_RETURN_BY_REF 2010-04-22 11:56:45 +00:00
Kalle Sommer Nielsen
9d395a4a2b Removed import_request_variables(), this is not needed anymore without register_globals 2010-04-21 22:23:55 +00:00
Felipe Pena
5e2cba90c9 - Dropped unused HL_BG_COLOR (Kalle) 2010-04-21 22:06:18 +00:00
Kalle Sommer Nielsen
9a38f301d6 Remove highlight.bg, it was removed in the old trunk and its not referenced in zend_highlight.c, meaning its not even implemented correctly in 5.3. 2010-04-21 21:56:24 +00:00
Felipe Pena
9f700c417b - Fix ZTS build 2010-04-21 15:08:10 +00:00
Dmitry Stogov
7a2fd62c39 Eliminated unnecessary compile-time hash_value recalculation for interned strings 2010-04-21 14:58:33 +00:00
Kalle Sommer Nielsen
febee11285 Removed register_globals 2010-04-21 01:27:22 +00:00
Stanislav Malyshev
10a9f48eee add test for self:: and static:: 2010-04-20 19:46:30 +00:00
Johannes Schlüter
5ec6f1e9a1 WS 2010-04-20 15:29:03 +00:00
Antony Dovgal
9aa82f22f2 fix ZTS build 2010-04-20 12:53:43 +00:00
Dmitry Stogov
b6ae8a964b Fixed bug #48781 (Cyclical garbage collector memory leak) 2010-04-20 12:30:35 +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
0bba0bfdc8 regenerated files 2010-04-20 11:14:07 +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
Dmitry Stogov
94dd83722b Changed the structure of op_array.opcodes. The constant values are moved from opcode operands into a separate literal table 2010-04-20 10:57:45 +00:00
Dmitry Stogov
ea53dc5af6 Added an optimization which saves memory and emalloc/efree calls for empty HashTables 2010-04-20 10:49:22 +00:00